Skip to content

tim-kuntz/plugin-template.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin-template.nvim

Template for Neovim plugins covering the following aspects:

  • Plugin directory structure
  • Plugin testing
  • Plugin documentation
  • CI/CD pipeline
  • Generating documentation from README.md

Installation

Using lazy.nvim:

return {
  'tim-kuntz/plugin-template.nvim',
}

Plugin Development

Using lazy.nvim:

  • Clone the repository to ~/projects/plugin-template.nvim
  • Add the following to your lazy.nvim configuration:
return {
  'tim-kuntz/plugin-template.nvim',
  dev = true,
  enabled = true, -- false to disable plugin
}

Note that dev = true will look for the plugin in ~/projects/plugin-template.nvim. Setting dev to false will use install the plugin from Github.

Testing

The specs use plenary.nvim tests.

To run the spec in the current buffer:

:PlenaryBustedFile %

To run all of the specs:

:PlenaryBustedDirectory tests

Note: The tests run in a remote nvim instance and display output in a new window in terminal mode. You may need to C-\ C-n to switch back to NORMAL mode and close the window.

Optionally, you can run the tests from the command line. Here is an ex command that opens a new terminal in a split window and runs all the tests:

:split term://nvim --headless -c 'PlenaryBustedDirectory tests'

About

Template for Neovim plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages