mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,21 +1,21 @@
|
|||
[
|
||||
(let)
|
||||
(binding)
|
||||
(simple_fun)
|
||||
(def)
|
||||
(arglist)
|
||||
(if)
|
||||
(if_condition)
|
||||
(if_then)
|
||||
(elsif_condition)
|
||||
(elsif_then)
|
||||
(if_else)
|
||||
(for)
|
||||
(for_do)
|
||||
(while)
|
||||
(while_do)
|
||||
(try)
|
||||
(try_body)
|
||||
(try_do)
|
||||
(block)
|
||||
(let)
|
||||
(binding)
|
||||
(simple_fun)
|
||||
(def)
|
||||
(arglist)
|
||||
(if)
|
||||
(if_condition)
|
||||
(if_then)
|
||||
(elsif_condition)
|
||||
(elsif_then)
|
||||
(if_else)
|
||||
(for)
|
||||
(for_do)
|
||||
(while)
|
||||
(while_do)
|
||||
(try)
|
||||
(try_body)
|
||||
(try_do)
|
||||
(block)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
(var) @variable
|
||||
|
||||
(op) @operator
|
||||
["and" "or" "not"] @keyword.operator
|
||||
|
||||
[
|
||||
"and"
|
||||
"or"
|
||||
"not"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"def"
|
||||
|
|
@ -41,7 +46,11 @@
|
|||
"try_end"
|
||||
] @keyword.exception
|
||||
|
||||
(inline_if [ "?" ":" ] @keyword.conditional.ternary)
|
||||
(inline_if
|
||||
[
|
||||
"?"
|
||||
":"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
[
|
||||
"%ifdef"
|
||||
|
|
@ -57,8 +66,11 @@
|
|||
|
||||
(encoder_name) @constant.builtin
|
||||
|
||||
(anonymous_argument (var) @variable.parameter)
|
||||
(labeled_argument label: (var) @variable.parameter)
|
||||
(anonymous_argument
|
||||
(var) @variable.parameter)
|
||||
|
||||
(labeled_argument
|
||||
label: (var) @variable.parameter)
|
||||
|
||||
"." @punctuation.delimiter
|
||||
|
||||
|
|
@ -69,17 +81,31 @@
|
|||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
] @punctuation.bracket
|
||||
|
||||
(app
|
||||
name: (var) @function.call)
|
||||
|
||||
(app name: (var) @function.call)
|
||||
(method) @function.method
|
||||
|
||||
(method_app) @function.method.call
|
||||
|
||||
(string) @string
|
||||
(string_interpolation [ "#{" "}" ] @punctuation.special)
|
||||
|
||||
(string_interpolation
|
||||
[
|
||||
"#{"
|
||||
"}"
|
||||
] @punctuation.special)
|
||||
|
||||
(integer) @number
|
||||
|
||||
(float) @number.float
|
||||
|
||||
(bool) @boolean
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(regexp) @string.regexp
|
||||
|
||||
(type) @type
|
||||
|
|
|
|||
|
|
@ -22,33 +22,45 @@
|
|||
"("
|
||||
] @indent.begin
|
||||
|
||||
(ERROR "def") @indent.begin
|
||||
(ERROR
|
||||
"def") @indent.begin
|
||||
|
||||
(def "def_end" @indent.end)
|
||||
(if "if_end" @indent.end)
|
||||
(block "block_end" @indent.end)
|
||||
(for "for_end" @indent.end)
|
||||
(while "while_end" @indent.end)
|
||||
(try "try_end" @indent.end)
|
||||
(def
|
||||
"def_end" @indent.end)
|
||||
|
||||
(if
|
||||
"if_end" @indent.end)
|
||||
|
||||
(block
|
||||
"block_end" @indent.end)
|
||||
|
||||
(for
|
||||
"for_end" @indent.end)
|
||||
|
||||
(while
|
||||
"while_end" @indent.end)
|
||||
|
||||
(try
|
||||
"try_end" @indent.end)
|
||||
|
||||
[
|
||||
"then"
|
||||
"do"
|
||||
"else"
|
||||
"elsif"
|
||||
"catch"
|
||||
"then"
|
||||
"do"
|
||||
"else"
|
||||
"elsif"
|
||||
"catch"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"def_end"
|
||||
"if_end"
|
||||
"block_end"
|
||||
"for_end"
|
||||
"while_end"
|
||||
"try_end"
|
||||
"}"
|
||||
"]"
|
||||
")"
|
||||
"def_end"
|
||||
"if_end"
|
||||
"block_end"
|
||||
"for_end"
|
||||
"while_end"
|
||||
"try_end"
|
||||
"}"
|
||||
"]"
|
||||
")"
|
||||
] @indent.branch @indent.end
|
||||
|
||||
(comment) @indent.auto
|
||||
|
|
|
|||
|
|
@ -1,15 +1,35 @@
|
|||
[(anonymous_function) (binding) (def) (let)] @local.scope
|
||||
[
|
||||
(anonymous_function)
|
||||
(binding)
|
||||
(def)
|
||||
(let)
|
||||
] @local.scope
|
||||
|
||||
(anonymous_argument (var) @local.definition.parameter)
|
||||
(labeled_argument label: (var) @local.definition.parameter)
|
||||
(anonymous_argument
|
||||
(var) @local.definition.parameter)
|
||||
|
||||
(labeled_argument
|
||||
label: (var) @local.definition.parameter)
|
||||
|
||||
(binding
|
||||
defined: (var) @local.definition.var)
|
||||
(def defined: (var) @local.definition.var)
|
||||
(let defined: (var) @local.definition.var)
|
||||
(meth_pattern (var) @local.definition.var)
|
||||
(list_pattern (var) @local.definition.var)
|
||||
(tuple_pattern (var) @local.definition.var)
|
||||
(spread (var) @local.definition.var)
|
||||
|
||||
(def
|
||||
defined: (var) @local.definition.var)
|
||||
|
||||
(let
|
||||
defined: (var) @local.definition.var)
|
||||
|
||||
(meth_pattern
|
||||
(var) @local.definition.var)
|
||||
|
||||
(list_pattern
|
||||
(var) @local.definition.var)
|
||||
|
||||
(tuple_pattern
|
||||
(var) @local.definition.var)
|
||||
|
||||
(spread
|
||||
(var) @local.definition.var)
|
||||
|
||||
(var) @local.reference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue