From 6faa7cd7220443fab5bee73c91c6f136d275c354 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 3 Mar 2025 15:55:07 -0700 Subject: [PATCH] Fix regex search colors (#25962) In #25005 we added regex syntax highlighting to search; but the existing regex grammar highlighted every character as a string which was hard to read. This flips so that characters are not highlighted, and brackets, etc. are. Screenshot 2025-03-03 at 14 39 35 Release Notes: - Fixed regex search box being overly green --- crates/languages/src/regex/highlights.scm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/languages/src/regex/highlights.scm b/crates/languages/src/regex/highlights.scm index d1ebcda0d3a8c935abb55e318c3de2624f0421cb..2504dab79ea58e93547a22f8ae6dd4fe9f73c012 100644 --- a/crates/languages/src/regex/highlights.scm +++ b/crates/languages/src/regex/highlights.scm @@ -9,7 +9,7 @@ "]" "{" "}" -] @punctuation.bracket +] @string (group_name) @property @@ -31,6 +31,7 @@ "|" "=" "!" + (any_character) ] @operator (count_quantifier @@ -44,7 +45,3 @@ "^" @operator (class_range "-" @operator) ]) - -(class_character) @constant.character - -(pattern_character) @string