From f8f905243d1a24e28ef0ed4cf587056162474b35 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 22 Jan 2023 15:40:46 -0500 Subject: [PATCH] nvim: fold code with tree-sitter --- src/.config/nvim/init.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index 57f9543..ba3588e 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -138,3 +138,8 @@ require'nvim-treesitter.configs'.setup { }, } EOF + +" Code folding +set foldmethod=expr +set foldexpr=nvim_treesitter#foldexpr() +autocmd BufEnter * normal zR