chore: format queries

This commit is contained in:
Phạm Huy Hoàng 2024-01-21 22:05:44 +09:00
parent 76ca66db38
commit 77e298e4de
50 changed files with 143 additions and 146 deletions

View file

@ -57,8 +57,8 @@
(type_arguments (type_arguments
">" @punctuation.delimiter) ">" @punctuation.delimiter)
((field_access (field_access
object: (identifier) @type)) object: (identifier) @type)
(field_access (field_access
field: (identifier) @property) field: (identifier) @property)

View file

@ -11,12 +11,12 @@
(import_statement (import_statement
name: name:
(dotted_name (dotted_name
((python_identifier) @local.definition.import))) (python_identifier) @local.definition.import))
(import_from_statement (import_from_statement
name: name:
(dotted_name (dotted_name
((python_identifier) @local.definition.import))) (python_identifier) @local.definition.import))
; Function with parameters, defines parameters ; Function with parameters, defines parameters
(parameters (parameters

View file

@ -232,10 +232,10 @@
(argument_list (argument_list
(identifier) @variable.builtin)) (identifier) @variable.builtin))
((attribute_specifier (attribute_specifier
(argument_list (argument_list
(call_expression (call_expression
function: (identifier) @variable.builtin)))) function: (identifier) @variable.builtin)))
((call_expression ((call_expression
function: (identifier) @function.builtin) function: (identifier) @function.builtin)

View file

@ -42,7 +42,7 @@
condition: (_) @indent.begin) condition: (_) @indent.begin)
; Supports if without braces (but not both if-else without braces) ; Supports if without braces (but not both if-else without braces)
((if_statement (if_statement
consequence: consequence:
(_ (_
";" @indent.end) @_consequence ";" @indent.end) @_consequence
@ -55,7 +55,7 @@
(compound_statement) @indent.dedent)? @indent.dedent (compound_statement) @indent.dedent)? @indent.dedent
(compound_statement)? @indent.dedent (compound_statement)? @indent.dedent
(_)? @indent.dedent (_)? @indent.dedent
])?) @indent.begin) ])?) @indent.begin
(else_clause (else_clause
(_ (_

View file

@ -19,8 +19,8 @@
(endblock_command) (endblock_command)
] @indent.branch ] @indent.branch
(")" @indent.branch) ")" @indent.branch
(")" @indent.end) ")" @indent.end
(argument_list) @indent.auto (argument_list) @indent.auto

View file

@ -46,4 +46,4 @@
("text" @number ("text" @number
(#lua-match? @number "^#[0-9]+$")) (#lua-match? @number "^#[0-9]+$"))
((uri) @string.special.url @nospell) (uri) @string.special.url @nospell

View file

@ -47,7 +47,7 @@
">" ">"
] @punctuation.bracket ] @punctuation.bracket
(("\"" @string) ("\"" @string
(#set! conceal "")) (#set! conceal ""))
; Comments ; Comments

View file

@ -16,8 +16,8 @@
declarator: (_) @variable.parameter) declarator: (_) @variable.parameter)
;(field_expression) @variable.parameter ;; How to highlight this? ;(field_expression) @variable.parameter ;; How to highlight this?
(((field_expression ((field_expression
(field_identifier) @function.method)) @_parent (field_identifier) @function.method) @_parent
(#has-parent? @_parent template_method function_declarator)) (#has-parent? @_parent template_method function_declarator))
(field_declaration (field_declaration

View file

@ -4,8 +4,8 @@
] @indent.begin ] @indent.begin
(block (block
("}") @indent.branch) "}" @indent.branch)
("}") @indent.dedent "}" @indent.dedent
(comment) @indent.ignore (comment) @indent.ignore

View file

@ -123,7 +123,7 @@
((identifier) @type ((identifier) @type
(#lua-match? @type "^_?[%u].*[%l]")) ; catch Classes or IClasses not CLASSES (#lua-match? @type "^_?[%u].*[%l]")) ; catch Classes or IClasses not CLASSES
("Function" @type) "Function" @type
; properties ; properties
(unconditional_assignable_selector (unconditional_assignable_selector

View file

@ -10,6 +10,6 @@
((link) @injection.content ((link) @injection.content
(#set! injection.language "html")) (#set! injection.language "html"))
((code_block (code_block
(code_block_language) @injection.language (code_block_language) @injection.language
(code_block_content) @injection.content)) (code_block_content) @injection.content)

View file

@ -65,11 +65,11 @@
"NOTATION" @keyword.directive "NOTATION" @keyword.directive
(Name) @label) (Name) @label)
((NotationDecl (NotationDecl
(ExternalID (ExternalID
(SystemLiteral (SystemLiteral
(URI) @string.special.url)) (URI) @string.special.url))
(#set! "priority" 105))) (#set! "priority" 105))
; Attlist declaration ; Attlist declaration
(AttlistDecl (AttlistDecl

View file

@ -283,11 +283,11 @@
"}" "}"
] @punctuation.bracket ] @punctuation.bracket
((template_substitution (template_substitution
[ [
"${" "${"
"}" "}"
] @punctuation.special) @none) ] @punctuation.special) @none
; Keywords ; Keywords
;---------- ;----------

View file

@ -7,8 +7,7 @@
; html(`...`), html`...`, sql(...) etc ; html(`...`), html`...`, sql(...) etc
(call_expression (call_expression
function: function: (identifier) @injection.language
((identifier) @injection.language)
arguments: arguments:
[ [
(arguments (arguments

View file

@ -28,11 +28,11 @@
(identifier) @local.definition.import) (identifier) @local.definition.import)
(function_declaration (function_declaration
((identifier) @local.definition.function) (identifier) @local.definition.function
(#set! definition.var.scope parent)) (#set! definition.var.scope parent))
(method_definition (method_definition
((property_identifier) @local.definition.function) (property_identifier) @local.definition.function
(#set! definition.var.scope parent)) (#set! definition.var.scope parent))
; References ; References

View file

@ -176,7 +176,7 @@
; Non-String Sigils ; Non-String Sigils
(sigil (sigil
"~" @string.special "~" @string.special
((sigil_name) @string.special) @_sigil_name (sigil_name) @string.special @_sigil_name
quoted_start: _ @string.special quoted_start: _ @string.special
quoted_end: _ @string.special quoted_end: _ @string.special
((sigil_modifiers) @string.special)? ((sigil_modifiers) @string.special)?
@ -185,7 +185,7 @@
; String Sigils ; String Sigils
(sigil (sigil
"~" @string "~" @string
((sigil_name) @string) @_sigil_name (sigil_name) @string @_sigil_name
quoted_start: _ @string quoted_start: _ @string
(quoted_content) @string (quoted_content) @string
quoted_end: _ @string quoted_end: _ @string
@ -217,7 +217,7 @@
(charlist) (charlist)
(sigil (sigil
"~" @comment.documentation "~" @comment.documentation
((sigil_name) @comment.documentation) (sigil_name) @comment.documentation
quoted_start: _ @comment.documentation quoted_start: _ @comment.documentation
(quoted_content) @comment.documentation (quoted_content) @comment.documentation
quoted_end: _ @comment.documentation) quoted_end: _ @comment.documentation)

View file

@ -105,8 +105,8 @@
(#set! "definition.method.scope" "parent")) (#set! "definition.method.scope" "parent"))
; Enum ; Enum
((enum_definition (enum_definition
(name) @local.definition.enum)) (name) @local.definition.enum)
; Repeat ; Repeat
(for_statement (for_statement

View file

@ -1,7 +1,7 @@
(dir_sep) @punctuation.delimiter (dir_sep) @punctuation.delimiter
(quoted_pattern (quoted_pattern
("\"" @punctuation.special)) "\"" @punctuation.special)
(range_notation) @string.special (range_notation) @string.special
@ -18,7 +18,7 @@
(character_class) @constant (character_class) @constant
(class_range (class_range
("-" @operator)) "-" @operator)
[ [
(ansi_c_escape) (ansi_c_escape)

View file

@ -277,7 +277,7 @@
(pat_view (pat_view
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
])) ]))
@ -293,14 +293,14 @@
; partially applied infix functions (sections) also get highlighted as operators ; partially applied infix functions (sections) also get highlighted as operators
(exp_section_right (exp_section_right
[ [
((variable) @operator) (variable) @operator
(qualified_variable (qualified_variable
(variable) @operator) (variable) @operator)
]) ])
(exp_section_left (exp_section_left
[ [
((variable) @operator) (variable) @operator
(qualified_variable (qualified_variable
(variable) @operator) (variable) @operator)
]) ])
@ -310,7 +310,7 @@
(exp_infix (exp_infix
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
((module) @module ((module) @module
(variable) @function.call)) (variable) @function.call))
@ -328,7 +328,7 @@
. .
(exp_name (exp_name
[ [
((variable) @variable) (variable) @variable
(qualified_variable (qualified_variable
(variable) @variable) (variable) @variable)
])) ]))
@ -336,7 +336,7 @@
; function calls with infix operators ; function calls with infix operators
((exp_name ((exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
]) ])
@ -353,7 +353,7 @@
. .
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
])) ]))
@ -364,7 +364,7 @@
; function composition, arrows, monadic composition (lhs) ; function composition, arrows, monadic composition (lhs)
((exp_name ((exp_name
[ [
((variable) @function) (variable) @function
(qualified_variable (qualified_variable
(variable) @function) (variable) @function)
]) ])
@ -381,7 +381,7 @@
. .
(exp_name (exp_name
[ [
((variable) @function) (variable) @function
(qualified_variable (qualified_variable
(variable) @function) (variable) @function)
])) ]))
@ -394,7 +394,7 @@
. .
(exp_name (exp_name
[ [
((variable) @function) (variable) @function
(qualified_variable (qualified_variable
(variable) @function) (variable) @function)
]) ])
@ -415,7 +415,7 @@
(exp_apply (exp_apply
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
])) ]))
@ -428,7 +428,7 @@
(exp_infix (exp_infix
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
]) ])
@ -444,7 +444,7 @@
. .
(exp_name (exp_name
[ [
((variable) @function.call) (variable) @function.call
(qualified_variable (qualified_variable
(variable) @function.call) (variable) @function.call)
])))) ]))))
@ -455,7 +455,7 @@
. .
(exp_name (exp_name
[ [
((variable) @variable) (variable) @variable
(qualified_variable (qualified_variable
(variable) @variable) (variable) @variable)
])) ]))
@ -493,9 +493,9 @@
; signatures that have a function type ; signatures that have a function type
; + functions that follow them ; + functions that follow them
((signature (signature
(variable) @function (variable) @function
(fun))) (fun))
((signature ((signature
(variable) @_type (variable) @_type
@ -505,10 +505,10 @@
(variable) @function) (variable) @function)
(#eq? @function @_type)) (#eq? @function @_type))
((signature (signature
(variable) @function (variable) @function
(context (context
(fun)))) (fun)))
((signature ((signature
(variable) @_type (variable) @_type
@ -570,8 +570,8 @@
(quasiquote_body) @string) (quasiquote_body) @string)
(quasiquote (quasiquote
((_ (_
(variable) @_name)) (variable) @_name)
(#eq? @_name "qq") (#eq? @_name "qq")
(quasiquote_body) @string) (quasiquote_body) @string)
@ -613,7 +613,7 @@
(exp_field (exp_field
field: field:
[ [
((variable) @variable.member) (variable) @variable.member
(qualified_variable (qualified_variable
(variable) @variable.member) (variable) @variable.member)
]) ])

View file

@ -1,8 +1,8 @@
; ----------------------------------------------------------------------------- ; -----------------------------------------------------------------------------
; General language injection ; General language injection
(quasiquote (quasiquote
((quoter) @injection.language) (quoter) @injection.language
((quasiquote_body) @injection.content)) (quasiquote_body) @injection.content)
((comment) @injection.content ((comment) @injection.content
(#set! injection.language "comment")) (#set! injection.language "comment"))
@ -21,28 +21,28 @@
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#any-of? @_name "cassius" "lucius") (#any-of? @_name "cassius" "lucius")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "css")) (#set! injection.language "css"))
; HTML: Text.Hamlet ; HTML: Text.Hamlet
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet") (#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "html")) (#set! injection.language "html"))
; JS: Text.Julius ; JS: Text.Julius
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#any-of? @_name "js" "julius") (#any-of? @_name "js" "julius")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "javascript")) (#set! injection.language "javascript"))
; TS: Text.TypeScript ; TS: Text.TypeScript
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#any-of? @_name "tsc" "tscJSX") (#any-of? @_name "tsc" "tscJSX")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "typescript")) (#set! injection.language "typescript"))
; ----------------------------------------------------------------------------- ; -----------------------------------------------------------------------------
@ -50,7 +50,7 @@
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#eq? @_name "hsx") (#eq? @_name "hsx")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "html")) (#set! injection.language "html"))
; ----------------------------------------------------------------------------- ; -----------------------------------------------------------------------------
@ -58,7 +58,7 @@
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#eq? @_name "aesonQQ") (#eq? @_name "aesonQQ")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "json")) (#set! injection.language "json"))
; ----------------------------------------------------------------------------- ; -----------------------------------------------------------------------------
@ -67,10 +67,10 @@
(quasiquote (quasiquote
(quoter) @injection.language (quoter) @injection.language
(#eq? @injection.language "sql") (#eq? @injection.language "sql")
((quasiquote_body) @injection.content)) (quasiquote_body) @injection.content)
(quasiquote (quasiquote
(quoter) @_name (quoter) @_name
(#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith") (#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith")
((quasiquote_body) @injection.content) (quasiquote_body) @injection.content
(#set! injection.language "haskell_persistent")) (#set! injection.language "haskell_persistent"))

View file

@ -35,11 +35,11 @@
; <script type="mimetype-or-well-known-script-type"> ; <script type="mimetype-or-well-known-script-type">
(script_element (script_element
(start_tag (start_tag
((attribute (attribute
(attribute_name) @_attr (attribute_name) @_attr
(#eq? @_attr "type") (#eq? @_attr "type")
(quoted_attribute_value (quoted_attribute_value
(attribute_value) @_type)))) (attribute_value) @_type)))
(raw_text) @injection.content (raw_text) @injection.content
(#set-lang-from-mimetype! @_type)) (#set-lang-from-mimetype! @_type))
@ -72,14 +72,14 @@
(_ (_
(tag_name) @_tagname (tag_name) @_tagname
(#eq? @_tagname "input") (#eq? @_tagname "input")
((attribute (attribute
(attribute_name) @_attr (attribute_name) @_attr
[ [
(quoted_attribute_value (quoted_attribute_value
(attribute_value) @injection.content) (attribute_value) @injection.content)
(attribute_value) @injection.content (attribute_value) @injection.content
] ]
(#eq? @_attr "pattern"))) (#eq? @_attr "pattern"))
(#set! injection.language "regex"))) (#set! injection.language "regex")))
; <input type="checkbox" onchange="this.closest('form').elements.output.value = this.checked"> ; <input type="checkbox" onchange="this.closest('form').elements.output.value = this.checked">
@ -101,7 +101,7 @@
((attribute_name) @_name ((attribute_name) @_name
(#lua-match? @_name "^%*")) (#lua-match? @_name "^%*"))
(quoted_attribute_value (quoted_attribute_value
((attribute_value) @injection.content)) (attribute_value) @injection.content)
(#set! injection.language "angular")) (#set! injection.language "angular"))
(element (element

View file

@ -58,10 +58,10 @@
; baz(y) { y } ; baz(y) { y }
; } ; }
(method_definition (method_definition
([ [
(property_identifier) (property_identifier)
(private_property_identifier) (private_property_identifier)
] @local.definition.function) ] @local.definition.function
(#set! definition.var.scope parent)) (#set! definition.var.scope parent))
; this.foo() ; this.foo()

View file

@ -28,7 +28,7 @@
"false" "false"
] @boolean ] @boolean
("null") @type.builtin "null" @type.builtin
; Interpolation ; Interpolation
[ [

View file

@ -28,7 +28,7 @@
"}" "}"
] @punctuation.bracket ] @punctuation.bracket
(("\"" @conceal) ("\"" @conceal
(#set! conceal "")) (#set! conceal ""))
(escape_sequence) @string.escape (escape_sequence) @string.escape

View file

@ -38,9 +38,9 @@
; Handle the dot operator effectively - <My.Component> ; Handle the dot operator effectively - <My.Component>
(jsx_opening_element (jsx_opening_element
((member_expression (member_expression
(identifier) @tag (identifier) @tag
(property_identifier) @constructor))) (property_identifier) @constructor))
(jsx_closing_element (jsx_closing_element
((identifier) @constructor ((identifier) @constructor
@ -48,9 +48,9 @@
; Handle the dot operator effectively - </My.Component> ; Handle the dot operator effectively - </My.Component>
(jsx_closing_element (jsx_closing_element
((member_expression (member_expression
(identifier) @tag (identifier) @tag
(property_identifier) @constructor))) (property_identifier) @constructor))
(jsx_self_closing_element (jsx_self_closing_element
((identifier) @constructor ((identifier) @constructor
@ -58,8 +58,8 @@
; Handle the dot operator effectively - <My.Component /> ; Handle the dot operator effectively - <My.Component />
(jsx_self_closing_element (jsx_self_closing_element
((member_expression (member_expression
(identifier) @tag (identifier) @tag
(property_identifier) @constructor))) (property_identifier) @constructor))
(jsx_text) @none (jsx_text) @none

View file

@ -5,7 +5,7 @@
] @indent.begin ] @indent.begin
(jsx_closing_element (jsx_closing_element
(">" @indent.end)) ">" @indent.end)
(jsx_self_closing_element (jsx_self_closing_element
"/>" @indent.end) "/>" @indent.end)

View file

@ -92,22 +92,22 @@
(simple_identifier) @function) (simple_identifier) @function)
(getter (getter
("get") @function.builtin) "get" @function.builtin)
(setter (setter
("set") @function.builtin) "set" @function.builtin)
(primary_constructor) @constructor (primary_constructor) @constructor
(secondary_constructor (secondary_constructor
("constructor") @constructor) "constructor" @constructor)
(constructor_invocation (constructor_invocation
(user_type (user_type
(type_identifier) @constructor)) (type_identifier) @constructor))
(anonymous_initializer (anonymous_initializer
("init") @constructor) "init" @constructor)
(parameter (parameter
(simple_identifier) @variable.parameter) (simple_identifier) @variable.parameter)
@ -182,7 +182,7 @@
; - "[abc]?".toRegex() ; - "[abc]?".toRegex()
(call_expression (call_expression
(navigation_expression (navigation_expression
((string_literal) @string.regexp) (string_literal) @string.regexp
(navigation_suffix (navigation_suffix
((simple_identifier) @_function ((simple_identifier) @_function
(#eq? @_function "toRegex"))))) (#eq? @_function "toRegex")))))

View file

@ -45,7 +45,7 @@
(bare_symbol (bare_symbol
(macro (macro
((macro_id) @type.definition))) (macro_id) @type.definition))
(bare_symbol (bare_symbol
(identifier) @type.definition) (identifier) @type.definition)

View file

@ -193,7 +193,7 @@
command: _ @module command: _ @module
authors: authors:
(curly_group_author_list (curly_group_author_list
((author)+ @markup.heading.1))) (author)+ @markup.heading.1))
(chapter (chapter
command: _ @module command: _ @module

View file

@ -25,7 +25,7 @@
(check_out) (check_out)
] @markup.raw ] @markup.raw
((account) @variable.member) (account) @variable.member
"include" @keyword.import "include" @keyword.import

View file

@ -629,7 +629,7 @@
; NOTE: needs to be after @type ; NOTE: needs to be after @type
; generic types when declaring ; generic types when declaring
((generic_parameter_list (generic_parameter_list
(parameter_declaration (parameter_declaration
(symbol_declaration_list (symbol_declaration_list
(symbol_declaration (symbol_declaration
@ -638,7 +638,7 @@
(identifier) @variable.parameter (identifier) @variable.parameter
(accent_quoted (accent_quoted
(identifier) @variable.parameter) (identifier) @variable.parameter)
]))))) ]))))
; for loop variables ; for loop variables
(for (for

View file

@ -244,12 +244,12 @@
(comment) @comment (comment) @comment
([ [
"=>" "=>"
"," ","
";" ";"
"->" "->"
] @punctuation.delimiter) ] @punctuation.delimiter
([ ([
"[" "["

View file

@ -1,17 +1,17 @@
((comment) @injection.content ((comment) @injection.content
(#set! injection.language "phpdoc")) (#set! injection.language "phpdoc"))
((heredoc (heredoc
(heredoc_body) @injection.content (heredoc_body) @injection.content
(heredoc_end) @injection.language (heredoc_end) @injection.language
(#set! injection.include-children) (#set! injection.include-children)
(#downcase! @injection.language))) (#downcase! @injection.language))
((nowdoc (nowdoc
(nowdoc_body) @injection.content (nowdoc_body) @injection.content
(heredoc_end) @injection.language (heredoc_end) @injection.language
(#set! injection.include-children) (#set! injection.include-children)
(#downcase! @injection.language))) (#downcase! @injection.language))
; regex ; regex
((function_call_expression ((function_call_expression

View file

@ -24,12 +24,12 @@
(import_statement (import_statement
name: name:
(dotted_name (dotted_name
((identifier) @local.definition.import))) (identifier) @local.definition.import))
(import_from_statement (import_from_statement
name: name:
(dotted_name (dotted_name
((identifier) @local.definition.import))) (identifier) @local.definition.import))
; Function with parameters, defines parameters ; Function with parameters, defines parameters
(parameters (parameters

View file

@ -24,9 +24,9 @@
(identifier) @variable.builtin) (identifier) @variable.builtin)
(#eq? @variable.builtin "self")) (#eq? @variable.builtin "self"))
((dollar (dollar
_ _
(identifier) @variable.member)) (identifier) @variable.member)
; Parameters ; Parameters
(formal_parameters (formal_parameters
@ -158,6 +158,6 @@
(call (call
function: function:
((dollar (dollar
_ _
(identifier) @function.method.call))) (identifier) @function.method.call))

View file

@ -12,8 +12,8 @@
"for" "for"
] @indent.begin ] @indent.begin
((binary (binary
operator: (special)) @indent.begin) operator: (special)) @indent.begin
[ [
"}" "}"

View file

@ -19,8 +19,7 @@
(#set! injection.language "comment")) (#set! injection.language "comment"))
((macro_invocation ((macro_invocation
macro: macro: (identifier) @injection.language
((identifier) @injection.language)
(token_tree) @injection.content) (token_tree) @injection.content)
(#any-of? @injection.language "html" "json")) (#any-of? @injection.language "html" "json"))

View file

@ -60,8 +60,8 @@
(import_declaration (import_declaration
path: (identifier) @module) path: (identifier) @module)
((stable_identifier (stable_identifier
(identifier) @module)) (identifier) @module)
((import_declaration ((import_declaration
path: (identifier) @type) path: (identifier) @type)
@ -74,8 +74,8 @@
(export_declaration (export_declaration
path: (identifier) @module) path: (identifier) @module)
((stable_identifier (stable_identifier
(identifier) @module)) (identifier) @module)
((export_declaration ((export_declaration
path: (identifier) @type) path: (identifier) @type)
@ -274,7 +274,7 @@
; `case` is a conditional keyword in case_block ; `case` is a conditional keyword in case_block
(case_block (case_block
(case_clause (case_clause
("case") @keyword.conditional)) "case" @keyword.conditional))
(operator_identifier) @operator (operator_identifier) @operator

View file

@ -15,8 +15,7 @@
name: (identifier) @local.definition.function) name: (identifier) @local.definition.function)
(function_definition (function_definition
name: name: (identifier) @local.definition.function
((identifier) @local.definition.function)
(#set! definition.var.scope parent)) (#set! definition.var.scope parent))
(parameter (parameter

View file

@ -24,11 +24,11 @@
(term (term
alias: (identifier) @variable) alias: (identifier) @variable)
((term (term
value: value:
(cast (cast
name: (keyword_cast) @function.call name: (keyword_cast) @function.call
parameter: (literal)?))) parameter: (literal)?))
(literal) @string (literal) @string

View file

@ -35,8 +35,8 @@
] @indent.begin ] @indent.begin
; @something(...) ; @something(...)
((modifiers (modifiers
(attribute) @indent.begin)) (attribute) @indent.begin)
(function_declaration (function_declaration
(modifiers (modifiers

View file

@ -15,8 +15,8 @@
(anon_function) @local.scope (anon_function) @local.scope
((function_statement (function_statement
(function_name) @local.definition.function) @local.scope) (function_name) @local.definition.function) @local.scope
(program) @local.scope (program) @local.scope

View file

@ -96,10 +96,10 @@
"await" @keyword.coroutine "await" @keyword.coroutine
(pcal_with (pcal_with
("=") @keyword) "=" @keyword)
(pcal_process (pcal_process
("=") @keyword) "=" @keyword)
[ [
"if" "if"
@ -119,9 +119,9 @@
(pcal_end_with) (pcal_end_with)
] @keyword.repeat ] @keyword.repeat
("return") @keyword.return "return" @keyword.return
("print") @function.macro "print" @function.macro
; Literals ; Literals
(binary_number (binary_number
@ -188,11 +188,11 @@
(bound_prefix_op (bound_prefix_op
symbol: (_) @operator) 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 (function_definition
name: (identifier) @function) name: (identifier) @function)
@ -236,7 +236,7 @@
(pcal_with (pcal_with
(identifier) @variable.parameter) (identifier) @variable.parameter)
((".") ("."
. .
(identifier) @attribute) (identifier) @attribute)

View file

@ -150,17 +150,17 @@
; References ; References
(identifier_ref) @local.reference (identifier_ref) @local.reference
((prefix_op_symbol) @local.reference) (prefix_op_symbol) @local.reference
(bound_prefix_op (bound_prefix_op
symbol: (_) @local.reference) symbol: (_) @local.reference)
((infix_op_symbol) @local.reference) (infix_op_symbol) @local.reference
(bound_infix_op (bound_infix_op
symbol: (_) @local.reference) symbol: (_) @local.reference)
((postfix_op_symbol) @local.reference) (postfix_op_symbol) @local.reference
(bound_postfix_op (bound_postfix_op
symbol: (_) @local.reference) symbol: (_) @local.reference)

View file

@ -50,8 +50,8 @@
"type" "type"
(import_clause (import_clause
(named_imports (named_imports
((import_specifier (import_specifier
name: (identifier) @type))))) name: (identifier) @type))))
(template_literal_type) @string (template_literal_type) @string

View file

@ -183,9 +183,9 @@
"instanceable")) "instanceable"))
; Common attribute metadata ; Common attribute metadata
((layer_offset (layer_offset
(identifier) @keyword (identifier) @keyword
(#any-of? @keyword "offset" "scale"))) (#any-of? @keyword "offset" "scale"))
; Docstrings in USD ; Docstrings in USD
(metadata (metadata

View file

@ -1,5 +1,5 @@
((function_declaration (function_declaration
name: (identifier) @local.definition.function)) ;@function name: (identifier) @local.definition.function) ;@function
(var_declaration (var_declaration
var_list: var_list:
@ -7,8 +7,8 @@
(reference_expression (reference_expression
(identifier) @local.definition.var))) (identifier) @local.definition.var)))
((function_declaration (function_declaration
name: (identifier) @local.definition.function)) name: (identifier) @local.definition.function)
(const_declaration (const_declaration
(const_definition (const_definition

View file

@ -12,7 +12,7 @@
; TODO: When nvim-treesitter has postcss and less parsers, use @injection.language and @injection.content instead ; TODO: When nvim-treesitter has postcss and less parsers, use @injection.language and @injection.content instead
; <script lang="scss"> ; <script lang="scss">
((style_element (style_element
(start_tag (start_tag
(attribute (attribute
(attribute_name) @_lang (attribute_name) @_lang
@ -21,7 +21,7 @@
(raw_text) @injection.content (raw_text) @injection.content
(#eq? @_lang "lang") (#eq? @_lang "lang")
(#any-of? @_scss "less" "postcss") (#any-of? @_scss "less" "postcss")
(#set! injection.language "scss"))) (#set! injection.language "scss"))
; <script lang="js"> ; <script lang="js">
((script_element ((script_element
@ -49,7 +49,7 @@
; <script lang="tsx"> ; <script lang="tsx">
; <script lang="jsx"> ; <script lang="jsx">
((script_element (script_element
(start_tag (start_tag
(attribute (attribute
(attribute_name) @_attr (attribute_name) @_attr
@ -57,7 +57,7 @@
(attribute_value) @injection.language))) (attribute_value) @injection.language)))
(#eq? @_attr "lang") (#eq? @_attr "lang")
(#any-of? @injection.language "tsx" "jsx") (#any-of? @injection.language "tsx" "jsx")
(raw_text) @injection.content)) (raw_text) @injection.content)
((interpolation ((interpolation
(raw_text) @injection.content) (raw_text) @injection.content)

View file

@ -14,7 +14,7 @@
(function_declaration (function_declaration
(import_path (import_path
((identifier) @function.))) (identifier) @function.))
(import_path (import_path
(identifier) @module (identifier) @module

View file

@ -6,9 +6,9 @@
(AsmExpr) (AsmExpr)
(ErrorSetDecl) (ErrorSetDecl)
(LINESTRING) (LINESTRING)
([ [
(IfPrefix) (IfPrefix)
(WhilePrefix) (WhilePrefix)
(ForPrefix) (ForPrefix)
]) ]
] @fold ] @fold