neoclide / coc-rls

Rust language server support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't get RLS working in no_std project

YuhanLiin opened this issue · comments

I've been trying to get RLS to work in a no_std crate but keep getting errors along the lines of "can't find crate for 'core'". My .vim/coc-settings.json is as follows:

  {    
      "diagnostic.enable": true,    
      "diagnostic.checkCurrentLine": false,    
      "languageserver": {    
        "rust": {    
          "command": "rls",    
          "filetypes": ["rust"],    
          "rootPatterns": ["Cargo.toml"]    
        }    
      },    
      "rust.all_targets": false,    
      "rust.sysroot": "/home/yuhan/projects/rust/embedded/msp430-quickstart/target/sysroot",    
      "rust.target": "msp430-none-elf",    
      "rust.rustflags": "-L  dependency=/home/yuhan/projects/rust/embedded/msp430-quickstart/target/sysroot/lib/rustlib/msp430-none-elf/lib"    
  }    

My code is at https://github.com/YuhanLiin/msp430fr2355-quickstart. It is an embedded project targetting MSP430. I've been following the instructions at rust-lang/rls#904 to no avail.

You should not use configured rls and coc-rls at the same time.
Should be problem of your language server, ask there.