fannheyward / coc-rust-analyzer

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

Coc-rust-analyzer workspace does not load and no feature works. #1194

Closed GaelicGabe closed 10 months ago

GaelicGabe commented 10 months ago

cargo new test nvim test/src/main.rs

rust-analyzer failed to start , run ':CocCommand rust-analyzer.reloadWorkspace' to reload popup that says failed to load workspace None of the functionality works

I've updated rust-analyzer using rustup I've updated Coc I've updated all my Coc plugins I've emptied out my coc-settngs.json

What's the output of :CocInfo

versions

vim version: NVIM v0.8.3 node version: v16.18.1 coc.nvim version: 0.0.82-fe66892c 2023-09-15 15:12:28 +0800 coc.nvim directory: /home/user/dotfiles/vim/.vim/plugged/coc.nvim term: alacritty platform: linux

Log of coc.nvim

2023-10-18T18:16:37.633 INFO (pid:45857) [plugin] - coc.nvim initialized with node: v16.18.1 after 357 2023-10-18T18:16:37.636 INFO (pid:45857) [services] - LanguageClient Rust Analyzer Language Server state change: stopped => starting 2023-10-18T18:16:37.661 INFO (pid:45857) [language-client-index] - Language server "rust-analyzer" started with 45875 2023-10-18T18:16:37.689 INFO (pid:45857) [services] - LanguageClient Rust Analyzer Language Server state change: starting => running 2023-10-18T18:16:37.761 INFO (pid:45857) [services] - service rust-analyzer started 2023-10-18T18:17:01.485 INFO (pid:45857) [attach] - receive notification: showInfo []

What's the output of :CocCommand rust-analyzer.serverVersion rust-analyzer 0.3.1697-standalone What's your coc-rust-analyzer version? You can get it from :CocList extensions 0.75.0

fannheyward commented 10 months ago

cd into the test folder first, then open the rust file.

GaelicGabe commented 10 months ago

cd into the test folder first, then open the rust file.

This does not produce any other behavior. (Apologies for the late reply, I didn't realize you would be so quick. I will be quicker from now on.)

fannheyward commented 10 months ago
cargo new test1
cd test1
nvim src/main.rs

works as expected. coc and rust-analyzers need to know the project root to work.

GaelicGabe commented 10 months ago

I've played around with it a lot today, did a complete reinstall of many things and now it works. Sadly I am not sure exactly what I did which solved it so I can't give good feedback for others. However issue is solved so I am closing.