rip treesitter, more predictable fold behaviour
- Id
- 2a6c847768f1734880b806d3ddafa9329a6ed4c7
- Author
- Caio
- Commit time
- 2025-04-08T18:48:35+01:00
Modified config/nvim/ftplugin/go.vim
setlocal noexpandtab shiftwidth=4 softtabstop=4 tabstop=4 nolist
-
-" if has_treesitter
-setlocal nofoldenable
-setlocal foldmethod=expr
-setlocal foldexpr=nvim_treesitter#foldmethod()
Modified config/nvim/lua/config/lsp.lua
end
if client:supports_method('textDocument/foldingRange') then
+ vim.o.foldlevel = 99
vim.o.foldmethod = "expr"
vim.o.foldexpr = "v:lua.vim.lsp.foldexpr()"
end
Deleted config/nvim/ftplugin/rust.vim
-" fold via treesitter but start with everthing expanded
-setlocal nofoldenable
-setlocal foldmethod=expr
-setlocal foldexpr=nvim_treesitter#foldexpr()