From 347218d2db00ec7dc5705db215b4bd346dea12d6 Mon Sep 17 00:00:00 2001 From: kiyan Date: Sat, 9 Apr 2022 16:19:38 +0200 Subject: [PATCH] doc: add simple contributing.md file --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ed70c224 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to `nvim-tree.lua` + +Thank you for contributing. + +## Styling and formatting + +Code is formatted using luacheck, and linted using stylua. +You can install these with: + +```bash +luarocks install luacheck +cargo install stylua +``` + +## Adding new actions + +To add a new action, add a file in `actions/name-of-the-action.lua`. You should export a `setup` function if some configuration is needed. + +## Documentation + +When adding new options, you should declare the defaults in the main `nvim-tree.lua` file. +Once you did, you should run the `update-default-opts.sh` script which will update the default documentation in the README and the help file. + +Documentation for options should also be added, see how this is done after `nvim-tree.disable_netrw` in the `nvim-tree-lua.txt` file.