Rust-analyzer times out on call to textDocument_definition

I'm using neovim (v0.7.2) with LanguageClient (0.1.161) successfully with rls. However, when I switch to rust-analyzer (by changing rls to rust-analyzer in the LanguageClient_serverCommands of my init.vim), any attempt to find the definition of a function (even within the same source file) never completes.

I see

:call LanguageClient#textDocument_definition()

appear in the status line of my editor but eventually it's replaced with

[LC] timed out waiting on receive operation

When I check the LanguageClient log, I see

ERROR unnamed src/rpchandler.rs:27 Error handling message: timed out waiting on receive operation

About a minute later, I see what appears to be a response coming back (seemingly with the correct "answer") but it looks like the client is no longer receptive

The other functionality of rls (e.g., highlighting warnings for unused functions) seems to work fine.

I've tried updating everything and even reproduced it using a "simple" rust project -- trying to find the definition there of greet() from within main.rs. (You can see the resulting log file here)

I'm not sure what else to check.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.