diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2024-01-06 15:05:50 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-19 16:58:37 +0100 |
| commit | 57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch) | |
| tree | 70bf645539882b88e6fa129cefd30986b89bbac3 /queries/luadoc | |
| parent | ci: add query lint job (diff) | |
| download | nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2 nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip | |
chore: query formatting
Diffstat (limited to 'queries/luadoc')
| -rw-r--r-- | queries/luadoc/highlights.scm | 95 |
1 files changed, 57 insertions, 38 deletions
diff --git a/queries/luadoc/highlights.scm b/queries/luadoc/highlights.scm index 3555039dc..a73fefd27 100644 --- a/queries/luadoc/highlights.scm +++ b/queries/luadoc/highlights.scm @@ -1,5 +1,4 @@ ; Keywords - [ "@module" "@package" @@ -29,13 +28,17 @@ (diagnostic_identifier) ] @keyword -[ - "@async" -] @keyword.coroutine +"@async" @keyword.coroutine -(language_injection "@language" (identifier) @keyword) +(language_injection + "@language" + (identifier) @keyword) -(function_type ["fun" "function"] @keyword.function) +(function_type + [ + "fun" + "function" + ] @keyword.function) (source_annotation filename: (identifier) @string.special.path @@ -44,12 +47,9 @@ (version_annotation version: _ @constant.builtin) -[ - "@return" -] @keyword.return +"@return" @keyword.return ; Qualifiers - [ "public" "protected" @@ -59,9 +59,7 @@ "@private" ] @type.qualifier - ; Variables - (identifier) @variable [ @@ -70,46 +68,56 @@ ] @variable.builtin ; Macros - -(alias_annotation (identifier) @function.macro) +(alias_annotation + (identifier) @function.macro) ; Parameters +(param_annotation + (identifier) @variable.parameter) -(param_annotation (identifier) @variable.parameter) - -(parameter (identifier) @variable.parameter) +(parameter + (identifier) @variable.parameter) ; Fields +(field_annotation + (identifier) @variable.member) -(field_annotation (identifier) @variable.member) - -(table_literal_type field: (identifier) @variable.member) +(table_literal_type + field: (identifier) @variable.member) -(member_type ["#" "."] . (identifier) @variable.member) +(member_type + [ + "#" + "." + ] + . + (identifier) @variable.member) ; Types - -(table_type "table" @type.builtin) +(table_type + "table" @type.builtin) (builtin_type) @type.builtin -(class_annotation (identifier) @type) +(class_annotation + (identifier) @type) -(enum_annotation (identifier) @type) +(enum_annotation + (identifier) @type) -((array_type ["[" "]"] @type) +((array_type + [ + "[" + "]" + ] @type) (#set! "priority" 105)) (type) @type ; Operators - -[ - "|" -] @operator +"|" @operator ; Literals - (string) @module ; only used in @module (literal_type) @string @@ -117,14 +125,25 @@ (number) @number ; Punctuation +[ + "[" + "]" +] @punctuation.bracket -[ "[" "]" ] @punctuation.bracket - -[ "{" "}" ] @punctuation.bracket +[ + "{" + "}" +] @punctuation.bracket -[ "(" ")" ] @punctuation.bracket +[ + "(" + ")" +] @punctuation.bracket -[ "<" ">" ] @punctuation.bracket +[ + "<" + ">" +] @punctuation.bracket [ "," @@ -139,7 +158,6 @@ ] @punctuation.special ; Comments - (comment) @comment @spell (at_comment @@ -148,5 +166,6 @@ (class_at_comment (identifier) @type - ("extends"? (identifier)? @type) + ("extends"? + (identifier)? @type) (_) @comment @spell) |
