microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.13k stars 29.27k forks source link

Go to References should be Go To Usages #231714

Open dailytabs opened 2 weeks ago

dailytabs commented 2 weeks ago

When I use "Go to References", I would like to ignore definitions.

Currently, if a method is used only once, when using Go To References, a menu pops up showing the definition and the single usage.

I do not consider a definition to be a reference and do not feel like this menu should come up. Instead, I would much prefer if the single usage was directly opened.

Even if there are multiple usages, I do not want to see the definition listed as a reference - that's what Go To Definition is for.

Please convert Go to References to (or add) Go To Usages, which is 10x more helpful and better language.

P.S. When I use Go To Definition, while cursor is on the definition, I get the identical results as Go To References. This is idiotic. It should NEVER show a usage when using Go to Definition. This whole system is absurd!

gjsjohnmurray commented 2 weeks ago

Which language?

RedCMD commented 2 weeks ago

Javascript does Image

function definition() {
    return;
}

definition();
definition();
gjsjohnmurray commented 2 weeks ago

Previously 114673 but this is now closed and locked.

Pinging @mjbvz