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

lsp_definitions should respect file_ignore_patterns when deciding list or jump #3168

Closed
dssste opened this issue Jun 14, 2024 · 0 comments · Fixed by #3173
Closed

lsp_definitions should respect file_ignore_patterns when deciding list or jump #3168

dssste opened this issue Jun 14, 2024 · 0 comments · Fixed by #3173
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@dssste
Copy link

dssste commented Jun 14, 2024

Is your feature request related to a problem? Please describe.
lsp_definitions would jump to the location if there was only one result, but it would not do so if such scenario was due to file_ignore_patterns, resulting in a list of a single location without automatic jumping.

Describe the solution you'd like
Maybe it should check (in list_or_jump I think?) the result after filtering, instead of before filtering? Not 100% sure about the implementation details behind this.

Describe alternatives you've considered
Or just leave it as is. I don't think you would encounter this in any sensible code base.

Additional context
I encountered this when I was to filter out the generated code in Unity's UIToolkit. Personally I think they introduced a solution to a non-existing problem, but wcyd. The example below should be reproducible in any language where multiple definitions can happen.
Capture2
Capture

@dssste dssste added the enhancement Enhancement to performance, inner workings or existent features label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant