Should user-set options like shiftwidth & tabstop be overriden by built-in "recommended styles"?

I’m thinking of submitting a bug report since I really don’t think this should be the case, but I want some thoughts first.

I just spent a while wondering why setting shiftwidth or tabstop didn’t apply to markdown files … and its because of markdown_recommended_style being set to 1 by default, which overrides those values to 4: neovim/runtime/ftplugin/markdown.vim at d25889ab7607918a152bab5ce4d14e54575ec11b · neovim/neovim · GitHub.

If a user wants different values specifically for markdown then they can easily set it on their own, more easily than finding out the hard the way that its being overridden. I kept looking it up and found out in a reddit comment.

helpgrep markdown_recommended_style :


MARKDOWN                                                *ft-markdown-plugin*

To enable folding use this: >
	let g:markdown_folding = 1

'expandtab' will be set by default.  If you do not want that use this: >
	let g:markdown_recommended_style = 0

I believe the idea of having the default (bundled) filetype plugins override those kind of settings is inherited from Vim. See e.g. Vim: filetype.txt (which however seems to only set ‘expandtab’). I would agree that it is not the best user experience. I guess the original intent was to ship some “sane defaults” for e.g. Makefiles which always use tabs, so that users don’t have to repeat too many filetype setting mantras in their configs, etc. You may start a report about this, but I suspect there will be some who will invoke the Vim behaviours to justify keeping things as they are. There is a tradeoff here between simplicity (homogeneity) and convenience.

If the format only supports tabs or spaces then sure but if it’s just a suggestion I think the user’s settings should be respected. Most languages support both and in those cases many users prefer to use their preference.