Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't overwrite user config #517

Open
Rasmus-Bertell opened this issue Jul 9, 2024 · 0 comments
Open

Don't overwrite user config #517

Rasmus-Bertell opened this issue Jul 9, 2024 · 0 comments

Comments

@Rasmus-Bertell
Copy link

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.

Footnotes

  1. https://www.php-fig.org/psr/psr-12/#24-indenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant