fannheyward / coc-rust-analyzer

rust-analyzer extension for coc.nvim
MIT License
1.13k stars 39 forks source link

Fails to detect rust-analyzer on PATH #1188

Closed srounce closed 1 year ago

srounce commented 1 year ago

It would be nice if the plugin reliably detected rust-analyzer being on the $PATH and the whatever version is available, this seems to work on my NixOS installations but not on MacOS.

What's the output of :CocInfo

## versions

vim version: NVIM v0.9.2
node version: v18.18.0
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /nix/store/figjy6xn183pjjb2hb35v7sal5vnr8s0-vimplugin-coc.nvim-2023-09-30
term: tmux
platform: darwin

## Log of coc.nvim

2023-10-06T21:37:02.302 INFO (pid:71225) [plugin] - coc.nvim initialized with node: v18.18.0 after 104
2023-10-06T21:37:07.281 ERROR (pid:71225) [timing] - activate coc-rust-analyzer timeout after 5000ms
2023-10-06T21:39:17.452 INFO (pid:71225) [attach] - Request action: fillDiagnostics [ 1 ]
2023-10-06T21:39:24.690 INFO (pid:71225) [attach] - receive notification: showInfo []
2023-10-06T21:39:44.198 INFO (pid:71225) [attach] - receive notification: highlight []
2023-10-06T21:40:03.348 INFO (pid:71225) [attach] - receive notification: highlight []
2023-10-06T21:41:19.910 INFO (pid:71225) [attach] - receive notification: highlight []
2023-10-06T21:43:52.436 INFO (pid:71225) [attach] - receive notification: runCommand []
2023-10-06T21:44:32.880 INFO (pid:71225) [attach] - receive notification: highlight []
2023-10-06T21:45:21.081 INFO (pid:71225) [attach] - receive notification: showInfo []

What's the output of :CocCommand rust-analyzer.serverVersion

Command was never registered because I don't want to install rust-analyzer in the way the plugin wants me to.

What's your coc-rust-analyzer version? You can get it from :CocList extensions

0.74.0
fannheyward commented 1 year ago

Set "rust-analyzer.server.path": "rust-analyzer" will resolve rust-analyzer from your PATH.

Will improve this later https://github.com/fannheyward/coc-rust-analyzer/pull/1114