-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### 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 - closes #276 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Disambiguated highlights: ![Screenshot 2024-11-17 at 2 50 28 PM](https://github.com/user-attachments/assets/e1bde8b3-81b5-481f-80d2-428798374c2b) Ambiguous highlights: ![Screenshot 2024-11-17 at 2 52 04 PM](https://github.com/user-attachments/assets/90a89ed4-afb6-4d60-a7d7-39ba0a560ee6) --------- Co-authored-by: Tom Ludwig <[email protected]>
- Loading branch information
1 parent
f8ecd2e
commit 696a7f1
Showing
3 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters