Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
UNLICENSE License
Bot releases are visible (Hide)
Published by Olical over 4 years ago
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.aniseed.core
as a
now all over the place since I use it so much.println
internally over the plain Lua print
so you can capture output of core functions with with-out-str
.Published by Olical over 4 years ago
split
to aniseed.string
.defonce
and improve behaviour.scripts/embed.sh
, you don't need it installed globally as a Neovim plugin now.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.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!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!
last
and count
to aniseed.core
.run!
function.nvim.lua
and fennel
.fennel.path
matches lua.path
.deftest
module included as part of module system. Test suits are even nicer!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 🎉
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.
Published by Olical almost 5 years ago
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
.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.: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.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.
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!
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!
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.