-
Notifications
You must be signed in to change notification settings - Fork 62
editor.formatOnSave does not actually format on save with RLS #253
Comments
How exactly did you install the RLS? Could you please mention all the steps, to help further. |
Did you create |
Even if the format works, it does not take rustfmt.toml into account in project root. |
Apologies for the delay. I no longer have access to my rust vscode setup, so I cannot test whether the issue still persists. @ kggp1995
I installed rustup via vscode - I got a prompt "You are not running RLS, but it's really good! Try it!", and answered "yes". (I don't remember the exact wording).
No, I didnt. Regardless, I expect that either Again, I apologize, I cannot check whether the advice in this thread solves the problem. Feel free to close the issue. |
Hi @moxian , thanks for sharing. Here's the quick fix(temporary) that might work in your favor: settings.json:
Hope this helps. Let us know. |
@kggp1995 |
@moxian Yeah, RLS is not very stable yet and formatting often corrupted my code so I switched back to Racer + Rustfmt ("legacy") mode. It's kinda unfortunate that this extension already suggests RLS by default without mentioning drawbacks, but then I guess otherwise no one would try RLS and it wouldn't improve. |
I believe the new version will remove the problem. I'm about to publish it: #279. |
Version of VSCode: 1.12.2
Version of the extension: 0.3.14
OS: Win7 64 bit
rls: 0.1.0 (38ca9b7 2017-05-14)
Description:
When using RLS, when I save the file, it does not get autoformatted with rustfmt, despite having "editor.formatOnSave": true in settings.json. Seemingly no attempt is even made to format.
Setting "rust.forceLegacyMode": true (and thus disabling RLS) makes autoformat-on-save work again.
Output of the "Rust logging" channel: Nothing of interest. Saving unformatted file appends no line to it. Trying to save when RLS says "Analysis finished" is the same as when it's still in progress (i.e. no formatting occurs).
The text was updated successfully, but these errors were encountered: