-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emacs 29 impossible to pass argument to rustfmt #252
Comments
Does this work: (setq format-all-formatters
'(("Rust" (rustfmt "--edition" "2021")))) We should add Rust to the readme. |
Yes it works when I eval the expression in emacs buffer but that's exacttly what I have in my configuration:
|
That's weird. Can you set |
Hi, I retried with this configuration with the rust-mode hook deactivated and it seems to work now with this configuration. Sorry for that, but I must have made mistake when I was trying several things with the .emacs... |
Ah no... that's because I was trying on souce with no async construction. That's the message I got:
And the error from rustfmt:
And after: (setq format-all-formatters
'(("Rust" (rustfmt "--edition" "2021")))) it works:
|
I have tried several things and it seems impossible to pass arguments to rustmt.
especially the edition. Is it possible to specify --edition 2021. But if I set Rust formatter like that:
or like that:
Or if I try with cargo:
It's still 2015 edition that is used.
As rust-mode provide its own format command I can workaround this qith a hook:
But format-all definitively doesn't work for Rust.
The text was updated successfully, but these errors were encountered: