-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Update just
grammar and queries
#9850
Conversation
I don't have a lot of Justfiles, but judging by a quick review, I can tell that it is much better than on master. I also appreciate the comments in queries which help to understand them faster.
|
I believe those injections should work but currently the pattern that defaults other (recipe_body
!shebang
(#set! injection.language "bash")
(#set! injection.include-children)) @injection.content
(recipe_body
shebang: (shebang) @injection.shebang
(#set! injection.include-children)) @injection.content |
Thanks, I did mean to ask about this specifically since it seemed like order in the query file did not matter. I'll play with this a bit - is the |
Another question, is there any good way to test indents, injections, and textobjects queries? |
It's standard, see "negated fields" here under the docs on the query format: https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax. It's a small section that's easy to miss. Currently we don't have unit tests for queries. We could add something like the query testing in tree-sitter-cli to the xtask crate but it would add a lot of code for something that is usually not too much work to verify by hand |
Using Specifying via shebang: Setting globally: But Helix 32.10 doesn't seem to pick up the shebang helix/helix-core/src/syntax.rs Line 2509 in 6c4d986
It doesn't pick up |
Has this been confirmed to fix #8226 ? |
I believe so from a quick test, added a |
Could you push the latest changes to this branch so I could debug? I see the |
Bump the git revision and use the queries from <https://github.com/IndianBoy42/tree-sitter-just/tree/348e9cff3c6c9dffcff02db5febd8fd838321b0e/queries-flavored/helix> to update Helix's sources.
Sorry @the-mikedavis , this slipped my mind. They are updated now |
Looks like the issue is that we look up languages that are tagged with helix/helix-core/src/syntax.rs Lines 1024 to 1026 in 50c90cb
We should look up in helix/helix-core/src/syntax.rs Lines 978 to 980 in 50c90cb
|
@tgross35 Where does this pr's status stand? Are the queries all done, just needing the |
Ah I'm sorry, I just never got back to this. Yeah, to my knowledge it only needs that fix. I haven't looked into it so please feel free to pick that part up (or even this whole PR if you would prefer). |
with #11306 merged this can now be closed |
Oh awesome, thank you for getting this over the line! |
Bump the git revision and use the queries from https://github.com/IndianBoy42/tree-sitter-just/tree/80d612d198b8d6207416225c9fcea0fe86ffb96e/queries-flavored/helix to update Helix's sources.
Tree-sitter-just has queries for Helix in-tree, I will make any changes from this review upstream.
Originally added at #6453 (cc @VuiMuich)
Fixes: #8226