-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rust-mode: default to conventional indentation variable tab-width
value
#6222
Comments
@mcandre the rust-mode has been rewritten, and should respect this. Closing (pipe up if you disagree) |
The current |
Can't we use 4 spaces by default, since that is the Rust coding convention? The current situation forces everybody to override the tab width. |
part of #8793 |
Yeah, this seems wrong. Emacs has separate |
At this point, the emacs mode was revised (after I reopened this ticket, and maybe even after I wrote pnkfelix/rust@b6848f5 ); see SHA: 3596f66 which adds the customizable varaible So I will just close this, I think customizing |
Alright, the customizability is there. Should I open another issue for changing the default to 4, like I expect most programmers will want? (Or is that more controversial than I expect?) |
@andersk: I won't object. |
Is there a way to set rust-mode to always use tabs instead of spaces? |
@adrianbrink You can customize |
To configure indentation width in rust-mode, the Emacs user modifies
rust-indent-unit
, as in(setq rust-indent-unit 4)
. This works, but it's nicer, more idiomatic, and more compatible with other Emacs modes to base the rust-indent-unit variable off oftab-width
, and use a rust-mode-hook to customizetab-width
rather than setrust-indent-unit
globally.The text was updated successfully, but these errors were encountered: