Improve matching for string tokens

This commit is contained in:
Marshall Bowers 2023-12-08 11:13:28 -05:00
parent a8a5b9524d
commit 40a95221ea
11 changed files with 718 additions and 0 deletions

View file

@ -137,6 +137,34 @@ pub fn andromeda() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -299,6 +327,34 @@ pub fn andromeda() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x96e072ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -236,6 +236,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x86b300ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
@ -518,6 +525,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xd5ff80ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
@ -800,6 +814,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xaad94cff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {

View file

@ -145,6 +145,34 @@ pub fn dracula() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0xf1fa8cff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xf1fa8cff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xf1fa8cff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xf1fa8cff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -197,6 +197,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -426,6 +447,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -655,6 +697,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xb8bb26ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -884,6 +947,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1113,6 +1197,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1342,6 +1447,27 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x79740eff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -194,6 +194,27 @@ pub fn night_owl() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xecc48dff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xecc48dff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xecc48dff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -414,6 +435,27 @@ pub fn night_owl() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x4876d6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x4876d6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x4876d6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -199,6 +199,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -430,6 +451,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -661,6 +703,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -892,6 +955,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1123,6 +1207,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x00b368ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1354,6 +1459,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x72c09fff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x72c09fff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x72c09fff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1585,6 +1711,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -1816,6 +1963,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -2047,6 +2215,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -2278,6 +2467,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -2509,6 +2719,27 @@ pub fn noctis() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x49e9a6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -184,6 +184,27 @@ pub fn nord() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xa3be8cff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xa3be8cff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xa3be8cff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -222,6 +222,27 @@ pub fn palenight() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -469,6 +490,27 @@ pub fn palenight() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -716,6 +758,27 @@ pub fn palenight() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xc3e88dff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -173,6 +173,34 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -378,6 +406,34 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -583,6 +639,34 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0xea9d34ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xea9d34ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xea9d34ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xea9d34ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -201,6 +201,27 @@ pub fn solarized() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
@ -389,6 +410,27 @@ pub fn solarized() -> UserThemeFamily {
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0x2aa198ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {

View file

@ -172,6 +172,10 @@ impl ZedSyntaxToken {
| ZedSyntaxToken::PunctuationDelimiter
| ZedSyntaxToken::PunctuationListMarker
| ZedSyntaxToken::PunctuationSpecial => &[ZedSyntaxToken::Punctuation],
ZedSyntaxToken::StringEscape
| ZedSyntaxToken::StringRegex
| ZedSyntaxToken::StringSpecial
| ZedSyntaxToken::StringSpecialSymbol => &[ZedSyntaxToken::String],
_ => &[],
}
}