diff --git a/crates/languages/src/regex/highlights.scm b/crates/languages/src/regex/highlights.scm index 2504dab79e..3829c3834b 100644 --- a/crates/languages/src/regex/highlights.scm +++ b/crates/languages/src/regex/highlights.scm @@ -4,24 +4,22 @@ "(?" "(?:" "(?<" + "(?P=" + "<" ">" "[" "]" "{" "}" -] @string +] @punctuation.bracket.regex -(group_name) @property +(group_name) @label.regex [ (identity_escape) (control_letter_escape) (character_class_escape) (control_escape) - (start_assertion) - (end_assertion) - (boundary_assertion) - (non_boundary_assertion) ] @string.escape [ @@ -31,17 +29,25 @@ "|" "=" "!" + (start_assertion) + (end_assertion) (any_character) -] @operator +] @operator.regex + +[ + (boundary_assertion) + (non_boundary_assertion) + (backreference_escape) +] @keyword.operator.regex (count_quantifier [ (decimal_digits) @number - "," @punctuation.delimiter + "," @punctuation.delimiter.regex ]) (character_class [ - "^" @operator - (class_range "-" @operator) + "^" @operator.regex + (class_range "-" @operator.regex) ])