fannheyward / coc-rust-analyzer

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

The rust-analyzer can not load workspace from nvim or vim. The software kept prompting me to reload. #1178

Closed Mats-Tan closed 12 months ago

Mats-Tan commented 12 months ago

I tried to write rust project with nvim and coc-rust-analyzer in Ubuntu, but it got the following error, I left CocInfo and error, hoping to solve this problem and use RA properly.

If you can see this information and have some ideas, please help me, thank you. image

image

Mats-Tan commented 12 months ago

Here is my version image

fannheyward commented 12 months ago

rust-analyzer failed to start

rust-analyzer's issue, RA returns error server status, the client, coc/coc-rust-analyzer warns you to reload.

Have you set rust-analyzer.server.path in your coc-settings.json? coc-rust-analyzer will download RA to ~/.config/coc/extensions/coc-rust-analyzer-data/rust-analyzer, check this RA's version.

Mats-Tan commented 12 months ago

I set up rust-analyzer.server.path in coc-settings.json, which points to the rust-analyzer I installed via cargo install rust-analyzer. image

Mats-Tan commented 12 months ago

I went to see the ~ / config/coc/extensions/coc - rust - analyzer - data/rust - analyzer version, it is below this, I don't understand the difference between them image

Mats-Tan commented 12 months ago

I didn't get rust-analyzer to work in nvim by removing rust-analyzer.server.path or changing it to ~/.config/coc/extensions/coc-rust-analyzer-data/rust-analyzer. I was confused because I didn't set rust-analyzer.server.path in the past