I have vim.opt.textwidth = 80 in my config but opening rust files it is always set to 99. Initially, I was confused, but then found out that the rust ftplugin has some default values it sets. I can always set rust_recommended_style to false but I think it should rather be opt-in than opt-out.
For example PHP has in it's coding style reference that it must use 4 spaces for indentation1, but the ftplugin doesn't impose any such restrictions.
Also, as I said, it's very confusing to users when suddenly their settings are overridden. I had to look into neovims source code to find the culprit.
Consider changing the behavior to opt-in, by having the g:rust_recommended_style default to 0.
I have
vim.opt.textwidth = 80in my config but opening rust files it is always set to 99. Initially, I was confused, but then found out that the rust ftplugin has some default values it sets. I can always setrust_recommended_styleto false but I think it should rather be opt-in than opt-out.For example PHP has in it's coding style reference that it must use 4 spaces for indentation1, but the ftplugin doesn't impose any such restrictions.
Also, as I said, it's very confusing to users when suddenly their settings are overridden. I had to look into neovims source code to find the culprit.
Consider changing the behavior to opt-in, by having the
g:rust_recommended_styledefault to 0.Footnotes
https://www.php-fig.org/psr/psr-12/#24-indenting ↩