diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-24 08:07:45 -0400 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-24 08:19:13 -0400 |
| commit | 17a81d7b357a74dcefda331fdacb2742ddc60eac (patch) | |
| tree | 23deae522d249fa25c41abcccadf878972fe8b80 /queries | |
| parent | fix(health): check required neovim version (#4330) (diff) | |
| download | nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar.gz nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar.bz2 nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar.lz nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar.xz nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.tar.zst nvim-treesitter-17a81d7b357a74dcefda331fdacb2742ddc60eac.zip | |
feat(luadoc): add more annotations
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/luadoc/highlights.scm | 29 |
1 files changed, 24 insertions, 5 deletions
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) |
