-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
rust-analyzer.rustfmt.overrideCommand value format isn't documented #13172
Comments
can you check the logs for errors? For rustfmt that command really only needs to point to a binary, though the rustc devguide passes an edition as well, you might need to do that too.
|
Well, now I tried again and it just worked (regardless of whether the edition was passed or not). Can I leave this open as a documentation improvement request? |
Hm no, it's back to not functioning. No logs to be found other than some initialization logs in the Rust Analyzer Client section. |
Do you have the |
No, I haven't set |
Iirc there is still a bug where very weird whitespace can make rustfmt spit out a warning, exiting successfully without formatting anything. This might be what you are running into, at least I hope that's it 😬. |
Seems to work more reliable now I've enabled it again. So only the documentation is left. Edit: So it was the edition that sometimes causes rustfmt to fail. I tried it manually, it's |
Just landed here. Yeah, the documentation isn't very informative, I assume since this is only intended to work with rustfmt also. In short
If this were in the docs it would be awesome. |
FWIW all error messages refer to |
The current documentation on this setting is not very clear:
From #10826 I gathered that I should be able to set it to an array containing an absolute path to a rustfmt executable, but this just caused rust-analyzer to not format files at all anymore (I set it to my nightly toolchain's rustfmt binary).
Could it be documented how this option is meant to be used? Alternatively, it would be great if I could just tell rust-analyzer to use rustfmt from a different toolchain than what's used for everything else.
The text was updated successfully, but these errors were encountered: