aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)

UNLICENSE License

Stars
600

Bot releases are visible (Hide)

aniseed -

Published by Olical over 3 years ago

  • Make internal compiler errors more obvious.
  • Ensure backslashes are double escaped for the *path* variable.
  • Add fs.path-sep and use it anywhere a / is used for Windows support.
aniseed - Cleaner RTP sync, Fennel update (bug fixes!) and assorted bug fixes

Published by Olical over 3 years ago

Hello Fennel hackers! I hope the sky is as blue where you are as it is outside my window 🌞

  • Fixed a duplicate synchronisation step between your Neovim runtimepath and the Lua package path. This actually means we benefit from all the lazy loading of the Fennel compiler I did in the last update. This last little thing hanging on caused most of my load time optimisation work to not fully kick in.
  • Updated Fennel to 0.9.2 then a few commits beyond that to include a fix for escaping characters. You may have noticed weird errors if you were tying to map something to \\ etc, that should be okay now!
  • Only loading the autoload tooling when it's actually used now, so autoload is autoloaded. Such meta, very wow.
  • You can now autoload modules that export a function instead of a table! Magic!
  • Added a string.gsub to correct rare backslash paths to forward slash delimited on Windows. One Neovim function was returning backslashes on Windows which caused mixed separator paths on Windows and broke aniseed.env for those users. Thanks @kethku!
aniseed - Loading optimisations, more metadata and various fixes

Published by Olical over 3 years ago

  • Implemented autoload for aniseed.env.
  • Avoid loading the Fennel compiler for aniseed.env unless absolutely required, speeds up startup of dotfiles.
  • Add *file* to every module so now you can get a relative path to the Fennel file you're currently evaluating. You can use this to work out various relative paths.
  • Fixed customising the aniseed.env Lua output directory.
  • Finally removed the old aniseed.dotfiles module, it's been deprecated for a long time now. Please use aniseed.env.
  • Ensure all files in your dotfiles are recompiled if you change a macro file #41.
  • Added more metadata to autoloaded modules for Conjure to use during autocompletion.
aniseed - Fennel updates, lazier requires, more functions!

Published by Olical over 3 years ago

  • Merged my own fennel.vim syntax plugin into Aniseed, so you no longer need another plugin for Fennel support! (https://github.com/Olical/fennel.vim)
  • Silence aniseed.env if it can't require your init module yet (i.e. you've turned on aniseed.env but haven't written your init yet)
  • Merged #38, adds aniseed.core/str, just like Clojure! Thanks!
  • Add autoload, a drop in replacement for require that only works for table modules but will load them when they are used not when required. I've replaced all requires with autoload in all of my plugins, I recommend you trying the same 😄 can speed up your initial load time in some cases.
aniseed - Fennel updates and g:aniseed#env fixes

Published by Olical over 3 years ago

A routine update of Fennel which brings in some nice new macros such as .?, exciting! A nil safe lookup!

#32 was merged which fixed setting g:aniseed#env to a map (as opposed to v:true). I then refactored that a little so the defaulting of the options is handled by Fennel / Lua instead of Vim Script.

Turns out you can't compare a Vim map to any other data type, including booleans, who knew! {} == v:true throws an error, fun.

aniseed - Better aniseed.env loading, harden module macro, fix Fennel updating

Published by Olical over 3 years ago

Hello wonderful people! I hope you enjoy these small fixes and improvements.

  • Updated Fennel again and fixed my script that recompiled the Fennel compiler. Hopefully nobody noticed any fallout from this, but I had some weird inconsistencies in which Fennel compiler tag I was pinned to because I was using make fennel instead of make build. I think this changed in the Fennel project at some point and I didn't catch it until now. Probably didn't impact anyone in any way, but still! Fixed!
  • Added the g:aniseed#env option, so you don't need to require and call a function in Aniseed anymore! That means you don't need to worry if Aniseed is installed or not etc, should make things a lot easier to hook into. Set it to v:true to enable loading of ~/.config/nvim/fnl/init.fnl and set it to a map of options to enable it with extra options (like you used to pass to the function.
    You can still call the original function to enable the Aniseed+Fennel driven config, but I highly recommend this method instead! #31
  • Hardened the (module ...) macro against some edge cases, thank you for pointing it out, Tae! #30

Hopefully the g:aniseed#env option allows people to use Aniseed without running into weird issues with some more modern plugin managers like packer. Only time will tell, but I think it's an improvement regardless.

I also added some small examples / docs for aniseed.env to the README and removed the link to the gitter and replaced it with a link to Conjure's discord because that place is ❤️

I hope you have a great Sunday!

aniseed - Fennel updates

Published by Olical over 3 years ago

Just keeping up to date with Fennel mainline and handling any issues that arise ASAP 😄

aniseed - Better seeding and a fix for packer users

Published by Olical almost 4 years ago

Hello everyone! I hope your 2021 is off to a great start! Here's some Aniseed updates that have been sitting on develop, I'm happy that they're stable so it's time for a tag 😄

  • Merge #29 from @sotte, the seed script now has some extra guards around the plugin name. Safety!
  • Continued to update Fennel, I'm keeping track of the Fennel master branch, so we're always on the bleeding edge. This way I can deal with API changes early before it becomes too big of a deal and you get compiler improvements as quickly as possible!32
  • I refactored some of the runtimepath -> fennel.path copying internally, this is a mechanism that allows you to require Fennel / Lua seamlessly from plugins (which are on the runtimepath). There's been some issues around this related to packer, but I hope this is all fixed now.

On the off chance that you run into a missing conjure.aniseed.macros error, it's to do with this packer / runtimepath issue. It only seems to happen to people running Neovim built from master with packer as their plugin manager.

@BerkeleyTrue worked it out though! So hopefully his comment helps you too! https://github.com/Olical/conjure/issues/159#issuecomment-757384128

aniseed - Happy Holidays!

Published by Olical almost 4 years ago

Hello everyone! I hope these changes find you well 😄

  • Merged #28, allows passing force through anissed.env.
  • Merged #26, improves test running for Aniseed itself as well as your tests.
  • Updated Fennel and recompiled everything.

Have a great day!

aniseed - Updates and Neovim 0.5 fixes

Published by Olical almost 4 years ago

  • Updated Fennel to the latest commit once again, keeping up with those bleeding edge improvements!
  • Fixed #25, a path issue only present in Neovim 0.5+ / master as of a week or so ago. The whole path management situation is a lot cleaner now because of this tidy / fix up.
  • Added some tools to help alleviate #24 (startup time with aniseed.env), so now there's some more tools and options in the aniseed.env :help aniseed text around doing less work if you know you don't have to. Namely, not compiling or even trying to check for things to compile if you know you haven't changed any source files.
aniseed - Documentation fixes and mutative merge

Published by Olical almost 4 years ago

Hello! A small update for you all, but I'm going to keep them coming. Little and often, continuous improvements with low risk of breakage is the way to go 😄 mostly just tagging in preparation for an impending Conjure release.

  • Fixed some documentation issues, notably by merging #22.
  • Added and documented merge! in aniseed.core. It's just like merge, but it mutates the first table instead of merging into a fresh table. So merge is near enough a shallow clone which doesn't alter the base table, merge! does mutate the base table.
  • Updated Fennel a few times, we're ahead of the curve for Fennel 6.0.1 I think. Keeping us on the tip of master to benefit from a few LuaJIT related fixes. I'm a canary for the Fennel devs so I've been keeping them in the loop with issues I've run into, I think the tight feedback loop helps both of us. I hope!

Not very much, but all steps in the right direction I hope. Enjoy! I hope you have a great week.

aniseed - Repalce dotfiles with env, add timing macro and update Fennel

Published by Olical about 4 years ago

Hello! Good morning! Happy weekend! Here's a few Aniseed updates to keep you on your toes 😄

  • Merged #21 which fixes a documentation typo, thanks @davidwilemski!
  • Updated Fennel, we're using a patched branch that fixes some rare errors under LuaJIT, shouldn't notice any changes, I'm just keeping us at the tip of the development.
  • Added a (time ...) macro that you can access from within any Aniseed project or code. It'll time your code and print the results in milliseconds just like Clojure's time macro! Great for working out how long chunks of your code are taking during development.
  • After a discussion in #19 I've deprecated (with a warning) aniseed.dotfiles in favour of aniseed.env which is a little more flexible and well thought out. There's migration instructions under :h aniseed-dotfiles and :h aniseed-env. It's near enough the same apart from the fact that you can now specify which module you want to be your entry point and where it's stored (relative to your Neovim configuration directory). This means you could have ~/.config/nvim/init.fnl as your configuration entrypoint 👀

So a fairly small update but hopefully useful! I'll leave aniseed.dotfiles around with the printed warning at startup for a while until I'm confident everyone's moved across and any issues are worked out. Sorry for the work this incurs but I promise it's super small.

Just replace this:

lua require('aniseed.dotfiles')

With this:

lua require('aniseed.env').init({ module = 'dotfiles.init' })

Or, if you rename your ~/.config/nvim/fnl/dotfiles/init.fnl to ~/.config/nvim/fnl/init.fnl you can just use the default call like so:

lua require('aniseed.env').init()

Again, see :h aniseed-dotfiles and :h aniseed-env for more information.

I hope you enjoy! Have a great rest of your Saturday and weekend!

aniseed - Fennel updates, macro and seed.sh improvements

Published by Olical about 4 years ago

Hey there! Quite a lot went into this release and it too longer than I expected because there were some Fennel things to get fixed before it went out for general release (https://github.com/bakpakin/Fennel/issues/331).

Without further ado, here's the full changelist!

  • Updates to the seed.sh script to provide some slightly nicer output and renaming of files on your behalf. Thanks @tami5 for the PR (#14)!
  • Return values from fn-bridge by default, it was confusing not having this as the default. Now you can opt out of returning the value from a bridge-fn rather than opting in.
  • Update to Fennel 0.6.0 + a few extra commits to fix a few things. This is more like 0.6.1-alpha. Hopefully some more subtle bugs fixes and improvements have slid in!
  • Ensure a bad require doesn't kill the module. Before, if you tried to require something that didn't exist you'd get a horrible large error and then that module was unusable until you either cleaned it up yourself or restarted Neovim. You can now "unrequire" modules by deleting them from the definition and a module will survive a bad module require.
  • Add *module* and *module-name* as locals you can access in your module source code. This allows you to inspect your actual module table as well as the name of the module you're currently evaluating within. This can be useful for referring to the current namespace from VimL function bridges.
  • Ignore paths that end with macros.fnl in glob compiling, this means you can create macros.fnl files in your dotfiles and plugins without having Aniseed attempt to compile them to Lua (that's not possible). This should make it easier to use macros in your projects!

And that's all! There were a bunch more commits but I think this is all of the highlights, I hope you find these changes useful and I hope I can bring you more soon. Have a great weekend!

aniseed - Macros in your dotfiles! Updated Fennel!

Published by Olical about 4 years ago

Hey, it's been a while but here's a fresh drop of Aniseed 😄

  • Your Neovim config directory is now on the Fennel search path when you're using Aniseed for your dotfiles. This means you can write macros for your dotfiles! That means you can write things like this: (thanks mitch on discord for prompting me to get this working and showing me your neat syntax)
(augroup :clojure
  (autocmd "BufWritePost *.clj :silent Require"))
  • Updated Fennel to 0.5.0, although I think 0.6.0 is just around the corner 🎉 this update was a fairly difficult one to get working though since it's now self hosted (Fennel is written in Fennel!). Let me know if you encounter any issues, there's definitely some differences in error output, I may have to tweak things to get stuff to play well together over time.
  • Some internal tests started failing intermittently, I've started sorted the data so that the tests pass consistently.

And that's it, a few things but a fair bit of tinkering to get them to work properly. I hope it all works great for you!

aniseed - Add `constantly`, speed up `str/join` and a plugin template script

Published by Olical about 4 years ago

Hello! A fairly small update but hopefully a useful one for prospective Aniseed based plugin authors.

  • Added conjure.core constantly, just like Clojure's constantly. See the help for more info.
  • Made clojure.string join a little bit more efficient.
  • Added script/seed.sh (documented in the help and readme) which sets up a blank example Aniseed plugin in your current directory.

This blank project includes a sample source file, way of automatically loading it on plugin load, test and makefile to tie it all together. I hope it's useful! It should help you get up and running developing plugins far quicker! It's exactly how I structure my projects but stripped back to the bare minimum so as not to contain tooooo many assumptions.

Enjoy! Now back to planning / building my VimConf Live 2020 talk 👀

aniseed - Update Fennel to 0.4.2

Published by Olical over 4 years ago

Just a routine version bump and test alongside some small Makefile changes. Have a great week!

aniseed - Fennel update, require-macro in module, more aniseed.core fns

Published by Olical over 4 years ago

Hello! I hope you're having a good Saturday so far (if you're reading this as it goes out, that is!)

  • Bumped the Fennel dependency to 0.4.1.
  • Added support for require-macro in the Aniseed module macro, so now your module can depend on macros!
  • Add odd? and even? functions to aniseed.core.
  • Support multiple key value pairs in aniseed.core/assoc, just like Clojure #7

Thank you for staying up to date! Have a pupper 🐶

image

aniseed - Update Fennel, lock down defs, improve embed.sh

Published by Olical over 4 years ago

Fairly minor, I'm just keeping Fennel up to date with their master branch right now since it's getting quite a few fixes merged that look nice to me.

I also realised that mutating a def doesn't make any sense and causes inconsistencies / bugs. So now you can't do this because it didn't work in the first place, now it'll tell you with an error:

(def xyz true)
(set xyz false)

That would have desynced the value with what was exposed by the module, bad times. Now it just prevents you from doing it. If you want state at the module level you can mutate simply use a table.

(def xyz {:on? true})
(set xyz.on? false)

I've also improved embed.sh so you can use it to embed any dependency now, not just Aniseed itself!

aniseed - Updated Fennel to v0.4.0+

Published by Olical over 4 years ago

I've updated Fennel and added some string trimming functions to aniseed.string. I've also fixed Aniseed's test output which is helpful, it was suppressing some stdout before which was kind of annoying.

aniseed - Conjuring up a storm and adding help!

Published by Olical over 4 years ago

This is a pretty big release, I've finally deleted all of the internal mapping code, Aniseed no longer comes with key mappings to run things. Instead you should install Conjure and use that, it's a fantastic experience compare to what used to be here.

You may still have to use the develop branch of Conjure if I haven't release it yet. I'm going to release it tomorrow, 04/05/2020 since it's also Star Wars day.

Also, :help aniseed will now provide ALL of the documentation you could possibly need including documentation for every single function and macro exposed by Aniseed. Enjoy! 🎉 (closes #3)

Includes a lot of smaller changes and tweaks that I won't bother to mention right now, they're all related to things I added or fixed while working on Conjure.