Description
Use case
I create, fetch, and build a new tree-sitter grammar. I launch Helix Editor to see my new tree sitter grammar in action.
What should happen
I should see it working.
What actually happens
Nothing.
How I troubleshoot
I enter hx --health my_lang
and I see that highlighting and indentation are not being applied for it.
I look inside my tree-sitter grammar folder and I see that injections.scm
, etc., exist in its queries
folder.
I see that the grammar, including the queries folder has been correctly checked out and is in runtime/grammars.
I’m confused.
I check out the documentation on adding languages and notice the note about how queries have to be added manually to runtime/queries.
I’m left wondering why running hx --grammar build my_lang
didn’t just copy my queries folder from my tree-sitter grammar to runtime/queries for me.
Suggested implementation
Running hx --grammar build my_lang
should copy the queries directory from the tree-sitter grammar (if one exists) to runtime/queries as part of the build/installation process.