Improve matching for constructor tokens

This commit is contained in:
Marshall Bowers 2023-12-08 11:34:39 -05:00
parent 6634a5e9f6
commit 6f064cfc36
12 changed files with 249 additions and 1 deletions

View File

@ -95,6 +95,13 @@ pub fn andromeda() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xf92672ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {
@ -292,6 +299,13 @@ pub fn andromeda() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xf92672ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -108,6 +108,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x55b4d4ff).into()),
..Default::default()
},
),
( (
"embedded".into(), "embedded".into(),
UserHighlightStyle { UserHighlightStyle {
@ -397,6 +404,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x5ccfe6ff).into()),
..Default::default()
},
),
( (
"embedded".into(), "embedded".into(),
UserHighlightStyle { UserHighlightStyle {
@ -686,6 +700,13 @@ pub fn ayu() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x39bae6ff).into()),
..Default::default()
},
),
( (
"embedded".into(), "embedded".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -101,6 +101,13 @@ pub fn dracula() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xff79c6ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -98,6 +98,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x8ec07cff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {
@ -362,6 +369,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x8ec07cff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {
@ -626,6 +640,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x8ec07cff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {
@ -890,6 +911,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x427b58ff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1154,6 +1182,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x427b58ff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1418,6 +1453,13 @@ pub fn gruvbox() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x427b58ff).into()),
..Default::default()
},
),
( (
"emphasis.strong".into(), "emphasis.strong".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -109,6 +109,13 @@ pub fn night_owl() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xcaece6ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -350,6 +357,13 @@ pub fn night_owl() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x994cc3ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -101,6 +101,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -360,6 +367,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -619,6 +633,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe64100ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -878,6 +899,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe64100ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1137,6 +1165,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe64100ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1396,6 +1431,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xc37455ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1655,6 +1697,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -1914,6 +1963,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -2173,6 +2229,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -2432,6 +2495,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -2691,6 +2761,13 @@ pub fn noctis() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xe66533ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -107,6 +107,13 @@ pub fn nord() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x81a1c1ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -108,6 +108,13 @@ pub fn palenight() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xff5572ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {
@ -376,6 +383,13 @@ pub fn palenight() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xff5572ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {
@ -644,6 +658,13 @@ pub fn palenight() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0xff5572ff).into()),
..Default::default()
},
),
( (
"emphasis".into(), "emphasis".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -110,6 +110,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -350,6 +357,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {
@ -590,6 +604,13 @@ pub fn rose_pine() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x56949fff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -103,6 +103,13 @@ pub fn solarized() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x268bd2ff).into()),
..Default::default()
},
),
( (
"embedded".into(), "embedded".into(),
UserHighlightStyle { UserHighlightStyle {
@ -354,6 +361,13 @@ pub fn solarized() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x268bd2ff).into()),
..Default::default()
},
),
( (
"embedded".into(), "embedded".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -92,6 +92,13 @@ pub fn synthwave_84() -> UserThemeFamily {
..Default::default() ..Default::default()
}, },
), ),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x72f1b8ff).into()),
..Default::default()
},
),
( (
"function".into(), "function".into(),
UserHighlightStyle { UserHighlightStyle {

View File

@ -188,7 +188,10 @@ impl ZedSyntaxToken {
ZedSyntaxToken::CommentDoc => vec!["comment.block.documentation"], ZedSyntaxToken::CommentDoc => vec!["comment.block.documentation"],
ZedSyntaxToken::Constant => vec!["constant", "constant.language", "constant.character"], ZedSyntaxToken::Constant => vec!["constant", "constant.language", "constant.character"],
ZedSyntaxToken::Constructor => { ZedSyntaxToken::Constructor => {
vec!["entity.name.function.definition.special.constructor"] vec![
"entity.name.tag",
"entity.name.function.definition.special.constructor",
]
} }
ZedSyntaxToken::Embedded => vec!["meta.embedded"], ZedSyntaxToken::Embedded => vec!["meta.embedded"],
ZedSyntaxToken::Emphasis => vec!["markup.italic"], ZedSyntaxToken::Emphasis => vec!["markup.italic"],