mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
feat: add @comment.documentation where applicable
This commit is contained in:
parent
3a82b58745
commit
5a87bc98da
32 changed files with 256 additions and 58 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue