mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -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"
|
"revision": "0fc89962b7ff5c7d676b8592c1cbce1ceaa806fd"
|
||||||
},
|
},
|
||||||
"luadoc": {
|
"luadoc": {
|
||||||
"revision": "40a67ee798eb3c989fffde0277ff6de740ebaf34"
|
"revision": "5c9572faf56d1fa0f7e0740c94de1c4f67c6af5e"
|
||||||
},
|
},
|
||||||
"luap": {
|
"luap": {
|
||||||
"revision": "bfb38d254f380362e26b5c559a4086ba6e92ba77"
|
"revision": "bfb38d254f380362e26b5c559a4086ba6e92ba77"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
||||||
|
[
|
||||||
|
"@module"
|
||||||
|
"@package"
|
||||||
|
] @include
|
||||||
|
|
||||||
[
|
[
|
||||||
"@class"
|
"@class"
|
||||||
"@type"
|
"@type"
|
||||||
|
|
@ -10,6 +15,11 @@
|
||||||
"@vararg"
|
"@vararg"
|
||||||
"@diagnostic"
|
"@diagnostic"
|
||||||
"@deprecated"
|
"@deprecated"
|
||||||
|
"@meta"
|
||||||
|
"@source"
|
||||||
|
"@version"
|
||||||
|
"@operator"
|
||||||
|
"@nodiscard"
|
||||||
"@cast"
|
"@cast"
|
||||||
"@overload"
|
"@overload"
|
||||||
"@enum"
|
"@enum"
|
||||||
|
|
@ -23,10 +33,17 @@
|
||||||
"@async"
|
"@async"
|
||||||
] @keyword.coroutine
|
] @keyword.coroutine
|
||||||
|
|
||||||
(language_injection "@language" (identifier) @parameter)
|
(language_injection "@language" (identifier) @keyword)
|
||||||
|
|
||||||
(function_type ["fun" "function"] @keyword.function)
|
(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"
|
"@return"
|
||||||
] @keyword.return
|
] @keyword.return
|
||||||
|
|
@ -93,6 +110,8 @@
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
|
(string) @namespace ; only used in @module
|
||||||
|
|
||||||
(literal_type) @string
|
(literal_type) @string
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
@ -123,11 +142,11 @@
|
||||||
|
|
||||||
(comment) @comment @spell
|
(comment) @comment @spell
|
||||||
|
|
||||||
(at_comment
|
(at_comment
|
||||||
(identifier) @type
|
(identifier) @type
|
||||||
(_) @comment @spell)
|
(_) @comment @spell)
|
||||||
|
|
||||||
(class_at_comment
|
(class_at_comment
|
||||||
(identifier) @type
|
(identifier) @type
|
||||||
("extends"? (identifier)? @type)
|
("extends"? (identifier)? @type)
|
||||||
(_) @comment @spell)
|
(_) @comment @spell)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue