emacs.d
emacs.d copied to clipboard
Closing bracket not indented correctly in Rust mode
When I am writing rust code, I found closing bracket not indented correctly.

My emacs version is emacs28.1 I work on macOS
What's your major-mode?
Maybe this is a duplication of https://github.com/redguardtoo/emacs.d/issues/975
Seems no updates from upstream, just wonder if they're using emacs 28 to write any code using c derived mode...
What's your major-mode?
rust-mode
Maybe this is a duplication of #975
Seems no updates from upstream, just wonder if they're using emacs 28 to write any code using c derived mode...
You are right. Now I found the same problem appear in c mode...Maybe I should use older version of emacs?
When I delete all config files, and then
- M-x package-refresh-contents
- M-x package-install rust-mode
- create a .rs file
- enable electric-pair-mode
Closing bracket can indent correctly
I can reproduce the issue after removing my emacs.d and follow your steps,
You could turn off electric-pair-mode
or run some indent command manually or automatically in after-save-hook
.
I run evil-indent
manually to re-format the code.