Closed mthbrown closed 3 years ago
Perhaps you are using nvim-treesitter, which provides highlighting through a completely different mechanism than the syntax?
If so you probably want something like
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
Hi @dimbleby. Thank you for the suggestion but I'm using normal Vim, not Neovim. So I'm not using nvim-treesitter
Then, with apologies, I got nothing.
My usual approach in such cases is to:
which is all very well, but not solving your problem.
Will leave this open for a few days because that's only polite: but as things stand I'm afraid I don't expect to do anything with this and will close it out after a respectable time has passed.
No worries. I tried it with a minimal ~/.vimrc
:
set nocompatible " be iMproved, required
" === PLUGINS ===
call plug#begin('~/.vim/plugged')
" Terraform + HCL
let g:terraform_align=1
let g:terraform_fmt_on_save=1
let g:terraform_fold_sections=1
Plug 'hashivim/vim-terraform'
" Initialize plugin system
call plug#end()
but it still didn't work. I'll to figure it out. Thanks.
It seems to work correctly on my other machines. I'll try to determine what the issue with this specific one is and report back
I ended up just wiping out my entire Vim config + plugins and then rebuilding it from scratch from my dotfiles and now it works. Thanks
Hi,
For some reason, I'm not able to get folding to work. My config looks like this:
but I don't get any folding and whenever I try to run any fold command, I get the error:
When I check on foldmethod, I find that it is set to syntax. Any ideas? Thanks.