Packaging policy for neovim plugins
I'd like to define a packaging policy for neovim plugins. I'm open to discuss/change something:
- Package name: Prefix
nvim-
- Only have one
nvim-
prefix if upstream also has one (nvim-treesitter
, notnvim-nvim-treesitter
) - Trailing
.nvim
should be omitted in package name (nvim-telescope
, notnvim-telescope.nvim
)
- Only have one
- Package version:
- Upstream should be requested to release if there aren't any tags yet
- Site:
- Install plugins (
autoload
,doc
,lua
...) in:"$pkgdir"/usr/share/nvim/site/pack/dist/opt/$pkgname/
($plgdir
)
- Install plugins (
- Doc:
-
amove
neovim help files ($plgdir/doc
) indoc
-
- Tests:
options="!check"
- For now, many plugins require vusted to test. Skipping check is fine until vusted is packaged.
Once this is final, I'll add an example APKBUILD in wiki (See Draft).
To use a neovim plugin:
- Install it
doas apk add nvim-lspconfig
-
:packadd $pkgname
, andrequire("$plgname")
it in your neovim configuration.
$plgname
(lspconfig) can be different than $pkgname
(nvim-lspconfig), since a package (both neovim and alpine) may contain more than one plugin.
No neovim packages are :packadd
ed by default, hence users must :packadd
all necessary neovim packages. This allows installing a union of neovim packages via alpine that are required by all users, while still allowing individuals to select what subset they need. Users can employ lazy loading for all alpine distributed plugins this way.
Edit 1: Follow jirutka's suggestions. Edit 2: Add link to [Draft] wiki page.
Edited by Dhruvin Gandhi