mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
docs: document setting foldmethod alongside foldexpr (#8187)
This commit is contained in:
@@ -101,6 +101,7 @@ Treesitter-based folding is provided by Neovim. To enable it, put the following
|
||||
|
||||
```lua
|
||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.wo.foldmethod = 'expr'
|
||||
```
|
||||
|
||||
## Indentation
|
||||
|
||||
@@ -45,6 +45,7 @@ Treesitter features for installed languages need to be enabled manually in a
|
||||
vim.treesitter.start()
|
||||
-- folds, provided by Neovim
|
||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.wo.foldmethod = 'expr'
|
||||
-- indentation, provided by nvim-treesitter
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user