chore: Add rustfmt.toml with some unstable format options#477
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 fmtcurrently gives a warning, but still returns exit code 0 (so can be ignored)Use
cargo fmtto run the formatting.See #136