diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index 91b59e3f0cab..6f1c855df1d9 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -149,6 +149,11 @@ Note: this is not possible anymore for Neovim. ## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs} +:::{.note} +Before adding a Neovim Lua plugin, check if a release is available on [luarocks](https://luarocks.org/). +If it is, add it as a [LuaRocks based plugin](#neovim-luarocks-based-plugins). +::: + Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`nix-shell -p vimPluginsUpdater --run vim-plugins-updater`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/utils/updater.nix). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). When the vim updater detects an nvim-treesitter update, it also runs [`nvim-treesitter/update.py $(nix-build -A vimPlugins.nvim-treesitter)`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/utils/update.py) to update the tree sitter grammars for `nvim-treesitter`.