Skip to content
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

go-to-definition doesn't jump to closest same-file definition #548

Closed
diminutivesloop opened this issue Nov 18, 2022 · 2 comments
Closed
Labels
question Further information is requested

Comments

@diminutivesloop
Copy link

When using go-to-definition on a variable with multiple definitions, if the VSCode setting editor.gotoLocation.multipleDefinitions is set to "goto", the jumped-to definition is frequently either in a different file or if it is in the same file it's not the closest one. However if editor.gotoLocation.multipleDefinitions is set to "peek" then the selected definition in the peek view is the closest in-file definition. Ideally "goto" should jump to whatever the selected "peek" definition would be which should be the closest same-file definition.

@skovhus skovhus added bug Something isn't working good first issue Good for newcomers help wanted labels Nov 18, 2022
@skovhus
Copy link
Collaborator

skovhus commented Jan 2, 2023

A much better heuristic for symbol resolution has been released as [email protected] and for vscode in the latest extension 1.24.0. I believe this solves the issue here.

@diminutivesloop Please let me know if it works for you or if you have any feedback to the new version.

@skovhus skovhus added question Further information is requested and removed bug Something isn't working help wanted good first issue Good for newcomers labels Jan 2, 2023
@diminutivesloop
Copy link
Author

@skovhus As best as I can tell it's working fine.

@skovhus skovhus closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants