Skip to content

Are highlighting queries in tree-sitter-XXX repositories considered canonical? #2381

Closed Answered by amaanq
guillaumebrunerie asked this question in General
Discussion options

You must be logged in to vote

For every language, there are highlighting queries being maintained in the tree-sitter-XXX repositories. Is the idea that those queries should be considered "canonical", and that everyone using tree-sitter for highlighting should use them?

Those that are owned by tree-sitter are meant for usage w/ the highlight subcommand in the cli iirc, and the captures are a bit simpler.

Now for Neovim, one of the main differences between nvim-treesitter/neovim core and tree-sitter is that our queries are last-wins, or basically, all captures are applied and the latest + most inner capture is shown, e.g. if we have a tree like (field (identifier)), where the entire field is captured @field and identi…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@sogaiu
Comment options

@guillaumebrunerie
Comment options

@sogaiu
Comment options

@guillaumebrunerie
Comment options

@sogaiu
Comment options

Answer selected by guillaumebrunerie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants