feat: add Doxygen

This commit is contained in:
Amaan Qureshi 2023-08-25 05:02:58 -04:00
parent 4d41d9bfb0
commit a4f4fcdd3e
11 changed files with 74 additions and 3 deletions

View file

@ -5,9 +5,13 @@
(#set! injection.language "comment"))
((comment) @injection.content
(#match? @injection.content "/\*!([a-zA-Z]+:)?re2c")
(#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c")
(#set! injection.language "re2c"))
((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"))

View file

@ -4,6 +4,10 @@
((comment) @injection.content
(#set! injection.language "comment"))
((comment) @injection.content
(#lua-match? @injection.content "/[*][!<*][^a-zA-Z]")
(#set! injection.language "doxygen"))
(raw_string_literal
delimiter: (raw_string_delimiter) @injection.language
(raw_string_content) @injection.content)

View file

@ -0,0 +1,38 @@
((tag_name) @keyword
(#set! "priority" 105))
(identifier) @variable
((tag
(tag_name) @_param
(identifier) @parameter)
(#any-of? @_param "@param" "\\param"))
(function (identifier) @function)
(function_link) @function
(emphasis) @text.emphasis
"\\a" @tag
[
"in"
"out"
"inout"
] @storageclass
"~" @operator
[
"<a"
">"
"</a>"
] @tag
[
","
"::"
] @punctuation.delimiter
[ "(" ")" "[" "]" ] @punctuation.bracket

View file

@ -0,0 +1 @@
(document) @indent.auto

View file

@ -0,0 +1,8 @@
((type) @injection.content
(#set! injection.parent))
((function_link) @injection.content
(#set! injection.parent))
((link) @injection.content
(#set! injection.language "html"))

View file

@ -20,5 +20,5 @@
(#set! injection.language "regex")))
((comment) @injection.content
(#match? @injection.content "/\*!([a-zA-Z]+:)?re2c")
(#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c")
(#set! injection.language "re2c"))

View file

@ -3,3 +3,7 @@
(line_comment)
] @injection.content
(#set! injection.language "comment"))
((block_comment) @injection.content
(#lua-match? @injection.content "/[*][!<*][^a-zA-Z]")
(#set! injection.language "doxygen"))

View file

@ -39,5 +39,5 @@
(#set! injection.language "regex"))
((block_comment) @injection.content
(#match? @injection.content "/\*!([a-zA-Z]+:)?re2c")
(#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c")
(#set! injection.language "re2c"))