mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,32 +1,90 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
["if" "elif"] @keyword.conditional
|
||||
(if (else "else" @keyword.conditional))
|
||||
[
|
||||
"if"
|
||||
"elif"
|
||||
] @keyword.conditional
|
||||
|
||||
["while" "for"] @keyword.repeat
|
||||
(while (else "else" @keyword.repeat))
|
||||
(for (else "else" @keyword.repeat))
|
||||
(if
|
||||
(else
|
||||
"else" @keyword.conditional))
|
||||
|
||||
["try" "catch" "finally"] @keyword.exception
|
||||
(try (else "else" @keyword.exception))
|
||||
[
|
||||
"while"
|
||||
"for"
|
||||
] @keyword.repeat
|
||||
|
||||
(while
|
||||
(else
|
||||
"else" @keyword.repeat))
|
||||
|
||||
(for
|
||||
(else
|
||||
"else" @keyword.repeat))
|
||||
|
||||
[
|
||||
"try"
|
||||
"catch"
|
||||
"finally"
|
||||
] @keyword.exception
|
||||
|
||||
(try
|
||||
(else
|
||||
"else" @keyword.exception))
|
||||
|
||||
"use" @keyword.import
|
||||
(import (bareword) @string.special.path)
|
||||
|
||||
(wildcard ["*" "**" "?"] @character.special)
|
||||
(import
|
||||
(bareword) @string.special.path)
|
||||
|
||||
(wildcard
|
||||
[
|
||||
"*"
|
||||
"**"
|
||||
"?"
|
||||
] @character.special)
|
||||
|
||||
(command
|
||||
argument: (bareword) @variable.parameter)
|
||||
|
||||
(command
|
||||
head: (identifier) @function.call)
|
||||
|
||||
((command
|
||||
head: (identifier) @keyword.return)
|
||||
(#eq? @keyword.return "return"))
|
||||
|
||||
((command
|
||||
(identifier) @keyword.operator)
|
||||
(#any-of? @keyword.operator "and" "or" "coalesce"))
|
||||
|
||||
(command argument: (bareword) @variable.parameter)
|
||||
(command head: (identifier) @function.call)
|
||||
((command head: (identifier) @keyword.return)
|
||||
(#eq? @keyword.return "return"))
|
||||
((command (identifier) @keyword.operator)
|
||||
(#any-of? @keyword.operator "and" "or" "coalesce"))
|
||||
[
|
||||
"+" "-" "*" "/" "%" "<" "<=""==" "!=" ">"
|
||||
">=" "<s" "<=s" "==s" "!=s" ">s" ">=s"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"<"
|
||||
"<="
|
||||
"=="
|
||||
"!="
|
||||
">"
|
||||
">="
|
||||
"<s"
|
||||
"<=s"
|
||||
"==s"
|
||||
"!=s"
|
||||
">s"
|
||||
">=s"
|
||||
] @function.builtin
|
||||
|
||||
[">" "<" ">>" "<>" "|"] @operator
|
||||
[
|
||||
">"
|
||||
"<"
|
||||
">>"
|
||||
"<>"
|
||||
"|"
|
||||
] @operator
|
||||
|
||||
(io_port) @number
|
||||
|
||||
|
|
@ -35,36 +93,63 @@
|
|||
(identifier) @function)
|
||||
|
||||
(parameter_list) @variable.parameter
|
||||
(parameter_list "|" @punctuation.bracket)
|
||||
|
||||
["var" "set" "tmp" "del"] @keyword
|
||||
(parameter_list
|
||||
"|" @punctuation.bracket)
|
||||
|
||||
[
|
||||
"var"
|
||||
"set"
|
||||
"tmp"
|
||||
"del"
|
||||
] @keyword
|
||||
|
||||
(variable_declaration
|
||||
(lhs (identifier) @variable))
|
||||
(lhs
|
||||
(identifier) @variable))
|
||||
|
||||
(variable_assignment
|
||||
(lhs (identifier) @variable))
|
||||
(lhs
|
||||
(identifier) @variable))
|
||||
|
||||
(temporary_assignment
|
||||
(lhs (identifier) @variable))
|
||||
(lhs
|
||||
(identifier) @variable))
|
||||
|
||||
(variable_deletion
|
||||
(identifier) @variable)
|
||||
|
||||
|
||||
(number) @number
|
||||
|
||||
(string) @string
|
||||
|
||||
(variable (identifier) @variable)
|
||||
((variable (identifier) @function)
|
||||
(#match? @function ".+\\~$"))
|
||||
((variable (identifier) @boolean)
|
||||
(#any-of? @boolean "true" "false"))
|
||||
((variable (identifier) @constant.builtin)
|
||||
(#any-of? @constant.builtin
|
||||
"_" "after-chdir" "args" "before-chdir" "buildinfo" "nil"
|
||||
"notify-bg-job-success" "num-bg-jobs" "ok" "paths" "pid"
|
||||
"pwd" "value-out-indicator" "version"))
|
||||
(variable
|
||||
(identifier) @variable)
|
||||
|
||||
((variable
|
||||
(identifier) @function)
|
||||
(#match? @function ".+\\~$"))
|
||||
|
||||
((variable
|
||||
(identifier) @boolean)
|
||||
(#any-of? @boolean "true" "false"))
|
||||
|
||||
((variable
|
||||
(identifier) @constant.builtin)
|
||||
(#any-of? @constant.builtin "_" "after-chdir" "args" "before-chdir" "buildinfo" "nil" "notify-bg-job-success" "num-bg-jobs" "ok" "paths" "pid" "pwd" "value-out-indicator" "version"))
|
||||
|
||||
[
|
||||
"$"
|
||||
"@"
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
["$" "@"] @punctuation.special
|
||||
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||
";" @punctuation.delimiter
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue