mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(luadoc): add more annotations
This commit is contained in:
parent
1f087c91f5
commit
17a81d7b35
2 changed files with 25 additions and 6 deletions
|
|
@ -273,7 +273,7 @@
|
|||
"revision": "0fc89962b7ff5c7d676b8592c1cbce1ceaa806fd"
|
||||
},
|
||||
"luadoc": {
|
||||
"revision": "40a67ee798eb3c989fffde0277ff6de740ebaf34"
|
||||
"revision": "5c9572faf56d1fa0f7e0740c94de1c4f67c6af5e"
|
||||
},
|
||||
"luap": {
|
||||
"revision": "bfb38d254f380362e26b5c559a4086ba6e92ba77"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
; Keywords
|
||||
|
||||
[
|
||||
"@module"
|
||||
"@package"
|
||||
] @include
|
||||
|
||||
[
|
||||
"@class"
|
||||
"@type"
|
||||
|
|
@ -10,6 +15,11 @@
|
|||
"@vararg"
|
||||
"@diagnostic"
|
||||
"@deprecated"
|
||||
"@meta"
|
||||
"@source"
|
||||
"@version"
|
||||
"@operator"
|
||||
"@nodiscard"
|
||||
"@cast"
|
||||
"@overload"
|
||||
"@enum"
|
||||
|
|
@ -23,10 +33,17 @@
|
|||
"@async"
|
||||
] @keyword.coroutine
|
||||
|
||||
(language_injection "@language" (identifier) @parameter)
|
||||
(language_injection "@language" (identifier) @keyword)
|
||||
|
||||
(function_type ["fun" "function"] @keyword.function)
|
||||
|
||||
(source_annotation
|
||||
filename: (identifier) @text.uri @string.special
|
||||
extension: (identifier) @text.uri @string.special)
|
||||
|
||||
(version_annotation
|
||||
version: _ @constant.builtin)
|
||||
|
||||
[
|
||||
"@return"
|
||||
] @keyword.return
|
||||
|
|
@ -93,6 +110,8 @@
|
|||
|
||||
; Literals
|
||||
|
||||
(string) @namespace ; only used in @module
|
||||
|
||||
(literal_type) @string
|
||||
|
||||
(number) @number
|
||||
|
|
@ -123,11 +142,11 @@
|
|||
|
||||
(comment) @comment @spell
|
||||
|
||||
(at_comment
|
||||
(identifier) @type
|
||||
(at_comment
|
||||
(identifier) @type
|
||||
(_) @comment @spell)
|
||||
|
||||
(class_at_comment
|
||||
(identifier) @type
|
||||
(class_at_comment
|
||||
(identifier) @type
|
||||
("extends"? (identifier)? @type)
|
||||
(_) @comment @spell)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue