nvim-treesitter/queries/c/injections.scm

20 lines
659 B
Scheme
Raw Normal View History

((preproc_arg) @injection.content
(#set! injection.language "c"))
((comment) @injection.content
(#set! injection.language "comment"))
2023-08-22 02:10:29 -04:00
((comment) @injection.content
2023-08-25 05:02:58 -04:00
(#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c")
2023-08-22 02:10:29 -04:00
(#set! injection.language "re2c"))
2023-08-25 05:02:58 -04:00
((comment) @injection.content
(#lua-match? @injection.content "/[*][!<*][^a-zA-Z]")
(#set! injection.language "doxygen"))
; TODO: add when asm is added
; (gnu_asm_expression assembly_code: (string_literal) @injection.content
; (#set! injection.language "asm"))
; (gnu_asm_expression assembly_code: (concatenated_string (string_literal) @injection.content)
; (#set! injection.language "asm"))