Files
may 9e6c2a2774 fix(queries): incorrect query captures (#15634)
* highlights(vim): fix `@keyword.control.excpetion` capture name

* highlights(pascal, php-only): fix captures for numbers

* highlights(graphql): `@constants.*` => `@constant.*`

* highlights(bass): `@keyword.builtin` => `@keyword`

`@keyword.builtin` is not an actual helix theme scope, and
nvim-treesitter just uses `@keyword` for that, so align with that

* highlights(v): `@keyword.control.function` => `@keyword.function`

* highlights(lean, latex): `@include` => `@keyword.control.import`

* highlights(latex): `@markup.link.uri` => `@markup.link.url`

* highlights(ink): `@commment` => `@comment`

* highlights(vhdl): `@punctuation.delimiters` => `@punctuation.delimiter`

* highlights(bicep): `@constant.number` => `@constant.numeric`

* higlights(haskell): `@variable.member` => `@variable.other.member`

* highlights(chuck): fix typo in `@keyword.control.conditional`

* highlights(ripple): `@number` => `@constant.numeric`

* highlights(t32): use the correct `@keyword.*` captures

* highlights(scheme): use correct captures for conditional keywords

* highlights(elixir, hurl, latex): use `@string.regexp`
2026-04-15 11:45:59 +09:00

233 lines
3.0 KiB
Scheme

; Includes
[
"import"
"provider"
"with"
"as"
"from"
] @keyword.control.import
; Namespaces
(module_declaration
(identifier) @namespace)
; Builtins
(primitive_type) @type.builtin
((member_expression
object: (identifier) @type.builtin)
(#eq? @type.builtin "sys"))
; Functions
(call_expression
function: (identifier) @function)
(user_defined_function
name: (identifier) @function)
; Properties
(object_property
(identifier) @function.method
":" @punctuation.delimiter
(_))
(object_property
(compatible_identifier) @function.method
":" @punctuation.delimiter
(_))
(property_identifier) @function.method
; Attributes
(decorator
"@" @attribute)
(decorator
(call_expression
(identifier) @attribute))
(decorator
(call_expression
(member_expression
object: (identifier) @attribute
property: (property_identifier) @attribute)))
; Types
(type_declaration
(identifier) @type)
(type_declaration
(identifier)
"="
(identifier) @type)
(type
(identifier) @type)
(resource_declaration
(identifier) @type)
(resource_expression
(identifier) @type)
; Parameters
(parameter_declaration
(identifier) @variable.parameter
(_))
(call_expression
function: (_)
(arguments
(identifier) @variable.parameter))
(call_expression
function: (_)
(arguments
(member_expression
object: (identifier) @variable.parameter)))
(parameter
.
(identifier) @variable.parameter)
; Variables
(variable_declaration
(identifier) @variable
(_))
(metadata_declaration
(identifier) @variable
(_))
(output_declaration
(identifier) @variable
(_))
(object_property
(_)
":"
(identifier) @variable)
(for_statement
"for"
(for_loop_parameters
(loop_variable) @variable
(loop_enumerator) @variable))
; Conditionals
"if" @keyword.conditional
(ternary_expression
"?" @keyword.control.conditional
":" @keyword.control.conditional)
; Loops
(for_statement
"for" @keyword.control.repeat
"in"
":" @punctuation.delimiter)
; Keywords
[
"module"
"metadata"
"output"
"param"
"resource"
"existing"
"targetScope"
"type"
"var"
"using"
"test"
] @keyword
"func" @keyword.function
"assert" @keyword.control.exception
; Operators
[
"+"
"-"
"*"
"/"
"%"
"||"
"&&"
"|"
"=="
"!="
"=~"
"!~"
">"
">="
"<="
"<"
"??"
"="
"!"
".?"
] @operator
(subscript_expression
"?" @operator)
(nullable_type
"?" @operator)
"in" @keyword.operator
; Literals
(string) @string
(escape_sequence) @constant.character
(number) @constant.numeric
(boolean) @constant.builtin.boolean
(null) @constant.builtin
; Misc
(compatible_identifier
"?" @punctuation.special)
(nullable_return_type) @punctuation.special
[
"{"
"}"
] @punctuation.bracket
[
"["
"]"
] @punctuation.bracket
[
"("
")"
] @punctuation.bracket
[
"."
":"
"::"
"=>"
] @punctuation.delimiter
; Interpolation
(interpolation
"${" @punctuation.special
"}" @punctuation.special)
(interpolation
(identifier) @variable)
; Comments
[
(comment)
(diagnostic_comment)
] @comment