rust-lang / rust-mode

Emacs configuration for Rust
Apache License 2.0
1.13k stars 181 forks source link

Extra indentation on line that starts with dot and previous line is close parenthesis. #487

Open daniel-wong-dfinity-org opened 1 year ago

daniel-wong-dfinity-org commented 1 year ago

rustfmt wants indentation like this:

foo(
    // Whatnot
    42,
)
.bar() // Same amount of indentation on this line as the previous line with close parenthesis.

but rust-mode does this:

foo(
    // Whatnot
    42,
)
    .bar()  // Extra indentation.
daniel-wong-dfinity-org commented 1 month ago

This is still killing me.

psibi commented 1 month ago

Can you enable tree sitter mode and see if it fixes for you: https://github.com/rust-lang/rust-mode?tab=readme-ov-file#tree-sitter ?