@@ -1,2 +1,54 @@
1((comment) @injection.content
1((comment) @injection.content
2 (#set! injection.language "comment"))
2 (#set! injection.language "comment"))
4+; The remaining code in this file incorporates work covered by the following
5+; copyright and permission notice:
7+; Copyright 2023 the nvim-treesitter authors
9+; Licensed under the Apache License, Version 2.0 (the "License");
10+; you may not use this file except in compliance with the License.
11+; You may obtain a copy of the License at
13+; http://www.apache.org/licenses/LICENSE-2.0
15+; Unless required by applicable law or agreed to in writing, software
16+; distributed under the License is distributed on an "AS IS" BASIS,
17+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+; See the License for the specific language governing permissions and
19+; limitations under the License.
21+; Modified for Helix from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/yaml/injections.scm
23+;; Github actions ("run") / Gitlab CI ("scripts")
25+ key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
28+ (string_scalar) @injection.content)
29+ (#set! injection.language "bash")))
32+ key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
34+ (block_scalar) @injection.content
35+ (#set! injection.language "bash")))
38+ key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
44+ (string_scalar) @injection.content))
45+ (#set! injection.language "bash")))))
48+ key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
53+ (block_scalar) @injection.content
54+ (#set! injection.language "bash"))))))