Skip to content

Commit ada718b

Browse files
committed
docs(#2934): CONTRIBUTING.md updates for help generation and lint
1 parent 56f486a commit ada718b

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,32 @@ else
121121
end
122122
```
123123

124-
# Adding New Actions
124+
# Documentation
125125

126-
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.
126+
## Config And Mappings
127127

128-
Once you did, you should run `make help-update`
128+
When adding to or changing:
129+
1. `DEFAULT_OPTS`
130+
2. `Config` classes
131+
3. `on_attach` default mappings
129132

130-
# Documentation
133+
You must generate help documentation. This requires neovim stable sources. You will be promted with instructions on fetching and referencing the source.
131134

132-
## Opts
135+
```sh
136+
make help-update
137+
```
133138

134-
When adding new options, you should declare the defaults in the main `nvim-tree.lua` file.
139+
This will:
140+
1. Update config defaults in `*nvim-tree-setup*`
141+
2. Regenerate from `*nvim-tree-config*` to the end of the file, see `gen_vimdoc.sh`
142+
3. Update default mappings in `*nvim-tree-mappings-default*` and `*nvim-tree-quickstart-help*`
143+
144+
Commit your changes then run:
145+
```sh
146+
make help-check
147+
```
135148

136-
Documentation for options should also be added to `nvim-tree-opts` in `doc/nvim-tree-lua.txt`
149+
This will re-run `help-update` and check that there are no diffs. It will also lint the documentation, see `lintdoc.sh`
137150

138151
## API
139152

0 commit comments

Comments
 (0)