Files
oak-gpui/crates/theme2/src/themes/synthwave_84.rs
T
Marshall Bowers f272881a6b theme_importer: Improve syntax token matching (#3549)
This PR improves the approach we use to match syntax tokens between Zed
and VS Code in the `theme_importer`.

We now use the list of scopes assigned to each Zed syntax token to rank
the possible candidates in the VS Code and then pick the candidate with
the highest rank.

So far this has proved to provide better colors across the board, but
we'll continue to refine the matching over time.

Release Notes:

- N/A
2023-12-07 22:11:31 -05:00

192 lines
8.5 KiB
Rust

// This file was generated by the `theme_importer`.
// Be careful when modifying it by hand.
use gpui::rgba;
#[allow(unused)]
use crate::{
Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserFontStyle, UserFontWeight,
UserHighlightStyle, UserSyntaxTheme, UserTheme, UserThemeFamily, UserThemeStylesRefinement,
};
pub fn synthwave_84() -> UserThemeFamily {
UserThemeFamily {
name: "Synthwave 84".into(),
author: "Robb Owen (robb0wen)".into(),
themes: vec![UserTheme {
name: "Synthwave 84".into(),
appearance: Appearance::Dark,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border_focused: Some(rgba(0x1f212bff).into()),
background: Some(rgba(0x262335ff).into()),
element_background: Some(rgba(0x614d85ff).into()),
element_hover: Some(rgba(0x37294d99).into()),
element_selected: Some(rgba(0xffffff20).into()),
drop_target_background: Some(rgba(0x34294f66).into()),
ghost_element_hover: Some(rgba(0x37294d99).into()),
text: Some(rgba(0xffffffff).into()),
tab_inactive_background: Some(rgba(0x262335ff).into()),
editor_background: Some(rgba(0x262335ff).into()),
editor_gutter_background: Some(rgba(0x262335ff).into()),
editor_line_number: Some(rgba(0xffffff73).into()),
terminal_ansi_bright_red: Some(rgba(0xfe4450ff).into()),
terminal_ansi_bright_green: Some(rgba(0x72f1b8ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xfede5dff).into()),
terminal_ansi_bright_blue: Some(rgba(0x03edf9ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xff7edbff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x03edf9ff).into()),
terminal_ansi_red: Some(rgba(0xfe4450ff).into()),
terminal_ansi_green: Some(rgba(0x72f1b8ff).into()),
terminal_ansi_yellow: Some(rgba(0xf3e70fff).into()),
terminal_ansi_blue: Some(rgba(0x03edf9ff).into()),
terminal_ansi_magenta: Some(rgba(0xff7edbff).into()),
terminal_ansi_cyan: Some(rgba(0x03edf9ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
deleted: Some(rgba(0xfe4450ff).into()),
error: Some(rgba(0xfe4450ff).into()),
hint: Some(rgba(0x969696ff).into()),
warning: Some(rgba(0x72f1b8bb).into()),
..Default::default()
},
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0xfede5dff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0xf97e72ff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0x848bbdff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x848bbdff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0x36f9f6ff).into()),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0xfede5dff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0xfe4450ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0xdd5500ff).into()),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0xdd5500ff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0xf97e72ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0xfede5dff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0xff7edbff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x36f9f6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x72f1b8ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0xfe4450ff).into()),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0xfe4450ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0xfe4450ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"variable.special".into(),
UserHighlightStyle {
color: Some(rgba(0xfe4450ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
],
}),
},
}],
}
}