This commit is contained in:
player131007 2026-04-03 15:45:08 +07:00 committed by GitHub
commit b962f84204
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 55 additions and 0 deletions

View file

@ -255,6 +255,48 @@
(#lua-match? @_func "^%a*%.*writeRust%a*$")
(#set! injection.combined))
((apply_expression
function: (apply_expression
function: (_) @_func
argument: [
(string_expression
.
(string_fragment) @injection.filename .)
(indented_string_expression
.
(string_fragment) @injection.filename .)
])
. ; only match on adjacent text, so that we can use a comment to change the language
argument: [
(string_expression
(string_fragment) @injection.content)
(indented_string_expression
(string_fragment) @injection.content)
])
(#lua-match? @_func "^%a*%.*writeText$")
(#set! injection.combined))
((apply_expression
function: (apply_expression
function: (_) @_func
argument: [
(string_expression
.
(string_fragment) @injection.filename .)
(indented_string_expression
.
(string_fragment) @injection.filename .)
])
. ; only match on adjacent text, so that we can use a comment to change the language
argument: [
(string_expression
(string_fragment) @injection.content)
(indented_string_expression
(string_fragment) @injection.content)
])
(#lua-match? @_func "^%a*%.*writeTextDir$")
(#set! injection.combined))
; (runTest) testScript
(apply_expression
function: (_) @_func