Rust-Analyzer has no functionality in VSCode

Just started studying Rust from the rustlings exercises.

I'm having a problem with usage of RA. Installed the latest stable version (v0.3.1140). On the tooltip, the rust-analyzer was on "ready" status, but functionalities such as definitions, inlay highlights, references, documentations on hovering and so on were seemingly not enabled.

I was moving on from JS so the hovering to see documentations/ descriptions was quite vital.

I tried a clean uninstall/install of VSCode but still running into the same problem. What should I do?

Did you run rustlings lsp?


Hi. Thanks a ton. I definitely missed that part. It worked on the rustlings project, however the other projects (folders/binary) that I'm working on still missing out the RA functionalities.

Is it mandatory to add a proper rust-project.json file for the RA to parse the project correctly? Normally I will just start it with cargo init and start writing.

With an ordinary cargo project, RA should just work. Make sure to open the right project path (e.g. with “code path/to/project/root” in the terminal, i.e. the path where path/to/project/root/Cargo.toml exists).

1 Like

Got it, seems like it does not work if opened from a non-root path. In other project I only initiated cargo as a sub-modules and still testing out things. Huge thanks!!

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.