This is a NCM2-based neovim completions plugin for writing ebuilds.
Click the image below to see the demo on asciinema:
- Supports all basic completions:
- Phase functions (
pkg_setup
,src_install
, etc) - Variables (
SRC_URI
,PV
, etc) - Functions (
dodir
,insinto
)
- Phase functions (
- Dynamically loads and unloads completions based on inherited eclasses
- Completes eclass-specific functions
- Completes eclass-specific variables
Using vim-plug:
Plug 'ncm2/ncm2'
Plug 'VTimofeenko/ncm2-ebuild', { 'for': ['ebuild'] }
This plugin does not have specific configuration options. See ncm2 repository for ncm2 configuration options.
- Loading/unloading of inherited eclasses is done through a hook on InsertLeave. If you are used to
ctrl-c
to exit Insert mode, consider using a different hook (see line withautocmd InsertLeave
inautoload/ncm2_ebuild.vim
file) - The completions are autogenerated by the
build_completion
python module. It parses the devmanual and eclasses manuals and generates the completions using jinja. The devmanual/manpages parser is indevmanual_parse
submodule