generic yaml injection for yaml files
if a field with block text has the name of a language, it will be injected into the block of text
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
(block_mapping_pair
|
||||
key: (flow_node) @_run
|
||||
(#any-of? @_run "query" "sql")
|
||||
(#any-of? @_run "query")
|
||||
value: (block_node
|
||||
(block_scalar) @injection.content
|
||||
(#set! injection.language "sql")
|
||||
(#offset! @injection.content 0 1 0 0)))
|
||||
|
||||
(block_mapping_pair
|
||||
key: (flow_node (plain_scalar (string_scalar) @injection.language))
|
||||
value: (block_node
|
||||
(block_scalar) @injection.content
|
||||
(#offset! @injection.content 0 1 0 0)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user