Fold: update docs

Document foldnestmax.
This commit is contained in:
Santos Gallegos 2020-09-07 11:41:37 -05:00 committed by Thomas Vigouroux
parent 8d6c40ce24
commit 7b972d581c
2 changed files with 7 additions and 2 deletions

View file

@ -299,14 +299,16 @@ EOF
# Extra features # Extra features
- Syntax based code folding ## Syntax based code folding
```vim ```vim
set foldmethod=expr set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr() set foldexpr=nvim_treesitter#foldexpr()
``` ```
- Statusline indicator This will respect your `foldnestmax` setting.
## Statusline indicator
```vim ```vim
echo nvim_treesitter#statusline(90) " 90 can be any length echo nvim_treesitter#statusline(90) " 90 can be any length

View file

@ -551,6 +551,9 @@ To use it: >
set foldmethod=expr set foldmethod=expr
set foldexpr=nvim_treesitter#foldexr() set foldexpr=nvim_treesitter#foldexr()
< <
This will respect your 'foldnestmax' setting.
Note: This is highly experimental, and folding can break on some types of Note: This is highly experimental, and folding can break on some types of
edits. If you encounter such breakage, hiting `zx` should fix folding. edits. If you encounter such breakage, hiting `zx` should fix folding.
In any case, feel free to open an issue with the reproducing steps. In any case, feel free to open an issue with the reproducing steps.