Skip to content

Commit

Permalink
doc/neovim: explain what buildNeovimPlugin does
Browse files Browse the repository at this point in the history
  • Loading branch information
teto committed Jan 17, 2025
1 parent ae8e5f1 commit 33178f9
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/languages-frameworks/neovim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,22 @@ patch those plugins but expose the necessary configuration under
`PLUGIN.passthru.initLua` for neovim plugins. For instance, the `unicode-vim` plugin
needs the path towards a unicode database so we expose the following snippet `vim.g.Unicode_data_directory="${self.unicode-vim}/autoload/unicode"` under `vimPlugins.unicode-vim.passthru.initLua`.

### {#neovim-luarocks-based-plugins}
#### {#neovim-luarocks-based-plugins}

In order to automatically handle plugin dependencies, several neovim plugins
upload their package to [](www.luarocks.org). This means less work for nixpkgs maintainers in the long term as dependencies get updated automatically.
This means several neovim plugins are first packaged as nixpkgs [lua
packages](#packaging-a-library-on-luarocks), and converted via `buildNeovimPlugin` in
a vim plugin. This conversion is necessary because neovim expects lua folders to be
top-level while luarocks installs them in varous subfolders by default.

For instance:
```nix
rtp-nvim = neovimUtils.buildNeovimPlugin {
luaAttr = luaPackages.rtp-nvim;
};
```
To update these packages, you should use the lua updater rather than vim's.

#### Treesitter {#neovim-plugin-treesitter}

Expand Down

0 comments on commit 33178f9

Please sign in to comment.