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

Sort and select closest result for Find References in quick panel #2337

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

jwortmann
Copy link
Member

This is a part of the suggested enhancements from #2084 (comment).

With the setting "show_references_in_quick_panel": true enabled it will sort the results by URI and location and select the closest one if there is a result in the current file.

Note that the sort order can be OS dependent; for example Pyright uses file:///C:/ format for Windows drive letters for files which are currently open, and file:///c%3A/ format for unopened files. We could add another step to convert from URI to filename and sort those instead, but actually I found it quite useful that currently opened files are shown at the top of the list, when sorting by URI.

@rchl rchl merged commit 07daed8 into sublimelsp:main Oct 19, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants