Poll about potential neovim wrapper changes

Hi fellow nixers,

I help maintain some of the neovim ecosystem in my spare time.
As I explain in neovim 2026 roadmap · Issue #498672 · NixOS/nixpkgs · GitHub , the neovim team would like to make neovim configuration more accessible (while keeping the abstractions minimal) and hopefully stabilize the neovim wrapper wrapNeovimUnstable in 2026.

There are 2 changes I have trouble evaluating the tradeoff and would like feedback on.

  1. wrapNeovimUnstable accepts both viml and lua configurations. lua configuration will source viml config if any. Right now the arguments are:
# vimL code that should be sourced as part of the generated init.lua file
neovimRcContent ? null,
# lua code to put into the generated init.lua file
luaRcContent ? "",

I believe renaming neovimRcContent → initViml and luaRcContent → initLua would make those arguments clearer for newcomers. Migration is easy but we still nag users. Cons are that those are not really initViml (not sourced by default) and initLua is not the full initLua. The wrapper will typically add generated code. But the user gets the gist.

  1. the wrapper does not support per-plugin lua configuration. I failed to notice as I use the home-manager module which has supported it for a while (and is the best configuration mechanism for me). Plugin configuration is done via a submodule and the question is how to extend it to support lua. There are 2 ways I can think of:
  • simply add a luaConfig option. Straightforward. Now you can have both viml and lua config at the same time (which I am not a fan of)
  • or do it like home-manager ie, add a type option to convey the language (“lua” or “viml” but possibly teal or fennel if user wants) as shown here home-manager/modules/programs/neovim.nix at 4aeef1941f862fe3a70d1b8264b4e289358c2325 · nix-community/home-manager · GitHub . What I like about this is that it allows a migration path to change the default config type to be changed from viml (we have to to avoid breaking changes) to “lua” as I suppose most users now configure neovim via lua (I might be biased here). I also find it cool that it leaves the door open for users to configure neovim with teal and fennel though I have never done it, time is too short :slight_smile:

Hope you can comment on both changes explaining if you think 1/ makes the arguments clearer and easier for newcomers, and as for 2/ which one would you prefer.

cheers

NB: if you wanna help with running tests for neovim plugins, feel free to ping me. I would like for the treesitter related plugins to be more tested especially (see enable more tests in the vim/lua package set · Issue #267072 · NixOS/nixpkgs · GitHub for a list)

6 Likes

I hope that the silence here is in itself a response. Otherwise, I think you should go ahead and do what you think is best.

1 Like