-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Add rustfmt.toml with some unstable format options #477
Conversation
@siegfriedweber had a good point that this might result in back and forth changes between developer machines with different nightly versions. As |
Pinning sounds good to me. It's not like we'd need to bump this more often than we already do for rustc anyway. |
We decided to go with this in a daily last week. If there are any problems we can always revert this change |
VS Code users can use the following setting to override the command run on "Format on save": "rust-analyzer.rustfmt.overrideCommand": [
"rustfmt",
"+nightly-2025-01-15",
"--edition",
"2021",
"--"
], Sadly, setting "rust-analyzer.rustfmt.extraArgs": [
"+nightly-2025-01-15",
"--edition",
"2021"
], I assume, the configuration for other editors will be similar. |
I also found two potentially interesting options to enable (which shouldn't be too controversial): It might be worth to add them in a separate PR. |
Fixup of #136
Back in the day I put it in the wrong folder 🤦♂️ We already have this in secret-op for ~2 years now.
The amount of time I have seen suggestions regarding merging imports and sorting (std, external, crate), I'm very happy that we can solve all of that by automation 🥳
cargo +stable fmt
currently gives a warning, but still returns exit code 0 (so can be ignored)Use
cargo fmt
to run the formatting.See #136