Closed savetheclocktower closed 1 month ago
I meant to put this in draft mode like the others, so pretend I just took it out of draft mode!
Sorry if this is something I've just missed in the past, but was there a change we made to support the
languageSegment
andhighlightsQuery
keys? It seems it just allows us to define multiple highlight query files, which is awesome as I assume that reduces duplication and effort, but I'm curious if there's anything big we had to do previously to support this? Or has it always been around as a possibility?
Every *Query
key has the ability to accept an array with multiple paths as values; they're concatenated together in order. That was added at the same time as languageSegment
.
That's been around for a while; I think I created it so that I could cut down on redundancy between the TypeScript and TypeScript-with-TSX grammars. If I'd had it in place when I first wrote the C and C++ highlighting I would've used it there as well. It's documented in the Sharing query files section.
@savetheclocktower Thanks for taking the time to answer my question, and super awesome you've already written some documentation for it!
But seems we should be good to merge then!
1100 gives me a great excuse to get the new Tree-sitter PR up. Unlike last month's PR, this one starts off small.
Fixes #1100.
Changelog
#ifdef
s in C/C++).