From 8c51a62a8d37074a67d593be557b259afd0b00f7 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 27 Feb 2023 10:08:24 -0500 Subject: [PATCH] Unify regex highlight style under `@string.regex` --- crates/zed/src/languages/javascript/highlights.scm | 2 +- crates/zed/src/languages/racket/highlights.scm | 2 +- crates/zed/src/languages/ruby/highlights.scm | 2 +- crates/zed/src/languages/typescript/highlights.scm | 2 +- styles/src/themes/common/colorScheme.ts | 3 --- styles/src/themes/common/syntax.ts | 3 --- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/zed/src/languages/javascript/highlights.scm b/crates/zed/src/languages/javascript/highlights.scm index bd1986b6b3..dca0b28949 100644 --- a/crates/zed/src/languages/javascript/highlights.scm +++ b/crates/zed/src/languages/javascript/highlights.scm @@ -72,7 +72,7 @@ (template_string) ] @string -(regex) @string.special +(regex) @string.regex (number) @number ; Tokens diff --git a/crates/zed/src/languages/racket/highlights.scm b/crates/zed/src/languages/racket/highlights.scm index 9eeeb1d4ea..42b85774c9 100644 --- a/crates/zed/src/languages/racket/highlights.scm +++ b/crates/zed/src/languages/racket/highlights.scm @@ -3,7 +3,7 @@ [(string) (here_string) (byte_string)] @string -(regex) @string.special +(regex) @string.regex (escape_sequence) @escape [(comment) diff --git a/crates/zed/src/languages/ruby/highlights.scm b/crates/zed/src/languages/ruby/highlights.scm index 0dfd725cd8..7ed6b3ab3d 100644 --- a/crates/zed/src/languages/ruby/highlights.scm +++ b/crates/zed/src/languages/ruby/highlights.scm @@ -95,7 +95,7 @@ (bare_symbol) ] @string.special.symbol -(regex) @string.special.regex +(regex) @string.regex (escape_sequence) @escape [ diff --git a/crates/zed/src/languages/typescript/highlights.scm b/crates/zed/src/languages/typescript/highlights.scm index 43df33d158..8149ced0dd 100644 --- a/crates/zed/src/languages/typescript/highlights.scm +++ b/crates/zed/src/languages/typescript/highlights.scm @@ -72,7 +72,7 @@ (template_string) ] @string -(regex) @string.special +(regex) @string.regex (number) @number ; Tokens diff --git a/styles/src/themes/common/colorScheme.ts b/styles/src/themes/common/colorScheme.ts index d4e63376b9..ad2de9b62d 100644 --- a/styles/src/themes/common/colorScheme.ts +++ b/styles/src/themes/common/colorScheme.ts @@ -142,14 +142,11 @@ export interface Syntax { string: SyntaxHighlightStyle // css: color_value // js: this, super - // racket: regex // toml: offset_date_time, local_date_time... "string.special": SyntaxHighlightStyle // elixir: atom, quoted_atom, keyword, quoted_keyword // ruby: simple_symbol, delimited_symbol... "string.special.symbol": SyntaxHighlightStyle - // ruby: Regular expression - "string.special.regex": SyntaxHighlightStyle // elixir, python, yaml...: escape_sequence "string.escape": SyntaxHighlightStyle // Regular expressions diff --git a/styles/src/themes/common/syntax.ts b/styles/src/themes/common/syntax.ts index ada4c50b57..9c0b61447e 100644 --- a/styles/src/themes/common/syntax.ts +++ b/styles/src/themes/common/syntax.ts @@ -102,9 +102,6 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { "string.special.symbol": { color: color.string, }, - "string.special.regex": { - color: color.string, - }, "string.escape": { color: color.comment, },