Rust-analyzer does not provide intellisense on vscode, no errors are shown

I've uninstalled and then reinstalled rust-analyzer so I do have the latest. I can see the rust-analyzer section in settings in vscode. However when I go to the output terminal and select rust analyzer language server or rust analyzer language server trace, both screens are empty.

i get no intellisense, no code completion, no hover over info, basically nothing. There are no errors I can see.

What can I do?

  1. Sometimes this happens to me with projects that have build scripts. Does yours include any?
  2. Can you get any intellisense /completions on an empty/dummy Rust project?

I've found that the code you're editing has to actually be referenced in order to get editor support. I imagine this is more to do with the actual compiler than anything specific to rust-analyzer. cargo build only loads those files that are referenced by the main/lib/bin files, so effectively ignores any stray files even if they're .rs. The editor plugin appears to do the same.


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.