APKBUILD examples:Neovim: Difference between revisions
m (→[Draft] Neovim plugin packaging policy: Use issue template.) |
WhyNotHugo (talk | contribs) (Align subtitle hierarchy) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
=== Site === | === Site === | ||
Plugins must be installed in | Plugins must be installed in <code>"$pkgdir"/usr/share/nvim/site/pack/dist/opt/$pkgname/</code>. This allows users to lazy load apk managed neovim packages using: <code>:packadd $pkgname</code>, or <code>vim.cmd.packadd('$pkgname')</code>. | ||
=== Doc === | === Doc === | ||
If upstream doesn't contain generated [https://neovim.io/doc/user/helphelp.html#%3Ahelptags helptags], do so in | If upstream doesn't contain generated [https://neovim.io/doc/user/helphelp.html#%3Ahelptags helptags], do so in <code>build</code>: | ||
build() { | build() { | ||
nvim -u NONE -i NONE -e --headless -c "helptags doc" -c quit | nvim -u NONE -i NONE -e --headless -c "helptags doc" -c quit | ||
} | } | ||
Use <code>amove</code> to package neovim help files and tags in the <code>-doc</code> subpackage: | |||
doc() { | doc() { | ||
default_doc | default_doc | ||
Line 33: | Line 33: | ||
=== Tests === | === Tests === | ||
Skipping | Skipping <code>check</code> is fine if testing a plugin requires vusted (which is not yet packaged): | ||
options="!check" # requires vusted | options="!check" # requires vusted | ||
== Example == | |||
See [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/nvim-lspconfig/APKBUILD?ref_type=heads community/nvim-lspconfig] for a complete example. | See [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/nvim-lspconfig/APKBUILD?ref_type=heads community/nvim-lspconfig] for a complete example. | ||
== See also == | |||
* [[APKBUILD examples]] | |||
[[Category:Development]] |
Latest revision as of 18:56, 19 July 2025
[Draft] Neovim plugin packaging policy
See #16021.
Name
- Must be prefixed with nvim-
- Only have a single nvim- prefix:
- Use nvim-treesitter, instead of nvim-nvim-treesitter
- Omit .nvim suffix:
- Use nvim-telescope, instead of nvim-telescope.nvim
Version
If there are no tags, upstream should be requested to release.
Site
Plugins must be installed in "$pkgdir"/usr/share/nvim/site/pack/dist/opt/$pkgname/
. This allows users to lazy load apk managed neovim packages using: :packadd $pkgname
, or vim.cmd.packadd('$pkgname')
.
Doc
If upstream doesn't contain generated helptags, do so in build
:
build() { nvim -u NONE -i NONE -e --headless -c "helptags doc" -c quit }
Use amove
to package neovim help files and tags in the -doc
subpackage:
doc() { default_doc amove usr/share/nvim/site/pack/dist/opt/$pkgname/doc }
Tests
Skipping check
is fine if testing a plugin requires vusted (which is not yet packaged):
options="!check" # requires vusted
Example
See community/nvim-lspconfig for a complete example.