-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add additional YAML injections #8217
Conversation
runtime/queries/yaml/injections.scm
Outdated
|
||
;; Github actions ("run") / Gitlab CI ("scripts") | ||
(block_mapping_pair | ||
key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support #any-of?
. This will need to be rewritten as a #match?
: (#match? @_run "^(run|script|before_script|after_script)$")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: any-of? Was added upstream to tree-sitter now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yep, once we update tree-sitter we'll have support for #any-of?
. The commit we are currently pinned to came right before that change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can switch it to match
unless tree-sitter is expected to be updated soon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're looking to update again when the next release of tree-sitter gets cut but we're not sure when that will be yet.
For now #match?
is good
Adds injections for Github Actions and Gitlab CI.
Adds injections for Github Actions & Gitlab CI.
Taken from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/yaml/injections.scm, which is licensed under Apache-2.0. Let me know if I need to change the license text here :)