vim-polyglot
vim-polyglot copied to clipboard
Disabling yaml support
I'm having issues with indented comments in YAML files.
Adding let g:polyglot_disabled = ['yaml']
does not seem to make a difference, while disabling the plugin altogether resolves it.
Is there any way to see where this is being triggered?
Are you adding it before loading polyglot?
From the docs:
Individual language packs can be disabled by setting g:polyglot_disabled [...]
Please declare this variable before polyglot is loaded (at the top of .vimrc)
Looks like it sets g:polyglot_is_disabled to 1 for the desired filetype on init. Then at each plugin it checks for the key in g:polyglot_is_disabled. So adding it before loading polyglot should do the trick.
What does :echo g:polyglot_is_disabled
return for you?
I also have problems with vim-polyglot's YAML file indentation, more than just YAML comments, seems everywhere.
I also observe no change with the following before vim-polyglot is loaded:
let g:polyglot_disabled = ['yaml']
I have success with set indentexpr=
after vim-polygot is loaded. Appears vim-polygot doesn't respect g:polyglot_disabled = ['yaml']
when it executes set indentexpr=GetYAMLIndent(v:lnum)
. As for why vim-polyglot's GetYAMLIndent
doesn't work as expected I have no idea. No combination of smartindent
or autoindent
settings appears to improve whatever GetYAMLIndent
does.