Plug and play Neovim plugin boilerplate with pre-configured CI, CD, linter, docs and tests.
- interactive
setupscript - README.md template
- Perfect for open-source:
- CODEOWNERS file for PR auto-assign
- Issues and PR templates
- CD leveraging release-please-action
- CI:
- Test running on multiple Neovim version
- Lint check
- Documentation generation check
- Minimal run time, ideal for free plans
- Docs with mini.nvim
docplugin - Tests with mini.nvim
testplugin - Linting with Stylua
Note: This section is only required if you wish to use the linter provided by the template.
The following checklist is all your need to do to start writing your first plugin.
git clone https://github.com/shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvimgit clone [email protected]:shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvimgh repo my-awesome-plugin -p shortcuts/neovim-plugin-boilerplate --publicThe setup script will rename files and placeholder names for you. Once done, you can remove anything setup related if you want to.
# interactive
make setup
# automated
USERNAME=my-github-username PLUGIN_NAME=my-awesome-plugin REPOSITORY_NAME=my-awesome-plugin.nvim make setupNote: The placeholder names are purposely written with different casing. Make sure to keep it.
rm -rf doc
mv plugin/your-plugin-name.lua plugin/my-awesome-plugin.lua
mv lua/your-plugin-name lua/my-awesome-plugin
mv README_TEMPLATE.md README.md
:vimgrep /YourPluginName/ **/*
:cfdo %s/YourPluginName/MyAwesomePlugin/g | update
:vimgrep /your-plugin-name/ **/* .github/**
:cfdo %s/your-plugin-name/my-awesome-plugin/g | update
:vimgrep /YOUR_GITHUB_USERNAME/ .github/** **/*.md
:cfdo %s/YOUR_GITHUB_USERNAME/shortcuts/g | update
:vimgrep /YOUR_REPOSITORY_NAME/ **/*.md
:cfdo %s/YOUR_REPOSITORY_NAME/my-awesome-plugin.nvim/g | updateYou can now start writing your plugin, make sure the following commands work:
make depsto install docs/tests dependenciesmake lintto format the codemake documentationto generate the documentationmake testto run the tests
Enjoy!
PRs and issues are always welcome. Make sure to provide as much context as possible when opening one.