docs/neovim: add plugin license notes

Explain how to set the license for a plugin that doesn't get detected.
This commit is contained in:
Austin Horstman
2026-04-27 08:14:37 -05:00
parent 878856da7d
commit 72a716a79c
2 changed files with 22 additions and 0 deletions

View File

@@ -115,6 +115,25 @@ 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`.
### Plugin license overrides {#neovim-plugin-license-overrides}
Generated Vim and Neovim plugins get their `meta.license` from GitHub license metadata when possible.
Some upstream repositories do not expose a license file that GitHub can detect, or only mention the license in a README.
In those cases, add a manual `meta.license` override in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix).
For example, if upstream documents that a plugin uses the Vim license but GitHub does not detect it:
```nix
{
foo-nvim = super.foo-nvim.overrideAttrs (old: {
meta = old.meta // {
# README says this plugin is distributed under the Vim license.
license = lib.licenses.vim;
};
});
}
```
## LuaRocks based plugins {#neovim-luarocks-based-plugins}
In order to automatically handle plugin dependencies, several Neovim plugins

View File

@@ -4483,6 +4483,9 @@
"index.html#neovim-plugin-required-snippet",
"index.html#vim-plugin-required-snippet"
],
"neovim-plugin-license-overrides": [
"index.html#neovim-plugin-license-overrides"
],
"updating-plugins-in-nixpkgs": [
"index.html#updating-plugins-in-nixpkgs"
],