docs: document setting foldmethod alongside foldexpr (#8187)

This commit is contained in:
Gabriel Holodak
2025-12-02 20:15:52 -05:00
committed by GitHub
parent e527584cf8
commit c5623d3486
2 changed files with 2 additions and 0 deletions

View File

@@ -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

View File

@@ -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,