reddit / emacs

Rust-analyzer auto-formatting the file, how to turn off?

casouri · 2022-04-11 19:24
I'm using eglot with rust-analyzer, and it auto-formats the file I'm editing each time after I save. I looked everywhere and cannot figure out how to turn that feature off. Does anyone using rust-analyzer knows how to do that? I'm fairly certain that eglot is not invoking the auto-formatting, because 1) I've disabled auto-formatting capabilities in eglot-ignored-server-capabilities and 2) the auto-formatting doesn't revert the buffer automatically.
patrick_thomson · 2022-04-11 21:03
Is the `rust-format-on-save` variable (provided by `rust-mode` itself) set to non-nil?
casouri · 2022-04-11 22:52
Thanks, I've checked and it is nil.