feat(luadoc): add more annotations

This commit is contained in:
Amaan Qureshi 2023-03-24 08:07:45 -04:00
parent 1f087c91f5
commit 17a81d7b35
2 changed files with 25 additions and 6 deletions

View file

@ -273,7 +273,7 @@
"revision": "0fc89962b7ff5c7d676b8592c1cbce1ceaa806fd"
},
"luadoc": {
"revision": "40a67ee798eb3c989fffde0277ff6de740ebaf34"
"revision": "5c9572faf56d1fa0f7e0740c94de1c4f67c6af5e"
},
"luap": {
"revision": "bfb38d254f380362e26b5c559a4086ba6e92ba77"

View file

@ -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)