Neovim Configuration and Plugins in Fennel Lisp
oli.me.uk
oli.me.uk
I now wish people used Lua everywhere instead of JS, Python or Ruby. Some are doing desktop programming in JS, for personal productivity software, like Alfred alternatives Zazu and Cerebro. Eeeeh nah, productivity software needs to be fast. Would be lots better to do that in Lua. And it's certainly a better idea for editor plugins than using Python.
Fennel transpiles code to Lua so fast that it's feasible for scripting, even on my machine.
I believe also that Lua might be able to do true parallelism, via libraries. (Haven't tried yet, though.)
Parallelism is enabled by a data flow architecture on top on nginx workers (compare TPL Dataflow in C# or Intel TBB in C++).
Concurrency is enabled using coroutines (nginx threads). It's virtually impossible to write blocking code and that's without any async or other bs in sight.
It's really fcking fast. Like, some parts of the overall arch are rust, but in the real, io bound world there's virtually no speed difference. Of course safety is good. But you get types and other neat zero cost abstractions for Lua using Haxe.
This Dataflow architecture also benefits from openresty built in concurrency safe queues, maps etc with atomic commit and cross worker access. Everything feels so damn effortless. I didn't have to do any work on making it scale. Just tweak the number of workers knob and boom, almost linear benefit. That's for rust and Lua, both awesome at parallelism in this case.
Anyway, even though I never write pure Lua, I still think it should have won against python (man did we try, even riding that ML wave).
I'm in love, but me is not many.
[1] - https://openresty-reference.readthedocs.io/en/latest/Lua_Ngi...
Startup is instant once compiled, and compilation usually takes less than 0.5s depending on how much I changed.
One of Neovim's goals is to make Lua a first-class citizen. Eventually, it will be possible to replace your init.vim with an init.lua. Making an init script in Fennel sounds like a great way to bring Emacs ideas to Vim, like how Emacs' evil-mode brought Vim ideas to Emacs.
Recently, Neovim got an official client for the Language Server Protocol merged into master. All the example configurations[0] are written in Lua.
I just wanted best of all worlds: My favourite editor with my favourite syntax without sacrificing any performance. If anything, my dotfiles should be faster now since there's less VimL which is damn slow to execute. I haven't benchmarked it though.
The Clojure world in Vim is getting better and better too thanks to various projects. My attempt at that is https://github.com/Olical/conjure
We also have really good s-expression editing plugins! Come on in, the water is full of parens :D
Maybe I don't get out enough.
The Neovim team found that Lua seems to do both pretty well and has a fast implementation (LuaJIT), so they're trying to get Lua to be Neovim's primary extension language. Python and Javascript also seem to be popular languages for Neovim extensions.
It's a plugin. It is not shipped with Neovim.
> I just want vim to start quickly, not crash, and generally get out of my way
That's a very low bar, which indicates you definitely aren't Neovim's target audience. If you're happy with Vim, carry on.