Nvim Plugin Template
nvim-plugin-template #
Neovim plugin template with CI test and docs publish.
Usage #
- Click
use this template
button to generate your own Neovim plugin repository. - Clone your plugin repository. Open terminal then
cd
into the plugin directory. - Run
python3 rename.py your-plugin-name
, this will replace allnvim-plugin-template
to yourplugin-name
. Then it will prompt you to inputy
orn
to remove example codes ininit.lua
andtest/plugin_spec.lua
. If you are familiar with this repository, just typey
. If you are new to this template, I suggest you look at them first. After these step, therename.py
will also auto remove itself.
Now you have a clean plugin environment. Enjoy!
Format #
Format use stylua
with built-in .stylua.toml
.
Test #
Use vusted for test. Install by using luarocks --lua-version=5.1 install vusted
then run vusted test
for your test cases.
Create test case in test
directory. File rule is foo_spec.lua
with _spec
.
More usage please check busted usage.
CI #
CI support: auto generate documentation from README. Run integration test and lint check by stylua
.
More #
For more usage, you can take a look at my other plugins.
License #
Licensed under the MIT license.