-
Notifications
You must be signed in to change notification settings - Fork 31
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
Missing integration of rustfmt #252
Comments
|
On 2nd thoughts, I think "format on save" could be a feature in LSP4E, but that would first require the LS "Format" operation to work. |
At least for me, manually triggering the code formatting doesn't work. |
Ok.
Would you be able to check the version/build date of RLS you're using?
|
|
At the moment Extrapolating from @mickaelistria's past comments this seems to be caused by a deeper threading flaw in TM4E. Having a more robust way of achieving this by |
Can you please share such a non-formatted large file that seems to always reproduce the issue for you? |
For me that issue is always the case. Independent of the size of the file. |
It's not project dependent. Every Cargo project I import from GitHub would do. However, here's a link to a random one in which I have just reproduced on (you probably want to fork the repo, clone it and import). https://github.com/itadinanta/gfx-gtk/blob/master/src/lib.rs Funny thing, while I was trying this I actually managed to reproduce @ctor's issue where
I wonder, are most of Corrosion's users building "Hello World" projects, or perhaps my projects are cursed? ;) @ctor, can you dig out the RLS logs from corrosion and see if something like the one above pops up when you do |
To be honest, I have the impression you're currently "most of Corrosion's users". Maybe other users face the issue and don't care reporting... |
Ok, checking the logs shows:
|
@ctor, if you think this the error response is incorrect, could you please file a bug to https://github.com/rust-lang/rls/issues? There is a suspiciously similar one that I've filed months ago: rust-lang/rls#1397 We can probably wait to close this at least until after the RLS crew gives this one some eyeballs. EDIT: uhm, different issue from the one reported, perhaps I should refrain from hijacking 😛 |
Also: @ctor does the situation improve after a |
Still I see one enhancement/fix here. If the RLS reports and error like that, that should pop up in the Eclipse error log. |
Just checked this with Rust 1.38 and Eclipse 2019-09 and it works. |
From my point of view, this can be closed. |
To me it looks like currently there is no way to automatically or semi-automatically do source code formatting with
rustfmt
.rustfmt
as a "Save action"Ctrl+Shift+F
(like for Java) and get the code formattedThe text was updated successfully, but these errors were encountered: