chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -1,29 +1,20 @@
; Built-ins {{{
((function_call
function: (identifier) @function.builtin)
(#any-of? @function.builtin "chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size" "strcmp" "streq" "substring")
; FIXME: not supported by neovim
; (#is-not? local)
)
(#any-of? @function.builtin "chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size" "strcmp" "streq" "substring"))
((type_identifier) @type.builtin
(#any-of? @type.builtin "int" "string" "Object")
; FIXME: not supported by neovim
; (#is-not? local)
)
(#any-of? @type.builtin "int" "string" "Object"))
((identifier) @variable.builtin
(#eq? @variable.builtin "self")
; FIXME: not supported by neovim
; (#is-not? local)
)
; }}}
(#eq? @variable.builtin "self"))
; }}}
; Keywords {{{
[
"function"
"primitive"
"method"
"function"
"primitive"
"method"
] @keyword.function
[
@ -49,73 +40,79 @@
"then"
"type"
"var"
"class"
"extends"
"_cast"
"_chunks"
"_exp"
"_lvalue"
"_namety"
] @keyword
; }}}
; }}}
; Operators {{{
(operator) @operator
[
","
";"
":"
"."
","
";"
":"
"."
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; }}}
; }}}
; Functions and methods {{{
(function_call
function: (identifier) @function)
(function_declaration
name: (identifier) @function)
(primitive_declaration
name: (identifier) @function)
(method_call
method: (identifier) @function.method)
(method_declaration
name: (identifier) @function.method)
(parameters
name: (identifier) @variable.parameter)
; }}}
; }}}
; Declarations {{{
(import_declaration
file: (string_literal) @string.special.path)
; }}}
; }}}
; Literals {{{
(nil_literal) @constant.builtin
(integer_literal) @number
(string_literal) @string
(escape_sequence) @string.escape
; }}}
(integer_literal) @number
(string_literal) @string
(escape_sequence) @string.escape
; }}}
; Misc {{{
(comment) @comment @spell
(type_identifier) @type
(field_identifier) @property
(identifier) @variable
; }}}
(field_identifier) @property
(identifier) @variable
; }}}
; vim: sw=2 foldmethod=marker