How to go to definition in VSCode on Mac

I have installed a rust-analyzer, but I still can't go to the definition in VSCode on Mac. Is there anyone who met a similar problem like that? I am very confused. Thanks!

Just to be clear, was rust-analyzer installed through the vscode extensions interface?

And an easy case like this still can't find the definition?

fn test() {}

fn main() {