upvote
I love vim9script and write most of my plugins in it now unless I want something to work in the other vim as well, of course. Really happy to see it evolving and I'm particularly happy that tuple support has landed!
reply
I'm not the target for your question (I distribute 0 plugins).

But Lua support in Neovim is the primary reason I moved over from Emacs. Elisp and Vim are both so heart sink for me.

That said I'd have preferred something other than Lua if I had the choice.

reply
> That said I'd have preferred something other than Lua if I had the choice.

Same. I know we as a community would never agree on what that language should be, but in my dreams it would have been ruby. Even javascript would have been better for me than Lua.

reply
Lua, especially with LuaJIT, is nearly as fast as C. I certainly don't want to have to run a slow language like Ruby or especially a full blown JS runtime like V8 just to run Vim, the entire point is speed and keyboard ergonomics, otherwise just use VSCode.
reply
V8 is faster than LuaJIT. But sure, it has a large binary size.
reply
Quite a fair point! For intensive plugins and such, this would matter quite a bit.
reply
Babashka! Super fast clojure/lisp.
reply
there's always fennel for a lispy layer over lua
reply
Isn't LuaJIT kind of a dead end?

Also Ruby has been getting quite fast since YJIT (and now ZJIT):

https://railsatscale.com/2023-08-29-ruby-outperforms-c/

reply
> Even javascript would have been better for me than Lua.

Why?

reply
Because I know javascript a lot more than I know Lua (and I suspect given js popularity, a lot of people are in the same boat). Yes Lua is easy to learn, but it's still different enough that there is friction. The differences also aren't just syntactically, it's also libraries/APIs, and more. I also don't have any need/use for Lua beyond neovim, so it's basically having to learn a language specifically for one tool. It's not ideal for me.

But the people who did the work wanted Lua, and I have no problem with that. That's their privilege as the people doing the work. I'm still free to fork it and make ruby or js or whatever (Elixir would be awesome!) first-class.

reply
I agree but also wonder if editor plugins fall squarely in the range of things an LLM could vibe-code for me?

There is a large class of problems now for which I consider the chosen programming language to be irrelevant. I don't vibe code my driver code/systems programming stuff, but my helper scripts, gdb extensions, etc are mostly written or maintained by an LLM now.

reply
I'm right there with you, and to be honest Lua just works. I helped with Neovim when it started ~10 years ago, and didn't understand the big deal about implementing lua.. But now that it's here, I can't believe it wasn't forked and implemented sooner
reply
IME, Claude is quite good at generating Lua code for neovim. It takes some back and forth because there's no easy way for it to directly test what it's writing, but it works.
reply
i’ve written probably north of a million lines of production js, maybe around 100,000 lines of production ruby, and about 300 lines of production lua. lua is a fun language and i think a much better fit than JS for technical reasons (who has a js engine that is both fast and embeds well? nobody), but i am certainly more productive in those other languages where i have more experience.

lua array index starting at 1 gets me at least once whenever i sit down to write a library for my nvim or wezterm.

reply
> who has a js engine that is both fast and embeds well? nobody

Fabrice Bellard! https://github.com/bellard/mquickjs

(I agree with you, just wanted to note this super neat project)

reply
quickjs/mquickjs are good at embedding but nowhere close to luajit in terms of speed. (i have some experience with quickjs https://github.com/justjake/quickjs-emscripten)

as an aside i’m curious how quickjs/mquickjs compares to mruby in speed and size. something to ponder

reply
Doesn't Vim support extensions written in several languages? Or was that removed in Vim 9?
reply
It still does, but those only work with a Vim built that has those interfaces compiled in.
reply
I wish they supported Janet
reply
Can you run Fennel in Neovim? It's a Lisp running on Lua. https://fennel-lang.org/
reply