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

Only return highlights for symbols in current document #578

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

gpanders
Copy link
Contributor

This seems to only occur when highlighting "field access" symbols, e.g.
"bar" in a statement such as foo.bar. This is because the
symbolReferencesInternal function finds the reference to the field in
the container even when the container is not in the current document.

This seems to only occur when highlighting "field access" symbols, e.g.
"bar" in a statement such as `foo.bar`. This is because the
`symbolReferencesInternal` function finds the reference to the field in
the container even when the container is not in the current document.
@gpanders
Copy link
Contributor Author

gpanders commented Aug 10, 2022

Alternatively I could try modifying symbolReferencesInternal to have it (optionally) only find symbols within the current document. That is probably “better” in the sense that it does not generate references that only get filtered out later, though it is a larger/more complex change.

@SuperAuguste
Copy link
Member

I think this change is fine as-is, thanks for the contribution!

@SuperAuguste SuperAuguste merged commit c632a7f into zigtools:master Aug 11, 2022
@gpanders gpanders deleted the highlight-uri branch August 11, 2022 16:02
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