You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+46-23Lines changed: 46 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ make lint
60
60
## style
61
61
62
62
1. Runs lua language server `codestyle-check` only, using `.luarc.json` settings
63
-
1. Runs `scripts/doc-comments.sh` to validate annotated documentation
63
+
1. Runs `scripts/doc-comments.sh` to normalise annotated documentation
64
64
65
65
```sh
66
66
make style
@@ -86,11 +86,11 @@ Assumes `$VIMRUNTIME` is `/usr/share/nvim/runtime`. Adjust as necessary e.g.
86
86
VIMRUNTIME="/my/path/to/runtime" make check
87
87
```
88
88
89
-
If `lua-language-server` is not available or `--check` doesn't function (e.g. Arch Linux 3.9.1-1) you can manually install it as per `ci.yml` e.g.
89
+
If `lua-language-server` is not available or `--check` doesn't function (e.g. Arch Linux 3.9.1-1) you can manually install it as per `ci.yml`using its current `luals_version`e.g.
90
90
91
91
```sh
92
92
mkdir luals
93
-
curl -L "https://github.com/LuaLS/lua-language-server/releases/download/3.9.1/lua-language-server-3.9.1-linux-x64.tar.gz"| tar zx --directory luals
93
+
curl -L "https://github.com/LuaLS/lua-language-server/releases/download/3.15.0/lua-language-server-3.15.0-linux-x64.tar.gz"| tar zx --directory luals
94
94
95
95
PATH="luals/bin:${PATH}" make check
96
96
```
@@ -119,39 +119,62 @@ else
119
119
end
120
120
```
121
121
122
-
# Documentation
122
+
# :helpDocumentation
123
123
124
-
## Config And Mappings
124
+
Please update or add to `doc/nvim-tree-lua.txt` as needed.
125
125
126
-
When adding to or changing:
127
-
1. Default config
128
-
2.`Config` classes
129
-
3.`keymap.on_attach_default`
130
-
4. Any API
126
+
## Generated Content
131
127
132
-
You must generate help documentation. This requires neovim stable sources. You will be promted with instructions on fetching and referencing the source.
128
+
`doc/nvim-tree-lua.txt` content starting at `*nvim-tree-config*` will be replaced with generated content. Do not manually edit that content.
129
+
130
+
### API and Config
131
+
132
+
Help is generated for:
133
+
-`nvim_tree.config` classes from `lua/nvim-tree/_meta/config/`
134
+
-`nvim_tree.api` functions from `lua/nvim-tree/_meta/api/`
135
+
136
+
Please add or update documentation when you make changes, see `:help dev-lua-doc` for docstring format.
137
+
138
+
`scripts/gen_vimdoc_config.lua` contains the manifest of help sources.
139
+
140
+
### Config And Mappings
141
+
142
+
Help is updated for:
143
+
- Default keymap at `keymap.on_attach_default`
144
+
- Default config at `--- default-config-start`
145
+
146
+
## Updating And Generating
147
+
148
+
Nvim sources are required. You will be prompted with instructions on fetching and using the sources.
149
+
150
+
See comments at the start of each script for complete details.
133
151
134
152
```sh
135
153
make help-update
136
154
```
137
155
138
-
This will:
139
-
1. Update config defaults in `*nvim-tree-setup*`
140
-
2. Update default mappings in `*nvim-tree-mappings-default*` and `*nvim-tree-quickstart-help*`
141
-
3. Regenerate from `*nvim-tree-config*` to the end of the file, see `gen_vimdoc.sh`
142
-
- Config classes
143
-
- API classes and functions
156
+
-`scripts/help-update.sh`
157
+
- Update config defaults `*nvim-tree-setup*`
158
+
- Update default mappings:
159
+
-`*nvim-tree-mappings-default*`
160
+
-`*nvim-tree-quickstart-help*`
161
+
162
+
-`scripts/gen_vimdoc.sh`
163
+
- Remove content starting at `*nvim-tree-config*`
164
+
- Generate config classes `*nvim-tree-config*`
165
+
- Generate API `*nvim-tree-api*`
166
+
167
+
## Checking And Linting
168
+
169
+
This is run in CI. Commit or stage your changes and run:
144
170
145
-
Commit or stage your changes then run:
146
171
```sh
147
172
make help-check
148
173
```
149
174
150
-
This will re-run `help-update` and check that there are no diffs. It will also lint the documentation, see `lintdoc.sh`
151
-
152
-
## API
153
-
154
-
When adding or changing API please update :help nvim-tree-api
175
+
- Re-runs `make help-update`
176
+
- Checks that `git diff` is empty, to ensure that all content has been generated. This is why a stage or commit is necessary.
177
+
- Lints `doc/nvim-tree-lua.txt` using `scripts/lintdoc.sh` to check for no broken links etc.
0 commit comments