autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 272 forks source link

rust_analyzer error: unknown request:... #1225

Open Kannen opened 3 years ago

Kannen commented 3 years ago

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

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

To Reproduce

Steps to reproduce the behavior:

Current behavior

Nothing happen

Expected behavior

I suppose that a debugger should run.

martskins commented 3 years ago

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.