neoclide / coc-rls

Rust language server support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command error: request error nvim_call_function - Vim(let):E15: Invalid expression

Annis-Monadjem opened this issue · comments

Hello! I'm trying to figure out how to use coc-rls.
I have setup cargo, have updated (:CocCommand rls.update) coc-rls latest version @1.1.4, neovim :checkhealth is all ok, but when try to run .rs file i get this nasty message:

[coc.nvim] Command error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'  
 | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''

CocInfo:

vim version: NVIM v0.5.0-139-g610755ff6
node version: v12.16.1
coc.nvim version: 0.0.75-d5e12d81b2
term: screen-256color
platform: linux

[coc.nvim] Setting sysroot to/home/sky/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/sky/rust_learning/a3_rust-by-example

## Output channel: prettier
## Output channel: snippets

CocOpenLog (selected printout of Error message):

2020-03-08T22:33:53.834 ERROR (pid:19851) [commands] - Error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'   | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''
    at /home/sky/.config/nvim/plugged/coc.nvim/build/index.js:14243:32
    at NvimTransport.parseMessage (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10847:17)
    at DecodeStream.<anonymous> (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10817:18)
    at DecodeStream.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at DecodeStream.Readable.push (_stream_readable.js:209:10)
    at DecodeStream.Transform.push (_stream_transform.js:152:32)
    at DecodeBuffer.DecodeStream.decoder.push (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:13767:12)
    at DecodeBuffer.flush (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:12757:12)

How to fix the above problem, and have coc-rls start to work?

I think you need checkout where this expression comes from, we don't have this with coc-rls or coc.nvim.

I think you need checkout where this expression comes from, we don't have this with coc-rls or coc.nvim.

So, where should i look for the culprit (the error clearly is stating [coc.nvim]) ?

Try disable all your extensions and enable them one by one

@chemzqm: i did disable all extensions, next i enabled coc-rls and it is still giving same exact errors as above. All other extensions are behaving well, just coc-rls is not.

Use minimal vimrc

@chemzqm: I did tried it earlier, but am repeating with minimal vimrc and documenting it here. Getting exact same error as above:

Steps Taken:

  1. $HOME/.config/nvim/mini.vim:
    set nocompatible
    set runtimepath^=~/.config/nvim/plugged/coc.nvim
    filetype plugin indent on
    syntax on
    set hidden

  2. $ nvim -u ~/.config/nvim/mini.vim
    From within nvim open main.rs file:

fn main() {
    let annis: char = 'a';
    println!("{:?}", annis);
}

and execute:

:CocCommand rls.run

which returns an error message:

[coc.nvim] Command error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''
  1. CocInfo:
## versions

vim version: NVIM v0.5.0-139-g610755ff6
node version: v12.16.1
coc.nvim version: 0.0.75-d5e12d81b2
term: screen-256color
platform: linux

## Messages
E325: ATTENTION
[coc.nvim] Setting sysroot to/home/sky/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/sky/rust_learning/a3_learning-rust_practicing
[coc.nvim] Setting sysroot to/home/sky/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/sky/rust_learning/a3_learning-rust_practicing
[coc.nvim] Command error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'   | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''
  1. CocOpenLog
2020-03-14T16:05:40.613 INFO (pid:9380) [services] - registered service "rust-client"
2020-03-14T16:05:40.624 INFO (pid:9380) [plugin] - coc 0.0.75-d5e12d81b2 initialized with node: v12.16.1
2020-03-14T16:05:40.712 INFO (pid:9380) [services] - Rust Language Server state change: starting => running
2020-03-14T16:06:04.866 INFO (pid:9380) [services] - Rust Language Server state change: running => stopped
2020-03-14T16:06:14.513 INFO (pid:9380) [services] - registered service "rust-client"
2020-03-14T16:06:14.643 INFO (pid:9380) [services] - Rust Language Server state change: starting => running
2020-03-14T16:07:01.086 ERROR (pid:9380) [commands] - Error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'   | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''
    at /home/sky/.config/nvim/plugged/coc.nvim/build/index.js:14243:32
    at NvimTransport.parseMessage (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10847:17)
    at DecodeStream.<anonymous> (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10817:18)
    at DecodeStream.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at DecodeStream.Readable.push (_stream_readable.js:209:10)
    at DecodeStream.Transform.push (_stream_transform.js:152:32)
    at DecodeBuffer.DecodeStream.decoder.push (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:13767:12)
    at DecodeBuffer.flush (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:12757:12)
  1. Final Observations:
    I do not find coc-rls channel.