vim-polyglot icon indicating copy to clipboard operation
vim-polyglot copied to clipboard

Setting g:polyglot_disabled = ['autoindent'] does not work as expected

Open Sakari369 opened this issue 4 years ago • 3 comments

Does this bug happen when you install plugin without vim-polyglot? I dont know.

Describe the bug: Your documentation says autoindent should not happen if I set

g:polyglot_disabled = ['autoindent']

before loading the polyglot plugin. Still, when I now load files, the indentation tabstop settings are set to 2 for eg on CPP files. Disabling polyglot plugin fixes this back.

To Reproduce:

Read above.

Sakari369 avatar Jun 26 '21 07:06 Sakari369

This has nothing to do with indent detection but rather defaults set by polyglot, correct code disabling this is:

g:polyglot_disabled = ['sensible']

but I will fix this behavior by detecting proper default indent for each language from linguist

sheerun avatar Jun 27 '21 08:06 sheerun

Ok your documentation does not clarify this in a clear way. Maybe should mention that if you want to disable the defaults, then this is what to do. Thanks for the answer. Will test it out.

Sakari369 avatar Jun 27 '21 14:06 Sakari369

Would be nice to have a single option for "I just want ftplugins". I already have DetectIndent, editorconfig, and sensible.vim and they're configured how I want, so I don't want polyglot to handle that functionality too.

Autoindent, Reindent, Default settings are great features for users new to vim, but troublesome to longtime vim users since updating polyglot surprised me with new non-ftplugin features.

If similar new features are added to polyglot, I don't think I want them enabled by default, so g:polyglot_enable_extra_features = 0 would help avoid surprises.

Or at least a line in the readme for how to disable all of them (it's unclear that Reindent is an ftplugin feature and not a polyglot extra one).

idbrii avatar Jan 19 '22 22:01 idbrii