feat(neovim): use treesitter for folding

main
mandlm 2022-08-22 07:56:56 +02:00
parent 9e422fd019
commit 17c0ff1986
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,11 @@ vim.opt.inccommand = "split"
-- completion -- completion
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = "menu,menuone,noselect"
-- folding
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.opt.foldlevelstart = 99
-- set cursorline in active window -- set cursorline in active window
vim.cmd([[ vim.cmd([[
augroup CursorLine augroup CursorLine
@ -51,4 +56,3 @@ vim.cmd([[
autocmd TermOpen * setlocal nonumber norelativenumber autocmd TermOpen * setlocal nonumber norelativenumber
augroup END augroup END
]]) ]])