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

@ -8,6 +8,6 @@
(defvar)
(foreach)
(if)
(let)
(let)
(value_suffix)
] @fold

View file

@ -1,13 +1,10 @@
; Preprocs
(preprocessor_directive) @keyword.directive
; Includes
"include" @keyword.import
; Keywords
[
"assert"
"class"
@ -20,12 +17,9 @@
"defvar"
] @keyword
[
"in"
] @keyword.operator
"in" @keyword.operator
; Conditionals
[
"if"
"else"
@ -33,24 +27,18 @@
] @keyword.conditional
; Repeats
[
"foreach"
] @keyword.repeat
"foreach" @keyword.repeat
; Variables
(identifier) @variable
(var) @variable.builtin
(var) @variable.builtin
; Parameters
(template_arg (identifier) @variable.parameter)
(template_arg
(identifier) @variable.parameter)
; Types
(type) @type
[
@ -63,27 +51,41 @@
"code"
] @type.builtin
(class name: (identifier) @type)
(class
name: (identifier) @type)
(multiclass name: (identifier) @type)
(multiclass
name: (identifier) @type)
(def name: (value (_) @type))
(def
name:
(value
(_) @type))
(defm name: (value (_) @type))
(defm
name:
(value
(_) @type))
(defset name: (identifier) @type)
(defset
name: (identifier) @type)
(parent_class_list (identifier) @type (value (_) @type)?)
(parent_class_list
(identifier) @type
(value
(_) @type)?)
(anonymous_record (identifier) @type)
(anonymous_record
(identifier) @type)
(anonymous_record (value (_) @type))
(anonymous_record
(value
(_) @type))
((identifier) @type
(#lua-match? @type "^_*[A-Z][A-Z0-9_]+$"))
; Fields
(instruction
(identifier) @variable.member)
@ -91,7 +93,6 @@
(identifier) @variable.member)
; Functions
([
(bang_operator)
(cond_operator)
@ -99,7 +100,6 @@
(#set! "priority" 105))
; Operators
[
"="
"#"
@ -109,7 +109,6 @@
] @operator
; Literals
(string) @string
(code) @string.special
@ -121,14 +120,25 @@
(uninitialized_value) @constant.builtin
; Punctuation
[
"{"
"}"
] @punctuation.bracket
[ "{" "}" ] @punctuation.bracket
[
"["
"]"
] @punctuation.bracket
[ "[" "]" ] @punctuation.bracket
[
"("
")"
] @punctuation.bracket
[ "(" ")" ] @punctuation.bracket
[ "<" ">" ] @punctuation.bracket
[
"<"
">"
] @punctuation.bracket
[
"."
@ -136,17 +146,13 @@
";"
] @punctuation.delimiter
[
"!"
] @punctuation.special
"!" @punctuation.special
; Comments
[
(comment)
(multiline_comment)
] @comment @spell
((comment) @keyword.directive
(#lua-match? @keyword.directive "^.*RUN"))

View file

@ -7,7 +7,7 @@
(defvar)
(foreach)
(if)
(let)
(let)
(value_suffix)
] @indent.begin
@ -18,10 +18,22 @@
">"
] @indent.end
[ "{" "}" ] @indent.branch
[
"{"
"}"
] @indent.branch
[ "[" "]" ] @indent.branch
[
"["
"]"
] @indent.branch
[ "(" ")" ] @indent.branch
[
"("
")"
] @indent.branch
[ "<" ">" ] @indent.branch
[
"<"
">"
] @indent.branch

View file

@ -1,5 +1,4 @@
; Scopes
[
(class)
(multiclass)
@ -13,14 +12,12 @@
] @local.scope
; References
[
(var)
(identifier)
] @local.reference
; Definitions
(instruction
(identifier) @local.definition.field)
@ -30,7 +27,8 @@
(include_directive
(string) @local.definition.import)
(template_arg (identifier) @local.definition.parameter)
(template_arg
(identifier) @local.definition.parameter)
(class
name: (identifier) @local.definition.type)
@ -39,10 +37,14 @@
name: (identifier) @local.definition.type)
(def
name: (value (_) @local.definition.type))
name:
(value
(_) @local.definition.type))
(defm
name: (value (_) @local.definition.type))
name:
(value
(_) @local.definition.type))
(defset
name: (identifier) @local.definition.type)