Rls: Couldn't start client Rust Language Server

Created on 28 Aug 2017  Â·  5Comments  Â·  Source: rust-lang/rls

Hi. I've installed your plugin from a marketplace. Then I create a fresh project via cargo new vscode-test --bin, open it in vscode and getting two error messages:

  • Couldn't start client Rust Language Server
  • Unexpected error initializing RLS - error running rustup

2017-08-28 11 58 20

Rustup version:

➜  ~  rustup --version
rustup 1.5.0 (92d0d1e9e 2017-06-24)

Previously reported at forum

Please help!

Most helpful comment

@nrc so I did rustup update nightly and the problem disappeared! It proposed me to install RLS on next startup

2017-08-29 13 28 49

I pressed Yes. Now it doesn't error, but no type hints are appearing when I hint at variable like i_ in code:

fn main() {
    let i = 10;
    let i_ = i+1;
    println!("{}", i_);
    println!("Hello, world!");
}

neither can I jump to its definition.

I think this issue can be closed, but I would appreciate further help. Reading through https://github.com/rust-lang-nursery/rls/blob/master/debugging.md meanwhile.

All 5 comments

It looks like your rustup is very out of date. I'd start with rustup update. I suspect the problem might be that VSCode can't find Rustup. There are details about this problem and some general debugging tips in https://github.com/rust-lang-nursery/rls/blob/master/debugging.md

@nrc rustup update didn't do anything

➜  ~  rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: checking for self-updates

  stable-x86_64-apple-darwin unchanged - rustc 1.19.0 (0ade33941 2017-07-17)

➜  ~  rustup --version
rustup 1.5.0 (92d0d1e9e 2017-06-24)

@nrc so I did rustup update nightly and the problem disappeared! It proposed me to install RLS on next startup

2017-08-29 13 28 49

I pressed Yes. Now it doesn't error, but no type hints are appearing when I hint at variable like i_ in code:

fn main() {
    let i = 10;
    let i_ = i+1;
    println!("{}", i_);
    println!("Hello, world!");
}

neither can I jump to its definition.

I think this issue can be closed, but I would appreciate further help. Reading through https://github.com/rust-lang-nursery/rls/blob/master/debugging.md meanwhile.

Seeing this in RLS logs output:

thread '<unnamed>' panicked at 'could not run cargo: CargoError(Msg("no library targets found"), State { next_error: None, backtrace: None })', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Ok, removing "rust.build_lib": true, from settings helped. It now seems to work. Woohoo!

Was this page helpful?
0 / 5 - 0 ratings