aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhạm Huy Hoàng <hoangtun0810@gmail.com>2024-01-21 22:05:44 +0900
committerPhạm Huy Hoàng <hoangtun0810@gmail.com>2024-01-21 23:55:02 +0900
commit77e298e4de607d69aa7f37dc6dcba6aee131ac7f (patch)
treee3342d2c5b5244c13ee40c1ccc080192335ec277
parentfix(format-scripts): remove parens if possible (diff)
downloadnvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.gz
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.bz2
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.lz
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.xz
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.zst
nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.zip
chore: format queries
-rw-r--r--queries/apex/highlights.scm4
-rw-r--r--queries/bitbake/locals.scm4
-rw-r--r--queries/c/highlights.scm4
-rw-r--r--queries/c/indents.scm4
-rw-r--r--queries/cmake/indents.scm4
-rw-r--r--queries/comment/highlights.scm2
-rw-r--r--queries/cpon/highlights.scm2
-rw-r--r--queries/cpp/highlights.scm4
-rw-r--r--queries/css/indents.scm4
-rw-r--r--queries/dart/highlights.scm2
-rw-r--r--queries/doxygen/injections.scm4
-rw-r--r--queries/dtd/highlights.scm4
-rw-r--r--queries/ecma/highlights.scm4
-rw-r--r--queries/ecma/injections.scm3
-rw-r--r--queries/ecma/locals.scm4
-rw-r--r--queries/elixir/highlights.scm6
-rw-r--r--queries/gdscript/locals.scm4
-rw-r--r--queries/gitattributes/highlights.scm4
-rw-r--r--queries/haskell/highlights.scm42
-rw-r--r--queries/haskell/injections.scm20
-rw-r--r--queries/html_tags/injections.scm10
-rw-r--r--queries/javascript/locals.scm4
-rw-r--r--queries/jq/highlights.scm2
-rw-r--r--queries/json/highlights.scm2
-rw-r--r--queries/jsx/highlights.scm12
-rw-r--r--queries/jsx/indents.scm2
-rw-r--r--queries/kotlin/highlights.scm10
-rw-r--r--queries/lalrpop/highlights.scm2
-rw-r--r--queries/latex/highlights.scm2
-rw-r--r--queries/ledger/highlights.scm2
-rw-r--r--queries/nim/highlights.scm4
-rw-r--r--queries/perl/highlights.scm4
-rw-r--r--queries/php_only/injections.scm8
-rw-r--r--queries/python/locals.scm4
-rwxr-xr-xqueries/r/highlights.scm8
-rw-r--r--queries/r/indents.scm4
-rw-r--r--queries/rust/injections.scm3
-rw-r--r--queries/scala/highlights.scm10
-rw-r--r--queries/scala/locals.scm3
-rw-r--r--queries/sql/highlights.scm4
-rw-r--r--queries/swift/indents.scm4
-rw-r--r--queries/teal/locals.scm4
-rw-r--r--queries/tlaplus/highlights.scm16
-rw-r--r--queries/tlaplus/locals.scm6
-rw-r--r--queries/typescript/highlights.scm4
-rw-r--r--queries/usd/highlights.scm4
-rw-r--r--queries/v/locals.scm8
-rw-r--r--queries/vue/injections.scm8
-rw-r--r--queries/wgsl_bevy/highlights.scm2
-rw-r--r--queries/zig/folds.scm4
50 files changed, 143 insertions, 146 deletions
diff --git a/queries/apex/highlights.scm b/queries/apex/highlights.scm
index 2cddf4684..ef264064d 100644
--- a/queries/apex/highlights.scm
+++ b/queries/apex/highlights.scm
@@ -57,8 +57,8 @@
(type_arguments
">" @punctuation.delimiter)
-((field_access
- object: (identifier) @type))
+(field_access
+ object: (identifier) @type)
(field_access
field: (identifier) @property)
diff --git a/queries/bitbake/locals.scm b/queries/bitbake/locals.scm
index 0f572584b..edee8b30b 100644
--- a/queries/bitbake/locals.scm
+++ b/queries/bitbake/locals.scm
@@ -11,12 +11,12 @@
(import_statement
name:
(dotted_name
- ((python_identifier) @local.definition.import)))
+ (python_identifier) @local.definition.import))
(import_from_statement
name:
(dotted_name
- ((python_identifier) @local.definition.import)))
+ (python_identifier) @local.definition.import))
; Function with parameters, defines parameters
(parameters
diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm
index c848f68dc..81dc19f91 100644
--- a/queries/c/highlights.scm
+++ b/queries/c/highlights.scm
@@ -232,10 +232,10 @@
(argument_list
(identifier) @variable.builtin))
-((attribute_specifier
+(attribute_specifier
(argument_list
(call_expression
- function: (identifier) @variable.builtin))))
+ function: (identifier) @variable.builtin)))
((call_expression
function: (identifier) @function.builtin)
diff --git a/queries/c/indents.scm b/queries/c/indents.scm
index 82660f20f..0a85373f4 100644
--- a/queries/c/indents.scm
+++ b/queries/c/indents.scm
@@ -42,7 +42,7 @@
condition: (_) @indent.begin)
; Supports if without braces (but not both if-else without braces)
-((if_statement
+(if_statement
consequence:
(_
";" @indent.end) @_consequence
@@ -55,7 +55,7 @@
(compound_statement) @indent.dedent)? @indent.dedent
(compound_statement)? @indent.dedent
(_)? @indent.dedent
- ])?) @indent.begin)
+ ])?) @indent.begin
(else_clause
(_
diff --git a/queries/cmake/indents.scm b/queries/cmake/indents.scm
index e7f326b00..cbd976c7a 100644
--- a/queries/cmake/indents.scm
+++ b/queries/cmake/indents.scm
@@ -19,8 +19,8 @@
(endblock_command)
] @indent.branch
-(")" @indent.branch)
+")" @indent.branch
-(")" @indent.end)
+")" @indent.end
(argument_list) @indent.auto
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm
index 1c663735b..14dbdefc7 100644
--- a/queries/comment/highlights.scm
+++ b/queries/comment/highlights.scm
@@ -46,4 +46,4 @@
("text" @number
(#lua-match? @number "^#[0-9]+$"))
-((uri) @string.special.url @nospell)
+(uri) @string.special.url @nospell
diff --git a/queries/cpon/highlights.scm b/queries/cpon/highlights.scm
index 15240d7ae..9cc438ea5 100644
--- a/queries/cpon/highlights.scm
+++ b/queries/cpon/highlights.scm
@@ -47,7 +47,7 @@
">"
] @punctuation.bracket
-(("\"" @string)
+("\"" @string
(#set! conceal ""))
; Comments
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm
index cb8f9c3f3..883c26faa 100644
--- a/queries/cpp/highlights.scm
+++ b/queries/cpp/highlights.scm
@@ -16,8 +16,8 @@
declarator: (_) @variable.parameter)
;(field_expression) @variable.parameter ;; How to highlight this?
-(((field_expression
- (field_identifier) @function.method)) @_parent
+((field_expression
+ (field_identifier) @function.method) @_parent
(#has-parent? @_parent template_method function_declarator))
(field_declaration
diff --git a/queries/css/indents.scm b/queries/css/indents.scm
index 8385bfc82..75e4a63a9 100644
--- a/queries/css/indents.scm
+++ b/queries/css/indents.scm
@@ -4,8 +4,8 @@
] @indent.begin
(block
- ("}") @indent.branch)
+ "}" @indent.branch)
-("}") @indent.dedent
+"}" @indent.dedent
(comment) @indent.ignore
diff --git a/queries/dart/highlights.scm b/queries/dart/highlights.scm
index be38a15ca..ada4d212c 100644
--- a/queries/dart/highlights.scm
+++ b/queries/dart/highlights.scm
@@ -123,7 +123,7 @@
((identifier) @type
(#lua-match? @type "^_?[%u].*[%l]")) ; catch Classes or IClasses not CLASSES
-("Function" @type)
+"Function" @type
; properties
(unconditional_assignable_selector
diff --git a/queries/doxygen/injections.scm b/queries/doxygen/injections.scm
index e0eff433a..994f535ad 100644
--- a/queries/doxygen/injections.scm
+++ b/queries/doxygen/injections.scm
@@ -10,6 +10,6 @@
((link) @injection.content
(#set! injection.language "html"))
-((code_block
+(code_block
(code_block_language) @injection.language
- (code_block_content) @injection.content))
+ (code_block_content) @injection.content)
diff --git a/queries/dtd/highlights.scm b/queries/dtd/highlights.scm
index 12a2093d1..fb98391b3 100644
--- a/queries/dtd/highlights.scm
+++ b/queries/dtd/highlights.scm
@@ -65,11 +65,11 @@
"NOTATION" @keyword.directive
(Name) @label)
-((NotationDecl
+(NotationDecl
(ExternalID
(SystemLiteral
(URI) @string.special.url))
- (#set! "priority" 105)))
+ (#set! "priority" 105))
; Attlist declaration
(AttlistDecl
diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm
index 8e62fd1f6..4156222cb 100644
--- a/queries/ecma/highlights.scm
+++ b/queries/ecma/highlights.scm
@@ -283,11 +283,11 @@
"}"
] @punctuation.bracket
-((template_substitution
+(template_substitution
[
"${"
"}"
- ] @punctuation.special) @none)
+ ] @punctuation.special) @none
; Keywords
;----------
diff --git a/queries/ecma/injections.scm b/queries/ecma/injections.scm
index 9421d8113..51eb22a7e 100644
--- a/queries/ecma/injections.scm
+++ b/queries/ecma/injections.scm
@@ -7,8 +7,7 @@
; html(`...`), html`...`, sql(...) etc
(call_expression
- function:
- ((identifier) @injection.language)
+ function: (identifier) @injection.language
arguments:
[
(arguments
diff --git a/queries/ecma/locals.scm b/queries/ecma/locals.scm
index 54da79335..24297940c 100644
--- a/queries/ecma/locals.scm
+++ b/queries/ecma/locals.scm
@@ -28,11 +28,11 @@
(identifier) @local.definition.import)
(function_declaration
- ((identifier) @local.definition.function)
+ (identifier) @local.definition.function
(#set! definition.var.scope parent))
(method_definition
- ((property_identifier) @local.definition.function)
+ (property_identifier) @local.definition.function
(#set! definition.var.scope parent))
; References
diff --git a/queries/elixir/highlights.scm b/queries/elixir/highlights.scm
index 4f1057f48..9b4555a6f 100644
--- a/queries/elixir/highlights.scm
+++ b/queries/elixir/highlights.scm
@@ -176,7 +176,7 @@
; Non-String Sigils
(sigil
"~" @string.special
- ((sigil_name) @string.special) @_sigil_name
+ (sigil_name) @string.special @_sigil_name
quoted_start: _ @string.special
quoted_end: _ @string.special
((sigil_modifiers) @string.special)?
@@ -185,7 +185,7 @@
; String Sigils
(sigil
"~" @string
- ((sigil_name) @string) @_sigil_name
+ (sigil_name) @string @_sigil_name
quoted_start: _ @string
(quoted_content) @string
quoted_end: _ @string
@@ -217,7 +217,7 @@
(charlist)
(sigil
"~" @comment.documentation
- ((sigil_name) @comment.documentation)
+ (sigil_name) @comment.documentation
quoted_start: _ @comment.documentation
(quoted_content) @comment.documentation
quoted_end: _ @comment.documentation)
diff --git a/queries/gdscript/locals.scm b/queries/gdscript/locals.scm
index 83a1b4433..796ec1876 100644
--- a/queries/gdscript/locals.scm
+++ b/queries/gdscript/locals.scm
@@ -105,8 +105,8 @@
(#set! "definition.method.scope" "parent"))
; Enum
-((enum_definition
- (name) @local.definition.enum))
+(enum_definition
+ (name) @local.definition.enum)
; Repeat
(for_statement
diff --git a/queries/gitattributes/highlights.scm b/queries/gitattributes/highlights.scm
index bc2e02e88..aec7750f6 100644
--- a/queries/gitattributes/highlights.scm
+++ b/queries/gitattributes/highlights.scm
@@ -1,7 +1,7 @@
(dir_sep) @punctuation.delimiter
(quoted_pattern
- ("\"" @punctuation.special))
+ "\"" @punctuation.special)
(range_notation) @string.special
@@ -18,7 +18,7 @@
(character_class) @constant
(class_range
- ("-" @operator))
+ "-" @operator)
[
(ansi_c_escape)
diff --git a/queries/haskell/highlights.scm b/queries/haskell/highlights.scm
index 1a3cfd485..ce18f98a3 100644
--- a/queries/haskell/highlights.scm
+++ b/queries/haskell/highlights.scm
@@ -277,7 +277,7 @@
(pat_view
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
]))
@@ -293,14 +293,14 @@
; partially applied infix functions (sections) also get highlighted as operators
(exp_section_right
[
- ((variable) @operator)
+ (variable) @operator
(qualified_variable
(variable) @operator)
])
(exp_section_left
[
- ((variable) @operator)
+ (variable) @operator
(qualified_variable
(variable) @operator)
])
@@ -310,7 +310,7 @@
(exp_infix
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
((module) @module
(variable) @function.call))
@@ -328,7 +328,7 @@
.
(exp_name
[
- ((variable) @variable)
+ (variable) @variable
(qualified_variable
(variable) @variable)
]))
@@ -336,7 +336,7 @@
; function calls with infix operators
((exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
])
@@ -353,7 +353,7 @@
.
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
]))
@@ -364,7 +364,7 @@
; function composition, arrows, monadic composition (lhs)
((exp_name
[
- ((variable) @function)
+ (variable) @function
(qualified_variable
(variable) @function)
])
@@ -381,7 +381,7 @@
.
(exp_name
[
- ((variable) @function)
+ (variable) @function
(qualified_variable
(variable) @function)
]))
@@ -394,7 +394,7 @@
.
(exp_name
[
- ((variable) @function)
+ (variable) @function
(qualified_variable
(variable) @function)
])
@@ -415,7 +415,7 @@
(exp_apply
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
]))
@@ -428,7 +428,7 @@
(exp_infix
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
])
@@ -444,7 +444,7 @@
.
(exp_name
[
- ((variable) @function.call)
+ (variable) @function.call
(qualified_variable
(variable) @function.call)
]))))
@@ -455,7 +455,7 @@
.
(exp_name
[
- ((variable) @variable)
+ (variable) @variable
(qualified_variable
(variable) @variable)
]))
@@ -493,9 +493,9 @@
; signatures that have a function type
; + functions that follow them
-((signature
+(signature
(variable) @function
- (fun)))
+ (fun))
((signature
(variable) @_type
@@ -505,10 +505,10 @@
(variable) @function)
(#eq? @function @_type))
-((signature
+(signature
(variable) @function
(context
- (fun))))
+ (fun)))
((signature
(variable) @_type
@@ -570,8 +570,8 @@
(quasiquote_body) @string)
(quasiquote
- ((_
- (variable) @_name))
+ (_
+ (variable) @_name)
(#eq? @_name "qq")
(quasiquote_body) @string)
@@ -613,7 +613,7 @@
(exp_field
field:
[
- ((variable) @variable.member)
+ (variable) @variable.member
(qualified_variable
(variable) @variable.member)
])
diff --git a/queries/haskell/injections.scm b/queries/haskell/injections.scm
index d1c8fe5fb..59fe73357 100644
--- a/queries/haskell/injections.scm
+++ b/queries/haskell/injections.scm
@@ -1,8 +1,8 @@
; -----------------------------------------------------------------------------
; General language injection
(quasiquote
- ((quoter) @injection.language)
- ((quasiquote_body) @injection.content))
+ (quoter) @injection.language
+ (quasiquote_body) @injection.content)
((comment) @injection.content
(#set! injection.language "comment"))
@@ -21,28 +21,28 @@
(quasiquote
(quoter) @_name
(#any-of? @_name "cassius" "lucius")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "css"))
; HTML: Text.Hamlet
(quasiquote
(quoter) @_name
(#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "html"))
; JS: Text.Julius
(quasiquote
(quoter) @_name
(#any-of? @_name "js" "julius")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "javascript"))
; TS: Text.TypeScript
(quasiquote
(quoter) @_name
(#any-of? @_name "tsc" "tscJSX")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "typescript"))
; -----------------------------------------------------------------------------
@@ -50,7 +50,7 @@
(quasiquote
(quoter) @_name
(#eq? @_name "hsx")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "html"))
; -----------------------------------------------------------------------------
@@ -58,7 +58,7 @@
(quasiquote
(quoter) @_name
(#eq? @_name "aesonQQ")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "json"))
; -----------------------------------------------------------------------------
@@ -67,10 +67,10 @@
(quasiquote
(quoter) @injection.language
(#eq? @injection.language "sql")
- ((quasiquote_body) @injection.content))
+ (quasiquote_body) @injection.content)
(quasiquote
(quoter) @_name
(#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith")
- ((quasiquote_body) @injection.content)
+ (quasiquote_body) @injection.content
(#set! injection.language "haskell_persistent"))
diff --git a/queries/html_tags/injections.scm b/queries/html_tags/injections.scm
index 945084693..7c9c835ef 100644
--- a/queries/html_tags/injections.scm
+++ b/queries/html_tags/injections.scm
@@ -35,11 +35,11 @@
; <script type="mimetype-or-well-known-script-type">
(script_element
(start_tag
- ((attribute
+ (attribute
(attribute_name) @_attr
(#eq? @_attr "type")
(quoted_attribute_value
- (attribute_value) @_type))))
+ (attribute_value) @_type)))
(raw_text) @injection.content
(#set-lang-from-mimetype! @_type))
@@ -72,14 +72,14 @@
(_
(tag_name) @_tagname
(#eq? @_tagname "input")
- ((attribute
+ (attribute
(attribute_name) @_attr
[
(quoted_attribute_value
(attribute_value) @injection.content)
(attribute_value) @injection.content
]
- (#eq? @_attr "pattern")))
+ (#eq? @_attr "pattern"))
(#set! injection.language "regex")))
; <input type="checkbox" onchange="this.closest('form').elements.output.value = this.checked">
@@ -101,7 +101,7 @@
((attribute_name) @_name
(#lua-match? @_name "^%*"))
(quoted_attribute_value
- ((attribute_value) @injection.content))
+ (attribute_value) @injection.content)
(#set! injection.language "angular"))
(element
diff --git a/queries/javascript/locals.scm b/queries/javascript/locals.scm
index 8c8d82363..36c14db91 100644
--- a/queries/javascript/locals.scm
+++ b/queries/javascript/locals.scm
@@ -58,10 +58,10 @@
; baz(y) { y }
; }
(method_definition
- ([
+ [
(property_identifier)
(private_property_identifier)
- ] @local.definition.function)
+ ] @local.definition.function
(#set! definition.var.scope parent))
; this.foo()
diff --git a/queries/jq/highlights.scm b/queries/jq/highlights.scm
index d9a9a5f87..2fdcb9468 100644
--- a/queries/jq/highlights.scm
+++ b/queries/jq/highlights.scm
@@ -28,7 +28,7 @@
"false"
] @boolean
-("null") @type.builtin
+"null" @type.builtin
; Interpolation
[
diff --git a/queries/json/highlights.scm b/queries/json/highlights.scm
index ce5be98ae..85915285a 100644
--- a/queries/json/highlights.scm
+++ b/queries/json/highlights.scm
@@ -28,7 +28,7 @@
"}"
] @punctuation.bracket
-(("\"" @conceal)
+("\"" @conceal
(#set! conceal ""))
(escape_sequence) @string.escape
diff --git a/queries/jsx/highlights.scm b/queries/jsx/highlights.scm
index d99ae62ec..7f7177f83 100644
--- a/queries/jsx/highlights.scm
+++ b/queries/jsx/highlights.scm
@@ -38,9 +38,9 @@
; Handle the dot operator effectively - <My.Component>
(jsx_opening_element
- ((member_expression
+ (member_expression
(identifier) @tag
- (property_identifier) @constructor)))
+ (property_identifier) @constructor))
(jsx_closing_element
((identifier) @constructor
@@ -48,9 +48,9 @@
; Handle the dot operator effectively - </My.Component>
(jsx_closing_element
- ((member_expression
+ (member_expression
(identifier) @tag
- (property_identifier) @constructor)))
+ (property_identifier) @constructor))
(jsx_self_closing_element
((identifier) @constructor
@@ -58,8 +58,8 @@
; Handle the dot operator effectively - <My.Component />
(jsx_self_closing_element
- ((member_expression
+ (member_expression
(identifier) @tag
- (property_identifier) @constructor)))
+ (property_identifier) @constructor))
(jsx_text) @none
diff --git a/queries/jsx/indents.scm b/queries/jsx/indents.scm
index eed9afeba..812bc255d 100644
--- a/queries/jsx/indents.scm
+++ b/queries/jsx/indents.scm
@@ -5,7 +5,7 @@
] @indent.begin
(jsx_closing_element
- (">" @indent.end))
+ ">" @indent.end)
(jsx_self_closing_element
"/>" @indent.end)
diff --git a/queries/kotlin/highlights.scm b/queries/kotlin/highlights.scm
index b09cb75b9..e75a7e96f 100644
--- a/queries/kotlin/highlights.scm
+++ b/queries/kotlin/highlights.scm
@@ -92,22 +92,22 @@
(simple_identifier) @function)
(getter
- ("get") @function.builtin)
+ "get" @function.builtin)
(setter
- ("set") @function.builtin)
+ "set" @function.builtin)
(primary_constructor) @constructor
(secondary_constructor
- ("constructor") @constructor)
+ "constructor" @constructor)
(constructor_invocation
(user_type
(type_identifier) @constructor))
(anonymous_initializer
- ("init") @constructor)
+ "init" @constructor)
(parameter
(simple_identifier) @variable.parameter)
@@ -182,7 +182,7 @@
; - "[abc]?".toRegex()
(call_expression
(navigation_expression
- ((string_literal) @string.regexp)
+ (string_literal) @string.regexp
(navigation_suffix
((simple_identifier) @_function
(#eq? @_function "toRegex")))))
diff --git a/queries/lalrpop/highlights.scm b/queries/lalrpop/highlights.scm
index 450e657b4..58d7efd4f 100644
--- a/queries/lalrpop/highlights.scm
+++ b/queries/lalrpop/highlights.scm
@@ -45,7 +45,7 @@
(bare_symbol
(macro
- ((macro_id) @type.definition)))
+ (macro_id) @type.definition))
(bare_symbol
(identifier) @type.definition)
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index 47c923ee6..f1a8c814f 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -193,7 +193,7 @@
command: _ @module
authors:
(curly_group_author_list
- ((author)+ @markup.heading.1)))
+ (author)+ @markup.heading.1))
(chapter
command: _ @module
diff --git a/queries/ledger/highlights.scm b/queries/ledger/highlights.scm
index cdf8f6bb9..5198ad888 100644
--- a/queries/ledger/highlights.scm
+++ b/queries/ledger/highlights.scm
@@ -25,7 +25,7 @@
(check_out)
] @markup.raw
-((account) @variable.member)
+(account) @variable.member
"include" @keyword.import
diff --git a/queries/nim/highlights.scm b/queries/nim/highlights.scm
index d868be072..0eb0f8b46 100644
--- a/queries/nim/highlights.scm
+++ b/queries/nim/highlights.scm
@@ -629,7 +629,7 @@
; NOTE: needs to be after @type
; generic types when declaring
-((generic_parameter_list
+(generic_parameter_list
(parameter_declaration
(symbol_declaration_list
(symbol_declaration
@@ -638,7 +638,7 @@
(identifier) @variable.parameter
(accent_quoted
(identifier) @variable.parameter)
- ])))))
+ ]))))
; for loop variables
(for
diff --git a/queries/perl/highlights.scm b/queries/perl/highlights.scm
index 9318b11a7..4a50cd7c0 100644
--- a/queries/perl/highlights.scm
+++ b/queries/perl/highlights.scm
@@ -244,12 +244,12 @@
(comment) @comment
-([
+[
"=>"
","
";"
"->"
-] @punctuation.delimiter)
+] @punctuation.delimiter
([
"["
diff --git a/queries/php_only/injections.scm b/queries/php_only/injections.scm
index 70f693853..828eb9d38 100644
--- a/queries/php_only/injections.scm
+++ b/queries/php_only/injections.scm
@@ -1,17 +1,17 @@
((comment) @injection.content
(#set! injection.language "phpdoc"))
-((heredoc
+(heredoc
(heredoc_body) @injection.content
(heredoc_end) @injection.language
(#set! injection.include-children)
- (#downcase! @injection.language)))
+ (#downcase! @injection.language))
-((nowdoc
+(nowdoc
(nowdoc_body) @injection.content
(heredoc_end) @injection.language
(#set! injection.include-children)
- (#downcase! @injection.language)))
+ (#downcase! @injection.language))
; regex
((function_call_expression
diff --git a/queries/python/locals.scm b/queries/python/locals.scm
index 80b4021c1..e0454dbf4 100644
--- a/queries/python/locals.scm
+++ b/queries/python/locals.scm
@@ -24,12 +24,12 @@
(import_statement
name:
(dotted_name
- ((identifier) @local.definition.import)))
+ (identifier) @local.definition.import))
(import_from_statement
name:
(dotted_name
- ((identifier) @local.definition.import)))
+ (identifier) @local.definition.import))
; Function with parameters, defines parameters
(parameters
diff --git a/queries/r/highlights.scm b/queries/r/highlights.scm
index cbb87f033..1ce166ee0 100755
--- a/queries/r/highlights.scm
+++ b/queries/r/highlights.scm
@@ -24,9 +24,9 @@
(identifier) @variable.builtin)
(#eq? @variable.builtin "self"))
-((dollar
+(dollar
_
- (identifier) @variable.member))
+ (identifier) @variable.member)
; Parameters
(formal_parameters
@@ -158,6 +158,6 @@
(call
function:
- ((dollar
+ (dollar
_
- (identifier) @function.method.call)))
+ (identifier) @function.method.call))
diff --git a/queries/r/indents.scm b/queries/r/indents.scm
index 742b645e2..ec76272aa 100644
--- a/queries/r/indents.scm
+++ b/queries/r/indents.scm
@@ -12,8 +12,8 @@
"for"
] @indent.begin
-((binary
- operator: (special)) @indent.begin)
+(binary
+ operator: (special)) @indent.begin
[
"}"
diff --git a/queries/rust/injections.scm b/queries/rust/injections.scm
index d3d3bf512..5c96dbc24 100644
--- a/queries/rust/injections.scm
+++ b/queries/rust/injections.scm
@@ -19,8 +19,7 @@
(#set! injection.language "comment"))
((macro_invocation
- macro:
- ((identifier) @injection.language)
+ macro: (identifier) @injection.language
(token_tree) @injection.content)
(#any-of? @injection.language "html" "json"))
diff --git a/queries/scala/highlights.scm b/queries/scala/highlights.scm
index 711cd36a0..032863c08 100644
--- a/queries/scala/highlights.scm
+++ b/queries/scala/highlights.scm
@@ -60,8 +60,8 @@
(import_declaration
path: (identifier) @module)
-((stable_identifier
- (identifier) @module))
+(stable_identifier
+ (identifier) @module)
((import_declaration
path: (identifier) @type)
@@ -74,8 +74,8 @@
(export_declaration
path: (identifier) @module)
-((stable_identifier
- (identifier) @module))
+(stable_identifier
+ (identifier) @module)
((export_declaration
path: (identifier) @type)
@@ -274,7 +274,7 @@
; `case` is a conditional keyword in case_block
(case_block
(case_clause
- ("case") @keyword.conditional))
+ "case" @keyword.conditional))
(operator_identifier) @operator
diff --git a/queries/scala/locals.scm b/queries/scala/locals.scm
index ec205c4e1..0ba019cf8 100644
--- a/queries/scala/locals.scm
+++ b/queries/scala/locals.scm
@@ -15,8 +15,7 @@
name: (identifier) @local.definition.function)
(function_definition
- name:
- ((identifier) @local.definition.function)
+ name: (identifier) @local.definition.function
(#set! definition.var.scope parent))
(parameter
diff --git a/queries/sql/highlights.scm b/queries/sql/highlights.scm
index 6c3530ae0..7ffa99edc 100644
--- a/queries/sql/highlights.scm
+++ b/queries/sql/highlights.scm
@@ -24,11 +24,11 @@
(term
alias: (identifier) @variable)
-((term
+(term
value:
(cast
name: (keyword_cast) @function.call
- parameter: (literal)?)))
+ parameter: (literal)?))
(literal) @string
diff --git a/queries/swift/indents.scm b/queries/swift/indents.scm
index 3204af3f3..264e9aaef 100644
--- a/queries/swift/indents.scm
+++ b/queries/swift/indents.scm
@@ -35,8 +35,8 @@
] @indent.begin
; @something(...)
-((modifiers
- (attribute) @indent.begin))
+(modifiers
+ (attribute) @indent.begin)
(function_declaration
(modifiers
diff --git a/queries/teal/locals.scm b/queries/teal/locals.scm
index 25b56418f..d3a81f122 100644
--- a/queries/teal/locals.scm
+++ b/queries/teal/locals.scm
@@ -15,8 +15,8 @@
(anon_function) @local.scope
-((function_statement
- (function_name) @local.definition.function) @local.scope)
+(function_statement
+ (function_name) @local.definition.function) @local.scope
(program) @local.scope
diff --git a/queries/tlaplus/highlights.scm b/queries/tlaplus/highlights.scm
index c98e63f6b..34c643310 100644
--- a/queries/tlaplus/highlights.scm
+++ b/queries/tlaplus/highlights.scm
@@ -96,10 +96,10 @@
"await" @keyword.coroutine
(pcal_with
- ("=") @keyword)
+ "=" @keyword)
(pcal_process
- ("=") @keyword)
+ "=" @keyword)
[
"if"
@@ -119,9 +119,9 @@
(pcal_end_with)
] @keyword.repeat
-("return") @keyword.return
+"return" @keyword.return
-("print") @function.macro
+"print" @function.macro
; Literals
(binary_number
@@ -188,11 +188,11 @@
(bound_prefix_op
symbol: (_) @operator)
-((prefix_op_symbol) @operator)
+(prefix_op_symbol) @operator
-((infix_op_symbol) @operator)
+(infix_op_symbol) @operator
-((postfix_op_symbol) @operator)
+(postfix_op_symbol) @operator
(function_definition
name: (identifier) @function)
@@ -236,7 +236,7 @@
(pcal_with
(identifier) @variable.parameter)
-((".")
+("."
.
(identifier) @attribute)
diff --git a/queries/tlaplus/locals.scm b/queries/tlaplus/locals.scm
index 26d36140e..e30f9ec41 100644
--- a/queries/tlaplus/locals.scm
+++ b/queries/tlaplus/locals.scm
@@ -150,17 +150,17 @@
; References
(identifier_ref) @local.reference
-((prefix_op_symbol) @local.reference)
+(prefix_op_symbol) @local.reference
(bound_prefix_op
symbol: (_) @local.reference)
-((infix_op_symbol) @local.reference)
+(infix_op_symbol) @local.reference
(bound_infix_op
symbol: (_) @local.reference)
-((postfix_op_symbol) @local.reference)
+(postfix_op_symbol) @local.reference
(bound_postfix_op
symbol: (_) @local.reference)
diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm
index 4cfca6d81..3cc9b7f13 100644
--- a/queries/typescript/highlights.scm
+++ b/queries/typescript/highlights.scm
@@ -50,8 +50,8 @@
"type"
(import_clause
(named_imports
- ((import_specifier
- name: (identifier) @type)))))
+ (import_specifier
+ name: (identifier) @type))))
(template_literal_type) @string
diff --git a/queries/usd/highlights.scm b/queries/usd/highlights.scm
index 894d1613d..e6f5e322c 100644
--- a/queries/usd/highlights.scm
+++ b/queries/usd/highlights.scm
@@ -183,9 +183,9 @@
"instanceable"))
; Common attribute metadata
-((layer_offset
+(layer_offset
(identifier) @keyword
- (#any-of? @keyword "offset" "scale")))
+ (#any-of? @keyword "offset" "scale"))
; Docstrings in USD
(metadata
diff --git a/queries/v/locals.scm b/queries/v/locals.scm
index 524483b8e..ba271e04d 100644
--- a/queries/v/locals.scm
+++ b/queries/v/locals.scm
@@ -1,5 +1,5 @@
-((function_declaration
- name: (identifier) @local.definition.function)) ;@function
+(function_declaration
+ name: (identifier) @local.definition.function) ;@function
(var_declaration
var_list:
@@ -7,8 +7,8 @@
(reference_expression
(identifier) @local.definition.var)))
-((function_declaration
- name: (identifier) @local.definition.function))
+(function_declaration
+ name: (identifier) @local.definition.function)
(const_declaration
(const_definition
diff --git a/queries/vue/injections.scm b/queries/vue/injections.scm
index 2fbf22c92..6d3b8350b 100644
--- a/queries/vue/injections.scm
+++ b/queries/vue/injections.scm
@@ -12,7 +12,7 @@
; TODO: When nvim-treesitter has postcss and less parsers, use @injection.language and @injection.content instead
; <script lang="scss">
-((style_element
+(style_element
(start_tag
(attribute
(attribute_name) @_lang
@@ -21,7 +21,7 @@
(raw_text) @injection.content
(#eq? @_lang "lang")
(#any-of? @_scss "less" "postcss")
- (#set! injection.language "scss")))
+ (#set! injection.language "scss"))
; <script lang="js">
((script_element
@@ -49,7 +49,7 @@
; <script lang="tsx">
; <script lang="jsx">
-((script_element
+(script_element
(start_tag
(attribute
(attribute_name) @_attr
@@ -57,7 +57,7 @@
(attribute_value) @injection.language)))
(#eq? @_attr "lang")
(#any-of? @injection.language "tsx" "jsx")
- (raw_text) @injection.content))
+ (raw_text) @injection.content)
((interpolation
(raw_text) @injection.content)
diff --git a/queries/wgsl_bevy/highlights.scm b/queries/wgsl_bevy/highlights.scm
index 9cd796c72..650006f18 100644
--- a/queries/wgsl_bevy/highlights.scm
+++ b/queries/wgsl_bevy/highlights.scm
@@ -14,7 +14,7 @@
(function_declaration
(import_path
- ((identifier) @function.)))
+ (identifier) @function.))
(import_path
(identifier) @module
diff --git a/queries/zig/folds.scm b/queries/zig/folds.scm
index 1d65a5280..6953091be 100644
--- a/queries/zig/folds.scm
+++ b/queries/zig/folds.scm
@@ -6,9 +6,9 @@
(AsmExpr)
(ErrorSetDecl)
(LINESTRING)
- ([
+ [
(IfPrefix)
(WhilePrefix)
(ForPrefix)
- ])
+ ]
] @fold