feat(treesitter): follow upstream captures #694
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR primarily updated highlight groups related to treesitter captures to comply with the latest specification. Deprecated captures were relocated to the legacy section. All changes are based on the following four commits:
I've attempted to keep the colors consistent for new additions by looking at the definitions of existing captures, but I'm really not sure how to handle colors for documentation-related ones. AFAIU the only relevant existing capture is
@markup.raw
, but it seems better suited for smaller sections of documentation. Personally, I don't think a large block of greenish-blue would look great for extensive documents that might span multiple lines. Here's a comparison:["@comment.documentation"] = { link = "Comment" }
:["@comment.documentation"] = { fg = C.teal, style = O.styles.strings or {} }
:Note: Relevant hl groups include
@string.documentation
,@comment.documentation
, and@markup.raw
.Which option are you all leaning towards? Let me know because I really can't make a choice 🥲