LanguageClient-neovim
LanguageClient-neovim copied to clipboard
rust_analyzer error: unknown request:...
- Did you upgrade to latest plugin version?
- Did you upgrade to/compile latest binary? Run shell command
bin/languageclient --version
to get its version number. - (Neovim users only) Did you check output of
:checkhealth LanguageClient
? - Did you check troubleshooting?
Describe the bug
On rust file, while executing the rust-analyzer extension action "run Debug", nothing happen. The following error message is sent by rust-analyzer of stdErr:
[ERROR rust_analyzer::dispatch] unknown request: Request { id: RequestId(U64(17)), method: "workspace/executeCommand", params: Object({"arguments": Array([Object({"args": Object({"cargoArgs": Array([String("test"), String("--package"), String("vashy"), String("--lib")]), "executableArgs": Array([String("values::test::int"), String("--exact"), String("--nocapture")]), "workspaceRoot": String("/home/olivier/rust_src/vashy")}), "kind": String("cargo"), "label": String("test values::test::int"), "location": Object({"targetRange": Object({"end": Object({"character": Number(5), "line": Number(1080)}), "start": Object({"character": Number(4), "line": Number(1071)})}), "targetSelectionRange": Object({"end": Object({"character": Number(10), "line": Number(1072)}), "start": Object({"character": Number(7), "line": Number(1072)})}), "targetUri": String("file:///home/olivier/rust_src/vashy/src/values.rs")})})]), "command": String("rust-analyzer.debugSingle")}) }
Environment
- neovim/vim version
NVIM v0.4.4 Build type: Gentoo Lua 5.1 Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=haswell -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/config -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4/src -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/include Compiled by portage@localhost
Features: +acl +iconv +tui
-
This plugin version (
git rev-parse --short HEAD
): a42594c -
This plugin's binary version (
bin/languageclient --version
): languageclient 0.1.161 -
Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. call plug#begin('~/.vim/plugged')
Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ }
Plug 'junegunn/fzf'
call plug#end()
let g:LanguageClient_serverCommands = { \ 'rust': ['rust-analyzer'], \ }
nmap <F4> <Plug>(lcn-code-lens-action)
-
Language server link and version:
rust-analyzer 0d03fe6
To Reproduce
Steps to reproduce the behavior:
-
cargo new --lib project
-
nvim -u min-vimrc.vim project/src/lib.rs
... - Press F4
- select "rust-analyzer.debugSingle: Debug"
- Press Return
- Nothing happen
Current behavior
Nothing happen
Expected behavior
I suppose that a debugger should run.
Yes, this has been an issue ever since we added support for those code lenses. I'm not sure how we would go about implementing this to be honest. The Run
lens itself is a little hacky. I think those were thought mainly for VSCode, and we just do what we can with them. Having said that, I would be happy to see this implemented.