caio.co/de/dotfiles


go: fold with treesitter, disabled by default by Caio 4 years ago (log)

Blob config/nvim/ftplugin/go.vim

1
2
3
4
5
6
setlocal noexpandtab shiftwidth=4 softtabstop=4 tabstop=4 nolist

" if has_treesitter
setlocal nofoldenable
setlocal foldmethod=expr
setlocal foldexpr=nvim_treesitter#foldmethod()