mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
More bash injection support for Taskfile (#7805)
This commit is contained in:
parent
205faba176
commit
0e21ee8df6
2 changed files with 12 additions and 3 deletions
|
|
@ -2,10 +2,10 @@
|
||||||
(#set! injection.language "comment"))
|
(#set! injection.language "comment"))
|
||||||
|
|
||||||
; Github actions ("run") / Gitlab CI ("scripts")
|
; Github actions ("run") / Gitlab CI ("scripts")
|
||||||
; Taskfile scripts ("cmds", "sh")
|
; Taskfile scripts ("cmds", "cmd", "sh")
|
||||||
(block_mapping_pair
|
(block_mapping_pair
|
||||||
key: (flow_node) @_run
|
key: (flow_node) @_run
|
||||||
(#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh")
|
(#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "cmd" "sh")
|
||||||
value: (flow_node
|
value: (flow_node
|
||||||
(plain_scalar
|
(plain_scalar
|
||||||
(string_scalar) @injection.content)
|
(string_scalar) @injection.content)
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
(block_mapping_pair
|
(block_mapping_pair
|
||||||
key: (flow_node) @_run
|
key: (flow_node) @_run
|
||||||
(#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh")
|
(#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "cmd" "sh")
|
||||||
value: (block_node
|
value: (block_node
|
||||||
(block_scalar) @injection.content
|
(block_scalar) @injection.content
|
||||||
(#set! injection.language "bash")
|
(#set! injection.language "bash")
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,12 @@ tasks:
|
||||||
- echo "{{.GREETING}}"
|
- echo "{{.GREETING}}"
|
||||||
# ^ @bash
|
# ^ @bash
|
||||||
silent: true
|
silent: true
|
||||||
|
cmd:
|
||||||
|
cmd: echo "{{.GREETING}}"
|
||||||
|
# ^ @bash
|
||||||
|
silent: true
|
||||||
|
cmd-block:
|
||||||
|
cmd: |
|
||||||
|
echo "{{.GREETING}}"
|
||||||
|
# ^ @bash
|
||||||
|
silent: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue