Skip to content

Difference between tree-sitter-cli and neovim highlighting priority #5031

Answered by clason
luckasRanarison asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that is intentional and due to the different precedence of query order:

  1. tree-sitter-cli has "first match wins" (stop processing queries at first match);
  2. Neovim has -- sort of -- "last match wins" (process all queries and apply them in order; last one wins by "painting over" previous ones).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@luckasRanarison
Comment options

@clason
Comment options

Answer selected by luckasRanarison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants