- Make a pull request
Of course, you need to have Neovim installed.
nvim-lua/plenary.nvim
- for testingechasnovski/mini.doc
- for documentationfolke/neodev.nvim
- (optional)
require("neodev").setup({
override = function(_, library)
library.enabled = true
library.plugins = true
end,
})
To run the tests, you need to have the plenary.nvim plugin installed.
To test the current file, run the following command inside neovim:
:PlenaryBustedFile %
To test all files, run the following from the command line:
nvim --headless -c ':lua require("plenary")' -c 'PlenaryBustedDirectory lua/tests'
We use mini.doc for documentation.
Use ---
for documentation comments and ---@
for annotations.
Some annotations are:
@param {name} {type}
for parameters@return {type}
for return values@usage {example}
for usage examples
Example:
-- Setup the plugin
--
--@param opts table Options to override the default configuration
--
--@usage `require("seshmgr").setup({})` (replace `{}` with your `configuration`)
To generate documentation:
- Run
:lua MiniDoc.generate()
in Neovim - Run
scripts/generate-docs.sh
in the terminal- Needs
mini.doc
installed in~/.local/share/nvim/site/pack/vendor/start
- Needs