Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Highlighting is broken for tree-sitter 0.24 #282

Open
jakob opened this issue Oct 23, 2024 · 0 comments
Open

Syntax Highlighting is broken for tree-sitter 0.24 #282

jakob opened this issue Oct 23, 2024 · 0 comments

Comments

@jakob
Copy link

jakob commented Oct 23, 2024

When I use the command tree-sitter highlight test.sql with this grammar, I get the following error:

Error in query file "queries/highlights.scm"

Caused by:
    Query error at 151:4. Invalid node type keyword_min

(It works with tree-sitter 0.23.2, but it is broken in 0.24 or newer)

I believe it is caused by a new feature where tree-sitter generate removes unused rules. Since keyword_max is not used in the grammar, it is removed, and the highlight query fails because it uses an unknown node type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant