helix/runtime/queries/tsq/highlights.scm
Michael Davis e0bccd2c58
tsq: Tune highlights to more closely match 24.07 release
The changes in #12148 were a bit radical - this restores some
customizations we had like using "label" for captures and not
highlighting the '#' or '?'/'!' parts differently. Also the highlighting
for predicates we do (not) support has been restored.
2025-01-02 15:37:18 -05:00

50 lines
921 B
Scheme

((program
.
(comment)*
.
(comment) @keyword.import)
(#match? @keyword.import "^;+ *inherits *:"))
((parameters
(identifier) @constant.numeric)
(#match? @constant.numeric "^[-+]?[0-9]+(.[0-9]+)?$"))
"_" @constant
":" @punctuation.delimiter
[
"["
"]"
"("
")"
] @punctuation.bracket
"." @operator
(quantifier) @operator
(comment) @comment
(negated_field
"!" @operator
(identifier) @variable.other.member)
(field_definition
name: (identifier) @variable.other.member)
(named_node
name: (identifier) @tag)
((predicate
"#" @function.builtin
name: (identifier) @function.builtin @_name
type: (predicate_type) @function.builtin)
(#any-of? @_name "eq" "match" "any-of" "not-any-of" "is" "is-not" "not-same-line" "not-kind-eq" "set" "select-adjacent" "strip"))
(predicate name: (identifier) @error)
(capture) @label
(escape_sequence) @constant.character.escape
(string) @string