aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lockfile.json2
-rw-r--r--queries/luadoc/highlights.scm29
2 files changed, 25 insertions, 6 deletions
diff --git a/lockfile.json b/lockfile.json
index 1b9bab6d2..4948a4407 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -273,7 +273,7 @@
"revision": "0fc89962b7ff5c7d676b8592c1cbce1ceaa806fd"
},
"luadoc": {
- "revision": "40a67ee798eb3c989fffde0277ff6de740ebaf34"
+ "revision": "5c9572faf56d1fa0f7e0740c94de1c4f67c6af5e"
},
"luap": {
"revision": "bfb38d254f380362e26b5c559a4086ba6e92ba77"
diff --git a/queries/luadoc/highlights.scm b/queries/luadoc/highlights.scm
index c0132c966..ec8bcb765 100644
--- a/queries/luadoc/highlights.scm
+++ b/queries/luadoc/highlights.scm
@@ -1,6 +1,11 @@
; Keywords
[
+ "@module"
+ "@package"
+] @include
+
+[
"@class"
"@type"
"@param"
@@ -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)