Visual Studio Code + Rust + kalitaalexey extension -> Message: GotoDef failed to complete successfully


#1

Hey,
i’m on windows 10 x64, i have installed rust from official docs and everything what its needed.
I use Visual Studio Code 1.13.1 + Rust 1.18 + kalitaalexey extension 0.4.2.
Everything works fine except ‘Go to definition’.
For ex. when i press ctrl + left mouse button on ‘println!’ i have in ‘output’:

[Error - 12:16:10] Request textDocument/definition failed.
Message: GotoDef failed to complete successfully
Code: -32601

For first time when i have installed kalitaalexey extension for VS Code i have some options to choose like stable, night, legacy or rls things. Maybe here is problem. How to change those options now ? Reinstall extensions does not help.

Only what i need for rust is when i’m typing for ex. prin… i see menu with options like ‘print’, ‘println’ and info about function from docs. And also when i’m press ctrl + LMB on for ex. ‘println!’ i jump in source code of this function.

extensions settings:

“rust.rustup”: {
“toolchain”: “nightly-x86_64-pc-windows-msvc”,
“nightlyToolchain”: “nightly-x86_64-pc-windows-msvc”
},
“rust.mode”: “rls”,
“rust.rls”: {
“useRustfmt”: true
},

What i tried:

  1. Reinstall all rust things.
  2. Three toolchains with legacy and rls mode:
    -stable-x86_64-pc-windows-gnu
    -stable-x86_64-pc-windows-msvc
    -nightly-x86_64-pc-windows-msvc

#2

RLS mode for the Rust extension by @KalitaAlexey is pretty raw and buggy. I recommend using “rust.mode”: “legacy” in your user settings. It might fix the problem for you.


#3

I think this is related to RLS bug which can be found from here https://github.com/rust-lang-nursery/rls-vscode/issues/74. Seems that it has been fixed 4 days ago.