feat: add @comment.documentation where applicable

This commit is contained in:
Amaan Qureshi 2023-03-02 08:06:35 -05:00
parent 3a82b58745
commit 5a87bc98da
32 changed files with 256 additions and 58 deletions

View file

@ -29,12 +29,10 @@
((identifier) @comment (#match? @comment "^_"))
; Comments
(comment) @comment
(comment) @spell
(comment) @comment @spell
; Strings
(string) @string
(string) @spell
(string) @string @spell
; Modules
(alias) @type
@ -214,15 +212,15 @@
(unary_operator
operator: "@"
operand: (call
target: ((identifier) @_identifier (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) @comment
target: ((identifier) @_identifier (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) @comment.documentation
(arguments [
(string)
(boolean)
(charlist)
(sigil
"~" @comment
((sigil_name) @comment)
quoted_start: _ @comment
(quoted_content) @comment
quoted_end: _ @comment)
] @comment))) @comment
"~" @comment.documentation
((sigil_name) @comment.documentation)
quoted_start: _ @comment.documentation
(quoted_content) @comment.documentation
quoted_end: _ @comment.documentation)
] @comment.documentation))) @comment.documentation