-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix Ambiguous Highlights #275
Fix Ambiguous Highlights #275
Conversation
…olwinter/CodeEditSourceEditor into feat/multiple-highlighters
Co-authored-by: Tom Ludwig <[email protected]>
…olwinter/CodeEditSourceEditor into feat/multiple-highlighters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, and very well documented! I found a few potential issues. Let me know your thoughts.
@austincondiff most of these changes are from #273 so I think we need to wait to review this until that is merged so the actual changes are visible here. Sorry I made it convoluted. The things you commented on are from that PR |
Would it be better to set the #273 branch as the target and merge into it instead? |
|
Okay the changes shown here now reflect the actual diff. I'm not too worried about the messy commit history since we squash PRs anyways. Ready for review now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
Fixes some bad syntax highlighting caused by overlapping captures returned from tree-sitter. Previously the last value returned took precedence, but with the new highlighting system that's not the case. This filters highlights on duplicate ranges, and prioritizes the best capture for any range so this is no longer dependent on the highlighting system's semantics.
Related Issues
Checklist
Screenshots
Disambiguated highlights:
Ambiguous highlights: