Skip to content

Don't override the users indentation and textwidth #19095

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

Merged
merged 1 commit into from Nov 21, 2014
Merged

Don't override the users indentation and textwidth #19095

merged 1 commit into from Nov 21, 2014

Conversation

ghost
Copy link

@ghost ghost commented Nov 19, 2014

Vim plugins shouldn't override user settings unless they ask!

Stops the plugin from modifying the users settings by default
instead makes them opt-in with g:rust_recommended_style

@reem
Copy link
Contributor

reem commented Nov 19, 2014

I actually expect a language file to override the indentation etc. of files in that language. I'm in favor of adding a switch, but I think the default should be flipped in this PR.

@ghost
Copy link
Author

ghost commented Nov 19, 2014

Personally, I find it confusing when a plugin overrides my settings. If I set textwidth=80 in my .vimrc, I don't expect that to get changed as soon as I open a rust file. I only expect the plugin to overide my settings if it's required by the file's syntax, such as using tabs in makefiles.

There doesn't seem to be a convention that vim syntax files follow here, but I'd say it makes sense to go by the princple of least suprise. What do other vim users think?

@soltanmm
Copy link

I personally like my plug-ins telling me what the 'standard' way of formatting is, and then letting me decide after I've become aware of that information whether I'm okay with it or not. I'd rather the technology I use having opinions (esp. 'standard' opinions) that I can take into account than allowing me to blindly charge in.

@ghost
Copy link
Author

ghost commented Nov 19, 2014

Updated setting to be enabled by default.

@bstrie
Copy link
Contributor

bstrie commented Nov 20, 2014

Agreed that having a switch here is good.

bors added a commit that referenced this pull request Nov 21, 2014
Vim plugins shouldn't override user settings unless they ask!

Stops the plugin from modifying the users settings by default
instead makes them opt-in with `g:rust_recommended_style`
@bors bors closed this Nov 21, 2014
@bors bors merged commit 62a2a1d into rust-lang:master Nov 21, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Feb 10, 2025
…st_params

minor: Add a FIXME for feature(adt_const_params)
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

Successfully merging this pull request may close these issues.

4 participants