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/slint | |
| 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/slint')
| -rw-r--r-- | queries/slint/highlights.scm | 217 | ||||
| -rw-r--r-- | queries/slint/indents.scm | 12 |
2 files changed, 126 insertions, 103 deletions
diff --git a/queries/slint/highlights.scm b/queries/slint/highlights.scm index a4fc7f4f3..673fc643d 100644 --- a/queries/slint/highlights.scm +++ b/queries/slint/highlights.scm @@ -1,154 +1,177 @@ (identifier) @variable + (type_identifier) @type + (comment) @comment @spell + (int_literal) @number + (float_literal) @number.float + (string_literal) @string + (function_identifier) @function + [ -(image_macro) -(children_macro) -(radial_grad_macro) -(linear_grad_macro) + (image_macro) + (children_macro) + (radial_grad_macro) + (linear_grad_macro) ] @function.macro + (call_expression function: (identifier) @function.call) + (call_expression - function: (field_expression - field: (identifier) @function.call)) + function: + (field_expression + field: (identifier) @function.call)) + (vis) @keyword.import + (units) @type + (array_literal (identifier) @type) -(transition_statement state: (identifier) @variable.member) -(state_expression state: (identifier) @variable.member) + +(transition_statement + state: (identifier) @variable.member) + +(state_expression + state: (identifier) @variable.member) + (struct_block_definition (identifier) @variable.member) ; (state_identifier) @variable.member - [ -"in" -"for" + "in" + "for" ] @keyword.repeat "@" @keyword [ -"import" -"from" + "import" + "from" ] @keyword.import [ -"if" -"else" + "if" + "else" ] @keyword.conditional [ -"root" -"parent" -"duration" -"easing" + "root" + "parent" + "duration" + "easing" ] @variable.builtin [ -"true" -"false" + "true" + "false" ] @boolean - [ -"struct" -"property" -"callback" -"in" -"animate" -"states" -"when" -"out" -"transitions" -"global" + "struct" + "property" + "callback" + "in" + "animate" + "states" + "when" + "out" + "transitions" + "global" ] @keyword [ -"black" -"transparent" -"blue" -"ease" -"ease_in" -"ease-in" -"ease_in_out" -"ease-in-out" -"ease_out" -"ease-out" -"end" -"green" -"red" -"red" -"start" -"yellow" -"white" -"gray" + "black" + "transparent" + "blue" + "ease" + "ease_in" + "ease-in" + "ease_in_out" + "ease-in-out" + "ease_out" + "ease-out" + "end" + "green" + "red" + "red" + "start" + "yellow" + "white" + "gray" ] @constant.builtin - ; Punctuation [ -"," -"." -";" -":" + "," + "." + ";" + ":" ] @punctuation.delimiter ; Brackets [ -"(" -")" -"[" -"]" -"{" -"}" + "(" + ")" + "[" + "]" + "{" + "}" ] @punctuation.bracket -(define_property ["<" ">"] @punctuation.bracket) +(define_property + [ + "<" + ">" + ] @punctuation.bracket) [ -"angle" -"bool" -"brush" -"color" -"float" -"image" -"int" -"length" -"percent" -"physical-length" -"physical_length" -"string" + "angle" + "bool" + "brush" + "color" + "float" + "image" + "int" + "length" + "percent" + "physical-length" + "physical_length" + "string" ] @type.builtin [ - ":=" - "<=>" - "!" - "-" - "+" - "*" - "/" - "&&" - "||" - ">" - "<" - ">=" - "<=" - "=" - ":" - "+=" - "-=" - "*=" - "/=" - "?" - "=>" - ] @operator + ":=" + "<=>" + "!" + "-" + "+" + "*" + "/" + "&&" + "||" + ">" + "<" + ">=" + "<=" + "=" + ":" + "+=" + "-=" + "*=" + "/=" + "?" + "=>" +] @operator -(ternary_expression [":" "?"] @keyword.conditional.ternary) +(ternary_expression + [ + ":" + "?" + ] @keyword.conditional.ternary) diff --git a/queries/slint/indents.scm b/queries/slint/indents.scm index db79aa0d5..587a8ecf3 100644 --- a/queries/slint/indents.scm +++ b/queries/slint/indents.scm @@ -1,10 +1,10 @@ [ -(comp_body) -(state_statement) -(transition_statement) -(handler_body) -(consequence_body) -(global_single) + (comp_body) + (state_statement) + (transition_statement) + (handler_body) + (consequence_body) + (global_single) ] @indent.begin "}" @indent.end |
