mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 04:50:03 -04:00
feat(nix): add writeText/writeTextDir injection
This commit is contained in:
parent
539abf6da5
commit
4a53f4cb18
2 changed files with 55 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue