aniseed

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

UNLICENSE License

Stars
600

Bot releases are visible (Hide)

aniseed - More aniseed.core functions!

Published by Olical over 4 years ago

Added to aniseed.core...

  • merge, merge various maps together, just like Clojure.
  • kv-pairs, turn a table into a sequential table of key/value tuples.
  • map-indexed, basically kv-pairs and then map. Just like Clojure.
  • with-out-str, capture anything printed by pr or println within the callback.
  • get, get-in, assoc and assoc-in. Just like Clojure but assoc will mutate.
  • butlast, everything but the last item in a table.
  • empty?, returns true if what you give it has a count of 0.
  • mapcat, like Clojure.

Misc

  • I alias aniseed.core as a now all over the place since I use it so much.
  • Use println internally over the plain Lua print so you can capture output of core functions with with-out-str.
  • More tests!
aniseed - Macros with embedding and optional mappings

Published by Olical over 4 years ago

  • Added a split to aniseed.string.
  • Fix defonce and improve behaviour.
  • Allow use of module macros from Aniseed embedded via scripts/embed.sh, you don't need it installed globally as a Neovim plugin now.
  • Don't load the mappings by default, you have to require aniseed.mapping and run init yourself now. This is to give people options and support Conjure in the future as a way to evaluate things through Aniseed.
  • Make aniseed.core's pr handle multiple arguments correctly.
  • aniseed.core's count supports more than just tables and nil, you can now pass it strings for example!
aniseed - Module system, usability, documentation

Published by Olical over 4 years ago

This is a big release since it provides a full interactive evaluation story. You'll need to buy into it by using the module and def... macros instead of fn and local though!

  • Added last and count to aniseed.core.
  • More tests.
  • Better internal looping functions based on the run! function.
  • Update nvim.lua and fennel.
  • Ensure fennel.path matches lua.path.
  • Full module system, documented in the readme.
  • deftest module included as part of module system. Test suits are even nicer!
  • A bunch of scripts to help you fetch deps, compile Fennel, run tests and embed Aniseed within your plugin for runtime use.
  • Mappings by default when you're in a Fennel buffer. I hope they're inoffensive 😬
  • More documentation.
  • One easy step to allow you to write your Neovim config in Fennel.

I hope you enjoy! It's been a lot of hard work, I hope it allows people to go out and make all sorts of amazing plugins that run faster and are easier to maintain and extend into the future 🎉

aniseed - Testing and CI!

Published by Olical almost 5 years ago

Aniseed now has a test runner and suite, see the readme for more information but it essentially means you can do this:

(fn add [a b]
  (+ a b))

{:aniseed/module :my.math
 :add add

 :aniseed/tests
 {:add
  (fn [t]
    (t.= 50 (add 30 20))
    (t.= 10 (add 10 0) "adding 0 does nothing"))}}

Then all you have to do is execute :AniseedRunAllTests (providing aniseed.mapping's init has been executed first) and you'll see the following output:

[my.math] OK 1/1 tests and 1/1 assertions passed
[total] OK 1/1 tests and 1/1 assertions passed

Aniseed's test suite actually does this in CI through a short lived Neovim instance, check out the Makefile and .circleci configuration for more information on how to do that.

aniseed - aniseed.fs changes, better module reloading

Published by Olical almost 5 years ago

  • Breaking! In aniseed.fs, renamed ensure-ancestor-dirs to mkdirp and split out the code to get the basename of the file into a function called basename.
  • In aniseed.string, corrected one of the if statements to be consistent with it's other branches. They all use aniseed.core type checking functions now.
  • Evaluating a file that returns a table containing :aniseed/module :my.module will now merge the keys into the already loaded my.module. This means other modules that require it will have their tables they're holding onto in locals updated. Before the entire table was swapped out leaving the dependant modules holding onto an old version of my.module. This approach keeps everyone in sync as you change a module.
aniseed - Windows support

Published by Olical almost 5 years ago

Thanks to #1, Aniseed now supports Windows. I removed the use of sub-modules (semi-unrelated) and I'm now copying the compiled Lua that's required into the lua directory (instead of symlinks). That's all committed into the repo purely for distribution reasons.

This should change nothing for current users other than your plugins that depend on Aniseed will now work on Windows hosts.

aniseed - Stacktraces when ahead of time compiling files or globs

Published by Olical almost 5 years ago

I was accidentally throwing away the Fennel stacktrace if it encountered an error whilst compiling your files (either one at a time or within a larger glob call), that's now getting printed correctly.

You'll see error output in Neovim if your Fennel is incorrect now, hooray!

aniseed - Post dog-food stabilising

Published by Olical almost 5 years ago

I've rewritten my dotfiles in terms of Aniseed and Fennel, I'm happy that it's usable in practice for real world use cases. Enjoy!

aniseed - Initial release

Published by Olical almost 5 years ago

Allows statically compiling Fennel to Lua either one file at a time or as a glob of a directory.