-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With multiple definitions "Go to definition" shows peek definition popup instead of going to definition #70032
Comments
(Experimental duplicate detection)
|
Also happening on insiders. |
It happens for TS files as well. A click to |
That's the outcome of #68023. When having multiple definition of a symbol the following change was made:
So, this happens whenever multiple definitions of a symbol exist. Instead of making a decision where to go to first, VS Code now shows peeks without revealing one. After reading/hearing feedback I was under the assumption that is wanted but we can consider an options if people feel strong about restoring the previous, jump to nearest, definition behaviour. |
"Go to" should work as "go to" I guess. Jumping to a nearest definition was the well-worked thing for me. Right now I always need to one additional mouse move + click every time I'm navigating to definitions. That's happening very often because jumping, for example, to any styled component in react application with types from DT always have two references, one reference is mine and one reference from DT: Obviously the second one isn't interesting for me. So please add the option to restore the previous behaviour. Or something like |
Shouldn't it go to the definition of the variable? Also what's the difference between "Goto Definition" and "Pick Definition" now, it seems they both do the same thing. |
IMO, these changes are making VSCode less convenient. |
"Peek Definition" always shows the peek window, "Go To Definition" shows it when having multiple definitions. We didn't change that, what we have changed is that peek opens at the position of the request, not at the position of the first definition. I will add a setting that allows to restore the old behaviour, to workaround until then, hit |
@jrieken I don't get the
part... I don't see how a symbol (an import in JS in my case) can have multiple definitons. for example: export { Cart: createIcon(Cart) } where It seems to me that |
Let's keep that out of this issue. Generally, a symbol can have multiple definitions and this issue is about the UI for that case, e.g where to show peek for multiple symbols. If you disagree with how TypeScript computes definitions for a certain symbol and if you think it should be 1, not more, then we should move that into a separate issue. |
With next Insiders build (http://code.visualstudio.com/insiders/, tomorrow or sooner) there will be a new setting:
|
1.32.1 (1.32.1)
10.14.3 (18D109)
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: