By default, `rustfmt` persists the import granularity. In practice, most Rust code has import granularity "Module" due to LSP's actions. "Item" gets rid of import groupings and achieves cleaner diffs and better conflict resolution. Better greppability is a positive side effect. Note: it's an unstable rustfmt feature. `cargo +nightly fmt` must be used instead of `cargo fmt`.
4 lines
237 B
TOML
4 lines
237 B
TOML
[toolchain]
|
|
# TODO: Pin to a stable version once `imports_granularity` rustfmt option is stable. https://rust-lang.github.io/rustfmt/?version=v1.9.0&search=group#imports_granularity
|
|
channel = "nightly"
|
|
components = ["rustfmt", "clippy"]
|