As reported in eclipse/corrosion#252 the RLS fails to format the code with:
~
[t=1562070660321] LSP4E to org.eclipse.corrosion.rls:
{"jsonrpc":"2.0","id":"11","method":"textDocument/formatting","params":{"textDocument":{"uri":"file:///home/jreimann/Development/workspace-esp32-rust/rust-esp32-hono/src/main.rs"},"options":{"tabSize":4,"insertSpaces":false}}}
[t=1562070660322] org.eclipse.corrosion.rls to LSP4E:
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Reformat failed to complete successfully"},"id":"11"}
~
Hey, thanks for the report! Looking at the original issue, you said you happened to reproduce it using https://github.com/itadinanta/gfx-gtk. Did cargo check compile the project successfully in that case?
cargo check fails as the target is unknown to the locally installed toolchain. However that shouldn't prevent it from formatting the code IMHO.
I think #1533 may help with this case too, can you retest with the latest code?
Hi @alexheretic, #1533 fixed it for me, many thanks!
@ctron, worth another shot?
Sure, what do I need to update?
A simple rustup update did it for me a few days ago. I am on nightly though.
I believe #1533 won't be on stable until the next release, I've been using beta channel rls recently because of that.
Ok, I did a rustup update as few days back. But I am on stable, and still have the same issue.
@ctron as @alexheretic said, it probably hasn't made it through to stable yet.
On stable now :)