Files
helix/runtime/queries/lua/injections.scm

30 lines
787 B
Scheme

((comment) @injection.content
(#set! injection.language "comment")
(#set! injection.include-children))
; string.match("123", "%d+")
(function_call
(dot_index_expression
field: (identifier) @_method
(#any-of? @_method "find" "match" "gmatch" "gsub"))
arguments: (arguments
.
(_)
.
(string
content: (string_content) @injection.content
(#set! injection.language "luap")
(#set! injection.include-children))))
; ("123"):match("%d+")
(function_call
(method_index_expression
method: (identifier) @_method
(#any-of? @_method "find" "match" "gmatch" "gsub"))
arguments: (arguments
.
(string
content: (string_content) @injection.content
(#set! injection.language "luap")
(#set! injection.include-children))))