Skip to content

Don't overwrite user config #517

@Rasmus-Bertell

Description

@Rasmus-Bertell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions