nvim-treesitter/queries/teal/injections.scm

31 lines
624 B
Scheme
Raw Normal View History

2021-03-08 22:35:21 +00:00
(
(function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content)
2021-03-08 22:35:21 +00:00
)
(#eq? @_cdef_identifier "cdef")
(#lua-match? @injection.content "^[\"']")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "c")
2021-09-21 20:41:17 +02:00
)
(
(function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content)
2021-09-21 20:41:17 +02:00
)
(#eq? @_cdef_identifier "cdef")
(#lua-match? @injection.content "^%[%[")
(#offset! @injection.content 0 2 0 -2)
(#set! injection.language "c")
2021-03-08 22:35:21 +00:00
)
((comment) @injection.content
(#set! injection.language "comment"))