"Rust Analyzer is not found", with correct minimal coc-settings.json
See original GitHub issueEnv:
- macOS
10.15.4
- nvim
v0.5.0-503-g9816173fb
, also tried0.4.3 stable
from homebrew, same issue. - coc.nvim
release
branch rust-analyzer
compiled myself and located at$HOME/bin
- I have a relatively minimal
init.vim
coc-settings.json
:
{
"rust-analyzer.serverPath": "/Users/damien/bin/rust-analyzer"
}
The rust-analyzer plugin does not seem to be reading the settings file correctly. Each time I open a Rust file, I am prompted with:
Rust Analyzer is not found, download from GitHub release?:
1. Yes
2. Cancel
Type number and <Enter> or click with mouse (empty cancels):
If I pick 1
, a new binary is downloaded, but the plugin never launches. Autocomplete, gd
, etc. all do not work. Tailing the output of a logging wrapper (thanks @burntsushi) aroundrust-analyzer
shows it is never called by the plugin.
Am I missing anything? How can I better debug why the plugin doesn’t respect the coc-settings config?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
User Manual - rust-analyzer
If rust-analyzer is not detected, Corrosion will prompt you for configuration of your Rust toolchain and language server with a link to the...
Read more >Looking for help with a vim/coc-rust-analyzer issue - Reddit
This is a new, fresh install of coc. nvim in Vim (not Neovim). No other CoC extensions have been installed. Only coc-rust-analyzer is...
Read more >neoclide/coc.nvim - Gitter
I am having trouble with completion timing out on large projects. Completion works OK on small projects. My :messages show source rust-analyzer timeout...
Read more >Hottest 'coc.nvim' Answers - Stack Overflow
In your coc-settings.json file write: { "diagnostic.checkCurrentLine": true } coc-settings.json can be found in ~/.vim/coc-settings.json OR in vim type ...
Read more >coc-rust-analyzer/README.md - UNPKG
Settings not specific to `rust-analyzer` can be found at `:help coc-configuration`. 44. 45, ## Commands. 46.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works for me. I’ve cloned the rust-analyzer’s repository and then switch to
release
branch, then I build it withcd ~/LanguageServers/rust-analyzer && cargo xtask install --server
. I see the rust-analyzer binary inside~/.cargo/bin
Then my
:CocConfig
is just this.Then when I open a Rust file, it loads the rust-analyzer. Sometimes, it asks to install the Rust-analyzer, and I answer
1. Yes
but I don’t know if it does something different.I had the same issue. This
coc-settings.json
works for me: