Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve matching for constant tokens

Marshall Bowers1b6721170afd
diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs
index 8e5d588f524..f4ed232ea2a 100644
--- a/crates/theme2/src/themes/ayu.rs
+++ b/crates/theme2/src/themes/ayu.rs
@@ -104,7 +104,7 @@ pub fn ayu() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x4cbf99ff).into()),
+ color: Some(rgba(0xa37accff).into()),
..Default::default()
},
),
@@ -393,7 +393,7 @@ pub fn ayu() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x95e6cbff).into()),
+ color: Some(rgba(0xdfbfffff).into()),
..Default::default()
},
),
@@ -682,7 +682,7 @@ pub fn ayu() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x95e6cbff).into()),
+ color: Some(rgba(0xd2a6ffff).into()),
..Default::default()
},
),
diff --git a/crates/theme2/src/themes/noctis.rs b/crates/theme2/src/themes/noctis.rs
index e09efd98c6a..980ea7398d8 100644
--- a/crates/theme2/src/themes/noctis.rs
+++ b/crates/theme2/src/themes/noctis.rs
@@ -97,7 +97,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xbecfdaff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -356,7 +356,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xcbbec2ff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -615,7 +615,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x004d57ff).into()),
+ color: Some(rgba(0x5842ffff).into()),
..Default::default()
},
),
@@ -874,7 +874,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x0c006bff).into()),
+ color: Some(rgba(0x5842ffff).into()),
..Default::default()
},
),
@@ -1133,7 +1133,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0x004d57ff).into()),
+ color: Some(rgba(0x5842ffff).into()),
..Default::default()
},
),
@@ -1392,7 +1392,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xc5cdd3ff).into()),
+ color: Some(rgba(0x7068b1ff).into()),
..Default::default()
},
),
@@ -1651,7 +1651,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xb2cacdff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -1910,7 +1910,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xb2cacdff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -2169,7 +2169,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xb2cacdff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -2428,7 +2428,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xc5c2d6ff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
@@ -2687,7 +2687,7 @@ pub fn noctis() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xccbfd9ff).into()),
+ color: Some(rgba(0x7060ebff).into()),
..Default::default()
},
),
diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs
index 42065980869..ce281f0f69d 100644
--- a/crates/theme2/src/themes/nord.rs
+++ b/crates/theme2/src/themes/nord.rs
@@ -103,7 +103,7 @@ pub fn nord() -> UserThemeFamily {
(
"constant".into(),
UserHighlightStyle {
- color: Some(rgba(0xebcb8bff).into()),
+ color: Some(rgba(0x81a1c1ff).into()),
..Default::default()
},
),
diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs
index ecd669c34a2..8bc7fe8bc00 100644
--- a/crates/theme2/src/themes/rose_pine.rs
+++ b/crates/theme2/src/themes/rose_pine.rs
@@ -103,6 +103,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
+ (
+ "constant".into(),
+ UserHighlightStyle {
+ color: Some(rgba(0xebbcbaff).into()),
+ ..Default::default()
+ },
+ ),
(
"function".into(),
UserHighlightStyle {
@@ -336,6 +343,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
+ (
+ "constant".into(),
+ UserHighlightStyle {
+ color: Some(rgba(0xea9a97ff).into()),
+ ..Default::default()
+ },
+ ),
(
"function".into(),
UserHighlightStyle {
@@ -569,6 +583,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
+ (
+ "constant".into(),
+ UserHighlightStyle {
+ color: Some(rgba(0xd7827eff).into()),
+ ..Default::default()
+ },
+ ),
(
"function".into(),
UserHighlightStyle {
diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs
index 90e4ae21314..aeca085fd5f 100644
--- a/crates/theme2/src/themes/synthwave_84.rs
+++ b/crates/theme2/src/themes/synthwave_84.rs
@@ -85,6 +85,13 @@ pub fn synthwave_84() -> UserThemeFamily {
..Default::default()
},
),
+ (
+ "constant".into(),
+ UserHighlightStyle {
+ color: Some(rgba(0xf97e72ff).into()),
+ ..Default::default()
+ },
+ ),
(
"function".into(),
UserHighlightStyle {
diff --git a/crates/theme_importer/src/vscode/syntax.rs b/crates/theme_importer/src/vscode/syntax.rs
index 990355065f8..35f0f96a16b 100644
--- a/crates/theme_importer/src/vscode/syntax.rs
+++ b/crates/theme_importer/src/vscode/syntax.rs
@@ -186,7 +186,7 @@ impl ZedSyntaxToken {
ZedSyntaxToken::Boolean => vec!["constant.language"],
ZedSyntaxToken::Comment => vec!["comment"],
ZedSyntaxToken::CommentDoc => vec!["comment.block.documentation"],
- ZedSyntaxToken::Constant => vec!["constant.character"],
+ ZedSyntaxToken::Constant => vec!["constant.language", "constant.character"],
ZedSyntaxToken::Constructor => {
vec!["entity.name.function.definition.special.constructor"]
}