From 004c5d309bbd1baa91d803f07a0d80db9ebd7e00 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 14:23:43 -0400 Subject: [PATCH 001/110] WIP --- crates/theme2/src/import.rs | 222 ++++++++++++++++++++++++++++++++++++ crates/theme2/src/theme2.rs | 1 + 2 files changed, 223 insertions(+) create mode 100644 crates/theme2/src/import.rs diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs new file mode 100644 index 0000000000000000000000000000000000000000..147babf00791d227851b5144b635c2423029b0aa --- /dev/null +++ b/crates/theme2/src/import.rs @@ -0,0 +1,222 @@ +use crate::ThemeColorsRefinement; + +struct ImportedThemeFamily { + pub id: String, + pub name: String, + pub author: String, + pub url: String, + pub license: String, + pub themes: Vec, +} + +#[derive(Debug)] +pub struct VSCodeColors { + terminal_background: String, + terminal_foreground: String, + terminal_ansi_bright_black: String, + terminal_ansi_bright_red: String, + terminal_ansi_bright_green: String, + terminal_ansi_bright_yellow: String, + terminal_ansi_bright_blue: String, + terminal_ansi_bright_magenta: String, + terminal_ansi_bright_cyan: String, + terminal_ansi_bright_white: String, + terminal_ansi_black: String, + terminal_ansi_red: String, + terminal_ansi_green: String, + terminal_ansi_yellow: String, + terminal_ansi_blue: String, + terminal_ansi_magenta: String, + terminal_ansi_cyan: String, + terminal_ansi_white: String, + focus_border: String, + foreground: String, + selection_background: String, + error_foreground: String, + button_background: String, + button_foreground: String, + button_secondary_background: String, + button_secondary_foreground: String, + button_secondary_hover_background: String, + dropdown_background: String, + dropdown_border: String, + dropdown_foreground: String, + input_background: String, + input_foreground: String, + input_border: String, + input_placeholder_foreground: String, + input_option_active_border: String, + input_validation_info_border: String, + input_validation_warning_border: String, + input_validation_error_border: String, + badge_foreground: String, + badge_background: String, + progress_bar_background: String, + list_active_selection_background: String, + list_active_selection_foreground: String, + list_drop_background: String, + list_focus_background: String, + list_highlight_foreground: String, + list_hover_background: String, + list_inactive_selection_background: String, + list_warning_foreground: String, + list_error_foreground: String, + activity_bar_background: String, + activity_bar_inactive_foreground: String, + activity_bar_foreground: String, + activity_bar_active_border: String, + activity_bar_active_background: String, + activity_bar_badge_background: String, + activity_bar_badge_foreground: String, + side_bar_background: String, + side_bar_title_foreground: String, + side_bar_section_header_background: String, + side_bar_section_header_border: String, + editor_group_border: String, + editor_group_drop_background: String, + editor_group_header_tabs_background: String, + tab_active_background: String, + tab_active_foreground: String, + tab_border: String, + tab_active_border_top: String, + tab_inactive_background: String, + tab_inactive_foreground: String, + editor_foreground: String, + editor_background: String, + editor_line_number_foreground: String, + editor_selection_background: String, + editor_selection_highlight_background: String, + editor_fold_background: String, + editor_word_highlight_background: String, + editor_word_highlight_strong_background: String, + editor_find_match_background: String, + editor_find_match_highlight_background: String, + editor_find_range_highlight_background: String, + editor_hover_highlight_background: String, + editor_line_highlight_border: String, + editor_link_active_foreground: String, + editor_range_highlight_background: String, + editor_snippet_tabstop_highlight_background: String, + editor_snippet_tabstop_highlight_border: String, + editor_snippet_final_tabstop_highlight_background: String, + editor_snippet_final_tabstop_highlight_border: String, + editor_whitespace_foreground: String, + editor_indent_guide_background: String, + editor_indent_guide_active_background: String, + editor_ruler_foreground: String, + editor_code_lens_foreground: String, + editor_bracket_highlight_foreground1: String, + editor_bracket_highlight_foreground2: String, + editor_bracket_highlight_foreground3: String, + editor_bracket_highlight_foreground4: String, + editor_bracket_highlight_foreground5: String, + editor_bracket_highlight_foreground6: String, + editor_bracket_highlight_unexpected_bracket_foreground: String, + editor_overview_ruler_border: String, + editor_overview_ruler_selection_highlight_foreground: String, + editor_overview_ruler_word_highlight_foreground: String, + editor_overview_ruler_word_highlight_strong_foreground: String, + editor_overview_ruler_modified_foreground: String, + editor_overview_ruler_added_foreground: String, + editor_overview_ruler_deleted_foreground: String, + editor_overview_ruler_error_foreground: String, + editor_overview_ruler_warning_foreground: String, + editor_overview_ruler_info_foreground: String, + editor_error_foreground: String, + editor_warning_foreground: String, + editor_gutter_modified_background: String, + editor_gutter_added_background: String, + editor_gutter_deleted_background: String, + git_decoration_modified_resource_foreground: String, + git_decoration_deleted_resource_foreground: String, + git_decoration_untracked_resource_foreground: String, + git_decoration_ignored_resource_foreground: String, + git_decoration_conflicting_resource_foreground: String, + diff_editor_inserted_text_background: String, + diff_editor_removed_text_background: String, + inline_chat_region_highlight: String, + editor_widget_background: String, + editor_suggest_widget_background: String, + editor_suggest_widget_foreground: String, + editor_suggest_widget_selected_background: String, + editor_hover_widget_background: String, + editor_hover_widget_border: String, + editor_marker_navigation_background: String, + peek_view_border: String, + peek_view_editor_background: String, + peek_view_editor_match_highlight_background: String, + peek_view_result_background: String, + peek_view_result_file_foreground: String, + peek_view_result_line_foreground: String, + peek_view_result_match_highlight_background: String, + peek_view_result_selection_background: String, + peek_view_result_selection_foreground: String, + peek_view_title_background: String, + peek_view_title_description_foreground: String, + peek_view_title_label_foreground: String, + merge_current_header_background: String, + merge_incoming_header_background: String, + editor_overview_ruler_current_content_foreground: String, + editor_overview_ruler_incoming_content_foreground: String, + panel_background: String, + panel_border: String, + panel_title_active_border: String, + panel_title_active_foreground: String, + panel_title_inactive_foreground: String, + status_bar_background: String, + status_bar_foreground: String, + status_bar_debugging_background: String, + status_bar_debugging_foreground: String, + status_bar_no_folder_background: String, + status_bar_no_folder_foreground: String, + status_bar_item_prominent_background: String, + status_bar_item_prominent_hover_background: String, + status_bar_item_remote_foreground: String, + status_bar_item_remote_background: String, + title_bar_active_background: String, + title_bar_active_foreground: String, + title_bar_inactive_background: String, + title_bar_inactive_foreground: String, + extension_button_prominent_foreground: String, + extension_button_prominent_background: String, + extension_button_prominent_hover_background: String, + picker_group_border: String, + picker_group_foreground: String, + debug_tool_bar_background: String, + walk_through_embedded_editor_background: String, + settings_header_foreground: String, + settings_modified_item_indicator: String, + settings_dropdown_background: String, + settings_dropdown_foreground: String, + settings_dropdown_border: String, + settings_checkbox_background: String, + settings_checkbox_foreground: String, + settings_checkbox_border: String, + settings_text_input_background: String, + settings_text_input_foreground: String, + settings_text_input_border: String, + settings_number_input_background: String, + settings_number_input_foreground: String, + settings_number_input_border: String, + breadcrumb_foreground: String, + breadcrumb_background: String, + breadcrumb_focus_foreground: String, + breadcrumb_active_selection_foreground: String, + breadcrumb_picker_background: String, + list_filter_widget_background: String, + list_filter_widget_outline: String, + list_filter_widget_no_matches_outline: String, +} + +pub fn try_vscode_colors_to_theme_colors(colors: VSCodeColors) -> ThemeColorsRefinement { + let mut theme_colors = ThemeColorsRefinement::default(); + + theme_colors +} + +pub fn vscode_colors_to_theme_colors(color: String) -> ThemeColorsRefinement { + ThemeColorsRefinement { + text: Some(color), + ..Default::default() + } +} diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 88dcbd12867846f6d76a4c44ef7fec89d624c703..431a96c05f66a039ae4624f82191399d288857fb 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -1,6 +1,7 @@ mod colors; mod default_colors; mod default_theme; +mod import; mod registry; mod scale; mod settings; From 809d8786f129589ca51714d4a734d6bd6b818f35 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 14:54:53 -0400 Subject: [PATCH 002/110] WIP --- crates/theme2/src/import.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs index 147babf00791d227851b5144b635c2423029b0aa..26850b5b78f046e3ee89ebd791488d88fd19bdbf 100644 --- a/crates/theme2/src/import.rs +++ b/crates/theme2/src/import.rs @@ -9,6 +9,38 @@ struct ImportedThemeFamily { pub themes: Vec, } +struct ImportedThemeVariant { + pub id: String, + pub name: String, + pub colors: ThemeColorsRefinement, +} + +macro_rules! gen_vscode_colors_and_enum { + ($($name:ident: $type:ty),*) => { + #[derive(Debug)] + pub struct VSCodeColors { + $( + pub $name: $type, + )* + } + + pub enum VSCodeColor { + $( + $({ + let mut s = stringify!($name).to_string(); + s.get_mut(0..1).unwrap().make_ascii_uppercase(); + s.replace("_", "") + }), + )* + } + }; +} + +gen_vscode_colors_and_enum! { + terminal_background: String, + terminal_foreground: String +} + #[derive(Debug)] pub struct VSCodeColors { terminal_background: String, From 58ac7f2926e414907d602e8f0823230e2cb689dd Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 16:26:27 -0400 Subject: [PATCH 003/110] [Broken] Load a src theme in test --- assets/themes/src/vsc/dracula/LICENSE | 21 + assets/themes/src/vsc/dracula/dracula.json | 1067 ++++++++++++++++++++ crates/theme2/src/import.rs | 301 +++++- 3 files changed, 1342 insertions(+), 47 deletions(-) create mode 100644 assets/themes/src/vsc/dracula/LICENSE create mode 100644 assets/themes/src/vsc/dracula/dracula.json diff --git a/assets/themes/src/vsc/dracula/LICENSE b/assets/themes/src/vsc/dracula/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..dcaf6d7f61eea6f51ad273171a53458f4be58f36 --- /dev/null +++ b/assets/themes/src/vsc/dracula/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Dracula Theme + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vsc/dracula/dracula.json b/assets/themes/src/vsc/dracula/dracula.json new file mode 100644 index 0000000000000000000000000000000000000000..6604a094d5a194f74d378d25c38fb47a3f29c539 --- /dev/null +++ b/assets/themes/src/vsc/dracula/dracula.json @@ -0,0 +1,1067 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Dracula", + "author": "Zeno Rocha", + "maintainers": ["Derek P Sifford "], + "semanticClass": "theme.dracula", + "semanticHighlighting": true, + "dracula": { + "base": [ + "#282A36", + "#F8F8F2", + "#44475A", + "#6272A4", + "#8BE9FD", + "#50FA7B", + "#FFB86C", + "#FF79C6", + "#BD93F9", + "#FF5555", + "#F1FA8C" + ], + "ansi": [ + "#21222C", + "#FF5555", + "#50FA7B", + "#F1FA8C", + "#BD93F9", + "#FF79C6", + "#8BE9FD", + "#F8F8F2", + "#6272A4", + "#FF6E6E", + "#69FF94", + "#FFFFA5", + "#D6ACFF", + "#FF92DF", + "#A4FFFF", + "#FFFFFF" + ], + "brightOther": ["#E9F284", "#8BE9FE"], + "other": [ + "#44475A75", + "#FFFFFF1A", + "#FFFFFF", + "#44475A70", + "#424450", + "#343746", + "#21222C", + "#191A21" + ] + }, + "colors": { + "terminal.background": "#282A36", + "terminal.foreground": "#F8F8F2", + "terminal.ansiBrightBlack": "#6272A4", + "terminal.ansiBrightRed": "#FF6E6E", + "terminal.ansiBrightGreen": "#69FF94", + "terminal.ansiBrightYellow": "#FFFFA5", + "terminal.ansiBrightBlue": "#D6ACFF", + "terminal.ansiBrightMagenta": "#FF92DF", + "terminal.ansiBrightCyan": "#A4FFFF", + "terminal.ansiBrightWhite": "#FFFFFF", + "terminal.ansiBlack": "#21222C", + "terminal.ansiRed": "#FF5555", + "terminal.ansiGreen": "#50FA7B", + "terminal.ansiYellow": "#F1FA8C", + "terminal.ansiBlue": "#BD93F9", + "terminal.ansiMagenta": "#FF79C6", + "terminal.ansiCyan": "#8BE9FD", + "terminal.ansiWhite": "#F8F8F2", + "focusBorder": "#6272A4", + "foreground": "#F8F8F2", + "selection.background": "#BD93F9", + "errorForeground": "#FF5555", + "button.background": "#44475A", + "button.foreground": "#F8F8F2", + "button.secondaryBackground": "#282A36", + "button.secondaryForeground": "#F8F8F2", + "button.secondaryHoverBackground": "#343746", + "dropdown.background": "#343746", + "dropdown.border": "#191A21", + "dropdown.foreground": "#F8F8F2", + "input.background": "#282A36", + "input.foreground": "#F8F8F2", + "input.border": "#191A21", + "input.placeholderForeground": "#6272A4", + "inputOption.activeBorder": "#BD93F9", + "inputValidation.infoBorder": "#FF79C6", + "inputValidation.warningBorder": "#FFB86C", + "inputValidation.errorBorder": "#FF5555", + "badge.foreground": "#F8F8F2", + "badge.background": "#44475A", + "progressBar.background": "#FF79C6", + "list.activeSelectionBackground": "#44475A", + "list.activeSelectionForeground": "#F8F8F2", + "list.dropBackground": "#44475A", + "list.focusBackground": "#44475A75", + "list.highlightForeground": "#8BE9FD", + "list.hoverBackground": "#44475A75", + "list.inactiveSelectionBackground": "#44475A75", + "list.warningForeground": "#FFB86C", + "list.errorForeground": "#FF5555", + "activityBar.background": "#343746", + "activityBar.inactiveForeground": "#6272A4", + "activityBar.foreground": "#F8F8F2", + "activityBar.activeBorder": "#FF79C680", + "activityBar.activeBackground": "#BD93F910", + "activityBarBadge.background": "#FF79C6", + "activityBarBadge.foreground": "#F8F8F2", + "sideBar.background": "#21222C", + "sideBarTitle.foreground": "#F8F8F2", + "sideBarSectionHeader.background": "#282A36", + "sideBarSectionHeader.border": "#191A21", + "editorGroup.border": "#BD93F9", + "editorGroup.dropBackground": "#44475A70", + "editorGroupHeader.tabsBackground": "#191A21", + "tab.activeBackground": "#282A36", + "tab.activeForeground": "#F8F8F2", + "tab.border": "#191A21", + "tab.activeBorderTop": "#FF79C680", + "tab.inactiveBackground": "#21222C", + "tab.inactiveForeground": "#6272A4", + "editor.foreground": "#F8F8F2", + "editor.background": "#282A36", + "editorLineNumber.foreground": "#6272A4", + "editor.selectionBackground": "#44475A", + "editor.selectionHighlightBackground": "#424450", + "editor.foldBackground": "#21222C80", + "editor.wordHighlightBackground": "#8BE9FD50", + "editor.wordHighlightStrongBackground": "#50FA7B50", + "editor.findMatchBackground": "#FFB86C80", + "editor.findMatchHighlightBackground": "#FFFFFF40", + "editor.findRangeHighlightBackground": "#44475A75", + "editor.hoverHighlightBackground": "#8BE9FD50", + "editor.lineHighlightBorder": "#44475A", + "editorLink.activeForeground": "#8BE9FD", + "editor.rangeHighlightBackground": "#BD93F915", + "editor.snippetTabstopHighlightBackground": "#282A36", + "editor.snippetTabstopHighlightBorder": "#6272A4", + "editor.snippetFinalTabstopHighlightBackground": "#282A36", + "editor.snippetFinalTabstopHighlightBorder": "#50FA7B", + "editorWhitespace.foreground": "#FFFFFF1A", + "editorIndentGuide.background": "#FFFFFF1A", + "editorIndentGuide.activeBackground": "#FFFFFF45", + "editorRuler.foreground": "#FFFFFF1A", + "editorCodeLens.foreground": "#6272A4", + "editorBracketHighlight.foreground1": "#F8F8F2", + "editorBracketHighlight.foreground2": "#FF79C6", + "editorBracketHighlight.foreground3": "#8BE9FD", + "editorBracketHighlight.foreground4": "#50FA7B", + "editorBracketHighlight.foreground5": "#BD93F9", + "editorBracketHighlight.foreground6": "#FFB86C", + "editorBracketHighlight.unexpectedBracket.foreground": "#FF5555", + "editorOverviewRuler.border": "#191A21", + "editorOverviewRuler.selectionHighlightForeground": "#FFB86C", + "editorOverviewRuler.wordHighlightForeground": "#8BE9FD", + "editorOverviewRuler.wordHighlightStrongForeground": "#50FA7B", + "editorOverviewRuler.modifiedForeground": "#8BE9FD80", + "editorOverviewRuler.addedForeground": "#50FA7B80", + "editorOverviewRuler.deletedForeground": "#FF555580", + "editorOverviewRuler.errorForeground": "#FF555580", + "editorOverviewRuler.warningForeground": "#FFB86C80", + "editorOverviewRuler.infoForeground": "#8BE9FD80", + "editorError.foreground": "#FF5555", + "editorWarning.foreground": "#8BE9FD", + "editorGutter.modifiedBackground": "#8BE9FD80", + "editorGutter.addedBackground": "#50FA7B80", + "editorGutter.deletedBackground": "#FF555580", + "gitDecoration.modifiedResourceForeground": "#8BE9FD", + "gitDecoration.deletedResourceForeground": "#FF5555", + "gitDecoration.untrackedResourceForeground": "#50FA7B", + "gitDecoration.ignoredResourceForeground": "#6272A4", + "gitDecoration.conflictingResourceForeground": "#FFB86C", + "diffEditor.insertedTextBackground": "#50FA7B20", + "diffEditor.removedTextBackground": "#FF555550", + "inlineChat.regionHighlight": "#343746", + "editorWidget.background": "#21222C", + "editorSuggestWidget.background": "#21222C", + "editorSuggestWidget.foreground": "#F8F8F2", + "editorSuggestWidget.selectedBackground": "#44475A", + "editorHoverWidget.background": "#282A36", + "editorHoverWidget.border": "#6272A4", + "editorMarkerNavigation.background": "#21222C", + "peekView.border": "#44475A", + "peekViewEditor.background": "#282A36", + "peekViewEditor.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.background": "#21222C", + "peekViewResult.fileForeground": "#F8F8F2", + "peekViewResult.lineForeground": "#F8F8F2", + "peekViewResult.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.selectionBackground": "#44475A", + "peekViewResult.selectionForeground": "#F8F8F2", + "peekViewTitle.background": "#191A21", + "peekViewTitleDescription.foreground": "#6272A4", + "peekViewTitleLabel.foreground": "#F8F8F2", + "merge.currentHeaderBackground": "#50FA7B90", + "merge.incomingHeaderBackground": "#BD93F990", + "editorOverviewRuler.currentContentForeground": "#50FA7B", + "editorOverviewRuler.incomingContentForeground": "#BD93F9", + "panel.background": "#282A36", + "panel.border": "#BD93F9", + "panelTitle.activeBorder": "#FF79C6", + "panelTitle.activeForeground": "#F8F8F2", + "panelTitle.inactiveForeground": "#6272A4", + "statusBar.background": "#191A21", + "statusBar.foreground": "#F8F8F2", + "statusBar.debuggingBackground": "#FF5555", + "statusBar.debuggingForeground": "#191A21", + "statusBar.noFolderBackground": "#191A21", + "statusBar.noFolderForeground": "#F8F8F2", + "statusBarItem.prominentBackground": "#FF5555", + "statusBarItem.prominentHoverBackground": "#FFB86C", + "statusBarItem.remoteForeground": "#282A36", + "statusBarItem.remoteBackground": "#BD93F9", + "titleBar.activeBackground": "#21222C", + "titleBar.activeForeground": "#F8F8F2", + "titleBar.inactiveBackground": "#191A21", + "titleBar.inactiveForeground": "#6272A4", + "extensionButton.prominentForeground": "#F8F8F2", + "extensionButton.prominentBackground": "#50FA7B90", + "extensionButton.prominentHoverBackground": "#50FA7B60", + "pickerGroup.border": "#BD93F9", + "pickerGroup.foreground": "#8BE9FD", + "debugToolBar.background": "#21222C", + "walkThrough.embeddedEditorBackground": "#21222C", + "settings.headerForeground": "#F8F8F2", + "settings.modifiedItemIndicator": "#FFB86C", + "settings.dropdownBackground": "#21222C", + "settings.dropdownForeground": "#F8F8F2", + "settings.dropdownBorder": "#191A21", + "settings.checkboxBackground": "#21222C", + "settings.checkboxForeground": "#F8F8F2", + "settings.checkboxBorder": "#191A21", + "settings.textInputBackground": "#21222C", + "settings.textInputForeground": "#F8F8F2", + "settings.textInputBorder": "#191A21", + "settings.numberInputBackground": "#21222C", + "settings.numberInputForeground": "#F8F8F2", + "settings.numberInputBorder": "#191A21", + "breadcrumb.foreground": "#6272A4", + "breadcrumb.background": "#282A36", + "breadcrumb.focusForeground": "#F8F8F2", + "breadcrumb.activeSelectionForeground": "#F8F8F2", + "breadcrumbPicker.background": "#191A21", + "listFilterWidget.background": "#343746", + "listFilterWidget.outline": "#424450", + "listFilterWidget.noMatchesOutline": "#FF5555" + }, + "tokenColors": [ + { + "scope": ["emphasis"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong"], + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": ["header"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "scope": ["markup.inserted"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "scope": ["markup.deleted"], + "settings": { + "foreground": "#FF5555" + } + }, + { + "scope": ["markup.changed"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#FF5555", + "fontStyle": "underline italic" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#F8F8F2", + "fontStyle": "underline italic" + } + }, + { + "scope": ["entity.name.filename"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "scope": ["markup.error"], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Underlined markup", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Bold markup", + "scope": ["markup.bold"], + "settings": { + "fontStyle": "bold", + "foreground": "#FFB86C" + } + }, + { + "name": "Markup headings", + "scope": ["markup.heading"], + "settings": { + "fontStyle": "bold", + "foreground": "#BD93F9" + } + }, + { + "name": "Markup italic", + "scope": ["markup.italic"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "italic" + } + }, + { + "name": "Bullets, lists (prose)", + "scope": [ + "beginning.punctuation.definition.list.markdown", + "beginning.punctuation.definition.quote.markdown", + "punctuation.definition.link.restructuredtext" + ], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Inline code (prose)", + "scope": ["markup.inline.raw", "markup.raw.restructuredtext"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Links (prose)", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Link text, image alt text (prose)", + "scope": [ + "meta.link.reference.def.restructuredtext", + "punctuation.definition.directive.restructuredtext", + "string.other.link.description", + "string.other.link.title" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Blockquotes (prose)", + "scope": ["entity.name.directive.restructuredtext", "markup.quote"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "italic" + } + }, + { + "name": "Horizontal rule (prose)", + "scope": ["meta.separator.markdown"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Code blocks", + "scope": [ + "fenced_code.block.language", + "markup.raw.inner.restructuredtext", + "markup.fenced_code.block.markdown punctuation.definition.markdown" + ], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Prose constants", + "scope": ["punctuation.definition.constant.restructuredtext"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Braces in markdown headings", + "scope": [ + "markup.heading.markdown punctuation.definition.string.begin", + "markup.heading.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Braces in markdown paragraphs", + "scope": [ + "meta.paragraph.markdown punctuation.definition.string.begin", + "meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Braces in markdown blockquotes", + "scope": [ + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.begin", + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "User-defined class names", + "scope": ["entity.name.type.class", "entity.name.class"], + "settings": { + "foreground": "#8BE9FD", + "fontStyle": "normal" + } + }, + { + "name": "this, super, self, etc.", + "scope": [ + "keyword.expressions-and-types.swift", + "keyword.other.this", + "variable.language", + "variable.language punctuation.definition.variable.php", + "variable.other.readwrite.instance.ruby", + "variable.parameter.function.language.special" + ], + "settings": { + "foreground": "#BD93F9", + "fontStyle": "italic" + } + }, + { + "name": "Inherited classes", + "scope": ["entity.other.inherited-class"], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Comments", + "scope": [ + "comment", + "punctuation.definition.comment", + "unused.comment", + "wildcard.comment" + ], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "JSDoc-style keywords", + "scope": [ + "comment keyword.codetag.notation", + "comment.block.documentation keyword", + "comment.block.documentation storage.type.class" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "JSDoc-style types", + "scope": ["comment.block.documentation entity.name.type"], + "settings": { + "foreground": "#8BE9FD", + "fontStyle": "italic" + } + }, + { + "name": "JSDoc-style type brackets", + "scope": [ + "comment.block.documentation entity.name.type punctuation.definition.bracket" + ], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "JSDoc-style comment parameters", + "scope": ["comment.block.documentation variable"], + "settings": { + "foreground": "#FFB86C", + "fontStyle": "italic" + } + }, + { + "name": "Constants", + "scope": ["constant", "variable.other.constant"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Constant escape sequences", + "scope": [ + "constant.character.escape", + "constant.character.string.escape", + "constant.regexp" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "HTML tags", + "scope": ["entity.name.tag"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "CSS attribute parent selectors ('&')", + "scope": ["entity.other.attribute-name.parent-selector"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "HTML/CSS attribute names", + "scope": ["entity.other.attribute-name"], + "settings": { + "foreground": "#50FA7B", + "fontStyle": "italic" + } + }, + { + "name": "Function names", + "scope": [ + "entity.name.function", + "meta.function-call.object", + "meta.function-call.php", + "meta.function-call.static", + "meta.method-call.java meta.method", + "meta.method.groovy", + "support.function.any-method.lua", + "keyword.operator.function.infix" + ], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Function parameters", + "scope": [ + "entity.name.variable.parameter", + "meta.at-rule.function variable", + "meta.at-rule.mixin variable", + "meta.function.arguments variable.other.php", + "meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql", + "variable.parameter" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Decorators", + "scope": [ + "meta.decorator variable.other.readwrite", + "meta.decorator variable.other.property" + ], + "settings": { + "foreground": "#50FA7B", + "fontStyle": "italic" + } + }, + { + "name": "Decorator Objects", + "scope": ["meta.decorator variable.other.object"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Keywords", + "scope": ["keyword", "punctuation.definition.keyword"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Keyword \"new\"", + "scope": ["keyword.control.new", "keyword.operator.new"], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Generic selectors (CSS/SCSS/Less/Stylus)", + "scope": ["meta.selector"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Language Built-ins", + "scope": ["support"], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Built-in magic functions and constants", + "scope": [ + "support.function.magic", + "support.variable", + "variable.other.predefined" + ], + "settings": { + "fontStyle": "regular", + "foreground": "#BD93F9" + } + }, + { + "name": "Built-in functions / properties", + "scope": ["support.function", "support.type.property-name"], + "settings": { + "fontStyle": "regular" + } + }, + { + "name": "Separators (key/value, namespace, inheritance, pointer, hash, slice, etc)", + "scope": [ + "constant.other.symbol.hashkey punctuation.definition.constant.ruby", + "entity.other.attribute-name.placeholder punctuation", + "entity.other.attribute-name.pseudo-class punctuation", + "entity.other.attribute-name.pseudo-element punctuation", + "meta.group.double.toml", + "meta.group.toml", + "meta.object-binding-pattern-variable punctuation.destructuring", + "punctuation.colon.graphql", + "punctuation.definition.block.scalar.folded.yaml", + "punctuation.definition.block.scalar.literal.yaml", + "punctuation.definition.block.sequence.item.yaml", + "punctuation.definition.entity.other.inherited-class", + "punctuation.function.swift", + "punctuation.separator.dictionary.key-value", + "punctuation.separator.hash", + "punctuation.separator.inheritance", + "punctuation.separator.key-value", + "punctuation.separator.key-value.mapping.yaml", + "punctuation.separator.namespace", + "punctuation.separator.pointer-access", + "punctuation.separator.slice", + "string.unquoted.heredoc punctuation.definition.string", + "support.other.chomping-indicator.yaml", + "punctuation.separator.annotation" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Brackets, braces, parens, etc.", + "scope": [ + "keyword.operator.other.powershell", + "keyword.other.statement-separator.powershell", + "meta.brace.round", + "meta.function-call punctuation", + "punctuation.definition.arguments.begin", + "punctuation.definition.arguments.end", + "punctuation.definition.entity.begin", + "punctuation.definition.entity.end", + "punctuation.definition.tag.cs", + "punctuation.definition.type.begin", + "punctuation.definition.type.end", + "punctuation.section.scope.begin", + "punctuation.section.scope.end", + "punctuation.terminator.expression.php", + "storage.type.generic.java", + "string.template meta.brace", + "string.template punctuation.accessor" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Variable interpolation operators", + "scope": [ + "meta.string-contents.quoted.double punctuation.definition.variable", + "punctuation.definition.interpolation.begin", + "punctuation.definition.interpolation.end", + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded.begin", + "punctuation.section.embedded.coffee", + "punctuation.section.embedded.end", + "punctuation.section.embedded.end source.php", + "punctuation.section.embedded.end source.ruby", + "punctuation.definition.variable.makefile" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Keys (serializable languages)", + "scope": [ + "entity.name.function.target.makefile", + "entity.name.section.toml", + "entity.name.tag.yaml", + "variable.other.key.toml" + ], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Dates / timestamps (serializable languages)", + "scope": ["constant.other.date", "constant.other.timestamp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "YAML aliases", + "scope": ["variable.other.alias.yaml"], + "settings": { + "fontStyle": "italic underline", + "foreground": "#50FA7B" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "meta.implementation storage.type.objc", + "meta.interface-or-protocol storage.type.objc", + "source.groovy storage.type.def" + ], + "settings": { + "fontStyle": "regular", + "foreground": "#FF79C6" + } + }, + { + "name": "Types", + "scope": [ + "entity.name.type", + "keyword.primitive-datatypes.swift", + "keyword.type.cs", + "meta.protocol-list.objc", + "meta.return-type.objc", + "source.go storage.type", + "source.groovy storage.type", + "source.java storage.type", + "source.powershell entity.other.attribute-name", + "storage.class.std.rust", + "storage.type.attribute.swift", + "storage.type.c", + "storage.type.core.rust", + "storage.type.cs", + "storage.type.groovy", + "storage.type.objc", + "storage.type.php", + "storage.type.haskell", + "storage.type.ocaml" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Generics, templates, and mapped type declarations", + "scope": [ + "entity.name.type.type-parameter", + "meta.indexer.mappedtype.declaration entity.name.type", + "meta.type.parameters entity.name.type" + ], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Modifiers", + "scope": ["storage.modifier"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "RegExp string", + "scope": [ + "string.regexp", + "constant.other.character-class.set.regexp", + "constant.character.escape.backslash.regexp" + ], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "Non-capture operators", + "scope": ["punctuation.definition.group.capture.regexp"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "RegExp start and end characters", + "scope": [ + "string.regexp punctuation.definition.string.begin", + "string.regexp punctuation.definition.string.end" + ], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Character group", + "scope": ["punctuation.definition.character-class.regexp"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Capture groups", + "scope": ["punctuation.definition.group.regexp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Assertion operators", + "scope": [ + "punctuation.definition.group.assertion.regexp", + "keyword.operator.negation.regexp" + ], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Positive lookaheads", + "scope": ["meta.assertion.look-ahead.regexp"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Strings", + "scope": ["string"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "String quotes (temporary vscode fix)", + "scope": [ + "punctuation.definition.string.begin", + "punctuation.definition.string.end" + ], + "settings": { + "foreground": "#E9F284" + } + }, + { + "name": "Property quotes (temporary vscode fix)", + "scope": [ + "punctuation.support.type.property-name.begin", + "punctuation.support.type.property-name.end" + ], + "settings": { + "foreground": "#8BE9FE" + } + }, + { + "name": "Docstrings", + "scope": [ + "string.quoted.docstring.multi", + "string.quoted.docstring.multi.python punctuation.definition.string.begin", + "string.quoted.docstring.multi.python punctuation.definition.string.end", + "string.quoted.docstring.multi.python constant.character.escape" + ], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Variables and object properties", + "scope": [ + "variable", + "constant.other.key.perl", + "support.variable.property", + "variable.other.constant.js", + "variable.other.constant.ts", + "variable.other.constant.tsx" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Destructuring / aliasing reference name (LHS)", + "scope": [ + "meta.import variable.other.readwrite", + "meta.variable.assignment.destructured.object.coffee variable" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Destructuring / aliasing variable name (RHS)", + "scope": [ + "meta.import variable.other.readwrite.alias", + "meta.export variable.other.readwrite.alias", + "meta.variable.assignment.destructured.object.coffee variable variable" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#F8F8F2" + } + }, + { + "name": "GraphQL keys", + "scope": ["meta.selectionset.graphql variable"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "GraphQL function arguments", + "scope": ["meta.selectionset.graphql meta.arguments variable"], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "GraphQL fragment name (definition)", + "scope": ["entity.name.fragment.graphql", "variable.fragment.graphql"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Edge cases (foreground color resets)", + "scope": [ + "constant.other.symbol.hashkey.ruby", + "keyword.operator.dereference.java", + "keyword.operator.navigation.groovy", + "meta.scope.for-loop.shell punctuation.definition.string.begin", + "meta.scope.for-loop.shell punctuation.definition.string.end", + "meta.scope.for-loop.shell string", + "storage.modifier.import", + "punctuation.section.embedded.begin.tsx", + "punctuation.section.embedded.end.tsx", + "punctuation.section.embedded.begin.jsx", + "punctuation.section.embedded.end.jsx", + "punctuation.separator.list.comma.css", + "constant.language.empty-list.haskell" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Shell variables prefixed with \"$\" (edge case)", + "scope": ["source.shell variable.other"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Powershell constants mistakenly scoped to `support`, rather than `constant` (edge)", + "scope": ["support.constant"], + "settings": { + "fontStyle": "normal", + "foreground": "#BD93F9" + } + }, + { + "name": "Makefile prerequisite names", + "scope": ["meta.scope.prerequisites.makefile"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "SCSS attibute selector strings", + "scope": ["meta.attribute-selector.scss"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "SCSS attribute selector brackets", + "scope": [ + "punctuation.definition.attribute-selector.end.bracket.square.scss", + "punctuation.definition.attribute-selector.begin.bracket.square.scss" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Haskell Pragmas", + "scope": ["meta.preprocessor.haskell"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Log file error", + "scope": ["log.error"], + "settings": { + "foreground": "#FF5555", + "fontStyle": "bold" + } + }, + { + "name": "Log file warning", + "scope": ["log.warning"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "bold" + } + } + ] +} diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs index 26850b5b78f046e3ee89ebd791488d88fd19bdbf..64b91e2150d86a9aec817d575aaa9cee40b686b9 100644 --- a/crates/theme2/src/import.rs +++ b/crates/theme2/src/import.rs @@ -1,254 +1,461 @@ -use crate::ThemeColorsRefinement; +use serde::Deserialize; -struct ImportedThemeFamily { - pub id: String, +#[derive(Deserialize, Debug)] +pub struct Theme { + #[serde(rename = "$schema")] + pub schema: String, pub name: String, pub author: String, - pub url: String, - pub license: String, - pub themes: Vec, + pub maintainers: Vec, + pub semantic_class: String, + pub semantic_highlighting: bool, + pub colors: VSCodeColors, } -struct ImportedThemeVariant { - pub id: String, - pub name: String, - pub colors: ThemeColorsRefinement, -} - -macro_rules! gen_vscode_colors_and_enum { - ($($name:ident: $type:ty),*) => { - #[derive(Debug)] - pub struct VSCodeColors { - $( - pub $name: $type, - )* - } - - pub enum VSCodeColor { - $( - $({ - let mut s = stringify!($name).to_string(); - s.get_mut(0..1).unwrap().make_ascii_uppercase(); - s.replace("_", "") - }), - )* - } - }; -} - -gen_vscode_colors_and_enum! { - terminal_background: String, - terminal_foreground: String -} - -#[derive(Debug)] +#[derive(Debug, Deserialize)] pub struct VSCodeColors { + #[serde(rename = "vsc_terminal_background")] terminal_background: String, + #[serde(rename = "vsc_terminal_foreground")] terminal_foreground: String, + #[serde(rename = "vsc_terminal_ansi_bright_black")] terminal_ansi_bright_black: String, + #[serde(rename = "vsc_terminal_ansi_bright_red")] terminal_ansi_bright_red: String, + #[serde(rename = "vsc_terminal_ansi_bright_green")] terminal_ansi_bright_green: String, + #[serde(rename = "vsc_terminal_ansi_bright_yellow")] terminal_ansi_bright_yellow: String, + #[serde(rename = "vsc_terminal_ansi_bright_blue")] terminal_ansi_bright_blue: String, + #[serde(rename = "vsc_terminal_ansi_bright_magenta")] terminal_ansi_bright_magenta: String, + #[serde(rename = "vsc_terminal_ansi_bright_cyan")] terminal_ansi_bright_cyan: String, + #[serde(rename = "vsc_terminal_ansi_bright_white")] terminal_ansi_bright_white: String, + #[serde(rename = "vsc_terminal_ansi_black")] terminal_ansi_black: String, + #[serde(rename = "vsc_terminal_ansi_red")] terminal_ansi_red: String, + #[serde(rename = "vsc_terminal_ansi_green")] terminal_ansi_green: String, + #[serde(rename = "vsc_terminal_ansi_yellow")] terminal_ansi_yellow: String, + #[serde(rename = "vsc_terminal_ansi_blue")] terminal_ansi_blue: String, + #[serde(rename = "vsc_terminal_ansi_magenta")] terminal_ansi_magenta: String, + #[serde(rename = "vsc_terminal_ansi_cyan")] terminal_ansi_cyan: String, + #[serde(rename = "vsc_terminal_ansi_white")] terminal_ansi_white: String, + #[serde(rename = "vsc_focus_border")] focus_border: String, + #[serde(rename = "vsc_foreground")] foreground: String, + #[serde(rename = "vsc_selection_background")] selection_background: String, + #[serde(rename = "vsc_error_foreground")] error_foreground: String, + #[serde(rename = "vsc_button_background")] button_background: String, + #[serde(rename = "vsc_button_foreground")] button_foreground: String, + #[serde(rename = "vsc_button_secondary_background")] button_secondary_background: String, + #[serde(rename = "vsc_button_secondary_foreground")] button_secondary_foreground: String, + #[serde(rename = "vsc_button_secondary_hover_background")] button_secondary_hover_background: String, + #[serde(rename = "vsc_dropdown_background")] dropdown_background: String, + #[serde(rename = "vsc_dropdown_border")] dropdown_border: String, + #[serde(rename = "vsc_dropdown_foreground")] dropdown_foreground: String, + #[serde(rename = "vsc_input_background")] input_background: String, + #[serde(rename = "vsc_input_foreground")] input_foreground: String, + #[serde(rename = "vsc_input_border")] input_border: String, + #[serde(rename = "vsc_input_placeholder_foreground")] input_placeholder_foreground: String, + #[serde(rename = "vsc_input_option_active_border")] input_option_active_border: String, + #[serde(rename = "vsc_input_validation_info_border")] input_validation_info_border: String, + #[serde(rename = "vsc_input_validation_warning_border")] input_validation_warning_border: String, + #[serde(rename = "vsc_input_validation_error_border")] input_validation_error_border: String, + #[serde(rename = "vsc_badge_foreground")] badge_foreground: String, + #[serde(rename = "vsc_badge_background")] badge_background: String, + #[serde(rename = "vsc_progress_bar_background")] progress_bar_background: String, + #[serde(rename = "vsc_list_active_selection_background")] list_active_selection_background: String, + #[serde(rename = "vsc_list_active_selection_foreground")] list_active_selection_foreground: String, + #[serde(rename = "vsc_list_drop_background")] list_drop_background: String, + #[serde(rename = "vsc_list_focus_background")] list_focus_background: String, + #[serde(rename = "vsc_list_highlight_foreground")] list_highlight_foreground: String, + #[serde(rename = "vsc_list_hover_background")] list_hover_background: String, + #[serde(rename = "vsc_list_inactive_selection_background")] list_inactive_selection_background: String, + #[serde(rename = "vsc_list_warning_foreground")] list_warning_foreground: String, + #[serde(rename = "vsc_list_error_foreground")] list_error_foreground: String, + #[serde(rename = "vsc_activity_bar_background")] activity_bar_background: String, + #[serde(rename = "vsc_activity_bar_inactive_foreground")] activity_bar_inactive_foreground: String, + #[serde(rename = "vsc_activity_bar_foreground")] activity_bar_foreground: String, + #[serde(rename = "vsc_activity_bar_active_border")] activity_bar_active_border: String, + #[serde(rename = "vsc_activity_bar_active_background")] activity_bar_active_background: String, + #[serde(rename = "vsc_activity_bar_badge_background")] activity_bar_badge_background: String, + #[serde(rename = "vsc_activity_bar_badge_foreground")] activity_bar_badge_foreground: String, + #[serde(rename = "vsc_side_bar_background")] side_bar_background: String, + #[serde(rename = "vsc_side_bar_title_foreground")] side_bar_title_foreground: String, + #[serde(rename = "vsc_side_bar_section_header_background")] side_bar_section_header_background: String, + #[serde(rename = "vsc_side_bar_section_header_border")] side_bar_section_header_border: String, + #[serde(rename = "vsc_editor_group_border")] editor_group_border: String, + #[serde(rename = "vsc_editor_group_drop_background")] editor_group_drop_background: String, + #[serde(rename = "vsc_editor_group_header_tabs_background")] editor_group_header_tabs_background: String, + #[serde(rename = "vsc_tab_active_background")] tab_active_background: String, + #[serde(rename = "vsc_tab_active_foreground")] tab_active_foreground: String, + #[serde(rename = "vsc_tab_border")] tab_border: String, + #[serde(rename = "vsc_tab_active_border_top")] tab_active_border_top: String, + #[serde(rename = "vsc_tab_inactive_background")] tab_inactive_background: String, + #[serde(rename = "vsc_tab_inactive_foreground")] tab_inactive_foreground: String, + #[serde(rename = "vsc_editor_foreground")] editor_foreground: String, + #[serde(rename = "vsc_editor_background")] editor_background: String, + #[serde(rename = "vsc_editor_line_number_foreground")] editor_line_number_foreground: String, + #[serde(rename = "vsc_editor_selection_background")] editor_selection_background: String, + #[serde(rename = "vsc_editor_selection_highlight_background")] editor_selection_highlight_background: String, + #[serde(rename = "vsc_editor_fold_background")] editor_fold_background: String, + #[serde(rename = "vsc_editor_word_highlight_background")] editor_word_highlight_background: String, + #[serde(rename = "vsc_editor_word_highlight_strong_background")] editor_word_highlight_strong_background: String, + #[serde(rename = "vsc_editor_find_match_background")] editor_find_match_background: String, + #[serde(rename = "vsc_editor_find_match_highlight_background")] editor_find_match_highlight_background: String, + #[serde(rename = "vsc_editor_find_range_highlight_background")] editor_find_range_highlight_background: String, + #[serde(rename = "vsc_editor_hover_highlight_background")] editor_hover_highlight_background: String, + #[serde(rename = "vsc_editor_line_highlight_border")] editor_line_highlight_border: String, + #[serde(rename = "vsc_editor_link_active_foreground")] editor_link_active_foreground: String, + #[serde(rename = "vsc_editor_range_highlight_background")] editor_range_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] editor_snippet_tabstop_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] editor_snippet_tabstop_highlight_border: String, + #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] editor_snippet_final_tabstop_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] editor_snippet_final_tabstop_highlight_border: String, + #[serde(rename = "vsc_editor_whitespace_foreground")] editor_whitespace_foreground: String, + #[serde(rename = "vsc_editor_indent_guide_background")] editor_indent_guide_background: String, + #[serde(rename = "vsc_editor_indent_guide_active_background")] editor_indent_guide_active_background: String, + #[serde(rename = "vsc_editor_ruler_foreground")] editor_ruler_foreground: String, + #[serde(rename = "vsc_editor_code_lens_foreground")] editor_code_lens_foreground: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] editor_bracket_highlight_foreground1: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] editor_bracket_highlight_foreground2: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] editor_bracket_highlight_foreground3: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] editor_bracket_highlight_foreground4: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] editor_bracket_highlight_foreground5: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] editor_bracket_highlight_foreground6: String, + #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] editor_bracket_highlight_unexpected_bracket_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_border")] editor_overview_ruler_border: String, + #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] editor_overview_ruler_selection_highlight_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] editor_overview_ruler_word_highlight_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] editor_overview_ruler_word_highlight_strong_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] editor_overview_ruler_modified_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] editor_overview_ruler_added_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] editor_overview_ruler_deleted_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] editor_overview_ruler_error_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] editor_overview_ruler_warning_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] editor_overview_ruler_info_foreground: String, + #[serde(rename = "vsc_editor_error_foreground")] editor_error_foreground: String, + #[serde(rename = "vsc_editor_warning_foreground")] editor_warning_foreground: String, + #[serde(rename = "vsc_editor_gutter_modified_background")] editor_gutter_modified_background: String, + #[serde(rename = "vsc_editor_gutter_added_background")] editor_gutter_added_background: String, + #[serde(rename = "vsc_editor_gutter_deleted_background")] editor_gutter_deleted_background: String, + #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] git_decoration_modified_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] git_decoration_deleted_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] git_decoration_untracked_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] git_decoration_ignored_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] git_decoration_conflicting_resource_foreground: String, + #[serde(rename = "vsc_diff_editor_inserted_text_background")] diff_editor_inserted_text_background: String, + #[serde(rename = "vsc_diff_editor_removed_text_background")] diff_editor_removed_text_background: String, + #[serde(rename = "vsc_inline_chat_region_highlight")] inline_chat_region_highlight: String, + #[serde(rename = "vsc_editor_widget_background")] editor_widget_background: String, + #[serde(rename = "vsc_editor_suggest_widget_background")] editor_suggest_widget_background: String, + #[serde(rename = "vsc_editor_suggest_widget_foreground")] editor_suggest_widget_foreground: String, + #[serde(rename = "vsc_editor_suggest_widget_selected_background")] editor_suggest_widget_selected_background: String, + #[serde(rename = "vsc_editor_hover_widget_background")] editor_hover_widget_background: String, + #[serde(rename = "vsc_editor_hover_widget_border")] editor_hover_widget_border: String, + #[serde(rename = "vsc_editor_marker_navigation_background")] editor_marker_navigation_background: String, + #[serde(rename = "vsc_peek_view_border")] peek_view_border: String, + #[serde(rename = "vsc_peek_view_editor_background")] peek_view_editor_background: String, + #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] peek_view_editor_match_highlight_background: String, + #[serde(rename = "vsc_peek_view_result_background")] peek_view_result_background: String, + #[serde(rename = "vsc_peek_view_result_file_foreground")] peek_view_result_file_foreground: String, + #[serde(rename = "vsc_peek_view_result_line_foreground")] peek_view_result_line_foreground: String, + #[serde(rename = "vsc_peek_view_result_match_highlight_background")] peek_view_result_match_highlight_background: String, + #[serde(rename = "vsc_peek_view_result_selection_background")] peek_view_result_selection_background: String, + #[serde(rename = "vsc_peek_view_result_selection_foreground")] peek_view_result_selection_foreground: String, + #[serde(rename = "vsc_peek_view_title_background")] peek_view_title_background: String, + #[serde(rename = "vsc_peek_view_title_description_foreground")] peek_view_title_description_foreground: String, + #[serde(rename = "vsc_peek_view_title_label_foreground")] peek_view_title_label_foreground: String, + #[serde(rename = "vsc_merge_current_header_background")] merge_current_header_background: String, + #[serde(rename = "vsc_merge_incoming_header_background")] merge_incoming_header_background: String, + #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] editor_overview_ruler_current_content_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] editor_overview_ruler_incoming_content_foreground: String, + #[serde(rename = "vsc_panel_background")] panel_background: String, + #[serde(rename = "vsc_panel_border")] panel_border: String, + #[serde(rename = "vsc_panel_title_active_border")] panel_title_active_border: String, + #[serde(rename = "vsc_panel_title_active_foreground")] panel_title_active_foreground: String, + #[serde(rename = "vsc_panel_title_inactive_foreground")] panel_title_inactive_foreground: String, + #[serde(rename = "vsc_status_bar_background")] status_bar_background: String, + #[serde(rename = "vsc_status_bar_foreground")] status_bar_foreground: String, + #[serde(rename = "vsc_status_bar_debugging_background")] status_bar_debugging_background: String, + #[serde(rename = "vsc_status_bar_debugging_foreground")] status_bar_debugging_foreground: String, + #[serde(rename = "vsc_status_bar_no_folder_background")] status_bar_no_folder_background: String, + #[serde(rename = "vsc_status_bar_no_folder_foreground")] status_bar_no_folder_foreground: String, + #[serde(rename = "vsc_status_bar_item_prominent_background")] status_bar_item_prominent_background: String, + #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] status_bar_item_prominent_hover_background: String, + #[serde(rename = "vsc_status_bar_item_remote_foreground")] status_bar_item_remote_foreground: String, + #[serde(rename = "vsc_status_bar_item_remote_background")] status_bar_item_remote_background: String, + #[serde(rename = "vsc_title_bar_active_background")] title_bar_active_background: String, + #[serde(rename = "vsc_title_bar_active_foreground")] title_bar_active_foreground: String, + #[serde(rename = "vsc_title_bar_inactive_background")] title_bar_inactive_background: String, + #[serde(rename = "vsc_title_bar_inactive_foreground")] title_bar_inactive_foreground: String, + #[serde(rename = "vsc_extension_button_prominent_foreground")] extension_button_prominent_foreground: String, + #[serde(rename = "vsc_extension_button_prominent_background")] extension_button_prominent_background: String, + #[serde(rename = "vsc_extension_button_prominent_hover_background")] extension_button_prominent_hover_background: String, + #[serde(rename = "vsc_picker_group_border")] picker_group_border: String, + #[serde(rename = "vsc_picker_group_foreground")] picker_group_foreground: String, + #[serde(rename = "vsc_debug_tool_bar_background")] debug_tool_bar_background: String, + #[serde(rename = "vsc_walk_through_embedded_editor_background")] walk_through_embedded_editor_background: String, + #[serde(rename = "vsc_settings_header_foreground")] settings_header_foreground: String, + #[serde(rename = "vsc_settings_modified_item_indicator")] settings_modified_item_indicator: String, + #[serde(rename = "vsc_settings_dropdown_background")] settings_dropdown_background: String, + #[serde(rename = "vsc_settings_dropdown_foreground")] settings_dropdown_foreground: String, + #[serde(rename = "vsc_settings_dropdown_border")] settings_dropdown_border: String, + #[serde(rename = "vsc_settings_checkbox_background")] settings_checkbox_background: String, + #[serde(rename = "vsc_settings_checkbox_foreground")] settings_checkbox_foreground: String, + #[serde(rename = "vsc_settings_checkbox_border")] settings_checkbox_border: String, + #[serde(rename = "vsc_settings_text_input_background")] settings_text_input_background: String, + #[serde(rename = "vsc_settings_text_input_foreground")] settings_text_input_foreground: String, + #[serde(rename = "vsc_settings_text_input_border")] settings_text_input_border: String, + #[serde(rename = "vsc_settings_number_input_background")] settings_number_input_background: String, + #[serde(rename = "vsc_settings_number_input_foreground")] settings_number_input_foreground: String, + #[serde(rename = "vsc_settings_number_input_border")] settings_number_input_border: String, + #[serde(rename = "vsc_breadcrumb_foreground")] breadcrumb_foreground: String, + #[serde(rename = "vsc_breadcrumb_background")] breadcrumb_background: String, + #[serde(rename = "vsc_breadcrumb_focus_foreground")] breadcrumb_focus_foreground: String, + #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] breadcrumb_active_selection_foreground: String, + #[serde(rename = "vsc_breadcrumb_picker_background")] breadcrumb_picker_background: String, + #[serde(rename = "vsc_list_filter_widget_background")] list_filter_widget_background: String, + #[serde(rename = "vsc_list_filter_widget_outline")] list_filter_widget_outline: String, + #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] list_filter_widget_no_matches_outline: String, } -pub fn try_vscode_colors_to_theme_colors(colors: VSCodeColors) -> ThemeColorsRefinement { - let mut theme_colors = ThemeColorsRefinement::default(); +#[cfg(test)] +mod tests { + use super::*; + use std::path::PathBuf; - theme_colors -} + #[test] + fn test_deserialize_dracula() { + let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); -pub fn vscode_colors_to_theme_colors(color: String) -> ThemeColorsRefinement { - ThemeColorsRefinement { - text: Some(color), - ..Default::default() + let mut d = root_dir.to_path_buf(); + d.push("assets/themes/src/vsc/dracula/dracula.json"); + + let data = std::fs::read_to_string(d).expect("Unable to read file"); + + let result: Theme = serde_json::from_str(&data).unwrap(); + println!("{:#?}", result); + + // Uncomment the following lines to print specific fields + println!("Name: {:?}", result.name); + println!("Author: {:?}", result.author); } } + +// use crate::ThemeColorsRefinement; + +// struct ImportedThemeFamily { +// pub id: String, +// pub name: String, +// pub author: String, +// pub url: String, +// pub license: String, +// pub themes: Vec, +// } + +// struct ImportedThemeVariant { +// pub id: String, +// pub name: String, +// pub colors: ThemeColorsRefinement, +// } + +// pub fn try_vscode_colors_to_theme_colors(colors: VSCodeColors) -> ThemeColorsRefinement { +// let mut theme_colors = ThemeColorsRefinement::default(); + +// theme_colors +// } + +// pub fn vscode_colors_to_theme_colors(color: String) -> ThemeColorsRefinement { +// ThemeColorsRefinement { +// text: Some(color), +// ..Default::default() +// } +// } From 972f076b4de20449400f03355909b9e6d42b67c8 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 16:31:22 -0400 Subject: [PATCH 004/110] Deserialize theme metadata --- crates/theme2/src/import.rs | 790 ++++++++++++++++++------------------ 1 file changed, 400 insertions(+), 390 deletions(-) diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs index 64b91e2150d86a9aec817d575aaa9cee40b686b9..6fe1fc705b32b741b74e4dd1ac36e729fd77e3cb 100644 --- a/crates/theme2/src/import.rs +++ b/crates/theme2/src/import.rs @@ -7,403 +7,19 @@ pub struct Theme { pub name: String, pub author: String, pub maintainers: Vec, + #[serde(rename = "semanticClass")] pub semantic_class: String, + #[serde(rename = "semanticHighlighting")] pub semantic_highlighting: bool, - pub colors: VSCodeColors, + // pub colors: VSCodeColors, } #[derive(Debug, Deserialize)] pub struct VSCodeColors { - #[serde(rename = "vsc_terminal_background")] - terminal_background: String, - #[serde(rename = "vsc_terminal_foreground")] - terminal_foreground: String, - #[serde(rename = "vsc_terminal_ansi_bright_black")] - terminal_ansi_bright_black: String, - #[serde(rename = "vsc_terminal_ansi_bright_red")] - terminal_ansi_bright_red: String, - #[serde(rename = "vsc_terminal_ansi_bright_green")] - terminal_ansi_bright_green: String, - #[serde(rename = "vsc_terminal_ansi_bright_yellow")] - terminal_ansi_bright_yellow: String, - #[serde(rename = "vsc_terminal_ansi_bright_blue")] - terminal_ansi_bright_blue: String, - #[serde(rename = "vsc_terminal_ansi_bright_magenta")] - terminal_ansi_bright_magenta: String, - #[serde(rename = "vsc_terminal_ansi_bright_cyan")] - terminal_ansi_bright_cyan: String, - #[serde(rename = "vsc_terminal_ansi_bright_white")] - terminal_ansi_bright_white: String, - #[serde(rename = "vsc_terminal_ansi_black")] - terminal_ansi_black: String, - #[serde(rename = "vsc_terminal_ansi_red")] - terminal_ansi_red: String, - #[serde(rename = "vsc_terminal_ansi_green")] - terminal_ansi_green: String, - #[serde(rename = "vsc_terminal_ansi_yellow")] - terminal_ansi_yellow: String, - #[serde(rename = "vsc_terminal_ansi_blue")] - terminal_ansi_blue: String, - #[serde(rename = "vsc_terminal_ansi_magenta")] - terminal_ansi_magenta: String, - #[serde(rename = "vsc_terminal_ansi_cyan")] - terminal_ansi_cyan: String, - #[serde(rename = "vsc_terminal_ansi_white")] - terminal_ansi_white: String, - #[serde(rename = "vsc_focus_border")] - focus_border: String, - #[serde(rename = "vsc_foreground")] - foreground: String, - #[serde(rename = "vsc_selection_background")] - selection_background: String, - #[serde(rename = "vsc_error_foreground")] - error_foreground: String, - #[serde(rename = "vsc_button_background")] - button_background: String, - #[serde(rename = "vsc_button_foreground")] - button_foreground: String, - #[serde(rename = "vsc_button_secondary_background")] - button_secondary_background: String, - #[serde(rename = "vsc_button_secondary_foreground")] - button_secondary_foreground: String, - #[serde(rename = "vsc_button_secondary_hover_background")] - button_secondary_hover_background: String, - #[serde(rename = "vsc_dropdown_background")] - dropdown_background: String, - #[serde(rename = "vsc_dropdown_border")] - dropdown_border: String, - #[serde(rename = "vsc_dropdown_foreground")] - dropdown_foreground: String, - #[serde(rename = "vsc_input_background")] - input_background: String, - #[serde(rename = "vsc_input_foreground")] - input_foreground: String, - #[serde(rename = "vsc_input_border")] - input_border: String, - #[serde(rename = "vsc_input_placeholder_foreground")] - input_placeholder_foreground: String, - #[serde(rename = "vsc_input_option_active_border")] - input_option_active_border: String, - #[serde(rename = "vsc_input_validation_info_border")] - input_validation_info_border: String, - #[serde(rename = "vsc_input_validation_warning_border")] - input_validation_warning_border: String, - #[serde(rename = "vsc_input_validation_error_border")] - input_validation_error_border: String, - #[serde(rename = "vsc_badge_foreground")] - badge_foreground: String, - #[serde(rename = "vsc_badge_background")] - badge_background: String, - #[serde(rename = "vsc_progress_bar_background")] - progress_bar_background: String, - #[serde(rename = "vsc_list_active_selection_background")] - list_active_selection_background: String, - #[serde(rename = "vsc_list_active_selection_foreground")] - list_active_selection_foreground: String, - #[serde(rename = "vsc_list_drop_background")] - list_drop_background: String, - #[serde(rename = "vsc_list_focus_background")] - list_focus_background: String, - #[serde(rename = "vsc_list_highlight_foreground")] - list_highlight_foreground: String, - #[serde(rename = "vsc_list_hover_background")] - list_hover_background: String, - #[serde(rename = "vsc_list_inactive_selection_background")] - list_inactive_selection_background: String, - #[serde(rename = "vsc_list_warning_foreground")] - list_warning_foreground: String, - #[serde(rename = "vsc_list_error_foreground")] - list_error_foreground: String, - #[serde(rename = "vsc_activity_bar_background")] - activity_bar_background: String, - #[serde(rename = "vsc_activity_bar_inactive_foreground")] - activity_bar_inactive_foreground: String, - #[serde(rename = "vsc_activity_bar_foreground")] - activity_bar_foreground: String, - #[serde(rename = "vsc_activity_bar_active_border")] - activity_bar_active_border: String, - #[serde(rename = "vsc_activity_bar_active_background")] - activity_bar_active_background: String, - #[serde(rename = "vsc_activity_bar_badge_background")] - activity_bar_badge_background: String, - #[serde(rename = "vsc_activity_bar_badge_foreground")] - activity_bar_badge_foreground: String, - #[serde(rename = "vsc_side_bar_background")] - side_bar_background: String, - #[serde(rename = "vsc_side_bar_title_foreground")] - side_bar_title_foreground: String, - #[serde(rename = "vsc_side_bar_section_header_background")] - side_bar_section_header_background: String, - #[serde(rename = "vsc_side_bar_section_header_border")] - side_bar_section_header_border: String, - #[serde(rename = "vsc_editor_group_border")] - editor_group_border: String, - #[serde(rename = "vsc_editor_group_drop_background")] - editor_group_drop_background: String, - #[serde(rename = "vsc_editor_group_header_tabs_background")] - editor_group_header_tabs_background: String, - #[serde(rename = "vsc_tab_active_background")] - tab_active_background: String, - #[serde(rename = "vsc_tab_active_foreground")] - tab_active_foreground: String, - #[serde(rename = "vsc_tab_border")] - tab_border: String, - #[serde(rename = "vsc_tab_active_border_top")] - tab_active_border_top: String, - #[serde(rename = "vsc_tab_inactive_background")] - tab_inactive_background: String, - #[serde(rename = "vsc_tab_inactive_foreground")] - tab_inactive_foreground: String, - #[serde(rename = "vsc_editor_foreground")] - editor_foreground: String, - #[serde(rename = "vsc_editor_background")] + #[serde(rename = "editor_foreground")] + text: String, + #[serde(rename = "editor")] editor_background: String, - #[serde(rename = "vsc_editor_line_number_foreground")] - editor_line_number_foreground: String, - #[serde(rename = "vsc_editor_selection_background")] - editor_selection_background: String, - #[serde(rename = "vsc_editor_selection_highlight_background")] - editor_selection_highlight_background: String, - #[serde(rename = "vsc_editor_fold_background")] - editor_fold_background: String, - #[serde(rename = "vsc_editor_word_highlight_background")] - editor_word_highlight_background: String, - #[serde(rename = "vsc_editor_word_highlight_strong_background")] - editor_word_highlight_strong_background: String, - #[serde(rename = "vsc_editor_find_match_background")] - editor_find_match_background: String, - #[serde(rename = "vsc_editor_find_match_highlight_background")] - editor_find_match_highlight_background: String, - #[serde(rename = "vsc_editor_find_range_highlight_background")] - editor_find_range_highlight_background: String, - #[serde(rename = "vsc_editor_hover_highlight_background")] - editor_hover_highlight_background: String, - #[serde(rename = "vsc_editor_line_highlight_border")] - editor_line_highlight_border: String, - #[serde(rename = "vsc_editor_link_active_foreground")] - editor_link_active_foreground: String, - #[serde(rename = "vsc_editor_range_highlight_background")] - editor_range_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] - editor_snippet_tabstop_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] - editor_snippet_tabstop_highlight_border: String, - #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] - editor_snippet_final_tabstop_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] - editor_snippet_final_tabstop_highlight_border: String, - #[serde(rename = "vsc_editor_whitespace_foreground")] - editor_whitespace_foreground: String, - #[serde(rename = "vsc_editor_indent_guide_background")] - editor_indent_guide_background: String, - #[serde(rename = "vsc_editor_indent_guide_active_background")] - editor_indent_guide_active_background: String, - #[serde(rename = "vsc_editor_ruler_foreground")] - editor_ruler_foreground: String, - #[serde(rename = "vsc_editor_code_lens_foreground")] - editor_code_lens_foreground: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] - editor_bracket_highlight_foreground1: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] - editor_bracket_highlight_foreground2: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] - editor_bracket_highlight_foreground3: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] - editor_bracket_highlight_foreground4: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] - editor_bracket_highlight_foreground5: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] - editor_bracket_highlight_foreground6: String, - #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] - editor_bracket_highlight_unexpected_bracket_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_border")] - editor_overview_ruler_border: String, - #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] - editor_overview_ruler_selection_highlight_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] - editor_overview_ruler_word_highlight_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] - editor_overview_ruler_word_highlight_strong_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] - editor_overview_ruler_modified_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] - editor_overview_ruler_added_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] - editor_overview_ruler_deleted_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] - editor_overview_ruler_error_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] - editor_overview_ruler_warning_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] - editor_overview_ruler_info_foreground: String, - #[serde(rename = "vsc_editor_error_foreground")] - editor_error_foreground: String, - #[serde(rename = "vsc_editor_warning_foreground")] - editor_warning_foreground: String, - #[serde(rename = "vsc_editor_gutter_modified_background")] - editor_gutter_modified_background: String, - #[serde(rename = "vsc_editor_gutter_added_background")] - editor_gutter_added_background: String, - #[serde(rename = "vsc_editor_gutter_deleted_background")] - editor_gutter_deleted_background: String, - #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] - git_decoration_modified_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] - git_decoration_deleted_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] - git_decoration_untracked_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] - git_decoration_ignored_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] - git_decoration_conflicting_resource_foreground: String, - #[serde(rename = "vsc_diff_editor_inserted_text_background")] - diff_editor_inserted_text_background: String, - #[serde(rename = "vsc_diff_editor_removed_text_background")] - diff_editor_removed_text_background: String, - #[serde(rename = "vsc_inline_chat_region_highlight")] - inline_chat_region_highlight: String, - #[serde(rename = "vsc_editor_widget_background")] - editor_widget_background: String, - #[serde(rename = "vsc_editor_suggest_widget_background")] - editor_suggest_widget_background: String, - #[serde(rename = "vsc_editor_suggest_widget_foreground")] - editor_suggest_widget_foreground: String, - #[serde(rename = "vsc_editor_suggest_widget_selected_background")] - editor_suggest_widget_selected_background: String, - #[serde(rename = "vsc_editor_hover_widget_background")] - editor_hover_widget_background: String, - #[serde(rename = "vsc_editor_hover_widget_border")] - editor_hover_widget_border: String, - #[serde(rename = "vsc_editor_marker_navigation_background")] - editor_marker_navigation_background: String, - #[serde(rename = "vsc_peek_view_border")] - peek_view_border: String, - #[serde(rename = "vsc_peek_view_editor_background")] - peek_view_editor_background: String, - #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] - peek_view_editor_match_highlight_background: String, - #[serde(rename = "vsc_peek_view_result_background")] - peek_view_result_background: String, - #[serde(rename = "vsc_peek_view_result_file_foreground")] - peek_view_result_file_foreground: String, - #[serde(rename = "vsc_peek_view_result_line_foreground")] - peek_view_result_line_foreground: String, - #[serde(rename = "vsc_peek_view_result_match_highlight_background")] - peek_view_result_match_highlight_background: String, - #[serde(rename = "vsc_peek_view_result_selection_background")] - peek_view_result_selection_background: String, - #[serde(rename = "vsc_peek_view_result_selection_foreground")] - peek_view_result_selection_foreground: String, - #[serde(rename = "vsc_peek_view_title_background")] - peek_view_title_background: String, - #[serde(rename = "vsc_peek_view_title_description_foreground")] - peek_view_title_description_foreground: String, - #[serde(rename = "vsc_peek_view_title_label_foreground")] - peek_view_title_label_foreground: String, - #[serde(rename = "vsc_merge_current_header_background")] - merge_current_header_background: String, - #[serde(rename = "vsc_merge_incoming_header_background")] - merge_incoming_header_background: String, - #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] - editor_overview_ruler_current_content_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] - editor_overview_ruler_incoming_content_foreground: String, - #[serde(rename = "vsc_panel_background")] - panel_background: String, - #[serde(rename = "vsc_panel_border")] - panel_border: String, - #[serde(rename = "vsc_panel_title_active_border")] - panel_title_active_border: String, - #[serde(rename = "vsc_panel_title_active_foreground")] - panel_title_active_foreground: String, - #[serde(rename = "vsc_panel_title_inactive_foreground")] - panel_title_inactive_foreground: String, - #[serde(rename = "vsc_status_bar_background")] - status_bar_background: String, - #[serde(rename = "vsc_status_bar_foreground")] - status_bar_foreground: String, - #[serde(rename = "vsc_status_bar_debugging_background")] - status_bar_debugging_background: String, - #[serde(rename = "vsc_status_bar_debugging_foreground")] - status_bar_debugging_foreground: String, - #[serde(rename = "vsc_status_bar_no_folder_background")] - status_bar_no_folder_background: String, - #[serde(rename = "vsc_status_bar_no_folder_foreground")] - status_bar_no_folder_foreground: String, - #[serde(rename = "vsc_status_bar_item_prominent_background")] - status_bar_item_prominent_background: String, - #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] - status_bar_item_prominent_hover_background: String, - #[serde(rename = "vsc_status_bar_item_remote_foreground")] - status_bar_item_remote_foreground: String, - #[serde(rename = "vsc_status_bar_item_remote_background")] - status_bar_item_remote_background: String, - #[serde(rename = "vsc_title_bar_active_background")] - title_bar_active_background: String, - #[serde(rename = "vsc_title_bar_active_foreground")] - title_bar_active_foreground: String, - #[serde(rename = "vsc_title_bar_inactive_background")] - title_bar_inactive_background: String, - #[serde(rename = "vsc_title_bar_inactive_foreground")] - title_bar_inactive_foreground: String, - #[serde(rename = "vsc_extension_button_prominent_foreground")] - extension_button_prominent_foreground: String, - #[serde(rename = "vsc_extension_button_prominent_background")] - extension_button_prominent_background: String, - #[serde(rename = "vsc_extension_button_prominent_hover_background")] - extension_button_prominent_hover_background: String, - #[serde(rename = "vsc_picker_group_border")] - picker_group_border: String, - #[serde(rename = "vsc_picker_group_foreground")] - picker_group_foreground: String, - #[serde(rename = "vsc_debug_tool_bar_background")] - debug_tool_bar_background: String, - #[serde(rename = "vsc_walk_through_embedded_editor_background")] - walk_through_embedded_editor_background: String, - #[serde(rename = "vsc_settings_header_foreground")] - settings_header_foreground: String, - #[serde(rename = "vsc_settings_modified_item_indicator")] - settings_modified_item_indicator: String, - #[serde(rename = "vsc_settings_dropdown_background")] - settings_dropdown_background: String, - #[serde(rename = "vsc_settings_dropdown_foreground")] - settings_dropdown_foreground: String, - #[serde(rename = "vsc_settings_dropdown_border")] - settings_dropdown_border: String, - #[serde(rename = "vsc_settings_checkbox_background")] - settings_checkbox_background: String, - #[serde(rename = "vsc_settings_checkbox_foreground")] - settings_checkbox_foreground: String, - #[serde(rename = "vsc_settings_checkbox_border")] - settings_checkbox_border: String, - #[serde(rename = "vsc_settings_text_input_background")] - settings_text_input_background: String, - #[serde(rename = "vsc_settings_text_input_foreground")] - settings_text_input_foreground: String, - #[serde(rename = "vsc_settings_text_input_border")] - settings_text_input_border: String, - #[serde(rename = "vsc_settings_number_input_background")] - settings_number_input_background: String, - #[serde(rename = "vsc_settings_number_input_foreground")] - settings_number_input_foreground: String, - #[serde(rename = "vsc_settings_number_input_border")] - settings_number_input_border: String, - #[serde(rename = "vsc_breadcrumb_foreground")] - breadcrumb_foreground: String, - #[serde(rename = "vsc_breadcrumb_background")] - breadcrumb_background: String, - #[serde(rename = "vsc_breadcrumb_focus_foreground")] - breadcrumb_focus_foreground: String, - #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] - breadcrumb_active_selection_foreground: String, - #[serde(rename = "vsc_breadcrumb_picker_background")] - breadcrumb_picker_background: String, - #[serde(rename = "vsc_list_filter_widget_background")] - list_filter_widget_background: String, - #[serde(rename = "vsc_list_filter_widget_outline")] - list_filter_widget_outline: String, - #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] - list_filter_widget_no_matches_outline: String, } #[cfg(test)] @@ -430,6 +46,400 @@ mod tests { } } +// #[derive(Debug, Deserialize)] +// pub struct VSCodeColors { +// #[serde(rename = "vsc_terminal_background")] +// terminal_background: String, +// #[serde(rename = "vsc_terminal_foreground")] +// terminal_foreground: String, +// #[serde(rename = "vsc_terminal_ansi_bright_black")] +// terminal_ansi_bright_black: String, +// #[serde(rename = "vsc_terminal_ansi_bright_red")] +// terminal_ansi_bright_red: String, +// #[serde(rename = "vsc_terminal_ansi_bright_green")] +// terminal_ansi_bright_green: String, +// #[serde(rename = "vsc_terminal_ansi_bright_yellow")] +// terminal_ansi_bright_yellow: String, +// #[serde(rename = "vsc_terminal_ansi_bright_blue")] +// terminal_ansi_bright_blue: String, +// #[serde(rename = "vsc_terminal_ansi_bright_magenta")] +// terminal_ansi_bright_magenta: String, +// #[serde(rename = "vsc_terminal_ansi_bright_cyan")] +// terminal_ansi_bright_cyan: String, +// #[serde(rename = "vsc_terminal_ansi_bright_white")] +// terminal_ansi_bright_white: String, +// #[serde(rename = "vsc_terminal_ansi_black")] +// terminal_ansi_black: String, +// #[serde(rename = "vsc_terminal_ansi_red")] +// terminal_ansi_red: String, +// #[serde(rename = "vsc_terminal_ansi_green")] +// terminal_ansi_green: String, +// #[serde(rename = "vsc_terminal_ansi_yellow")] +// terminal_ansi_yellow: String, +// #[serde(rename = "vsc_terminal_ansi_blue")] +// terminal_ansi_blue: String, +// #[serde(rename = "vsc_terminal_ansi_magenta")] +// terminal_ansi_magenta: String, +// #[serde(rename = "vsc_terminal_ansi_cyan")] +// terminal_ansi_cyan: String, +// #[serde(rename = "vsc_terminal_ansi_white")] +// terminal_ansi_white: String, +// #[serde(rename = "vsc_focus_border")] +// focus_border: String, +// #[serde(rename = "vsc_foreground")] +// foreground: String, +// #[serde(rename = "vsc_selection_background")] +// selection_background: String, +// #[serde(rename = "vsc_error_foreground")] +// error_foreground: String, +// #[serde(rename = "vsc_button_background")] +// button_background: String, +// #[serde(rename = "vsc_button_foreground")] +// button_foreground: String, +// #[serde(rename = "vsc_button_secondary_background")] +// button_secondary_background: String, +// #[serde(rename = "vsc_button_secondary_foreground")] +// button_secondary_foreground: String, +// #[serde(rename = "vsc_button_secondary_hover_background")] +// button_secondary_hover_background: String, +// #[serde(rename = "vsc_dropdown_background")] +// dropdown_background: String, +// #[serde(rename = "vsc_dropdown_border")] +// dropdown_border: String, +// #[serde(rename = "vsc_dropdown_foreground")] +// dropdown_foreground: String, +// #[serde(rename = "vsc_input_background")] +// input_background: String, +// #[serde(rename = "vsc_input_foreground")] +// input_foreground: String, +// #[serde(rename = "vsc_input_border")] +// input_border: String, +// #[serde(rename = "vsc_input_placeholder_foreground")] +// input_placeholder_foreground: String, +// #[serde(rename = "vsc_input_option_active_border")] +// input_option_active_border: String, +// #[serde(rename = "vsc_input_validation_info_border")] +// input_validation_info_border: String, +// #[serde(rename = "vsc_input_validation_warning_border")] +// input_validation_warning_border: String, +// #[serde(rename = "vsc_input_validation_error_border")] +// input_validation_error_border: String, +// #[serde(rename = "vsc_badge_foreground")] +// badge_foreground: String, +// #[serde(rename = "vsc_badge_background")] +// badge_background: String, +// #[serde(rename = "vsc_progress_bar_background")] +// progress_bar_background: String, +// #[serde(rename = "vsc_list_active_selection_background")] +// list_active_selection_background: String, +// #[serde(rename = "vsc_list_active_selection_foreground")] +// list_active_selection_foreground: String, +// #[serde(rename = "vsc_list_drop_background")] +// list_drop_background: String, +// #[serde(rename = "vsc_list_focus_background")] +// list_focus_background: String, +// #[serde(rename = "vsc_list_highlight_foreground")] +// list_highlight_foreground: String, +// #[serde(rename = "vsc_list_hover_background")] +// list_hover_background: String, +// #[serde(rename = "vsc_list_inactive_selection_background")] +// list_inactive_selection_background: String, +// #[serde(rename = "vsc_list_warning_foreground")] +// list_warning_foreground: String, +// #[serde(rename = "vsc_list_error_foreground")] +// list_error_foreground: String, +// #[serde(rename = "vsc_activity_bar_background")] +// activity_bar_background: String, +// #[serde(rename = "vsc_activity_bar_inactive_foreground")] +// activity_bar_inactive_foreground: String, +// #[serde(rename = "vsc_activity_bar_foreground")] +// activity_bar_foreground: String, +// #[serde(rename = "vsc_activity_bar_active_border")] +// activity_bar_active_border: String, +// #[serde(rename = "vsc_activity_bar_active_background")] +// activity_bar_active_background: String, +// #[serde(rename = "vsc_activity_bar_badge_background")] +// activity_bar_badge_background: String, +// #[serde(rename = "vsc_activity_bar_badge_foreground")] +// activity_bar_badge_foreground: String, +// #[serde(rename = "vsc_side_bar_background")] +// side_bar_background: String, +// #[serde(rename = "vsc_side_bar_title_foreground")] +// side_bar_title_foreground: String, +// #[serde(rename = "vsc_side_bar_section_header_background")] +// side_bar_section_header_background: String, +// #[serde(rename = "vsc_side_bar_section_header_border")] +// side_bar_section_header_border: String, +// #[serde(rename = "vsc_editor_group_border")] +// editor_group_border: String, +// #[serde(rename = "vsc_editor_group_drop_background")] +// editor_group_drop_background: String, +// #[serde(rename = "vsc_editor_group_header_tabs_background")] +// editor_group_header_tabs_background: String, +// #[serde(rename = "vsc_tab_active_background")] +// tab_active_background: String, +// #[serde(rename = "vsc_tab_active_foreground")] +// tab_active_foreground: String, +// #[serde(rename = "vsc_tab_border")] +// tab_border: String, +// #[serde(rename = "vsc_tab_active_border_top")] +// tab_active_border_top: String, +// #[serde(rename = "vsc_tab_inactive_background")] +// tab_inactive_background: String, +// #[serde(rename = "vsc_tab_inactive_foreground")] +// tab_inactive_foreground: String, +// #[serde(rename = "vsc_editor_foreground")] +// editor_foreground: String, +// #[serde(rename = "vsc_editor_background")] +// editor_background: String, +// #[serde(rename = "vsc_editor_line_number_foreground")] +// editor_line_number_foreground: String, +// #[serde(rename = "vsc_editor_selection_background")] +// editor_selection_background: String, +// #[serde(rename = "vsc_editor_selection_highlight_background")] +// editor_selection_highlight_background: String, +// #[serde(rename = "vsc_editor_fold_background")] +// editor_fold_background: String, +// #[serde(rename = "vsc_editor_word_highlight_background")] +// editor_word_highlight_background: String, +// #[serde(rename = "vsc_editor_word_highlight_strong_background")] +// editor_word_highlight_strong_background: String, +// #[serde(rename = "vsc_editor_find_match_background")] +// editor_find_match_background: String, +// #[serde(rename = "vsc_editor_find_match_highlight_background")] +// editor_find_match_highlight_background: String, +// #[serde(rename = "vsc_editor_find_range_highlight_background")] +// editor_find_range_highlight_background: String, +// #[serde(rename = "vsc_editor_hover_highlight_background")] +// editor_hover_highlight_background: String, +// #[serde(rename = "vsc_editor_line_highlight_border")] +// editor_line_highlight_border: String, +// #[serde(rename = "vsc_editor_link_active_foreground")] +// editor_link_active_foreground: String, +// #[serde(rename = "vsc_editor_range_highlight_background")] +// editor_range_highlight_background: String, +// #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] +// editor_snippet_tabstop_highlight_background: String, +// #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] +// editor_snippet_tabstop_highlight_border: String, +// #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] +// editor_snippet_final_tabstop_highlight_background: String, +// #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] +// editor_snippet_final_tabstop_highlight_border: String, +// #[serde(rename = "vsc_editor_whitespace_foreground")] +// editor_whitespace_foreground: String, +// #[serde(rename = "vsc_editor_indent_guide_background")] +// editor_indent_guide_background: String, +// #[serde(rename = "vsc_editor_indent_guide_active_background")] +// editor_indent_guide_active_background: String, +// #[serde(rename = "vsc_editor_ruler_foreground")] +// editor_ruler_foreground: String, +// #[serde(rename = "vsc_editor_code_lens_foreground")] +// editor_code_lens_foreground: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] +// editor_bracket_highlight_foreground1: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] +// editor_bracket_highlight_foreground2: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] +// editor_bracket_highlight_foreground3: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] +// editor_bracket_highlight_foreground4: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] +// editor_bracket_highlight_foreground5: String, +// #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] +// editor_bracket_highlight_foreground6: String, +// #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] +// editor_bracket_highlight_unexpected_bracket_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_border")] +// editor_overview_ruler_border: String, +// #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] +// editor_overview_ruler_selection_highlight_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] +// editor_overview_ruler_word_highlight_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] +// editor_overview_ruler_word_highlight_strong_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] +// editor_overview_ruler_modified_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] +// editor_overview_ruler_added_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] +// editor_overview_ruler_deleted_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] +// editor_overview_ruler_error_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] +// editor_overview_ruler_warning_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] +// editor_overview_ruler_info_foreground: String, +// #[serde(rename = "vsc_editor_error_foreground")] +// editor_error_foreground: String, +// #[serde(rename = "vsc_editor_warning_foreground")] +// editor_warning_foreground: String, +// #[serde(rename = "vsc_editor_gutter_modified_background")] +// editor_gutter_modified_background: String, +// #[serde(rename = "vsc_editor_gutter_added_background")] +// editor_gutter_added_background: String, +// #[serde(rename = "vsc_editor_gutter_deleted_background")] +// editor_gutter_deleted_background: String, +// #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] +// git_decoration_modified_resource_foreground: String, +// #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] +// git_decoration_deleted_resource_foreground: String, +// #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] +// git_decoration_untracked_resource_foreground: String, +// #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] +// git_decoration_ignored_resource_foreground: String, +// #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] +// git_decoration_conflicting_resource_foreground: String, +// #[serde(rename = "vsc_diff_editor_inserted_text_background")] +// diff_editor_inserted_text_background: String, +// #[serde(rename = "vsc_diff_editor_removed_text_background")] +// diff_editor_removed_text_background: String, +// #[serde(rename = "vsc_inline_chat_region_highlight")] +// inline_chat_region_highlight: String, +// #[serde(rename = "vsc_editor_widget_background")] +// editor_widget_background: String, +// #[serde(rename = "vsc_editor_suggest_widget_background")] +// editor_suggest_widget_background: String, +// #[serde(rename = "vsc_editor_suggest_widget_foreground")] +// editor_suggest_widget_foreground: String, +// #[serde(rename = "vsc_editor_suggest_widget_selected_background")] +// editor_suggest_widget_selected_background: String, +// #[serde(rename = "vsc_editor_hover_widget_background")] +// editor_hover_widget_background: String, +// #[serde(rename = "vsc_editor_hover_widget_border")] +// editor_hover_widget_border: String, +// #[serde(rename = "vsc_editor_marker_navigation_background")] +// editor_marker_navigation_background: String, +// #[serde(rename = "vsc_peek_view_border")] +// peek_view_border: String, +// #[serde(rename = "vsc_peek_view_editor_background")] +// peek_view_editor_background: String, +// #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] +// peek_view_editor_match_highlight_background: String, +// #[serde(rename = "vsc_peek_view_result_background")] +// peek_view_result_background: String, +// #[serde(rename = "vsc_peek_view_result_file_foreground")] +// peek_view_result_file_foreground: String, +// #[serde(rename = "vsc_peek_view_result_line_foreground")] +// peek_view_result_line_foreground: String, +// #[serde(rename = "vsc_peek_view_result_match_highlight_background")] +// peek_view_result_match_highlight_background: String, +// #[serde(rename = "vsc_peek_view_result_selection_background")] +// peek_view_result_selection_background: String, +// #[serde(rename = "vsc_peek_view_result_selection_foreground")] +// peek_view_result_selection_foreground: String, +// #[serde(rename = "vsc_peek_view_title_background")] +// peek_view_title_background: String, +// #[serde(rename = "vsc_peek_view_title_description_foreground")] +// peek_view_title_description_foreground: String, +// #[serde(rename = "vsc_peek_view_title_label_foreground")] +// peek_view_title_label_foreground: String, +// #[serde(rename = "vsc_merge_current_header_background")] +// merge_current_header_background: String, +// #[serde(rename = "vsc_merge_incoming_header_background")] +// merge_incoming_header_background: String, +// #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] +// editor_overview_ruler_current_content_foreground: String, +// #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] +// editor_overview_ruler_incoming_content_foreground: String, +// #[serde(rename = "vsc_panel_background")] +// panel_background: String, +// #[serde(rename = "vsc_panel_border")] +// panel_border: String, +// #[serde(rename = "vsc_panel_title_active_border")] +// panel_title_active_border: String, +// #[serde(rename = "vsc_panel_title_active_foreground")] +// panel_title_active_foreground: String, +// #[serde(rename = "vsc_panel_title_inactive_foreground")] +// panel_title_inactive_foreground: String, +// #[serde(rename = "vsc_status_bar_background")] +// status_bar_background: String, +// #[serde(rename = "vsc_status_bar_foreground")] +// status_bar_foreground: String, +// #[serde(rename = "vsc_status_bar_debugging_background")] +// status_bar_debugging_background: String, +// #[serde(rename = "vsc_status_bar_debugging_foreground")] +// status_bar_debugging_foreground: String, +// #[serde(rename = "vsc_status_bar_no_folder_background")] +// status_bar_no_folder_background: String, +// #[serde(rename = "vsc_status_bar_no_folder_foreground")] +// status_bar_no_folder_foreground: String, +// #[serde(rename = "vsc_status_bar_item_prominent_background")] +// status_bar_item_prominent_background: String, +// #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] +// status_bar_item_prominent_hover_background: String, +// #[serde(rename = "vsc_status_bar_item_remote_foreground")] +// status_bar_item_remote_foreground: String, +// #[serde(rename = "vsc_status_bar_item_remote_background")] +// status_bar_item_remote_background: String, +// #[serde(rename = "vsc_title_bar_active_background")] +// title_bar_active_background: String, +// #[serde(rename = "vsc_title_bar_active_foreground")] +// title_bar_active_foreground: String, +// #[serde(rename = "vsc_title_bar_inactive_background")] +// title_bar_inactive_background: String, +// #[serde(rename = "vsc_title_bar_inactive_foreground")] +// title_bar_inactive_foreground: String, +// #[serde(rename = "vsc_extension_button_prominent_foreground")] +// extension_button_prominent_foreground: String, +// #[serde(rename = "vsc_extension_button_prominent_background")] +// extension_button_prominent_background: String, +// #[serde(rename = "vsc_extension_button_prominent_hover_background")] +// extension_button_prominent_hover_background: String, +// #[serde(rename = "vsc_picker_group_border")] +// picker_group_border: String, +// #[serde(rename = "vsc_picker_group_foreground")] +// picker_group_foreground: String, +// #[serde(rename = "vsc_debug_tool_bar_background")] +// debug_tool_bar_background: String, +// #[serde(rename = "vsc_walk_through_embedded_editor_background")] +// walk_through_embedded_editor_background: String, +// #[serde(rename = "vsc_settings_header_foreground")] +// settings_header_foreground: String, +// #[serde(rename = "vsc_settings_modified_item_indicator")] +// settings_modified_item_indicator: String, +// #[serde(rename = "vsc_settings_dropdown_background")] +// settings_dropdown_background: String, +// #[serde(rename = "vsc_settings_dropdown_foreground")] +// settings_dropdown_foreground: String, +// #[serde(rename = "vsc_settings_dropdown_border")] +// settings_dropdown_border: String, +// #[serde(rename = "vsc_settings_checkbox_background")] +// settings_checkbox_background: String, +// #[serde(rename = "vsc_settings_checkbox_foreground")] +// settings_checkbox_foreground: String, +// #[serde(rename = "vsc_settings_checkbox_border")] +// settings_checkbox_border: String, +// #[serde(rename = "vsc_settings_text_input_background")] +// settings_text_input_background: String, +// #[serde(rename = "vsc_settings_text_input_foreground")] +// settings_text_input_foreground: String, +// #[serde(rename = "vsc_settings_text_input_border")] +// settings_text_input_border: String, +// #[serde(rename = "vsc_settings_number_input_background")] +// settings_number_input_background: String, +// #[serde(rename = "vsc_settings_number_input_foreground")] +// settings_number_input_foreground: String, +// #[serde(rename = "vsc_settings_number_input_border")] +// settings_number_input_border: String, +// #[serde(rename = "vsc_breadcrumb_foreground")] +// breadcrumb_foreground: String, +// #[serde(rename = "vsc_breadcrumb_background")] +// breadcrumb_background: String, +// #[serde(rename = "vsc_breadcrumb_focus_foreground")] +// breadcrumb_focus_foreground: String, +// #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] +// breadcrumb_active_selection_foreground: String, +// #[serde(rename = "vsc_breadcrumb_picker_background")] +// breadcrumb_picker_background: String, +// #[serde(rename = "vsc_list_filter_widget_background")] +// list_filter_widget_background: String, +// #[serde(rename = "vsc_list_filter_widget_outline")] +// list_filter_widget_outline: String, +// #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] +// list_filter_widget_no_matches_outline: String, +// } + // use crate::ThemeColorsRefinement; // struct ImportedThemeFamily { From 058981350c29ad96811abe385d8ded46488c0631 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 17:21:11 -0400 Subject: [PATCH 005/110] Scaffold out new `theme-importer` crate Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com> --- Cargo.lock | 15 + Cargo.toml | 1 + assets/themes/src/vsc/ayu/LICENSE | 21 + assets/themes/src/vsc/ayu/ayu-dark.json | 847 ++++++++++++++++++++++ assets/themes/src/vsc/ayu/ayu-light.json | 847 ++++++++++++++++++++++ assets/themes/src/vsc/ayu/ayu-mirage.json | 847 ++++++++++++++++++++++ assets/themes/src/vsc/ayu/family.json | 18 + assets/themes/src/vsc/dracula/family.json | 10 + crates/theme2/src/import.rs | 471 ------------ crates/theme2/src/theme2.rs | 4 +- crates/theme_importer/Cargo.toml | 17 + crates/theme_importer/src/main.rs | 142 ++++ crates/theme_importer/src/temp.rs | 393 ++++++++++ crates/theme_importer/src/vscode.rs | 80 ++ 14 files changed, 3239 insertions(+), 474 deletions(-) create mode 100644 assets/themes/src/vsc/ayu/LICENSE create mode 100644 assets/themes/src/vsc/ayu/ayu-dark.json create mode 100644 assets/themes/src/vsc/ayu/ayu-light.json create mode 100644 assets/themes/src/vsc/ayu/ayu-mirage.json create mode 100644 assets/themes/src/vsc/ayu/family.json create mode 100644 assets/themes/src/vsc/dracula/family.json delete mode 100644 crates/theme2/src/import.rs create mode 100644 crates/theme_importer/Cargo.toml create mode 100644 crates/theme_importer/src/main.rs create mode 100644 crates/theme_importer/src/temp.rs create mode 100644 crates/theme_importer/src/vscode.rs diff --git a/Cargo.lock b/Cargo.lock index 903dd125c5809670142481c544cb28db0b6e06f4..6e26d387e685ca727112ac068ad27b45465638e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8872,6 +8872,21 @@ dependencies = [ "util", ] +[[package]] +name = "theme_importer" +version = "0.1.0" +dependencies = [ + "anyhow", + "convert_case 0.6.0", + "gpui2", + "log", + "rust-embed", + "serde", + "simplelog", + "theme2", + "uuid 1.4.1", +] + [[package]] name = "theme_selector" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index ed6e65d479e79af520feae77aa303e0a43439d1d..faae9871f86b009c8025bf72e618452e5b74e2db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,6 +93,7 @@ members = [ "crates/text", "crates/theme", "crates/theme2", + "crates/theme_importer", "crates/theme_selector", "crates/ui2", "crates/util", diff --git a/assets/themes/src/vsc/ayu/LICENSE b/assets/themes/src/vsc/ayu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..97c615481a04afd6dd88c7bd34c0260b0e2129b8 --- /dev/null +++ b/assets/themes/src/vsc/ayu/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Ike Ku + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vsc/ayu/ayu-dark.json b/assets/themes/src/vsc/ayu/ayu-dark.json new file mode 100644 index 0000000000000000000000000000000000000000..71c1da3fa5fa64650d968440ee7e25a3adf3db4f --- /dev/null +++ b/assets/themes/src/vsc/ayu/ayu-dark.json @@ -0,0 +1,847 @@ +{ + "type": "dark", + "colors": { + "focusBorder": "#e6b450b3", + "foreground": "#565b66", + "widget.shadow": "#00000080", + "selection.background": "#409fff4d", + "icon.foreground": "#565b66", + "errorForeground": "#d95757", + "descriptionForeground": "#565b66", + "textBlockQuote.background": "#0f131a", + "textLink.foreground": "#e6b450", + "textLink.activeForeground": "#e6b450", + "textPreformat.foreground": "#bfbdb6", + "button.background": "#e6b450", + "button.foreground": "#734d00", + "button.hoverBackground": "#e1af4b", + "button.secondaryBackground": "#565b6633", + "button.secondaryForeground": "#bfbdb6", + "button.secondaryHoverBackground": "#565b6680", + "dropdown.background": "#0d1017", + "dropdown.foreground": "#565b66", + "dropdown.border": "#565b6645", + "input.background": "#0d1017", + "input.border": "#565b6645", + "input.foreground": "#bfbdb6", + "input.placeholderForeground": "#565b6680", + "inputOption.activeBorder": "#e6b4504d", + "inputOption.activeBackground": "#e6b45033", + "inputOption.activeForeground": "#e6b450", + "inputValidation.errorBackground": "#0d1017", + "inputValidation.errorBorder": "#d95757", + "inputValidation.infoBackground": "#0b0e14", + "inputValidation.infoBorder": "#39bae6", + "inputValidation.warningBackground": "#0b0e14", + "inputValidation.warningBorder": "#ffb454", + "scrollbar.shadow": "#1e232b00", + "scrollbarSlider.background": "#565b6666", + "scrollbarSlider.hoverBackground": "#565b6699", + "scrollbarSlider.activeBackground": "#565b66b3", + "badge.background": "#e6b45033", + "badge.foreground": "#e6b450", + "progressBar.background": "#e6b450", + "list.activeSelectionBackground": "#47526640", + "list.activeSelectionForeground": "#bfbdb6", + "list.focusBackground": "#47526640", + "list.focusForeground": "#bfbdb6", + "list.focusOutline": "#47526640", + "list.highlightForeground": "#e6b450", + "list.deemphasizedForeground": "#d95757", + "list.hoverBackground": "#47526640", + "list.inactiveSelectionBackground": "#47526633", + "list.inactiveSelectionForeground": "#565b66", + "list.invalidItemForeground": "#565b664d", + "list.errorForeground": "#d95757", + "tree.indentGuidesStroke": "#6c738080", + "listFilterWidget.background": "#0f131a", + "listFilterWidget.outline": "#e6b450", + "listFilterWidget.noMatchesOutline": "#d95757", + "list.filterMatchBackground": "#5f4c7266", + "list.filterMatchBorder": "#6c598066", + "activityBar.background": "#0b0e14", + "activityBar.foreground": "#565b66cc", + "activityBar.inactiveForeground": "#565b6699", + "activityBar.border": "#0b0e14", + "activityBar.activeBorder": "#e6b450", + "activityBarBadge.background": "#e6b450", + "activityBarBadge.foreground": "#734d00", + "sideBar.background": "#0b0e14", + "sideBar.border": "#0b0e14", + "sideBarTitle.foreground": "#565b66", + "sideBarSectionHeader.background": "#0b0e14", + "sideBarSectionHeader.foreground": "#565b66", + "sideBarSectionHeader.border": "#0b0e14", + "minimap.background": "#0b0e14", + "minimap.selectionHighlight": "#409fff4d", + "minimap.errorHighlight": "#d95757", + "minimap.findMatchHighlight": "#6c5980", + "minimapGutter.addedBackground": "#7fd962", + "minimapGutter.modifiedBackground": "#73b8ff", + "minimapGutter.deletedBackground": "#f26d78", + "editorGroup.border": "#1e232b", + "editorGroup.background": "#0f131a", + "editorGroupHeader.noTabsBackground": "#0b0e14", + "editorGroupHeader.tabsBackground": "#0b0e14", + "editorGroupHeader.tabsBorder": "#0b0e14", + "tab.activeBackground": "#0b0e14", + "tab.activeForeground": "#bfbdb6", + "tab.border": "#0b0e14", + "tab.activeBorder": "#e6b450", + "tab.unfocusedActiveBorder": "#565b66", + "tab.inactiveBackground": "#0b0e14", + "tab.inactiveForeground": "#565b66", + "tab.unfocusedActiveForeground": "#565b66", + "tab.unfocusedInactiveForeground": "#565b66", + "editor.background": "#0b0e14", + "editor.foreground": "#bfbdb6", + "editorLineNumber.foreground": "#6c738099", + "editorLineNumber.activeForeground": "#6c7380e6", + "editorCursor.foreground": "#e6b450", + "editor.inactiveSelectionBackground": "#409fff21", + "editor.selectionBackground": "#409fff4d", + "editor.selectionHighlightBackground": "#7fd96226", + "editor.selectionHighlightBorder": "#7fd96200", + "editor.wordHighlightBackground": "#73b8ff14", + "editor.wordHighlightStrongBackground": "#7fd96214", + "editor.wordHighlightBorder": "#73b8ff80", + "editor.wordHighlightStrongBorder": "#7fd96280", + "editor.findMatchBackground": "#6c5980", + "editor.findMatchBorder": "#6c5980", + "editor.findMatchHighlightBackground": "#6c598066", + "editor.findMatchHighlightBorder": "#5f4c7266", + "editor.findRangeHighlightBackground": "#6c598040", + "editor.rangeHighlightBackground": "#6c598033", + "editor.lineHighlightBackground": "#131721", + "editorLink.activeForeground": "#e6b450", + "editorWhitespace.foreground": "#6c738099", + "editorIndentGuide.background": "#6c738033", + "editorIndentGuide.activeBackground": "#6c738080", + "editorRuler.foreground": "#6c738033", + "editorCodeLens.foreground": "#acb6bf8c", + "editorBracketMatch.background": "#6c73804d", + "editorBracketMatch.border": "#6c73804d", + "editor.snippetTabstopHighlightBackground": "#7fd96233", + "editorOverviewRuler.border": "#1e232b", + "editorOverviewRuler.modifiedForeground": "#73b8ff", + "editorOverviewRuler.addedForeground": "#7fd962", + "editorOverviewRuler.deletedForeground": "#f26d78", + "editorOverviewRuler.errorForeground": "#d95757", + "editorOverviewRuler.warningForeground": "#e6b450", + "editorOverviewRuler.bracketMatchForeground": "#6c7380b3", + "editorOverviewRuler.wordHighlightForeground": "#73b8ff66", + "editorOverviewRuler.wordHighlightStrongForeground": "#7fd96266", + "editorOverviewRuler.findMatchForeground": "#6c5980", + "editorError.foreground": "#d95757", + "editorWarning.foreground": "#e6b450", + "editorGutter.modifiedBackground": "#73b8ffcc", + "editorGutter.addedBackground": "#7fd962cc", + "editorGutter.deletedBackground": "#f26d78cc", + "diffEditor.insertedTextBackground": "#7fd9621f", + "diffEditor.removedTextBackground": "#f26d781f", + "diffEditor.diagonalFill": "#1e232b", + "editorWidget.background": "#0f131a", + "editorWidget.border": "#1e232b", + "editorHoverWidget.background": "#0f131a", + "editorHoverWidget.border": "#1e232b", + "editorSuggestWidget.background": "#0f131a", + "editorSuggestWidget.border": "#1e232b", + "editorSuggestWidget.highlightForeground": "#e6b450", + "editorSuggestWidget.selectedBackground": "#47526640", + "debugExceptionWidget.border": "#1e232b", + "debugExceptionWidget.background": "#0f131a", + "editorMarkerNavigation.background": "#0f131a", + "peekView.border": "#47526640", + "peekViewTitle.background": "#47526640", + "peekViewTitleDescription.foreground": "#565b66", + "peekViewTitleLabel.foreground": "#bfbdb6", + "peekViewEditor.background": "#0f131a", + "peekViewEditor.matchHighlightBackground": "#6c598066", + "peekViewEditor.matchHighlightBorder": "#5f4c7266", + "peekViewResult.background": "#0f131a", + "peekViewResult.fileForeground": "#bfbdb6", + "peekViewResult.lineForeground": "#565b66", + "peekViewResult.matchHighlightBackground": "#6c598066", + "peekViewResult.selectionBackground": "#47526640", + "panel.background": "#0b0e14", + "panel.border": "#1e232b", + "panelTitle.activeBorder": "#e6b450", + "panelTitle.activeForeground": "#bfbdb6", + "panelTitle.inactiveForeground": "#565b66", + "statusBar.background": "#0b0e14", + "statusBar.foreground": "#565b66", + "statusBar.border": "#0b0e14", + "statusBar.debuggingBackground": "#f29668", + "statusBar.debuggingForeground": "#0d1017", + "statusBar.noFolderBackground": "#0f131a", + "statusBarItem.activeBackground": "#565b6633", + "statusBarItem.hoverBackground": "#565b6633", + "statusBarItem.prominentBackground": "#1e232b", + "statusBarItem.prominentHoverBackground": "#00000030", + "statusBarItem.remoteBackground": "#e6b450", + "statusBarItem.remoteForeground": "#734d00", + "titleBar.activeBackground": "#0b0e14", + "titleBar.activeForeground": "#bfbdb6", + "titleBar.inactiveBackground": "#0b0e14", + "titleBar.inactiveForeground": "#565b66", + "titleBar.border": "#0b0e14", + "extensionButton.prominentForeground": "#734d00", + "extensionButton.prominentBackground": "#e6b450", + "extensionButton.prominentHoverBackground": "#e1af4b", + "pickerGroup.border": "#1e232b", + "pickerGroup.foreground": "#565b6680", + "debugToolBar.background": "#0f131a", + "debugIcon.breakpointForeground": "#f29668", + "debugIcon.breakpointDisabledForeground": "#f2966880", + "debugConsoleInputIcon.foreground": "#e6b450", + "welcomePage.tileBackground": "#0b0e14", + "welcomePage.tileShadow": "#00000080", + "welcomePage.progress.background": "#131721", + "welcomePage.buttonBackground": "#e6b45066", + "walkThrough.embeddedEditorBackground": "#0f131a", + "gitDecoration.modifiedResourceForeground": "#73b8ffb3", + "gitDecoration.deletedResourceForeground": "#f26d78b3", + "gitDecoration.untrackedResourceForeground": "#7fd962b3", + "gitDecoration.ignoredResourceForeground": "#565b6680", + "gitDecoration.conflictingResourceForeground": "", + "gitDecoration.submoduleResourceForeground": "#d2a6ffb3", + "settings.headerForeground": "#bfbdb6", + "settings.modifiedItemIndicator": "#73b8ff", + "keybindingLabel.background": "#565b661a", + "keybindingLabel.foreground": "#bfbdb6", + "keybindingLabel.border": "#bfbdb61a", + "keybindingLabel.bottomBorder": "#bfbdb61a", + "terminal.background": "#0b0e14", + "terminal.foreground": "#bfbdb6", + "terminal.ansiBlack": "#1e232b", + "terminal.ansiRed": "#ea6c73", + "terminal.ansiGreen": "#7fd962", + "terminal.ansiYellow": "#f9af4f", + "terminal.ansiBlue": "#53bdfa", + "terminal.ansiMagenta": "#cda1fa", + "terminal.ansiCyan": "#90e1c6", + "terminal.ansiWhite": "#c7c7c7", + "terminal.ansiBrightBlack": "#686868", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightGreen": "#aad94c", + "terminal.ansiBrightYellow": "#ffb454", + "terminal.ansiBrightBlue": "#59c2ff", + "terminal.ansiBrightMagenta": "#d2a6ff", + "terminal.ansiBrightCyan": "#95e6cb", + "terminal.ansiBrightWhite": "#ffffff" + }, + "tokenColors": [ + { + "settings": { + "background": "#0b0e14", + "foreground": "#bfbdb6" + } + }, + { + "name": "Comment", + "scope": [ + "comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#acb6bf8c" + } + }, + { + "name": "String", + "scope": [ + "string", + "constant.other.symbol" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "name": "Regular Expressions and Escape Characters", + "scope": [ + "string.regexp", + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#95e6cb" + } + }, + { + "name": "Number", + "scope": [ + "constant.numeric" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Built-in constants", + "scope": [ + "constant.language" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Variable", + "scope": [ + "variable", + "variable.parameter.function-call" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Member Variable", + "scope": [ + "variable.member" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Language variable", + "scope": [ + "variable.language" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#39bae6" + } + }, + { + "name": "Storage", + "scope": [ + "storage" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Keyword", + "scope": [ + "keyword" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Operators", + "scope": [ + "keyword.operator" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "Separators like ; or ,", + "scope": [ + "punctuation.separator", + "punctuation.terminator" + ], + "settings": { + "foreground": "#bfbdb6b3" + } + }, + { + "name": "Punctuation", + "scope": [ + "punctuation.section" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Accessor", + "scope": [ + "punctuation.accessor" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "JavaScript/TypeScript interpolation punctuation", + "scope": [ + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Ruby interpolation punctuation", + "scope": [ + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Interpolation text", + "scope": [ + "meta.embedded" + ], + "settings": { + "foreground": "#bfbdb6" + } + }, + { + "name": "Types fixes", + "scope": [ + "source.java storage.type", + "source.haskell storage.type", + "source.c storage.type" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Inherited class type", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Lambda arrow", + "scope": [ + "storage.type.function" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Java primitive variable types", + "scope": [ + "source.java storage.type.primitive" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Function name", + "scope": [ + "entity.name.function" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Function arguments", + "scope": [ + "variable.parameter", + "meta.parameter" + ], + "settings": { + "foreground": "#d2a6ff" + } + }, + { + "name": "Function call", + "scope": [ + "variable.function", + "variable.annotation", + "meta.function-call.generic", + "support.function.go" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Library function", + "scope": [ + "support.function", + "support.macro" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Imports and packages", + "scope": [ + "entity.name.import", + "entity.name.package" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "name": "Entity name", + "scope": [ + "entity.name" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Tag", + "scope": [ + "entity.name.tag", + "meta.tag.sgml" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "JSX Component", + "scope": [ + "support.class.component" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "Tag start/end", + "scope": [ + "punctuation.definition.tag.end", + "punctuation.definition.tag.begin", + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#39bae680" + } + }, + { + "name": "Tag attribute", + "scope": [ + "entity.other.attribute-name" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f29668" + } + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class", + "source.go storage.type" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Decorators/annotation", + "scope": [ + "meta.decorator variable.other", + "meta.decorator punctuation.decorator", + "storage.type.annotation" + ], + "settings": { + "foreground": "#e6b673" + } + }, + { + "name": "Invalid", + "scope": [ + "invalid" + ], + "settings": { + "foreground": "#d95757" + } + }, + { + "name": "diff.header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#c594c5" + } + }, + { + "name": "Ruby class methods", + "scope": [ + "source.ruby variable.other.readwrite" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "CSS tag names", + "scope": [ + "source.css entity.name.tag", + "source.sass entity.name.tag", + "source.scss entity.name.tag", + "source.less entity.name.tag", + "source.stylus entity.name.tag" + ], + "settings": { + "foreground": "#59c2ff" + } + }, + { + "name": "CSS browser prefix", + "scope": [ + "source.css support.type", + "source.sass support.type", + "source.scss support.type", + "source.less support.type", + "source.stylus support.type" + ], + "settings": { + "foreground": "#acb6bf8c" + } + }, + { + "name": "CSS Properties", + "scope": [ + "support.type.property-name" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#39bae6" + } + }, + { + "name": "Search Results Numbers", + "scope": [ + "constant.numeric.line-number.find-in-files - match" + ], + "settings": { + "foreground": "#acb6bf8c" + } + }, + { + "name": "Search Results Match Numbers", + "scope": [ + "constant.numeric.line-number.match" + ], + "settings": { + "foreground": "#ff8f40" + } + }, + { + "name": "Search Results Lines", + "scope": [ + "entity.name.filename.find-in-files" + ], + "settings": { + "foreground": "#aad94c" + } + }, + { + "scope": [ + "message.error" + ], + "settings": { + "foreground": "#d95757" + } + }, + { + "name": "Markup heading", + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#aad94c" + } + }, + { + "name": "Markup links", + "scope": [ + "markup.underline.link", + "string.other.link" + ], + "settings": { + "foreground": "#39bae6" + } + }, + { + "name": "Markup Italic", + "scope": [ + "markup.italic" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f07178" + } + }, + { + "name": "Markup Bold", + "scope": [ + "markup.bold" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f07178" + } + }, + { + "name": "Markup Bold/italic", + "scope": [ + "markup.italic markup.bold", + "markup.bold markup.italic" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "Markup Code", + "scope": [ + "markup.raw" + ], + "settings": { + "background": "#bfbdb605" + } + }, + { + "name": "Markup Code Inline", + "scope": [ + "markup.raw.inline" + ], + "settings": { + "background": "#bfbdb60f" + } + }, + { + "name": "Markdown Separator", + "scope": [ + "meta.separator" + ], + "settings": { + "fontStyle": "bold", + "background": "#bfbdb60f", + "foreground": "#acb6bf8c" + } + }, + { + "name": "Markup Blockquote", + "scope": [ + "markup.quote" + ], + "settings": { + "foreground": "#95e6cb", + "fontStyle": "italic" + } + }, + { + "name": "Markup List Bullet", + "scope": [ + "markup.list punctuation.definition.list.begin" + ], + "settings": { + "foreground": "#ffb454" + } + }, + { + "name": "Markup added", + "scope": [ + "markup.inserted" + ], + "settings": { + "foreground": "#7fd962" + } + }, + { + "name": "Markup modified", + "scope": [ + "markup.changed" + ], + "settings": { + "foreground": "#73b8ff" + } + }, + { + "name": "Markup removed", + "scope": [ + "markup.deleted" + ], + "settings": { + "foreground": "#f26d78" + } + }, + { + "name": "Markup Strike", + "scope": [ + "markup.strike" + ], + "settings": { + "foreground": "#e6b673" + } + }, + { + "name": "Markup Table", + "scope": [ + "markup.table" + ], + "settings": { + "background": "#bfbdb60f", + "foreground": "#39bae6" + } + }, + { + "name": "Markup Raw Inline", + "scope": [ + "text.html.markdown markup.inline.raw" + ], + "settings": { + "foreground": "#f29668" + } + }, + { + "name": "Markdown - Line Break", + "scope": [ + "text.html.markdown meta.dummy.line-break" + ], + "settings": { + "background": "#acb6bf8c", + "foreground": "#acb6bf8c" + } + }, + { + "name": "Markdown - Raw Block Fenced", + "scope": [ + "punctuation.definition.markdown" + ], + "settings": { + "background": "#bfbdb6", + "foreground": "#acb6bf8c" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "parameter.label": "#bfbdb6" + } +} \ No newline at end of file diff --git a/assets/themes/src/vsc/ayu/ayu-light.json b/assets/themes/src/vsc/ayu/ayu-light.json new file mode 100644 index 0000000000000000000000000000000000000000..782b04ac76f4b32938660d779c554d079b2b0337 --- /dev/null +++ b/assets/themes/src/vsc/ayu/ayu-light.json @@ -0,0 +1,847 @@ +{ + "type": "light", + "colors": { + "focusBorder": "#ffaa33b3", + "foreground": "#8a9199", + "widget.shadow": "#00000026", + "selection.background": "#035bd626", + "icon.foreground": "#8a9199", + "errorForeground": "#e65050", + "descriptionForeground": "#8a9199", + "textBlockQuote.background": "#f3f4f5", + "textLink.foreground": "#ffaa33", + "textLink.activeForeground": "#ffaa33", + "textPreformat.foreground": "#5c6166", + "button.background": "#ffaa33", + "button.foreground": "#804a00", + "button.hoverBackground": "#f9a52e", + "button.secondaryBackground": "#8a919933", + "button.secondaryForeground": "#5c6166", + "button.secondaryHoverBackground": "#8a919980", + "dropdown.background": "#fcfcfc", + "dropdown.foreground": "#8a9199", + "dropdown.border": "#8a919945", + "input.background": "#fcfcfc", + "input.border": "#8a919945", + "input.foreground": "#5c6166", + "input.placeholderForeground": "#8a919980", + "inputOption.activeBorder": "#f4a0284d", + "inputOption.activeBackground": "#ffaa3333", + "inputOption.activeForeground": "#f4a028", + "inputValidation.errorBackground": "#fcfcfc", + "inputValidation.errorBorder": "#e65050", + "inputValidation.infoBackground": "#f8f9fa", + "inputValidation.infoBorder": "#55b4d4", + "inputValidation.warningBackground": "#f8f9fa", + "inputValidation.warningBorder": "#f2ae49", + "scrollbar.shadow": "#6b7d8f00", + "scrollbarSlider.background": "#8a919966", + "scrollbarSlider.hoverBackground": "#8a919999", + "scrollbarSlider.activeBackground": "#8a9199b3", + "badge.background": "#ffaa3333", + "badge.foreground": "#f4a028", + "progressBar.background": "#ffaa33", + "list.activeSelectionBackground": "#56728f1f", + "list.activeSelectionForeground": "#5c6166", + "list.focusBackground": "#56728f1f", + "list.focusForeground": "#5c6166", + "list.focusOutline": "#56728f1f", + "list.highlightForeground": "#ffaa33", + "list.deemphasizedForeground": "#e65050", + "list.hoverBackground": "#56728f1f", + "list.inactiveSelectionBackground": "#6b7d8f1f", + "list.inactiveSelectionForeground": "#8a9199", + "list.invalidItemForeground": "#8a91994d", + "list.errorForeground": "#e65050", + "tree.indentGuidesStroke": "#8a919959", + "listFilterWidget.background": "#f3f4f5", + "listFilterWidget.outline": "#ffaa33", + "listFilterWidget.noMatchesOutline": "#e65050", + "list.filterMatchBackground": "#ddcaef73", + "list.filterMatchBorder": "#ecd9ff73", + "activityBar.background": "#f8f9fa", + "activityBar.foreground": "#8a9199cc", + "activityBar.inactiveForeground": "#8a919999", + "activityBar.border": "#f8f9fa", + "activityBar.activeBorder": "#ffaa33", + "activityBarBadge.background": "#ffaa33", + "activityBarBadge.foreground": "#f8f9fa", + "sideBar.background": "#f8f9fa", + "sideBar.border": "#f8f9fa", + "sideBarTitle.foreground": "#8a9199", + "sideBarSectionHeader.background": "#f8f9fa", + "sideBarSectionHeader.foreground": "#8a9199", + "sideBarSectionHeader.border": "#f8f9fa", + "minimap.background": "#f8f9fa", + "minimap.selectionHighlight": "#035bd626", + "minimap.errorHighlight": "#e65050", + "minimap.findMatchHighlight": "#ecd9ff", + "minimapGutter.addedBackground": "#6cbf43", + "minimapGutter.modifiedBackground": "#478acc", + "minimapGutter.deletedBackground": "#ff7383", + "editorGroup.border": "#6b7d8f1f", + "editorGroup.background": "#f3f4f5", + "editorGroupHeader.noTabsBackground": "#f8f9fa", + "editorGroupHeader.tabsBackground": "#f8f9fa", + "editorGroupHeader.tabsBorder": "#f8f9fa", + "tab.activeBackground": "#f8f9fa", + "tab.activeForeground": "#5c6166", + "tab.border": "#f8f9fa", + "tab.activeBorder": "#ffaa33", + "tab.unfocusedActiveBorder": "#8a9199", + "tab.inactiveBackground": "#f8f9fa", + "tab.inactiveForeground": "#8a9199", + "tab.unfocusedActiveForeground": "#8a9199", + "tab.unfocusedInactiveForeground": "#8a9199", + "editor.background": "#f8f9fa", + "editor.foreground": "#5c6166", + "editorLineNumber.foreground": "#8a919966", + "editorLineNumber.activeForeground": "#8a9199cc", + "editorCursor.foreground": "#ffaa33", + "editor.inactiveSelectionBackground": "#035bd612", + "editor.selectionBackground": "#035bd626", + "editor.selectionHighlightBackground": "#6cbf4326", + "editor.selectionHighlightBorder": "#6cbf4300", + "editor.wordHighlightBackground": "#478acc14", + "editor.wordHighlightStrongBackground": "#6cbf4314", + "editor.wordHighlightBorder": "#478acc80", + "editor.wordHighlightStrongBorder": "#6cbf4380", + "editor.findMatchBackground": "#ecd9ff", + "editor.findMatchBorder": "#ecd9ff", + "editor.findMatchHighlightBackground": "#ecd9ff73", + "editor.findMatchHighlightBorder": "#ddcaef73", + "editor.findRangeHighlightBackground": "#ecd9ff40", + "editor.rangeHighlightBackground": "#ecd9ff33", + "editor.lineHighlightBackground": "#8a91991a", + "editorLink.activeForeground": "#ffaa33", + "editorWhitespace.foreground": "#8a919966", + "editorIndentGuide.background": "#8a91992e", + "editorIndentGuide.activeBackground": "#8a919959", + "editorRuler.foreground": "#8a91992e", + "editorCodeLens.foreground": "#787b8099", + "editorBracketMatch.background": "#8a91994d", + "editorBracketMatch.border": "#8a91994d", + "editor.snippetTabstopHighlightBackground": "#6cbf4333", + "editorOverviewRuler.border": "#6b7d8f1f", + "editorOverviewRuler.modifiedForeground": "#478acc", + "editorOverviewRuler.addedForeground": "#6cbf43", + "editorOverviewRuler.deletedForeground": "#ff7383", + "editorOverviewRuler.errorForeground": "#e65050", + "editorOverviewRuler.warningForeground": "#ffaa33", + "editorOverviewRuler.bracketMatchForeground": "#8a9199b3", + "editorOverviewRuler.wordHighlightForeground": "#478acc66", + "editorOverviewRuler.wordHighlightStrongForeground": "#6cbf4366", + "editorOverviewRuler.findMatchForeground": "#ecd9ff", + "editorError.foreground": "#e65050", + "editorWarning.foreground": "#ffaa33", + "editorGutter.modifiedBackground": "#478acccc", + "editorGutter.addedBackground": "#6cbf43cc", + "editorGutter.deletedBackground": "#ff7383cc", + "diffEditor.insertedTextBackground": "#6cbf431f", + "diffEditor.removedTextBackground": "#ff73831f", + "diffEditor.diagonalFill": "#6b7d8f1f", + "editorWidget.background": "#f3f4f5", + "editorWidget.border": "#6b7d8f1f", + "editorHoverWidget.background": "#f3f4f5", + "editorHoverWidget.border": "#6b7d8f1f", + "editorSuggestWidget.background": "#f3f4f5", + "editorSuggestWidget.border": "#6b7d8f1f", + "editorSuggestWidget.highlightForeground": "#ffaa33", + "editorSuggestWidget.selectedBackground": "#56728f1f", + "debugExceptionWidget.border": "#6b7d8f1f", + "debugExceptionWidget.background": "#f3f4f5", + "editorMarkerNavigation.background": "#f3f4f5", + "peekView.border": "#56728f1f", + "peekViewTitle.background": "#56728f1f", + "peekViewTitleDescription.foreground": "#8a9199", + "peekViewTitleLabel.foreground": "#5c6166", + "peekViewEditor.background": "#f3f4f5", + "peekViewEditor.matchHighlightBackground": "#ecd9ff73", + "peekViewEditor.matchHighlightBorder": "#ddcaef73", + "peekViewResult.background": "#f3f4f5", + "peekViewResult.fileForeground": "#5c6166", + "peekViewResult.lineForeground": "#8a9199", + "peekViewResult.matchHighlightBackground": "#ecd9ff73", + "peekViewResult.selectionBackground": "#56728f1f", + "panel.background": "#f8f9fa", + "panel.border": "#6b7d8f1f", + "panelTitle.activeBorder": "#ffaa33", + "panelTitle.activeForeground": "#5c6166", + "panelTitle.inactiveForeground": "#8a9199", + "statusBar.background": "#f8f9fa", + "statusBar.foreground": "#8a9199", + "statusBar.border": "#f8f9fa", + "statusBar.debuggingBackground": "#ed9366", + "statusBar.debuggingForeground": "#fcfcfc", + "statusBar.noFolderBackground": "#f3f4f5", + "statusBarItem.activeBackground": "#8a919933", + "statusBarItem.hoverBackground": "#8a919933", + "statusBarItem.prominentBackground": "#6b7d8f1f", + "statusBarItem.prominentHoverBackground": "#00000030", + "statusBarItem.remoteBackground": "#ffaa33", + "statusBarItem.remoteForeground": "#804a00", + "titleBar.activeBackground": "#f8f9fa", + "titleBar.activeForeground": "#5c6166", + "titleBar.inactiveBackground": "#f8f9fa", + "titleBar.inactiveForeground": "#8a9199", + "titleBar.border": "#f8f9fa", + "extensionButton.prominentForeground": "#804a00", + "extensionButton.prominentBackground": "#ffaa33", + "extensionButton.prominentHoverBackground": "#f9a52e", + "pickerGroup.border": "#6b7d8f1f", + "pickerGroup.foreground": "#8a919980", + "debugToolBar.background": "#f3f4f5", + "debugIcon.breakpointForeground": "#ed9366", + "debugIcon.breakpointDisabledForeground": "#ed936680", + "debugConsoleInputIcon.foreground": "#ffaa33", + "welcomePage.tileBackground": "#f8f9fa", + "welcomePage.tileShadow": "#00000026", + "welcomePage.progress.background": "#8a91991a", + "welcomePage.buttonBackground": "#ffaa3366", + "walkThrough.embeddedEditorBackground": "#f3f4f5", + "gitDecoration.modifiedResourceForeground": "#478accb3", + "gitDecoration.deletedResourceForeground": "#ff7383b3", + "gitDecoration.untrackedResourceForeground": "#6cbf43b3", + "gitDecoration.ignoredResourceForeground": "#8a919980", + "gitDecoration.conflictingResourceForeground": "", + "gitDecoration.submoduleResourceForeground": "#a37accb3", + "settings.headerForeground": "#5c6166", + "settings.modifiedItemIndicator": "#478acc", + "keybindingLabel.background": "#8a91991a", + "keybindingLabel.foreground": "#5c6166", + "keybindingLabel.border": "#5c61661a", + "keybindingLabel.bottomBorder": "#5c61661a", + "terminal.background": "#f8f9fa", + "terminal.foreground": "#5c6166", + "terminal.ansiBlack": "#000000", + "terminal.ansiRed": "#ea6c6d", + "terminal.ansiGreen": "#6cbf43", + "terminal.ansiYellow": "#eca944", + "terminal.ansiBlue": "#3199e1", + "terminal.ansiMagenta": "#9e75c7", + "terminal.ansiCyan": "#46ba94", + "terminal.ansiWhite": "#c7c7c7", + "terminal.ansiBrightBlack": "#686868", + "terminal.ansiBrightRed": "#f07171", + "terminal.ansiBrightGreen": "#86b300", + "terminal.ansiBrightYellow": "#f2ae49", + "terminal.ansiBrightBlue": "#399ee6", + "terminal.ansiBrightMagenta": "#a37acc", + "terminal.ansiBrightCyan": "#4cbf99", + "terminal.ansiBrightWhite": "#d1d1d1" + }, + "tokenColors": [ + { + "settings": { + "background": "#f8f9fa", + "foreground": "#5c6166" + } + }, + { + "name": "Comment", + "scope": [ + "comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#787b8099" + } + }, + { + "name": "String", + "scope": [ + "string", + "constant.other.symbol" + ], + "settings": { + "foreground": "#86b300" + } + }, + { + "name": "Regular Expressions and Escape Characters", + "scope": [ + "string.regexp", + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#4cbf99" + } + }, + { + "name": "Number", + "scope": [ + "constant.numeric" + ], + "settings": { + "foreground": "#a37acc" + } + }, + { + "name": "Built-in constants", + "scope": [ + "constant.language" + ], + "settings": { + "foreground": "#a37acc" + } + }, + { + "name": "Variable", + "scope": [ + "variable", + "variable.parameter.function-call" + ], + "settings": { + "foreground": "#5c6166" + } + }, + { + "name": "Member Variable", + "scope": [ + "variable.member" + ], + "settings": { + "foreground": "#f07171" + } + }, + { + "name": "Language variable", + "scope": [ + "variable.language" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#55b4d4" + } + }, + { + "name": "Storage", + "scope": [ + "storage" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Keyword", + "scope": [ + "keyword" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Operators", + "scope": [ + "keyword.operator" + ], + "settings": { + "foreground": "#ed9366" + } + }, + { + "name": "Separators like ; or ,", + "scope": [ + "punctuation.separator", + "punctuation.terminator" + ], + "settings": { + "foreground": "#5c6166b3" + } + }, + { + "name": "Punctuation", + "scope": [ + "punctuation.section" + ], + "settings": { + "foreground": "#5c6166" + } + }, + { + "name": "Accessor", + "scope": [ + "punctuation.accessor" + ], + "settings": { + "foreground": "#ed9366" + } + }, + { + "name": "JavaScript/TypeScript interpolation punctuation", + "scope": [ + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Ruby interpolation punctuation", + "scope": [ + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Interpolation text", + "scope": [ + "meta.embedded" + ], + "settings": { + "foreground": "#5c6166" + } + }, + { + "name": "Types fixes", + "scope": [ + "source.java storage.type", + "source.haskell storage.type", + "source.c storage.type" + ], + "settings": { + "foreground": "#399ee6" + } + }, + { + "name": "Inherited class type", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#55b4d4" + } + }, + { + "name": "Lambda arrow", + "scope": [ + "storage.type.function" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Java primitive variable types", + "scope": [ + "source.java storage.type.primitive" + ], + "settings": { + "foreground": "#55b4d4" + } + }, + { + "name": "Function name", + "scope": [ + "entity.name.function" + ], + "settings": { + "foreground": "#f2ae49" + } + }, + { + "name": "Function arguments", + "scope": [ + "variable.parameter", + "meta.parameter" + ], + "settings": { + "foreground": "#a37acc" + } + }, + { + "name": "Function call", + "scope": [ + "variable.function", + "variable.annotation", + "meta.function-call.generic", + "support.function.go" + ], + "settings": { + "foreground": "#f2ae49" + } + }, + { + "name": "Library function", + "scope": [ + "support.function", + "support.macro" + ], + "settings": { + "foreground": "#f07171" + } + }, + { + "name": "Imports and packages", + "scope": [ + "entity.name.import", + "entity.name.package" + ], + "settings": { + "foreground": "#86b300" + } + }, + { + "name": "Entity name", + "scope": [ + "entity.name" + ], + "settings": { + "foreground": "#399ee6" + } + }, + { + "name": "Tag", + "scope": [ + "entity.name.tag", + "meta.tag.sgml" + ], + "settings": { + "foreground": "#55b4d4" + } + }, + { + "name": "JSX Component", + "scope": [ + "support.class.component" + ], + "settings": { + "foreground": "#399ee6" + } + }, + { + "name": "Tag start/end", + "scope": [ + "punctuation.definition.tag.end", + "punctuation.definition.tag.begin", + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#55b4d480" + } + }, + { + "name": "Tag attribute", + "scope": [ + "entity.other.attribute-name" + ], + "settings": { + "foreground": "#f2ae49" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#ed9366" + } + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class", + "source.go storage.type" + ], + "settings": { + "foreground": "#55b4d4" + } + }, + { + "name": "Decorators/annotation", + "scope": [ + "meta.decorator variable.other", + "meta.decorator punctuation.decorator", + "storage.type.annotation" + ], + "settings": { + "foreground": "#e6ba7e" + } + }, + { + "name": "Invalid", + "scope": [ + "invalid" + ], + "settings": { + "foreground": "#e65050" + } + }, + { + "name": "diff.header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#c594c5" + } + }, + { + "name": "Ruby class methods", + "scope": [ + "source.ruby variable.other.readwrite" + ], + "settings": { + "foreground": "#f2ae49" + } + }, + { + "name": "CSS tag names", + "scope": [ + "source.css entity.name.tag", + "source.sass entity.name.tag", + "source.scss entity.name.tag", + "source.less entity.name.tag", + "source.stylus entity.name.tag" + ], + "settings": { + "foreground": "#399ee6" + } + }, + { + "name": "CSS browser prefix", + "scope": [ + "source.css support.type", + "source.sass support.type", + "source.scss support.type", + "source.less support.type", + "source.stylus support.type" + ], + "settings": { + "foreground": "#787b8099" + } + }, + { + "name": "CSS Properties", + "scope": [ + "support.type.property-name" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#55b4d4" + } + }, + { + "name": "Search Results Numbers", + "scope": [ + "constant.numeric.line-number.find-in-files - match" + ], + "settings": { + "foreground": "#787b8099" + } + }, + { + "name": "Search Results Match Numbers", + "scope": [ + "constant.numeric.line-number.match" + ], + "settings": { + "foreground": "#fa8d3e" + } + }, + { + "name": "Search Results Lines", + "scope": [ + "entity.name.filename.find-in-files" + ], + "settings": { + "foreground": "#86b300" + } + }, + { + "scope": [ + "message.error" + ], + "settings": { + "foreground": "#e65050" + } + }, + { + "name": "Markup heading", + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#86b300" + } + }, + { + "name": "Markup links", + "scope": [ + "markup.underline.link", + "string.other.link" + ], + "settings": { + "foreground": "#55b4d4" + } + }, + { + "name": "Markup Italic", + "scope": [ + "markup.italic" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f07171" + } + }, + { + "name": "Markup Bold", + "scope": [ + "markup.bold" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f07171" + } + }, + { + "name": "Markup Bold/italic", + "scope": [ + "markup.italic markup.bold", + "markup.bold markup.italic" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "Markup Code", + "scope": [ + "markup.raw" + ], + "settings": { + "background": "#5c616605" + } + }, + { + "name": "Markup Code Inline", + "scope": [ + "markup.raw.inline" + ], + "settings": { + "background": "#5c61660f" + } + }, + { + "name": "Markdown Separator", + "scope": [ + "meta.separator" + ], + "settings": { + "fontStyle": "bold", + "background": "#5c61660f", + "foreground": "#787b8099" + } + }, + { + "name": "Markup Blockquote", + "scope": [ + "markup.quote" + ], + "settings": { + "foreground": "#4cbf99", + "fontStyle": "italic" + } + }, + { + "name": "Markup List Bullet", + "scope": [ + "markup.list punctuation.definition.list.begin" + ], + "settings": { + "foreground": "#f2ae49" + } + }, + { + "name": "Markup added", + "scope": [ + "markup.inserted" + ], + "settings": { + "foreground": "#6cbf43" + } + }, + { + "name": "Markup modified", + "scope": [ + "markup.changed" + ], + "settings": { + "foreground": "#478acc" + } + }, + { + "name": "Markup removed", + "scope": [ + "markup.deleted" + ], + "settings": { + "foreground": "#ff7383" + } + }, + { + "name": "Markup Strike", + "scope": [ + "markup.strike" + ], + "settings": { + "foreground": "#e6ba7e" + } + }, + { + "name": "Markup Table", + "scope": [ + "markup.table" + ], + "settings": { + "background": "#5c61660f", + "foreground": "#55b4d4" + } + }, + { + "name": "Markup Raw Inline", + "scope": [ + "text.html.markdown markup.inline.raw" + ], + "settings": { + "foreground": "#ed9366" + } + }, + { + "name": "Markdown - Line Break", + "scope": [ + "text.html.markdown meta.dummy.line-break" + ], + "settings": { + "background": "#787b8099", + "foreground": "#787b8099" + } + }, + { + "name": "Markdown - Raw Block Fenced", + "scope": [ + "punctuation.definition.markdown" + ], + "settings": { + "background": "#5c6166", + "foreground": "#787b8099" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "parameter.label": "#5c6166" + } +} \ No newline at end of file diff --git a/assets/themes/src/vsc/ayu/ayu-mirage.json b/assets/themes/src/vsc/ayu/ayu-mirage.json new file mode 100644 index 0000000000000000000000000000000000000000..770823682966b0342dde64444d03369bec6434e9 --- /dev/null +++ b/assets/themes/src/vsc/ayu/ayu-mirage.json @@ -0,0 +1,847 @@ +{ + "type": "dark", + "colors": { + "focusBorder": "#ffcc66b3", + "foreground": "#707a8c", + "widget.shadow": "#12151cb3", + "selection.background": "#409fff40", + "icon.foreground": "#707a8c", + "errorForeground": "#ff6666", + "descriptionForeground": "#707a8c", + "textBlockQuote.background": "#1c212b", + "textLink.foreground": "#ffcc66", + "textLink.activeForeground": "#ffcc66", + "textPreformat.foreground": "#cccac2", + "button.background": "#ffcc66", + "button.foreground": "#805500", + "button.hoverBackground": "#fac761", + "button.secondaryBackground": "#707a8c33", + "button.secondaryForeground": "#cccac2", + "button.secondaryHoverBackground": "#707a8c80", + "dropdown.background": "#242936", + "dropdown.foreground": "#707a8c", + "dropdown.border": "#707a8c45", + "input.background": "#242936", + "input.border": "#707a8c45", + "input.foreground": "#cccac2", + "input.placeholderForeground": "#707a8c80", + "inputOption.activeBorder": "#ffcc664d", + "inputOption.activeBackground": "#ffcc6633", + "inputOption.activeForeground": "#ffcc66", + "inputValidation.errorBackground": "#242936", + "inputValidation.errorBorder": "#ff6666", + "inputValidation.infoBackground": "#1f2430", + "inputValidation.infoBorder": "#5ccfe6", + "inputValidation.warningBackground": "#1f2430", + "inputValidation.warningBorder": "#ffd173", + "scrollbar.shadow": "#171b2400", + "scrollbarSlider.background": "#707a8c66", + "scrollbarSlider.hoverBackground": "#707a8c99", + "scrollbarSlider.activeBackground": "#707a8cb3", + "badge.background": "#ffcc6633", + "badge.foreground": "#ffcc66", + "progressBar.background": "#ffcc66", + "list.activeSelectionBackground": "#63759926", + "list.activeSelectionForeground": "#cccac2", + "list.focusBackground": "#63759926", + "list.focusForeground": "#cccac2", + "list.focusOutline": "#63759926", + "list.highlightForeground": "#ffcc66", + "list.deemphasizedForeground": "#ff6666", + "list.hoverBackground": "#63759926", + "list.inactiveSelectionBackground": "#69758c1f", + "list.inactiveSelectionForeground": "#707a8c", + "list.invalidItemForeground": "#707a8c4d", + "list.errorForeground": "#ff6666", + "tree.indentGuidesStroke": "#8a919959", + "listFilterWidget.background": "#1c212b", + "listFilterWidget.outline": "#ffcc66", + "listFilterWidget.noMatchesOutline": "#ff6666", + "list.filterMatchBackground": "#5c467266", + "list.filterMatchBorder": "#69538066", + "activityBar.background": "#1f2430", + "activityBar.foreground": "#707a8ccc", + "activityBar.inactiveForeground": "#707a8c99", + "activityBar.border": "#1f2430", + "activityBar.activeBorder": "#ffcc66", + "activityBarBadge.background": "#ffcc66", + "activityBarBadge.foreground": "#805500", + "sideBar.background": "#1f2430", + "sideBar.border": "#1f2430", + "sideBarTitle.foreground": "#707a8c", + "sideBarSectionHeader.background": "#1f2430", + "sideBarSectionHeader.foreground": "#707a8c", + "sideBarSectionHeader.border": "#1f2430", + "minimap.background": "#1f2430", + "minimap.selectionHighlight": "#409fff40", + "minimap.errorHighlight": "#ff6666", + "minimap.findMatchHighlight": "#695380", + "minimapGutter.addedBackground": "#87d96c", + "minimapGutter.modifiedBackground": "#80bfff", + "minimapGutter.deletedBackground": "#f27983", + "editorGroup.border": "#171b24", + "editorGroup.background": "#1c212b", + "editorGroupHeader.noTabsBackground": "#1f2430", + "editorGroupHeader.tabsBackground": "#1f2430", + "editorGroupHeader.tabsBorder": "#1f2430", + "tab.activeBackground": "#1f2430", + "tab.activeForeground": "#cccac2", + "tab.border": "#1f2430", + "tab.activeBorder": "#ffcc66", + "tab.unfocusedActiveBorder": "#707a8c", + "tab.inactiveBackground": "#1f2430", + "tab.inactiveForeground": "#707a8c", + "tab.unfocusedActiveForeground": "#707a8c", + "tab.unfocusedInactiveForeground": "#707a8c", + "editor.background": "#1f2430", + "editor.foreground": "#cccac2", + "editorLineNumber.foreground": "#8a919966", + "editorLineNumber.activeForeground": "#8a9199cc", + "editorCursor.foreground": "#ffcc66", + "editor.inactiveSelectionBackground": "#409fff21", + "editor.selectionBackground": "#409fff40", + "editor.selectionHighlightBackground": "#87d96c26", + "editor.selectionHighlightBorder": "#87d96c00", + "editor.wordHighlightBackground": "#80bfff14", + "editor.wordHighlightStrongBackground": "#87d96c14", + "editor.wordHighlightBorder": "#80bfff80", + "editor.wordHighlightStrongBorder": "#87d96c80", + "editor.findMatchBackground": "#695380", + "editor.findMatchBorder": "#695380", + "editor.findMatchHighlightBackground": "#69538066", + "editor.findMatchHighlightBorder": "#5c467266", + "editor.findRangeHighlightBackground": "#69538040", + "editor.rangeHighlightBackground": "#69538033", + "editor.lineHighlightBackground": "#1a1f29", + "editorLink.activeForeground": "#ffcc66", + "editorWhitespace.foreground": "#8a919966", + "editorIndentGuide.background": "#8a91992e", + "editorIndentGuide.activeBackground": "#8a919959", + "editorRuler.foreground": "#8a91992e", + "editorCodeLens.foreground": "#b8cfe680", + "editorBracketMatch.background": "#8a91994d", + "editorBracketMatch.border": "#8a91994d", + "editor.snippetTabstopHighlightBackground": "#87d96c33", + "editorOverviewRuler.border": "#171b24", + "editorOverviewRuler.modifiedForeground": "#80bfff", + "editorOverviewRuler.addedForeground": "#87d96c", + "editorOverviewRuler.deletedForeground": "#f27983", + "editorOverviewRuler.errorForeground": "#ff6666", + "editorOverviewRuler.warningForeground": "#ffcc66", + "editorOverviewRuler.bracketMatchForeground": "#8a9199b3", + "editorOverviewRuler.wordHighlightForeground": "#80bfff66", + "editorOverviewRuler.wordHighlightStrongForeground": "#87d96c66", + "editorOverviewRuler.findMatchForeground": "#695380", + "editorError.foreground": "#ff6666", + "editorWarning.foreground": "#ffcc66", + "editorGutter.modifiedBackground": "#80bfffcc", + "editorGutter.addedBackground": "#87d96ccc", + "editorGutter.deletedBackground": "#f27983cc", + "diffEditor.insertedTextBackground": "#87d96c1f", + "diffEditor.removedTextBackground": "#f279831f", + "diffEditor.diagonalFill": "#171b24", + "editorWidget.background": "#1c212b", + "editorWidget.border": "#171b24", + "editorHoverWidget.background": "#1c212b", + "editorHoverWidget.border": "#171b24", + "editorSuggestWidget.background": "#1c212b", + "editorSuggestWidget.border": "#171b24", + "editorSuggestWidget.highlightForeground": "#ffcc66", + "editorSuggestWidget.selectedBackground": "#63759926", + "debugExceptionWidget.border": "#171b24", + "debugExceptionWidget.background": "#1c212b", + "editorMarkerNavigation.background": "#1c212b", + "peekView.border": "#63759926", + "peekViewTitle.background": "#63759926", + "peekViewTitleDescription.foreground": "#707a8c", + "peekViewTitleLabel.foreground": "#cccac2", + "peekViewEditor.background": "#1c212b", + "peekViewEditor.matchHighlightBackground": "#69538066", + "peekViewEditor.matchHighlightBorder": "#5c467266", + "peekViewResult.background": "#1c212b", + "peekViewResult.fileForeground": "#cccac2", + "peekViewResult.lineForeground": "#707a8c", + "peekViewResult.matchHighlightBackground": "#69538066", + "peekViewResult.selectionBackground": "#63759926", + "panel.background": "#1f2430", + "panel.border": "#171b24", + "panelTitle.activeBorder": "#ffcc66", + "panelTitle.activeForeground": "#cccac2", + "panelTitle.inactiveForeground": "#707a8c", + "statusBar.background": "#1f2430", + "statusBar.foreground": "#707a8c", + "statusBar.border": "#1f2430", + "statusBar.debuggingBackground": "#f29e74", + "statusBar.debuggingForeground": "#242936", + "statusBar.noFolderBackground": "#1c212b", + "statusBarItem.activeBackground": "#707a8c33", + "statusBarItem.hoverBackground": "#707a8c33", + "statusBarItem.prominentBackground": "#171b24", + "statusBarItem.prominentHoverBackground": "#00000030", + "statusBarItem.remoteBackground": "#ffcc66", + "statusBarItem.remoteForeground": "#805500", + "titleBar.activeBackground": "#1f2430", + "titleBar.activeForeground": "#cccac2", + "titleBar.inactiveBackground": "#1f2430", + "titleBar.inactiveForeground": "#707a8c", + "titleBar.border": "#1f2430", + "extensionButton.prominentForeground": "#805500", + "extensionButton.prominentBackground": "#ffcc66", + "extensionButton.prominentHoverBackground": "#fac761", + "pickerGroup.border": "#171b24", + "pickerGroup.foreground": "#707a8c80", + "debugToolBar.background": "#1c212b", + "debugIcon.breakpointForeground": "#f29e74", + "debugIcon.breakpointDisabledForeground": "#f29e7480", + "debugConsoleInputIcon.foreground": "#ffcc66", + "welcomePage.tileBackground": "#1f2430", + "welcomePage.tileShadow": "#12151cb3", + "welcomePage.progress.background": "#1a1f29", + "welcomePage.buttonBackground": "#ffcc6666", + "walkThrough.embeddedEditorBackground": "#1c212b", + "gitDecoration.modifiedResourceForeground": "#80bfffb3", + "gitDecoration.deletedResourceForeground": "#f27983b3", + "gitDecoration.untrackedResourceForeground": "#87d96cb3", + "gitDecoration.ignoredResourceForeground": "#707a8c80", + "gitDecoration.conflictingResourceForeground": "", + "gitDecoration.submoduleResourceForeground": "#dfbfffb3", + "settings.headerForeground": "#cccac2", + "settings.modifiedItemIndicator": "#80bfff", + "keybindingLabel.background": "#707a8c1a", + "keybindingLabel.foreground": "#cccac2", + "keybindingLabel.border": "#cccac21a", + "keybindingLabel.bottomBorder": "#cccac21a", + "terminal.background": "#1f2430", + "terminal.foreground": "#cccac2", + "terminal.ansiBlack": "#171b24", + "terminal.ansiRed": "#ed8274", + "terminal.ansiGreen": "#87d96c", + "terminal.ansiYellow": "#facc6e", + "terminal.ansiBlue": "#6dcbfa", + "terminal.ansiMagenta": "#dabafa", + "terminal.ansiCyan": "#90e1c6", + "terminal.ansiWhite": "#c7c7c7", + "terminal.ansiBrightBlack": "#686868", + "terminal.ansiBrightRed": "#f28779", + "terminal.ansiBrightGreen": "#d5ff80", + "terminal.ansiBrightYellow": "#ffd173", + "terminal.ansiBrightBlue": "#73d0ff", + "terminal.ansiBrightMagenta": "#dfbfff", + "terminal.ansiBrightCyan": "#95e6cb", + "terminal.ansiBrightWhite": "#ffffff" + }, + "tokenColors": [ + { + "settings": { + "background": "#1f2430", + "foreground": "#cccac2" + } + }, + { + "name": "Comment", + "scope": [ + "comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#b8cfe680" + } + }, + { + "name": "String", + "scope": [ + "string", + "constant.other.symbol" + ], + "settings": { + "foreground": "#d5ff80" + } + }, + { + "name": "Regular Expressions and Escape Characters", + "scope": [ + "string.regexp", + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#95e6cb" + } + }, + { + "name": "Number", + "scope": [ + "constant.numeric" + ], + "settings": { + "foreground": "#dfbfff" + } + }, + { + "name": "Built-in constants", + "scope": [ + "constant.language" + ], + "settings": { + "foreground": "#dfbfff" + } + }, + { + "name": "Variable", + "scope": [ + "variable", + "variable.parameter.function-call" + ], + "settings": { + "foreground": "#cccac2" + } + }, + { + "name": "Member Variable", + "scope": [ + "variable.member" + ], + "settings": { + "foreground": "#f28779" + } + }, + { + "name": "Language variable", + "scope": [ + "variable.language" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#5ccfe6" + } + }, + { + "name": "Storage", + "scope": [ + "storage" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Keyword", + "scope": [ + "keyword" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Operators", + "scope": [ + "keyword.operator" + ], + "settings": { + "foreground": "#f29e74" + } + }, + { + "name": "Separators like ; or ,", + "scope": [ + "punctuation.separator", + "punctuation.terminator" + ], + "settings": { + "foreground": "#cccac2b3" + } + }, + { + "name": "Punctuation", + "scope": [ + "punctuation.section" + ], + "settings": { + "foreground": "#cccac2" + } + }, + { + "name": "Accessor", + "scope": [ + "punctuation.accessor" + ], + "settings": { + "foreground": "#f29e74" + } + }, + { + "name": "JavaScript/TypeScript interpolation punctuation", + "scope": [ + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Ruby interpolation punctuation", + "scope": [ + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Interpolation text", + "scope": [ + "meta.embedded" + ], + "settings": { + "foreground": "#cccac2" + } + }, + { + "name": "Types fixes", + "scope": [ + "source.java storage.type", + "source.haskell storage.type", + "source.c storage.type" + ], + "settings": { + "foreground": "#73d0ff" + } + }, + { + "name": "Inherited class type", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#5ccfe6" + } + }, + { + "name": "Lambda arrow", + "scope": [ + "storage.type.function" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Java primitive variable types", + "scope": [ + "source.java storage.type.primitive" + ], + "settings": { + "foreground": "#5ccfe6" + } + }, + { + "name": "Function name", + "scope": [ + "entity.name.function" + ], + "settings": { + "foreground": "#ffd173" + } + }, + { + "name": "Function arguments", + "scope": [ + "variable.parameter", + "meta.parameter" + ], + "settings": { + "foreground": "#dfbfff" + } + }, + { + "name": "Function call", + "scope": [ + "variable.function", + "variable.annotation", + "meta.function-call.generic", + "support.function.go" + ], + "settings": { + "foreground": "#ffd173" + } + }, + { + "name": "Library function", + "scope": [ + "support.function", + "support.macro" + ], + "settings": { + "foreground": "#f28779" + } + }, + { + "name": "Imports and packages", + "scope": [ + "entity.name.import", + "entity.name.package" + ], + "settings": { + "foreground": "#d5ff80" + } + }, + { + "name": "Entity name", + "scope": [ + "entity.name" + ], + "settings": { + "foreground": "#73d0ff" + } + }, + { + "name": "Tag", + "scope": [ + "entity.name.tag", + "meta.tag.sgml" + ], + "settings": { + "foreground": "#5ccfe6" + } + }, + { + "name": "JSX Component", + "scope": [ + "support.class.component" + ], + "settings": { + "foreground": "#73d0ff" + } + }, + { + "name": "Tag start/end", + "scope": [ + "punctuation.definition.tag.end", + "punctuation.definition.tag.begin", + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#5ccfe680" + } + }, + { + "name": "Tag attribute", + "scope": [ + "entity.other.attribute-name" + ], + "settings": { + "foreground": "#ffd173" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f29e74" + } + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class", + "source.go storage.type" + ], + "settings": { + "foreground": "#5ccfe6" + } + }, + { + "name": "Decorators/annotation", + "scope": [ + "meta.decorator variable.other", + "meta.decorator punctuation.decorator", + "storage.type.annotation" + ], + "settings": { + "foreground": "#ffdfb3" + } + }, + { + "name": "Invalid", + "scope": [ + "invalid" + ], + "settings": { + "foreground": "#ff6666" + } + }, + { + "name": "diff.header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#c594c5" + } + }, + { + "name": "Ruby class methods", + "scope": [ + "source.ruby variable.other.readwrite" + ], + "settings": { + "foreground": "#ffd173" + } + }, + { + "name": "CSS tag names", + "scope": [ + "source.css entity.name.tag", + "source.sass entity.name.tag", + "source.scss entity.name.tag", + "source.less entity.name.tag", + "source.stylus entity.name.tag" + ], + "settings": { + "foreground": "#73d0ff" + } + }, + { + "name": "CSS browser prefix", + "scope": [ + "source.css support.type", + "source.sass support.type", + "source.scss support.type", + "source.less support.type", + "source.stylus support.type" + ], + "settings": { + "foreground": "#b8cfe680" + } + }, + { + "name": "CSS Properties", + "scope": [ + "support.type.property-name" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#5ccfe6" + } + }, + { + "name": "Search Results Numbers", + "scope": [ + "constant.numeric.line-number.find-in-files - match" + ], + "settings": { + "foreground": "#b8cfe680" + } + }, + { + "name": "Search Results Match Numbers", + "scope": [ + "constant.numeric.line-number.match" + ], + "settings": { + "foreground": "#ffad66" + } + }, + { + "name": "Search Results Lines", + "scope": [ + "entity.name.filename.find-in-files" + ], + "settings": { + "foreground": "#d5ff80" + } + }, + { + "scope": [ + "message.error" + ], + "settings": { + "foreground": "#ff6666" + } + }, + { + "name": "Markup heading", + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#d5ff80" + } + }, + { + "name": "Markup links", + "scope": [ + "markup.underline.link", + "string.other.link" + ], + "settings": { + "foreground": "#5ccfe6" + } + }, + { + "name": "Markup Italic", + "scope": [ + "markup.italic" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f28779" + } + }, + { + "name": "Markup Bold", + "scope": [ + "markup.bold" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f28779" + } + }, + { + "name": "Markup Bold/italic", + "scope": [ + "markup.italic markup.bold", + "markup.bold markup.italic" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "Markup Code", + "scope": [ + "markup.raw" + ], + "settings": { + "background": "#cccac205" + } + }, + { + "name": "Markup Code Inline", + "scope": [ + "markup.raw.inline" + ], + "settings": { + "background": "#cccac20f" + } + }, + { + "name": "Markdown Separator", + "scope": [ + "meta.separator" + ], + "settings": { + "fontStyle": "bold", + "background": "#cccac20f", + "foreground": "#b8cfe680" + } + }, + { + "name": "Markup Blockquote", + "scope": [ + "markup.quote" + ], + "settings": { + "foreground": "#95e6cb", + "fontStyle": "italic" + } + }, + { + "name": "Markup List Bullet", + "scope": [ + "markup.list punctuation.definition.list.begin" + ], + "settings": { + "foreground": "#ffd173" + } + }, + { + "name": "Markup added", + "scope": [ + "markup.inserted" + ], + "settings": { + "foreground": "#87d96c" + } + }, + { + "name": "Markup modified", + "scope": [ + "markup.changed" + ], + "settings": { + "foreground": "#80bfff" + } + }, + { + "name": "Markup removed", + "scope": [ + "markup.deleted" + ], + "settings": { + "foreground": "#f27983" + } + }, + { + "name": "Markup Strike", + "scope": [ + "markup.strike" + ], + "settings": { + "foreground": "#ffdfb3" + } + }, + { + "name": "Markup Table", + "scope": [ + "markup.table" + ], + "settings": { + "background": "#cccac20f", + "foreground": "#5ccfe6" + } + }, + { + "name": "Markup Raw Inline", + "scope": [ + "text.html.markdown markup.inline.raw" + ], + "settings": { + "foreground": "#f29e74" + } + }, + { + "name": "Markdown - Line Break", + "scope": [ + "text.html.markdown meta.dummy.line-break" + ], + "settings": { + "background": "#b8cfe680", + "foreground": "#b8cfe680" + } + }, + { + "name": "Markdown - Raw Block Fenced", + "scope": [ + "punctuation.definition.markdown" + ], + "settings": { + "background": "#cccac2", + "foreground": "#b8cfe680" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "parameter.label": "#cccac2" + } +} \ No newline at end of file diff --git a/assets/themes/src/vsc/ayu/family.json b/assets/themes/src/vsc/ayu/family.json new file mode 100644 index 0000000000000000000000000000000000000000..8c0d0c5c5576bf2b70fb28389428c89aa43337b8 --- /dev/null +++ b/assets/themes/src/vsc/ayu/family.json @@ -0,0 +1,18 @@ +{ + "name": "Ayu", + "author": "dempfi (Ike Ku)", + "themes": [ + { + "name": "Ayu Light", + "appearance": "light" + }, + { + "name": "Ayu Mirage", + "appearance": "dark" + }, + { + "name": "Ayu Dark", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vsc/dracula/family.json b/assets/themes/src/vsc/dracula/family.json new file mode 100644 index 0000000000000000000000000000000000000000..50d5940a7b74903dbca55bba2908e1ff37c327a5 --- /dev/null +++ b/assets/themes/src/vsc/dracula/family.json @@ -0,0 +1,10 @@ +{ + "name": "Dracula", + "author": "Zeno Rocha", + "themes": [ + { + "name": "Dracula", + "appearance": "dark" + } + ] +} diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs deleted file mode 100644 index 6fe1fc705b32b741b74e4dd1ac36e729fd77e3cb..0000000000000000000000000000000000000000 --- a/crates/theme2/src/import.rs +++ /dev/null @@ -1,471 +0,0 @@ -use serde::Deserialize; - -#[derive(Deserialize, Debug)] -pub struct Theme { - #[serde(rename = "$schema")] - pub schema: String, - pub name: String, - pub author: String, - pub maintainers: Vec, - #[serde(rename = "semanticClass")] - pub semantic_class: String, - #[serde(rename = "semanticHighlighting")] - pub semantic_highlighting: bool, - // pub colors: VSCodeColors, -} - -#[derive(Debug, Deserialize)] -pub struct VSCodeColors { - #[serde(rename = "editor_foreground")] - text: String, - #[serde(rename = "editor")] - editor_background: String, -} - -#[cfg(test)] -mod tests { - use super::*; - use std::path::PathBuf; - - #[test] - fn test_deserialize_dracula() { - let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); - - let mut d = root_dir.to_path_buf(); - d.push("assets/themes/src/vsc/dracula/dracula.json"); - - let data = std::fs::read_to_string(d).expect("Unable to read file"); - - let result: Theme = serde_json::from_str(&data).unwrap(); - println!("{:#?}", result); - - // Uncomment the following lines to print specific fields - println!("Name: {:?}", result.name); - println!("Author: {:?}", result.author); - } -} - -// #[derive(Debug, Deserialize)] -// pub struct VSCodeColors { -// #[serde(rename = "vsc_terminal_background")] -// terminal_background: String, -// #[serde(rename = "vsc_terminal_foreground")] -// terminal_foreground: String, -// #[serde(rename = "vsc_terminal_ansi_bright_black")] -// terminal_ansi_bright_black: String, -// #[serde(rename = "vsc_terminal_ansi_bright_red")] -// terminal_ansi_bright_red: String, -// #[serde(rename = "vsc_terminal_ansi_bright_green")] -// terminal_ansi_bright_green: String, -// #[serde(rename = "vsc_terminal_ansi_bright_yellow")] -// terminal_ansi_bright_yellow: String, -// #[serde(rename = "vsc_terminal_ansi_bright_blue")] -// terminal_ansi_bright_blue: String, -// #[serde(rename = "vsc_terminal_ansi_bright_magenta")] -// terminal_ansi_bright_magenta: String, -// #[serde(rename = "vsc_terminal_ansi_bright_cyan")] -// terminal_ansi_bright_cyan: String, -// #[serde(rename = "vsc_terminal_ansi_bright_white")] -// terminal_ansi_bright_white: String, -// #[serde(rename = "vsc_terminal_ansi_black")] -// terminal_ansi_black: String, -// #[serde(rename = "vsc_terminal_ansi_red")] -// terminal_ansi_red: String, -// #[serde(rename = "vsc_terminal_ansi_green")] -// terminal_ansi_green: String, -// #[serde(rename = "vsc_terminal_ansi_yellow")] -// terminal_ansi_yellow: String, -// #[serde(rename = "vsc_terminal_ansi_blue")] -// terminal_ansi_blue: String, -// #[serde(rename = "vsc_terminal_ansi_magenta")] -// terminal_ansi_magenta: String, -// #[serde(rename = "vsc_terminal_ansi_cyan")] -// terminal_ansi_cyan: String, -// #[serde(rename = "vsc_terminal_ansi_white")] -// terminal_ansi_white: String, -// #[serde(rename = "vsc_focus_border")] -// focus_border: String, -// #[serde(rename = "vsc_foreground")] -// foreground: String, -// #[serde(rename = "vsc_selection_background")] -// selection_background: String, -// #[serde(rename = "vsc_error_foreground")] -// error_foreground: String, -// #[serde(rename = "vsc_button_background")] -// button_background: String, -// #[serde(rename = "vsc_button_foreground")] -// button_foreground: String, -// #[serde(rename = "vsc_button_secondary_background")] -// button_secondary_background: String, -// #[serde(rename = "vsc_button_secondary_foreground")] -// button_secondary_foreground: String, -// #[serde(rename = "vsc_button_secondary_hover_background")] -// button_secondary_hover_background: String, -// #[serde(rename = "vsc_dropdown_background")] -// dropdown_background: String, -// #[serde(rename = "vsc_dropdown_border")] -// dropdown_border: String, -// #[serde(rename = "vsc_dropdown_foreground")] -// dropdown_foreground: String, -// #[serde(rename = "vsc_input_background")] -// input_background: String, -// #[serde(rename = "vsc_input_foreground")] -// input_foreground: String, -// #[serde(rename = "vsc_input_border")] -// input_border: String, -// #[serde(rename = "vsc_input_placeholder_foreground")] -// input_placeholder_foreground: String, -// #[serde(rename = "vsc_input_option_active_border")] -// input_option_active_border: String, -// #[serde(rename = "vsc_input_validation_info_border")] -// input_validation_info_border: String, -// #[serde(rename = "vsc_input_validation_warning_border")] -// input_validation_warning_border: String, -// #[serde(rename = "vsc_input_validation_error_border")] -// input_validation_error_border: String, -// #[serde(rename = "vsc_badge_foreground")] -// badge_foreground: String, -// #[serde(rename = "vsc_badge_background")] -// badge_background: String, -// #[serde(rename = "vsc_progress_bar_background")] -// progress_bar_background: String, -// #[serde(rename = "vsc_list_active_selection_background")] -// list_active_selection_background: String, -// #[serde(rename = "vsc_list_active_selection_foreground")] -// list_active_selection_foreground: String, -// #[serde(rename = "vsc_list_drop_background")] -// list_drop_background: String, -// #[serde(rename = "vsc_list_focus_background")] -// list_focus_background: String, -// #[serde(rename = "vsc_list_highlight_foreground")] -// list_highlight_foreground: String, -// #[serde(rename = "vsc_list_hover_background")] -// list_hover_background: String, -// #[serde(rename = "vsc_list_inactive_selection_background")] -// list_inactive_selection_background: String, -// #[serde(rename = "vsc_list_warning_foreground")] -// list_warning_foreground: String, -// #[serde(rename = "vsc_list_error_foreground")] -// list_error_foreground: String, -// #[serde(rename = "vsc_activity_bar_background")] -// activity_bar_background: String, -// #[serde(rename = "vsc_activity_bar_inactive_foreground")] -// activity_bar_inactive_foreground: String, -// #[serde(rename = "vsc_activity_bar_foreground")] -// activity_bar_foreground: String, -// #[serde(rename = "vsc_activity_bar_active_border")] -// activity_bar_active_border: String, -// #[serde(rename = "vsc_activity_bar_active_background")] -// activity_bar_active_background: String, -// #[serde(rename = "vsc_activity_bar_badge_background")] -// activity_bar_badge_background: String, -// #[serde(rename = "vsc_activity_bar_badge_foreground")] -// activity_bar_badge_foreground: String, -// #[serde(rename = "vsc_side_bar_background")] -// side_bar_background: String, -// #[serde(rename = "vsc_side_bar_title_foreground")] -// side_bar_title_foreground: String, -// #[serde(rename = "vsc_side_bar_section_header_background")] -// side_bar_section_header_background: String, -// #[serde(rename = "vsc_side_bar_section_header_border")] -// side_bar_section_header_border: String, -// #[serde(rename = "vsc_editor_group_border")] -// editor_group_border: String, -// #[serde(rename = "vsc_editor_group_drop_background")] -// editor_group_drop_background: String, -// #[serde(rename = "vsc_editor_group_header_tabs_background")] -// editor_group_header_tabs_background: String, -// #[serde(rename = "vsc_tab_active_background")] -// tab_active_background: String, -// #[serde(rename = "vsc_tab_active_foreground")] -// tab_active_foreground: String, -// #[serde(rename = "vsc_tab_border")] -// tab_border: String, -// #[serde(rename = "vsc_tab_active_border_top")] -// tab_active_border_top: String, -// #[serde(rename = "vsc_tab_inactive_background")] -// tab_inactive_background: String, -// #[serde(rename = "vsc_tab_inactive_foreground")] -// tab_inactive_foreground: String, -// #[serde(rename = "vsc_editor_foreground")] -// editor_foreground: String, -// #[serde(rename = "vsc_editor_background")] -// editor_background: String, -// #[serde(rename = "vsc_editor_line_number_foreground")] -// editor_line_number_foreground: String, -// #[serde(rename = "vsc_editor_selection_background")] -// editor_selection_background: String, -// #[serde(rename = "vsc_editor_selection_highlight_background")] -// editor_selection_highlight_background: String, -// #[serde(rename = "vsc_editor_fold_background")] -// editor_fold_background: String, -// #[serde(rename = "vsc_editor_word_highlight_background")] -// editor_word_highlight_background: String, -// #[serde(rename = "vsc_editor_word_highlight_strong_background")] -// editor_word_highlight_strong_background: String, -// #[serde(rename = "vsc_editor_find_match_background")] -// editor_find_match_background: String, -// #[serde(rename = "vsc_editor_find_match_highlight_background")] -// editor_find_match_highlight_background: String, -// #[serde(rename = "vsc_editor_find_range_highlight_background")] -// editor_find_range_highlight_background: String, -// #[serde(rename = "vsc_editor_hover_highlight_background")] -// editor_hover_highlight_background: String, -// #[serde(rename = "vsc_editor_line_highlight_border")] -// editor_line_highlight_border: String, -// #[serde(rename = "vsc_editor_link_active_foreground")] -// editor_link_active_foreground: String, -// #[serde(rename = "vsc_editor_range_highlight_background")] -// editor_range_highlight_background: String, -// #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] -// editor_snippet_tabstop_highlight_background: String, -// #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] -// editor_snippet_tabstop_highlight_border: String, -// #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] -// editor_snippet_final_tabstop_highlight_background: String, -// #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] -// editor_snippet_final_tabstop_highlight_border: String, -// #[serde(rename = "vsc_editor_whitespace_foreground")] -// editor_whitespace_foreground: String, -// #[serde(rename = "vsc_editor_indent_guide_background")] -// editor_indent_guide_background: String, -// #[serde(rename = "vsc_editor_indent_guide_active_background")] -// editor_indent_guide_active_background: String, -// #[serde(rename = "vsc_editor_ruler_foreground")] -// editor_ruler_foreground: String, -// #[serde(rename = "vsc_editor_code_lens_foreground")] -// editor_code_lens_foreground: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] -// editor_bracket_highlight_foreground1: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] -// editor_bracket_highlight_foreground2: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] -// editor_bracket_highlight_foreground3: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] -// editor_bracket_highlight_foreground4: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] -// editor_bracket_highlight_foreground5: String, -// #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] -// editor_bracket_highlight_foreground6: String, -// #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] -// editor_bracket_highlight_unexpected_bracket_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_border")] -// editor_overview_ruler_border: String, -// #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] -// editor_overview_ruler_selection_highlight_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] -// editor_overview_ruler_word_highlight_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] -// editor_overview_ruler_word_highlight_strong_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] -// editor_overview_ruler_modified_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] -// editor_overview_ruler_added_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] -// editor_overview_ruler_deleted_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] -// editor_overview_ruler_error_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] -// editor_overview_ruler_warning_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] -// editor_overview_ruler_info_foreground: String, -// #[serde(rename = "vsc_editor_error_foreground")] -// editor_error_foreground: String, -// #[serde(rename = "vsc_editor_warning_foreground")] -// editor_warning_foreground: String, -// #[serde(rename = "vsc_editor_gutter_modified_background")] -// editor_gutter_modified_background: String, -// #[serde(rename = "vsc_editor_gutter_added_background")] -// editor_gutter_added_background: String, -// #[serde(rename = "vsc_editor_gutter_deleted_background")] -// editor_gutter_deleted_background: String, -// #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] -// git_decoration_modified_resource_foreground: String, -// #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] -// git_decoration_deleted_resource_foreground: String, -// #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] -// git_decoration_untracked_resource_foreground: String, -// #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] -// git_decoration_ignored_resource_foreground: String, -// #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] -// git_decoration_conflicting_resource_foreground: String, -// #[serde(rename = "vsc_diff_editor_inserted_text_background")] -// diff_editor_inserted_text_background: String, -// #[serde(rename = "vsc_diff_editor_removed_text_background")] -// diff_editor_removed_text_background: String, -// #[serde(rename = "vsc_inline_chat_region_highlight")] -// inline_chat_region_highlight: String, -// #[serde(rename = "vsc_editor_widget_background")] -// editor_widget_background: String, -// #[serde(rename = "vsc_editor_suggest_widget_background")] -// editor_suggest_widget_background: String, -// #[serde(rename = "vsc_editor_suggest_widget_foreground")] -// editor_suggest_widget_foreground: String, -// #[serde(rename = "vsc_editor_suggest_widget_selected_background")] -// editor_suggest_widget_selected_background: String, -// #[serde(rename = "vsc_editor_hover_widget_background")] -// editor_hover_widget_background: String, -// #[serde(rename = "vsc_editor_hover_widget_border")] -// editor_hover_widget_border: String, -// #[serde(rename = "vsc_editor_marker_navigation_background")] -// editor_marker_navigation_background: String, -// #[serde(rename = "vsc_peek_view_border")] -// peek_view_border: String, -// #[serde(rename = "vsc_peek_view_editor_background")] -// peek_view_editor_background: String, -// #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] -// peek_view_editor_match_highlight_background: String, -// #[serde(rename = "vsc_peek_view_result_background")] -// peek_view_result_background: String, -// #[serde(rename = "vsc_peek_view_result_file_foreground")] -// peek_view_result_file_foreground: String, -// #[serde(rename = "vsc_peek_view_result_line_foreground")] -// peek_view_result_line_foreground: String, -// #[serde(rename = "vsc_peek_view_result_match_highlight_background")] -// peek_view_result_match_highlight_background: String, -// #[serde(rename = "vsc_peek_view_result_selection_background")] -// peek_view_result_selection_background: String, -// #[serde(rename = "vsc_peek_view_result_selection_foreground")] -// peek_view_result_selection_foreground: String, -// #[serde(rename = "vsc_peek_view_title_background")] -// peek_view_title_background: String, -// #[serde(rename = "vsc_peek_view_title_description_foreground")] -// peek_view_title_description_foreground: String, -// #[serde(rename = "vsc_peek_view_title_label_foreground")] -// peek_view_title_label_foreground: String, -// #[serde(rename = "vsc_merge_current_header_background")] -// merge_current_header_background: String, -// #[serde(rename = "vsc_merge_incoming_header_background")] -// merge_incoming_header_background: String, -// #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] -// editor_overview_ruler_current_content_foreground: String, -// #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] -// editor_overview_ruler_incoming_content_foreground: String, -// #[serde(rename = "vsc_panel_background")] -// panel_background: String, -// #[serde(rename = "vsc_panel_border")] -// panel_border: String, -// #[serde(rename = "vsc_panel_title_active_border")] -// panel_title_active_border: String, -// #[serde(rename = "vsc_panel_title_active_foreground")] -// panel_title_active_foreground: String, -// #[serde(rename = "vsc_panel_title_inactive_foreground")] -// panel_title_inactive_foreground: String, -// #[serde(rename = "vsc_status_bar_background")] -// status_bar_background: String, -// #[serde(rename = "vsc_status_bar_foreground")] -// status_bar_foreground: String, -// #[serde(rename = "vsc_status_bar_debugging_background")] -// status_bar_debugging_background: String, -// #[serde(rename = "vsc_status_bar_debugging_foreground")] -// status_bar_debugging_foreground: String, -// #[serde(rename = "vsc_status_bar_no_folder_background")] -// status_bar_no_folder_background: String, -// #[serde(rename = "vsc_status_bar_no_folder_foreground")] -// status_bar_no_folder_foreground: String, -// #[serde(rename = "vsc_status_bar_item_prominent_background")] -// status_bar_item_prominent_background: String, -// #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] -// status_bar_item_prominent_hover_background: String, -// #[serde(rename = "vsc_status_bar_item_remote_foreground")] -// status_bar_item_remote_foreground: String, -// #[serde(rename = "vsc_status_bar_item_remote_background")] -// status_bar_item_remote_background: String, -// #[serde(rename = "vsc_title_bar_active_background")] -// title_bar_active_background: String, -// #[serde(rename = "vsc_title_bar_active_foreground")] -// title_bar_active_foreground: String, -// #[serde(rename = "vsc_title_bar_inactive_background")] -// title_bar_inactive_background: String, -// #[serde(rename = "vsc_title_bar_inactive_foreground")] -// title_bar_inactive_foreground: String, -// #[serde(rename = "vsc_extension_button_prominent_foreground")] -// extension_button_prominent_foreground: String, -// #[serde(rename = "vsc_extension_button_prominent_background")] -// extension_button_prominent_background: String, -// #[serde(rename = "vsc_extension_button_prominent_hover_background")] -// extension_button_prominent_hover_background: String, -// #[serde(rename = "vsc_picker_group_border")] -// picker_group_border: String, -// #[serde(rename = "vsc_picker_group_foreground")] -// picker_group_foreground: String, -// #[serde(rename = "vsc_debug_tool_bar_background")] -// debug_tool_bar_background: String, -// #[serde(rename = "vsc_walk_through_embedded_editor_background")] -// walk_through_embedded_editor_background: String, -// #[serde(rename = "vsc_settings_header_foreground")] -// settings_header_foreground: String, -// #[serde(rename = "vsc_settings_modified_item_indicator")] -// settings_modified_item_indicator: String, -// #[serde(rename = "vsc_settings_dropdown_background")] -// settings_dropdown_background: String, -// #[serde(rename = "vsc_settings_dropdown_foreground")] -// settings_dropdown_foreground: String, -// #[serde(rename = "vsc_settings_dropdown_border")] -// settings_dropdown_border: String, -// #[serde(rename = "vsc_settings_checkbox_background")] -// settings_checkbox_background: String, -// #[serde(rename = "vsc_settings_checkbox_foreground")] -// settings_checkbox_foreground: String, -// #[serde(rename = "vsc_settings_checkbox_border")] -// settings_checkbox_border: String, -// #[serde(rename = "vsc_settings_text_input_background")] -// settings_text_input_background: String, -// #[serde(rename = "vsc_settings_text_input_foreground")] -// settings_text_input_foreground: String, -// #[serde(rename = "vsc_settings_text_input_border")] -// settings_text_input_border: String, -// #[serde(rename = "vsc_settings_number_input_background")] -// settings_number_input_background: String, -// #[serde(rename = "vsc_settings_number_input_foreground")] -// settings_number_input_foreground: String, -// #[serde(rename = "vsc_settings_number_input_border")] -// settings_number_input_border: String, -// #[serde(rename = "vsc_breadcrumb_foreground")] -// breadcrumb_foreground: String, -// #[serde(rename = "vsc_breadcrumb_background")] -// breadcrumb_background: String, -// #[serde(rename = "vsc_breadcrumb_focus_foreground")] -// breadcrumb_focus_foreground: String, -// #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] -// breadcrumb_active_selection_foreground: String, -// #[serde(rename = "vsc_breadcrumb_picker_background")] -// breadcrumb_picker_background: String, -// #[serde(rename = "vsc_list_filter_widget_background")] -// list_filter_widget_background: String, -// #[serde(rename = "vsc_list_filter_widget_outline")] -// list_filter_widget_outline: String, -// #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] -// list_filter_widget_no_matches_outline: String, -// } - -// use crate::ThemeColorsRefinement; - -// struct ImportedThemeFamily { -// pub id: String, -// pub name: String, -// pub author: String, -// pub url: String, -// pub license: String, -// pub themes: Vec, -// } - -// struct ImportedThemeVariant { -// pub id: String, -// pub name: String, -// pub colors: ThemeColorsRefinement, -// } - -// pub fn try_vscode_colors_to_theme_colors(colors: VSCodeColors) -> ThemeColorsRefinement { -// let mut theme_colors = ThemeColorsRefinement::default(); - -// theme_colors -// } - -// pub fn vscode_colors_to_theme_colors(color: String) -> ThemeColorsRefinement { -// ThemeColorsRefinement { -// text: Some(color), -// ..Default::default() -// } -// } diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 431a96c05f66a039ae4624f82191399d288857fb..0aa3542a77a4df7a36a8b8f7ec13b60d44482e89 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -1,7 +1,6 @@ mod colors; mod default_colors; mod default_theme; -mod import; mod registry; mod scale; mod settings; @@ -40,8 +39,7 @@ impl ActiveTheme for AppContext { } pub struct ThemeFamily { - #[allow(dead_code)] - pub(crate) id: String, + pub id: String, pub name: SharedString, pub author: SharedString, pub themes: Vec, diff --git a/crates/theme_importer/Cargo.toml b/crates/theme_importer/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..443cc2e50bdd5ab5a78e4b3b47f04c807793936f --- /dev/null +++ b/crates/theme_importer/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "theme_importer" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow.workspace = true +convert_case = "0.6.0" +gpui = { package = "gpui2", path = "../gpui2" } +log.workspace = true +rust-embed.workspace = true +serde.workspace = true +simplelog = "0.9" +theme = { package = "theme2", path = "../theme2" } +uuid.workspace = true diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs new file mode 100644 index 0000000000000000000000000000000000000000..82e2105e0ce106a36e6dad6d19658d1ffa330279 --- /dev/null +++ b/crates/theme_importer/src/main.rs @@ -0,0 +1,142 @@ +use std::path::PathBuf; +use std::str::FromStr; +use std::{borrow::Cow, fs::File}; + +use anyhow::{anyhow, Context, Result}; +use convert_case::Case; +use gpui::{AssetSource, SharedString}; +use log::LevelFilter; +use rust_embed::RustEmbed; +use serde::Deserialize; +use simplelog::SimpleLogger; +use theme::{default_color_scales, ThemeColorsRefinement, ThemeFamily}; + +mod vscode; + +pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { + ThemeFamily { + id: uuid::Uuid::new_v4().to_string(), + name: name.into(), + author: author.into(), + themes: Vec::new(), + scales: default_color_scales(), + } +} + +#[derive(Deserialize)] +struct FamilyJson { + pub name: String, + pub themes: Vec, +} + +#[derive(Deserialize)] +#[serde(rename_all = "snake_case")] +enum ThemeAppearanceJson { + Light, + Dark, +} + +#[derive(Deserialize)] +struct ThemeVariantJson { + pub name: String, + pub appearance: ThemeAppearanceJson, +} + +struct ImportedThemeFamily { + pub id: String, + pub name: String, + pub author: String, + pub url: Option, + // App should panic if we try to load a theme without a lisence + pub license: String, + pub themes: Vec, +} + +struct ImportedThemeVariant { + pub id: String, + pub name: String, + pub colors: ThemeColorsRefinement, +} + +// Load a vscode theme from json +// Load it's LICENSE from the same folder +// Create a ThemeFamily for the theme +// Create a ThemeVariant or Variants for the theme +// Output a rust file with the ThemeFamily and ThemeVariant(s) in it + +fn main() -> Result<()> { + SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); + + let themes_path = PathBuf::from_str("crates/theme2/src/themes")?; + + let mut theme_modules = Vec::new(); + + for theme_path in Assets.list("themes/src/vsc/")? { + let (_, theme_name) = theme_path.split_once("themes/").unwrap(); + + if theme_name == ".gitkeep" { + continue; + } + + let theme_contents = Assets::get(&theme_path) + .with_context(|| format!("theme file not found: '{theme_path}'"))?; + + // let json_theme: JsonTheme = + // serde_json::from_str(std::str::from_utf8(&theme_contents.data)?) + // .context("failed to parse legacy theme")?; + + // let (json_theme, legacy_theme) = load_theme(&theme_path)?; + + // let theme = convert_theme(json_theme, legacy_theme)?; + + // let theme_slug = theme + // .metadata + // .name + // .as_ref() + // .replace("é", "e") + // .to_case(Case::Snake); + + // let mut output_file = File::create(themes_path.join(format!("{theme_slug}.rs")))?; + + // let theme_module = format!( + // r#" + // use gpui2::rgba; + + // use crate::{{PlayerTheme, SyntaxTheme, Theme, ThemeMetadata}}; + + // pub fn {theme_slug}() -> Theme {{ + // {theme_definition} + // }} + // "#, + // theme_definition = format!("{:#?}", ThemePrinter::new(theme)) + // ); + + // output_file.write_all(theme_module.as_bytes())?; + + theme_modules.push(theme_slug); + } + + println!("Hello, world!"); + + Ok(()) +} + +#[derive(RustEmbed)] +#[folder = "../../assets"] +#[include = "themes/**/*"] +pub struct Assets; + +impl AssetSource for Assets { + fn load(&self, path: &str) -> Result> { + Self::get(path) + .map(|f| f.data) + .ok_or_else(|| anyhow!("could not find asset at path \"{}\"", path)) + } + + fn list(&self, path: &str) -> Result> { + Ok(Self::iter() + .filter(|p| p.starts_with(path)) + .map(SharedString::from) + .collect()) + } +} diff --git a/crates/theme_importer/src/temp.rs b/crates/theme_importer/src/temp.rs new file mode 100644 index 0000000000000000000000000000000000000000..5536a1984be52796360acdd518acc57f77742f49 --- /dev/null +++ b/crates/theme_importer/src/temp.rs @@ -0,0 +1,393 @@ +#[derive(Debug, Deserialize)] +struct VSCodeColorsOld { + #[serde(rename = "vsc_terminal_background")] + terminal_background: String, + #[serde(rename = "vsc_terminal_foreground")] + terminal_foreground: String, + #[serde(rename = "vsc_terminal_ansi_bright_black")] + terminal_ansi_bright_black: String, + #[serde(rename = "vsc_terminal_ansi_bright_red")] + terminal_ansi_bright_red: String, + #[serde(rename = "vsc_terminal_ansi_bright_green")] + terminal_ansi_bright_green: String, + #[serde(rename = "vsc_terminal_ansi_bright_yellow")] + terminal_ansi_bright_yellow: String, + #[serde(rename = "vsc_terminal_ansi_bright_blue")] + terminal_ansi_bright_blue: String, + #[serde(rename = "vsc_terminal_ansi_bright_magenta")] + terminal_ansi_bright_magenta: String, + #[serde(rename = "vsc_terminal_ansi_bright_cyan")] + terminal_ansi_bright_cyan: String, + #[serde(rename = "vsc_terminal_ansi_bright_white")] + terminal_ansi_bright_white: String, + #[serde(rename = "vsc_terminal_ansi_black")] + terminal_ansi_black: String, + #[serde(rename = "vsc_terminal_ansi_red")] + terminal_ansi_red: String, + #[serde(rename = "vsc_terminal_ansi_green")] + terminal_ansi_green: String, + #[serde(rename = "vsc_terminal_ansi_yellow")] + terminal_ansi_yellow: String, + #[serde(rename = "vsc_terminal_ansi_blue")] + terminal_ansi_blue: String, + #[serde(rename = "vsc_terminal_ansi_magenta")] + terminal_ansi_magenta: String, + #[serde(rename = "vsc_terminal_ansi_cyan")] + terminal_ansi_cyan: String, + #[serde(rename = "vsc_terminal_ansi_white")] + terminal_ansi_white: String, + #[serde(rename = "vsc_focus_border")] + focus_border: String, + #[serde(rename = "vsc_foreground")] + foreground: String, + #[serde(rename = "vsc_selection_background")] + selection_background: String, + #[serde(rename = "vsc_error_foreground")] + error_foreground: String, + #[serde(rename = "vsc_button_background")] + button_background: String, + #[serde(rename = "vsc_button_foreground")] + button_foreground: String, + #[serde(rename = "vsc_button_secondary_background")] + button_secondary_background: String, + #[serde(rename = "vsc_button_secondary_foreground")] + button_secondary_foreground: String, + #[serde(rename = "vsc_button_secondary_hover_background")] + button_secondary_hover_background: String, + #[serde(rename = "vsc_dropdown_background")] + dropdown_background: String, + #[serde(rename = "vsc_dropdown_border")] + dropdown_border: String, + #[serde(rename = "vsc_dropdown_foreground")] + dropdown_foreground: String, + #[serde(rename = "vsc_input_background")] + input_background: String, + #[serde(rename = "vsc_input_foreground")] + input_foreground: String, + #[serde(rename = "vsc_input_border")] + input_border: String, + #[serde(rename = "vsc_input_placeholder_foreground")] + input_placeholder_foreground: String, + #[serde(rename = "vsc_input_option_active_border")] + input_option_active_border: String, + #[serde(rename = "vsc_input_validation_info_border")] + input_validation_info_border: String, + #[serde(rename = "vsc_input_validation_warning_border")] + input_validation_warning_border: String, + #[serde(rename = "vsc_input_validation_error_border")] + input_validation_error_border: String, + #[serde(rename = "vsc_badge_foreground")] + badge_foreground: String, + #[serde(rename = "vsc_badge_background")] + badge_background: String, + #[serde(rename = "vsc_progress_bar_background")] + progress_bar_background: String, + #[serde(rename = "vsc_list_active_selection_background")] + list_active_selection_background: String, + #[serde(rename = "vsc_list_active_selection_foreground")] + list_active_selection_foreground: String, + #[serde(rename = "vsc_list_drop_background")] + list_drop_background: String, + #[serde(rename = "vsc_list_focus_background")] + list_focus_background: String, + #[serde(rename = "vsc_list_highlight_foreground")] + list_highlight_foreground: String, + #[serde(rename = "vsc_list_hover_background")] + list_hover_background: String, + #[serde(rename = "vsc_list_inactive_selection_background")] + list_inactive_selection_background: String, + #[serde(rename = "vsc_list_warning_foreground")] + list_warning_foreground: String, + #[serde(rename = "vsc_list_error_foreground")] + list_error_foreground: String, + #[serde(rename = "vsc_activity_bar_background")] + activity_bar_background: String, + #[serde(rename = "vsc_activity_bar_inactive_foreground")] + activity_bar_inactive_foreground: String, + #[serde(rename = "vsc_activity_bar_foreground")] + activity_bar_foreground: String, + #[serde(rename = "vsc_activity_bar_active_border")] + activity_bar_active_border: String, + #[serde(rename = "vsc_activity_bar_active_background")] + activity_bar_active_background: String, + #[serde(rename = "vsc_activity_bar_badge_background")] + activity_bar_badge_background: String, + #[serde(rename = "vsc_activity_bar_badge_foreground")] + activity_bar_badge_foreground: String, + #[serde(rename = "vsc_side_bar_background")] + side_bar_background: String, + #[serde(rename = "vsc_side_bar_title_foreground")] + side_bar_title_foreground: String, + #[serde(rename = "vsc_side_bar_section_header_background")] + side_bar_section_header_background: String, + #[serde(rename = "vsc_side_bar_section_header_border")] + side_bar_section_header_border: String, + #[serde(rename = "vsc_editor_group_border")] + editor_group_border: String, + #[serde(rename = "vsc_editor_group_drop_background")] + editor_group_drop_background: String, + #[serde(rename = "vsc_editor_group_header_tabs_background")] + editor_group_header_tabs_background: String, + #[serde(rename = "vsc_tab_active_background")] + tab_active_background: String, + #[serde(rename = "vsc_tab_active_foreground")] + tab_active_foreground: String, + #[serde(rename = "vsc_tab_border")] + tab_border: String, + #[serde(rename = "vsc_tab_active_border_top")] + tab_active_border_top: String, + #[serde(rename = "vsc_tab_inactive_background")] + tab_inactive_background: String, + #[serde(rename = "vsc_tab_inactive_foreground")] + tab_inactive_foreground: String, + #[serde(rename = "vsc_editor_foreground")] + editor_foreground: String, + #[serde(rename = "vsc_editor_background")] + editor_background: String, + #[serde(rename = "vsc_editor_line_number_foreground")] + editor_line_number_foreground: String, + #[serde(rename = "vsc_editor_selection_background")] + editor_selection_background: String, + #[serde(rename = "vsc_editor_selection_highlight_background")] + editor_selection_highlight_background: String, + #[serde(rename = "vsc_editor_fold_background")] + editor_fold_background: String, + #[serde(rename = "vsc_editor_word_highlight_background")] + editor_word_highlight_background: String, + #[serde(rename = "vsc_editor_word_highlight_strong_background")] + editor_word_highlight_strong_background: String, + #[serde(rename = "vsc_editor_find_match_background")] + editor_find_match_background: String, + #[serde(rename = "vsc_editor_find_match_highlight_background")] + editor_find_match_highlight_background: String, + #[serde(rename = "vsc_editor_find_range_highlight_background")] + editor_find_range_highlight_background: String, + #[serde(rename = "vsc_editor_hover_highlight_background")] + editor_hover_highlight_background: String, + #[serde(rename = "vsc_editor_line_highlight_border")] + editor_line_highlight_border: String, + #[serde(rename = "vsc_editor_link_active_foreground")] + editor_link_active_foreground: String, + #[serde(rename = "vsc_editor_range_highlight_background")] + editor_range_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] + editor_snippet_tabstop_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] + editor_snippet_tabstop_highlight_border: String, + #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] + editor_snippet_final_tabstop_highlight_background: String, + #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] + editor_snippet_final_tabstop_highlight_border: String, + #[serde(rename = "vsc_editor_whitespace_foreground")] + editor_whitespace_foreground: String, + #[serde(rename = "vsc_editor_indent_guide_background")] + editor_indent_guide_background: String, + #[serde(rename = "vsc_editor_indent_guide_active_background")] + editor_indent_guide_active_background: String, + #[serde(rename = "vsc_editor_ruler_foreground")] + editor_ruler_foreground: String, + #[serde(rename = "vsc_editor_code_lens_foreground")] + editor_code_lens_foreground: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] + editor_bracket_highlight_foreground1: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] + editor_bracket_highlight_foreground2: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] + editor_bracket_highlight_foreground3: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] + editor_bracket_highlight_foreground4: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] + editor_bracket_highlight_foreground5: String, + #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] + editor_bracket_highlight_foreground6: String, + #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] + editor_bracket_highlight_unexpected_bracket_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_border")] + editor_overview_ruler_border: String, + #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] + editor_overview_ruler_selection_highlight_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] + editor_overview_ruler_word_highlight_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] + editor_overview_ruler_word_highlight_strong_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] + editor_overview_ruler_modified_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] + editor_overview_ruler_added_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] + editor_overview_ruler_deleted_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] + editor_overview_ruler_error_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] + editor_overview_ruler_warning_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] + editor_overview_ruler_info_foreground: String, + #[serde(rename = "vsc_editor_error_foreground")] + editor_error_foreground: String, + #[serde(rename = "vsc_editor_warning_foreground")] + editor_warning_foreground: String, + #[serde(rename = "vsc_editor_gutter_modified_background")] + editor_gutter_modified_background: String, + #[serde(rename = "vsc_editor_gutter_added_background")] + editor_gutter_added_background: String, + #[serde(rename = "vsc_editor_gutter_deleted_background")] + editor_gutter_deleted_background: String, + #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] + git_decoration_modified_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] + git_decoration_deleted_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] + git_decoration_untracked_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] + git_decoration_ignored_resource_foreground: String, + #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] + git_decoration_conflicting_resource_foreground: String, + #[serde(rename = "vsc_diff_editor_inserted_text_background")] + diff_editor_inserted_text_background: String, + #[serde(rename = "vsc_diff_editor_removed_text_background")] + diff_editor_removed_text_background: String, + #[serde(rename = "vsc_inline_chat_region_highlight")] + inline_chat_region_highlight: String, + #[serde(rename = "vsc_editor_widget_background")] + editor_widget_background: String, + #[serde(rename = "vsc_editor_suggest_widget_background")] + editor_suggest_widget_background: String, + #[serde(rename = "vsc_editor_suggest_widget_foreground")] + editor_suggest_widget_foreground: String, + #[serde(rename = "vsc_editor_suggest_widget_selected_background")] + editor_suggest_widget_selected_background: String, + #[serde(rename = "vsc_editor_hover_widget_background")] + editor_hover_widget_background: String, + #[serde(rename = "vsc_editor_hover_widget_border")] + editor_hover_widget_border: String, + #[serde(rename = "vsc_editor_marker_navigation_background")] + editor_marker_navigation_background: String, + #[serde(rename = "vsc_peek_view_border")] + peek_view_border: String, + #[serde(rename = "vsc_peek_view_editor_background")] + peek_view_editor_background: String, + #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] + peek_view_editor_match_highlight_background: String, + #[serde(rename = "vsc_peek_view_result_background")] + peek_view_result_background: String, + #[serde(rename = "vsc_peek_view_result_file_foreground")] + peek_view_result_file_foreground: String, + #[serde(rename = "vsc_peek_view_result_line_foreground")] + peek_view_result_line_foreground: String, + #[serde(rename = "vsc_peek_view_result_match_highlight_background")] + peek_view_result_match_highlight_background: String, + #[serde(rename = "vsc_peek_view_result_selection_background")] + peek_view_result_selection_background: String, + #[serde(rename = "vsc_peek_view_result_selection_foreground")] + peek_view_result_selection_foreground: String, + #[serde(rename = "vsc_peek_view_title_background")] + peek_view_title_background: String, + #[serde(rename = "vsc_peek_view_title_description_foreground")] + peek_view_title_description_foreground: String, + #[serde(rename = "vsc_peek_view_title_label_foreground")] + peek_view_title_label_foreground: String, + #[serde(rename = "vsc_merge_current_header_background")] + merge_current_header_background: String, + #[serde(rename = "vsc_merge_incoming_header_background")] + merge_incoming_header_background: String, + #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] + editor_overview_ruler_current_content_foreground: String, + #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] + editor_overview_ruler_incoming_content_foreground: String, + #[serde(rename = "vsc_panel_background")] + panel_background: String, + #[serde(rename = "vsc_panel_border")] + panel_border: String, + #[serde(rename = "vsc_panel_title_active_border")] + panel_title_active_border: String, + #[serde(rename = "vsc_panel_title_active_foreground")] + panel_title_active_foreground: String, + #[serde(rename = "vsc_panel_title_inactive_foreground")] + panel_title_inactive_foreground: String, + #[serde(rename = "vsc_status_bar_background")] + status_bar_background: String, + #[serde(rename = "vsc_status_bar_foreground")] + status_bar_foreground: String, + #[serde(rename = "vsc_status_bar_debugging_background")] + status_bar_debugging_background: String, + #[serde(rename = "vsc_status_bar_debugging_foreground")] + status_bar_debugging_foreground: String, + #[serde(rename = "vsc_status_bar_no_folder_background")] + status_bar_no_folder_background: String, + #[serde(rename = "vsc_status_bar_no_folder_foreground")] + status_bar_no_folder_foreground: String, + #[serde(rename = "vsc_status_bar_item_prominent_background")] + status_bar_item_prominent_background: String, + #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] + status_bar_item_prominent_hover_background: String, + #[serde(rename = "vsc_status_bar_item_remote_foreground")] + status_bar_item_remote_foreground: String, + #[serde(rename = "vsc_status_bar_item_remote_background")] + status_bar_item_remote_background: String, + #[serde(rename = "vsc_title_bar_active_background")] + title_bar_active_background: String, + #[serde(rename = "vsc_title_bar_active_foreground")] + title_bar_active_foreground: String, + #[serde(rename = "vsc_title_bar_inactive_background")] + title_bar_inactive_background: String, + #[serde(rename = "vsc_title_bar_inactive_foreground")] + title_bar_inactive_foreground: String, + #[serde(rename = "vsc_extension_button_prominent_foreground")] + extension_button_prominent_foreground: String, + #[serde(rename = "vsc_extension_button_prominent_background")] + extension_button_prominent_background: String, + #[serde(rename = "vsc_extension_button_prominent_hover_background")] + extension_button_prominent_hover_background: String, + #[serde(rename = "vsc_picker_group_border")] + picker_group_border: String, + #[serde(rename = "vsc_picker_group_foreground")] + picker_group_foreground: String, + #[serde(rename = "vsc_debug_tool_bar_background")] + debug_tool_bar_background: String, + #[serde(rename = "vsc_walk_through_embedded_editor_background")] + walk_through_embedded_editor_background: String, + #[serde(rename = "vsc_settings_header_foreground")] + settings_header_foreground: String, + #[serde(rename = "vsc_settings_modified_item_indicator")] + settings_modified_item_indicator: String, + #[serde(rename = "vsc_settings_dropdown_background")] + settings_dropdown_background: String, + #[serde(rename = "vsc_settings_dropdown_foreground")] + settings_dropdown_foreground: String, + #[serde(rename = "vsc_settings_dropdown_border")] + settings_dropdown_border: String, + #[serde(rename = "vsc_settings_checkbox_background")] + settings_checkbox_background: String, + #[serde(rename = "vsc_settings_checkbox_foreground")] + settings_checkbox_foreground: String, + #[serde(rename = "vsc_settings_checkbox_border")] + settings_checkbox_border: String, + #[serde(rename = "vsc_settings_text_input_background")] + settings_text_input_background: String, + #[serde(rename = "vsc_settings_text_input_foreground")] + settings_text_input_foreground: String, + #[serde(rename = "vsc_settings_text_input_border")] + settings_text_input_border: String, + #[serde(rename = "vsc_settings_number_input_background")] + settings_number_input_background: String, + #[serde(rename = "vsc_settings_number_input_foreground")] + settings_number_input_foreground: String, + #[serde(rename = "vsc_settings_number_input_border")] + settings_number_input_border: String, + #[serde(rename = "vsc_breadcrumb_foreground")] + breadcrumb_foreground: String, + #[serde(rename = "vsc_breadcrumb_background")] + breadcrumb_background: String, + #[serde(rename = "vsc_breadcrumb_focus_foreground")] + breadcrumb_focus_foreground: String, + #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] + breadcrumb_active_selection_foreground: String, + #[serde(rename = "vsc_breadcrumb_picker_background")] + breadcrumb_picker_background: String, + #[serde(rename = "vsc_list_filter_widget_background")] + list_filter_widget_background: String, + #[serde(rename = "vsc_list_filter_widget_outline")] + list_filter_widget_outline: String, + #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] + list_filter_widget_no_matches_outline: String, +} diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs new file mode 100644 index 0000000000000000000000000000000000000000..559d6eb4b767e42a32e54dd1c44e0aafc3bcb7e9 --- /dev/null +++ b/crates/theme_importer/src/vscode.rs @@ -0,0 +1,80 @@ +use std::path::{Path, PathBuf}; + +use anyhow::Result; +use serde::Deserialize; +use theme::{default_color_scales, ColorScales, ThemeFamily}; + +#[derive(Deserialize, Debug)] +pub struct VSCodeTheme { + #[serde(rename = "$schema")] + pub schema: String, + pub name: String, + pub author: String, + pub maintainers: Vec, + #[serde(rename = "semanticClass")] + pub semantic_class: String, + #[serde(rename = "semanticHighlighting")] + pub semantic_highlighting: bool, + pub colors: VSCodeColors, +} + +#[derive(Debug, Deserialize)] +pub struct VSCodeColors { + #[serde(rename = "editor.foreground")] + text: String, + #[serde(rename = "editor.background")] + editor: String, +} + +pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result { + let path_str = path.to_str().unwrap(); + let family_name = path_str.split('/').last().unwrap(); + + let mut json_files: Vec = Vec::new(); + + if path.is_dir() { + for entry in std::fs::read_dir(path).unwrap() { + let entry = entry.unwrap(); + let path = entry.path(); + if path.is_file() { + if let Some(extension) = path.extension() { + if extension == "json" { + json_files.push(path.file_name().unwrap().to_str().unwrap().to_string()); + } + } + } + } + } else { + anyhow::bail!("Path is not a directory"); + } + + let mut theme_family = ThemeFamily { + id: uuid::Uuid::new_v4().to_string(), + name: family_name.into(), + author: "New Theme Family".into(), + themes: Vec::new(), + scales: default_color_scales(), + }; + + Ok(theme_family) +} + +#[cfg(test)] +mod tests { + use super::*; + use std::path::PathBuf; + + #[test] + fn test_deserialize_theme() { + let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); + + let mut d = root_dir.to_path_buf(); + d.push("assets/themes/src/vsc/dracula/dracula.json"); + + let data = std::fs::read_to_string(d).expect("Unable to read file"); + + let result: Theme = serde_json::from_str(&data).unwrap(); + println!("{:#?}", result); + } +} From e48332c81f91fdbd709740e4ad06fd2723e1d060 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 18:00:55 -0400 Subject: [PATCH 006/110] Parse VSCode theme files --- assets/themes/src/{vsc => vscode}/ayu/LICENSE | 0 .../src/{vsc => vscode}/ayu/ayu-dark.json | 0 .../src/{vsc => vscode}/ayu/ayu-light.json | 0 .../src/{vsc => vscode}/ayu/ayu-mirage.json | 0 .../src/{vsc => vscode}/ayu/family.json | 0 .../src/{vsc => vscode}/dracula/LICENSE | 0 .../src/{vsc => vscode}/dracula/dracula.json | 0 .../src/{vsc => vscode}/dracula/family.json | 0 crates/theme2/src/theme2.rs | 3 +- crates/theme_importer/src/main.rs | 112 +++++++++++------- crates/theme_importer/src/vscode.rs | 72 +++++------ 11 files changed, 110 insertions(+), 77 deletions(-) rename assets/themes/src/{vsc => vscode}/ayu/LICENSE (100%) rename assets/themes/src/{vsc => vscode}/ayu/ayu-dark.json (100%) rename assets/themes/src/{vsc => vscode}/ayu/ayu-light.json (100%) rename assets/themes/src/{vsc => vscode}/ayu/ayu-mirage.json (100%) rename assets/themes/src/{vsc => vscode}/ayu/family.json (100%) rename assets/themes/src/{vsc => vscode}/dracula/LICENSE (100%) rename assets/themes/src/{vsc => vscode}/dracula/dracula.json (100%) rename assets/themes/src/{vsc => vscode}/dracula/family.json (100%) diff --git a/assets/themes/src/vsc/ayu/LICENSE b/assets/themes/src/vscode/ayu/LICENSE similarity index 100% rename from assets/themes/src/vsc/ayu/LICENSE rename to assets/themes/src/vscode/ayu/LICENSE diff --git a/assets/themes/src/vsc/ayu/ayu-dark.json b/assets/themes/src/vscode/ayu/ayu-dark.json similarity index 100% rename from assets/themes/src/vsc/ayu/ayu-dark.json rename to assets/themes/src/vscode/ayu/ayu-dark.json diff --git a/assets/themes/src/vsc/ayu/ayu-light.json b/assets/themes/src/vscode/ayu/ayu-light.json similarity index 100% rename from assets/themes/src/vsc/ayu/ayu-light.json rename to assets/themes/src/vscode/ayu/ayu-light.json diff --git a/assets/themes/src/vsc/ayu/ayu-mirage.json b/assets/themes/src/vscode/ayu/ayu-mirage.json similarity index 100% rename from assets/themes/src/vsc/ayu/ayu-mirage.json rename to assets/themes/src/vscode/ayu/ayu-mirage.json diff --git a/assets/themes/src/vsc/ayu/family.json b/assets/themes/src/vscode/ayu/family.json similarity index 100% rename from assets/themes/src/vsc/ayu/family.json rename to assets/themes/src/vscode/ayu/family.json diff --git a/assets/themes/src/vsc/dracula/LICENSE b/assets/themes/src/vscode/dracula/LICENSE similarity index 100% rename from assets/themes/src/vsc/dracula/LICENSE rename to assets/themes/src/vscode/dracula/LICENSE diff --git a/assets/themes/src/vsc/dracula/dracula.json b/assets/themes/src/vscode/dracula/dracula.json similarity index 100% rename from assets/themes/src/vsc/dracula/dracula.json rename to assets/themes/src/vscode/dracula/dracula.json diff --git a/assets/themes/src/vsc/dracula/family.json b/assets/themes/src/vscode/dracula/family.json similarity index 100% rename from assets/themes/src/vsc/dracula/family.json rename to assets/themes/src/vscode/dracula/family.json diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 0aa3542a77a4df7a36a8b8f7ec13b60d44482e89..4232fde3245a6b600dbeb92fca51e7d51261b24e 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -49,8 +49,7 @@ pub struct ThemeFamily { impl ThemeFamily {} pub struct ThemeVariant { - #[allow(dead_code)] - pub(crate) id: String, + pub id: String, pub name: SharedString, pub appearance: Appearance, pub styles: ThemeStyles, diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 82e2105e0ce106a36e6dad6d19658d1ffa330279..b616b44e4731e699a8ce36cd54be1e314cbe6d9a 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -1,15 +1,21 @@ +use std::borrow::Cow; +use std::fs::{self, File}; use std::path::PathBuf; use std::str::FromStr; -use std::{borrow::Cow, fs::File}; use anyhow::{anyhow, Context, Result}; use convert_case::Case; -use gpui::{AssetSource, SharedString}; +use gpui::{serde_json, AssetSource, SharedString}; use log::LevelFilter; use rust_embed::RustEmbed; use serde::Deserialize; use simplelog::SimpleLogger; -use theme::{default_color_scales, ThemeColorsRefinement, ThemeFamily}; +use theme::{ + default_color_scales, Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, + SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +use crate::vscode::VsCodeTheme; mod vscode; @@ -23,20 +29,21 @@ pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { } } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] struct FamilyJson { pub name: String, + pub author: String, pub themes: Vec, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] #[serde(rename_all = "snake_case")] enum ThemeAppearanceJson { Light, Dark, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] struct ThemeVariantJson { pub name: String, pub appearance: ThemeAppearanceJson, @@ -69,54 +76,79 @@ fn main() -> Result<()> { let themes_path = PathBuf::from_str("crates/theme2/src/themes")?; - let mut theme_modules = Vec::new(); + let vscode_themes_path = PathBuf::from_str("assets/themes/src/vscode/")?; - for theme_path in Assets.list("themes/src/vsc/")? { - let (_, theme_name) = theme_path.split_once("themes/").unwrap(); + let mut theme_families = Vec::new(); - if theme_name == ".gitkeep" { - continue; - } + for theme_family_dir in fs::read_dir(&vscode_themes_path)? { + let theme_family_dir = theme_family_dir?; - let theme_contents = Assets::get(&theme_path) - .with_context(|| format!("theme file not found: '{theme_path}'"))?; + let theme_family_slug = theme_family_dir + .path() + .file_stem() + .ok_or(anyhow!("no file stem")) + .map(|stem| stem.to_string_lossy().to_string())?; - // let json_theme: JsonTheme = - // serde_json::from_str(std::str::from_utf8(&theme_contents.data)?) - // .context("failed to parse legacy theme")?; + let family_metadata_file = File::open(theme_family_dir.path().join("family.json")) + .context(format!("no `family.json` found for '{theme_family_slug}'"))?; - // let (json_theme, legacy_theme) = load_theme(&theme_path)?; + let family_metadata: FamilyJson = serde_json::from_reader(family_metadata_file).context( + format!("failed to parse `family.json` for '{theme_family_slug}'"), + )?; - // let theme = convert_theme(json_theme, legacy_theme)?; + let mut themes = Vec::new(); - // let theme_slug = theme - // .metadata - // .name - // .as_ref() - // .replace("é", "e") - // .to_case(Case::Snake); + for theme_entry in fs::read_dir(vscode_themes_path.join(theme_family_slug))? { + let theme_entry = theme_entry?; - // let mut output_file = File::create(themes_path.join(format!("{theme_slug}.rs")))?; + let theme_file_path = theme_entry.path(); - // let theme_module = format!( - // r#" - // use gpui2::rgba; + let file_name = theme_file_path + .file_name() + .ok_or(anyhow!("no file stem")) + .map(|file_name| file_name.to_string_lossy())?; - // use crate::{{PlayerTheme, SyntaxTheme, Theme, ThemeMetadata}}; + if !file_name.ends_with(".json") { + continue; + } - // pub fn {theme_slug}() -> Theme {{ - // {theme_definition} - // }} - // "#, - // theme_definition = format!("{:#?}", ThemePrinter::new(theme)) - // ); + if file_name == "family.json" { + continue; + } - // output_file.write_all(theme_module.as_bytes())?; + let theme_file = File::open(&theme_file_path)?; - theme_modules.push(theme_slug); - } + let theme: VsCodeTheme = serde_json::from_reader(theme_file) + .context(format!("failed to parse theme {theme_file_path:?}"))?; - println!("Hello, world!"); + themes.push(theme); + } + + let theme_family = ThemeFamily { + id: uuid::Uuid::new_v4().to_string(), + name: family_metadata.name.into(), + author: family_metadata.author.into(), + themes: themes + .into_iter() + .map(|theme| ThemeVariant { + id: uuid::Uuid::new_v4().to_string(), + name: "".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors::default(), + colors: ThemeColors::default_dark(), + status: StatusColors::default(), + git: GitStatusColors::default(), + player: PlayerColors::default(), + syntax: SyntaxTheme::default_dark(), + }, + }) + .collect(), + scales: default_color_scales(), + }; + + theme_families.push(theme_family); + } Ok(()) } diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index 559d6eb4b767e42a32e54dd1c44e0aafc3bcb7e9..c664108c83f4eb9e2ad528d8eecd68edd59ce8e2 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -5,21 +5,21 @@ use serde::Deserialize; use theme::{default_color_scales, ColorScales, ThemeFamily}; #[derive(Deserialize, Debug)] -pub struct VSCodeTheme { +pub struct VsCodeTheme { #[serde(rename = "$schema")] - pub schema: String, - pub name: String, - pub author: String, - pub maintainers: Vec, + pub schema: Option, + pub name: Option, + pub author: Option, + pub maintainers: Option>, #[serde(rename = "semanticClass")] - pub semantic_class: String, + pub semantic_class: Option, #[serde(rename = "semanticHighlighting")] - pub semantic_highlighting: bool, - pub colors: VSCodeColors, + pub semantic_highlighting: Option, + pub colors: VsCodeColors, } #[derive(Debug, Deserialize)] -pub struct VSCodeColors { +pub struct VsCodeColors { #[serde(rename = "editor.foreground")] text: String, #[serde(rename = "editor.background")] @@ -27,36 +27,38 @@ pub struct VSCodeColors { } pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result { - let path_str = path.to_str().unwrap(); - let family_name = path_str.split('/').last().unwrap(); + todo!() - let mut json_files: Vec = Vec::new(); + // let path_str = path.to_str().unwrap(); + // let family_name = path_str.split('/').last().unwrap(); - if path.is_dir() { - for entry in std::fs::read_dir(path).unwrap() { - let entry = entry.unwrap(); - let path = entry.path(); - if path.is_file() { - if let Some(extension) = path.extension() { - if extension == "json" { - json_files.push(path.file_name().unwrap().to_str().unwrap().to_string()); - } - } - } - } - } else { - anyhow::bail!("Path is not a directory"); - } + // let mut json_files: Vec = Vec::new(); + + // if path.is_dir() { + // for entry in std::fs::read_dir(path).unwrap() { + // let entry = entry.unwrap(); + // let path = entry.path(); + // if path.is_file() { + // if let Some(extension) = path.extension() { + // if extension == "json" { + // json_files.push(path.file_name().unwrap().to_str().unwrap().to_string()); + // } + // } + // } + // } + // } else { + // anyhow::bail!("Path is not a directory"); + // } - let mut theme_family = ThemeFamily { - id: uuid::Uuid::new_v4().to_string(), - name: family_name.into(), - author: "New Theme Family".into(), - themes: Vec::new(), - scales: default_color_scales(), - }; + // let mut theme_family = ThemeFamily { + // id: uuid::Uuid::new_v4().to_string(), + // name: family_name.into(), + // author: "New Theme Family".into(), + // themes: Vec::new(), + // scales: default_color_scales(), + // }; - Ok(theme_family) + // Ok(theme_family) } #[cfg(test)] From 0bc51382b2f49039fc21f4b6624d86c21bcc7337 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 18:24:38 -0400 Subject: [PATCH 007/110] Add basic `VsCodeThemeConverter` --- assets/themes/src/vscode/ayu/family.json | 3 + assets/themes/src/vscode/dracula/family.json | 1 + crates/theme_importer/src/main.rs | 109 +++++-------------- crates/theme_importer/src/vscode.rs | 61 ++++++++++- 4 files changed, 92 insertions(+), 82 deletions(-) diff --git a/assets/themes/src/vscode/ayu/family.json b/assets/themes/src/vscode/ayu/family.json index 8c0d0c5c5576bf2b70fb28389428c89aa43337b8..05092a335d50e52b7a4c2db5771fa15d8b60e32f 100644 --- a/assets/themes/src/vscode/ayu/family.json +++ b/assets/themes/src/vscode/ayu/family.json @@ -4,14 +4,17 @@ "themes": [ { "name": "Ayu Light", + "file_name": "ayu-light.json", "appearance": "light" }, { "name": "Ayu Mirage", + "file_name": "ayu-mirage.json", "appearance": "dark" }, { "name": "Ayu Dark", + "file_name": "ayu-dark.json", "appearance": "dark" } ] diff --git a/assets/themes/src/vscode/dracula/family.json b/assets/themes/src/vscode/dracula/family.json index 50d5940a7b74903dbca55bba2908e1ff37c327a5..b3bf2cf04a3cfb981368f1187d7510c26a39e710 100644 --- a/assets/themes/src/vscode/dracula/family.json +++ b/assets/themes/src/vscode/dracula/family.json @@ -4,6 +4,7 @@ "themes": [ { "name": "Dracula", + "file_name": "dracula.json", "appearance": "dark" } ] diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index b616b44e4731e699a8ce36cd54be1e314cbe6d9a..7fcc5c2f6ce4fbdaf2ceb58bb49d6682839ae7a9 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -1,19 +1,17 @@ -use std::borrow::Cow; use std::fs::{self, File}; use std::path::PathBuf; use std::str::FromStr; use anyhow::{anyhow, Context, Result}; -use convert_case::Case; -use gpui::{serde_json, AssetSource, SharedString}; +use gpui::serde_json; use log::LevelFilter; -use rust_embed::RustEmbed; use serde::Deserialize; use simplelog::SimpleLogger; use theme::{ default_color_scales, Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles, ThemeVariant, + SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, }; +use vscode::VsCodeThemeConverter; use crate::vscode::VsCodeTheme; @@ -30,10 +28,10 @@ pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { } #[derive(Debug, Deserialize)] -struct FamilyJson { +struct FamilyMetadata { pub name: String, pub author: String, - pub themes: Vec, + pub themes: Vec, } #[derive(Debug, Deserialize)] @@ -43,26 +41,20 @@ enum ThemeAppearanceJson { Dark, } -#[derive(Debug, Deserialize)] -struct ThemeVariantJson { - pub name: String, - pub appearance: ThemeAppearanceJson, -} - -struct ImportedThemeFamily { - pub id: String, - pub name: String, - pub author: String, - pub url: Option, - // App should panic if we try to load a theme without a lisence - pub license: String, - pub themes: Vec, +impl From for Appearance { + fn from(value: ThemeAppearanceJson) -> Self { + match value { + ThemeAppearanceJson::Light => Self::Light, + ThemeAppearanceJson::Dark => Self::Dark, + } + } } -struct ImportedThemeVariant { - pub id: String, +#[derive(Debug, Deserialize)] +struct ThemeMetadata { pub name: String, - pub colors: ThemeColorsRefinement, + pub file_name: String, + pub appearance: ThemeAppearanceJson, } // Load a vscode theme from json @@ -92,35 +84,25 @@ fn main() -> Result<()> { let family_metadata_file = File::open(theme_family_dir.path().join("family.json")) .context(format!("no `family.json` found for '{theme_family_slug}'"))?; - let family_metadata: FamilyJson = serde_json::from_reader(family_metadata_file).context( - format!("failed to parse `family.json` for '{theme_family_slug}'"), - )?; + let family_metadata: FamilyMetadata = serde_json::from_reader(family_metadata_file) + .context(format!( + "failed to parse `family.json` for '{theme_family_slug}'" + ))?; let mut themes = Vec::new(); - for theme_entry in fs::read_dir(vscode_themes_path.join(theme_family_slug))? { - let theme_entry = theme_entry?; - - let theme_file_path = theme_entry.path(); - - let file_name = theme_file_path - .file_name() - .ok_or(anyhow!("no file stem")) - .map(|file_name| file_name.to_string_lossy())?; - - if !file_name.ends_with(".json") { - continue; - } - - if file_name == "family.json" { - continue; - } + for theme_metadata in family_metadata.themes { + let theme_file_path = theme_family_dir.path().join(&theme_metadata.file_name); let theme_file = File::open(&theme_file_path)?; - let theme: VsCodeTheme = serde_json::from_reader(theme_file) + let vscode_theme: VsCodeTheme = serde_json::from_reader(theme_file) .context(format!("failed to parse theme {theme_file_path:?}"))?; + let converter = VsCodeThemeConverter::new(vscode_theme, theme_metadata); + + let theme = converter.convert()?; + themes.push(theme); } @@ -128,22 +110,7 @@ fn main() -> Result<()> { id: uuid::Uuid::new_v4().to_string(), name: family_metadata.name.into(), author: family_metadata.author.into(), - themes: themes - .into_iter() - .map(|theme| ThemeVariant { - id: uuid::Uuid::new_v4().to_string(), - name: "".into(), - appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors::default(), - colors: ThemeColors::default_dark(), - status: StatusColors::default(), - git: GitStatusColors::default(), - player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), - }, - }) - .collect(), + themes, scales: default_color_scales(), }; @@ -152,23 +119,3 @@ fn main() -> Result<()> { Ok(()) } - -#[derive(RustEmbed)] -#[folder = "../../assets"] -#[include = "themes/**/*"] -pub struct Assets; - -impl AssetSource for Assets { - fn load(&self, path: &str) -> Result> { - Self::get(path) - .map(|f| f.data) - .ok_or_else(|| anyhow!("could not find asset at path \"{}\"", path)) - } - - fn list(&self, path: &str) -> Result> { - Ok(Self::iter() - .filter(|p| p.starts_with(path)) - .map(SharedString::from) - .collect()) - } -} diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index c664108c83f4eb9e2ad528d8eecd68edd59ce8e2..bc3ebd22d17ec76f21f94fefec65020549a61eff 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -1,8 +1,16 @@ use std::path::{Path, PathBuf}; use anyhow::Result; +use gpui::{Hsla, Refineable, Rgba}; use serde::Deserialize; -use theme::{default_color_scales, ColorScales, ThemeFamily}; +use theme::{ + default_color_scales, Appearance, ColorScales, GitStatusColors, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles, + ThemeVariant, +}; +use uuid::Uuid; + +use crate::ThemeMetadata; #[derive(Deserialize, Debug)] pub struct VsCodeTheme { @@ -61,6 +69,57 @@ pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result { // Ok(theme_family) } +fn try_parse_color(color: &str) -> Result { + Ok(Rgba::try_from(color)?.into()) +} + +pub struct VsCodeThemeConverter { + theme: VsCodeTheme, + theme_metadata: ThemeMetadata, +} + +impl VsCodeThemeConverter { + pub fn new(theme: VsCodeTheme, theme_metadata: ThemeMetadata) -> Self { + Self { + theme, + theme_metadata, + } + } + + pub fn convert(self) -> Result { + let appearance = self.theme_metadata.appearance.into(); + + let mut theme_colors = match appearance { + Appearance::Light => ThemeColors::default_light(), + Appearance::Dark => ThemeColors::default_dark(), + }; + + let vscode_colors = &self.theme.colors; + + let theme_colors_refinements = ThemeColorsRefinement { + background: Some(try_parse_color(&vscode_colors.editor)?), + text: Some(try_parse_color(&vscode_colors.text)?), + ..Default::default() + }; + + theme_colors.refine(&theme_colors_refinements); + + Ok(ThemeVariant { + id: uuid::Uuid::new_v4().to_string(), + name: self.theme_metadata.name.into(), + appearance, + styles: ThemeStyles { + system: SystemColors::default(), + colors: theme_colors, + status: StatusColors::default(), + git: GitStatusColors::default(), + player: PlayerColors::default(), + syntax: SyntaxTheme::default_dark(), + }, + }) + } +} + #[cfg(test)] mod tests { use super::*; From fc376287e036552f6ee4f8906c1645360ab577cf Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 18:57:13 -0400 Subject: [PATCH 008/110] Start work on theme printer --- crates/theme_importer/src/main.rs | 19 +- crates/theme_importer/src/theme_printer.rs | 267 +++++++++++++++++++++ 2 files changed, 278 insertions(+), 8 deletions(-) create mode 100644 crates/theme_importer/src/theme_printer.rs diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 7fcc5c2f6ce4fbdaf2ceb58bb49d6682839ae7a9..5e44ae4ea24db92aa3c6fe67cc360d245174d5b2 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -1,3 +1,6 @@ +mod theme_printer; +mod vscode; + use std::fs::{self, File}; use std::path::PathBuf; use std::str::FromStr; @@ -7,16 +10,12 @@ use gpui::serde_json; use log::LevelFilter; use serde::Deserialize; use simplelog::SimpleLogger; -use theme::{ - default_color_scales, Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, -}; +use theme::{default_color_scales, Appearance, ThemeFamily}; use vscode::VsCodeThemeConverter; +use crate::theme_printer::ThemeFamilyPrinter; use crate::vscode::VsCodeTheme; -mod vscode; - pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { ThemeFamily { id: uuid::Uuid::new_v4().to_string(), @@ -36,7 +35,7 @@ struct FamilyMetadata { #[derive(Debug, Deserialize)] #[serde(rename_all = "snake_case")] -enum ThemeAppearanceJson { +pub enum ThemeAppearanceJson { Light, Dark, } @@ -51,7 +50,7 @@ impl From for Appearance { } #[derive(Debug, Deserialize)] -struct ThemeMetadata { +pub struct ThemeMetadata { pub name: String, pub file_name: String, pub appearance: ThemeAppearanceJson, @@ -117,5 +116,9 @@ fn main() -> Result<()> { theme_families.push(theme_family); } + for theme_family in theme_families { + println!("{:#?}", ThemeFamilyPrinter::new(theme_family)); + } + Ok(()) } diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs new file mode 100644 index 0000000000000000000000000000000000000000..82446030e24075b3cf5d89b0b049313515c9dd45 --- /dev/null +++ b/crates/theme_importer/src/theme_printer.rs @@ -0,0 +1,267 @@ +use std::fmt::{self, Debug}; + +use gpui::{Hsla, Rgba}; +use theme::{ + GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, SystemColors, + ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +struct HslaPrinter(Hsla); + +impl Debug for HslaPrinter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", IntoPrinter(&Rgba::from(self.0))) + } +} + +struct IntoPrinter<'a, D: Debug>(&'a D); + +impl<'a, D: Debug> Debug for IntoPrinter<'a, D> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}.into()", self.0) + } +} + +pub struct VecPrinter<'a, T>(&'a Vec); + +impl<'a, T: Debug> Debug for VecPrinter<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "vec!{:?}", &self.0) + } +} + +pub struct ThemeFamilyPrinter(ThemeFamily); + +impl ThemeFamilyPrinter { + pub fn new(theme_family: ThemeFamily) -> Self { + Self(theme_family) + } +} + +impl Debug for ThemeFamilyPrinter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ThemeFamily") + .field("id", &IntoPrinter(&self.0.id)) + .field("name", &IntoPrinter(&self.0.name)) + .field("author", &IntoPrinter(&self.0.author)) + .field( + "themes", + &VecPrinter( + &self + .0 + .themes + .iter() + .map(|theme| ThemeVariantPrinter(theme)) + .collect(), + ), + ) + .finish() + } +} + +pub struct ThemeVariantPrinter<'a>(&'a ThemeVariant); + +impl<'a> Debug for ThemeVariantPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ThemeVariant") + .field("id", &IntoPrinter(&self.0.id)) + .field("name", &IntoPrinter(&self.0.name)) + .field("appearance", &self.0.appearance) + .field("styles", &ThemeStylesPrinter(&self.0.styles)) + .finish() + } +} + +pub struct ThemeStylesPrinter<'a>(&'a ThemeStyles); + +impl<'a> Debug for ThemeStylesPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ThemeStyles") + .field("system", &SystemColorsPrinter(&self.0.system)) + .field("colors", &ThemeColorsPrinter(&self.0.colors)) + .field("status", &StatusColorsPrinter(&self.0.status)) + .field("git", &GitStatusColorsPrinter(&self.0.git)) + .field("player", &PlayerColorsPrinter(&self.0.player)) + .field("syntax", &SyntaxThemePrinter(&self.0.syntax)) + .finish() + } +} + +pub struct SystemColorsPrinter<'a>(&'a SystemColors); + +impl<'a> Debug for SystemColorsPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("SystemColors") + .field("transparent", &HslaPrinter(self.0.transparent)) + .field( + "mac_os_traffic_light_red", + &HslaPrinter(self.0.mac_os_traffic_light_red), + ) + .field( + "mac_os_traffic_light_yellow", + &HslaPrinter(self.0.mac_os_traffic_light_yellow), + ) + .field( + "mac_os_traffic_light_green", + &HslaPrinter(self.0.mac_os_traffic_light_green), + ) + .finish() + } +} + +pub struct ThemeColorsPrinter<'a>(&'a ThemeColors); + +impl<'a> Debug for ThemeColorsPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ThemeColors") + .field("border", &HslaPrinter(self.0.border)) + .field("border_variant", &HslaPrinter(self.0.border_variant)) + .field("border_focused", &HslaPrinter(self.0.border_focused)) + .field( + "border_transparent", + &HslaPrinter(self.0.border_transparent), + ) + .field("elevated_surface", &HslaPrinter(self.0.elevated_surface)) + .field("surface", &HslaPrinter(self.0.surface)) + .field("background", &HslaPrinter(self.0.background)) + .field("element", &HslaPrinter(self.0.element)) + .field("element_hover", &HslaPrinter(self.0.element_hover)) + .field("element_active", &HslaPrinter(self.0.element_active)) + .field("element_selected", &HslaPrinter(self.0.element_selected)) + .field("element_disabled", &HslaPrinter(self.0.element_disabled)) + .field( + "element_placeholder", + &HslaPrinter(self.0.element_placeholder), + ) + .field( + "element_drop_target", + &HslaPrinter(self.0.element_drop_target), + ) + .field("ghost_element", &HslaPrinter(self.0.ghost_element)) + .field( + "ghost_element_hover", + &HslaPrinter(self.0.ghost_element_hover), + ) + .field( + "ghost_element_active", + &HslaPrinter(self.0.ghost_element_active), + ) + .field( + "ghost_element_selected", + &HslaPrinter(self.0.ghost_element_selected), + ) + .field( + "ghost_element_disabled", + &HslaPrinter(self.0.ghost_element_disabled), + ) + .field("text", &HslaPrinter(self.0.text)) + .field("text_muted", &HslaPrinter(self.0.text_muted)) + .field("text_placeholder", &HslaPrinter(self.0.text_placeholder)) + .field("text_disabled", &HslaPrinter(self.0.text_disabled)) + .field("text_accent", &HslaPrinter(self.0.text_accent)) + .field("icon", &HslaPrinter(self.0.icon)) + .field("icon_muted", &HslaPrinter(self.0.icon_muted)) + .field("icon_disabled", &HslaPrinter(self.0.icon_disabled)) + .field("icon_placeholder", &HslaPrinter(self.0.icon_placeholder)) + .field("icon_accent", &HslaPrinter(self.0.icon_accent)) + .field("status_bar", &HslaPrinter(self.0.status_bar)) + .field("title_bar", &HslaPrinter(self.0.title_bar)) + .field("toolbar", &HslaPrinter(self.0.toolbar)) + .field("tab_bar", &HslaPrinter(self.0.tab_bar)) + .field("tab_inactive", &HslaPrinter(self.0.tab_inactive)) + .field("tab_active", &HslaPrinter(self.0.tab_active)) + .field("editor", &HslaPrinter(self.0.editor)) + .field("editor_subheader", &HslaPrinter(self.0.editor_subheader)) + .field( + "editor_active_line", + &HslaPrinter(self.0.editor_active_line), + ) + .finish() + } +} + +pub struct StatusColorsPrinter<'a>(&'a StatusColors); + +impl<'a> Debug for StatusColorsPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("StatusColors") + .field("conflict", &HslaPrinter(self.0.conflict)) + .field("created", &HslaPrinter(self.0.created)) + .field("deleted", &HslaPrinter(self.0.deleted)) + .field("error", &HslaPrinter(self.0.error)) + .field("hidden", &HslaPrinter(self.0.hidden)) + .field("ignored", &HslaPrinter(self.0.ignored)) + .field("info", &HslaPrinter(self.0.info)) + .field("modified", &HslaPrinter(self.0.modified)) + .field("renamed", &HslaPrinter(self.0.renamed)) + .field("success", &HslaPrinter(self.0.success)) + .field("warning", &HslaPrinter(self.0.warning)) + .finish() + } +} + +pub struct GitStatusColorsPrinter<'a>(&'a GitStatusColors); + +impl<'a> Debug for GitStatusColorsPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("GitStatusColors") + .field("conflict", &HslaPrinter(self.0.conflict)) + .field("created", &HslaPrinter(self.0.created)) + .field("deleted", &HslaPrinter(self.0.deleted)) + .field("ignored", &HslaPrinter(self.0.ignored)) + .field("modified", &HslaPrinter(self.0.modified)) + .field("renamed", &HslaPrinter(self.0.renamed)) + .finish() + } +} + +pub struct PlayerColorsPrinter<'a>(&'a PlayerColors); + +impl<'a> Debug for PlayerColorsPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("PlayerColors") + .field(&VecPrinter( + &self + .0 + .0 + .iter() + .map(|player_color| PlayerColorPrinter(player_color)) + .collect(), + )) + .finish() + } +} + +pub struct PlayerColorPrinter<'a>(&'a PlayerColor); + +impl<'a> Debug for PlayerColorPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("PlayerColor") + .field("cursor", &HslaPrinter(self.0.cursor)) + .field("background", &HslaPrinter(self.0.background)) + .field("selection", &HslaPrinter(self.0.selection)) + .finish() + } +} + +pub struct SyntaxThemePrinter<'a>(&'a SyntaxTheme); + +impl<'a> Debug for SyntaxThemePrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("SyntaxTheme") + .field( + "highlights", + &VecPrinter( + &self + .0 + .highlights + .iter() + .map(|(token, highlight)| { + (IntoPrinter(token), HslaPrinter(highlight.color.unwrap())) + }) + .collect(), + ), + ) + .finish() + } +} From d1636bf16b9b37dfc8e0d4e237d8732e53d28b08 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 19:14:51 -0400 Subject: [PATCH 009/110] Finish up theme printer --- crates/theme2/src/theme2.rs | 2 +- crates/theme_importer/src/main.rs | 55 ++++++++++++++++++++-- crates/theme_importer/src/theme_printer.rs | 23 +++++++-- 3 files changed, 73 insertions(+), 7 deletions(-) diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 4232fde3245a6b600dbeb92fca51e7d51261b24e..9cd5fe75c022ba26d3b3e2e4ff922922b266dcd3 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -17,7 +17,7 @@ pub use syntax::*; use gpui2::{AppContext, Hsla, SharedString}; use settings2::Settings; -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, PartialEq, Clone, Copy)] pub enum Appearance { Light, Dark, diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 5e44ae4ea24db92aa3c6fe67cc360d245174d5b2..ca2b2e31955261d1bc9c68589f9869eeba08c224 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -2,10 +2,12 @@ mod theme_printer; mod vscode; use std::fs::{self, File}; +use std::io::Write; use std::path::PathBuf; use std::str::FromStr; use anyhow::{anyhow, Context, Result}; +use convert_case::{Case, Casing}; use gpui::serde_json; use log::LevelFilter; use serde::Deserialize; @@ -65,8 +67,6 @@ pub struct ThemeMetadata { fn main() -> Result<()> { SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); - let themes_path = PathBuf::from_str("crates/theme2/src/themes")?; - let vscode_themes_path = PathBuf::from_str("assets/themes/src/vscode/")?; let mut theme_families = Vec::new(); @@ -116,9 +116,58 @@ fn main() -> Result<()> { theme_families.push(theme_family); } + let themes_output_path = PathBuf::from_str("crates/theme2/src/themes")?; + + let mut theme_modules = Vec::new(); + for theme_family in theme_families { - println!("{:#?}", ThemeFamilyPrinter::new(theme_family)); + let theme_family_slug = theme_family.name.to_string().to_case(Case::Snake); + + let mut output_file = + File::create(themes_output_path.join(format!("{theme_family_slug}.rs")))?; + + let theme_module = format!( + r#" + use gpui2::rgba; + + use crate::{{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }}; + + pub fn {theme_family_slug}() -> ThemeFamily {{ + {theme_family_definition} + }} + "#, + theme_family_definition = format!("{:#?}", ThemeFamilyPrinter::new(theme_family)) + ); + + output_file.write_all(theme_module.as_bytes())?; + + theme_modules.push(theme_family_slug); } + let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; + + let mod_rs_contents = format!( + r#" + {mod_statements} + + {use_statements} + "#, + mod_statements = theme_modules + .iter() + .map(|module| format!("mod {module};")) + .collect::>() + .join("\n"), + use_statements = theme_modules + .iter() + .map(|module| format!("pub use {module}::*;")) + .collect::>() + .join("\n") + ); + + mod_rs_file.write_all(mod_rs_contents.as_bytes())?; + Ok(()) } diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 82446030e24075b3cf5d89b0b049313515c9dd45..7619734eb18de0a3c9efd2331203b64ba3c13635 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -2,10 +2,18 @@ use std::fmt::{self, Debug}; use gpui::{Hsla, Rgba}; use theme::{ - GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, SystemColors, - ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, + SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, }; +struct RawSyntaxPrinter<'a>(&'a str); + +impl<'a> Debug for RawSyntaxPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + struct HslaPrinter(Hsla); impl Debug for HslaPrinter { @@ -55,6 +63,7 @@ impl Debug for ThemeFamilyPrinter { .collect(), ), ) + .field("scales", &RawSyntaxPrinter("default_color_scales()")) .finish() } } @@ -66,12 +75,20 @@ impl<'a> Debug for ThemeVariantPrinter<'a> { f.debug_struct("ThemeVariant") .field("id", &IntoPrinter(&self.0.id)) .field("name", &IntoPrinter(&self.0.name)) - .field("appearance", &self.0.appearance) + .field("appearance", &AppearancePrinter(self.0.appearance)) .field("styles", &ThemeStylesPrinter(&self.0.styles)) .finish() } } +pub struct AppearancePrinter(Appearance); + +impl Debug for AppearancePrinter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "Appearance::{:?}", self.0) + } +} + pub struct ThemeStylesPrinter<'a>(&'a ThemeStyles); impl<'a> Debug for ThemeStylesPrinter<'a> { From 152ac6927f9051b25b0dbfec07aea8ce41eb0c5a Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 19:17:39 -0400 Subject: [PATCH 010/110] Add `themes2/src/themes` directory --- crates/theme2/src/themes/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 crates/theme2/src/themes/.gitkeep diff --git a/crates/theme2/src/themes/.gitkeep b/crates/theme2/src/themes/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 From 95a0827517d2d29a26157b051ac1fea771da48ca Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 19:20:21 -0400 Subject: [PATCH 011/110] Clean up unused code --- crates/theme_importer/src/main.rs | 10 ------- crates/theme_importer/src/vscode.rs | 43 ++--------------------------- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index ca2b2e31955261d1bc9c68589f9869eeba08c224..0e187d631d57403732754f66aae65ec3977111ae 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -18,16 +18,6 @@ use vscode::VsCodeThemeConverter; use crate::theme_printer::ThemeFamilyPrinter; use crate::vscode::VsCodeTheme; -pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { - ThemeFamily { - id: uuid::Uuid::new_v4().to_string(), - name: name.into(), - author: author.into(), - themes: Vec::new(), - scales: default_color_scales(), - } -} - #[derive(Debug, Deserialize)] struct FamilyMetadata { pub name: String, diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index bc3ebd22d17ec76f21f94fefec65020549a61eff..5988598943dc0bc6d4c91c0bea82d3b5c19748ac 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -1,14 +1,10 @@ -use std::path::{Path, PathBuf}; - use anyhow::Result; use gpui::{Hsla, Refineable, Rgba}; use serde::Deserialize; use theme::{ - default_color_scales, Appearance, ColorScales, GitStatusColors, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles, - ThemeVariant, + Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, + ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant, }; -use uuid::Uuid; use crate::ThemeMetadata; @@ -34,41 +30,6 @@ pub struct VsCodeColors { editor: String, } -pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result { - todo!() - - // let path_str = path.to_str().unwrap(); - // let family_name = path_str.split('/').last().unwrap(); - - // let mut json_files: Vec = Vec::new(); - - // if path.is_dir() { - // for entry in std::fs::read_dir(path).unwrap() { - // let entry = entry.unwrap(); - // let path = entry.path(); - // if path.is_file() { - // if let Some(extension) = path.extension() { - // if extension == "json" { - // json_files.push(path.file_name().unwrap().to_str().unwrap().to_string()); - // } - // } - // } - // } - // } else { - // anyhow::bail!("Path is not a directory"); - // } - - // let mut theme_family = ThemeFamily { - // id: uuid::Uuid::new_v4().to_string(), - // name: family_name.into(), - // author: "New Theme Family".into(), - // themes: Vec::new(), - // scales: default_color_scales(), - // }; - - // Ok(theme_family) -} - fn try_parse_color(color: &str) -> Result { Ok(Rgba::try_from(color)?.into()) } From 2b0c9591371eb345da35d23b00638c0d86b8e60d Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 19:53:52 -0400 Subject: [PATCH 012/110] Add terminal colors to ThemeColors, add `_background` to some color names. --- crates/theme2/src/colors.rs | 41 ++++++--- crates/theme2/src/default_colors.rs | 82 ++++++++++++------ crates/theme_importer/src/theme_printer.rs | 33 +++++--- crates/theme_importer/src/vscode.rs | 84 +++++++++++++++---- crates/ui2/src/components/buffer.rs | 2 +- crates/ui2/src/components/buffer_search.rs | 21 +++-- crates/ui2/src/components/collab_panel.rs | 2 +- crates/ui2/src/components/context_menu.rs | 2 +- crates/ui2/src/components/icon_button.rs | 4 +- crates/ui2/src/components/keybinding.rs | 2 +- crates/ui2/src/components/list.rs | 8 +- crates/ui2/src/components/multi_buffer.rs | 2 +- .../ui2/src/components/notification_toast.rs | 2 +- .../ui2/src/components/notifications_panel.rs | 4 +- crates/ui2/src/components/palette.rs | 9 +- crates/ui2/src/components/panel.rs | 2 +- crates/ui2/src/components/panes.rs | 2 +- crates/ui2/src/components/project_panel.rs | 2 +- crates/ui2/src/components/status_bar.rs | 2 +- crates/ui2/src/components/tab.rs | 4 +- crates/ui2/src/components/tab_bar.rs | 2 +- crates/ui2/src/components/terminal.rs | 2 +- crates/ui2/src/components/toast.rs | 2 +- crates/ui2/src/components/toolbar.rs | 2 +- crates/ui2/src/components/traffic_lights.rs | 2 +- crates/ui2/src/elements/button.rs | 4 +- crates/ui2/src/elements/indicator.rs | 2 +- crates/ui2/src/elements/input.rs | 4 +- 28 files changed, 224 insertions(+), 106 deletions(-) diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index ee69eed6128e121a9ae4209f93389aed184be534..471c6e2360bbf1b8bc004c58173d7c8551c54c6f 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -55,17 +55,17 @@ pub struct ThemeColors { pub border_variant: Hsla, pub border_focused: Hsla, pub border_transparent: Hsla, - pub elevated_surface: Hsla, - pub surface: Hsla, + pub elevated_surface_background: Hsla, + pub surface_background: Hsla, pub background: Hsla, - pub element: Hsla, + pub element_background: Hsla, pub element_hover: Hsla, pub element_active: Hsla, pub element_selected: Hsla, pub element_disabled: Hsla, pub element_placeholder: Hsla, pub element_drop_target: Hsla, - pub ghost_element: Hsla, + pub ghost_element_background: Hsla, pub ghost_element_hover: Hsla, pub ghost_element_active: Hsla, pub ghost_element_selected: Hsla, @@ -80,15 +80,32 @@ pub struct ThemeColors { pub icon_disabled: Hsla, pub icon_placeholder: Hsla, pub icon_accent: Hsla, - pub status_bar: Hsla, - pub title_bar: Hsla, - pub toolbar: Hsla, - pub tab_bar: Hsla, - pub tab_inactive: Hsla, - pub tab_active: Hsla, - pub editor: Hsla, - pub editor_subheader: Hsla, + pub status_bar_background: Hsla, + pub title_bar_background: Hsla, + pub toolbar_background: Hsla, + pub tab_bar_background: Hsla, + pub tab_inactive_background: Hsla, + pub tab_active_background: Hsla, + pub editor_background: Hsla, + pub editor_subheader_background: Hsla, pub editor_active_line: Hsla, + pub terminal_background: Hsla, + pub terminal_ansi_bright_black: Hsla, + pub terminal_ansi_bright_red: Hsla, + pub terminal_ansi_bright_green: Hsla, + pub terminal_ansi_bright_yellow: Hsla, + pub terminal_ansi_bright_blue: Hsla, + pub terminal_ansi_bright_magenta: Hsla, + pub terminal_ansi_bright_cyan: Hsla, + pub terminal_ansi_bright_white: Hsla, + pub terminal_ansi_black: Hsla, + pub terminal_ansi_red: Hsla, + pub terminal_ansi_green: Hsla, + pub terminal_ansi_yellow: Hsla, + pub terminal_ansi_blue: Hsla, + pub terminal_ansi_magenta: Hsla, + pub terminal_ansi_cyan: Hsla, + pub terminal_ansi_white: Hsla, } #[derive(Refineable, Clone)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 8b7137683c4a5b7f916049078517e14f30b7e4b2..ddb563d2375c7959b2aad0f5683d8f7a2575edd6 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -206,17 +206,17 @@ impl ThemeColors { border_variant: neutral().light().step_5(), border_focused: blue().light().step_5(), border_transparent: system.transparent, - elevated_surface: neutral().light().step_2(), - surface: neutral().light().step_2(), + elevated_surface_background: neutral().light().step_2(), + surface_background: neutral().light().step_2(), background: neutral().light().step_1(), - element: neutral().light().step_3(), + element_background: neutral().light().step_3(), element_hover: neutral().light().step_4(), element_active: neutral().light().step_5(), element_selected: neutral().light().step_5(), element_disabled: neutral().light_alpha().step_3(), element_placeholder: neutral().light().step_11(), element_drop_target: blue().light_alpha().step_2(), - ghost_element: system.transparent, + ghost_element_background: system.transparent, ghost_element_hover: neutral().light().step_4(), ghost_element_active: neutral().light().step_5(), ghost_element_selected: neutral().light().step_5(), @@ -231,15 +231,32 @@ impl ThemeColors { icon_disabled: neutral().light().step_9(), icon_placeholder: neutral().light().step_10(), icon_accent: blue().light().step_11(), - status_bar: neutral().light().step_2(), - title_bar: neutral().light().step_2(), - toolbar: neutral().light().step_1(), - tab_bar: neutral().light().step_2(), - tab_active: neutral().light().step_1(), - tab_inactive: neutral().light().step_2(), - editor: neutral().light().step_1(), - editor_subheader: neutral().light().step_2(), + status_bar_background: neutral().light().step_2(), + title_bar_background: neutral().light().step_2(), + toolbar_background: neutral().light().step_1(), + tab_bar_background: neutral().light().step_2(), + tab_active_background: neutral().light().step_1(), + tab_inactive_background: neutral().light().step_2(), + editor_background: neutral().light().step_1(), + editor_subheader_background: neutral().light().step_2(), editor_active_line: neutral().light_alpha().step_3(), + terminal_background: neutral().light().step_1(), + terminal_ansi_black: black().light().step_12(), + terminal_ansi_red: red().light().step_11(), + terminal_ansi_green: green().light().step_11(), + terminal_ansi_yellow: yellow().light().step_11(), + terminal_ansi_blue: blue().light().step_11(), + terminal_ansi_magenta: violet().light().step_11(), + terminal_ansi_cyan: cyan().light().step_11(), + terminal_ansi_white: neutral().light().step_12(), + terminal_ansi_bright_black: black().light().step_11(), + terminal_ansi_bright_red: red().light().step_10(), + terminal_ansi_bright_green: green().light().step_10(), + terminal_ansi_bright_yellow: yellow().light().step_10(), + terminal_ansi_bright_blue: blue().light().step_10(), + terminal_ansi_bright_magenta: violet().light().step_10(), + terminal_ansi_bright_cyan: cyan().light().step_10(), + terminal_ansi_bright_white: neutral().light().step_11(), } } @@ -251,17 +268,17 @@ impl ThemeColors { border_variant: neutral().dark().step_5(), border_focused: blue().dark().step_5(), border_transparent: system.transparent, - elevated_surface: neutral().dark().step_2(), - surface: neutral().dark().step_2(), + elevated_surface_background: neutral().dark().step_2(), + surface_background: neutral().dark().step_2(), background: neutral().dark().step_1(), - element: neutral().dark().step_3(), + element_background: neutral().dark().step_3(), element_hover: neutral().dark().step_4(), element_active: neutral().dark().step_5(), element_selected: neutral().dark().step_5(), element_disabled: neutral().dark_alpha().step_3(), element_placeholder: neutral().dark().step_11(), element_drop_target: blue().dark_alpha().step_2(), - ghost_element: system.transparent, + ghost_element_background: system.transparent, ghost_element_hover: neutral().dark().step_4(), ghost_element_active: neutral().dark().step_5(), ghost_element_selected: neutral().dark().step_5(), @@ -276,15 +293,32 @@ impl ThemeColors { icon_disabled: neutral().dark().step_9(), icon_placeholder: neutral().dark().step_10(), icon_accent: blue().dark().step_11(), - status_bar: neutral().dark().step_2(), - title_bar: neutral().dark().step_2(), - toolbar: neutral().dark().step_1(), - tab_bar: neutral().dark().step_2(), - tab_active: neutral().dark().step_1(), - tab_inactive: neutral().dark().step_2(), - editor: neutral().dark().step_1(), - editor_subheader: neutral().dark().step_2(), + status_bar_background: neutral().dark().step_2(), + title_bar_background: neutral().dark().step_2(), + toolbar_background: neutral().dark().step_1(), + tab_bar_background: neutral().dark().step_2(), + tab_active_background: neutral().dark().step_1(), + tab_inactive_background: neutral().dark().step_2(), + editor_background: neutral().dark().step_1(), + editor_subheader_background: neutral().dark().step_2(), editor_active_line: neutral().dark_alpha().step_3(), + terminal_background: neutral().dark().step_1(), + terminal_ansi_black: black().dark().step_12(), + terminal_ansi_red: red().dark().step_11(), + terminal_ansi_green: green().dark().step_11(), + terminal_ansi_yellow: yellow().dark().step_11(), + terminal_ansi_blue: blue().dark().step_11(), + terminal_ansi_magenta: violet().dark().step_11(), + terminal_ansi_cyan: cyan().dark().step_11(), + terminal_ansi_white: neutral().dark().step_12(), + terminal_ansi_bright_black: black().dark().step_11(), + terminal_ansi_bright_red: red().dark().step_10(), + terminal_ansi_bright_green: green().dark().step_10(), + terminal_ansi_bright_yellow: yellow().dark().step_10(), + terminal_ansi_bright_blue: blue().dark().step_10(), + terminal_ansi_bright_magenta: violet().dark().step_10(), + terminal_ansi_bright_cyan: cyan().dark().step_10(), + terminal_ansi_bright_white: neutral().dark().step_11(), } } } diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 7619734eb18de0a3c9efd2331203b64ba3c13635..ef1104d383eaf8bca3c7d3c14bcd4a6a13d6fde4 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -138,10 +138,13 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { "border_transparent", &HslaPrinter(self.0.border_transparent), ) - .field("elevated_surface", &HslaPrinter(self.0.elevated_surface)) - .field("surface", &HslaPrinter(self.0.surface)) + .field( + "elevated_surface", + &HslaPrinter(self.0.elevated_surface_background), + ) + .field("surface", &HslaPrinter(self.0.surface_background)) .field("background", &HslaPrinter(self.0.background)) - .field("element", &HslaPrinter(self.0.element)) + .field("element", &HslaPrinter(self.0.element_background)) .field("element_hover", &HslaPrinter(self.0.element_hover)) .field("element_active", &HslaPrinter(self.0.element_active)) .field("element_selected", &HslaPrinter(self.0.element_selected)) @@ -154,7 +157,10 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { "element_drop_target", &HslaPrinter(self.0.element_drop_target), ) - .field("ghost_element", &HslaPrinter(self.0.ghost_element)) + .field( + "ghost_element", + &HslaPrinter(self.0.ghost_element_background), + ) .field( "ghost_element_hover", &HslaPrinter(self.0.ghost_element_hover), @@ -181,14 +187,17 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { .field("icon_disabled", &HslaPrinter(self.0.icon_disabled)) .field("icon_placeholder", &HslaPrinter(self.0.icon_placeholder)) .field("icon_accent", &HslaPrinter(self.0.icon_accent)) - .field("status_bar", &HslaPrinter(self.0.status_bar)) - .field("title_bar", &HslaPrinter(self.0.title_bar)) - .field("toolbar", &HslaPrinter(self.0.toolbar)) - .field("tab_bar", &HslaPrinter(self.0.tab_bar)) - .field("tab_inactive", &HslaPrinter(self.0.tab_inactive)) - .field("tab_active", &HslaPrinter(self.0.tab_active)) - .field("editor", &HslaPrinter(self.0.editor)) - .field("editor_subheader", &HslaPrinter(self.0.editor_subheader)) + .field("status_bar", &HslaPrinter(self.0.status_bar_background)) + .field("title_bar", &HslaPrinter(self.0.title_bar_background)) + .field("toolbar", &HslaPrinter(self.0.toolbar_background)) + .field("tab_bar", &HslaPrinter(self.0.tab_bar_background)) + .field("tab_inactive", &HslaPrinter(self.0.tab_inactive_background)) + .field("tab_active", &HslaPrinter(self.0.tab_active_background)) + .field("editor", &HslaPrinter(self.0.editor_background)) + .field( + "editor_subheader", + &HslaPrinter(self.0.editor_subheader_background), + ) .field( "editor_active_line", &HslaPrinter(self.0.editor_active_line), diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index 5988598943dc0bc6d4c91c0bea82d3b5c19748ac..78bc211fc8e0a3b7e0f3ed8a1f39c9549266f57e 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -27,7 +27,24 @@ pub struct VsCodeColors { #[serde(rename = "editor.foreground")] text: String, #[serde(rename = "editor.background")] - editor: String, + editor_background: String, + terminal_background: String, + terminal_ansi_bright_black: String, + terminal_ansi_bright_red: String, + terminal_ansi_bright_green: String, + terminal_ansi_bright_yellow: String, + terminal_ansi_bright_blue: String, + terminal_ansi_bright_magenta: String, + terminal_ansi_bright_cyan: String, + terminal_ansi_bright_white: String, + terminal_ansi_black: String, + terminal_ansi_red: String, + terminal_ansi_green: String, + terminal_ansi_yellow: String, + terminal_ansi_blue: String, + terminal_ansi_magenta: String, + terminal_ansi_cyan: String, + terminal_ansi_white: String, } fn try_parse_color(color: &str) -> Result { @@ -58,8 +75,41 @@ impl VsCodeThemeConverter { let vscode_colors = &self.theme.colors; let theme_colors_refinements = ThemeColorsRefinement { - background: Some(try_parse_color(&vscode_colors.editor)?), + background: Some(try_parse_color(&vscode_colors.editor_background)?), text: Some(try_parse_color(&vscode_colors.text)?), + terminal_background: Some(try_parse_color(&vscode_colors.terminal_background)?), + terminal_ansi_bright_black: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_black, + )?), + terminal_ansi_bright_red: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_red, + )?), + terminal_ansi_bright_green: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_green, + )?), + terminal_ansi_bright_yellow: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_yellow, + )?), + terminal_ansi_bright_blue: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_blue, + )?), + terminal_ansi_bright_magenta: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_magenta, + )?), + terminal_ansi_bright_cyan: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_cyan, + )?), + terminal_ansi_bright_white: Some(try_parse_color( + &vscode_colors.terminal_ansi_bright_white, + )?), + terminal_ansi_black: Some(try_parse_color(&vscode_colors.terminal_ansi_black)?), + terminal_ansi_red: Some(try_parse_color(&vscode_colors.terminal_ansi_red)?), + terminal_ansi_green: Some(try_parse_color(&vscode_colors.terminal_ansi_green)?), + terminal_ansi_yellow: Some(try_parse_color(&vscode_colors.terminal_ansi_yellow)?), + terminal_ansi_blue: Some(try_parse_color(&vscode_colors.terminal_ansi_blue)?), + terminal_ansi_magenta: Some(try_parse_color(&vscode_colors.terminal_ansi_magenta)?), + terminal_ansi_cyan: Some(try_parse_color(&vscode_colors.terminal_ansi_cyan)?), + terminal_ansi_white: Some(try_parse_color(&vscode_colors.terminal_ansi_white)?), ..Default::default() }; @@ -81,22 +131,22 @@ impl VsCodeThemeConverter { } } -#[cfg(test)] -mod tests { - use super::*; - use std::path::PathBuf; +// #[cfg(test)] +// mod tests { +// use super::*; +// use std::path::PathBuf; - #[test] - fn test_deserialize_theme() { - let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); +// #[test] +// fn test_deserialize_theme() { +// let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); +// let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); - let mut d = root_dir.to_path_buf(); - d.push("assets/themes/src/vsc/dracula/dracula.json"); +// let mut d = root_dir.to_path_buf(); +// d.push("assets/themes/src/vsc/dracula/dracula.json"); - let data = std::fs::read_to_string(d).expect("Unable to read file"); +// let data = std::fs::read_to_string(d).expect("Unable to read file"); - let result: Theme = serde_json::from_str(&data).unwrap(); - println!("{:#?}", result); - } -} +// let result: Theme = serde_json::from_str(&data).unwrap(); +// println!("{:#?}", result); +// } +// } diff --git a/crates/ui2/src/components/buffer.rs b/crates/ui2/src/components/buffer.rs index 2b3db676ce795dac12a930f1ad48b8c3724751af..e12beff2fce5e8c8d081c44e832c3a19465e7b3f 100644 --- a/crates/ui2/src/components/buffer.rs +++ b/crates/ui2/src/components/buffer.rs @@ -220,7 +220,7 @@ impl Buffer { .flex_1() .w_full() .h_full() - .bg(cx.theme().colors().editor) + .bg(cx.theme().colors().editor_background) .children(rows) } } diff --git a/crates/ui2/src/components/buffer_search.rs b/crates/ui2/src/components/buffer_search.rs index 5d7de1b408a90159269fc7edc11d634a62c607d8..02f689ca3e009bca7dbedc6fc015b185321e8f90 100644 --- a/crates/ui2/src/components/buffer_search.rs +++ b/crates/ui2/src/components/buffer_search.rs @@ -30,14 +30,17 @@ impl Render for BufferSearch { type Element = Div; fn render(&mut self, cx: &mut ViewContext) -> Div { - h_stack().bg(cx.theme().colors().toolbar).p_2().child( - h_stack().child(Input::new("Search")).child( - IconButton::::new("replace", Icon::Replace) - .when(self.is_replace_open, |this| this.color(IconColor::Accent)) - .on_click(|buffer_search, cx| { - buffer_search.toggle_replace(cx); - }), - ), - ) + h_stack() + .bg(cx.theme().colors().toolbar_background) + .p_2() + .child( + h_stack().child(Input::new("Search")).child( + IconButton::::new("replace", Icon::Replace) + .when(self.is_replace_open, |this| this.color(IconColor::Accent)) + .on_click(|buffer_search, cx| { + buffer_search.toggle_replace(cx); + }), + ), + ) } } diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs index a0e3b55f63c43c57c37645ae7c4c7492e92f3d03..9f228e54bfeef6c9062a452b8d9bb6698725f519 100644 --- a/crates/ui2/src/components/collab_panel.rs +++ b/crates/ui2/src/components/collab_panel.rs @@ -18,7 +18,7 @@ impl CollabPanel { v_stack() .id(self.id.clone()) .h_full() - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .child( v_stack() .id("crdb") diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rs index 8345be1b3577724f3967205c3f493abf5945bc2d..e5e439ac6489914723aef799719fc5b8173148d6 100644 --- a/crates/ui2/src/components/context_menu.rs +++ b/crates/ui2/src/components/context_menu.rs @@ -46,7 +46,7 @@ impl ContextMenu { fn render(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { v_stack() .flex() - .bg(cx.theme().colors().elevated_surface) + .bg(cx.theme().colors().elevated_surface_background) .border() .border_color(cx.theme().colors().border) .child( diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index 101c845a76ed490e051bb02416c1f4bd05b4c1a5..8fe1a1fa9bc37d08002ed07e07bb167e05a2bd2e 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -73,12 +73,12 @@ impl IconButton { let (bg_color, bg_hover_color, bg_active_color) = match self.variant { ButtonVariant::Filled => ( - cx.theme().colors().element, + cx.theme().colors().element_background, cx.theme().colors().element_hover, cx.theme().colors().element_active, ), ButtonVariant::Ghost => ( - cx.theme().colors().ghost_element, + cx.theme().colors().ghost_element_background, cx.theme().colors().ghost_element_hover, cx.theme().colors().ghost_element_active, ), diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rs index 88cabbdc88bbd45fffb34d14682a3e8d546a68bc..8b8fba8c08d2da0ab097a82adc0a852925f1c30f 100644 --- a/crates/ui2/src/components/keybinding.rs +++ b/crates/ui2/src/components/keybinding.rs @@ -66,7 +66,7 @@ impl Key { .rounded_md() .text_sm() .text_color(cx.theme().colors().text) - .bg(cx.theme().colors().element) + .bg(cx.theme().colors().element_background) .child(self.key.clone()) } } diff --git a/crates/ui2/src/components/list.rs b/crates/ui2/src/components/list.rs index 50a86ff256b7a4e9e6f7992acd6f2178c8c32c6a..2e61bd6118b1c142962df372237b6b3f4fca33fd 100644 --- a/crates/ui2/src/components/list.rs +++ b/crates/ui2/src/components/list.rs @@ -106,7 +106,7 @@ impl ListHeader { h_stack() .w_full() - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) // TODO: Add focus state // .when(self.state == InteractionState::Focused, |this| { // this.border() @@ -399,7 +399,7 @@ impl ListEntry { div() .relative() .group("") - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .when(self.state == InteractionState::Focused, |this| { this.border() .border_color(cx.theme().colors().border_focused) @@ -490,7 +490,7 @@ impl ListDetailsEntry { let settings = user_settings(cx); let (item_bg, item_bg_hover, item_bg_active) = ( - cx.theme().colors().ghost_element, + cx.theme().colors().ghost_element_background, cx.theme().colors().ghost_element_hover, cx.theme().colors().ghost_element_active, ); @@ -516,7 +516,7 @@ impl ListDetailsEntry { .top_3() .rounded_full() .border_2() - .border_color(cx.theme().colors().surface) + .border_color(cx.theme().colors().surface_background) .w(px(9.0)) .h(px(9.0)) .z_index(2) diff --git a/crates/ui2/src/components/multi_buffer.rs b/crates/ui2/src/components/multi_buffer.rs index ea130f20bd447a2e31ea3f6e04e3e2ff08470dae..1334703015b1373255ba5113bcce143ee790413b 100644 --- a/crates/ui2/src/components/multi_buffer.rs +++ b/crates/ui2/src/components/multi_buffer.rs @@ -24,7 +24,7 @@ impl MultiBuffer { .items_center() .justify_between() .p_4() - .bg(cx.theme().colors().editor_subheader) + .bg(cx.theme().colors().editor_subheader_background) .child(Label::new("main.rs")) .child(IconButton::new("arrow_up_right", Icon::ArrowUpRight)), ) diff --git a/crates/ui2/src/components/notification_toast.rs b/crates/ui2/src/components/notification_toast.rs index 59078c98f43d2a079c5de75b428eae1073c8803e..e8739b925c7e03c2a4fb2eb77cf005ea72ec665e 100644 --- a/crates/ui2/src/components/notification_toast.rs +++ b/crates/ui2/src/components/notification_toast.rs @@ -34,7 +34,7 @@ impl NotificationToast { .px_1p5() .rounded_lg() .shadow_md() - .bg(cx.theme().colors().elevated_surface) + .bg(cx.theme().colors().elevated_surface_background) .child(div().size_full().child(self.label.clone())) } } diff --git a/crates/ui2/src/components/notifications_panel.rs b/crates/ui2/src/components/notifications_panel.rs index 74f015ac068706cd09242dd04f30d8b09e285842..be9b51115d946f00cc7ed7d8f3d0d763ff71855a 100644 --- a/crates/ui2/src/components/notifications_panel.rs +++ b/crates/ui2/src/components/notifications_panel.rs @@ -22,7 +22,7 @@ impl NotificationsPanel { .flex() .flex_col() .size_full() - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .child( ListHeader::new("Notifications").meta(Some(ListHeaderMeta::Tools(vec![ Icon::AtSign, @@ -43,7 +43,7 @@ impl NotificationsPanel { .p_1() // TODO: Add cursor style // .cursor(Cursor::IBeam) - .bg(cx.theme().colors().element) + .bg(cx.theme().colors().element_background) .border() .border_color(cx.theme().colors().border_variant) .child( diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs index a1f3eb7e1c4a9f044ac6a4b810643a044fc578b4..269b39d86d5bc4fbbfa34fa20f9418a335b47641 100644 --- a/crates/ui2/src/components/palette.rs +++ b/crates/ui2/src/components/palette.rs @@ -47,7 +47,7 @@ impl Palette { .id(self.id.clone()) .w_96() .rounded_lg() - .bg(cx.theme().colors().elevated_surface) + .bg(cx.theme().colors().elevated_surface_background) .border() .border_color(cx.theme().colors().border) .child( @@ -56,7 +56,12 @@ impl Palette { .child(v_stack().py_0p5().px_1().child(div().px_2().py_0p5().child( Label::new(self.input_placeholder.clone()).color(LabelColor::Placeholder), ))) - .child(div().h_px().w_full().bg(cx.theme().colors().element)) + .child( + div() + .h_px() + .w_full() + .bg(cx.theme().colors().element_background), + ) .child( v_stack() .id("items") diff --git a/crates/ui2/src/components/panel.rs b/crates/ui2/src/components/panel.rs index 5d941eb50ea3e7c8084b73c7792a2b6dcd0c378a..ba88abb337259e2e56d1b9b5e1eabb169fc0827c 100644 --- a/crates/ui2/src/components/panel.rs +++ b/crates/ui2/src/components/panel.rs @@ -107,7 +107,7 @@ impl Panel { PanelSide::Right => this.border_l(), PanelSide::Bottom => this.border_b().w_full().h(current_size), }) - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .border_color(cx.theme().colors().border) .children(self.children) } diff --git a/crates/ui2/src/components/panes.rs b/crates/ui2/src/components/panes.rs index bf0f27d43f32742abfe61c527c67dd6d8fd0f96a..a1e040b0cad9a5365548feb150f1084f4fa3404e 100644 --- a/crates/ui2/src/components/panes.rs +++ b/crates/ui2/src/components/panes.rs @@ -113,7 +113,7 @@ impl PaneGroup { .gap_px() .w_full() .h_full() - .bg(cx.theme().colors().editor) + .bg(cx.theme().colors().editor_background) .children(self.groups.into_iter().map(|group| group.render(view, cx))); if self.split_direction == SplitDirection::Horizontal { diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rs index 76fa50d3380188b6945fa95e5426071d0baec69c..90c5696c5bdbae6bec3095c9de1667d0aef4ad39 100644 --- a/crates/ui2/src/components/project_panel.rs +++ b/crates/ui2/src/components/project_panel.rs @@ -20,7 +20,7 @@ impl ProjectPanel { .flex_col() .w_full() .h_full() - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .child( div() .id("project-panel-contents") diff --git a/crates/ui2/src/components/status_bar.rs b/crates/ui2/src/components/status_bar.rs index 136472f605abc71600137ef567e43d45c8129e45..34a5993e69da552d9045a7ab23c5fa30d3d218e3 100644 --- a/crates/ui2/src/components/status_bar.rs +++ b/crates/ui2/src/components/status_bar.rs @@ -93,7 +93,7 @@ impl StatusBar { .items_center() .justify_between() .w_full() - .bg(cx.theme().colors().status_bar) + .bg(cx.theme().colors().status_bar_background) .child(self.left_tools(view, cx)) .child(self.right_tools(view, cx)) } diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rs index e8b0ee3be59b19fd8307f3485971b2fafb2a89f4..47de0541f1d6287a0e800c298e45c76486c3ef57 100644 --- a/crates/ui2/src/components/tab.rs +++ b/crates/ui2/src/components/tab.rs @@ -109,12 +109,12 @@ impl Tab { let (tab_bg, tab_hover_bg, tab_active_bg) = match self.current { false => ( - cx.theme().colors().tab_inactive, + cx.theme().colors().tab_inactive_background, cx.theme().colors().ghost_element_hover, cx.theme().colors().ghost_element_active, ), true => ( - cx.theme().colors().tab_active, + cx.theme().colors().tab_active_background, cx.theme().colors().element_hover, cx.theme().colors().element_active, ), diff --git a/crates/ui2/src/components/tab_bar.rs b/crates/ui2/src/components/tab_bar.rs index bb7fca11534dbcb5981a0d695ffb3962ebe67e6c..a1280441832f1a6a8caee0c1a63ec989d021ad37 100644 --- a/crates/ui2/src/components/tab_bar.rs +++ b/crates/ui2/src/components/tab_bar.rs @@ -31,7 +31,7 @@ impl TabBar { .id(self.id.clone()) .w_full() .flex() - .bg(cx.theme().colors().tab_bar) + .bg(cx.theme().colors().tab_bar_background) // Left Side .child( div() diff --git a/crates/ui2/src/components/terminal.rs b/crates/ui2/src/components/terminal.rs index 051ebf7315400298f6b22eb8ae5adb108a7098fe..b912a5960768e3b17a11988560a0201ac6ee2902 100644 --- a/crates/ui2/src/components/terminal.rs +++ b/crates/ui2/src/components/terminal.rs @@ -24,7 +24,7 @@ impl Terminal { div() .w_full() .flex() - .bg(cx.theme().colors().surface) + .bg(cx.theme().colors().surface_background) .child( div().px_1().flex().flex_none().gap_2().child( div() diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rs index 3b81ac42b44abf45fac20337b8f1392d9d529941..4ab6625dbaed89311a78227610b27434f91f7925 100644 --- a/crates/ui2/src/components/toast.rs +++ b/crates/ui2/src/components/toast.rs @@ -54,7 +54,7 @@ impl Toast { .rounded_lg() .shadow_md() .overflow_hidden() - .bg(cx.theme().colors().elevated_surface) + .bg(cx.theme().colors().elevated_surface_background) .children(self.children) } } diff --git a/crates/ui2/src/components/toolbar.rs b/crates/ui2/src/components/toolbar.rs index 05a5c991d69d645602f2966f270124efcb5209bd..0e3e7c259ff971622feb5b89fbeddc3bf5023a2f 100644 --- a/crates/ui2/src/components/toolbar.rs +++ b/crates/ui2/src/components/toolbar.rs @@ -56,7 +56,7 @@ impl Toolbar { fn render(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { div() - .bg(cx.theme().colors().toolbar) + .bg(cx.theme().colors().toolbar_background) .p_2() .flex() .justify_between() diff --git a/crates/ui2/src/components/traffic_lights.rs b/crates/ui2/src/components/traffic_lights.rs index 9080276cdd281888813f06c34fee8a256e540aa8..677fae886c838c03cc42ed300ce9df4f79d1d883 100644 --- a/crates/ui2/src/components/traffic_lights.rs +++ b/crates/ui2/src/components/traffic_lights.rs @@ -28,7 +28,7 @@ impl TrafficLight { (true, TrafficLightColor::Red) => system_colors.mac_os_traffic_light_red, (true, TrafficLightColor::Yellow) => system_colors.mac_os_traffic_light_yellow, (true, TrafficLightColor::Green) => system_colors.mac_os_traffic_light_green, - (false, _) => cx.theme().colors().element, + (false, _) => cx.theme().colors().element_background, }; div().w_3().h_3().rounded_full().bg(fill) diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rs index 073bcdbb4589ed9fc87e4b63dd6acd0bfd3176f4..be7f29fee21dfcac99930526c26e94f2814d5f0f 100644 --- a/crates/ui2/src/elements/button.rs +++ b/crates/ui2/src/elements/button.rs @@ -22,8 +22,8 @@ pub enum ButtonVariant { impl ButtonVariant { pub fn bg_color(&self, cx: &mut WindowContext) -> Hsla { match self { - ButtonVariant::Ghost => cx.theme().colors().ghost_element, - ButtonVariant::Filled => cx.theme().colors().element, + ButtonVariant::Ghost => cx.theme().colors().ghost_element_background, + ButtonVariant::Filled => cx.theme().colors().element_background, } } diff --git a/crates/ui2/src/elements/indicator.rs b/crates/ui2/src/elements/indicator.rs index 1f6e00e621ad02132f85540db985a1a2abd40c31..94398ab7f6016640d55e20a69d8e6939ca75c51a 100644 --- a/crates/ui2/src/elements/indicator.rs +++ b/crates/ui2/src/elements/indicator.rs @@ -14,7 +14,7 @@ impl UnreadIndicator { div() .rounded_full() .border_2() - .border_color(cx.theme().colors().surface) + .border_color(cx.theme().colors().surface_background) .w(px(9.0)) .h(px(9.0)) .z_index(2) diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index 2884470ce21193085e165cc1b0b92fb710c585a0..f288f3ca563d861bfb9b17e38d9ea7b9a2bea40a 100644 --- a/crates/ui2/src/elements/input.rs +++ b/crates/ui2/src/elements/input.rs @@ -59,12 +59,12 @@ impl Input { fn render(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let (input_bg, input_hover_bg, input_active_bg) = match self.variant { InputVariant::Ghost => ( - cx.theme().colors().ghost_element, + cx.theme().colors().ghost_element_background, cx.theme().colors().ghost_element_hover, cx.theme().colors().ghost_element_active, ), InputVariant::Filled => ( - cx.theme().colors().element, + cx.theme().colors().element_background, cx.theme().colors().element_hover, cx.theme().colors().element_active, ), From 8d09baa3a50d33e542cb030d8a64ecbc168ee414 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 20:06:35 -0400 Subject: [PATCH 013/110] Remove unintentionally committed txt file --- theme.txt | 254 ------------------------------------------------------ 1 file changed, 254 deletions(-) delete mode 100644 theme.txt diff --git a/theme.txt b/theme.txt deleted file mode 100644 index 626d6b9fa91edeedee07148dea96defd194ebf31..0000000000000000000000000000000000000000 --- a/theme.txt +++ /dev/null @@ -1,254 +0,0 @@ - Finished dev [unoptimized + debuginfo] target(s) in 0.39s - Running `target/debug/storybook` -[crates/ui2/src/components/workspace.rs:182] color = [crates/ui2/src/color.rs:162] "ThemeColor debug" = "ThemeColor debug" -ThemeColor { - transparent: "rgba(0x00000000).into()", - mac_os_traffic_light_red: "rgba(0xec695eff).into()", - mac_os_traffic_light_yellow: "rgba(0xf4bf4eff).into()", - mac_os_traffic_light_green: "rgba(0x61c553ff).into()", - border: "rgba(0x464b57ff).into()", - border_variant: "rgba(0x464b57ff).into()", - border_focused: "rgba(0x293b5bff).into()", - border_transparent: "rgba(0x00000000).into()", - elevated_surface: "rgba(0x3b414dff).into()", - surface: "rgba(0x2f343eff).into()", - background: "rgba(0x3b414dff).into()", - filled_element: "rgba(0x3b414dff).into()", - filled_element_hover: "rgba(0xffffff1e).into()", - filled_element_active: "rgba(0xffffff28).into()", - filled_element_selected: "rgba(0x18243dff).into()", - filled_element_disabled: "rgba(0x00000000).into()", - ghost_element: "rgba(0x00000000).into()", - ghost_element_hover: "rgba(0xffffff14).into()", - ghost_element_active: "rgba(0xffffff1e).into()", - ghost_element_selected: "rgba(0x18243dff).into()", - ghost_element_disabled: "rgba(0x00000000).into()", - text: "rgba(0xc8ccd4ff).into()", - text_muted: "rgba(0x838994ff).into()", - text_placeholder: "rgba(0xd07277ff).into()", - text_disabled: "rgba(0x555a63ff).into()", - text_accent: "rgba(0x74ade8ff).into()", - icon_muted: "rgba(0x838994ff).into()", - syntax: SyntaxColor { - comment: "rgba(0x5d636fff).into()", - string: "rgba(0xa1c181ff).into()", - function: "rgba(0x73ade9ff).into()", - keyword: "rgba(0xb477cfff).into()", - }, - status_bar: "rgba(0x3b414dff).into()", - title_bar: "rgba(0x3b414dff).into()", - toolbar: "rgba(0x282c33ff).into()", - tab_bar: "rgba(0x2f343eff).into()", - editor_subheader: "rgba(0x2f343eff).into()", - editor_active_line: "rgba(0x2f343eff).into()", - terminal: "rgba(0x282c33ff).into()", - image_fallback_background: "rgba(0x3b414dff).into()", - git_created: "rgba(0xa1c181ff).into()", - git_modified: "rgba(0x74ade8ff).into()", - git_deleted: "rgba(0xd07277ff).into()", - git_conflict: "rgba(0xdec184ff).into()", - git_ignored: "rgba(0x555a63ff).into()", - git_renamed: "rgba(0xdec184ff).into()", - player: [ - PlayerThemeColors { - cursor: "rgba(0x74ade8ff).into()", - selection: "rgba(0x74ade83d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xa1c181ff).into()", - selection: "rgba(0xa1c1813d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbe5046ff).into()", - selection: "rgba(0xbe50463d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbf956aff).into()", - selection: "rgba(0xbf956a3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xb477cfff).into()", - selection: "rgba(0xb477cf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0x6eb4bfff).into()", - selection: "rgba(0x6eb4bf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xd07277ff).into()", - selection: "rgba(0xd072773d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xdec184ff).into()", - selection: "rgba(0xdec1843d).into()", - }, - ], -} -[crates/ui2/src/components/workspace.rs:182] color = [crates/ui2/src/color.rs:162] "ThemeColor debug" = "ThemeColor debug" -ThemeColor { - transparent: "rgba(0x00000000).into()", - mac_os_traffic_light_red: "rgba(0xec695eff).into()", - mac_os_traffic_light_yellow: "rgba(0xf4bf4eff).into()", - mac_os_traffic_light_green: "rgba(0x61c553ff).into()", - border: "rgba(0x464b57ff).into()", - border_variant: "rgba(0x464b57ff).into()", - border_focused: "rgba(0x293b5bff).into()", - border_transparent: "rgba(0x00000000).into()", - elevated_surface: "rgba(0x3b414dff).into()", - surface: "rgba(0x2f343eff).into()", - background: "rgba(0x3b414dff).into()", - filled_element: "rgba(0x3b414dff).into()", - filled_element_hover: "rgba(0xffffff1e).into()", - filled_element_active: "rgba(0xffffff28).into()", - filled_element_selected: "rgba(0x18243dff).into()", - filled_element_disabled: "rgba(0x00000000).into()", - ghost_element: "rgba(0x00000000).into()", - ghost_element_hover: "rgba(0xffffff14).into()", - ghost_element_active: "rgba(0xffffff1e).into()", - ghost_element_selected: "rgba(0x18243dff).into()", - ghost_element_disabled: "rgba(0x00000000).into()", - text: "rgba(0xc8ccd4ff).into()", - text_muted: "rgba(0x838994ff).into()", - text_placeholder: "rgba(0xd07277ff).into()", - text_disabled: "rgba(0x555a63ff).into()", - text_accent: "rgba(0x74ade8ff).into()", - icon_muted: "rgba(0x838994ff).into()", - syntax: SyntaxColor { - comment: "rgba(0x5d636fff).into()", - string: "rgba(0xa1c181ff).into()", - function: "rgba(0x73ade9ff).into()", - keyword: "rgba(0xb477cfff).into()", - }, - status_bar: "rgba(0x3b414dff).into()", - title_bar: "rgba(0x3b414dff).into()", - toolbar: "rgba(0x282c33ff).into()", - tab_bar: "rgba(0x2f343eff).into()", - editor_subheader: "rgba(0x2f343eff).into()", - editor_active_line: "rgba(0x2f343eff).into()", - terminal: "rgba(0x282c33ff).into()", - image_fallback_background: "rgba(0x3b414dff).into()", - git_created: "rgba(0xa1c181ff).into()", - git_modified: "rgba(0x74ade8ff).into()", - git_deleted: "rgba(0xd07277ff).into()", - git_conflict: "rgba(0xdec184ff).into()", - git_ignored: "rgba(0x555a63ff).into()", - git_renamed: "rgba(0xdec184ff).into()", - player: [ - PlayerThemeColors { - cursor: "rgba(0x74ade8ff).into()", - selection: "rgba(0x74ade83d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xa1c181ff).into()", - selection: "rgba(0xa1c1813d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbe5046ff).into()", - selection: "rgba(0xbe50463d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbf956aff).into()", - selection: "rgba(0xbf956a3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xb477cfff).into()", - selection: "rgba(0xb477cf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0x6eb4bfff).into()", - selection: "rgba(0x6eb4bf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xd07277ff).into()", - selection: "rgba(0xd072773d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xdec184ff).into()", - selection: "rgba(0xdec1843d).into()", - }, - ], -} -[crates/ui2/src/components/workspace.rs:182] color = [crates/ui2/src/color.rs:162] "ThemeColor debug" = "ThemeColor debug" -ThemeColor { - transparent: "rgba(0x00000000).into()", - mac_os_traffic_light_red: "rgba(0xec695eff).into()", - mac_os_traffic_light_yellow: "rgba(0xf4bf4eff).into()", - mac_os_traffic_light_green: "rgba(0x61c553ff).into()", - border: "rgba(0x464b57ff).into()", - border_variant: "rgba(0x464b57ff).into()", - border_focused: "rgba(0x293b5bff).into()", - border_transparent: "rgba(0x00000000).into()", - elevated_surface: "rgba(0x3b414dff).into()", - surface: "rgba(0x2f343eff).into()", - background: "rgba(0x3b414dff).into()", - filled_element: "rgba(0x3b414dff).into()", - filled_element_hover: "rgba(0xffffff1e).into()", - filled_element_active: "rgba(0xffffff28).into()", - filled_element_selected: "rgba(0x18243dff).into()", - filled_element_disabled: "rgba(0x00000000).into()", - ghost_element: "rgba(0x00000000).into()", - ghost_element_hover: "rgba(0xffffff14).into()", - ghost_element_active: "rgba(0xffffff1e).into()", - ghost_element_selected: "rgba(0x18243dff).into()", - ghost_element_disabled: "rgba(0x00000000).into()", - text: "rgba(0xc8ccd4ff).into()", - text_muted: "rgba(0x838994ff).into()", - text_placeholder: "rgba(0xd07277ff).into()", - text_disabled: "rgba(0x555a63ff).into()", - text_accent: "rgba(0x74ade8ff).into()", - icon_muted: "rgba(0x838994ff).into()", - syntax: SyntaxColor { - comment: "rgba(0x5d636fff).into()", - string: "rgba(0xa1c181ff).into()", - function: "rgba(0x73ade9ff).into()", - keyword: "rgba(0xb477cfff).into()", - }, - status_bar: "rgba(0x3b414dff).into()", - title_bar: "rgba(0x3b414dff).into()", - toolbar: "rgba(0x282c33ff).into()", - tab_bar: "rgba(0x2f343eff).into()", - editor_subheader: "rgba(0x2f343eff).into()", - editor_active_line: "rgba(0x2f343eff).into()", - terminal: "rgba(0x282c33ff).into()", - image_fallback_background: "rgba(0x3b414dff).into()", - git_created: "rgba(0xa1c181ff).into()", - git_modified: "rgba(0x74ade8ff).into()", - git_deleted: "rgba(0xd07277ff).into()", - git_conflict: "rgba(0xdec184ff).into()", - git_ignored: "rgba(0x555a63ff).into()", - git_renamed: "rgba(0xdec184ff).into()", - player: [ - PlayerThemeColors { - cursor: "rgba(0x74ade8ff).into()", - selection: "rgba(0x74ade83d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xa1c181ff).into()", - selection: "rgba(0xa1c1813d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbe5046ff).into()", - selection: "rgba(0xbe50463d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xbf956aff).into()", - selection: "rgba(0xbf956a3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xb477cfff).into()", - selection: "rgba(0xb477cf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0x6eb4bfff).into()", - selection: "rgba(0x6eb4bf3d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xd07277ff).into()", - selection: "rgba(0xd072773d).into()", - }, - PlayerThemeColors { - cursor: "rgba(0xdec184ff).into()", - selection: "rgba(0xdec1843d).into()", - }, - ], -} From 0d0b6db24f6221a124d60e4bd7e4363aeeebb7df Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 20:15:51 -0400 Subject: [PATCH 014/110] Update theme importer --- crates/theme_importer/src/theme_printer.rs | 115 ++++++++++++++++++--- crates/theme_importer/src/vscode.rs | 17 +++ 2 files changed, 119 insertions(+), 13 deletions(-) diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index ef1104d383eaf8bca3c7d3c14bcd4a6a13d6fde4..1c4d263389177538e36773e761371c42bc5e08e3 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -139,12 +139,18 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { &HslaPrinter(self.0.border_transparent), ) .field( - "elevated_surface", + "elevated_surface_background", &HslaPrinter(self.0.elevated_surface_background), ) - .field("surface", &HslaPrinter(self.0.surface_background)) + .field( + "surface_background", + &HslaPrinter(self.0.surface_background), + ) .field("background", &HslaPrinter(self.0.background)) - .field("element", &HslaPrinter(self.0.element_background)) + .field( + "element_background", + &HslaPrinter(self.0.element_background), + ) .field("element_hover", &HslaPrinter(self.0.element_hover)) .field("element_active", &HslaPrinter(self.0.element_active)) .field("element_selected", &HslaPrinter(self.0.element_selected)) @@ -158,7 +164,7 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { &HslaPrinter(self.0.element_drop_target), ) .field( - "ghost_element", + "ghost_element_background", &HslaPrinter(self.0.ghost_element_background), ) .field( @@ -187,21 +193,104 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { .field("icon_disabled", &HslaPrinter(self.0.icon_disabled)) .field("icon_placeholder", &HslaPrinter(self.0.icon_placeholder)) .field("icon_accent", &HslaPrinter(self.0.icon_accent)) - .field("status_bar", &HslaPrinter(self.0.status_bar_background)) - .field("title_bar", &HslaPrinter(self.0.title_bar_background)) - .field("toolbar", &HslaPrinter(self.0.toolbar_background)) - .field("tab_bar", &HslaPrinter(self.0.tab_bar_background)) - .field("tab_inactive", &HslaPrinter(self.0.tab_inactive_background)) - .field("tab_active", &HslaPrinter(self.0.tab_active_background)) - .field("editor", &HslaPrinter(self.0.editor_background)) - .field( - "editor_subheader", + .field( + "status_bar_background", + &HslaPrinter(self.0.status_bar_background), + ) + .field( + "title_bar_background", + &HslaPrinter(self.0.title_bar_background), + ) + .field( + "toolbar_background", + &HslaPrinter(self.0.toolbar_background), + ) + .field( + "tab_bar_background", + &HslaPrinter(self.0.tab_bar_background), + ) + .field( + "tab_inactive_background", + &HslaPrinter(self.0.tab_inactive_background), + ) + .field( + "tab_active_background", + &HslaPrinter(self.0.tab_active_background), + ) + .field("editor_background", &HslaPrinter(self.0.editor_background)) + .field( + "editor_subheader_background", &HslaPrinter(self.0.editor_subheader_background), ) .field( "editor_active_line", &HslaPrinter(self.0.editor_active_line), ) + .field( + "terminal_background", + &HslaPrinter(self.0.terminal_background), + ) + .field( + "terminal_ansi_bright_black", + &HslaPrinter(self.0.terminal_ansi_bright_black), + ) + .field( + "terminal_ansi_bright_red", + &HslaPrinter(self.0.terminal_ansi_bright_red), + ) + .field( + "terminal_ansi_bright_green", + &HslaPrinter(self.0.terminal_ansi_bright_green), + ) + .field( + "terminal_ansi_bright_yellow", + &HslaPrinter(self.0.terminal_ansi_bright_yellow), + ) + .field( + "terminal_ansi_bright_blue", + &HslaPrinter(self.0.terminal_ansi_bright_blue), + ) + .field( + "terminal_ansi_bright_magenta", + &HslaPrinter(self.0.terminal_ansi_bright_magenta), + ) + .field( + "terminal_ansi_bright_cyan", + &HslaPrinter(self.0.terminal_ansi_bright_cyan), + ) + .field( + "terminal_ansi_bright_white", + &HslaPrinter(self.0.terminal_ansi_bright_white), + ) + .field( + "terminal_ansi_black", + &HslaPrinter(self.0.terminal_ansi_black), + ) + .field("terminal_ansi_red", &HslaPrinter(self.0.terminal_ansi_red)) + .field( + "terminal_ansi_green", + &HslaPrinter(self.0.terminal_ansi_green), + ) + .field( + "terminal_ansi_yellow", + &HslaPrinter(self.0.terminal_ansi_yellow), + ) + .field( + "terminal_ansi_blue", + &HslaPrinter(self.0.terminal_ansi_blue), + ) + .field( + "terminal_ansi_magenta", + &HslaPrinter(self.0.terminal_ansi_magenta), + ) + .field( + "terminal_ansi_cyan", + &HslaPrinter(self.0.terminal_ansi_cyan), + ) + .field( + "terminal_ansi_white", + &HslaPrinter(self.0.terminal_ansi_white), + ) .finish() } } diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index 78bc211fc8e0a3b7e0f3ed8a1f39c9549266f57e..db63a6adf431db7b26776a20d710534e870c0d71 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -28,22 +28,39 @@ pub struct VsCodeColors { text: String, #[serde(rename = "editor.background")] editor_background: String, + #[serde(rename = "terminal.background")] terminal_background: String, + #[serde(rename = "terminal.ansiBrightBlack")] terminal_ansi_bright_black: String, + #[serde(rename = "terminal.ansiBrightRed")] terminal_ansi_bright_red: String, + #[serde(rename = "terminal.ansiBrightGreen")] terminal_ansi_bright_green: String, + #[serde(rename = "terminal.ansiBrightYellow")] terminal_ansi_bright_yellow: String, + #[serde(rename = "terminal.ansiBrightBlue")] terminal_ansi_bright_blue: String, + #[serde(rename = "terminal.ansiBrightMagenta")] terminal_ansi_bright_magenta: String, + #[serde(rename = "terminal.ansiBrightCyan")] terminal_ansi_bright_cyan: String, + #[serde(rename = "terminal.ansiBrightWhite")] terminal_ansi_bright_white: String, + #[serde(rename = "terminal.ansiBlack")] terminal_ansi_black: String, + #[serde(rename = "terminal.ansiRed")] terminal_ansi_red: String, + #[serde(rename = "terminal.ansiGreen")] terminal_ansi_green: String, + #[serde(rename = "terminal.ansiYellow")] terminal_ansi_yellow: String, + #[serde(rename = "terminal.ansiBlue")] terminal_ansi_blue: String, + #[serde(rename = "terminal.ansiMagenta")] terminal_ansi_magenta: String, + #[serde(rename = "terminal.ansiCyan")] terminal_ansi_cyan: String, + #[serde(rename = "terminal.ansiWhite")] terminal_ansi_white: String, } From 383d9129f480245a043694e5d17d32f8bcfa2144 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 21:49:26 -0400 Subject: [PATCH 015/110] [Not compiling] Continue working on VSCode import --- crates/theme_importer/src/vscode.rs | 404 ++++++++++++++++++++++++++-- 1 file changed, 382 insertions(+), 22 deletions(-) diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index db63a6adf431db7b26776a20d710534e870c0d71..b1a6a0e44bc2e117645f77ff3f0cd67dbe21e80a 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -24,44 +24,395 @@ pub struct VsCodeTheme { #[derive(Debug, Deserialize)] pub struct VsCodeColors { - #[serde(rename = "editor.foreground")] - text: String, - #[serde(rename = "editor.background")] - editor_background: String, #[serde(rename = "terminal.background")] - terminal_background: String, + pub terminal_background: Option, + #[serde(rename = "terminal.foreground")] + pub terminal_foreground: Option, #[serde(rename = "terminal.ansiBrightBlack")] - terminal_ansi_bright_black: String, + pub terminal_ansi_bright_black: Option, #[serde(rename = "terminal.ansiBrightRed")] - terminal_ansi_bright_red: String, + pub terminal_ansi_bright_red: Option, #[serde(rename = "terminal.ansiBrightGreen")] - terminal_ansi_bright_green: String, + pub terminal_ansi_bright_green: Option, #[serde(rename = "terminal.ansiBrightYellow")] - terminal_ansi_bright_yellow: String, + pub terminal_ansi_bright_yellow: Option, #[serde(rename = "terminal.ansiBrightBlue")] - terminal_ansi_bright_blue: String, + pub terminal_ansi_bright_blue: Option, #[serde(rename = "terminal.ansiBrightMagenta")] - terminal_ansi_bright_magenta: String, + pub terminal_ansi_bright_magenta: Option, #[serde(rename = "terminal.ansiBrightCyan")] - terminal_ansi_bright_cyan: String, + pub terminal_ansi_bright_cyan: Option, #[serde(rename = "terminal.ansiBrightWhite")] - terminal_ansi_bright_white: String, + pub terminal_ansi_bright_white: Option, #[serde(rename = "terminal.ansiBlack")] - terminal_ansi_black: String, + pub terminal_ansi_black: Option, #[serde(rename = "terminal.ansiRed")] - terminal_ansi_red: String, + pub terminal_ansi_red: Option, #[serde(rename = "terminal.ansiGreen")] - terminal_ansi_green: String, + pub terminal_ansi_green: Option, #[serde(rename = "terminal.ansiYellow")] - terminal_ansi_yellow: String, + pub terminal_ansi_yellow: Option, #[serde(rename = "terminal.ansiBlue")] - terminal_ansi_blue: String, + pub terminal_ansi_blue: Option, #[serde(rename = "terminal.ansiMagenta")] - terminal_ansi_magenta: String, + pub terminal_ansi_magenta: Option, #[serde(rename = "terminal.ansiCyan")] - terminal_ansi_cyan: String, + pub terminal_ansi_cyan: Option, #[serde(rename = "terminal.ansiWhite")] - terminal_ansi_white: String, + pub terminal_ansi_white: Option, + #[serde(rename = "focusBorder")] + pub focus_border: Option, + pub foreground: Option, + #[serde(rename = "selection.background")] + pub selection_background: Option, + #[serde(rename = "errorForeground")] + pub error_foreground: Option, + #[serde(rename = "button.background")] + pub button_background: Option, + #[serde(rename = "button.foreground")] + pub button_foreground: Option, + #[serde(rename = "button.secondaryBackground")] + pub button_secondary_background: Option, + #[serde(rename = "button.secondaryForeground")] + pub button_secondary_foreground: Option, + #[serde(rename = "button.secondaryHoverBackground")] + pub button_secondary_hover_background: Option, + #[serde(rename = "dropdown.background")] + pub dropdown_background: Option, + #[serde(rename = "dropdown.border")] + pub dropdown_border: Option, + #[serde(rename = "dropdown.foreground")] + pub dropdown_foreground: Option, + #[serde(rename = "input.background")] + pub input_background: Option, + #[serde(rename = "input.foreground")] + pub input_foreground: Option, + #[serde(rename = "input.border")] + pub input_border: Option, + #[serde(rename = "input.placeholderForeground")] + pub input_placeholder_foreground: Option, + #[serde(rename = "inputOption.activeBorder")] + pub input_option_active_border: Option, + #[serde(rename = "inputValidation.infoBorder")] + pub input_validation_info_border: Option, + #[serde(rename = "inputValidation.warningBorder")] + pub input_validation_warning_border: Option, + #[serde(rename = "inputValidation.errorBorder")] + pub input_validation_error_border: Option, + #[serde(rename = "badge.foreground")] + pub badge_foreground: Option, + #[serde(rename = "badge.background")] + pub badge_background: Option, + #[serde(rename = "progressBar.background")] + pub progress_bar_background: Option, + #[serde(rename = "list.activeSelectionBackground")] + pub list_active_selection_background: Option, + #[serde(rename = "list.activeSelectionForeground")] + pub list_active_selection_foreground: Option, + #[serde(rename = "list.dropBackground")] + pub list_drop_background: Option, + #[serde(rename = "list.focusBackground")] + pub list_focus_background: Option, + #[serde(rename = "list.highlightForeground")] + pub list_highlight_foreground: Option, + #[serde(rename = "list.hoverBackground")] + pub list_hover_background: Option, + #[serde(rename = "list.inactiveSelectionBackground")] + pub list_inactive_selection_background: Option, + #[serde(rename = "list.warningForeground")] + pub list_warning_foreground: Option, + #[serde(rename = "list.errorForeground")] + pub list_error_foreground: Option, + #[serde(rename = "activityBar.background")] + pub activity_bar_background: Option, + #[serde(rename = "activityBar.inactiveForeground")] + pub activity_bar_inactive_foreground: Option, + #[serde(rename = "activityBar.foreground")] + pub activity_bar_foreground: Option, + #[serde(rename = "activityBar.activeBorder")] + pub activity_bar_active_border: Option, + #[serde(rename = "activityBar.activeBackground")] + pub activity_bar_active_background: Option, + #[serde(rename = "activityBarBadge.background")] + pub activity_bar_badge_background: Option, + #[serde(rename = "activityBarBadge.foreground")] + pub activity_bar_badge_foreground: Option, + #[serde(rename = "sideBar.background")] + pub side_bar_background: Option, + #[serde(rename = "sideBarTitle.foreground")] + pub side_bar_title_foreground: Option, + #[serde(rename = "sideBarSectionHeader.background")] + pub side_bar_section_header_background: Option, + #[serde(rename = "sideBarSectionHeader.border")] + pub side_bar_section_header_border: Option, + #[serde(rename = "editorGroup.border")] + pub editor_group_border: Option, + #[serde(rename = "editorGroup.dropBackground")] + pub editor_group_drop_background: Option, + #[serde(rename = "editorGroupHeader.tabsBackground")] + pub editor_group_header_tabs_background: Option, + #[serde(rename = "tab.activeBackground")] + pub tab_active_background: Option, + #[serde(rename = "tab.activeForeground")] + pub tab_active_foreground: Option, + #[serde(rename = "tab.border")] + pub tab_border: Option, + #[serde(rename = "tab.activeBorderTop")] + pub tab_active_border_top: Option, + #[serde(rename = "tab.inactiveBackground")] + pub tab_inactive_background: Option, + #[serde(rename = "tab.inactiveForeground")] + pub tab_inactive_foreground: Option, + #[serde(rename = "editor.foreground")] + pub editor_foreground: Option, + #[serde(rename = "editor.background")] + pub editor_background: Option, + #[serde(rename = "editorLineNumber.foreground")] + pub editor_line_number_foreground: Option, + #[serde(rename = "editor.selectionBackground")] + pub editor_selection_background: Option, + #[serde(rename = "editor.selectionHighlightBackground")] + pub editor_selection_highlight_background: Option, + #[serde(rename = "editor.foldBackground")] + pub editor_fold_background: Option, + #[serde(rename = "editor.wordHighlightBackground")] + pub editor_word_highlight_background: Option, + #[serde(rename = "editor.wordHighlightStrongBackground")] + pub editor_word_highlight_strong_background: Option, + #[serde(rename = "editor.findMatchBackground")] + pub editor_find_match_background: Option, + #[serde(rename = "editor.findMatchHighlightBackground")] + pub editor_find_match_highlight_background: Option, + #[serde(rename = "editor.findRangeHighlightBackground")] + pub editor_find_range_highlight_background: Option, + #[serde(rename = "editor.hoverHighlightBackground")] + pub editor_hover_highlight_background: Option, + #[serde(rename = "editor.lineHighlightBorder")] + pub editor_line_highlight_border: Option, + #[serde(rename = "editorLink.activeForeground")] + pub editor_link_active_foreground: Option, + #[serde(rename = "editor.rangeHighlightBackground")] + pub editor_range_highlight_background: Option, + #[serde(rename = "editor.snippetTabstopHighlightBackground")] + pub editor_snippet_tabstop_highlight_background: Option, + #[serde(rename = "editor.snippetTabstopHighlightBorder")] + pub editor_snippet_tabstop_highlight_border: Option, + #[serde(rename = "editor.snippetFinalTabstopHighlightBackground")] + pub editor_snippet_final_tabstop_highlight_background: Option, + #[serde(rename = "editor.snippetFinalTabstopHighlightBorder")] + pub editor_snippet_final_tabstop_highlight_border: Option, + #[serde(rename = "editorWhitespace.foreground")] + pub editor_whitespace_foreground: Option, + #[serde(rename = "editorIndentGuide.background")] + pub editor_indent_guide_background: Option, + #[serde(rename = "editorIndentGuide.activeBackground")] + pub editor_indent_guide_active_background: Option, + #[serde(rename = "editorRuler.foreground")] + pub editor_ruler_foreground: Option, + #[serde(rename = "editorCodeLens.foreground")] + pub editor_code_lens_foreground: Option, + #[serde(rename = "editorBracketHighlight.foreground1")] + pub editor_bracket_highlight_foreground1: Option, + #[serde(rename = "editorBracketHighlight.foreground2")] + pub editor_bracket_highlight_foreground2: Option, + #[serde(rename = "editorBracketHighlight.foreground3")] + pub editor_bracket_highlight_foreground3: Option, + #[serde(rename = "editorBracketHighlight.foreground4")] + pub editor_bracket_highlight_foreground4: Option, + #[serde(rename = "editorBracketHighlight.foreground5")] + pub editor_bracket_highlight_foreground5: Option, + #[serde(rename = "editorBracketHighlight.foreground6")] + pub editor_bracket_highlight_foreground6: Option, + #[serde(rename = "editorBracketHighlight.unexpectedBracket.foreground")] + pub editor_bracket_highlight_unexpected_bracket_foreground: Option, + #[serde(rename = "editorOverviewRuler.border")] + pub editor_overview_ruler_border: Option, + #[serde(rename = "editorOverviewRuler.selectionHighlightForeground")] + pub editor_overview_ruler_selection_highlight_foreground: Option, + #[serde(rename = "editorOverviewRuler.wordHighlightForeground")] + pub editor_overview_ruler_word_highlight_foreground: Option, + #[serde(rename = "editorOverviewRuler.wordHighlightStrongForeground")] + pub editor_overview_ruler_word_highlight_strong_foreground: Option, + #[serde(rename = "editorOverviewRuler.modifiedForeground")] + pub editor_overview_ruler_modified_foreground: Option, + #[serde(rename = "editorOverviewRuler.addedForeground")] + pub editor_overview_ruler_added_foreground: Option, + #[serde(rename = "editorOverviewRuler.deletedForeground")] + pub editor_overview_ruler_deleted_foreground: Option, + #[serde(rename = "editorOverviewRuler.errorForeground")] + pub editor_overview_ruler_error_foreground: Option, + #[serde(rename = "editorOverviewRuler.warningForeground")] + pub editor_overview_ruler_warning_foreground: Option, + #[serde(rename = "editorOverviewRuler.infoForeground")] + pub editor_overview_ruler_info_foreground: Option, + #[serde(rename = "editorError.foreground")] + pub editor_error_foreground: Option, + #[serde(rename = "editorWarning.foreground")] + pub editor_warning_foreground: Option, + #[serde(rename = "editorGutter.modifiedBackground")] + pub editor_gutter_modified_background: Option, + #[serde(rename = "editorGutter.addedBackground")] + pub editor_gutter_added_background: Option, + #[serde(rename = "editorGutter.deletedBackground")] + pub editor_gutter_deleted_background: Option, + #[serde(rename = "gitDecoration.modifiedResourceForeground")] + pub git_decoration_modified_resource_foreground: Option, + #[serde(rename = "gitDecoration.deletedResourceForeground")] + pub git_decoration_deleted_resource_foreground: Option, + #[serde(rename = "gitDecoration.untrackedResourceForeground")] + pub git_decoration_untracked_resource_foreground: Option, + #[serde(rename = "gitDecoration.ignoredResourceForeground")] + pub git_decoration_ignored_resource_foreground: Option, + #[serde(rename = "gitDecoration.conflictingResourceForeground")] + pub git_decoration_conflicting_resource_foreground: Option, + #[serde(rename = "diffEditor.insertedTextBackground")] + pub diff_editor_inserted_text_background: Option, + #[serde(rename = "diffEditor.removedTextBackground")] + pub diff_editor_removed_text_background: Option, + #[serde(rename = "inlineChat.regionHighlight")] + pub inline_chat_region_highlight: Option, + #[serde(rename = "editorWidget.background")] + pub editor_widget_background: Option, + #[serde(rename = "editorSuggestWidget.background")] + pub editor_suggest_widget_background: Option, + #[serde(rename = "editorSuggestWidget.foreground")] + pub editor_suggest_widget_foreground: Option, + #[serde(rename = "editorSuggestWidget.selectedBackground")] + pub editor_suggest_widget_selected_background: Option, + #[serde(rename = "editorHoverWidget.background")] + pub editor_hover_widget_background: Option, + #[serde(rename = "editorHoverWidget.border")] + pub editor_hover_widget_border: Option, + #[serde(rename = "editorMarkerNavigation.background")] + pub editor_marker_navigation_background: Option, + #[serde(rename = "peekView.border")] + pub peek_view_border: Option, + #[serde(rename = "peekViewEditor.background")] + pub peek_view_editor_background: Option, + #[serde(rename = "peekViewEditor.matchHighlightBackground")] + pub peek_view_editor_match_highlight_background: Option, + #[serde(rename = "peekViewResult.background")] + pub peek_view_result_background: Option, + #[serde(rename = "peekViewResult.fileForeground")] + pub peek_view_result_file_foreground: Option, + #[serde(rename = "peekViewResult.lineForeground")] + pub peek_view_result_line_foreground: Option, + #[serde(rename = "peekViewResult.matchHighlightBackground")] + pub peek_view_result_match_highlight_background: Option, + #[serde(rename = "peekViewResult.selectionBackground")] + pub peek_view_result_selection_background: Option, + #[serde(rename = "peekViewResult.selectionForeground")] + pub peek_view_result_selection_foreground: Option, + #[serde(rename = "peekViewTitle.background")] + pub peek_view_title_background: Option, + #[serde(rename = "peekViewTitleDescription.foreground")] + pub peek_view_title_description_foreground: Option, + #[serde(rename = "peekViewTitleLabel.foreground")] + pub peek_view_title_label_foreground: Option, + #[serde(rename = "merge.currentHeaderBackground")] + pub merge_current_header_background: Option, + #[serde(rename = "merge.incomingHeaderBackground")] + pub merge_incoming_header_background: Option, + #[serde(rename = "editorOverviewRuler.currentContentForeground")] + pub editor_overview_ruler_current_content_foreground: Option, + #[serde(rename = "editorOverviewRuler.incomingContentForeground")] + pub editor_overview_ruler_incoming_content_foreground: Option, + #[serde(rename = "panel.background")] + pub panel_background: Option, + #[serde(rename = "panel.border")] + pub panel_border: Option, + #[serde(rename = "panelTitle.activeBorder")] + pub panel_title_active_border: Option, + #[serde(rename = "panelTitle.activeForeground")] + pub panel_title_active_foreground: Option, + #[serde(rename = "panelTitle.inactiveForeground")] + pub panel_title_inactive_foreground: Option, + #[serde(rename = "statusBar.background")] + pub status_bar_background: Option, + #[serde(rename = "statusBar.foreground")] + pub status_bar_foreground: Option, + #[serde(rename = "statusBar.debuggingBackground")] + pub status_bar_debugging_background: Option, + #[serde(rename = "statusBar.debuggingForeground")] + pub status_bar_debugging_foreground: Option, + #[serde(rename = "statusBar.noFolderBackground")] + pub status_bar_no_folder_background: Option, + #[serde(rename = "statusBar.noFolderForeground")] + pub status_bar_no_folder_foreground: Option, + #[serde(rename = "statusBarItem.prominentBackground")] + pub status_bar_item_prominent_background: Option, + #[serde(rename = "statusBarItem.prominentHoverBackground")] + pub status_bar_item_prominent_hover_background: Option, + #[serde(rename = "statusBarItem.remoteForeground")] + pub status_bar_item_remote_foreground: Option, + #[serde(rename = "statusBarItem.remoteBackground")] + pub status_bar_item_remote_background: Option, + #[serde(rename = "titleBar.activeBackground")] + pub title_bar_active_background: Option, + #[serde(rename = "titleBar.activeForeground")] + pub title_bar_active_foreground: Option, + #[serde(rename = "titleBar.inactiveBackground")] + pub title_bar_inactive_background: Option, + #[serde(rename = "titleBar.inactiveForeground")] + pub title_bar_inactive_foreground: Option, + #[serde(rename = "extensionButton.prominentForeground")] + pub extension_button_prominent_foreground: Option, + #[serde(rename = "extensionButton.prominentBackground")] + pub extension_button_prominent_background: Option, + #[serde(rename = "extensionButton.prominentHoverBackground")] + pub extension_button_prominent_hover_background: Option, + #[serde(rename = "pickerGroup.border")] + pub picker_group_border: Option, + #[serde(rename = "pickerGroup.foreground")] + pub picker_group_foreground: Option, + #[serde(rename = "debugToolBar.background")] + pub debug_tool_bar_background: Option, + #[serde(rename = "walkThrough.embeddedEditorBackground")] + pub walk_through_embedded_editor_background: Option, + #[serde(rename = "settings.headerForeground")] + pub settings_header_foreground: Option, + #[serde(rename = "settings.modifiedItemIndicator")] + pub settings_modified_item_indicator: Option, + #[serde(rename = "settings.dropdownBackground")] + pub settings_dropdown_background: Option, + #[serde(rename = "settings.dropdownForeground")] + pub settings_dropdown_foreground: Option, + #[serde(rename = "settings.dropdownBorder")] + pub settings_dropdown_border: Option, + #[serde(rename = "settings.checkboxBackground")] + pub settings_checkbox_background: Option, + #[serde(rename = "settings.checkboxForeground")] + pub settings_checkbox_foreground: Option, + #[serde(rename = "settings.checkboxBorder")] + pub settings_checkbox_border: Option, + #[serde(rename = "settings.textInputBackground")] + pub settings_text_input_background: Option, + #[serde(rename = "settings.textInputForeground")] + pub settings_text_input_foreground: Option, + #[serde(rename = "settings.textInputBorder")] + pub settings_text_input_border: Option, + #[serde(rename = "settings.numberInputBackground")] + pub settings_number_input_background: Option, + #[serde(rename = "settings.numberInputForeground")] + pub settings_number_input_foreground: Option, + #[serde(rename = "settings.numberInputBorder")] + pub settings_number_input_border: Option, + #[serde(rename = "breadcrumb.foreground")] + pub breadcrumb_foreground: Option, + #[serde(rename = "breadcrumb.background")] + pub breadcrumb_background: Option, + #[serde(rename = "breadcrumb.focusForeground")] + pub breadcrumb_focus_foreground: Option, + #[serde(rename = "breadcrumb.activeSelectionForeground")] + pub breadcrumb_active_selection_foreground: Option, + #[serde(rename = "breadcrumbPicker.background")] + pub breadcrumb_picker_background: Option, + #[serde(rename = "listFilterWidget.background")] + pub list_filter_widget_background: Option, + #[serde(rename = "listFilterWidget.outline")] + pub list_filter_widget_outline: Option, + #[serde(rename = "listFilterWidget.noMatchesOutline")] + pub list_filter_widget_no_matches_outline: Option, } fn try_parse_color(color: &str) -> Result { @@ -92,8 +443,17 @@ impl VsCodeThemeConverter { let vscode_colors = &self.theme.colors; let theme_colors_refinements = ThemeColorsRefinement { + border: Some(try_parse_color(&vscode_colors.panel_border)?), + border_variant: Some(try_parse_color(&vscode_colors.panel_border)?), + border_focused: Some(try_parse_color(&vscode_colors.panel_border)?), + border_transparent: Some(try_parse_color(&vscode_colors.panel_border)?), + elevated_surface_background: Some(try_parse_color(&vscode_colors.panel_background)?), + surface_background: Some(try_parse_color(&vscode_colors.panel_background)?), background: Some(try_parse_color(&vscode_colors.editor_background)?), - text: Some(try_parse_color(&vscode_colors.text)?), + element_background: Some(try_parse_color(&vscode_colors.button_background)?), + text: Some(try_parse_color(&vscode_colors.foreground)?), + tab_active_background: Some(try_parse_color(&vscode_colors.tab_active_background)?), + tab_inactive_background: Some(try_parse_color(&vscode_colors.tab_inactive_background)?), terminal_background: Some(try_parse_color(&vscode_colors.terminal_background)?), terminal_ansi_bright_black: Some(try_parse_color( &vscode_colors.terminal_ansi_bright_black, From e0382a61b96d8144e4e1d6ffc46e6beba23625a8 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 3 Nov 2023 10:16:34 -0400 Subject: [PATCH 016/110] Update color names in `workspace2` --- crates/workspace2/src/pane.rs | 6 +++--- crates/workspace2/src/status_bar.rs | 2 +- crates/workspace2/src/workspace2.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rs index 16dbfda36122d80ccf3e1f7cad0dbe16d10bcf43..80533c76d69aaf86679c74d88e5e40afdb14f271 100644 --- a/crates/workspace2/src/pane.rs +++ b/crates/workspace2/src/pane.rs @@ -1359,12 +1359,12 @@ impl Pane { let (tab_bg, tab_hover_bg, tab_active_bg) = match ix == self.active_item_index { false => ( - cx.theme().colors().tab_inactive, + cx.theme().colors().tab_inactive_background, cx.theme().colors().ghost_element_hover, cx.theme().colors().ghost_element_active, ), true => ( - cx.theme().colors().tab_active, + cx.theme().colors().tab_active_background, cx.theme().colors().element_hover, cx.theme().colors().element_active, ), @@ -1428,7 +1428,7 @@ impl Pane { .id("tab_bar") .w_full() .flex() - .bg(cx.theme().colors().tab_bar) + .bg(cx.theme().colors().tab_bar_background) // Left Side .child( div() diff --git a/crates/workspace2/src/status_bar.rs b/crates/workspace2/src/status_bar.rs index ca4ebcdb1305bf72b6d04d1409d4c80358ecbab0..ac99be9f892c84c1226d5fbfec70e1a3afa79ea2 100644 --- a/crates/workspace2/src/status_bar.rs +++ b/crates/workspace2/src/status_bar.rs @@ -44,7 +44,7 @@ impl Render for StatusBar { .items_center() .justify_between() .w_full() - .bg(cx.theme().colors().status_bar) + .bg(cx.theme().colors().status_bar_background) .child(self.render_left_tools(cx)) .child(self.render_right_tools(cx)) } diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index bb9cb7e527e42d6943a9c89436a51489fea492fa..db35a6f388a290a021c217d7b25b401634d86cc8 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -2694,7 +2694,7 @@ impl Workspace { fn render_titlebar(&self, cx: &mut ViewContext) -> impl Component { div() - .bg(cx.theme().colors().title_bar) + .bg(cx.theme().colors().title_bar_background) .when( !matches!(cx.window_bounds(), WindowBounds::Fullscreen), |s| s.pl_20(), From 293fbe4c757abd6fbeca6803275f99a53af6acab Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 3 Nov 2023 10:54:12 -0400 Subject: [PATCH 017/110] Account for colors in VS Code theme being optional --- crates/theme_importer/src/main.rs | 1 + crates/theme_importer/src/util.rs | 11 ++ crates/theme_importer/src/vscode.rs | 157 ++++++++++++++++++++-------- 3 files changed, 125 insertions(+), 44 deletions(-) create mode 100644 crates/theme_importer/src/util.rs diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 0e187d631d57403732754f66aae65ec3977111ae..abed535be70a070c7c7a921d29ad32e26417de6c 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -1,4 +1,5 @@ mod theme_printer; +mod util; mod vscode; use std::fs::{self, File}; diff --git a/crates/theme_importer/src/util.rs b/crates/theme_importer/src/util.rs new file mode 100644 index 0000000000000000000000000000000000000000..a78d57ecde82e8d33865409c8a07d7cd40d10f92 --- /dev/null +++ b/crates/theme_importer/src/util.rs @@ -0,0 +1,11 @@ +use anyhow::Result; + +pub trait Traverse { + fn traverse(self, f: impl FnOnce(T) -> Result) -> Result>; +} + +impl Traverse for Option { + fn traverse(self, f: impl FnOnce(T) -> Result) -> Result> { + self.map_or(Ok(None), |value| f(value).map(Some)) + } +} diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index b1a6a0e44bc2e117645f77ff3f0cd67dbe21e80a..06c4653decdda15332ad8afb01b0c3ba0dc30491 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -6,6 +6,7 @@ use theme::{ ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant, }; +use crate::util::Traverse; use crate::ThemeMetadata; #[derive(Deserialize, Debug)] @@ -443,50 +444,118 @@ impl VsCodeThemeConverter { let vscode_colors = &self.theme.colors; let theme_colors_refinements = ThemeColorsRefinement { - border: Some(try_parse_color(&vscode_colors.panel_border)?), - border_variant: Some(try_parse_color(&vscode_colors.panel_border)?), - border_focused: Some(try_parse_color(&vscode_colors.panel_border)?), - border_transparent: Some(try_parse_color(&vscode_colors.panel_border)?), - elevated_surface_background: Some(try_parse_color(&vscode_colors.panel_background)?), - surface_background: Some(try_parse_color(&vscode_colors.panel_background)?), - background: Some(try_parse_color(&vscode_colors.editor_background)?), - element_background: Some(try_parse_color(&vscode_colors.button_background)?), - text: Some(try_parse_color(&vscode_colors.foreground)?), - tab_active_background: Some(try_parse_color(&vscode_colors.tab_active_background)?), - tab_inactive_background: Some(try_parse_color(&vscode_colors.tab_inactive_background)?), - terminal_background: Some(try_parse_color(&vscode_colors.terminal_background)?), - terminal_ansi_bright_black: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_black, - )?), - terminal_ansi_bright_red: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_red, - )?), - terminal_ansi_bright_green: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_green, - )?), - terminal_ansi_bright_yellow: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_yellow, - )?), - terminal_ansi_bright_blue: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_blue, - )?), - terminal_ansi_bright_magenta: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_magenta, - )?), - terminal_ansi_bright_cyan: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_cyan, - )?), - terminal_ansi_bright_white: Some(try_parse_color( - &vscode_colors.terminal_ansi_bright_white, - )?), - terminal_ansi_black: Some(try_parse_color(&vscode_colors.terminal_ansi_black)?), - terminal_ansi_red: Some(try_parse_color(&vscode_colors.terminal_ansi_red)?), - terminal_ansi_green: Some(try_parse_color(&vscode_colors.terminal_ansi_green)?), - terminal_ansi_yellow: Some(try_parse_color(&vscode_colors.terminal_ansi_yellow)?), - terminal_ansi_blue: Some(try_parse_color(&vscode_colors.terminal_ansi_blue)?), - terminal_ansi_magenta: Some(try_parse_color(&vscode_colors.terminal_ansi_magenta)?), - terminal_ansi_cyan: Some(try_parse_color(&vscode_colors.terminal_ansi_cyan)?), - terminal_ansi_white: Some(try_parse_color(&vscode_colors.terminal_ansi_white)?), + border: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, + border_variant: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, + border_focused: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, + border_transparent: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, + elevated_surface_background: vscode_colors + .panel_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + surface_background: vscode_colors + .panel_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + background: vscode_colors + .editor_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + element_background: vscode_colors + .button_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + text: vscode_colors + .foreground + .as_ref() + .traverse(|color| try_parse_color(&color))?, + tab_active_background: vscode_colors + .tab_active_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + tab_inactive_background: vscode_colors + .tab_inactive_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_background: vscode_colors + .terminal_background + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_black: vscode_colors + .terminal_ansi_bright_black + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_red: vscode_colors + .terminal_ansi_bright_red + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_green: vscode_colors + .terminal_ansi_bright_green + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_yellow: vscode_colors + .terminal_ansi_bright_yellow + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_blue: vscode_colors + .terminal_ansi_bright_blue + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_magenta: vscode_colors + .terminal_ansi_bright_magenta + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_cyan: vscode_colors + .terminal_ansi_bright_cyan + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_bright_white: vscode_colors + .terminal_ansi_bright_white + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_black: vscode_colors + .terminal_ansi_black + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_red: vscode_colors + .terminal_ansi_red + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_green: vscode_colors + .terminal_ansi_green + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_yellow: vscode_colors + .terminal_ansi_yellow + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_blue: vscode_colors + .terminal_ansi_blue + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_magenta: vscode_colors + .terminal_ansi_magenta + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_cyan: vscode_colors + .terminal_ansi_cyan + .as_ref() + .traverse(|color| try_parse_color(&color))?, + terminal_ansi_white: vscode_colors + .terminal_ansi_white + .as_ref() + .traverse(|color| try_parse_color(&color))?, ..Default::default() }; From acc36e6dab8ea754cb0a46267b48fc54c9f132dd Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 3 Nov 2023 10:58:06 -0400 Subject: [PATCH 018/110] Update emitted module import --- crates/theme_importer/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index abed535be70a070c7c7a921d29ad32e26417de6c..882ab85c335eb8dd54cbd07a2ef51c19cd327d16 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -119,7 +119,7 @@ fn main() -> Result<()> { let theme_module = format!( r#" - use gpui2::rgba; + use gpui::rgba; use crate::{{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, From 363d7c6634e0f1274077a274dffa088efdd59f6b Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 3 Nov 2023 11:11:10 -0400 Subject: [PATCH 019/110] Exclude source themes from Zed2 binary --- crates/zed2/src/assets.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/zed2/src/assets.rs b/crates/zed2/src/assets.rs index 873138c2447762f55243b29514e9d9f1064d79f4..5d5e81a60e4feaff4c04bf3a0f3aff9a87659686 100644 --- a/crates/zed2/src/assets.rs +++ b/crates/zed2/src/assets.rs @@ -8,6 +8,7 @@ use rust_embed::RustEmbed; #[include = "fonts/**/*"] #[include = "icons/**/*"] #[include = "themes/**/*"] +#[exclude = "themes/src/*"] #[include = "sounds/**/*"] #[include = "*.md"] #[exclude = "*.DS_Store"] From 2a672e21268e2804d8c8e01b8fdec3b6bf15b990 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 3 Nov 2023 18:55:20 +0100 Subject: [PATCH 020/110] WIP --- crates/editor2/src/editor.rs | 90 ++-- crates/editor2/src/element.rs | 983 +++++++++++++++++++++++----------- crates/theme2/src/colors.rs | 18 + crates/theme2/src/theme2.rs | 6 + 4 files changed, 732 insertions(+), 365 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 52628f61b58c9ee4411321266c6789b02b98a465..df38b9b46ba604ceeef707aed91c00e782d8ff69 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -72,7 +72,7 @@ use smallvec::SmallVec; use std::{ any::TypeId, borrow::Cow, - cmp::{self, Reverse}, + cmp::{self, Ordering, Reverse}, ops::{ControlFlow, Deref, DerefMut, Range}, path::Path, sync::Arc, @@ -81,7 +81,7 @@ use std::{ pub use sum_tree::Bias; use sum_tree::TreeMap; use text::Rope; -use theme::ThemeColors; +use theme::{ActiveTheme, PlayerColor, ThemeColors}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -597,6 +597,7 @@ pub enum SoftWrap { #[derive(Clone)] pub struct EditorStyle { + pub local_player: PlayerColor, pub text: TextStyle, pub line_height_scalar: f32, // pub placeholder_text: Option, @@ -8445,13 +8446,13 @@ impl Editor { // } // } - // pub fn highlight_rows(&mut self, rows: Option>) { - // self.highlighted_rows = rows; - // } + pub fn highlight_rows(&mut self, rows: Option>) { + self.highlighted_rows = rows; + } - // pub fn highlighted_rows(&self) -> Option> { - // self.highlighted_rows.clone() - // } + pub fn highlighted_rows(&self) -> Option> { + self.highlighted_rows.clone() + } pub fn highlight_background( &mut self, @@ -8540,43 +8541,43 @@ impl Editor { // }) // } - // pub fn background_highlights_in_range( - // &self, - // search_range: Range, - // display_snapshot: &DisplaySnapshot, - // theme: &Theme, - // ) -> Vec<(Range, Color)> { - // let mut results = Vec::new(); - // for (color_fetcher, ranges) in self.background_highlights.values() { - // let color = color_fetcher(theme); - // let start_ix = match ranges.binary_search_by(|probe| { - // let cmp = probe - // .end - // .cmp(&search_range.start, &display_snapshot.buffer_snapshot); - // if cmp.is_gt() { - // Ordering::Greater - // } else { - // Ordering::Less - // } - // }) { - // Ok(i) | Err(i) => i, - // }; - // for range in &ranges[start_ix..] { - // if range - // .start - // .cmp(&search_range.end, &display_snapshot.buffer_snapshot) - // .is_ge() - // { - // break; - // } + pub fn background_highlights_in_range( + &self, + search_range: Range, + display_snapshot: &DisplaySnapshot, + theme: &ThemeColors, + ) -> Vec<(Range, Hsla)> { + let mut results = Vec::new(); + for (color_fetcher, ranges) in self.background_highlights.values() { + let color = color_fetcher(theme); + let start_ix = match ranges.binary_search_by(|probe| { + let cmp = probe + .end + .cmp(&search_range.start, &display_snapshot.buffer_snapshot); + if cmp.is_gt() { + Ordering::Greater + } else { + Ordering::Less + } + }) { + Ok(i) | Err(i) => i, + }; + for range in &ranges[start_ix..] { + if range + .start + .cmp(&search_range.end, &display_snapshot.buffer_snapshot) + .is_ge() + { + break; + } - // let start = range.start.to_display_point(&display_snapshot); - // let end = range.end.to_display_point(&display_snapshot); - // results.push((start..end, color)) - // } - // } - // results - // } + let start = range.start.to_display_point(&display_snapshot); + let end = range.end.to_display_point(&display_snapshot); + results.push((start..end, color)) + } + } + results + } // pub fn background_highlight_row_ranges( // &self, @@ -9326,6 +9327,7 @@ impl Render for Editor { fn render(&mut self, cx: &mut ViewContext) -> Self::Element { EditorElement::new(EditorStyle { + local_player: cx.theme().players().local(), text: cx.text_style(), line_height_scalar: 1., theme_id: 0, diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 6420d1e6cd6482ac99e79f3de0dfbd3c2963359c..fefd72dda127f1f60cecaf0da517c2ef3c984515 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1,20 +1,22 @@ -use super::{ - display_map::ToDisplayPoint, DisplayPoint, Editor, EditorSnapshot, ToPoint, MAX_LINE_LEN, -}; use crate::{ - display_map::{BlockStyle, DisplaySnapshot}, - EditorMode, EditorStyle, SoftWrap, + display_map::{BlockStyle, DisplaySnapshot, FoldStatus, ToDisplayPoint}, + editor_settings::ShowScrollbar, + CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, + Point, Selection, SoftWrap, ToPoint, MAX_LINE_LEN, }; use anyhow::Result; +use collections::{BTreeMap, HashMap}; use gpui::{ black, point, px, relative, size, AnyElement, Bounds, Element, Hsla, Line, Pixels, Size, Style, TextRun, TextSystem, ViewContext, }; -use language::{CursorShape, Selection}; +use multi_buffer::Anchor; +use settings::Settings; use smallvec::SmallVec; use std::{cmp, ops::Range, sync::Arc}; use sum_tree::Bias; -use theme::ActiveTheme; +use theme::{ActiveTheme, PlayerColor}; +use workspace::item::Item; enum FoldMarkers {} @@ -1371,131 +1373,133 @@ impl EditorElement { // .collect() // } - // fn calculate_relative_line_numbers( - // &self, - // snapshot: &EditorSnapshot, - // rows: &Range, - // relative_to: Option, - // ) -> HashMap { - // let mut relative_rows: HashMap = Default::default(); - // let Some(relative_to) = relative_to else { - // return relative_rows; - // }; + fn calculate_relative_line_numbers( + &self, + snapshot: &EditorSnapshot, + rows: &Range, + relative_to: Option, + ) -> HashMap { + let mut relative_rows: HashMap = Default::default(); + let Some(relative_to) = relative_to else { + return relative_rows; + }; - // let start = rows.start.min(relative_to); - // let end = rows.end.max(relative_to); - - // let buffer_rows = snapshot - // .buffer_rows(start) - // .take(1 + (end - start) as usize) - // .collect::>(); - - // let head_idx = relative_to - start; - // let mut delta = 1; - // let mut i = head_idx + 1; - // while i < buffer_rows.len() as u32 { - // if buffer_rows[i as usize].is_some() { - // if rows.contains(&(i + start)) { - // relative_rows.insert(i + start, delta); - // } - // delta += 1; - // } - // i += 1; - // } - // delta = 1; - // i = head_idx.min(buffer_rows.len() as u32 - 1); - // while i > 0 && buffer_rows[i as usize].is_none() { - // i -= 1; - // } + let start = rows.start.min(relative_to); + let end = rows.end.max(relative_to); + + let buffer_rows = snapshot + .buffer_rows(start) + .take(1 + (end - start) as usize) + .collect::>(); + + let head_idx = relative_to - start; + let mut delta = 1; + let mut i = head_idx + 1; + while i < buffer_rows.len() as u32 { + if buffer_rows[i as usize].is_some() { + if rows.contains(&(i + start)) { + relative_rows.insert(i + start, delta); + } + delta += 1; + } + i += 1; + } + delta = 1; + i = head_idx.min(buffer_rows.len() as u32 - 1); + while i > 0 && buffer_rows[i as usize].is_none() { + i -= 1; + } - // while i > 0 { - // i -= 1; - // if buffer_rows[i as usize].is_some() { - // if rows.contains(&(i + start)) { - // relative_rows.insert(i + start, delta); - // } - // delta += 1; - // } - // } + while i > 0 { + i -= 1; + if buffer_rows[i as usize].is_some() { + if rows.contains(&(i + start)) { + relative_rows.insert(i + start, delta); + } + delta += 1; + } + } - // relative_rows - // } + relative_rows + } - // fn layout_line_numbers( - // &self, - // rows: Range, - // active_rows: &BTreeMap, - // newest_selection_head: DisplayPoint, - // is_singleton: bool, - // snapshot: &EditorSnapshot, - // cx: &ViewContext, - // ) -> ( - // Vec>, - // Vec>, - // ) { - // let style = &self.style; - // let include_line_numbers = snapshot.mode == EditorMode::Full; - // let mut line_number_layouts = Vec::with_capacity(rows.len()); - // let mut fold_statuses = Vec::with_capacity(rows.len()); - // let mut line_number = String::new(); - // let is_relative = settings::get::(cx).relative_line_numbers; - // let relative_to = if is_relative { - // Some(newest_selection_head.row()) - // } else { - // None - // }; + fn layout_line_numbers( + &self, + rows: Range, + active_rows: &BTreeMap, + newest_selection_head: DisplayPoint, + is_singleton: bool, + snapshot: &EditorSnapshot, + cx: &ViewContext, + ) -> ( + Vec>, + Vec>, + ) { + let include_line_numbers = snapshot.mode == EditorMode::Full; + let mut line_number_layouts = Vec::with_capacity(rows.len()); + let mut fold_statuses = Vec::with_capacity(rows.len()); + let mut line_number = String::new(); + let is_relative = EditorSettings::get_global(cx).relative_line_numbers; + let relative_to = if is_relative { + Some(newest_selection_head.row()) + } else { + None + }; - // let relative_rows = self.calculate_relative_line_numbers(&snapshot, &rows, relative_to); + let relative_rows = self.calculate_relative_line_numbers(&snapshot, &rows, relative_to); - // for (ix, row) in snapshot - // .buffer_rows(rows.start) - // .take((rows.end - rows.start) as usize) - // .enumerate() - // { - // let display_row = rows.start + ix as u32; - // let (active, color) = if active_rows.contains_key(&display_row) { - // (true, style.line_number_active) - // } else { - // (false, style.line_number) - // }; - // if let Some(buffer_row) = row { - // if include_line_numbers { - // line_number.clear(); - // let default_number = buffer_row + 1; - // let number = relative_rows - // .get(&(ix as u32 + rows.start)) - // .unwrap_or(&default_number); - // write!(&mut line_number, "{}", number).unwrap(); - // line_number_layouts.push(Some(cx.text_layout_cache().layout_str( - // &line_number, - // style.text.font_size, - // &[( - // line_number.len(), - // RunStyle { - // font_id: style.text.font_id, - // color, - // underline: Default::default(), - // }, - // )], - // ))); - // fold_statuses.push( - // is_singleton - // .then(|| { - // snapshot - // .fold_for_line(buffer_row) - // .map(|fold_status| (fold_status, buffer_row, active)) - // }) - // .flatten(), - // ) - // } - // } else { - // fold_statuses.push(None); - // line_number_layouts.push(None); - // } - // } + for (ix, row) in snapshot + .buffer_rows(rows.start) + .take((rows.end - rows.start) as usize) + .enumerate() + { + let display_row = rows.start + ix as u32; + let (active, color) = if active_rows.contains_key(&display_row) { + (true, cx.theme().colors().editor_active_line_number) + } else { + (false, cx.theme().colors().editor_line_number) + }; + if let Some(buffer_row) = row { + if include_line_numbers { + line_number.clear(); + let default_number = buffer_row + 1; + let number = relative_rows + .get(&(ix as u32 + rows.start)) + .unwrap_or(&default_number); + write!(&mut line_number, "{}", number).unwrap(); + let layout = cx + .text_system() + .layout_text( + &line_number, + self.style.text.font_size, + &[TextRun { + len: line_number.len(), + font: self.style.text.font(), + color, + underline: None, + }], + None, + ) + .unwrap(); + line_number_layouts.push(Some(layout)); + fold_statuses.push( + is_singleton + .then(|| { + snapshot + .fold_for_line(buffer_row) + .map(|fold_status| (fold_status, buffer_row, active)) + }) + .flatten(), + ) + } + } else { + fold_statuses.push(None); + line_number_layouts.push(None); + } + } - // (line_number_layouts, fold_statuses) - // } + (line_number_layouts, fold_statuses) + } // fn layout_lines( // &mut self, @@ -1788,194 +1792,192 @@ pub struct LineWithInvisibles { invisibles: Vec, } -// impl LineWithInvisibles { -// fn from_chunks<'a>( -// chunks: impl Iterator>, -// text_style: &TextStyle, -// text_layout_cache: &TextLayoutCache, -// font_cache: &Arc, -// max_line_len: usize, -// max_line_count: usize, -// line_number_layouts: &[Option], -// editor_mode: EditorMode, -// ) -> Vec { -// let mut layouts = Vec::with_capacity(max_line_count); -// let mut line = String::new(); -// let mut invisibles = Vec::new(); -// let mut styles = Vec::new(); -// let mut non_whitespace_added = false; -// let mut row = 0; -// let mut line_exceeded_max_len = false; -// for highlighted_chunk in chunks.chain([HighlightedChunk { -// chunk: "\n", -// style: None, -// is_tab: false, -// }]) { -// for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { -// if ix > 0 { -// layouts.push(Self { -// line: text_layout_cache.layout_str(&line, text_style.font_size, &styles), -// invisibles: invisibles.drain(..).collect(), -// }); - -// line.clear(); -// styles.clear(); -// row += 1; -// line_exceeded_max_len = false; -// non_whitespace_added = false; -// if row == max_line_count { -// return layouts; -// } -// } - -// if !line_chunk.is_empty() && !line_exceeded_max_len { -// let text_style = if let Some(style) = highlighted_chunk.style { -// text_style -// .clone() -// .highlight(style, font_cache) -// .map(Cow::Owned) -// .unwrap_or_else(|_| Cow::Borrowed(text_style)) -// } else { -// Cow::Borrowed(text_style) -// }; - -// if line.len() + line_chunk.len() > max_line_len { -// let mut chunk_len = max_line_len - line.len(); -// while !line_chunk.is_char_boundary(chunk_len) { -// chunk_len -= 1; -// } -// line_chunk = &line_chunk[..chunk_len]; -// line_exceeded_max_len = true; -// } - -// styles.push(( -// line_chunk.len(), -// RunStyle { -// font_id: text_style.font_id, -// color: text_style.color, -// underline: text_style.underline, -// }, -// )); - -// if editor_mode == EditorMode::Full { -// // Line wrap pads its contents with fake whitespaces, -// // avoid printing them -// let inside_wrapped_string = line_number_layouts -// .get(row) -// .and_then(|layout| layout.as_ref()) -// .is_none(); -// if highlighted_chunk.is_tab { -// if non_whitespace_added || !inside_wrapped_string { -// invisibles.push(Invisible::Tab { -// line_start_offset: line.len(), -// }); -// } -// } else { -// invisibles.extend( -// line_chunk -// .chars() -// .enumerate() -// .filter(|(_, line_char)| { -// let is_whitespace = line_char.is_whitespace(); -// non_whitespace_added |= !is_whitespace; -// is_whitespace -// && (non_whitespace_added || !inside_wrapped_string) -// }) -// .map(|(whitespace_index, _)| Invisible::Whitespace { -// line_offset: line.len() + whitespace_index, -// }), -// ) -// } -// } - -// line.push_str(line_chunk); -// } -// } -// } - -// layouts -// } - -// fn draw( -// &self, -// layout: &LayoutState, -// row: u32, -// scroll_top: f32, -// content_origin: gpui::Point, -// scroll_left: f32, -// visible_text_bounds: Bounds, -// whitespace_setting: ShowWhitespaceSetting, -// selection_ranges: &[Range], -// visible_bounds: Bounds, -// cx: &mut ViewContext, -// ) { -// let line_height = layout.position_map.line_height; -// let line_y = row as f32 * line_height - scroll_top; - -// self.line.paint( -// content_origin + vec2f(-scroll_left, line_y), -// visible_text_bounds, -// line_height, -// cx, -// ); +impl LineWithInvisibles { + fn from_chunks<'a>( + chunks: impl Iterator>, + text_style: &TextStyle, + text_layout_cache: &TextLayoutCache, + font_cache: &Arc, + max_line_len: usize, + max_line_count: usize, + line_number_layouts: &[Option], + editor_mode: EditorMode, + ) -> Vec { + let mut layouts = Vec::with_capacity(max_line_count); + let mut line = String::new(); + let mut invisibles = Vec::new(); + let mut styles = Vec::new(); + let mut non_whitespace_added = false; + let mut row = 0; + let mut line_exceeded_max_len = false; + for highlighted_chunk in chunks.chain([HighlightedChunk { + chunk: "\n", + style: None, + is_tab: false, + }]) { + for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { + if ix > 0 { + layouts.push(Self { + line: text_layout_cache.layout_str(&line, text_style.font_size, &styles), + invisibles: invisibles.drain(..).collect(), + }); + + line.clear(); + styles.clear(); + row += 1; + line_exceeded_max_len = false; + non_whitespace_added = false; + if row == max_line_count { + return layouts; + } + } + + if !line_chunk.is_empty() && !line_exceeded_max_len { + let text_style = if let Some(style) = highlighted_chunk.style { + text_style + .clone() + .highlight(style, font_cache) + .map(Cow::Owned) + .unwrap_or_else(|_| Cow::Borrowed(text_style)) + } else { + Cow::Borrowed(text_style) + }; + + if line.len() + line_chunk.len() > max_line_len { + let mut chunk_len = max_line_len - line.len(); + while !line_chunk.is_char_boundary(chunk_len) { + chunk_len -= 1; + } + line_chunk = &line_chunk[..chunk_len]; + line_exceeded_max_len = true; + } + + styles.push(( + line_chunk.len(), + RunStyle { + font_id: text_style.font_id, + color: text_style.color, + underline: text_style.underline, + }, + )); + + if editor_mode == EditorMode::Full { + // Line wrap pads its contents with fake whitespaces, + // avoid printing them + let inside_wrapped_string = line_number_layouts + .get(row) + .and_then(|layout| layout.as_ref()) + .is_none(); + if highlighted_chunk.is_tab { + if non_whitespace_added || !inside_wrapped_string { + invisibles.push(Invisible::Tab { + line_start_offset: line.len(), + }); + } + } else { + invisibles.extend( + line_chunk + .chars() + .enumerate() + .filter(|(_, line_char)| { + let is_whitespace = line_char.is_whitespace(); + non_whitespace_added |= !is_whitespace; + is_whitespace + && (non_whitespace_added || !inside_wrapped_string) + }) + .map(|(whitespace_index, _)| Invisible::Whitespace { + line_offset: line.len() + whitespace_index, + }), + ) + } + } + + line.push_str(line_chunk); + } + } + } -// self.draw_invisibles( -// &selection_ranges, -// layout, -// content_origin, -// scroll_left, -// line_y, -// row, -// visible_bounds, -// line_height, -// whitespace_setting, -// cx, -// ); -// } + layouts + } -// fn draw_invisibles( -// &self, -// selection_ranges: &[Range], -// layout: &LayoutState, -// content_origin: gpui::Point, -// scroll_left: f32, -// line_y: f32, -// row: u32, -// visible_bounds: Bounds, -// line_height: f32, -// whitespace_setting: ShowWhitespaceSetting, -// cx: &mut ViewContext, -// ) { -// let allowed_invisibles_regions = match whitespace_setting { -// ShowWhitespaceSetting::None => return, -// ShowWhitespaceSetting::Selection => Some(selection_ranges), -// ShowWhitespaceSetting::All => None, -// }; + fn draw( + &self, + layout: &LayoutState, + row: u32, + scroll_top: Pixels, + content_origin: gpui::Point, + scroll_left: Pixels, + visible_text_bounds: Bounds, + whitespace_setting: ShowWhitespaceSetting, + selection_ranges: &[Range], + cx: &mut ViewContext, + ) { + let line_height = layout.position_map.line_height; + let line_y = row as f32 * line_height - scroll_top; + + self.line.paint( + content_origin + vec2f(-scroll_left, line_y), + line_height, + cx, + ); + + self.draw_invisibles( + &selection_ranges, + layout, + content_origin, + scroll_left, + line_y, + row, + visible_bounds, + line_height, + whitespace_setting, + cx, + ); + } -// for invisible in &self.invisibles { -// let (&token_offset, invisible_symbol) = match invisible { -// Invisible::Tab { line_start_offset } => (line_start_offset, &layout.tab_invisible), -// Invisible::Whitespace { line_offset } => (line_offset, &layout.space_invisible), -// }; + fn draw_invisibles( + &self, + selection_ranges: &[Range], + layout: &LayoutState, + content_origin: gpui::Point, + scroll_left: f32, + line_y: f32, + row: u32, + visible_bounds: Bounds, + line_height: f32, + whitespace_setting: ShowWhitespaceSetting, + cx: &mut ViewContext, + ) { + let allowed_invisibles_regions = match whitespace_setting { + ShowWhitespaceSetting::None => return, + ShowWhitespaceSetting::Selection => Some(selection_ranges), + ShowWhitespaceSetting::All => None, + }; -// let x_offset = self.line.x_for_index(token_offset); -// let invisible_offset = -// (layout.position_map.em_width - invisible_symbol.width()).max(0.0) / 2.0; -// let origin = content_origin + vec2f(-scroll_left + x_offset + invisible_offset, line_y); + for invisible in &self.invisibles { + let (&token_offset, invisible_symbol) = match invisible { + Invisible::Tab { line_start_offset } => (line_start_offset, &layout.tab_invisible), + Invisible::Whitespace { line_offset } => (line_offset, &layout.space_invisible), + }; -// if let Some(allowed_regions) = allowed_invisibles_regions { -// let invisible_point = DisplayPoint::new(row, token_offset as u32); -// if !allowed_regions -// .iter() -// .any(|region| region.start <= invisible_point && invisible_point < region.end) -// { -// continue; -// } -// } -// invisible_symbol.paint(origin, visible_bounds, line_height, cx); -// } -// } -// } + let x_offset = self.line.x_for_index(token_offset); + let invisible_offset = + (layout.position_map.em_width - invisible_symbol.width()).max(0.0) / 2.0; + let origin = content_origin + vec2f(-scroll_left + x_offset + invisible_offset, line_y); + + if let Some(allowed_regions) = allowed_invisibles_regions { + let invisible_point = DisplayPoint::new(row, token_offset as u32); + if !allowed_regions + .iter() + .any(|region| region.start <= invisible_point && invisible_point < region.end) + { + continue; + } + } + invisible_symbol.paint(origin, visible_bounds, line_height, cx); + } + } +} #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum Invisible { @@ -2119,21 +2121,360 @@ impl Element for EditorElement { // Add 1 to ensure selections bleed off screen let end_row = 1 + cmp::min((scroll_position.y + height_in_lines).ceil() as u32, max_row); - dbg!(start_row..end_row); - // let text_style = cx.text_style(); - // let layout_text = cx.text_system().layout_text( - // "hello world", - // text_style.font_size * cx.rem_size(), - // &[text_style.to_run("hello world".len())], - // None, + let start_anchor = if start_row == 0 { + Anchor::min() + } else { + snapshot + .buffer_snapshot + .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) + }; + let end_anchor = if end_row > max_row { + Anchor::max() + } else { + snapshot + .buffer_snapshot + .anchor_before(DisplayPoint::new(end_row, 0).to_offset(&snapshot, Bias::Right)) + }; + + let mut selections: Vec<(PlayerColor, Vec)> = Vec::new(); + let mut active_rows = BTreeMap::new(); + let mut fold_ranges = Vec::new(); + let is_singleton = editor.is_singleton(cx); + + let highlighted_rows = editor.highlighted_rows(); + let highlighted_ranges = editor.background_highlights_in_range( + start_anchor..end_anchor, + &snapshot.display_snapshot, + cx.theme().colors(), + ); + + fold_ranges.extend( + snapshot + .folds_in_range(start_anchor..end_anchor) + .map(|anchor| { + let start = anchor.start.to_point(&snapshot.buffer_snapshot); + ( + start.row, + start.to_display_point(&snapshot.display_snapshot) + ..anchor.end.to_display_point(&snapshot), + ) + }), + ); + + let mut newest_selection_head = None; + + if editor.show_local_selections { + let mut local_selections: Vec> = editor + .selections + .disjoint_in_range(start_anchor..end_anchor, cx); + local_selections.extend(editor.selections.pending(cx)); + let mut layouts = Vec::new(); + let newest = editor.selections.newest(cx); + for selection in local_selections.drain(..) { + let is_empty = selection.start == selection.end; + let is_newest = selection == newest; + + let layout = SelectionLayout::new( + selection, + editor.selections.line_mode, + editor.cursor_shape, + &snapshot.display_snapshot, + is_newest, + true, + ); + if is_newest { + newest_selection_head = Some(layout.head); + } + + for row in cmp::max(layout.active_rows.start, start_row) + ..=cmp::min(layout.active_rows.end, end_row) + { + let contains_non_empty_selection = active_rows.entry(row).or_insert(!is_empty); + *contains_non_empty_selection |= !is_empty; + } + layouts.push(layout); + } + + selections.push((style.local_player, layouts)); + } + + if let Some(collaboration_hub) = &editor.collaboration_hub { + // When following someone, render the local selections in their color. + if let Some(leader_id) = editor.leader_peer_id { + if let Some(collaborator) = collaboration_hub.collaborators(cx).get(&leader_id) { + if let Some(participant_index) = collaboration_hub + .user_participant_indices(cx) + .get(&collaborator.user_id) + { + if let Some((local_selection_style, _)) = selections.first_mut() { + *local_selection_style = cx + .theme() + .players() + .color_for_participant(participant_index.0); + } + } + } + } + + let mut remote_selections = HashMap::default(); + for selection in snapshot.remote_selections_in_range( + &(start_anchor..end_anchor), + collaboration_hub.as_ref(), + cx, + ) { + let selection_style = if let Some(participant_index) = selection.participant_index { + cx.theme() + .players() + .color_for_participant(participant_index.0) + } else { + cx.theme().players().absent() + }; + + // Don't re-render the leader's selections, since the local selections + // match theirs. + if Some(selection.peer_id) == editor.leader_peer_id { + continue; + } + + remote_selections + .entry(selection.replica_id) + .or_insert((selection_style, Vec::new())) + .1 + .push(SelectionLayout::new( + selection.selection, + selection.line_mode, + selection.cursor_shape, + &snapshot.display_snapshot, + false, + false, + )); + } + + selections.extend(remote_selections.into_values()); + } + + let scrollbar_settings = EditorSettings::get_global(cx).scrollbar; + let show_scrollbars = match scrollbar_settings.show { + ShowScrollbar::Auto => { + // Git + (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) + || + // Selections + (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) + // Scrollmanager + || editor.scroll_manager.scrollbars_visible() + } + ShowScrollbar::System => editor.scroll_manager.scrollbars_visible(), + ShowScrollbar::Always => true, + ShowScrollbar::Never => false, + }; + + let fold_ranges: Vec<(BufferRow, Range, Hsla)> = fold_ranges + .into_iter() + .map(|(id, fold)| { + todo!("folds!") + // let color = self + // .style + // .folds + // .ellipses + // .background + // .style_for(&mut cx.mouse_state::(id as usize)) + // .color; + + // (id, fold, color) + }) + .collect(); + + let head_for_relative = newest_selection_head.unwrap_or_else(|| { + let newest = editor.selections.newest::(cx); + SelectionLayout::new( + newest, + editor.selections.line_mode, + editor.cursor_shape, + &snapshot.display_snapshot, + true, + true, + ) + .head + }); + + let (line_number_layouts, fold_statuses) = self.layout_line_numbers( + start_row..end_row, + &active_rows, + head_for_relative, + is_singleton, + &snapshot, + cx, + ); + + let display_hunks = self.layout_git_gutters(start_row..end_row, &snapshot); + + let scrollbar_row_range = scroll_position.y()..(scroll_position.y() + height_in_lines); + + let mut max_visible_line_width = 0.0; + let line_layouts = + self.layout_lines(start_row..end_row, &line_number_layouts, &snapshot, cx); + for line_with_invisibles in &line_layouts { + if line_with_invisibles.line.width() > max_visible_line_width { + max_visible_line_width = line_with_invisibles.line.width(); + } + } + + // let style = self.style.clone(); + // let longest_line_width = layout_line( + // snapshot.longest_row(), + // &snapshot, + // &style, + // cx.text_layout_cache(), + // ) + // .width(); + // let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.x(); + // let em_width = style.text.em_width(cx.font_cache()); + // let (scroll_width, blocks) = self.layout_blocks( + // start_row..end_row, + // &snapshot, + // size.x(), + // scroll_width, + // gutter_padding, + // gutter_width, + // em_width, + // gutter_width + gutter_margin, + // line_height, + // &style, + // &line_layouts, + // editor, + // cx, + // ); + + // let scroll_max = vec2f( + // ((scroll_width - text_size.x()) / em_width).max(0.0), + // max_row as f32, + // ); + + // let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x()); + + // let autoscrolled = if autoscroll_horizontally { + // editor.autoscroll_horizontally( + // start_row, + // text_size.x(), + // scroll_width, + // em_width, + // &line_layouts, + // cx, + // ) + // } else { + // false + // }; + + // if clamped || autoscrolled { + // snapshot = editor.snapshot(cx); + // } + + // let style = editor.style(cx); + + // let mut context_menu = None; + // let mut code_actions_indicator = None; + // if let Some(newest_selection_head) = newest_selection_head { + // if (start_row..end_row).contains(&newest_selection_head.row()) { + // if editor.context_menu_visible() { + // context_menu = + // editor.render_context_menu(newest_selection_head, style.clone(), cx); + // } + + // let active = matches!( + // editor.context_menu.read().as_ref(), + // Some(crate::ContextMenu::CodeActions(_)) + // ); + + // code_actions_indicator = editor + // .render_code_actions_indicator(&style, active, cx) + // .map(|indicator| (newest_selection_head.row(), indicator)); + // } + // } + + // let visible_rows = start_row..start_row + line_layouts.len() as u32; + // let mut hover = editor.hover_state.render( + // &snapshot, + // &style, + // visible_rows, + // editor.workspace.as_ref().map(|(w, _)| w.clone()), + // cx, // ); - // let line_height = text_style - // .line_height - // .to_pixels(text_style.font_size.into(), cx.rem_size()); + // let mode = editor.mode; + + // let mut fold_indicators = editor.render_fold_indicators( + // fold_statuses, + // &style, + // editor.gutter_hovered, + // line_height, + // gutter_margin, + // cx, + // ); + + // if let Some((_, context_menu)) = context_menu.as_mut() { + // context_menu.layout( + // SizeConstraint { + // min: gpui::Point::zero(), + // max: vec2f( + // cx.window_size().x() * 0.7, + // (12. * line_height).min((size.y() - line_height) / 2.), + // ), + // }, + // editor, + // cx, + // ); + // } + + // if let Some((_, indicator)) = code_actions_indicator.as_mut() { + // indicator.layout( + // SizeConstraint::strict_along( + // Axis::Vertical, + // line_height * style.code_actions.vertical_scale, + // ), + // editor, + // cx, + // ); + // } + + // for fold_indicator in fold_indicators.iter_mut() { + // if let Some(indicator) = fold_indicator.as_mut() { + // indicator.layout( + // SizeConstraint::strict_along( + // Axis::Vertical, + // line_height * style.code_actions.vertical_scale, + // ), + // editor, + // cx, + // ); + // } + // } + + // if let Some((_, hover_popovers)) = hover.as_mut() { + // for hover_popover in hover_popovers.iter_mut() { + // hover_popover.layout( + // SizeConstraint { + // min: gpui::Point::zero(), + // max: vec2f( + // (120. * em_width) // Default size + // .min(size.x() / 2.) // Shrink to half of the editor width + // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters + // (16. * line_height) // Default size + // .min(size.y() / 2.) // Shrink to half of the editor height + // .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines + // ), + // }, + // editor, + // cx, + // ); + // } + // } - // layout_text.unwrap()[0] - // .paint(bounds.origin, line_height, cx) - // .unwrap(); + // let invisible_symbol_font_size = self.style.text.font_size / 2.0; + // let invisible_symbol_style = RunStyle { + // color: self.style.whitespace, + // font_id: self.style.text.font_id, + // underline: Default::default(), + // }; } } diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 422e33e4f84202a37b59f34aae9201a428f7d604..76cfd6739a8821a5b6fa98a871c6409eafb1f944 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -21,6 +21,22 @@ pub struct PlayerColor { #[derive(Clone)] pub struct PlayerColors(pub Vec); +impl PlayerColors { + pub fn local(&self) -> PlayerColor { + *self.0.first().unwrap() + } + + pub fn absent(&self) -> PlayerColor { + todo!("use a valid color"); + *self.0.last().unwrap() + } + + pub fn color_for_participant(&self, participant_index: u32) -> PlayerColor { + let len = self.0.len() - 1; + self.0[(participant_index as usize % len) + 1] + } +} + #[derive(Refineable, Clone, Debug)] #[refineable(debug)] pub struct StatusColors { @@ -89,6 +105,8 @@ pub struct ThemeColors { pub editor: Hsla, pub editor_subheader: Hsla, pub editor_active_line: Hsla, + pub editor_line_number: Hsla, + pub editor_active_line_number: Hsla, } #[derive(Refineable, Clone)] diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index faf252e2e5d071b700d7f672cafa17a04e60f0cd..dfd0e4b3c8de78d5cd646f8578fbbbba277a2a49 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -58,6 +58,12 @@ pub struct ThemeVariant { } impl ThemeVariant { + /// Returns the [`ThemeColors`] for the theme. + #[inline(always)] + pub fn players(&self) -> &PlayerColors { + &self.styles.player + } + /// Returns the [`ThemeColors`] for the theme. #[inline(always)] pub fn colors(&self) -> &ThemeColors { From 436dc93441dfc2cadcf5f8483a6139277a22fac4 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 3 Nov 2023 12:04:28 -0700 Subject: [PATCH 021/110] WIP2000 --- Cargo.lock | 2 +- crates/editor2/Cargo.toml | 2 +- crates/editor2/src/display_map.rs | 120 ++++++------ crates/editor2/src/editor.rs | 34 ++-- crates/editor2/src/element.rs | 278 ++++++++++++++-------------- crates/gpui2/src/geometry.rs | 1 + crates/theme2/src/colors.rs | 4 +- crates/theme2/src/default_colors.rs | 4 + crates/theme2/src/default_theme.rs | 4 + 9 files changed, 230 insertions(+), 219 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5d049393631d8df2334064a405816c063b1a37a..df14ee485194a3051f794dc9fed49713e1923d40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2638,7 +2638,7 @@ dependencies = [ "env_logger 0.9.3", "futures 0.3.28", "fuzzy2", - "git", + "git3", "gpui2", "indoc", "itertools 0.10.5", diff --git a/crates/editor2/Cargo.toml b/crates/editor2/Cargo.toml index 121c03ec00922bf9b462630b4b88d34958f9757e..b897110966709ecef886caf8adef36f1973cc4bd 100644 --- a/crates/editor2/Cargo.toml +++ b/crates/editor2/Cargo.toml @@ -31,7 +31,7 @@ drag_and_drop = { path = "../drag_and_drop" } collections = { path = "../collections" } # context_menu = { path = "../context_menu" } fuzzy = { package = "fuzzy2", path = "../fuzzy2" } -git = { path = "../git" } +git = { package = "git3", path = "../git3" } gpui = { package = "gpui2", path = "../gpui2" } language = { package = "language2", path = "../language2" } lsp = { package = "lsp2", path = "../lsp2" } diff --git a/crates/editor2/src/display_map.rs b/crates/editor2/src/display_map.rs index 2955a929f8eacd8c956462627b338eaa19159864..abf8dcfb95deacac4e7534219693737e3842f80f 100644 --- a/crates/editor2/src/display_map.rs +++ b/crates/editor2/src/display_map.rs @@ -4,6 +4,7 @@ mod inlay_map; mod tab_map; mod wrap_map; +use crate::EditorStyle; use crate::{ link_go_to_definition::InlayHighlight, movement::TextLayoutDetails, Anchor, AnchorRangeExt, InlayId, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -11,14 +12,16 @@ use crate::{ pub use block_map::{BlockMap, BlockPoint}; use collections::{BTreeMap, HashMap, HashSet}; use fold_map::FoldMap; -use gpui::{Font, FontId, HighlightStyle, Hsla, Line, Model, ModelContext, Pixels}; +use gpui::{Font, FontId, HighlightStyle, Hsla, Line, Model, ModelContext, Pixels, UnderlineStyle}; use inlay_map::InlayMap; use language::{ language_settings::language_settings, OffsetUtf16, Point, Subscription as BufferSubscription, }; +use lsp::DiagnosticSeverity; use std::{any::TypeId, borrow::Cow, fmt::Debug, num::NonZeroU32, ops::Range, sync::Arc}; use sum_tree::{Bias, TreeMap}; use tab_map::TabMap; +use theme::ThemeVariant; use wrap_map::WrapMap; pub use block_map::{ @@ -35,6 +38,8 @@ pub enum FoldStatus { Foldable, } +const UNNECESSARY_CODE_FADE: f32 = 0.3; + pub trait ToDisplayPoint { fn to_display_point(&self, map: &DisplaySnapshot) -> DisplayPoint; } @@ -496,63 +501,62 @@ impl DisplaySnapshot { ) } - // pub fn highlighted_chunks<'a>( - // &'a self, - // display_rows: Range, - // language_aware: bool, - // style: &'a EditorStyle, - // ) -> impl Iterator> { - // self.chunks( - // display_rows, - // language_aware, - // Some(style.theme.hint), - // Some(style.theme.suggestion), - // ) - // .map(|chunk| { - // let mut highlight_style = chunk - // .syntax_highlight_id - // .and_then(|id| id.style(&style.syntax)); - - // if let Some(chunk_highlight) = chunk.highlight_style { - // if let Some(highlight_style) = highlight_style.as_mut() { - // highlight_style.highlight(chunk_highlight); - // } else { - // highlight_style = Some(chunk_highlight); - // } - // } - - // let mut diagnostic_highlight = HighlightStyle::default(); - - // if chunk.is_unnecessary { - // diagnostic_highlight.fade_out = Some(style.unnecessary_code_fade); - // } - - // if let Some(severity) = chunk.diagnostic_severity { - // // Omit underlines for HINT/INFO diagnostics on 'unnecessary' code. - // if severity <= DiagnosticSeverity::WARNING || !chunk.is_unnecessary { - // todo!() - // // let diagnostic_style = super::diagnostic_style(severity, true, style); - // // diagnostic_highlight.underline = Some(UnderlineStyle { - // // color: Some(diagnostic_style.message.text.color), - // // thickness: 1.0.into(), - // // wavy: true, - // // }); - // } - // } - - // if let Some(highlight_style) = highlight_style.as_mut() { - // highlight_style.highlight(diagnostic_highlight); - // } else { - // highlight_style = Some(diagnostic_highlight); - // } - - // HighlightedChunk { - // chunk: chunk.text, - // style: highlight_style, - // is_tab: chunk.is_tab, - // } - // }) - // } + pub fn highlighted_chunks<'a>( + &'a self, + display_rows: Range, + language_aware: bool, + theme: &'a ThemeVariant, + ) -> impl Iterator> { + self.chunks( + display_rows, + language_aware, + Some(theme.styles.inlay_highlight_style), + Some(theme.styles.suggestion_highlight_style), + ) + .map(|chunk| { + let mut highlight_style = chunk + .syntax_highlight_id + .and_then(|id| id.style(&theme.styles.syntax)); + + if let Some(chunk_highlight) = chunk.highlight_style { + if let Some(highlight_style) = highlight_style.as_mut() { + highlight_style.highlight(chunk_highlight); + } else { + highlight_style = Some(chunk_highlight); + } + } + + let mut diagnostic_highlight = HighlightStyle::default(); + + if chunk.is_unnecessary { + diagnostic_highlight.fade_out = Some(UNNECESSARY_CODE_FADE); + } + + if let Some(severity) = chunk.diagnostic_severity { + // Omit underlines for HINT/INFO diagnostics on 'unnecessary' code. + if severity <= DiagnosticSeverity::WARNING || !chunk.is_unnecessary { + let diagnostic_color = super::diagnostic_style(severity, true, theme); + diagnostic_highlight.underline = Some(UnderlineStyle { + color: Some(diagnostic_color), + thickness: 1.0.into(), + wavy: true, + }); + } + } + + if let Some(highlight_style) = highlight_style.as_mut() { + highlight_style.highlight(diagnostic_highlight); + } else { + highlight_style = Some(diagnostic_highlight); + } + + HighlightedChunk { + chunk: chunk.text, + style: highlight_style, + is_tab: chunk.is_tab, + } + }) + } pub fn lay_out_line_for_row( &self, diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index df38b9b46ba604ceeef707aed91c00e782d8ff69..1bd3fe1b3fda6ae9b7dc037190ac5605ba20759b 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -53,7 +53,7 @@ use language::{ SelectionGoal, TransactionId, }; use link_go_to_definition::{GoToDefinitionLink, InlayHighlight, LinkGoToDefinitionState}; -use lsp::{Documentation, LanguageServerId}; +use lsp::{DiagnosticSeverity, Documentation, LanguageServerId}; pub use multi_buffer::{ Anchor, AnchorRangeExt, ExcerptId, ExcerptRange, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -81,7 +81,7 @@ use std::{ pub use sum_tree::Bias; use sum_tree::TreeMap; use text::Rope; -use theme::{ActiveTheme, PlayerColor, ThemeColors}; +use theme::{ActiveTheme, PlayerColor, ThemeColors, ThemeVariant}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -9953,23 +9953,19 @@ pub fn highlight_diagnostic_message( (message_without_backticks, highlights) } -// pub fn diagnostic_style( -// severity: DiagnosticSeverity, -// valid: bool, -// theme: &theme::Editor, -// ) -> DiagnosticStyle { -// match (severity, valid) { -// (DiagnosticSeverity::ERROR, true) => theme.error_diagnostic.clone(), -// (DiagnosticSeverity::ERROR, false) => theme.invalid_error_diagnostic.clone(), -// (DiagnosticSeverity::WARNING, true) => theme.warning_diagnostic.clone(), -// (DiagnosticSeverity::WARNING, false) => theme.invalid_warning_diagnostic.clone(), -// (DiagnosticSeverity::INFORMATION, true) => theme.information_diagnostic.clone(), -// (DiagnosticSeverity::INFORMATION, false) => theme.invalid_information_diagnostic.clone(), -// (DiagnosticSeverity::HINT, true) => theme.hint_diagnostic.clone(), -// (DiagnosticSeverity::HINT, false) => theme.invalid_hint_diagnostic.clone(), -// _ => theme.invalid_hint_diagnostic.clone(), -// } -// } +pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &ThemeVariant) -> Hsla { + match (severity, valid) { + (DiagnosticSeverity::ERROR, true) => theme.status().error, + (DiagnosticSeverity::ERROR, false) => theme.status().error, + (DiagnosticSeverity::WARNING, true) => theme.status().warning, + (DiagnosticSeverity::WARNING, false) => theme.status().warning, + (DiagnosticSeverity::INFORMATION, true) => theme.status().info, + (DiagnosticSeverity::INFORMATION, false) => theme.status().info, + (DiagnosticSeverity::HINT, true) => theme.status().info, + (DiagnosticSeverity::HINT, false) => theme.status().info, + _ => theme.status().ignored, + } +} // pub fn combine_syntax_and_fuzzy_match_highlights( // text: &str, diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index fefd72dda127f1f60cecaf0da517c2ef3c984515..df361c054311a659433970ee581f1f4ce8b127a5 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1,6 +1,7 @@ use crate::{ - display_map::{BlockStyle, DisplaySnapshot, FoldStatus, ToDisplayPoint}, + display_map::{BlockStyle, DisplaySnapshot, FoldStatus, HighlightedChunk, ToDisplayPoint}, editor_settings::ShowScrollbar, + git::{diff_hunk_to_display, DisplayDiffHunk}, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, Point, Selection, SoftWrap, ToPoint, MAX_LINE_LEN, }; @@ -8,12 +9,14 @@ use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ black, point, px, relative, size, AnyElement, Bounds, Element, Hsla, Line, Pixels, Size, Style, - TextRun, TextSystem, ViewContext, + TextRun, TextStyle, TextSystem, ViewContext, WindowContext, }; +use itertools::Itertools; +use language::language_settings::ShowWhitespaceSetting; use multi_buffer::Anchor; use settings::Settings; use smallvec::SmallVec; -use std::{cmp, ops::Range, sync::Arc}; +use std::{borrow::Cow, cmp, fmt::Write, iter, ops::Range, sync::Arc}; use sum_tree::Bias; use theme::{ActiveTheme, PlayerColor}; use workspace::item::Item; @@ -1352,26 +1355,26 @@ impl EditorElement { //Folds contained in a hunk are ignored apart from shrinking visual size //If a fold contains any hunks then that fold line is marked as modified - // fn layout_git_gutters( - // &self, - // display_rows: Range, - // snapshot: &EditorSnapshot, - // ) -> Vec { - // let buffer_snapshot = &snapshot.buffer_snapshot; - - // let buffer_start_row = DisplayPoint::new(display_rows.start, 0) - // .to_point(snapshot) - // .row; - // let buffer_end_row = DisplayPoint::new(display_rows.end, 0) - // .to_point(snapshot) - // .row; - - // buffer_snapshot - // .git_diff_hunks_in_range(buffer_start_row..buffer_end_row) - // .map(|hunk| diff_hunk_to_display(hunk, snapshot)) - // .dedup() - // .collect() - // } + fn layout_git_gutters( + &self, + display_rows: Range, + snapshot: &EditorSnapshot, + ) -> Vec { + let buffer_snapshot = &snapshot.buffer_snapshot; + + let buffer_start_row = DisplayPoint::new(display_rows.start, 0) + .to_point(snapshot) + .row; + let buffer_end_row = DisplayPoint::new(display_rows.end, 0) + .to_point(snapshot) + .row; + + buffer_snapshot + .git_diff_hunks_in_range(buffer_start_row..buffer_end_row) + .map(|hunk| diff_hunk_to_display(hunk, snapshot)) + .dedup() + .collect() + } fn calculate_relative_line_numbers( &self, @@ -1435,6 +1438,7 @@ impl EditorElement { Vec>, Vec>, ) { + let font_size = self.style.text.font_size * cx.rem_size(); let include_line_numbers = snapshot.mode == EditorMode::Full; let mut line_number_layouts = Vec::with_capacity(rows.len()); let mut fold_statuses = Vec::with_capacity(rows.len()); @@ -1471,7 +1475,7 @@ impl EditorElement { .text_system() .layout_text( &line_number, - self.style.text.font_size, + font_size, &[TextRun { len: line_number.len(), font: self.style.text.font(), @@ -1480,7 +1484,7 @@ impl EditorElement { }], None, ) - .unwrap(); + .unwrap()[0]; line_number_layouts.push(Some(layout)); fold_statuses.push( is_singleton @@ -1501,68 +1505,64 @@ impl EditorElement { (line_number_layouts, fold_statuses) } - // fn layout_lines( - // &mut self, - // rows: Range, - // line_number_layouts: &[Option], - // snapshot: &EditorSnapshot, - // cx: &ViewContext, - // ) -> Vec { - // if rows.start >= rows.end { - // return Vec::new(); - // } + fn layout_lines( + &mut self, + rows: Range, + line_number_layouts: &[Option], + snapshot: &EditorSnapshot, + cx: &ViewContext, + ) -> Vec { + if rows.start >= rows.end { + return Vec::new(); + } - // // When the editor is empty and unfocused, then show the placeholder. - // if snapshot.is_empty() { - // let placeholder_style = self - // .style - // .placeholder_text - // .as_ref() - // .unwrap_or(&self.style.text); - // let placeholder_text = snapshot.placeholder_text(); - // let placeholder_lines = placeholder_text - // .as_ref() - // .map_or("", AsRef::as_ref) - // .split('\n') - // .skip(rows.start as usize) - // .chain(iter::repeat("")) - // .take(rows.len()); - // placeholder_lines - // .map(|line| { - // cx.text_layout_cache().layout_str( - // line, - // placeholder_style.font_size, - // &[( - // line.len(), - // RunStyle { - // font_id: placeholder_style.font_id, - // color: placeholder_style.color, - // underline: Default::default(), - // }, - // )], - // ) - // }) - // .map(|line| LineWithInvisibles { - // line, - // invisibles: Vec::new(), - // }) - // .collect() - // } else { - // let style = &self.style; - // let chunks = snapshot.highlighted_chunks(rows.clone(), true, style); - - // LineWithInvisibles::from_chunks( - // chunks, - // &style.text, - // cx.text_layout_cache(), - // cx.font_cache(), - // MAX_LINE_LEN, - // rows.len() as usize, - // line_number_layouts, - // snapshot.mode, - // ) - // } - // } + // When the editor is empty and unfocused, then show the placeholder. + if snapshot.is_empty() { + let placeholder_color = cx.theme().styles.colors.text_placeholder; + let placeholder_text = snapshot.placeholder_text(); + let placeholder_lines = placeholder_text + .as_ref() + .map_or("", AsRef::as_ref) + .split('\n') + .skip(rows.start as usize) + .chain(iter::repeat("")) + .take(rows.len()); + placeholder_lines + .map(|line| { + cx.text_system() + .layout_text( + line, + self.style.text.font_size * cx.rem_size(), + &[TextRun { + len: line.len(), + font: self.style.text.font(), + color: placeholder_color, + underline: Default::default(), + }], + None, + ) + .unwrap()[0] + }) + .map(|line| LineWithInvisibles { + line, + invisibles: Vec::new(), + }) + .collect() + } else { + let style = &self.style; + let chunks = snapshot.highlighted_chunks(rows.clone(), true, cx.theme()); + + LineWithInvisibles::from_chunks( + chunks, + &style.text, + MAX_LINE_LEN, + rows.len() as usize, + line_number_layouts, + snapshot.mode, + cx.window_context(), + ) + } + } // #[allow(clippy::too_many_arguments)] // fn layout_blocks( @@ -1796,12 +1796,11 @@ impl LineWithInvisibles { fn from_chunks<'a>( chunks: impl Iterator>, text_style: &TextStyle, - text_layout_cache: &TextLayoutCache, - font_cache: &Arc, max_line_len: usize, max_line_count: usize, line_number_layouts: &[Option], editor_mode: EditorMode, + cx: &mut WindowContext, ) -> Vec { let mut layouts = Vec::with_capacity(max_line_count); let mut line = String::new(); @@ -1818,7 +1817,10 @@ impl LineWithInvisibles { for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { if ix > 0 { layouts.push(Self { - line: text_layout_cache.layout_str(&line, text_style.font_size, &styles), + line: cx + .text_system() + .layout_text(&line, text_style.font_size * cx.rem_size(), &styles, None) + .unwrap()[0], invisibles: invisibles.drain(..).collect(), }); @@ -1836,7 +1838,7 @@ impl LineWithInvisibles { let text_style = if let Some(style) = highlighted_chunk.style { text_style .clone() - .highlight(style, font_cache) + .highlight(style) .map(Cow::Owned) .unwrap_or_else(|_| Cow::Borrowed(text_style)) } else { @@ -1852,14 +1854,12 @@ impl LineWithInvisibles { line_exceeded_max_len = true; } - styles.push(( - line_chunk.len(), - RunStyle { - font_id: text_style.font_id, - color: text_style.color, - underline: text_style.underline, - }, - )); + styles.push(TextRun { + len: line_chunk.len(), + font: text_style.font(), + color: text_style.color, + underline: text_style.underline, + }); if editor_mode == EditorMode::Full { // Line wrap pads its contents with fake whitespaces, @@ -1913,10 +1913,10 @@ impl LineWithInvisibles { cx: &mut ViewContext, ) { let line_height = layout.position_map.line_height; - let line_y = row as f32 * line_height - scroll_top; + let line_y = line_height * row as f32 - scroll_top; self.line.paint( - content_origin + vec2f(-scroll_left, line_y), + content_origin + gpui::point(-scroll_left, line_y), line_height, cx, ); @@ -1928,7 +1928,6 @@ impl LineWithInvisibles { scroll_left, line_y, row, - visible_bounds, line_height, whitespace_setting, cx, @@ -1940,11 +1939,10 @@ impl LineWithInvisibles { selection_ranges: &[Range], layout: &LayoutState, content_origin: gpui::Point, - scroll_left: f32, - line_y: f32, + scroll_left: Pixels, + line_y: Pixels, row: u32, - visible_bounds: Bounds, - line_height: f32, + line_height: Pixels, whitespace_setting: ShowWhitespaceSetting, cx: &mut ViewContext, ) { @@ -1961,9 +1959,11 @@ impl LineWithInvisibles { }; let x_offset = self.line.x_for_index(token_offset); - let invisible_offset = - (layout.position_map.em_width - invisible_symbol.width()).max(0.0) / 2.0; - let origin = content_origin + vec2f(-scroll_left + x_offset + invisible_offset, line_y); + let invisible_offset = (layout.position_map.em_width - invisible_symbol.width()) + .max(Pixels::from(0.0)) + / 2.0; + let origin = + content_origin + gpui::point(-scroll_left + x_offset + invisible_offset, line_y); if let Some(allowed_regions) = allowed_invisibles_regions { let invisible_point = DisplayPoint::new(row, token_offset as u32); @@ -1974,7 +1974,7 @@ impl LineWithInvisibles { continue; } } - invisible_symbol.paint(origin, visible_bounds, line_height, cx); + invisible_symbol.paint(origin, line_height, cx); } } } @@ -2309,9 +2309,9 @@ impl Element for EditorElement { let display_hunks = self.layout_git_gutters(start_row..end_row, &snapshot); - let scrollbar_row_range = scroll_position.y()..(scroll_position.y() + height_in_lines); + let scrollbar_row_range = scroll_position.y..(scroll_position.y + height_in_lines); - let mut max_visible_line_width = 0.0; + let mut max_visible_line_width = Pixels::ZERO; let line_layouts = self.layout_lines(start_row..end_row, &line_number_layouts, &snapshot, cx); for line_with_invisibles in &line_layouts { @@ -3078,34 +3078,34 @@ impl Element for EditorElement { type BufferRow = u32; -// pub struct LayoutState { -// position_map: Arc, -// gutter_size: gpui::Point, -// gutter_padding: f32, -// gutter_margin: f32, -// text_size: gpui::Point, -// mode: EditorMode, -// wrap_guides: SmallVec<[(f32, bool); 2]>, -// visible_display_row_range: Range, -// active_rows: BTreeMap, -// highlighted_rows: Option>, -// line_number_layouts: Vec>, -// display_hunks: Vec, -// blocks: Vec, -// highlighted_ranges: Vec<(Range, Color)>, -// fold_ranges: Vec<(BufferRow, Range, Color)>, -// selections: Vec<(SelectionStyle, Vec)>, -// scrollbar_row_range: Range, -// show_scrollbars: bool, -// is_singleton: bool, -// max_row: u32, -// context_menu: Option<(DisplayPoint, AnyElement)>, -// code_actions_indicator: Option<(u32, AnyElement)>, -// hover_popovers: Option<(DisplayPoint, Vec>)>, -// fold_indicators: Vec>>, -// tab_invisible: Line, -// space_invisible: Line, -// } +pub struct LayoutState { + position_map: Arc, + gutter_size: gpui::Point, + gutter_padding: f32, + gutter_margin: f32, + text_size: gpui::Point, + mode: EditorMode, + wrap_guides: SmallVec<[(f32, bool); 2]>, + visible_display_row_range: Range, + active_rows: BTreeMap, + highlighted_rows: Option>, + line_number_layouts: Vec>, + display_hunks: Vec, + blocks: Vec, + highlighted_ranges: Vec<(Range, Hsla)>, + fold_ranges: Vec<(BufferRow, Range, Hsla)>, + selections: Vec<(PlayerColor, Vec)>, + scrollbar_row_range: Range, + show_scrollbars: bool, + is_singleton: bool, + max_row: u32, + context_menu: Option<(DisplayPoint, AnyElement)>, + code_actions_indicator: Option<(u32, AnyElement)>, + hover_popovers: Option<(DisplayPoint, Vec>)>, + fold_indicators: Vec>>, + tab_invisible: Line, + space_invisible: Line, +} struct PositionMap { size: Size, diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index 081b11aae0e250237e091bf8ab7ecc565e57c960..91d1401e19ade32624978237a0193afb64f765d5 100644 --- a/crates/gpui2/src/geometry.rs +++ b/crates/gpui2/src/geometry.rs @@ -730,6 +730,7 @@ impl MulAssign for Pixels { } impl Pixels { + pub const ZERO: Pixels = Pixels(0.0); pub const MAX: Pixels = Pixels(f32::MAX); pub fn as_usize(&self) -> usize { diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 76cfd6739a8821a5b6fa98a871c6409eafb1f944..a946ffb9c4755bd5f2aadcff943880a7c4be97c3 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -1,4 +1,4 @@ -use gpui::Hsla; +use gpui::{HighlightStyle, Hsla}; use refineable::Refineable; use crate::SyntaxTheme; @@ -117,6 +117,8 @@ pub struct ThemeStyles { pub git: GitStatusColors, pub player: PlayerColors, pub syntax: SyntaxTheme, + pub inlay_highlight_style: HighlightStyle, + pub suggestion_highlight_style: HighlightStyle, } #[cfg(test)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 802392d2963389bdf7ef95d66d4022e49cf0760f..7b419a1d04b5486056552792270cfd3d2c3ed502 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -240,6 +240,8 @@ impl ThemeColors { editor: neutral().light().step_1(), editor_subheader: neutral().light().step_2(), editor_active_line: neutral().light_alpha().step_3(), + editor_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors") + editor_active_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors") } } @@ -285,6 +287,8 @@ impl ThemeColors { editor: neutral().dark().step_1(), editor_subheader: neutral().dark().step_2(), editor_active_line: neutral().dark_alpha().step_3(), + editor_line_number: neutral().dark_alpha().step_3(), // todo!("pick the right colors") + editor_active_line_number: neutral().dark_alpha().step_3(), // todo!("pick the right colors") } } } diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index d7360b6f71ecb3167d08907d87d91aff4cee3724..9a676dfe6dbccb6a7755dc639213c73a785b626a 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -15,6 +15,8 @@ fn zed_pro_daylight() -> ThemeVariant { git: GitStatusColors::default(), player: PlayerColors::default(), syntax: SyntaxTheme::default_light(), + inlay_highlight_style: Default::default(), + suggestion_highlight_style: Default::default(), }, } } @@ -31,6 +33,8 @@ pub(crate) fn zed_pro_moonlight() -> ThemeVariant { git: GitStatusColors::default(), player: PlayerColors::default(), syntax: SyntaxTheme::default_dark(), + inlay_highlight_style: Default::default(), + suggestion_highlight_style: Default::default(), }, } } From 86d1defda270910242028261e23e3fe151ee4970 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 4 Nov 2023 14:37:57 +0100 Subject: [PATCH 022/110] Fix compile errors, now lines are being laid out --- crates/editor2/src/element.rs | 161 +++++++++++++++++----------------- 1 file changed, 82 insertions(+), 79 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index df361c054311a659433970ee581f1f4ce8b127a5..19857a0c92875c119a2aee843d85e3278e33388a 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1471,20 +1471,18 @@ impl EditorElement { .get(&(ix as u32 + rows.start)) .unwrap_or(&default_number); write!(&mut line_number, "{}", number).unwrap(); + let run = TextRun { + len: line_number.len(), + font: self.style.text.font(), + color, + underline: None, + }; let layout = cx .text_system() - .layout_text( - &line_number, - font_size, - &[TextRun { - len: line_number.len(), - font: self.style.text.font(), - color, - underline: None, - }], - None, - ) - .unwrap()[0]; + .layout_text(&line_number, font_size, &[run], None) + .unwrap() + .pop() + .unwrap(); line_number_layouts.push(Some(layout)); fold_statuses.push( is_singleton @@ -1518,6 +1516,7 @@ impl EditorElement { // When the editor is empty and unfocused, then show the placeholder. if snapshot.is_empty() { + let font_size = self.style.text.font_size * cx.rem_size(); let placeholder_color = cx.theme().styles.colors.text_placeholder; let placeholder_text = snapshot.placeholder_text(); let placeholder_lines = placeholder_text @@ -1529,19 +1528,17 @@ impl EditorElement { .take(rows.len()); placeholder_lines .map(|line| { + let run = TextRun { + len: line.len(), + font: self.style.text.font(), + color: placeholder_color, + underline: Default::default(), + }; cx.text_system() - .layout_text( - line, - self.style.text.font_size * cx.rem_size(), - &[TextRun { - len: line.len(), - font: self.style.text.font(), - color: placeholder_color, - underline: Default::default(), - }], - None, - ) - .unwrap()[0] + .layout_text(line, font_size, &[run], None) + .unwrap() + .pop() + .unwrap() }) .map(|line| LineWithInvisibles { line, @@ -1559,7 +1556,7 @@ impl EditorElement { rows.len() as usize, line_number_layouts, snapshot.mode, - cx.window_context(), + cx, ) } } @@ -1800,7 +1797,7 @@ impl LineWithInvisibles { max_line_count: usize, line_number_layouts: &[Option], editor_mode: EditorMode, - cx: &mut WindowContext, + cx: &WindowContext, ) -> Vec { let mut layouts = Vec::with_capacity(max_line_count); let mut line = String::new(); @@ -1809,6 +1806,8 @@ impl LineWithInvisibles { let mut non_whitespace_added = false; let mut row = 0; let mut line_exceeded_max_len = false; + let font_size = text_style.font_size * cx.rem_size(); + for highlighted_chunk in chunks.chain([HighlightedChunk { chunk: "\n", style: None, @@ -1816,11 +1815,11 @@ impl LineWithInvisibles { }]) { for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { if ix > 0 { + let layout = cx + .text_system() + .layout_text(&line, font_size, &styles, None); layouts.push(Self { - line: cx - .text_system() - .layout_text(&line, text_style.font_size * cx.rem_size(), &styles, None) - .unwrap()[0], + line: layout.unwrap().pop().unwrap(), invisibles: invisibles.drain(..).collect(), }); @@ -2060,11 +2059,11 @@ impl Element for EditorElement { }; let text_width = bounds.size.width - gutter_width; - let overscroll = point(em_width, px(0.)); + let overscroll = size(em_width, px(0.)); let snapshot = { editor.set_visible_line_count((bounds.size.height / line_height).into(), cx); - let editor_width = text_width - gutter_margin - overscroll.x - em_width; + let editor_width = text_width - gutter_margin - overscroll.width - em_width; let wrap_width = match editor.soft_wrap_mode(cx) { SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance, SoftWrap::EditorWidth => editor_width, @@ -2320,16 +2319,11 @@ impl Element for EditorElement { } } - // let style = self.style.clone(); - // let longest_line_width = layout_line( - // snapshot.longest_row(), - // &snapshot, - // &style, - // cx.text_layout_cache(), - // ) - // .width(); - // let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.x(); - // let em_width = style.text.em_width(cx.font_cache()); + let longest_line_width = layout_line(snapshot.longest_row(), &snapshot, &style, cx) + .unwrap() + .width(); + let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.width; + // todo!("blocks") // let (scroll_width, blocks) = self.layout_blocks( // start_row..end_row, // &snapshot, @@ -2346,32 +2340,31 @@ impl Element for EditorElement { // cx, // ); - // let scroll_max = vec2f( - // ((scroll_width - text_size.x()) / em_width).max(0.0), - // max_row as f32, - // ); - - // let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x()); + let scroll_max = point( + f32::from((scroll_width - text_size.width) / em_width).max(0.0), + max_row as f32, + ); - // let autoscrolled = if autoscroll_horizontally { - // editor.autoscroll_horizontally( - // start_row, - // text_size.x(), - // scroll_width, - // em_width, - // &line_layouts, - // cx, - // ) - // } else { - // false - // }; + let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x); - // if clamped || autoscrolled { - // snapshot = editor.snapshot(cx); - // } + let autoscrolled = if autoscroll_horizontally { + editor.autoscroll_horizontally( + start_row, + text_size.width, + scroll_width, + em_width, + &line_layouts, + cx, + ) + } else { + false + }; - // let style = editor.style(cx); + if clamped || autoscrolled { + snapshot = editor.snapshot(cx); + } + // todo!("context menu") // let mut context_menu = None; // let mut code_actions_indicator = None; // if let Some(newest_selection_head) = newest_selection_head { @@ -2392,7 +2385,8 @@ impl Element for EditorElement { // } // } - // let visible_rows = start_row..start_row + line_layouts.len() as u32; + let visible_rows = start_row..start_row + line_layouts.len() as u32; + // todo!("hover") // let mut hover = editor.hover_state.render( // &snapshot, // &style, @@ -2402,6 +2396,7 @@ impl Element for EditorElement { // ); // let mode = editor.mode; + // todo!("fold_indicators") // let mut fold_indicators = editor.render_fold_indicators( // fold_statuses, // &style, @@ -2411,6 +2406,7 @@ impl Element for EditorElement { // cx, // ); + // todo!("context_menu") // if let Some((_, context_menu)) = context_menu.as_mut() { // context_menu.layout( // SizeConstraint { @@ -2425,6 +2421,7 @@ impl Element for EditorElement { // ); // } + // todo!("code actions") // if let Some((_, indicator)) = code_actions_indicator.as_mut() { // indicator.layout( // SizeConstraint::strict_along( @@ -2436,6 +2433,7 @@ impl Element for EditorElement { // ); // } + // todo!("fold indicators") // for fold_indicator in fold_indicators.iter_mut() { // if let Some(indicator) = fold_indicator.as_mut() { // indicator.layout( @@ -2449,6 +2447,7 @@ impl Element for EditorElement { // } // } + // todo!("hover popovers") // if let Some((_, hover_popovers)) = hover.as_mut() { // for hover_popover in hover_popovers.iter_mut() { // hover_popover.layout( @@ -2475,6 +2474,7 @@ impl Element for EditorElement { // font_id: self.style.text.font_id, // underline: Default::default(), // }; + // } } @@ -3196,9 +3196,8 @@ fn layout_line( row: u32, snapshot: &EditorSnapshot, style: &EditorStyle, - rem_size: Pixels, - text_system: &TextSystem, -) -> Result> { + cx: &WindowContext, +) -> Result { let mut line = snapshot.line(row); if line.len() > MAX_LINE_LEN { @@ -3210,17 +3209,21 @@ fn layout_line( line.truncate(len); } - text_system.layout_text( - &line, - style.text.font_size * rem_size, - &[TextRun { - len: snapshot.line_len(row) as usize, - font: style.text.font(), - color: black(), - underline: Default::default(), - }], - None, - ) + Ok(cx + .text_system() + .layout_text( + &line, + style.text.font_size * cx.rem_size(), + &[TextRun { + len: snapshot.line_len(row) as usize, + font: style.text.font(), + color: Hsla::default(), + underline: None, + }], + None, + )? + .pop() + .unwrap()) } #[derive(Debug)] From 769526a76ad4aad1ac0e45774952ecec76bf53e3 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 6 Nov 2023 15:54:09 +0100 Subject: [PATCH 023/110] Paint editor background --- crates/editor2/src/editor.rs | 10 +- crates/editor2/src/element.rs | 2444 ++++++++++++++------------- crates/gpui2/src/color.rs | 9 + crates/gpui2/src/geometry.rs | 9 + crates/theme2/src/colors.rs | 5 + crates/theme2/src/default_colors.rs | 10 + 6 files changed, 1313 insertions(+), 1174 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 1bd3fe1b3fda6ae9b7dc037190ac5605ba20759b..70a1af6299e4ecfc7662e2334080f9e2d86a52ba 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -36,7 +36,7 @@ pub use element::{ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ - div, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, EventEmitter, + div, px, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, EventEmitter, FocusHandle, Hsla, Model, Pixels, Render, Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, }; @@ -597,12 +597,11 @@ pub enum SoftWrap { #[derive(Clone)] pub struct EditorStyle { + pub background: Hsla, pub local_player: PlayerColor, pub text: TextStyle, pub line_height_scalar: f32, - // pub placeholder_text: Option, - // pub theme: theme::Editor, - pub theme_id: usize, + pub scrollbar_width: Pixels, } type CompletionId = usize; @@ -9327,10 +9326,11 @@ impl Render for Editor { fn render(&mut self, cx: &mut ViewContext) -> Self::Element { EditorElement::new(EditorStyle { + background: cx.theme().colors().editor, local_player: cx.theme().players().local(), text: cx.text_style(), line_height_scalar: 1., - theme_id: 0, + scrollbar_width: px(12.), }) } } diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 19857a0c92875c119a2aee843d85e3278e33388a..acf9afb487c48f1b6464cd06712b37dc2d2b2d7e 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -8,15 +8,23 @@ use crate::{ use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ - black, point, px, relative, size, AnyElement, Bounds, Element, Hsla, Line, Pixels, Size, Style, - TextRun, TextStyle, TextSystem, ViewContext, WindowContext, + black, hsla, point, px, relative, size, transparent_black, AnyElement, BorrowWindow, Bounds, + ContentMask, Corners, Edges, Element, Hsla, Line, Pixels, Size, Style, TextRun, TextStyle, + TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; use multi_buffer::Anchor; use settings::Settings; use smallvec::SmallVec; -use std::{borrow::Cow, cmp, fmt::Write, iter, ops::Range, sync::Arc}; +use std::{ + borrow::Cow, + cmp::{self, Ordering}, + fmt::Write, + iter, + ops::Range, + sync::Arc, +}; use sum_tree::Bias; use theme::{ActiveTheme, PlayerColor}; use workspace::item::Item; @@ -368,7 +376,7 @@ impl EditorElement { // let mut scroll_delta = gpui::Point::zero(); // let vertical_margin = position_map.line_height.min(text_bounds.height() / 3.0); - // let top = text_bounds.origin_y() + vertical_margin; + // let top = text_bounds.origin.y + vertical_margin; // let bottom = text_bounds.lower_left().y() - vertical_margin; // if position.y() < top { // scroll_delta.set_y(-scale_vertical_mouse_autoscroll_delta(top - position.y())) @@ -378,7 +386,7 @@ impl EditorElement { // } // let horizontal_margin = position_map.line_height.min(text_bounds.width() / 3.0); - // let left = text_bounds.origin_x() + horizontal_margin; + // let left = text_bounds.origin.x + horizontal_margin; // let right = text_bounds.upper_right().x() - horizontal_margin; // if position.x() < left { // scroll_delta.set_x(-scale_horizontal_mouse_autoscroll_delta( @@ -476,122 +484,129 @@ impl EditorElement { // position_map.snapshot.ongoing_scroll.filter(&mut delta) // } else { // //Not trackpad - // delta *= vec2f(max_glyph_width, line_height); + // delta *= point(max_glyph_width, line_height); // None //Resets ongoing scroll // }; // let scroll_position = position_map.snapshot.scroll_position(); // let x = (scroll_position.x() * max_glyph_width - delta.x()) / max_glyph_width; // let y = (scroll_position.y() * line_height - delta.y()) / line_height; - // let scroll_position = vec2f(x, y).clamp(gpui::Point::zero(), position_map.scroll_max); + // let scroll_position = point(x, y).clamp(gpui::Point::zero(), position_map.scroll_max); // editor.scroll(scroll_position, axis, cx); // true // } - // fn paint_background( - // &self, - // gutter_bounds: Bounds, - // text_bounds: Bounds, - // layout: &LayoutState, - // cx: &mut ViewContext, - // ) { - // let bounds = gutter_bounds.union_rect(text_bounds); - // let scroll_top = - // layout.position_map.snapshot.scroll_position().y() * layout.position_map.line_height; - // cx.scene().push_quad(Quad { - // bounds: gutter_bounds, - // background: Some(self.style.gutter_background), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: Default::default(), - // }); - // cx.scene().push_quad(Quad { - // bounds: text_bounds, - // background: Some(self.style.background), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: Default::default(), - // }); + fn paint_background( + &self, + gutter_bounds: Bounds, + text_bounds: Bounds, + layout: &LayoutState, + cx: &mut ViewContext, + ) { + let bounds = gutter_bounds.union(&text_bounds); + let scroll_top = + layout.position_map.snapshot.scroll_position().y * layout.position_map.line_height; + let gutter_bg = cx.theme().colors().editor_gutter; + cx.paint_quad( + gutter_bounds, + Corners::default(), + gutter_bg, + Edges::default(), + transparent_black(), + ); + cx.paint_quad( + text_bounds, + Corners::default(), + self.style.background, + Edges::default(), + transparent_black(), + ); - // if let EditorMode::Full = layout.mode { - // let mut active_rows = layout.active_rows.iter().peekable(); - // while let Some((start_row, contains_non_empty_selection)) = active_rows.next() { - // let mut end_row = *start_row; - // while active_rows.peek().map_or(false, |r| { - // *r.0 == end_row + 1 && r.1 == contains_non_empty_selection - // }) { - // active_rows.next().unwrap(); - // end_row += 1; - // } + if let EditorMode::Full = layout.mode { + let mut active_rows = layout.active_rows.iter().peekable(); + while let Some((start_row, contains_non_empty_selection)) = active_rows.next() { + let mut end_row = *start_row; + while active_rows.peek().map_or(false, |r| { + *r.0 == end_row + 1 && r.1 == contains_non_empty_selection + }) { + active_rows.next().unwrap(); + end_row += 1; + } - // if !contains_non_empty_selection { - // let origin = vec2f( - // bounds.origin_x(), - // bounds.origin_y() + (layout.position_map.line_height * *start_row as f32) - // - scroll_top, - // ); - // let size = vec2f( - // bounds.width(), - // layout.position_map.line_height * (end_row - start_row + 1) as f32, - // ); - // cx.scene().push_quad(Quad { - // bounds: Bounds::new(origin, size), - // background: Some(self.style.active_line_background), - // border: Border::default().into(), - // corner_radii: Default::default(), - // }); - // } - // } + if !contains_non_empty_selection { + let origin = point( + bounds.origin.x, + bounds.origin.y + (layout.position_map.line_height * *start_row as f32) + - scroll_top, + ); + let size = size( + bounds.size.width, + layout.position_map.line_height * (end_row - start_row + 1) as f32, + ); + let active_line_bg = cx.theme().colors().editor_active_line; + cx.paint_quad( + Bounds { origin, size }, + Corners::default(), + active_line_bg, + Edges::default(), + transparent_black(), + ); + } + } - // if let Some(highlighted_rows) = &layout.highlighted_rows { - // let origin = vec2f( - // bounds.origin_x(), - // bounds.origin_y() - // + (layout.position_map.line_height * highlighted_rows.start as f32) - // - scroll_top, - // ); - // let size = vec2f( - // bounds.width(), - // layout.position_map.line_height * highlighted_rows.len() as f32, - // ); - // cx.scene().push_quad(Quad { - // bounds: Bounds::new(origin, size), - // background: Some(self.style.highlighted_line_background), - // border: Border::default().into(), - // corner_radii: Default::default(), - // }); - // } + if let Some(highlighted_rows) = &layout.highlighted_rows { + let origin = point( + bounds.origin.x, + bounds.origin.y + + (layout.position_map.line_height * highlighted_rows.start as f32) + - scroll_top, + ); + let size = size( + bounds.size.width, + layout.position_map.line_height * highlighted_rows.len() as f32, + ); + let highlighted_line_bg = cx.theme().colors().editor_highlighted_line; + cx.paint_quad( + Bounds { origin, size }, + Corners::default(), + highlighted_line_bg, + Edges::default(), + transparent_black(), + ); + } - // let scroll_left = - // layout.position_map.snapshot.scroll_position().x() * layout.position_map.em_width; + let scroll_left = + layout.position_map.snapshot.scroll_position().x * layout.position_map.em_width; - // for (wrap_position, active) in layout.wrap_guides.iter() { - // let x = - // (text_bounds.origin_x() + wrap_position + layout.position_map.em_width / 2.) - // - scroll_left; + for (wrap_position, active) in layout.wrap_guides.iter() { + let x = (text_bounds.origin.x + *wrap_position + layout.position_map.em_width / 2.) + - scroll_left; - // if x < text_bounds.origin_x() - // || (layout.show_scrollbars && x > self.scrollbar_left(&bounds)) - // { - // continue; - // } + if x < text_bounds.origin.x + || (layout.show_scrollbars && x > self.scrollbar_left(&bounds)) + { + continue; + } - // let color = if *active { - // self.style.active_wrap_guide - // } else { - // self.style.wrap_guide - // }; - // cx.scene().push_quad(Quad { - // bounds: Bounds::new( - // vec2f(x, text_bounds.origin_y()), - // vec2f(1., text_bounds.height()), - // ), - // background: Some(color), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: Default::default(), - // }); - // } - // } - // } + let color = if *active { + cx.theme().colors().editor_active_wrap_guide + } else { + cx.theme().colors().editor_wrap_guide + }; + cx.paint_quad( + Bounds { + origin: point(x, text_bounds.origin.y), + size: size(px(1.), text_bounds.size.height), + }, + Corners::default(), + color, + Edges::default(), + transparent_black(), + ); + } + } + } // fn paint_gutter( // &mut self, @@ -618,7 +633,7 @@ impl EditorElement { // for (ix, line) in layout.line_number_layouts.iter().enumerate() { // if let Some(line) = line { // let line_origin = bounds.origin() - // + vec2f( + // + point( // bounds.width() - line.width() - layout.gutter_padding, // ix as f32 * line_height - (scroll_top % line_height), // ); @@ -629,11 +644,11 @@ impl EditorElement { // for (ix, fold_indicator) in layout.fold_indicators.iter_mut().enumerate() { // if let Some(indicator) = fold_indicator.as_mut() { - // let position = vec2f( + // let position = point( // bounds.width() - layout.gutter_padding, // ix as f32 * line_height - (scroll_top % line_height), // ); - // let centering_offset = vec2f( + // let centering_offset = point( // (layout.gutter_padding + layout.gutter_margin - indicator.size().x()) / 2., // (line_height - indicator.size().y()) / 2., // ); @@ -649,7 +664,7 @@ impl EditorElement { // let mut y = *row as f32 * line_height - scroll_top; // x += ((layout.gutter_padding + layout.gutter_margin) - indicator.size().x()) / 2.; // y += (line_height - indicator.size().y()) / 2.; - // indicator.paint(bounds.origin() + vec2f(x, y), visible_bounds, editor, cx); + // indicator.paint(bounds.origin() + point(x, y), visible_bounds, editor, cx); // } // } @@ -668,11 +683,11 @@ impl EditorElement { // let end_y = start_y + line_height; // let width = diff_style.removed_width_em * line_height; - // let highlight_origin = bounds.origin() + vec2f(-width, start_y); - // let highlight_size = vec2f(width * 2., end_y - start_y); + // let highlight_origin = bounds.origin() + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds: highlight_bounds, // background: Some(diff_style.modified), // border: Border::new(0., Color::transparent_black()).into(), @@ -701,11 +716,11 @@ impl EditorElement { // let end_y = start_y + line_height; // let width = diff_style.removed_width_em * line_height; - // let highlight_origin = bounds.origin() + vec2f(-width, start_y); - // let highlight_size = vec2f(width * 2., end_y - start_y); + // let highlight_origin = bounds.origin() + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds: highlight_bounds, // background: Some(diff_style.deleted), // border: Border::new(0., Color::transparent_black()).into(), @@ -723,11 +738,11 @@ impl EditorElement { // let end_y = end_row as f32 * line_height - scroll_top; // let width = diff_style.width_em * line_height; - // let highlight_origin = bounds.origin() + vec2f(-width, start_y); - // let highlight_size = vec2f(width * 2., end_y - start_y); + // let highlight_origin = bounds.origin() + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds: highlight_bounds, // background: Some(color), // border: Border::new(0., Color::transparent_black()).into(), @@ -750,7 +765,7 @@ impl EditorElement { // let scroll_top = scroll_position.y() * layout.position_map.line_height; // let max_glyph_width = layout.position_map.em_width; // let scroll_left = scroll_position.x() * max_glyph_width; - // let content_origin = bounds.origin() + vec2f(layout.gutter_margin, 0.); + // let content_origin = bounds.origin() + point(layout.gutter_margin, 0.); // let line_end_overshoot = 0.15 * layout.position_map.line_height; // let whitespace_setting = editor.buffer.read(cx).settings_at(0, cx).show_whitespaces; @@ -899,15 +914,15 @@ impl EditorElement { // let y = cursor_position.row() as f32 * layout.position_map.line_height // - scroll_top; // if selection.is_newest { - // editor.pixel_position_of_newest_cursor = Some(vec2f( - // bounds.origin_x() + x + block_width / 2., - // bounds.origin_y() + y + layout.position_map.line_height / 2., + // editor.pixel_position_of_newest_cursor = Some(point( + // bounds.origin.x + x + block_width / 2., + // bounds.origin.y + y + layout.position_map.line_height / 2., // )); // } // cursors.push(Cursor { // color: selection_style.cursor, // block_width, - // origin: vec2f(x, y), + // origin: point(x, y), // line_height: layout.position_map.line_height, // shape: selection.cursor_shape, // block_text, @@ -947,7 +962,7 @@ impl EditorElement { // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; - // let mut list_origin = content_origin + vec2f(x, y); + // let mut list_origin = content_origin + point(x, y); // let list_width = context_menu.size().x(); // let list_height = context_menu.size().y(); @@ -963,7 +978,7 @@ impl EditorElement { // context_menu.paint( // list_origin, - // Bounds::from_points(gpui::Point::zero(), vec2f(f32::MAX, f32::MAX)), // Let content bleed outside of editor + // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor // editor, // cx, // ); @@ -988,14 +1003,14 @@ impl EditorElement { // // Compute Hovered Point // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; - // let hovered_point = content_origin + vec2f(x, y); + // let hovered_point = content_origin + point(x, y); // if hovered_point.y() - height_to_reserve > 0.0 { // // There is enough space above. Render popovers above the hovered point // let mut current_y = hovered_point.y(); // for hover_popover in hover_popovers { // let size = hover_popover.size(); - // let mut popover_origin = vec2f(hovered_point.x(), current_y - size.y()); + // let mut popover_origin = point(hovered_point.x(), current_y - size.y()); // let x_out_of_bounds = bounds.max_x() - (popover_origin.x() + size.x()); // if x_out_of_bounds < 0.0 { @@ -1004,7 +1019,7 @@ impl EditorElement { // hover_popover.paint( // popover_origin, - // Bounds::from_points(gpui::Point::zero(), vec2f(f32::MAX, f32::MAX)), // Let content bleed outside of editor + // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor // editor, // cx, // ); @@ -1016,7 +1031,7 @@ impl EditorElement { // let mut current_y = hovered_point.y() + layout.position_map.line_height; // for hover_popover in hover_popovers { // let size = hover_popover.size(); - // let mut popover_origin = vec2f(hovered_point.x(), current_y); + // let mut popover_origin = point(hovered_point.x(), current_y); // let x_out_of_bounds = bounds.max_x() - (popover_origin.x() + size.x()); // if x_out_of_bounds < 0.0 { @@ -1025,7 +1040,7 @@ impl EditorElement { // hover_popover.paint( // popover_origin, - // Bounds::from_points(gpui::Point::zero(), vec2f(f32::MAX, f32::MAX)), // Let content bleed outside of editor + // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor // editor, // cx, // ); @@ -1040,9 +1055,9 @@ impl EditorElement { // cx.scene().pop_layer(); // } - // fn scrollbar_left(&self, bounds: &Bounds) -> f32 { - // bounds.max_x() - self.style.theme.scrollbar.width - // } + fn scrollbar_left(&self, bounds: &Bounds) -> Pixels { + bounds.upper_right().x - self.style.scrollbar_width + } // fn paint_scrollbar( // &mut self, @@ -1082,11 +1097,11 @@ impl EditorElement { // let thumb_top = y_for_row(row_range.start) - first_row_y_offset; // let thumb_bottom = y_for_row(row_range.end) + first_row_y_offset; - // let track_bounds = Bounds::from_points(vec2f(left, top), vec2f(right, bottom)); - // let thumb_bounds = Bounds::from_points(vec2f(left, thumb_top), vec2f(right, thumb_bottom)); + // let track_bounds = Bounds::from_points(point(left, top), point(right, bottom)); + // let thumb_bounds = Bounds::from_points(point(left, thumb_top), point(right, thumb_bottom)); // if layout.show_scrollbars { - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds: track_bounds, // border: style.track.border.into(), // background: style.track.background_color, @@ -1114,9 +1129,9 @@ impl EditorElement { // if end_y - start_y < 1. { // end_y = start_y + 1.; // } - // let bounds = Bounds::from_points(vec2f(left, start_y), vec2f(right, end_y)); + // let bounds = Bounds::from_points(point(left, start_y), point(right, end_y)); - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds, // background: Some(color), // border: border.into(), @@ -1158,7 +1173,7 @@ impl EditorElement { // if end_y - start_y < 1. { // end_y = start_y + 1.; // } - // let bounds = Bounds::from_points(vec2f(left, start_y), vec2f(right, end_y)); + // let bounds = Bounds::from_points(point(left, start_y), point(right, end_y)); // let color = match hunk.status() { // DiffHunkStatus::Added => diff_style.inserted, @@ -1176,7 +1191,7 @@ impl EditorElement { // left: true, // }; - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds, // background: Some(color), // border: border.into(), @@ -1185,7 +1200,7 @@ impl EditorElement { // } // } - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds: thumb_bounds, // border: style.thumb.border.into(), // background: style.thumb.background_color, @@ -1316,12 +1331,12 @@ impl EditorElement { // for block in &mut layout.blocks { // let mut origin = bounds.origin() - // + vec2f( + // + point( // 0., // block.row as f32 * layout.position_map.line_height - scroll_top, // ); // if !matches!(block.style, BlockStyle::Sticky) { - // origin += vec2f(-scroll_left, 0.); + // origin += point(-scroll_left, 0.); // } // block.element.paint(origin, visible_bounds, editor, cx); // } @@ -1561,920 +1576,1005 @@ impl EditorElement { } } - // #[allow(clippy::too_many_arguments)] - // fn layout_blocks( - // &mut self, - // rows: Range, - // snapshot: &EditorSnapshot, - // editor_width: f32, - // scroll_width: f32, - // gutter_padding: f32, - // gutter_width: f32, - // em_width: f32, - // text_x: f32, - // line_height: f32, - // style: &EditorStyle, - // line_layouts: &[LineWithInvisibles], - // editor: &mut Editor, - // cx: &mut ViewContext, - // ) -> (f32, Vec) { - // let mut block_id = 0; - // let scroll_x = snapshot.scroll_anchor.offset.x(); - // let (fixed_blocks, non_fixed_blocks) = snapshot - // .blocks_in_range(rows.clone()) - // .partition::, _>(|(_, block)| match block { - // TransformBlock::ExcerptHeader { .. } => false, - // TransformBlock::Custom(block) => block.style() == BlockStyle::Fixed, - // }); - // let mut render_block = |block: &TransformBlock, width: f32, block_id: usize| { - // let mut element = match block { - // TransformBlock::Custom(block) => { - // let align_to = block - // .position() - // .to_point(&snapshot.buffer_snapshot) - // .to_display_point(snapshot); - // let anchor_x = text_x - // + if rows.contains(&align_to.row()) { - // line_layouts[(align_to.row() - rows.start) as usize] - // .line - // .x_for_index(align_to.column() as usize) - // } else { - // layout_line(align_to.row(), snapshot, style, cx.text_layout_cache()) - // .x_for_index(align_to.column() as usize) - // }; + fn compute_layout( + &mut self, + editor: &mut Editor, + cx: &mut ViewContext<'_, Editor>, + bounds: Bounds, + ) -> LayoutState { + // let mut size = constraint.max; + // if size.x().is_infinite() { + // unimplemented!("we don't yet handle an infinite width constraint on buffer elements"); + // } - // block.render(&mut BlockContext { - // view_context: cx, - // anchor_x, - // gutter_padding, - // line_height, - // scroll_x, - // gutter_width, - // em_width, - // block_id, - // }) - // } - // TransformBlock::ExcerptHeader { - // id, - // buffer, - // range, - // starts_new_buffer, - // .. - // } => { - // let tooltip_style = theme::current(cx).tooltip.clone(); - // let include_root = editor - // .project - // .as_ref() - // .map(|project| project.read(cx).visible_worktrees(cx).count() > 1) - // .unwrap_or_default(); - // let jump_icon = project::File::from_dyn(buffer.file()).map(|file| { - // let jump_path = ProjectPath { - // worktree_id: file.worktree_id(cx), - // path: file.path.clone(), - // }; - // let jump_anchor = range - // .primary - // .as_ref() - // .map_or(range.context.start, |primary| primary.start); - // let jump_position = language::ToPoint::to_point(&jump_anchor, buffer); + let snapshot = editor.snapshot(cx); + let style = self.style.clone(); + let font_id = cx.text_system().font_id(&style.text.font()).unwrap(); + let font_size = style.text.font_size * cx.rem_size(); + let line_height = (font_size * style.line_height_scalar).round(); + let em_width = cx + .text_system() + .typographic_bounds(font_id, font_size, 'm') + .unwrap() + .size + .width; + let em_advance = cx + .text_system() + .advance(font_id, font_size, 'm') + .unwrap() + .width; - // enum JumpIcon {} - // MouseEventHandler::new::((*id).into(), cx, |state, _| { - // let style = style.jump_icon.style_for(state); - // Svg::new("icons/arrow_up_right.svg") - // .with_color(style.color) - // .constrained() - // .with_width(style.icon_width) - // .aligned() - // .contained() - // .with_style(style.container) - // .constrained() - // .with_width(style.button_width) - // .with_height(style.button_width) - // }) - // .with_cursor_style(CursorStyle::PointingHand) - // .on_click(MouseButton::Left, move |_, editor, cx| { - // if let Some(workspace) = editor - // .workspace - // .as_ref() - // .and_then(|(workspace, _)| workspace.upgrade(cx)) - // { - // workspace.update(cx, |workspace, cx| { - // Editor::jump( - // workspace, - // jump_path.clone(), - // jump_position, - // jump_anchor, - // cx, - // ); - // }); - // } - // }) - // .with_tooltip::( - // (*id).into(), - // "Jump to Buffer".to_string(), - // Some(Box::new(crate::OpenExcerpts)), - // tooltip_style.clone(), - // cx, - // ) - // .aligned() - // .flex_float() - // }); + let gutter_padding; + let gutter_width; + let gutter_margin; + if snapshot.show_gutter { + let descent = cx.text_system().descent(font_id, font_size).unwrap(); - // if *starts_new_buffer { - // let editor_font_size = style.text.font_size; - // let style = &style.diagnostic_path_header; - // let font_size = (style.text_scale_factor * editor_font_size).round(); + let gutter_padding_factor = 3.5; + gutter_padding = (em_width * gutter_padding_factor).round(); + gutter_width = self.max_line_number_width(&snapshot, cx) + gutter_padding * 2.0; + gutter_margin = -descent; + } else { + gutter_padding = px(0.0); + gutter_width = px(0.0); + gutter_margin = px(0.0); + }; - // let path = buffer.resolve_file_path(cx, include_root); - // let mut filename = None; - // let mut parent_path = None; - // // Can't use .and_then() because `.file_name()` and `.parent()` return references :( - // if let Some(path) = path { - // filename = path.file_name().map(|f| f.to_string_lossy().to_string()); - // parent_path = - // path.parent().map(|p| p.to_string_lossy().to_string() + "/"); - // } + let text_width = bounds.size.width - gutter_width; + let overscroll = size(em_width, px(0.)); + let snapshot = { + editor.set_visible_line_count((bounds.size.height / line_height).into(), cx); - // Flex::row() - // .with_child( - // Label::new( - // filename.unwrap_or_else(|| "untitled".to_string()), - // style.filename.text.clone().with_font_size(font_size), - // ) - // .contained() - // .with_style(style.filename.container) - // .aligned(), - // ) - // .with_children(parent_path.map(|path| { - // Label::new(path, style.path.text.clone().with_font_size(font_size)) - // .contained() - // .with_style(style.path.container) - // .aligned() - // })) - // .with_children(jump_icon) - // .contained() - // .with_style(style.container) - // .with_padding_left(gutter_padding) - // .with_padding_right(gutter_padding) - // .expanded() - // .into_any_named("path header block") - // } else { - // let text_style = style.text.clone(); - // Flex::row() - // .with_child(Label::new("⋯", text_style)) - // .with_children(jump_icon) - // .contained() - // .with_padding_left(gutter_padding) - // .with_padding_right(gutter_padding) - // .expanded() - // .into_any_named("collapsed context") - // } - // } - // }; + let editor_width = text_width - gutter_margin - overscroll.width - em_width; + let wrap_width = match editor.soft_wrap_mode(cx) { + SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance, + SoftWrap::EditorWidth => editor_width, + SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance), + }; - // element.layout( - // SizeConstraint { - // min: gpui::Point::zero(), - // max: vec2f(width, block.height() as f32 * line_height), - // }, - // editor, - // cx, - // ); - // element - // }; + if editor.set_wrap_width(Some(wrap_width), cx) { + editor.snapshot(cx) + } else { + snapshot + } + }; - // let mut fixed_block_max_width = 0f32; - // let mut blocks = Vec::new(); - // for (row, block) in fixed_blocks { - // let element = render_block(block, f32::INFINITY, block_id); - // block_id += 1; - // fixed_block_max_width = fixed_block_max_width.max(element.size().x() + em_width); - // blocks.push(BlockLayout { - // row, - // element, - // style: BlockStyle::Fixed, - // }); - // } - // for (row, block) in non_fixed_blocks { - // let style = match block { - // TransformBlock::Custom(block) => block.style(), - // TransformBlock::ExcerptHeader { .. } => BlockStyle::Sticky, - // }; - // let width = match style { - // BlockStyle::Sticky => editor_width, - // BlockStyle::Flex => editor_width - // .max(fixed_block_max_width) - // .max(gutter_width + scroll_width), - // BlockStyle::Fixed => unreachable!(), - // }; - // let element = render_block(block, width, block_id); - // block_id += 1; - // blocks.push(BlockLayout { - // row, - // element, - // style, - // }); - // } - // ( - // scroll_width.max(fixed_block_max_width - gutter_width), - // blocks, - // ) - // } -} + let wrap_guides = editor + .wrap_guides(cx) + .iter() + .map(|(guide, active)| (self.column_pixels(*guide, cx), *active)) + .collect::>(); -#[derive(Debug)] -pub struct LineWithInvisibles { - pub line: Line, - invisibles: Vec, -} + let scroll_height = Pixels::from(snapshot.max_point().row() + 1) * line_height; + // todo!("this should happen during layout") + let editor_mode = snapshot.mode; + if let EditorMode::AutoHeight { max_lines } = editor_mode { + todo!() + // size.set_y( + // scroll_height + // .min(constraint.max_along(Axis::Vertical)) + // .max(constraint.min_along(Axis::Vertical)) + // .max(line_height) + // .min(line_height * max_lines as f32), + // ) + } else if let EditorMode::SingleLine = editor_mode { + todo!() + // size.set_y(line_height.max(constraint.min_along(Axis::Vertical))) + } + // todo!() + // else if size.y().is_infinite() { + // // size.set_y(scroll_height); + // } + // + let gutter_size = size(gutter_width, bounds.size.height); + let text_size = size(text_width, bounds.size.height); -impl LineWithInvisibles { - fn from_chunks<'a>( - chunks: impl Iterator>, - text_style: &TextStyle, - max_line_len: usize, - max_line_count: usize, - line_number_layouts: &[Option], - editor_mode: EditorMode, - cx: &WindowContext, - ) -> Vec { - let mut layouts = Vec::with_capacity(max_line_count); - let mut line = String::new(); - let mut invisibles = Vec::new(); - let mut styles = Vec::new(); - let mut non_whitespace_added = false; - let mut row = 0; - let mut line_exceeded_max_len = false; - let font_size = text_style.font_size * cx.rem_size(); + let autoscroll_horizontally = + editor.autoscroll_vertically(bounds.size.height, line_height, cx); + let mut snapshot = editor.snapshot(cx); - for highlighted_chunk in chunks.chain([HighlightedChunk { - chunk: "\n", - style: None, - is_tab: false, - }]) { - for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { - if ix > 0 { - let layout = cx - .text_system() - .layout_text(&line, font_size, &styles, None); - layouts.push(Self { - line: layout.unwrap().pop().unwrap(), - invisibles: invisibles.drain(..).collect(), - }); + let scroll_position = snapshot.scroll_position(); + // The scroll position is a fractional point, the whole number of which represents + // the top of the window in terms of display rows. + let start_row = scroll_position.y as u32; + let height_in_lines = f32::from(bounds.size.height / line_height); + let max_row = snapshot.max_point().row(); - line.clear(); - styles.clear(); - row += 1; - line_exceeded_max_len = false; - non_whitespace_added = false; - if row == max_line_count { - return layouts; - } - } + // Add 1 to ensure selections bleed off screen + let end_row = 1 + cmp::min((scroll_position.y + height_in_lines).ceil() as u32, max_row); - if !line_chunk.is_empty() && !line_exceeded_max_len { - let text_style = if let Some(style) = highlighted_chunk.style { - text_style - .clone() - .highlight(style) - .map(Cow::Owned) - .unwrap_or_else(|_| Cow::Borrowed(text_style)) - } else { - Cow::Borrowed(text_style) - }; + let start_anchor = if start_row == 0 { + Anchor::min() + } else { + snapshot + .buffer_snapshot + .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) + }; + let end_anchor = if end_row > max_row { + Anchor::max() + } else { + snapshot + .buffer_snapshot + .anchor_before(DisplayPoint::new(end_row, 0).to_offset(&snapshot, Bias::Right)) + }; - if line.len() + line_chunk.len() > max_line_len { - let mut chunk_len = max_line_len - line.len(); - while !line_chunk.is_char_boundary(chunk_len) { - chunk_len -= 1; - } - line_chunk = &line_chunk[..chunk_len]; - line_exceeded_max_len = true; - } + let mut selections: Vec<(PlayerColor, Vec)> = Vec::new(); + let mut active_rows = BTreeMap::new(); + let mut fold_ranges = Vec::new(); + let is_singleton = editor.is_singleton(cx); - styles.push(TextRun { - len: line_chunk.len(), - font: text_style.font(), - color: text_style.color, - underline: text_style.underline, - }); + let highlighted_rows = editor.highlighted_rows(); + let highlighted_ranges = editor.background_highlights_in_range( + start_anchor..end_anchor, + &snapshot.display_snapshot, + cx.theme().colors(), + ); - if editor_mode == EditorMode::Full { - // Line wrap pads its contents with fake whitespaces, - // avoid printing them - let inside_wrapped_string = line_number_layouts - .get(row) - .and_then(|layout| layout.as_ref()) - .is_none(); - if highlighted_chunk.is_tab { - if non_whitespace_added || !inside_wrapped_string { - invisibles.push(Invisible::Tab { - line_start_offset: line.len(), - }); - } - } else { - invisibles.extend( - line_chunk - .chars() - .enumerate() - .filter(|(_, line_char)| { - let is_whitespace = line_char.is_whitespace(); - non_whitespace_added |= !is_whitespace; - is_whitespace - && (non_whitespace_added || !inside_wrapped_string) - }) - .map(|(whitespace_index, _)| Invisible::Whitespace { - line_offset: line.len() + whitespace_index, - }), - ) - } - } + fold_ranges.extend( + snapshot + .folds_in_range(start_anchor..end_anchor) + .map(|anchor| { + let start = anchor.start.to_point(&snapshot.buffer_snapshot); + ( + start.row, + start.to_display_point(&snapshot.display_snapshot) + ..anchor.end.to_display_point(&snapshot), + ) + }), + ); - line.push_str(line_chunk); - } - } - } + let mut newest_selection_head = None; - layouts - } + if editor.show_local_selections { + let mut local_selections: Vec> = editor + .selections + .disjoint_in_range(start_anchor..end_anchor, cx); + local_selections.extend(editor.selections.pending(cx)); + let mut layouts = Vec::new(); + let newest = editor.selections.newest(cx); + for selection in local_selections.drain(..) { + let is_empty = selection.start == selection.end; + let is_newest = selection == newest; - fn draw( - &self, - layout: &LayoutState, - row: u32, - scroll_top: Pixels, - content_origin: gpui::Point, - scroll_left: Pixels, - visible_text_bounds: Bounds, - whitespace_setting: ShowWhitespaceSetting, - selection_ranges: &[Range], - cx: &mut ViewContext, - ) { - let line_height = layout.position_map.line_height; - let line_y = line_height * row as f32 - scroll_top; - - self.line.paint( - content_origin + gpui::point(-scroll_left, line_y), - line_height, - cx, - ); + let layout = SelectionLayout::new( + selection, + editor.selections.line_mode, + editor.cursor_shape, + &snapshot.display_snapshot, + is_newest, + true, + ); + if is_newest { + newest_selection_head = Some(layout.head); + } - self.draw_invisibles( - &selection_ranges, - layout, - content_origin, - scroll_left, - line_y, - row, - line_height, - whitespace_setting, - cx, - ); - } + for row in cmp::max(layout.active_rows.start, start_row) + ..=cmp::min(layout.active_rows.end, end_row) + { + let contains_non_empty_selection = active_rows.entry(row).or_insert(!is_empty); + *contains_non_empty_selection |= !is_empty; + } + layouts.push(layout); + } - fn draw_invisibles( - &self, - selection_ranges: &[Range], - layout: &LayoutState, - content_origin: gpui::Point, - scroll_left: Pixels, - line_y: Pixels, - row: u32, - line_height: Pixels, - whitespace_setting: ShowWhitespaceSetting, - cx: &mut ViewContext, - ) { - let allowed_invisibles_regions = match whitespace_setting { - ShowWhitespaceSetting::None => return, - ShowWhitespaceSetting::Selection => Some(selection_ranges), - ShowWhitespaceSetting::All => None, - }; + selections.push((style.local_player, layouts)); + } - for invisible in &self.invisibles { - let (&token_offset, invisible_symbol) = match invisible { - Invisible::Tab { line_start_offset } => (line_start_offset, &layout.tab_invisible), - Invisible::Whitespace { line_offset } => (line_offset, &layout.space_invisible), - }; + if let Some(collaboration_hub) = &editor.collaboration_hub { + // When following someone, render the local selections in their color. + if let Some(leader_id) = editor.leader_peer_id { + if let Some(collaborator) = collaboration_hub.collaborators(cx).get(&leader_id) { + if let Some(participant_index) = collaboration_hub + .user_participant_indices(cx) + .get(&collaborator.user_id) + { + if let Some((local_selection_style, _)) = selections.first_mut() { + *local_selection_style = cx + .theme() + .players() + .color_for_participant(participant_index.0); + } + } + } + } - let x_offset = self.line.x_for_index(token_offset); - let invisible_offset = (layout.position_map.em_width - invisible_symbol.width()) - .max(Pixels::from(0.0)) - / 2.0; - let origin = - content_origin + gpui::point(-scroll_left + x_offset + invisible_offset, line_y); + let mut remote_selections = HashMap::default(); + for selection in snapshot.remote_selections_in_range( + &(start_anchor..end_anchor), + collaboration_hub.as_ref(), + cx, + ) { + let selection_style = if let Some(participant_index) = selection.participant_index { + cx.theme() + .players() + .color_for_participant(participant_index.0) + } else { + cx.theme().players().absent() + }; - if let Some(allowed_regions) = allowed_invisibles_regions { - let invisible_point = DisplayPoint::new(row, token_offset as u32); - if !allowed_regions - .iter() - .any(|region| region.start <= invisible_point && invisible_point < region.end) - { + // Don't re-render the leader's selections, since the local selections + // match theirs. + if Some(selection.peer_id) == editor.leader_peer_id { continue; } + + remote_selections + .entry(selection.replica_id) + .or_insert((selection_style, Vec::new())) + .1 + .push(SelectionLayout::new( + selection.selection, + selection.line_mode, + selection.cursor_shape, + &snapshot.display_snapshot, + false, + false, + )); } - invisible_symbol.paint(origin, line_height, cx); + + selections.extend(remote_selections.into_values()); } - } -} -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -enum Invisible { - Tab { line_start_offset: usize }, - Whitespace { line_offset: usize }, -} + let scrollbar_settings = EditorSettings::get_global(cx).scrollbar; + let show_scrollbars = match scrollbar_settings.show { + ShowScrollbar::Auto => { + // Git + (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) + || + // Selections + (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) + // Scrollmanager + || editor.scroll_manager.scrollbars_visible() + } + ShowScrollbar::System => editor.scroll_manager.scrollbars_visible(), + ShowScrollbar::Always => true, + ShowScrollbar::Never => false, + }; -impl Element for EditorElement { - type ElementState = (); + let fold_ranges: Vec<(BufferRow, Range, Hsla)> = fold_ranges + .into_iter() + .map(|(id, fold)| { + todo!("folds!") + // let color = self + // .style + // .folds + // .ellipses + // .background + // .style_for(&mut cx.mouse_state::(id as usize)) + // .color; - fn id(&self) -> Option { - None - } + // (id, fold, color) + }) + .collect(); - fn initialize( - &mut self, - view_state: &mut Editor, - element_state: Option, - cx: &mut gpui::ViewContext, - ) -> Self::ElementState { - () - } + let head_for_relative = newest_selection_head.unwrap_or_else(|| { + let newest = editor.selections.newest::(cx); + SelectionLayout::new( + newest, + editor.selections.line_mode, + editor.cursor_shape, + &snapshot.display_snapshot, + true, + true, + ) + .head + }); - fn layout( - &mut self, - view_state: &mut Editor, - element_state: &mut Self::ElementState, - cx: &mut gpui::ViewContext, - ) -> gpui::LayoutId { - let rem_size = cx.rem_size(); - let mut style = Style::default(); - style.size.width = relative(1.).into(); - style.size.height = relative(1.).into(); - cx.request_layout(&style, None) - } + let (line_number_layouts, fold_statuses) = self.layout_line_numbers( + start_row..end_row, + &active_rows, + head_for_relative, + is_singleton, + &snapshot, + cx, + ); - fn paint( - &mut self, - bounds: Bounds, - editor: &mut Editor, - element_state: &mut Self::ElementState, - cx: &mut gpui::ViewContext, - ) { - // let mut size = constraint.max; - // if size.x().is_infinite() { - // unimplemented!("we don't yet handle an infinite width constraint on buffer elements"); - // } + let display_hunks = self.layout_git_gutters(start_row..end_row, &snapshot); - let snapshot = editor.snapshot(cx); - let style = self.style.clone(); - let font_id = cx.text_system().font_id(&style.text.font()).unwrap(); - let font_size = style.text.font_size * cx.rem_size(); - let line_height = (font_size * style.line_height_scalar).round(); - let em_width = cx - .text_system() - .typographic_bounds(font_id, font_size, 'm') - .unwrap() - .size - .width; - let em_advance = cx - .text_system() - .advance(font_id, font_size, 'm') - .unwrap() - .width; + let scrollbar_row_range = scroll_position.y..(scroll_position.y + height_in_lines); - let gutter_padding; - let gutter_width; - let gutter_margin; - if snapshot.show_gutter { - let descent = cx.text_system().descent(font_id, font_size).unwrap(); + let mut max_visible_line_width = Pixels::ZERO; + let line_layouts = + self.layout_lines(start_row..end_row, &line_number_layouts, &snapshot, cx); + for line_with_invisibles in &line_layouts { + if line_with_invisibles.line.width() > max_visible_line_width { + max_visible_line_width = line_with_invisibles.line.width(); + } + } - let gutter_padding_factor = 3.5; - gutter_padding = (em_width * gutter_padding_factor).round(); - gutter_width = self.max_line_number_width(&snapshot, cx) + gutter_padding * 2.0; - gutter_margin = -descent; - } else { - gutter_padding = px(0.0); - gutter_width = px(0.0); - gutter_margin = px(0.0); - }; + let longest_line_width = layout_line(snapshot.longest_row(), &snapshot, &style, cx) + .unwrap() + .width(); + let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.width; + // todo!("blocks") + // let (scroll_width, blocks) = self.layout_blocks( + // start_row..end_row, + // &snapshot, + // size.x(), + // scroll_width, + // gutter_padding, + // gutter_width, + // em_width, + // gutter_width + gutter_margin, + // line_height, + // &style, + // &line_layouts, + // editor, + // cx, + // ); - let text_width = bounds.size.width - gutter_width; - let overscroll = size(em_width, px(0.)); - let snapshot = { - editor.set_visible_line_count((bounds.size.height / line_height).into(), cx); + let scroll_max = point( + f32::from((scroll_width - text_size.width) / em_width).max(0.0), + max_row as f32, + ); - let editor_width = text_width - gutter_margin - overscroll.width - em_width; - let wrap_width = match editor.soft_wrap_mode(cx) { - SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance, - SoftWrap::EditorWidth => editor_width, - SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance), - }; + let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x); - if editor.set_wrap_width(Some(wrap_width), cx) { - editor.snapshot(cx) - } else { - snapshot - } + let autoscrolled = if autoscroll_horizontally { + editor.autoscroll_horizontally( + start_row, + text_size.width, + scroll_width, + em_width, + &line_layouts, + cx, + ) + } else { + false }; - let wrap_guides = editor - .wrap_guides(cx) - .iter() - .map(|(guide, active)| (self.column_pixels(*guide, cx), *active)) - .collect::>(); - - let scroll_height = Pixels::from(snapshot.max_point().row() + 1) * line_height; - // todo!("this should happen during layout") - if let EditorMode::AutoHeight { max_lines } = snapshot.mode { - todo!() - // size.set_y( - // scroll_height - // .min(constraint.max_along(Axis::Vertical)) - // .max(constraint.min_along(Axis::Vertical)) - // .max(line_height) - // .min(line_height * max_lines as f32), - // ) - } else if let EditorMode::SingleLine = snapshot.mode { - todo!() - // size.set_y(line_height.max(constraint.min_along(Axis::Vertical))) + if clamped || autoscrolled { + snapshot = editor.snapshot(cx); } - // todo!() - // else if size.y().is_infinite() { - // // size.set_y(scroll_height); - // } - // - let gutter_size = size(gutter_width, bounds.size.height); - let text_size = size(text_width, bounds.size.height); - - let autoscroll_horizontally = - editor.autoscroll_vertically(bounds.size.height, line_height, cx); - let mut snapshot = editor.snapshot(cx); - let scroll_position = snapshot.scroll_position(); - // The scroll position is a fractional point, the whole number of which represents - // the top of the window in terms of display rows. - let start_row = scroll_position.y as u32; - let height_in_lines = f32::from(bounds.size.height / line_height); - let max_row = snapshot.max_point().row(); + // todo!("context menu") + // let mut context_menu = None; + // let mut code_actions_indicator = None; + // if let Some(newest_selection_head) = newest_selection_head { + // if (start_row..end_row).contains(&newest_selection_head.row()) { + // if editor.context_menu_visible() { + // context_menu = + // editor.render_context_menu(newest_selection_head, style.clone(), cx); + // } - // Add 1 to ensure selections bleed off screen - let end_row = 1 + cmp::min((scroll_position.y + height_in_lines).ceil() as u32, max_row); + // let active = matches!( + // editor.context_menu.read().as_ref(), + // Some(crate::ContextMenu::CodeActions(_)) + // ); - let start_anchor = if start_row == 0 { - Anchor::min() - } else { - snapshot - .buffer_snapshot - .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) - }; - let end_anchor = if end_row > max_row { - Anchor::max() - } else { - snapshot - .buffer_snapshot - .anchor_before(DisplayPoint::new(end_row, 0).to_offset(&snapshot, Bias::Right)) - }; + // code_actions_indicator = editor + // .render_code_actions_indicator(&style, active, cx) + // .map(|indicator| (newest_selection_head.row(), indicator)); + // } + // } - let mut selections: Vec<(PlayerColor, Vec)> = Vec::new(); - let mut active_rows = BTreeMap::new(); - let mut fold_ranges = Vec::new(); - let is_singleton = editor.is_singleton(cx); + let visible_rows = start_row..start_row + line_layouts.len() as u32; + // todo!("hover") + // let mut hover = editor.hover_state.render( + // &snapshot, + // &style, + // visible_rows, + // editor.workspace.as_ref().map(|(w, _)| w.clone()), + // cx, + // ); + // let mode = editor.mode; - let highlighted_rows = editor.highlighted_rows(); - let highlighted_ranges = editor.background_highlights_in_range( - start_anchor..end_anchor, - &snapshot.display_snapshot, - cx.theme().colors(), - ); + // todo!("fold_indicators") + // let mut fold_indicators = editor.render_fold_indicators( + // fold_statuses, + // &style, + // editor.gutter_hovered, + // line_height, + // gutter_margin, + // cx, + // ); - fold_ranges.extend( - snapshot - .folds_in_range(start_anchor..end_anchor) - .map(|anchor| { - let start = anchor.start.to_point(&snapshot.buffer_snapshot); - ( - start.row, - start.to_display_point(&snapshot.display_snapshot) - ..anchor.end.to_display_point(&snapshot), - ) - }), - ); + // todo!("context_menu") + // if let Some((_, context_menu)) = context_menu.as_mut() { + // context_menu.layout( + // SizeConstraint { + // min: gpui::Point::zero(), + // max: point( + // cx.window_size().x() * 0.7, + // (12. * line_height).min((size.y() - line_height) / 2.), + // ), + // }, + // editor, + // cx, + // ); + // } - let mut newest_selection_head = None; + // todo!("code actions") + // if let Some((_, indicator)) = code_actions_indicator.as_mut() { + // indicator.layout( + // SizeConstraint::strict_along( + // Axis::Vertical, + // line_height * style.code_actions.vertical_scale, + // ), + // editor, + // cx, + // ); + // } - if editor.show_local_selections { - let mut local_selections: Vec> = editor - .selections - .disjoint_in_range(start_anchor..end_anchor, cx); - local_selections.extend(editor.selections.pending(cx)); - let mut layouts = Vec::new(); - let newest = editor.selections.newest(cx); - for selection in local_selections.drain(..) { - let is_empty = selection.start == selection.end; - let is_newest = selection == newest; + // todo!("fold indicators") + // for fold_indicator in fold_indicators.iter_mut() { + // if let Some(indicator) = fold_indicator.as_mut() { + // indicator.layout( + // SizeConstraint::strict_along( + // Axis::Vertical, + // line_height * style.code_actions.vertical_scale, + // ), + // editor, + // cx, + // ); + // } + // } - let layout = SelectionLayout::new( - selection, - editor.selections.line_mode, - editor.cursor_shape, - &snapshot.display_snapshot, - is_newest, - true, - ); - if is_newest { - newest_selection_head = Some(layout.head); - } + // todo!("hover popovers") + // if let Some((_, hover_popovers)) = hover.as_mut() { + // for hover_popover in hover_popovers.iter_mut() { + // hover_popover.layout( + // SizeConstraint { + // min: gpui::Point::zero(), + // max: point( + // (120. * em_width) // Default size + // .min(size.x() / 2.) // Shrink to half of the editor width + // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters + // (16. * line_height) // Default size + // .min(size.y() / 2.) // Shrink to half of the editor height + // .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines + // ), + // }, + // editor, + // cx, + // ); + // } + // } - for row in cmp::max(layout.active_rows.start, start_row) - ..=cmp::min(layout.active_rows.end, end_row) - { - let contains_non_empty_selection = active_rows.entry(row).or_insert(!is_empty); - *contains_non_empty_selection |= !is_empty; + let invisible_symbol_font_size = font_size / 2.; + let tab_invisible = cx + .text_system() + .layout_text( + "→", + invisible_symbol_font_size, + &[TextRun { + len: "→".len(), + font: self.style.text.font(), + color: cx.theme().colors().editor_invisible, + underline: None, + }], + None, + ) + .unwrap() + .pop() + .unwrap(); + let space_invisible = cx + .text_system() + .layout_text( + "•", + invisible_symbol_font_size, + &[TextRun { + len: "•".len(), + font: self.style.text.font(), + color: cx.theme().colors().editor_invisible, + underline: None, + }], + None, + ) + .unwrap() + .pop() + .unwrap(); + + LayoutState { + mode: editor_mode, + position_map: Arc::new(PositionMap { + size: bounds.size, + scroll_max, + line_layouts, + line_height, + em_width, + em_advance, + snapshot, + }), + visible_display_row_range: start_row..end_row, + wrap_guides, + gutter_size, + gutter_padding, + text_size, + scrollbar_row_range, + show_scrollbars, + is_singleton, + max_row, + gutter_margin, + active_rows, + highlighted_rows, + highlighted_ranges, + fold_ranges, + line_number_layouts, + display_hunks, + // blocks, + selections, + // context_menu, + // code_actions_indicator, + // fold_indicators, + tab_invisible, + space_invisible, + // hover_popovers: hover, + } + } + + // #[allow(clippy::too_many_arguments)] + // fn layout_blocks( + // &mut self, + // rows: Range, + // snapshot: &EditorSnapshot, + // editor_width: f32, + // scroll_width: f32, + // gutter_padding: f32, + // gutter_width: f32, + // em_width: f32, + // text_x: f32, + // line_height: f32, + // style: &EditorStyle, + // line_layouts: &[LineWithInvisibles], + // editor: &mut Editor, + // cx: &mut ViewContext, + // ) -> (f32, Vec) { + // let mut block_id = 0; + // let scroll_x = snapshot.scroll_anchor.offset.x(); + // let (fixed_blocks, non_fixed_blocks) = snapshot + // .blocks_in_range(rows.clone()) + // .partition::, _>(|(_, block)| match block { + // TransformBlock::ExcerptHeader { .. } => false, + // TransformBlock::Custom(block) => block.style() == BlockStyle::Fixed, + // }); + // let mut render_block = |block: &TransformBlock, width: f32, block_id: usize| { + // let mut element = match block { + // TransformBlock::Custom(block) => { + // let align_to = block + // .position() + // .to_point(&snapshot.buffer_snapshot) + // .to_display_point(snapshot); + // let anchor_x = text_x + // + if rows.contains(&align_to.row()) { + // line_layouts[(align_to.row() - rows.start) as usize] + // .line + // .x_for_index(align_to.column() as usize) + // } else { + // layout_line(align_to.row(), snapshot, style, cx.text_layout_cache()) + // .x_for_index(align_to.column() as usize) + // }; + + // block.render(&mut BlockContext { + // view_context: cx, + // anchor_x, + // gutter_padding, + // line_height, + // scroll_x, + // gutter_width, + // em_width, + // block_id, + // }) + // } + // TransformBlock::ExcerptHeader { + // id, + // buffer, + // range, + // starts_new_buffer, + // .. + // } => { + // let tooltip_style = theme::current(cx).tooltip.clone(); + // let include_root = editor + // .project + // .as_ref() + // .map(|project| project.read(cx).visible_worktrees(cx).count() > 1) + // .unwrap_or_default(); + // let jump_icon = project::File::from_dyn(buffer.file()).map(|file| { + // let jump_path = ProjectPath { + // worktree_id: file.worktree_id(cx), + // path: file.path.clone(), + // }; + // let jump_anchor = range + // .primary + // .as_ref() + // .map_or(range.context.start, |primary| primary.start); + // let jump_position = language::ToPoint::to_point(&jump_anchor, buffer); + + // enum JumpIcon {} + // MouseEventHandler::new::((*id).into(), cx, |state, _| { + // let style = style.jump_icon.style_for(state); + // Svg::new("icons/arrow_up_right.svg") + // .with_color(style.color) + // .constrained() + // .with_width(style.icon_width) + // .aligned() + // .contained() + // .with_style(style.container) + // .constrained() + // .with_width(style.button_width) + // .with_height(style.button_width) + // }) + // .with_cursor_style(CursorStyle::PointingHand) + // .on_click(MouseButton::Left, move |_, editor, cx| { + // if let Some(workspace) = editor + // .workspace + // .as_ref() + // .and_then(|(workspace, _)| workspace.upgrade(cx)) + // { + // workspace.update(cx, |workspace, cx| { + // Editor::jump( + // workspace, + // jump_path.clone(), + // jump_position, + // jump_anchor, + // cx, + // ); + // }); + // } + // }) + // .with_tooltip::( + // (*id).into(), + // "Jump to Buffer".to_string(), + // Some(Box::new(crate::OpenExcerpts)), + // tooltip_style.clone(), + // cx, + // ) + // .aligned() + // .flex_float() + // }); + + // if *starts_new_buffer { + // let editor_font_size = style.text.font_size; + // let style = &style.diagnostic_path_header; + // let font_size = (style.text_scale_factor * editor_font_size).round(); + + // let path = buffer.resolve_file_path(cx, include_root); + // let mut filename = None; + // let mut parent_path = None; + // // Can't use .and_then() because `.file_name()` and `.parent()` return references :( + // if let Some(path) = path { + // filename = path.file_name().map(|f| f.to_string_lossy().to_string()); + // parent_path = + // path.parent().map(|p| p.to_string_lossy().to_string() + "/"); + // } + + // Flex::row() + // .with_child( + // Label::new( + // filename.unwrap_or_else(|| "untitled".to_string()), + // style.filename.text.clone().with_font_size(font_size), + // ) + // .contained() + // .with_style(style.filename.container) + // .aligned(), + // ) + // .with_children(parent_path.map(|path| { + // Label::new(path, style.path.text.clone().with_font_size(font_size)) + // .contained() + // .with_style(style.path.container) + // .aligned() + // })) + // .with_children(jump_icon) + // .contained() + // .with_style(style.container) + // .with_padding_left(gutter_padding) + // .with_padding_right(gutter_padding) + // .expanded() + // .into_any_named("path header block") + // } else { + // let text_style = style.text.clone(); + // Flex::row() + // .with_child(Label::new("⋯", text_style)) + // .with_children(jump_icon) + // .contained() + // .with_padding_left(gutter_padding) + // .with_padding_right(gutter_padding) + // .expanded() + // .into_any_named("collapsed context") + // } + // } + // }; + + // element.layout( + // SizeConstraint { + // min: gpui::Point::zero(), + // max: point(width, block.height() as f32 * line_height), + // }, + // editor, + // cx, + // ); + // element + // }; + + // let mut fixed_block_max_width = 0f32; + // let mut blocks = Vec::new(); + // for (row, block) in fixed_blocks { + // let element = render_block(block, f32::INFINITY, block_id); + // block_id += 1; + // fixed_block_max_width = fixed_block_max_width.max(element.size().x() + em_width); + // blocks.push(BlockLayout { + // row, + // element, + // style: BlockStyle::Fixed, + // }); + // } + // for (row, block) in non_fixed_blocks { + // let style = match block { + // TransformBlock::Custom(block) => block.style(), + // TransformBlock::ExcerptHeader { .. } => BlockStyle::Sticky, + // }; + // let width = match style { + // BlockStyle::Sticky => editor_width, + // BlockStyle::Flex => editor_width + // .max(fixed_block_max_width) + // .max(gutter_width + scroll_width), + // BlockStyle::Fixed => unreachable!(), + // }; + // let element = render_block(block, width, block_id); + // block_id += 1; + // blocks.push(BlockLayout { + // row, + // element, + // style, + // }); + // } + // ( + // scroll_width.max(fixed_block_max_width - gutter_width), + // blocks, + // ) + // } +} + +#[derive(Debug)] +pub struct LineWithInvisibles { + pub line: Line, + invisibles: Vec, +} + +impl LineWithInvisibles { + fn from_chunks<'a>( + chunks: impl Iterator>, + text_style: &TextStyle, + max_line_len: usize, + max_line_count: usize, + line_number_layouts: &[Option], + editor_mode: EditorMode, + cx: &WindowContext, + ) -> Vec { + let mut layouts = Vec::with_capacity(max_line_count); + let mut line = String::new(); + let mut invisibles = Vec::new(); + let mut styles = Vec::new(); + let mut non_whitespace_added = false; + let mut row = 0; + let mut line_exceeded_max_len = false; + let font_size = text_style.font_size * cx.rem_size(); + + for highlighted_chunk in chunks.chain([HighlightedChunk { + chunk: "\n", + style: None, + is_tab: false, + }]) { + for (ix, mut line_chunk) in highlighted_chunk.chunk.split('\n').enumerate() { + if ix > 0 { + let layout = cx + .text_system() + .layout_text(&line, font_size, &styles, None); + layouts.push(Self { + line: layout.unwrap().pop().unwrap(), + invisibles: invisibles.drain(..).collect(), + }); + + line.clear(); + styles.clear(); + row += 1; + line_exceeded_max_len = false; + non_whitespace_added = false; + if row == max_line_count { + return layouts; + } } - layouts.push(layout); - } - selections.push((style.local_player, layouts)); - } + if !line_chunk.is_empty() && !line_exceeded_max_len { + let text_style = if let Some(style) = highlighted_chunk.style { + text_style + .clone() + .highlight(style) + .map(Cow::Owned) + .unwrap_or_else(|_| Cow::Borrowed(text_style)) + } else { + Cow::Borrowed(text_style) + }; - if let Some(collaboration_hub) = &editor.collaboration_hub { - // When following someone, render the local selections in their color. - if let Some(leader_id) = editor.leader_peer_id { - if let Some(collaborator) = collaboration_hub.collaborators(cx).get(&leader_id) { - if let Some(participant_index) = collaboration_hub - .user_participant_indices(cx) - .get(&collaborator.user_id) - { - if let Some((local_selection_style, _)) = selections.first_mut() { - *local_selection_style = cx - .theme() - .players() - .color_for_participant(participant_index.0); + if line.len() + line_chunk.len() > max_line_len { + let mut chunk_len = max_line_len - line.len(); + while !line_chunk.is_char_boundary(chunk_len) { + chunk_len -= 1; } + line_chunk = &line_chunk[..chunk_len]; + line_exceeded_max_len = true; } - } - } - let mut remote_selections = HashMap::default(); - for selection in snapshot.remote_selections_in_range( - &(start_anchor..end_anchor), - collaboration_hub.as_ref(), - cx, - ) { - let selection_style = if let Some(participant_index) = selection.participant_index { - cx.theme() - .players() - .color_for_participant(participant_index.0) - } else { - cx.theme().players().absent() - }; + styles.push(TextRun { + len: line_chunk.len(), + font: text_style.font(), + color: text_style.color, + underline: text_style.underline, + }); - // Don't re-render the leader's selections, since the local selections - // match theirs. - if Some(selection.peer_id) == editor.leader_peer_id { - continue; - } + if editor_mode == EditorMode::Full { + // Line wrap pads its contents with fake whitespaces, + // avoid printing them + let inside_wrapped_string = line_number_layouts + .get(row) + .and_then(|layout| layout.as_ref()) + .is_none(); + if highlighted_chunk.is_tab { + if non_whitespace_added || !inside_wrapped_string { + invisibles.push(Invisible::Tab { + line_start_offset: line.len(), + }); + } + } else { + invisibles.extend( + line_chunk + .chars() + .enumerate() + .filter(|(_, line_char)| { + let is_whitespace = line_char.is_whitespace(); + non_whitespace_added |= !is_whitespace; + is_whitespace + && (non_whitespace_added || !inside_wrapped_string) + }) + .map(|(whitespace_index, _)| Invisible::Whitespace { + line_offset: line.len() + whitespace_index, + }), + ) + } + } - remote_selections - .entry(selection.replica_id) - .or_insert((selection_style, Vec::new())) - .1 - .push(SelectionLayout::new( - selection.selection, - selection.line_mode, - selection.cursor_shape, - &snapshot.display_snapshot, - false, - false, - )); + line.push_str(line_chunk); + } } - - selections.extend(remote_selections.into_values()); } - let scrollbar_settings = EditorSettings::get_global(cx).scrollbar; - let show_scrollbars = match scrollbar_settings.show { - ShowScrollbar::Auto => { - // Git - (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) - || - // Selections - (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) - // Scrollmanager - || editor.scroll_manager.scrollbars_visible() - } - ShowScrollbar::System => editor.scroll_manager.scrollbars_visible(), - ShowScrollbar::Always => true, - ShowScrollbar::Never => false, - }; - - let fold_ranges: Vec<(BufferRow, Range, Hsla)> = fold_ranges - .into_iter() - .map(|(id, fold)| { - todo!("folds!") - // let color = self - // .style - // .folds - // .ellipses - // .background - // .style_for(&mut cx.mouse_state::(id as usize)) - // .color; - - // (id, fold, color) - }) - .collect(); + layouts + } - let head_for_relative = newest_selection_head.unwrap_or_else(|| { - let newest = editor.selections.newest::(cx); - SelectionLayout::new( - newest, - editor.selections.line_mode, - editor.cursor_shape, - &snapshot.display_snapshot, - true, - true, - ) - .head - }); + fn draw( + &self, + layout: &LayoutState, + row: u32, + scroll_top: Pixels, + content_origin: gpui::Point, + scroll_left: Pixels, + visible_text_bounds: Bounds, + whitespace_setting: ShowWhitespaceSetting, + selection_ranges: &[Range], + cx: &mut ViewContext, + ) { + let line_height = layout.position_map.line_height; + let line_y = line_height * row as f32 - scroll_top; - let (line_number_layouts, fold_statuses) = self.layout_line_numbers( - start_row..end_row, - &active_rows, - head_for_relative, - is_singleton, - &snapshot, + self.line.paint( + content_origin + gpui::point(-scroll_left, line_y), + line_height, cx, ); - let display_hunks = self.layout_git_gutters(start_row..end_row, &snapshot); - - let scrollbar_row_range = scroll_position.y..(scroll_position.y + height_in_lines); - - let mut max_visible_line_width = Pixels::ZERO; - let line_layouts = - self.layout_lines(start_row..end_row, &line_number_layouts, &snapshot, cx); - for line_with_invisibles in &line_layouts { - if line_with_invisibles.line.width() > max_visible_line_width { - max_visible_line_width = line_with_invisibles.line.width(); - } - } - - let longest_line_width = layout_line(snapshot.longest_row(), &snapshot, &style, cx) - .unwrap() - .width(); - let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.width; - // todo!("blocks") - // let (scroll_width, blocks) = self.layout_blocks( - // start_row..end_row, - // &snapshot, - // size.x(), - // scroll_width, - // gutter_padding, - // gutter_width, - // em_width, - // gutter_width + gutter_margin, - // line_height, - // &style, - // &line_layouts, - // editor, - // cx, - // ); - - let scroll_max = point( - f32::from((scroll_width - text_size.width) / em_width).max(0.0), - max_row as f32, + self.draw_invisibles( + &selection_ranges, + layout, + content_origin, + scroll_left, + line_y, + row, + line_height, + whitespace_setting, + cx, ); + } - let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x); - - let autoscrolled = if autoscroll_horizontally { - editor.autoscroll_horizontally( - start_row, - text_size.width, - scroll_width, - em_width, - &line_layouts, - cx, - ) - } else { - false + fn draw_invisibles( + &self, + selection_ranges: &[Range], + layout: &LayoutState, + content_origin: gpui::Point, + scroll_left: Pixels, + line_y: Pixels, + row: u32, + line_height: Pixels, + whitespace_setting: ShowWhitespaceSetting, + cx: &mut ViewContext, + ) { + let allowed_invisibles_regions = match whitespace_setting { + ShowWhitespaceSetting::None => return, + ShowWhitespaceSetting::Selection => Some(selection_ranges), + ShowWhitespaceSetting::All => None, }; - if clamped || autoscrolled { - snapshot = editor.snapshot(cx); - } - - // todo!("context menu") - // let mut context_menu = None; - // let mut code_actions_indicator = None; - // if let Some(newest_selection_head) = newest_selection_head { - // if (start_row..end_row).contains(&newest_selection_head.row()) { - // if editor.context_menu_visible() { - // context_menu = - // editor.render_context_menu(newest_selection_head, style.clone(), cx); - // } + for invisible in &self.invisibles { + let (&token_offset, invisible_symbol) = match invisible { + Invisible::Tab { line_start_offset } => (line_start_offset, &layout.tab_invisible), + Invisible::Whitespace { line_offset } => (line_offset, &layout.space_invisible), + }; - // let active = matches!( - // editor.context_menu.read().as_ref(), - // Some(crate::ContextMenu::CodeActions(_)) - // ); + let x_offset = self.line.x_for_index(token_offset); + let invisible_offset = (layout.position_map.em_width - invisible_symbol.width()) + .max(Pixels::from(0.0)) + / 2.0; + let origin = + content_origin + gpui::point(-scroll_left + x_offset + invisible_offset, line_y); - // code_actions_indicator = editor - // .render_code_actions_indicator(&style, active, cx) - // .map(|indicator| (newest_selection_head.row(), indicator)); - // } - // } + if let Some(allowed_regions) = allowed_invisibles_regions { + let invisible_point = DisplayPoint::new(row, token_offset as u32); + if !allowed_regions + .iter() + .any(|region| region.start <= invisible_point && invisible_point < region.end) + { + continue; + } + } + invisible_symbol.paint(origin, line_height, cx); + } + } +} - let visible_rows = start_row..start_row + line_layouts.len() as u32; - // todo!("hover") - // let mut hover = editor.hover_state.render( - // &snapshot, - // &style, - // visible_rows, - // editor.workspace.as_ref().map(|(w, _)| w.clone()), - // cx, - // ); - // let mode = editor.mode; +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum Invisible { + Tab { line_start_offset: usize }, + Whitespace { line_offset: usize }, +} - // todo!("fold_indicators") - // let mut fold_indicators = editor.render_fold_indicators( - // fold_statuses, - // &style, - // editor.gutter_hovered, - // line_height, - // gutter_margin, - // cx, - // ); +impl Element for EditorElement { + type ElementState = (); - // todo!("context_menu") - // if let Some((_, context_menu)) = context_menu.as_mut() { - // context_menu.layout( - // SizeConstraint { - // min: gpui::Point::zero(), - // max: vec2f( - // cx.window_size().x() * 0.7, - // (12. * line_height).min((size.y() - line_height) / 2.), - // ), - // }, - // editor, - // cx, - // ); - // } + fn id(&self) -> Option { + None + } - // todo!("code actions") - // if let Some((_, indicator)) = code_actions_indicator.as_mut() { - // indicator.layout( - // SizeConstraint::strict_along( - // Axis::Vertical, - // line_height * style.code_actions.vertical_scale, - // ), - // editor, - // cx, - // ); - // } + fn initialize( + &mut self, + view_state: &mut Editor, + element_state: Option, + cx: &mut gpui::ViewContext, + ) -> Self::ElementState { + () + } - // todo!("fold indicators") - // for fold_indicator in fold_indicators.iter_mut() { - // if let Some(indicator) = fold_indicator.as_mut() { - // indicator.layout( - // SizeConstraint::strict_along( - // Axis::Vertical, - // line_height * style.code_actions.vertical_scale, - // ), - // editor, - // cx, - // ); - // } - // } + fn layout( + &mut self, + view_state: &mut Editor, + element_state: &mut Self::ElementState, + cx: &mut gpui::ViewContext, + ) -> gpui::LayoutId { + let rem_size = cx.rem_size(); + let mut style = Style::default(); + style.size.width = relative(1.).into(); + style.size.height = relative(1.).into(); + cx.request_layout(&style, None) + } - // todo!("hover popovers") - // if let Some((_, hover_popovers)) = hover.as_mut() { - // for hover_popover in hover_popovers.iter_mut() { - // hover_popover.layout( - // SizeConstraint { - // min: gpui::Point::zero(), - // max: vec2f( - // (120. * em_width) // Default size - // .min(size.x() / 2.) // Shrink to half of the editor width - // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters - // (16. * line_height) // Default size - // .min(size.y() / 2.) // Shrink to half of the editor height - // .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines - // ), - // }, - // editor, - // cx, - // ); - // } - // } + fn paint( + &mut self, + bounds: Bounds, + editor: &mut Editor, + element_state: &mut Self::ElementState, + cx: &mut gpui::ViewContext, + ) { + let layout = self.compute_layout(editor, cx, bounds); + cx.with_content_mask(ContentMask { bounds }, |cx| { + let gutter_bounds = Bounds { + origin: bounds.origin, + size: layout.gutter_size, + }; + let text_bounds = Bounds { + origin: gutter_bounds.upper_right(), + size: layout.text_size, + }; - // let invisible_symbol_font_size = self.style.text.font_size / 2.0; - // let invisible_symbol_style = RunStyle { - // color: self.style.whitespace, - // font_id: self.style.text.font_id, - // underline: Default::default(), - // }; - // + self.paint_background(gutter_bounds, text_bounds, &layout, cx); + }); } } @@ -2515,7 +2615,7 @@ impl Element for EditorElement { // let text_width = size.x() - gutter_width; // let em_width = style.text.em_width(cx.font_cache()); // let em_advance = style.text.em_advance(cx.font_cache()); -// let overscroll = vec2f(em_width, 0.); +// let overscroll = point(em_width, 0.); // let snapshot = { // editor.set_visible_line_count(size.y() / line_height, cx); @@ -2553,8 +2653,8 @@ impl Element for EditorElement { // } else if size.y().is_infinite() { // size.set_y(scroll_height); // } -// let gutter_size = vec2f(gutter_width, size.y()); -// let text_size = vec2f(text_width, size.y()); +// let gutter_size = point(gutter_width, size.y()); +// let text_size = point(text_width, size.y()); // let autoscroll_horizontally = editor.autoscroll_vertically(size.y(), line_height, cx); // let mut snapshot = editor.snapshot(cx); @@ -2793,7 +2893,7 @@ impl Element for EditorElement { // cx, // ); -// let scroll_max = vec2f( +// let scroll_max = point( // ((scroll_width - text_size.x()) / em_width).max(0.0), // max_row as f32, // ); @@ -2862,7 +2962,7 @@ impl Element for EditorElement { // context_menu.layout( // SizeConstraint { // min: gpui::Point::zero(), -// max: vec2f( +// max: point( // cx.window_size().x() * 0.7, // (12. * line_height).min((size.y() - line_height) / 2.), // ), @@ -2901,7 +3001,7 @@ impl Element for EditorElement { // hover_popover.layout( // SizeConstraint { // min: gpui::Point::zero(), -// max: vec2f( +// max: point( // (120. * em_width) // Default size // .min(size.x() / 2.) // Shrink to half of the editor width // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters @@ -2985,7 +3085,7 @@ impl Element for EditorElement { // let gutter_bounds = Bounds::new(bounds.origin(), layout.gutter_size); // let text_bounds = Bounds::new( -// bounds.origin() + vec2f(layout.gutter_size.x(), 0.0), +// bounds.origin() + point(layout.gutter_size.x(), 0.0), // layout.text_size, // ); @@ -3025,10 +3125,10 @@ impl Element for EditorElement { // _: &ViewContext, // ) -> Option> { // let text_bounds = Bounds::new( -// bounds.origin() + vec2f(layout.gutter_size.x(), 0.0), +// bounds.origin() + point(layout.gutter_size.x(), 0.0), // layout.text_size, // ); -// let content_origin = text_bounds.origin() + vec2f(layout.gutter_margin, 0.); +// let content_origin = text_bounds.origin() + point(layout.gutter_margin, 0.); // let scroll_position = layout.position_map.snapshot.scroll_position(); // let start_row = scroll_position.y() as u32; // let scroll_top = scroll_position.y() * layout.position_map.line_height; @@ -3049,12 +3149,12 @@ impl Element for EditorElement { // let range_start_y = range_start.row() as f32 * layout.position_map.line_height; // Some(Bounds::new( // content_origin -// + vec2f( +// + point( // range_start_x, // range_start_y + layout.position_map.line_height, // ) -// - vec2f(scroll_left, scroll_top), -// vec2f( +// - point(scroll_left, scroll_top), +// point( // layout.position_map.em_width, // layout.position_map.line_height, // ), @@ -3080,18 +3180,18 @@ type BufferRow = u32; pub struct LayoutState { position_map: Arc, - gutter_size: gpui::Point, - gutter_padding: f32, - gutter_margin: f32, - text_size: gpui::Point, + gutter_size: Size, + gutter_padding: Pixels, + gutter_margin: Pixels, + text_size: gpui::Size, mode: EditorMode, - wrap_guides: SmallVec<[(f32, bool); 2]>, + wrap_guides: SmallVec<[(Pixels, bool); 2]>, visible_display_row_range: Range, active_rows: BTreeMap, highlighted_rows: Option>, line_number_layouts: Vec>, display_hunks: Vec, - blocks: Vec, + // blocks: Vec, highlighted_ranges: Vec<(Range, Hsla)>, fold_ranges: Vec<(BufferRow, Range, Hsla)>, selections: Vec<(PlayerColor, Vec)>, @@ -3099,10 +3199,10 @@ pub struct LayoutState { show_scrollbars: bool, is_singleton: bool, max_row: u32, - context_menu: Option<(DisplayPoint, AnyElement)>, - code_actions_indicator: Option<(u32, AnyElement)>, - hover_popovers: Option<(DisplayPoint, Vec>)>, - fold_indicators: Vec>>, + // context_menu: Option<(DisplayPoint, AnyElement)>, + // code_actions_indicator: Option<(u32, AnyElement)>, + // hover_popovers: Option<(DisplayPoint, Vec>)>, + // fold_indicators: Vec>>, tab_invisible: Line, space_invisible: Line, } @@ -3110,7 +3210,7 @@ pub struct LayoutState { struct PositionMap { size: Size, line_height: Pixels, - scroll_max: Size, + scroll_max: gpui::Point, em_width: Pixels, em_advance: Pixels, line_layouts: Vec, @@ -3237,69 +3337,76 @@ pub struct Cursor { } impl Cursor { - // pub fn new( - // origin: gpui::Point, - // block_width: f32, - // line_height: f32, - // color: Color, - // shape: CursorShape, - // block_text: Option, - // ) -> Cursor { - // Cursor { - // origin, - // block_width, - // line_height, - // color, - // shape, - // block_text, - // } - // } + pub fn new( + origin: gpui::Point, + block_width: Pixels, + line_height: Pixels, + color: Hsla, + shape: CursorShape, + block_text: Option, + ) -> Cursor { + Cursor { + origin, + block_width, + line_height, + color, + shape, + block_text, + } + } - // pub fn bounding_rect(&self, origin: gpui::Point) -> Bounds { - // Bounds::new( - // self.origin + origin, - // vec2f(self.block_width, self.line_height), - // ) - // } + pub fn bounding_rect(&self, origin: gpui::Point) -> Bounds { + Bounds { + origin: self.origin + origin, + size: size(self.block_width, self.line_height), + } + } - // pub fn paint(&self, origin: gpui::Point, cx: &mut WindowContext) { - // let bounds = match self.shape { - // CursorShape::Bar => Bounds::new(self.origin + origin, vec2f(2.0, self.line_height)), - // CursorShape::Block | CursorShape::Hollow => Bounds::new( - // self.origin + origin, - // vec2f(self.block_width, self.line_height), - // ), - // CursorShape::Underscore => Bounds::new( - // self.origin + origin + gpui::Point::new(0.0, self.line_height - 2.0), - // vec2f(self.block_width, 2.0), - // ), - // }; + pub fn paint(&self, origin: gpui::Point, cx: &mut WindowContext) { + let bounds = match self.shape { + CursorShape::Bar => Bounds { + origin: self.origin + origin, + size: size(px(2.0), self.line_height), + }, + CursorShape::Block | CursorShape::Hollow => Bounds { + origin: self.origin + origin, + size: size(self.block_width, self.line_height), + }, + CursorShape::Underscore => Bounds { + origin: self.origin + + origin + + gpui::Point::new(px(0.0), self.line_height - px(2.0)), + size: size(self.block_width, px(2.0)), + }, + }; - // //Draw background or border quad - // if matches!(self.shape, CursorShape::Hollow) { - // cx.scene().push_quad(Quad { - // bounds, - // background: None, - // border: Border::all(1., self.color).into(), - // corner_radii: Default::default(), - // }); - // } else { - // cx.scene().push_quad(Quad { - // bounds, - // background: Some(self.color), - // border: Default::default(), - // corner_radii: Default::default(), - // }); - // } + //Draw background or border quad + if matches!(self.shape, CursorShape::Hollow) { + cx.paint_quad( + bounds, + Corners::default(), + transparent_black(), + Edges::all(px(1.)), + self.color, + ); + } else { + cx.paint_quad( + bounds, + Corners::default(), + self.color, + Edges::default(), + transparent_black(), + ); + } - // if let Some(block_text) = &self.block_text { - // block_text.paint(self.origin + origin, bounds, self.line_height, cx); - // } - // } + if let Some(block_text) = &self.block_text { + block_text.paint(self.origin + origin, self.line_height, cx); + } + } - // pub fn shape(&self) -> CursorShape { - // self.shape - // } + pub fn shape(&self) -> CursorShape { + self.shape + } } #[derive(Debug)] @@ -3313,130 +3420,129 @@ pub struct HighlightedRange { #[derive(Debug)] pub struct HighlightedRangeLine { - pub start_x: f32, - pub end_x: f32, + pub start_x: Pixels, + pub end_x: Pixels, } impl HighlightedRange { - // pub fn paint(&self, bounds: Bounds, cx: &mut WindowContext) { - // if self.lines.len() >= 2 && self.lines[0].start_x > self.lines[1].end_x { - // self.paint_lines(self.start_y, &self.lines[0..1], bounds, cx); - // self.paint_lines( - // self.start_y + self.line_height, - // &self.lines[1..], - // bounds, - // cx, - // ); - // } else { - // self.paint_lines(self.start_y, &self.lines, bounds, cx); - // } - // } + pub fn paint(&self, bounds: Bounds, cx: &mut WindowContext) { + if self.lines.len() >= 2 && self.lines[0].start_x > self.lines[1].end_x { + self.paint_lines(self.start_y, &self.lines[0..1], bounds, cx); + self.paint_lines( + self.start_y + self.line_height, + &self.lines[1..], + bounds, + cx, + ); + } else { + self.paint_lines(self.start_y, &self.lines, bounds, cx); + } + } - // fn paint_lines( - // &self, - // start_y: f32, - // lines: &[HighlightedRangeLine], - // bounds: Bounds, - // cx: &mut WindowContext, - // ) { - // if lines.is_empty() { - // return; - // } + fn paint_lines( + &self, + start_y: Pixels, + lines: &[HighlightedRangeLine], + bounds: Bounds, + cx: &mut WindowContext, + ) { + if lines.is_empty() { + return; + } - // let mut path = PathBuilder::new(); - // let first_line = lines.first().unwrap(); - // let last_line = lines.last().unwrap(); + let first_line = lines.first().unwrap(); + let last_line = lines.last().unwrap(); - // let first_top_left = vec2f(first_line.start_x, start_y); - // let first_top_right = vec2f(first_line.end_x, start_y); + let first_top_left = point(first_line.start_x, start_y); + let first_top_right = point(first_line.end_x, start_y); - // let curve_height = vec2f(0., self.corner_radius); - // let curve_width = |start_x: f32, end_x: f32| { - // let max = (end_x - start_x) / 2.; - // let width = if max < self.corner_radius { - // max - // } else { - // self.corner_radius - // }; + let curve_height = point(Pixels::ZERO, self.corner_radius); + let curve_width = |start_x: Pixels, end_x: Pixels| { + let max = (end_x - start_x) / 2.; + let width = if max < self.corner_radius { + max + } else { + self.corner_radius + }; - // vec2f(width, 0.) - // }; + point(width, Pixels::ZERO) + }; - // let top_curve_width = curve_width(first_line.start_x, first_line.end_x); - // path.reset(first_top_right - top_curve_width); - // path.curve_to(first_top_right + curve_height, first_top_right); + let top_curve_width = curve_width(first_line.start_x, first_line.end_x); + let mut path = gpui::Path::new(first_top_right - top_curve_width); + path.curve_to(first_top_right + curve_height, first_top_right); - // let mut iter = lines.iter().enumerate().peekable(); - // while let Some((ix, line)) = iter.next() { - // let bottom_right = vec2f(line.end_x, start_y + (ix + 1) as f32 * self.line_height); + let mut iter = lines.iter().enumerate().peekable(); + while let Some((ix, line)) = iter.next() { + let bottom_right = point(line.end_x, start_y + (ix + 1) as f32 * self.line_height); - // if let Some((_, next_line)) = iter.peek() { - // let next_top_right = vec2f(next_line.end_x, bottom_right.y()); + if let Some((_, next_line)) = iter.peek() { + let next_top_right = point(next_line.end_x, bottom_right.y); - // match next_top_right.x().partial_cmp(&bottom_right.x()).unwrap() { - // Ordering::Equal => { - // path.line_to(bottom_right); - // } - // Ordering::Less => { - // let curve_width = curve_width(next_top_right.x(), bottom_right.x()); - // path.line_to(bottom_right - curve_height); - // if self.corner_radius > 0. { - // path.curve_to(bottom_right - curve_width, bottom_right); - // } - // path.line_to(next_top_right + curve_width); - // if self.corner_radius > 0. { - // path.curve_to(next_top_right + curve_height, next_top_right); - // } - // } - // Ordering::Greater => { - // let curve_width = curve_width(bottom_right.x(), next_top_right.x()); - // path.line_to(bottom_right - curve_height); - // if self.corner_radius > 0. { - // path.curve_to(bottom_right + curve_width, bottom_right); - // } - // path.line_to(next_top_right - curve_width); - // if self.corner_radius > 0. { - // path.curve_to(next_top_right + curve_height, next_top_right); - // } - // } - // } - // } else { - // let curve_width = curve_width(line.start_x, line.end_x); - // path.line_to(bottom_right - curve_height); - // if self.corner_radius > 0. { - // path.curve_to(bottom_right - curve_width, bottom_right); - // } + match next_top_right.x.partial_cmp(&bottom_right.x).unwrap() { + Ordering::Equal => { + path.line_to(bottom_right); + } + Ordering::Less => { + let curve_width = curve_width(next_top_right.x, bottom_right.x); + path.line_to(bottom_right - curve_height); + if self.corner_radius > Pixels::ZERO { + path.curve_to(bottom_right - curve_width, bottom_right); + } + path.line_to(next_top_right + curve_width); + if self.corner_radius > Pixels::ZERO { + path.curve_to(next_top_right + curve_height, next_top_right); + } + } + Ordering::Greater => { + let curve_width = curve_width(bottom_right.x, next_top_right.x); + path.line_to(bottom_right - curve_height); + if self.corner_radius > Pixels::ZERO { + path.curve_to(bottom_right + curve_width, bottom_right); + } + path.line_to(next_top_right - curve_width); + if self.corner_radius > Pixels::ZERO { + path.curve_to(next_top_right + curve_height, next_top_right); + } + } + } + } else { + let curve_width = curve_width(line.start_x, line.end_x); + path.line_to(bottom_right - curve_height); + if self.corner_radius > Pixels::ZERO { + path.curve_to(bottom_right - curve_width, bottom_right); + } - // let bottom_left = vec2f(line.start_x, bottom_right.y()); - // path.line_to(bottom_left + curve_width); - // if self.corner_radius > 0. { - // path.curve_to(bottom_left - curve_height, bottom_left); - // } - // } - // } + let bottom_left = point(line.start_x, bottom_right.y); + path.line_to(bottom_left + curve_width); + if self.corner_radius > Pixels::ZERO { + path.curve_to(bottom_left - curve_height, bottom_left); + } + } + } - // if first_line.start_x > last_line.start_x { - // let curve_width = curve_width(last_line.start_x, first_line.start_x); - // let second_top_left = vec2f(last_line.start_x, start_y + self.line_height); - // path.line_to(second_top_left + curve_height); - // if self.corner_radius > 0. { - // path.curve_to(second_top_left + curve_width, second_top_left); - // } - // let first_bottom_left = vec2f(first_line.start_x, second_top_left.y()); - // path.line_to(first_bottom_left - curve_width); - // if self.corner_radius > 0. { - // path.curve_to(first_bottom_left - curve_height, first_bottom_left); - // } - // } + if first_line.start_x > last_line.start_x { + let curve_width = curve_width(last_line.start_x, first_line.start_x); + let second_top_left = point(last_line.start_x, start_y + self.line_height); + path.line_to(second_top_left + curve_height); + if self.corner_radius > Pixels::ZERO { + path.curve_to(second_top_left + curve_width, second_top_left); + } + let first_bottom_left = point(first_line.start_x, second_top_left.y); + path.line_to(first_bottom_left - curve_width); + if self.corner_radius > Pixels::ZERO { + path.curve_to(first_bottom_left - curve_height, first_bottom_left); + } + } - // path.line_to(first_top_left + curve_height); - // if self.corner_radius > 0. { - // path.curve_to(first_top_left + top_curve_width, first_top_left); - // } - // path.line_to(first_top_right - top_curve_width); + path.line_to(first_top_left + curve_height); + if self.corner_radius > Pixels::ZERO { + path.curve_to(first_top_left + top_curve_width, first_top_left); + } + path.line_to(first_top_right - top_curve_width); - // cx.scene().push_path(path.build(self.color, Some(bounds))); - // } + cx.paint_path(path, self.color); + } } // fn range_to_bounds( @@ -3483,8 +3589,8 @@ impl HighlightedRange { // }; // bounds.push(Bounds::from_points( -// vec2f(start_x, first_y + position_map.line_height * idx as f32), -// vec2f(end_x, first_y + position_map.line_height * (idx + 1) as f32), +// point(start_x, first_y + position_map.line_height * idx as f32), +// point(end_x, first_y + position_map.line_height * (idx + 1) as f32), // )) // } @@ -3594,7 +3700,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // ]); // }); // element.layout( -// SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)), +// SizeConstraint::new(point(500., 500.), point(500., 500.)), // editor, // cx, // ) @@ -3678,7 +3784,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // ]); // }); // element.layout( -// SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)), +// SizeConstraint::new(point(500., 500.), point(500., 500.)), // editor, // cx, // ) @@ -3737,7 +3843,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // let mut element = EditorElement::new(editor.read_with(cx, |editor, cx| editor.style(cx))); // let (size, mut state) = editor.update(cx, |editor, cx| { // element.layout( -// SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)), +// SizeConstraint::new(point(500., 500.), point(500., 500.)), // editor, // cx, // ) @@ -3925,7 +4031,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // editor.set_wrap_width(Some(editor_width), cx); // element.layout( -// SizeConstraint::new(vec2f(editor_width, 500.), vec2f(editor_width, 500.)), +// SizeConstraint::new(point(editor_width, 500.), point(editor_width, 500.)), // editor, // cx, // ) diff --git a/crates/gpui2/src/color.rs b/crates/gpui2/src/color.rs index db072594760f160a303020af20021e05d74db300..77f8ebdf41cad82bd16a36380814d8bf1c946cd1 100644 --- a/crates/gpui2/src/color.rs +++ b/crates/gpui2/src/color.rs @@ -176,6 +176,15 @@ pub fn black() -> Hsla { } } +pub fn transparent_black() -> Hsla { + Hsla { + h: 0., + s: 0., + l: 0., + a: 0., + } +} + pub fn white() -> Hsla { Hsla { h: 0., diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index 91d1401e19ade32624978237a0193afb64f765d5..9b0c77957296f1f83a5ee0acbfff868fcc7de91f 100644 --- a/crates/gpui2/src/geometry.rs +++ b/crates/gpui2/src/geometry.rs @@ -492,6 +492,15 @@ where impl Copy for Edges {} impl Edges { + pub fn all(value: T) -> Self { + Self { + top: value.clone(), + right: value.clone(), + bottom: value.clone(), + left: value, + } + } + pub fn map(&self, f: impl Fn(&T) -> U) -> Edges where U: Clone + Default + Debug, diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index a946ffb9c4755bd5f2aadcff943880a7c4be97c3..866d35cb622b8b3e08b4d3db870bf2fc624a7fe8 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -103,10 +103,15 @@ pub struct ThemeColors { pub tab_inactive: Hsla, pub tab_active: Hsla, pub editor: Hsla, + pub editor_gutter: Hsla, pub editor_subheader: Hsla, pub editor_active_line: Hsla, + pub editor_highlighted_line: Hsla, pub editor_line_number: Hsla, pub editor_active_line_number: Hsla, + pub editor_invisible: Hsla, + pub editor_wrap_guide: Hsla, + pub editor_active_wrap_guide: Hsla, } #[derive(Refineable, Clone)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 7b419a1d04b5486056552792270cfd3d2c3ed502..da2608da62f04b37e07773660912a7608d8d7a6c 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -238,10 +238,15 @@ impl ThemeColors { tab_active: neutral().light().step_1(), tab_inactive: neutral().light().step_2(), editor: neutral().light().step_1(), + editor_gutter: neutral().light().step_1(), // todo!("pick the right colors") editor_subheader: neutral().light().step_2(), editor_active_line: neutral().light_alpha().step_3(), editor_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors") editor_active_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors") + editor_highlighted_line: neutral().light_alpha().step_4(), // todo!("pick the right colors") + editor_invisible: neutral().light_alpha().step_4(), // todo!("pick the right colors") + editor_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors") + editor_active_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors") } } @@ -285,10 +290,15 @@ impl ThemeColors { tab_active: neutral().dark().step_1(), tab_inactive: neutral().dark().step_2(), editor: neutral().dark().step_1(), + editor_gutter: neutral().dark().step_1(), // todo!("pick the right colors") editor_subheader: neutral().dark().step_2(), editor_active_line: neutral().dark_alpha().step_3(), editor_line_number: neutral().dark_alpha().step_3(), // todo!("pick the right colors") editor_active_line_number: neutral().dark_alpha().step_3(), // todo!("pick the right colors") + editor_highlighted_line: neutral().dark_alpha().step_4(), // todo!("pick the right colors") + editor_invisible: neutral().dark_alpha().step_4(), // todo!("pick the right colors") + editor_wrap_guide: neutral().dark_alpha().step_4(), // todo!("pick the right colors") + editor_active_wrap_guide: neutral().dark_alpha().step_4(), // todo!("pick the right colors") } } } From b9d8e081655d75992715aaa56de912379266fb83 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 10:57:15 -0500 Subject: [PATCH 024/110] Add Andromeda source theme --- assets/themes/src/vscode/andromeda/LICENSE | 7 + .../vscode/andromeda/andromeda-bordered.json | 369 ++++++++++++++++++ .../src/vscode/andromeda/andromeda.json | 367 +++++++++++++++++ .../themes/src/vscode/andromeda/family.json | 16 + 4 files changed, 759 insertions(+) create mode 100644 assets/themes/src/vscode/andromeda/LICENSE create mode 100644 assets/themes/src/vscode/andromeda/andromeda-bordered.json create mode 100644 assets/themes/src/vscode/andromeda/andromeda.json create mode 100644 assets/themes/src/vscode/andromeda/family.json diff --git a/assets/themes/src/vscode/andromeda/LICENSE b/assets/themes/src/vscode/andromeda/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..82d25d5061f32e908b6490862f76fb2aa8ead832 --- /dev/null +++ b/assets/themes/src/vscode/andromeda/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2017 eliverlara@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets/themes/src/vscode/andromeda/andromeda-bordered.json b/assets/themes/src/vscode/andromeda/andromeda-bordered.json new file mode 100644 index 0000000000000000000000000000000000000000..c59ece1ee1fded14e79ad90f943ce03127ddc9a3 --- /dev/null +++ b/assets/themes/src/vscode/andromeda/andromeda-bordered.json @@ -0,0 +1,369 @@ +{ + "name": "Andromeda Bordered", + "type": "dark", + "colors": { + "focusBorder": "#746f77", + "foreground": "#D5CED9", + "widget.shadow": "#14151A", + "selection.background": "#746f77", + "errorForeground": "#FC644D", + + "button.background": "#00e8c5cc", + "button.hoverBackground": "#07d4b6cc", + + "dropdown.background": "#2b303b", + "dropdown.border": "#363c49", + + "input.background": "#2b303b", + "input.placeholderForeground": "#746f77", + "inputOption.activeBorder": "#C668BA", + "inputValidation.errorBackground": "#D65343", + "inputValidation.errorBorder": "#D65343", + "inputValidation.infoBackground": "#3A6395", + "inputValidation.infoBorder": "#3A6395", + "inputValidation.warningBackground": "#DE9237", + "inputValidation.warningBorder": "#DE9237", + + "scrollbar.shadow": "#23262E", + "scrollbarSlider.activeBackground": "#3A3F4CCC", + "scrollbarSlider.background": "#3A3F4C77", + "scrollbarSlider.hoverBackground": "#3A3F4CAA", + + "badge.background": "#00b0ff", + "badge.foreground": "#20232B", + + "progressBar.background": "#C668BA", + + "list.activeSelectionBackground": "#23262E", + "list.activeSelectionForeground": "#00e8c6", + "list.dropBackground": "#3a404e", + "list.focusBackground": "#282b35", + "list.focusForeground": "#eee", + "list.hoverBackground": "#23262E", + "list.hoverForeground": "#eee", + "list.inactiveSelectionBackground": "#23262E", + "list.inactiveSelectionForeground": "#00e8c6", + + "activityBar.background": "#20232B", + "activityBar.dropBackground": "#3a404e", + "activityBar.foreground": "#BAAFC0", + "activityBarBadge.background": "#00b0ff", + "activityBarBadge.foreground": "#20232B", + "activityBar.border": "#1B1D23", + + "sideBar.background": "#23262E", + "sideBarSectionHeader.background": "#23262E", + "sideBarTitle.foreground": "#00e8c6", + "sideBar.foreground": "#999999", + "sideBar.border": "#1B1D23", + + "editorGroup.background": "#23262E", + "editorGroup.dropBackground": "#495061d7", + "editorGroupHeader.tabsBackground": "#23262E", + "tab.activeBackground": "#262A33", + "tab.inactiveBackground": "#23262E", + "tab.activeForeground": "#00e8c6", + "tab.inactiveForeground": "#746f77", + + "editor.background": "#262A33", + "editor.foreground": "#D5CED9", + "editorLineNumber.foreground": "#746f77", + "editorCursor.foreground": "#FFF", + "editor.selectionBackground": "#3D4352", + "editor.selectionHighlightBackground": "#4F435580", + "editor.wordHighlightBackground": "#4F4355", + "editor.wordHighlightStrongBackground": "#db45a280", + "editor.findMatchBackground": "#f39d1256", + "editor.findMatchHighlightBackground": "#59b8b377", + "editor.findMatchBorder": "#f39d12b6", + "editor.hoverHighlightBackground": "#373941", + "editor.lineHighlightBackground": "#2e323d", + "editor.lineHighlightBorder": "#2e323d", + "editorLink.activeForeground": "#3B79C7", + "editor.rangeHighlightBackground": "#372F3C", + "editorWhitespace.foreground": "#333844", + "editorIndentGuide.background": "#333844", + "editorIndentGuide.activeBackground": "#585C66", + "editorRuler.foreground": "#4F4355", + "editorCodeLens.foreground": "#746f77", + "editorBracketMatch.background": "#746f77", + "editorBracketMatch.border": "#746f77", + "editorOverviewRuler.border": "#1B1D23", + "editorError.foreground": "#FC644D", + "editorWarning.foreground": "#FF9F2E", + "editorGutter.modifiedBackground": "#5BC0EBBB", + "editorGutter.addedBackground": "#9BC53DBB", + "editorGutter.deletedBackground": "#FC644DBB", + + "diffEditor.insertedTextBackground": "#29BF1220", + "diffEditor.removedTextBackground": "#F21B3F20", + + "editorWidget.background": "#20232A", + "editorSuggestWidget.background": "#20232A", + "editorSuggestWidget.border": "#372F3C", + "editorSuggestWidget.selectedBackground": "#373941", + "editorHoverWidget.background": "#373941", + "editorHoverWidget.border": "#00e8c5cc", + "debugExceptionWidget.background": "#FF9F2E60", + "debugExceptionWidget.border": "#FF9F2E60", + + "minimapSlider.background": "#58607460", + "minimapSlider.hoverBackground": "#60698060", + "minimapSlider.activeBackground": "#60698060", + + "peekView.border": "#23262E", + "peekViewEditor.background": "#1A1C22", + "peekViewEditor.matchHighlightBackground": "#FF9F2E60", + "peekViewResult.background": "#1A1C22", + "peekViewResult.matchHighlightBackground": "#FF9F2E60", + "peekViewResult.selectionBackground": "#23262E", + "peekViewTitle.background": "#1A1C22", + "peekViewTitleDescription.foreground": "#746f77", + + "merge.currentHeaderBackground": "#F92672", + "merge.currentContentBackground": "#F9267240", + "merge.incomingHeaderBackground": "#3B79C7BB", + "merge.incomingContentBackground": "#3B79C740", + + "panel.background": "#23262E", + "panel.border": "#1B1D23", + "panelTitle.activeBorder": "#23262E", + "panelTitle.inactiveForeground": "#746f77", + + "statusBar.background": "#23262E", + "statusBar.debuggingBackground": "#FC644D", + "statusBar.noFolderBackground": "#23262E", + "statusBarItem.activeBackground": "#00e8c5cc", + "statusBarItem.hoverBackground": "#07d4b5b0", + "statusBarItem.prominentBackground": "#07d4b5b0", + "statusBarItem.prominentHoverBackground": "#00e8c5cc", + + "terminal.ansiRed":"#ee5d43", + "terminal.ansiGreen":"#96E072", + "terminal.ansiYellow":"#FFE66D", + "terminal.ansiBlue":"#7cb7ff", + "terminal.ansiMagenta":"#ff00aa", + "terminal.ansiCyan":"#00e8c6", + "terminal.ansiBrightRed":"#ee5d43", + "terminal.ansiBrightGreen":"#96E072", + "terminal.ansiBrightYellow":"#FFE66D", + "terminal.ansiBrightBlue":"#7cb7ff", + "terminal.ansiBrightMagenta":"#ff00aa", + "terminal.ansiBrightCyan":"#00e8c6", + "terminalCursor.background": "#23262E", + "terminalCursor.foreground": "#FFE66D", + + "titleBar.activeBackground": "#23262E", + + "notification.background": "#2d313b", + "notification.buttonBackground": "#00e8c5cc", + "notification.buttonHoverBackground": "#07d4b5b0", + "notification.infoBackground": "#00b0ff", + "notification.warningBackground": "#FF9F2E", + "notification.errorBackground": "#FC644D", + + "extensionButton.prominentBackground": "#07d4b6cc", + "extensionButton.prominentHoverBackground": "#07d4b5b0", + + "pickerGroup.border": "#4F4355", + "pickerGroup.foreground": "#746f77", + + "debugToolBar.background": "#20232A", + + "walkThrough.embeddedEditorBackground": "#23262E", + + "gitDecoration.ignoredResourceForeground": "#555555" + + }, + "tokenColors": [ + { + "settings": { + "foreground": "#D5CED9", + "background": "#23262E" + } + }, + { + "name": "Comment color", + "scope": [ + "comment", + "markup.quote.markdown", + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#A0A1A7cc" + } + }, + { + "name": "Text Color", + "scope": [ + "meta.template.expression.js", + "constant.name.attribute.tag.jade", + "punctuation.definition.metadata.markdown", + "punctuation.definition.string.end.markdown", + "punctuation.definition.string.begin.markdown" + ], + "settings": { + "foreground": "#D5CED9" + } + }, + { + "name": "Cyan", + "scope": [ + "variable", + "support.variable", + "entity.name.tag.yaml", + "constant.character.entity.html", + "source.css entity.name.tag.reference", + "beginning.punctuation.definition.list.markdown", + "source.css entity.other.attribute-name.parent-selector", + "meta.structure.dictionary.json support.type.property-name" + ], + "settings": { + "foreground": "#00e8c6" + } + }, + { + "name": "Orange", + "scope": [ + "markup.bold", + "constant.numeric", + "meta.group.regexp", + "constant.other.php", + "support.constant.ext.php", + "constant.other.class.php", + "support.constant.core.php", + "fenced_code.block.language", + "constant.other.caps.python", + "entity.other.attribute-name", + "support.type.exception.python", + "source.css keyword.other.unit", + "variable.other.object.property.js.jsx", "variable.other.object.js" + ], + "settings": { + "foreground": "#f39c12" + } + }, + { + "name": "Yellow", + "scope": [ + "markup.list", + "text.xml string", + "entity.name.type", + "support.function", + "entity.other.attribute-name", + "meta.at-rule.extend", + "entity.name.function", + "entity.other.inherited-class", + "entity.other.keyframe-offset.css", + "text.html.markdown string.quoted", + "meta.function-call.generic.python", + "meta.at-rule.extend support.constant", + "entity.other.attribute-name.class.jade", + "source.css entity.other.attribute-name", + "text.xml punctuation.definition.string" + + ], + "settings": { + "foreground": "#FFE66D" + } + }, + { + "name": "Pink", + "scope": [ + "markup.heading", + "variable.language.this.js", + "variable.language.special.self.python" + ], + "settings": { + "foreground": "#ff00aa" + } + }, + { + "name": "Hot Pink", + "scope": [ + "punctuation.definition.interpolation", + "punctuation.section.embedded.end.php", + "punctuation.section.embedded.end.ruby", + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.begin.ruby", + "punctuation.definition.template-expression", + "entity.name.tag" + ], + "settings": { + "foreground": "#f92672" + } + }, + { + "name": "Purple", + "scope": [ + "storage", + "keyword", + "meta.link", + "meta.image", + "markup.italic", + "source.js support.type" + + ], + "settings": { + "foreground": "#c74ded" + } + }, + { + "name": "Blue", + "scope": [ + "string.regexp", + "markup.changed" + ], + "settings": { + "foreground": "#7cb7ff" + } + }, + { + "name": "Red", + "scope": [ + "constant", + "support.class", + "keyword.operator", + "support.constant", + "text.html.markdown string", + "source.css support.function", + "source.php support.function", + "support.function.magic.python", + "entity.other.attribute-name.id", + "markup.deleted" + ], + "settings": { + "foreground": "#ee5d43" + } + }, + { + "name": "Green", + "scope": [ + "string", + "text.html.php string", + "markup.inline.raw", + "markup.inserted", + "punctuation.definition.string", + "punctuation.definition.markdown", + "text.html meta.embedded source.js string", + "text.html.php punctuation.definition.string", + "text.html meta.embedded source.js punctuation.definition.string", + "text.html punctuation.definition.string", + "text.html string" + ], + "settings": { + "foreground": "#96E072" + } + }, + { + "name": "Font Underline", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "fontStyle": "underline" + } + } + ] +} diff --git a/assets/themes/src/vscode/andromeda/andromeda.json b/assets/themes/src/vscode/andromeda/andromeda.json new file mode 100644 index 0000000000000000000000000000000000000000..235eb8f003fe7e2099ce1f2bf914c1a346ed6027 --- /dev/null +++ b/assets/themes/src/vscode/andromeda/andromeda.json @@ -0,0 +1,367 @@ +{ + "name": "Andromeda", + "type": "dark", + "colors": { + "focusBorder": "#746f77", + "foreground": "#D5CED9", + "widget.shadow": "#14151A", + "selection.background": "#746f77", + "errorForeground": "#FC644D", + + "button.background": "#00e8c5cc", + "button.hoverBackground": "#07d4b6cc", + + "dropdown.background": "#2b303b", + "dropdown.border": "#363c49", + + "input.background": "#2b303b", + "input.placeholderForeground": "#746f77", + "inputOption.activeBorder": "#C668BA", + "inputValidation.errorBackground": "#D65343", + "inputValidation.errorBorder": "#D65343", + "inputValidation.infoBackground": "#3A6395", + "inputValidation.infoBorder": "#3A6395", + "inputValidation.warningBackground": "#DE9237", + "inputValidation.warningBorder": "#DE9237", + + "scrollbar.shadow": "#23262E", + "scrollbarSlider.activeBackground": "#3A3F4CCC", + "scrollbarSlider.background": "#3A3F4C77", + "scrollbarSlider.hoverBackground": "#3A3F4CAA", + + "badge.background": "#00b0ff", + "badge.foreground": "#20232B", + + "progressBar.background": "#C668BA", + + "list.activeSelectionBackground": "#23262E", + "list.activeSelectionForeground": "#00e8c6", + "list.dropBackground": "#3a404e", + "list.focusBackground": "#282b35", + "list.focusForeground": "#eee", + "list.hoverBackground": "#23262E", + "list.hoverForeground": "#eee", + "list.inactiveSelectionBackground": "#23262E", + "list.inactiveSelectionForeground": "#00e8c6", + + "activityBar.background": "#23262E", + "activityBar.dropBackground": "#3a404e", + "activityBar.foreground": "#BAAFC0", + "activityBarBadge.background": "#00b0ff", + "activityBarBadge.foreground": "#20232B", + + "sideBar.background": "#23262E", + "sideBarSectionHeader.background": "#23262E", + "sideBarTitle.foreground": "#00e8c6", + "sideBar.foreground": "#999999", + + "editorGroup.background": "#23262E", + "editorGroup.dropBackground": "#495061d7", + "editorGroupHeader.tabsBackground": "#23262E", + "tab.activeBackground": "#23262e", + "tab.inactiveBackground": "#23262E", + "tab.activeForeground": "#00e8c6", + "tab.inactiveForeground": "#746f77", + + "editor.background": "#23262E", + "editor.foreground": "#D5CED9", + "editorLineNumber.foreground": "#746f77", + "editorCursor.foreground": "#FFF", + "editor.selectionBackground": "#3D4352", + "editor.selectionHighlightBackground": "#4F435580", + "editor.wordHighlightBackground": "#4F4355", + "editor.wordHighlightStrongBackground": "#db45a280", + "editor.findMatchBackground": "#f39d1256", + "editor.findMatchHighlightBackground": "#59b8b377", + "editor.findMatchBorder": "#f39d12b6", + "editor.hoverHighlightBackground": "#373941", + "editor.lineHighlightBackground": "#2e323d", + "editor.lineHighlightBorder": "#2e323d", + "editorLink.activeForeground": "#3B79C7", + "editor.rangeHighlightBackground": "#372F3C", + "editorWhitespace.foreground": "#333844", + "editorIndentGuide.background": "#333844", + "editorIndentGuide.activeBackground": "#585C66", + "editorRuler.foreground": "#4F4355", + "editorCodeLens.foreground": "#746f77", + "editorBracketMatch.background": "#746f77", + "editorBracketMatch.border": "#746f77", + "editorOverviewRuler.border": "#1B1D23", + "editorError.foreground": "#FC644D", + "editorWarning.foreground": "#FF9F2E", + "editorGutter.modifiedBackground": "#5BC0EBBB", + "editorGutter.addedBackground": "#9BC53DBB", + "editorGutter.deletedBackground": "#FC644DBB", + + "diffEditor.insertedTextBackground": "#29BF1220", + "diffEditor.removedTextBackground": "#F21B3F20", + + "editorWidget.background": "#20232A", + "editorSuggestWidget.background": "#20232A", + "editorSuggestWidget.border": "#372F3C", + "editorSuggestWidget.selectedBackground": "#373941", + "editorHoverWidget.background": "#373941", + "editorHoverWidget.border": "#00e8c5cc", + "debugExceptionWidget.background": "#FF9F2E60", + "debugExceptionWidget.border": "#FF9F2E60", + + "minimapSlider.background": "#58607460", + "minimapSlider.hoverBackground": "#60698060", + "minimapSlider.activeBackground": "#60698060", + + "peekView.border": "#23262E", + "peekViewEditor.background": "#1A1C22", + "peekViewEditor.matchHighlightBackground": "#FF9F2E60", + "peekViewResult.background": "#1A1C22", + "peekViewResult.matchHighlightBackground": "#FF9F2E60", + "peekViewResult.selectionBackground": "#23262E", + "peekViewTitle.background": "#1A1C22", + "peekViewTitleDescription.foreground": "#746f77", + + "merge.currentHeaderBackground": "#F92672", + "merge.currentContentBackground": "#F9267240", + "merge.incomingHeaderBackground": "#3B79C7BB", + "merge.incomingContentBackground": "#3B79C740", + + "panel.background": "#23262E", + "panel.border": "#1B1D23", + "panelTitle.activeBorder": "#23262E", + "panelTitle.inactiveForeground": "#746f77", + + "statusBar.background": "#23262E", + "statusBar.debuggingBackground": "#FC644D", + "statusBar.noFolderBackground": "#23262E", + "statusBarItem.activeBackground": "#00e8c5cc", + "statusBarItem.hoverBackground": "#07d4b5b0", + "statusBarItem.prominentBackground": "#07d4b5b0", + "statusBarItem.prominentHoverBackground": "#00e8c5cc", + + "terminal.ansiRed":"#ee5d43", + "terminal.ansiGreen":"#96E072", + "terminal.ansiYellow":"#FFE66D", + "terminal.ansiBlue":"#7cb7ff", + "terminal.ansiMagenta":"#ff00aa", + "terminal.ansiCyan":"#00e8c6", + "terminal.ansiBrightRed":"#ee5d43", + "terminal.ansiBrightGreen":"#96E072", + "terminal.ansiBrightYellow":"#FFE66D", + "terminal.ansiBrightBlue":"#7cb7ff", + "terminal.ansiBrightMagenta":"#ff00aa", + "terminal.ansiBrightCyan":"#00e8c6", + "terminalCursor.background": "#23262E", + "terminalCursor.foreground": "#FFE66D", + + "titleBar.activeBackground": "#23262E", + + "notification.background": "#2d313b", + "notification.buttonBackground": "#00e8c5cc", + "notification.buttonHoverBackground": "#07d4b5b0", + "notification.infoBackground": "#00b0ff", + "notification.warningBackground": "#FF9F2E", + "notification.errorBackground": "#FC644D", + + "extensionButton.prominentBackground": "#07d4b6cc", + "extensionButton.prominentHoverBackground": "#07d4b5b0", + + "pickerGroup.border": "#4F4355", + "pickerGroup.foreground": "#746f77", + + "debugToolBar.background": "#20232A", + + "walkThrough.embeddedEditorBackground": "#23262E", + + "gitDecoration.ignoredResourceForeground": "#555555" + + }, + "tokenColors": [ + { + "settings": { + "foreground": "#D5CED9", + "background": "#23262E" + } + }, + { + "name": "Comment color", + "scope": [ + "comment", + "markup.quote.markdown", + "meta.diff", + "meta.diff.header" + ], + "settings": { + "foreground": "#A0A1A7cc" + } + }, + { + "name": "Text Color", + "scope": [ + "meta.template.expression.js", + "constant.name.attribute.tag.jade", + "punctuation.definition.metadata.markdown", + "punctuation.definition.string.end.markdown", + "punctuation.definition.string.begin.markdown" + ], + "settings": { + "foreground": "#D5CED9" + } + }, + { + "name": "Cyan", + "scope": [ + "variable", + "support.variable", + "entity.name.tag.yaml", + "constant.character.entity.html", + "source.css entity.name.tag.reference", + "beginning.punctuation.definition.list.markdown", + "source.css entity.other.attribute-name.parent-selector", + "meta.structure.dictionary.json support.type.property-name" + ], + "settings": { + "foreground": "#00e8c6" + } + }, + { + "name": "Orange", + "scope": [ + "markup.bold", + "constant.numeric", + "meta.group.regexp", + "constant.other.php", + "support.constant.ext.php", + "constant.other.class.php", + "support.constant.core.php", + "fenced_code.block.language", + "constant.other.caps.python", + "entity.other.attribute-name", + "support.type.exception.python", + "source.css keyword.other.unit", + "variable.other.object.property.js.jsx", "variable.other.object.js" + ], + "settings": { + "foreground": "#f39c12" + } + }, + { + "name": "Yellow", + "scope": [ + "markup.list", + "text.xml string", + "entity.name.type", + "support.function", + "entity.other.attribute-name", + "meta.at-rule.extend", + "entity.name.function", + "entity.other.inherited-class", + "entity.other.keyframe-offset.css", + "text.html.markdown string.quoted", + "meta.function-call.generic.python", + "meta.at-rule.extend support.constant", + "entity.other.attribute-name.class.jade", + "source.css entity.other.attribute-name", + "text.xml punctuation.definition.string" + + ], + "settings": { + "foreground": "#FFE66D" + } + }, + { + "name": "Pink", + "scope": [ + "markup.heading", + "variable.language.this.js", + "variable.language.special.self.python" + ], + "settings": { + "foreground": "#ff00aa" + } + }, + { + "name": "Hot Pink", + "scope": [ + "punctuation.definition.interpolation", + "punctuation.section.embedded.end.php", + "punctuation.section.embedded.end.ruby", + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.begin.ruby", + "punctuation.definition.template-expression", + "entity.name.tag" + ], + "settings": { + "foreground": "#f92672" + } + }, + { + "name": "Purple", + "scope": [ + "storage", + "keyword", + "meta.link", + "meta.image", + "markup.italic", + "source.js support.type" + + ], + "settings": { + "foreground": "#c74ded" + } + }, + { + "name": "Blue", + "scope": [ + "string.regexp", + "markup.changed" + ], + "settings": { + "foreground": "#7cb7ff" + } + }, + { + "name": "Red", + "scope": [ + "constant", + "support.class", + "keyword.operator", + "support.constant", + "text.html.markdown string", + "source.css support.function", + "source.php support.function", + "support.function.magic.python", + "entity.other.attribute-name.id", + "markup.deleted" + ], + "settings": { + "foreground": "#ee5d43" + } + }, + { + "name": "Green", + "scope": [ + "string", + "text.html.php string", + "markup.inline.raw", + "markup.inserted", + "punctuation.definition.string", + "punctuation.definition.markdown", + "text.html meta.embedded source.js string", + "text.html.php punctuation.definition.string", + "text.html meta.embedded source.js punctuation.definition.string", + "text.html punctuation.definition.string", + "text.html string" + ], + "settings": { + "foreground": "#96E072" + } + }, + { + "name": "Font Underline", + "scope": [ + "entity.other.inherited-class" + ], + "settings": { + "fontStyle": "underline" + } + } + ] +} diff --git a/assets/themes/src/vscode/andromeda/family.json b/assets/themes/src/vscode/andromeda/family.json new file mode 100644 index 0000000000000000000000000000000000000000..cbdc038a55a153216738b1fdbf90247e7322e914 --- /dev/null +++ b/assets/themes/src/vscode/andromeda/family.json @@ -0,0 +1,16 @@ +{ + "name": "Andromeda", + "author": "Eliver Lara (EliverLara)", + "themes": [ + { + "name": "Andromeda", + "file_name": "andromeda.json", + "appearance": "dark" + }, + { + "name": "Andromeda Bordered", + "file_name": "andromeda-bordered.json", + "appearance": "dark" + } + ] +} From 5c24c931c5ca90ad369f9b843b84bf9f7f6b42ca Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 10:57:25 -0500 Subject: [PATCH 025/110] Remove unused file --- crates/theme_importer/src/temp.rs | 393 ------------------------------ 1 file changed, 393 deletions(-) delete mode 100644 crates/theme_importer/src/temp.rs diff --git a/crates/theme_importer/src/temp.rs b/crates/theme_importer/src/temp.rs deleted file mode 100644 index 5536a1984be52796360acdd518acc57f77742f49..0000000000000000000000000000000000000000 --- a/crates/theme_importer/src/temp.rs +++ /dev/null @@ -1,393 +0,0 @@ -#[derive(Debug, Deserialize)] -struct VSCodeColorsOld { - #[serde(rename = "vsc_terminal_background")] - terminal_background: String, - #[serde(rename = "vsc_terminal_foreground")] - terminal_foreground: String, - #[serde(rename = "vsc_terminal_ansi_bright_black")] - terminal_ansi_bright_black: String, - #[serde(rename = "vsc_terminal_ansi_bright_red")] - terminal_ansi_bright_red: String, - #[serde(rename = "vsc_terminal_ansi_bright_green")] - terminal_ansi_bright_green: String, - #[serde(rename = "vsc_terminal_ansi_bright_yellow")] - terminal_ansi_bright_yellow: String, - #[serde(rename = "vsc_terminal_ansi_bright_blue")] - terminal_ansi_bright_blue: String, - #[serde(rename = "vsc_terminal_ansi_bright_magenta")] - terminal_ansi_bright_magenta: String, - #[serde(rename = "vsc_terminal_ansi_bright_cyan")] - terminal_ansi_bright_cyan: String, - #[serde(rename = "vsc_terminal_ansi_bright_white")] - terminal_ansi_bright_white: String, - #[serde(rename = "vsc_terminal_ansi_black")] - terminal_ansi_black: String, - #[serde(rename = "vsc_terminal_ansi_red")] - terminal_ansi_red: String, - #[serde(rename = "vsc_terminal_ansi_green")] - terminal_ansi_green: String, - #[serde(rename = "vsc_terminal_ansi_yellow")] - terminal_ansi_yellow: String, - #[serde(rename = "vsc_terminal_ansi_blue")] - terminal_ansi_blue: String, - #[serde(rename = "vsc_terminal_ansi_magenta")] - terminal_ansi_magenta: String, - #[serde(rename = "vsc_terminal_ansi_cyan")] - terminal_ansi_cyan: String, - #[serde(rename = "vsc_terminal_ansi_white")] - terminal_ansi_white: String, - #[serde(rename = "vsc_focus_border")] - focus_border: String, - #[serde(rename = "vsc_foreground")] - foreground: String, - #[serde(rename = "vsc_selection_background")] - selection_background: String, - #[serde(rename = "vsc_error_foreground")] - error_foreground: String, - #[serde(rename = "vsc_button_background")] - button_background: String, - #[serde(rename = "vsc_button_foreground")] - button_foreground: String, - #[serde(rename = "vsc_button_secondary_background")] - button_secondary_background: String, - #[serde(rename = "vsc_button_secondary_foreground")] - button_secondary_foreground: String, - #[serde(rename = "vsc_button_secondary_hover_background")] - button_secondary_hover_background: String, - #[serde(rename = "vsc_dropdown_background")] - dropdown_background: String, - #[serde(rename = "vsc_dropdown_border")] - dropdown_border: String, - #[serde(rename = "vsc_dropdown_foreground")] - dropdown_foreground: String, - #[serde(rename = "vsc_input_background")] - input_background: String, - #[serde(rename = "vsc_input_foreground")] - input_foreground: String, - #[serde(rename = "vsc_input_border")] - input_border: String, - #[serde(rename = "vsc_input_placeholder_foreground")] - input_placeholder_foreground: String, - #[serde(rename = "vsc_input_option_active_border")] - input_option_active_border: String, - #[serde(rename = "vsc_input_validation_info_border")] - input_validation_info_border: String, - #[serde(rename = "vsc_input_validation_warning_border")] - input_validation_warning_border: String, - #[serde(rename = "vsc_input_validation_error_border")] - input_validation_error_border: String, - #[serde(rename = "vsc_badge_foreground")] - badge_foreground: String, - #[serde(rename = "vsc_badge_background")] - badge_background: String, - #[serde(rename = "vsc_progress_bar_background")] - progress_bar_background: String, - #[serde(rename = "vsc_list_active_selection_background")] - list_active_selection_background: String, - #[serde(rename = "vsc_list_active_selection_foreground")] - list_active_selection_foreground: String, - #[serde(rename = "vsc_list_drop_background")] - list_drop_background: String, - #[serde(rename = "vsc_list_focus_background")] - list_focus_background: String, - #[serde(rename = "vsc_list_highlight_foreground")] - list_highlight_foreground: String, - #[serde(rename = "vsc_list_hover_background")] - list_hover_background: String, - #[serde(rename = "vsc_list_inactive_selection_background")] - list_inactive_selection_background: String, - #[serde(rename = "vsc_list_warning_foreground")] - list_warning_foreground: String, - #[serde(rename = "vsc_list_error_foreground")] - list_error_foreground: String, - #[serde(rename = "vsc_activity_bar_background")] - activity_bar_background: String, - #[serde(rename = "vsc_activity_bar_inactive_foreground")] - activity_bar_inactive_foreground: String, - #[serde(rename = "vsc_activity_bar_foreground")] - activity_bar_foreground: String, - #[serde(rename = "vsc_activity_bar_active_border")] - activity_bar_active_border: String, - #[serde(rename = "vsc_activity_bar_active_background")] - activity_bar_active_background: String, - #[serde(rename = "vsc_activity_bar_badge_background")] - activity_bar_badge_background: String, - #[serde(rename = "vsc_activity_bar_badge_foreground")] - activity_bar_badge_foreground: String, - #[serde(rename = "vsc_side_bar_background")] - side_bar_background: String, - #[serde(rename = "vsc_side_bar_title_foreground")] - side_bar_title_foreground: String, - #[serde(rename = "vsc_side_bar_section_header_background")] - side_bar_section_header_background: String, - #[serde(rename = "vsc_side_bar_section_header_border")] - side_bar_section_header_border: String, - #[serde(rename = "vsc_editor_group_border")] - editor_group_border: String, - #[serde(rename = "vsc_editor_group_drop_background")] - editor_group_drop_background: String, - #[serde(rename = "vsc_editor_group_header_tabs_background")] - editor_group_header_tabs_background: String, - #[serde(rename = "vsc_tab_active_background")] - tab_active_background: String, - #[serde(rename = "vsc_tab_active_foreground")] - tab_active_foreground: String, - #[serde(rename = "vsc_tab_border")] - tab_border: String, - #[serde(rename = "vsc_tab_active_border_top")] - tab_active_border_top: String, - #[serde(rename = "vsc_tab_inactive_background")] - tab_inactive_background: String, - #[serde(rename = "vsc_tab_inactive_foreground")] - tab_inactive_foreground: String, - #[serde(rename = "vsc_editor_foreground")] - editor_foreground: String, - #[serde(rename = "vsc_editor_background")] - editor_background: String, - #[serde(rename = "vsc_editor_line_number_foreground")] - editor_line_number_foreground: String, - #[serde(rename = "vsc_editor_selection_background")] - editor_selection_background: String, - #[serde(rename = "vsc_editor_selection_highlight_background")] - editor_selection_highlight_background: String, - #[serde(rename = "vsc_editor_fold_background")] - editor_fold_background: String, - #[serde(rename = "vsc_editor_word_highlight_background")] - editor_word_highlight_background: String, - #[serde(rename = "vsc_editor_word_highlight_strong_background")] - editor_word_highlight_strong_background: String, - #[serde(rename = "vsc_editor_find_match_background")] - editor_find_match_background: String, - #[serde(rename = "vsc_editor_find_match_highlight_background")] - editor_find_match_highlight_background: String, - #[serde(rename = "vsc_editor_find_range_highlight_background")] - editor_find_range_highlight_background: String, - #[serde(rename = "vsc_editor_hover_highlight_background")] - editor_hover_highlight_background: String, - #[serde(rename = "vsc_editor_line_highlight_border")] - editor_line_highlight_border: String, - #[serde(rename = "vsc_editor_link_active_foreground")] - editor_link_active_foreground: String, - #[serde(rename = "vsc_editor_range_highlight_background")] - editor_range_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_tabstop_highlight_background")] - editor_snippet_tabstop_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_tabstop_highlight_border")] - editor_snippet_tabstop_highlight_border: String, - #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_background")] - editor_snippet_final_tabstop_highlight_background: String, - #[serde(rename = "vsc_editor_snippet_final_tabstop_highlight_border")] - editor_snippet_final_tabstop_highlight_border: String, - #[serde(rename = "vsc_editor_whitespace_foreground")] - editor_whitespace_foreground: String, - #[serde(rename = "vsc_editor_indent_guide_background")] - editor_indent_guide_background: String, - #[serde(rename = "vsc_editor_indent_guide_active_background")] - editor_indent_guide_active_background: String, - #[serde(rename = "vsc_editor_ruler_foreground")] - editor_ruler_foreground: String, - #[serde(rename = "vsc_editor_code_lens_foreground")] - editor_code_lens_foreground: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground1")] - editor_bracket_highlight_foreground1: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground2")] - editor_bracket_highlight_foreground2: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground3")] - editor_bracket_highlight_foreground3: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground4")] - editor_bracket_highlight_foreground4: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground5")] - editor_bracket_highlight_foreground5: String, - #[serde(rename = "vsc_editor_bracket_highlight_foreground6")] - editor_bracket_highlight_foreground6: String, - #[serde(rename = "vsc_editor_bracket_highlight_unexpected_bracket_foreground")] - editor_bracket_highlight_unexpected_bracket_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_border")] - editor_overview_ruler_border: String, - #[serde(rename = "vsc_editor_overview_ruler_selection_highlight_foreground")] - editor_overview_ruler_selection_highlight_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_word_highlight_foreground")] - editor_overview_ruler_word_highlight_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_word_highlight_strong_foreground")] - editor_overview_ruler_word_highlight_strong_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_modified_foreground")] - editor_overview_ruler_modified_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_added_foreground")] - editor_overview_ruler_added_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_deleted_foreground")] - editor_overview_ruler_deleted_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_error_foreground")] - editor_overview_ruler_error_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_warning_foreground")] - editor_overview_ruler_warning_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_info_foreground")] - editor_overview_ruler_info_foreground: String, - #[serde(rename = "vsc_editor_error_foreground")] - editor_error_foreground: String, - #[serde(rename = "vsc_editor_warning_foreground")] - editor_warning_foreground: String, - #[serde(rename = "vsc_editor_gutter_modified_background")] - editor_gutter_modified_background: String, - #[serde(rename = "vsc_editor_gutter_added_background")] - editor_gutter_added_background: String, - #[serde(rename = "vsc_editor_gutter_deleted_background")] - editor_gutter_deleted_background: String, - #[serde(rename = "vsc_git_decoration_modified_resource_foreground")] - git_decoration_modified_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_deleted_resource_foreground")] - git_decoration_deleted_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_untracked_resource_foreground")] - git_decoration_untracked_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_ignored_resource_foreground")] - git_decoration_ignored_resource_foreground: String, - #[serde(rename = "vsc_git_decoration_conflicting_resource_foreground")] - git_decoration_conflicting_resource_foreground: String, - #[serde(rename = "vsc_diff_editor_inserted_text_background")] - diff_editor_inserted_text_background: String, - #[serde(rename = "vsc_diff_editor_removed_text_background")] - diff_editor_removed_text_background: String, - #[serde(rename = "vsc_inline_chat_region_highlight")] - inline_chat_region_highlight: String, - #[serde(rename = "vsc_editor_widget_background")] - editor_widget_background: String, - #[serde(rename = "vsc_editor_suggest_widget_background")] - editor_suggest_widget_background: String, - #[serde(rename = "vsc_editor_suggest_widget_foreground")] - editor_suggest_widget_foreground: String, - #[serde(rename = "vsc_editor_suggest_widget_selected_background")] - editor_suggest_widget_selected_background: String, - #[serde(rename = "vsc_editor_hover_widget_background")] - editor_hover_widget_background: String, - #[serde(rename = "vsc_editor_hover_widget_border")] - editor_hover_widget_border: String, - #[serde(rename = "vsc_editor_marker_navigation_background")] - editor_marker_navigation_background: String, - #[serde(rename = "vsc_peek_view_border")] - peek_view_border: String, - #[serde(rename = "vsc_peek_view_editor_background")] - peek_view_editor_background: String, - #[serde(rename = "vsc_peek_view_editor_match_highlight_background")] - peek_view_editor_match_highlight_background: String, - #[serde(rename = "vsc_peek_view_result_background")] - peek_view_result_background: String, - #[serde(rename = "vsc_peek_view_result_file_foreground")] - peek_view_result_file_foreground: String, - #[serde(rename = "vsc_peek_view_result_line_foreground")] - peek_view_result_line_foreground: String, - #[serde(rename = "vsc_peek_view_result_match_highlight_background")] - peek_view_result_match_highlight_background: String, - #[serde(rename = "vsc_peek_view_result_selection_background")] - peek_view_result_selection_background: String, - #[serde(rename = "vsc_peek_view_result_selection_foreground")] - peek_view_result_selection_foreground: String, - #[serde(rename = "vsc_peek_view_title_background")] - peek_view_title_background: String, - #[serde(rename = "vsc_peek_view_title_description_foreground")] - peek_view_title_description_foreground: String, - #[serde(rename = "vsc_peek_view_title_label_foreground")] - peek_view_title_label_foreground: String, - #[serde(rename = "vsc_merge_current_header_background")] - merge_current_header_background: String, - #[serde(rename = "vsc_merge_incoming_header_background")] - merge_incoming_header_background: String, - #[serde(rename = "vsc_editor_overview_ruler_current_content_foreground")] - editor_overview_ruler_current_content_foreground: String, - #[serde(rename = "vsc_editor_overview_ruler_incoming_content_foreground")] - editor_overview_ruler_incoming_content_foreground: String, - #[serde(rename = "vsc_panel_background")] - panel_background: String, - #[serde(rename = "vsc_panel_border")] - panel_border: String, - #[serde(rename = "vsc_panel_title_active_border")] - panel_title_active_border: String, - #[serde(rename = "vsc_panel_title_active_foreground")] - panel_title_active_foreground: String, - #[serde(rename = "vsc_panel_title_inactive_foreground")] - panel_title_inactive_foreground: String, - #[serde(rename = "vsc_status_bar_background")] - status_bar_background: String, - #[serde(rename = "vsc_status_bar_foreground")] - status_bar_foreground: String, - #[serde(rename = "vsc_status_bar_debugging_background")] - status_bar_debugging_background: String, - #[serde(rename = "vsc_status_bar_debugging_foreground")] - status_bar_debugging_foreground: String, - #[serde(rename = "vsc_status_bar_no_folder_background")] - status_bar_no_folder_background: String, - #[serde(rename = "vsc_status_bar_no_folder_foreground")] - status_bar_no_folder_foreground: String, - #[serde(rename = "vsc_status_bar_item_prominent_background")] - status_bar_item_prominent_background: String, - #[serde(rename = "vsc_status_bar_item_prominent_hover_background")] - status_bar_item_prominent_hover_background: String, - #[serde(rename = "vsc_status_bar_item_remote_foreground")] - status_bar_item_remote_foreground: String, - #[serde(rename = "vsc_status_bar_item_remote_background")] - status_bar_item_remote_background: String, - #[serde(rename = "vsc_title_bar_active_background")] - title_bar_active_background: String, - #[serde(rename = "vsc_title_bar_active_foreground")] - title_bar_active_foreground: String, - #[serde(rename = "vsc_title_bar_inactive_background")] - title_bar_inactive_background: String, - #[serde(rename = "vsc_title_bar_inactive_foreground")] - title_bar_inactive_foreground: String, - #[serde(rename = "vsc_extension_button_prominent_foreground")] - extension_button_prominent_foreground: String, - #[serde(rename = "vsc_extension_button_prominent_background")] - extension_button_prominent_background: String, - #[serde(rename = "vsc_extension_button_prominent_hover_background")] - extension_button_prominent_hover_background: String, - #[serde(rename = "vsc_picker_group_border")] - picker_group_border: String, - #[serde(rename = "vsc_picker_group_foreground")] - picker_group_foreground: String, - #[serde(rename = "vsc_debug_tool_bar_background")] - debug_tool_bar_background: String, - #[serde(rename = "vsc_walk_through_embedded_editor_background")] - walk_through_embedded_editor_background: String, - #[serde(rename = "vsc_settings_header_foreground")] - settings_header_foreground: String, - #[serde(rename = "vsc_settings_modified_item_indicator")] - settings_modified_item_indicator: String, - #[serde(rename = "vsc_settings_dropdown_background")] - settings_dropdown_background: String, - #[serde(rename = "vsc_settings_dropdown_foreground")] - settings_dropdown_foreground: String, - #[serde(rename = "vsc_settings_dropdown_border")] - settings_dropdown_border: String, - #[serde(rename = "vsc_settings_checkbox_background")] - settings_checkbox_background: String, - #[serde(rename = "vsc_settings_checkbox_foreground")] - settings_checkbox_foreground: String, - #[serde(rename = "vsc_settings_checkbox_border")] - settings_checkbox_border: String, - #[serde(rename = "vsc_settings_text_input_background")] - settings_text_input_background: String, - #[serde(rename = "vsc_settings_text_input_foreground")] - settings_text_input_foreground: String, - #[serde(rename = "vsc_settings_text_input_border")] - settings_text_input_border: String, - #[serde(rename = "vsc_settings_number_input_background")] - settings_number_input_background: String, - #[serde(rename = "vsc_settings_number_input_foreground")] - settings_number_input_foreground: String, - #[serde(rename = "vsc_settings_number_input_border")] - settings_number_input_border: String, - #[serde(rename = "vsc_breadcrumb_foreground")] - breadcrumb_foreground: String, - #[serde(rename = "vsc_breadcrumb_background")] - breadcrumb_background: String, - #[serde(rename = "vsc_breadcrumb_focus_foreground")] - breadcrumb_focus_foreground: String, - #[serde(rename = "vsc_breadcrumb_active_selection_foreground")] - breadcrumb_active_selection_foreground: String, - #[serde(rename = "vsc_breadcrumb_picker_background")] - breadcrumb_picker_background: String, - #[serde(rename = "vsc_list_filter_widget_background")] - list_filter_widget_background: String, - #[serde(rename = "vsc_list_filter_widget_outline")] - list_filter_widget_outline: String, - #[serde(rename = "vsc_list_filter_widget_no_matches_outline")] - list_filter_widget_no_matches_outline: String, -} From 5d90396b5137cf0a7d3394af8144a24ce3dd1a62 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 10:59:00 -0500 Subject: [PATCH 026/110] Ignore generated themes --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2d8807a4b0559751ff341eacf7dfaf51c84c405c..6231dd2f60fd06c0f2aac44402152ab54978f230 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ DerivedData/ .netrc .swiftpm **/*.db +**/src/themes/*.rs +!**/src/themes/.gitkeep From 8192a52bd0a75a9fcbc763b386b2db6ebb1e9348 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 11:03:17 -0500 Subject: [PATCH 027/110] Skip `.DS_Store` files when scanning themes folder --- crates/theme_importer/src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 882ab85c335eb8dd54cbd07a2ef51c19cd327d16..e2436b1129b001562381f6e46cab13ee3df759e7 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -49,12 +49,6 @@ pub struct ThemeMetadata { pub appearance: ThemeAppearanceJson, } -// Load a vscode theme from json -// Load it's LICENSE from the same folder -// Create a ThemeFamily for the theme -// Create a ThemeVariant or Variants for the theme -// Output a rust file with the ThemeFamily and ThemeVariant(s) in it - fn main() -> Result<()> { SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); @@ -65,6 +59,10 @@ fn main() -> Result<()> { for theme_family_dir in fs::read_dir(&vscode_themes_path)? { let theme_family_dir = theme_family_dir?; + if theme_family_dir.file_name().to_str() == Some(".DS_Store") { + continue; + } + let theme_family_slug = theme_family_dir .path() .file_stem() From 230edeb5f83d3081b14b7b73baad7f9257b26f0f Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 11:16:09 -0500 Subject: [PATCH 028/110] Add gruvbox source theme, strip comments --- assets/themes/src/vscode/gruvbox/LICENSE | 1 + assets/themes/src/vscode/gruvbox/family.json | 36 + .../src/vscode/gruvbox/gruvbox-dark-hard.json | 1074 +++++++++++++++++ .../vscode/gruvbox/gruvbox-dark-medium.json | 1074 +++++++++++++++++ .../src/vscode/gruvbox/gruvbox-dark-soft.json | 1074 +++++++++++++++++ .../vscode/gruvbox/gruvbox-light-hard.json | 1073 ++++++++++++++++ .../vscode/gruvbox/gruvbox-light-medium.json | 1073 ++++++++++++++++ .../vscode/gruvbox/gruvbox-light-soft.json | 1073 ++++++++++++++++ 8 files changed, 6478 insertions(+) create mode 100644 assets/themes/src/vscode/gruvbox/LICENSE create mode 100644 assets/themes/src/vscode/gruvbox/family.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-dark-hard.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-dark-medium.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-dark-soft.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-light-hard.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-light-medium.json create mode 100644 assets/themes/src/vscode/gruvbox/gruvbox-light-soft.json diff --git a/assets/themes/src/vscode/gruvbox/LICENSE b/assets/themes/src/vscode/gruvbox/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..01085fd81770123ea00a503084d0bfe8c8d565fb --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/LICENSE @@ -0,0 +1 @@ +MIT/X11 diff --git a/assets/themes/src/vscode/gruvbox/family.json b/assets/themes/src/vscode/gruvbox/family.json new file mode 100644 index 0000000000000000000000000000000000000000..4d3d4d66510f45007e5b7033d053f699636a8ded --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/family.json @@ -0,0 +1,36 @@ +{ + "name": "Andromeda", + "author": "morhetz", + "themes": [ + { + "name": "Gruvbox Dark Hard", + "file_name": "gruvbox-dark-hard.json", + "appearance": "dark" + }, + { + "name": "Gruvbox Dark Medium", + "file_name": "gruvbox-dark-medium.json", + "appearance": "dark" + }, + { + "name": "Gruvbox Dark Soft", + "file_name": "gruvbox-dark-soft.json", + "appearance": "dark" + }, + { + "name": "Gruvbox Light Hard", + "file_name": "gruvbox-light-hard.json", + "appearance": "light" + }, + { + "name": "Gruvbox Light Medium", + "file_name": "gruvbox-light-medium.json", + "appearance": "light" + }, + { + "name": "Gruvbox Light Soft", + "file_name": "gruvbox-light-soft.json", + "appearance": "light" + } + ] +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-dark-hard.json b/assets/themes/src/vscode/gruvbox/gruvbox-dark-hard.json new file mode 100644 index 0000000000000000000000000000000000000000..4c1a7c9e8aaa100b2fbbb37cad882e4f9a29caf7 --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-dark-hard.json @@ -0,0 +1,1074 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Dark Hard", + "type": "dark", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#a89984" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#fabd2f", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#83a598", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#ebdbb2" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#d3869b" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#8ec07c", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#83a598" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#fe8019" + } + } + ], + "colors": { + "focusBorder": "#3c3836", + "foreground": "#ebdbb2", + "widget.shadow": "#1d202130", + "selection.background": "#689d6a80", + "errorForeground": "#fb4934", + + "button.background": "#45858880", + "button.foreground": "#ebdbb2", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#1d2021", + "dropdown.border": "#3c3836", + "dropdown.foreground": "#ebdbb2", + + "input.background": "#ebdbb205", + "input.border": "#3c3836", + "input.foreground": "#ebdbb2", + "input.placeholderForeground": "#ebdbb260", + "inputValidation.errorBorder": "#fb4934", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#83a598", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#fabd2f", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#ebdbb260", + + "scrollbar.shadow": "#1d2021", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#665c54", + "scrollbarSlider.background": "#50494599", + + "badge.background": "#d3869b", + "badge.foreground": "#1d2021", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#3c383680", + "list.activeSelectionForeground": "#8ec07c", + "list.hoverBackground": "#3c383680", + "list.hoverForeground": "#d5c4a1", + "list.focusBackground": "#3c3836", + "list.focusForeground": "#ebdbb2", + "list.inactiveSelectionForeground": "#689d6a", + "list.inactiveSelectionBackground": "#3c383680", + "list.dropBackground": "#3c3836", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#1d2021", + "sideBar.foreground": "#d5c4a1", + "sideBar.border": "#3c3836", + "sideBarTitle.foreground": "#ebdbb2", + "sideBarSectionHeader.background": "#1d202100", + "sideBarSectionHeader.foreground": "#ebdbb2", + + "activityBar.background": "#1d2021", + "activityBar.foreground": "#ebdbb2", + "activityBar.border": "#3c3836", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#3c3836", + "editorGroup.dropBackground": "#3c383660", + "editorGroupHeader.noTabsBackground": "#3c3836", + "editorGroupHeader.tabsBackground": "#1d2021", + "editorGroupHeader.tabsBorder": "#3c3836", + + "tab.border": "#1d202100", + "tab.activeBorder": "#689d6a", + "tab.activeBackground": "#32302f", + "tab.activeForeground": "#ebdbb2", + "tab.inactiveForeground": "#a89984", + "tab.inactiveBackground": "#1d2021", + "tab.unfocusedActiveForeground": "#a89984", + "tab.unfocusedActiveBorder": "#1d202100", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#1d2021", + "editor.foreground": "#ebdbb2", + "editorLineNumber.foreground": "#665c54", + "editorCursor.foreground": "#ebdbb2", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#fabd2f40", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#ebdbb2", + "editor.findMatchBackground": "#83a59870", + "editor.findMatchHighlightBackground": "#fe801930", + "editor.findRangeHighlightBackground": "#83a59870", + "editor.lineHighlightBackground": "#3c383660", + "editor.lineHighlightBorder": "#3c383600", + "editorWhitespace.foreground": "#a8998420", + "editorRuler.foreground": "#a8998440", + "editorCodeLens.foreground": "#a8998490", + "editorBracketMatch.border": "#1d202100", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#1d2021", + "editorHoverWidget.border": "#3c3836", + "editorOverviewRuler.border": "#1d202100", + "editorOverviewRuler.findMatchForeground": "#bdae93", + "editorOverviewRuler.rangeHighlightForeground": "#bdae93", + "editorOverviewRuler.selectionHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightStrongForeground": "#665c54", + "editorOverviewRuler.modifiedForeground": "#83a598", + "editorOverviewRuler.addedForeground": "#83a598", + "editorOverviewRuler.deletedForeground": "#83a598", + "editorOverviewRuler.errorForeground": "#fb4934", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#d3869b", + "editorGutter.background": "#1d202100", + "editorGutter.modifiedBackground": "#83a598", + "editorGutter.addedBackground": "#b8bb26", + "editorGutter.deletedBackground": "#fb4934", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#b8bb2630", + "diffEditor.removedTextBackground": "#fb493430", + + "editorWidget.background": "#1d2021", + "editorWidget.border": "#3c3836", + "editorSuggestWidget.background": "#1d2021", + "editorSuggestWidget.foreground": "#ebdbb2", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#3c383660", + "editorSuggestWidget.border": "#3c3836", + + "peekView.border": "#3c3836", + "peekViewEditor.background": "#3c383670", + "peekViewEditor.matchHighlightBackground": "#504945", + "peekViewEditorGutter.background": "#3c383670", + "peekViewResult.background": "#3c383670", + "peekViewResult.fileForeground": "#ebdbb2", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#ebdbb2", + "peekViewResult.lineForeground": "#ebdbb2", + "peekViewResult.matchHighlightBackground": "#504945", + "peekViewTitle.background": "#3c383670", + "peekViewTitleDescription.foreground": "#bdae93", + "peekViewTitleLabel.foreground": "#ebdbb2", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#1d202100", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#3c3836", + "panelTitle.activeForeground": "#ebdbb2", + + "statusBar.background": "#1d2021", + "statusBar.border": "#3c3836", + "statusBar.foreground": "#ebdbb2", + "statusBar.debuggingBackground": "#fe8019", + "statusBar.debuggingForeground": "#1d2021", + "statusBar.debuggingBorder": "#1d202100", + "statusBar.noFolderBackground": "#1d2021", + "statusBar.noFolderBorder": "#1d202100", + + "terminal.ansiBlack": "#3c3836", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#fb4934", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#b8bb26", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#fabd2f", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#83a598", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#d3869b", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#8ec07c", + "terminal.ansiWhite": "#a89984", + "terminal.ansiBrightWhite": "#ebdbb2", + "terminal.foreground": "#ebdbb2", + "terminal.background": "#1d2021", + + "titleBar.activeBackground": "#1d2021", + "titleBar.activeForeground": "#ebdbb2", + "titleBar.inactiveBackground": "#1d2021", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#7c6f64", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#3c3836", + "menu.separatorBackground": "#3c3836", + + "notebook.cellEditorBackground": "#282828", + "notebook.focusedCellBorder": "#a89984", + "notebook.cellBorderColor": "#3c3836", + "notebook.focusedEditorBorder": "#3c3836", + + "extensionButton.prominentBackground": "#b8bb2680", + "extensionButton.prominentHoverBackground": "#b8bb2630", + + "textLink.foreground": "#83a598", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#1d2021" + }, + "semanticTokenColors": { + "constant.builtin": "#d3869b", + "property": "#83a598", + "property:python": "#ebdbb2", + "parameter": "#83a598", + "variable": "#ebdbb2", + "function": "#8ec07c", + "function.builtin": "#fe8019", + "method": "#8ec07c" + } +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-dark-medium.json b/assets/themes/src/vscode/gruvbox/gruvbox-dark-medium.json new file mode 100644 index 0000000000000000000000000000000000000000..e9ef916193b471785a17a461c7063a5325252ba7 --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-dark-medium.json @@ -0,0 +1,1074 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Dark Medium", + "type": "dark", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#a89984" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#fabd2f", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#83a598", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#ebdbb2" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#d3869b" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#8ec07c", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#83a598" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#fe8019" + } + } + ], + "colors": { + "focusBorder": "#3c3836", + "foreground": "#ebdbb2", + "widget.shadow": "#28282830", + "selection.background": "#689d6a80", + "errorForeground": "#fb4934", + + "button.background": "#45858880", + "button.foreground": "#ebdbb2", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#282828", + "dropdown.border": "#3c3836", + "dropdown.foreground": "#ebdbb2", + + "input.background": "#ebdbb205", + "input.border": "#3c3836", + "input.foreground": "#ebdbb2", + "input.placeholderForeground": "#ebdbb260", + "inputValidation.errorBorder": "#fb4934", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#83a598", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#fabd2f", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#ebdbb260", + + "scrollbar.shadow": "#282828", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#665c54", + "scrollbarSlider.background": "#50494599", + + "badge.background": "#d3869b", + "badge.foreground": "#282828", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#3c383680", + "list.activeSelectionForeground": "#8ec07c", + "list.hoverBackground": "#3c383680", + "list.hoverForeground": "#d5c4a1", + "list.focusBackground": "#3c3836", + "list.focusForeground": "#ebdbb2", + "list.inactiveSelectionForeground": "#689d6a", + "list.inactiveSelectionBackground": "#3c383680", + "list.dropBackground": "#3c3836", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#282828", + "sideBar.foreground": "#d5c4a1", + "sideBar.border": "#3c3836", + "sideBarTitle.foreground": "#ebdbb2", + "sideBarSectionHeader.background": "#28282800", + "sideBarSectionHeader.foreground": "#ebdbb2", + + "activityBar.background": "#282828", + "activityBar.foreground": "#ebdbb2", + "activityBar.border": "#3c3836", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#3c3836", + "editorGroup.dropBackground": "#3c383660", + "editorGroupHeader.noTabsBackground": "#3c3836", + "editorGroupHeader.tabsBackground": "#282828", + "editorGroupHeader.tabsBorder": "#3c3836", + + "tab.border": "#28282800", + "tab.activeBorder": "#689d6a", + "tab.activeBackground": "#3c3836", + "tab.activeForeground": "#ebdbb2", + "tab.inactiveForeground": "#a89984", + "tab.inactiveBackground": "#282828", + "tab.unfocusedActiveForeground": "#a89984", + "tab.unfocusedActiveBorder": "#28282800", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#282828", + "editor.foreground": "#ebdbb2", + "editorLineNumber.foreground": "#665c54", + "editorCursor.foreground": "#ebdbb2", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#fabd2f40", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#ebdbb2", + "editor.findMatchBackground": "#83a59870", + "editor.findMatchHighlightBackground": "#fe801930", + "editor.findRangeHighlightBackground": "#83a59870", + "editor.lineHighlightBackground": "#3c383660", + "editor.lineHighlightBorder": "#3c383600", + "editorWhitespace.foreground": "#a8998420", + "editorRuler.foreground": "#a8998440", + "editorCodeLens.foreground": "#a8998490", + "editorBracketMatch.border": "#28282800", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#282828", + "editorHoverWidget.border": "#3c3836", + "editorOverviewRuler.border": "#28282800", + "editorOverviewRuler.findMatchForeground": "#bdae93", + "editorOverviewRuler.rangeHighlightForeground": "#bdae93", + "editorOverviewRuler.selectionHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightStrongForeground": "#665c54", + "editorOverviewRuler.modifiedForeground": "#83a598", + "editorOverviewRuler.addedForeground": "#83a598", + "editorOverviewRuler.deletedForeground": "#83a598", + "editorOverviewRuler.errorForeground": "#fb4934", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#d3869b", + "editorGutter.background": "#28282800", + "editorGutter.modifiedBackground": "#83a598", + "editorGutter.addedBackground": "#b8bb26", + "editorGutter.deletedBackground": "#fb4934", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#b8bb2630", + "diffEditor.removedTextBackground": "#fb493430", + + "editorWidget.background": "#282828", + "editorWidget.border": "#3c3836", + "editorSuggestWidget.background": "#282828", + "editorSuggestWidget.foreground": "#ebdbb2", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#3c383660", + "editorSuggestWidget.border": "#3c3836", + + "peekView.border": "#3c3836", + "peekViewEditor.background": "#3c383670", + "peekViewEditor.matchHighlightBackground": "#504945", + "peekViewEditorGutter.background": "#3c383670", + "peekViewResult.background": "#3c383670", + "peekViewResult.fileForeground": "#ebdbb2", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#ebdbb2", + "peekViewResult.lineForeground": "#ebdbb2", + "peekViewResult.matchHighlightBackground": "#504945", + "peekViewTitle.background": "#3c383670", + "peekViewTitleDescription.foreground": "#bdae93", + "peekViewTitleLabel.foreground": "#ebdbb2", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#28282800", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#3c3836", + "panelTitle.activeForeground": "#ebdbb2", + + "statusBar.background": "#282828", + "statusBar.border": "#3c3836", + "statusBar.foreground": "#ebdbb2", + "statusBar.debuggingBackground": "#fe8019", + "statusBar.debuggingForeground": "#282828", + "statusBar.debuggingBorder": "#28282800", + "statusBar.noFolderBackground": "#282828", + "statusBar.noFolderBorder": "#28282800", + + "terminal.ansiBlack": "#3c3836", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#fb4934", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#b8bb26", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#fabd2f", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#83a598", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#d3869b", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#8ec07c", + "terminal.ansiWhite": "#a89984", + "terminal.ansiBrightWhite": "#ebdbb2", + "terminal.foreground": "#ebdbb2", + "terminal.background": "#282828", + + "titleBar.activeBackground": "#282828", + "titleBar.activeForeground": "#ebdbb2", + "titleBar.inactiveBackground": "#282828", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#7c6f64", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#3c3836", + "menu.separatorBackground": "#3c3836", + + "notebook.cellEditorBackground": "#32302f", + "notebook.focusedCellBorder": "#a89984", + "notebook.cellBorderColor": "#504945", + "notebook.focusedEditorBorder": "#504945", + + "extensionButton.prominentBackground": "#b8bb2680", + "extensionButton.prominentHoverBackground": "#b8bb2630", + + "textLink.foreground": "#83a598", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#282828" + }, + "semanticTokenColors": { + "constant.builtin": "#d3869b", + "property": "#83a598", + "property:python": "#ebdbb2", + "parameter": "#83a598", + "variable": "#ebdbb2", + "function": "#8ec07c", + "function.builtin": "#fe8019", + "method": "#8ec07c" + } +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-dark-soft.json b/assets/themes/src/vscode/gruvbox/gruvbox-dark-soft.json new file mode 100644 index 0000000000000000000000000000000000000000..8581447f498ad332d9ac74de6fb20ccaed76a1c3 --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-dark-soft.json @@ -0,0 +1,1074 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Dark Soft", + "type": "dark", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#a89984" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#d5c4a1" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#fabd2f", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#fb4934" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#83a598", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#b8bb26", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#ebdbb2" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#fabd2f" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#d3869b" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#fe8019" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#8ec07c" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#d3869b" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#fe8019" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#fb4934" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#8ec07c", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#83a598" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#ebdbb2" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#d3869b" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#83a598" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#83a598" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#fe8019" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#fe8019" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#fabd2f" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#bdae93" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#fe8019" + } + } + ], + "colors": { + "focusBorder": "#3c3836", + "foreground": "#ebdbb2", + "widget.shadow": "#32302f30", + "selection.background": "#689d6a80", + "errorForeground": "#fb4934", + + "button.background": "#45858880", + "button.foreground": "#ebdbb2", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#32302f", + "dropdown.border": "#3c3836", + "dropdown.foreground": "#ebdbb2", + + "input.background": "#ebdbb205", + "input.border": "#3c3836", + "input.foreground": "#ebdbb2", + "input.placeholderForeground": "#ebdbb260", + "inputValidation.errorBorder": "#fb4934", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#83a598", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#fabd2f", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#ebdbb260", + + "scrollbar.shadow": "#32302f", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#665c54", + "scrollbarSlider.background": "#50494599", + + "badge.background": "#d3869b", + "badge.foreground": "#32302f", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#3c383680", + "list.activeSelectionForeground": "#8ec07c", + "list.hoverBackground": "#3c383680", + "list.hoverForeground": "#d5c4a1", + "list.focusBackground": "#3c3836", + "list.focusForeground": "#ebdbb2", + "list.inactiveSelectionForeground": "#689d6a", + "list.inactiveSelectionBackground": "#3c383680", + "list.dropBackground": "#3c3836", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#32302f", + "sideBar.foreground": "#d5c4a1", + "sideBar.border": "#3c3836", + "sideBarTitle.foreground": "#ebdbb2", + "sideBarSectionHeader.background": "#32302f00", + "sideBarSectionHeader.foreground": "#ebdbb2", + + "activityBar.background": "#32302f", + "activityBar.foreground": "#ebdbb2", + "activityBar.border": "#3c3836", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#3c3836", + "editorGroup.dropBackground": "#3c383660", + "editorGroupHeader.noTabsBackground": "#3c3836", + "editorGroupHeader.tabsBackground": "#32302f", + "editorGroupHeader.tabsBorder": "#3c3836", + + "tab.border": "#32302f00", + "tab.activeBackground": "#504945", + "tab.activeBorder": "#689d6a", + "tab.activeForeground": "#ebdbb2", + "tab.inactiveForeground": "#a89984", + "tab.inactiveBackground": "#32302f", + "tab.unfocusedActiveForeground": "#a89984", + "tab.unfocusedActiveBorder": "#32302f00", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#32302f", + "editor.foreground": "#ebdbb2", + "editorLineNumber.foreground": "#665c54", + "editorCursor.foreground": "#ebdbb2", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#fabd2f40", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#ebdbb2", + "editor.findMatchBackground": "#83a59870", + "editor.findMatchHighlightBackground": "#fe801930", + "editor.findRangeHighlightBackground": "#83a59870", + "editor.lineHighlightBackground": "#3c383660", + "editor.lineHighlightBorder": "#3c383600", + "editorWhitespace.foreground": "#a8998420", + "editorRuler.foreground": "#a8998440", + "editorCodeLens.foreground": "#a8998490", + "editorBracketMatch.border": "#32302f00", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#32302f", + "editorHoverWidget.border": "#3c3836", + "editorOverviewRuler.border": "#32302f00", + "editorOverviewRuler.findMatchForeground": "#bdae93", + "editorOverviewRuler.rangeHighlightForeground": "#bdae93", + "editorOverviewRuler.selectionHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightForeground": "#665c54", + "editorOverviewRuler.wordHighlightStrongForeground": "#665c54", + "editorOverviewRuler.modifiedForeground": "#83a598", + "editorOverviewRuler.addedForeground": "#83a598", + "editorOverviewRuler.deletedForeground": "#83a598", + "editorOverviewRuler.errorForeground": "#fb4934", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#d3869b", + "editorGutter.background": "#32302f00", + "editorGutter.modifiedBackground": "#83a598", + "editorGutter.addedBackground": "#b8bb26", + "editorGutter.deletedBackground": "#fb4934", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#b8bb2630", + "diffEditor.removedTextBackground": "#fb493430", + + "editorWidget.background": "#32302f", + "editorWidget.border": "#3c3836", + "editorSuggestWidget.background": "#32302f", + "editorSuggestWidget.foreground": "#ebdbb2", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#3c383660", + "editorSuggestWidget.border": "#3c3836", + + "peekView.border": "#3c3836", + "peekViewEditor.background": "#3c383670", + "peekViewEditor.matchHighlightBackground": "#504945", + "peekViewEditorGutter.background": "#3c383670", + "peekViewResult.background": "#3c383670", + "peekViewResult.fileForeground": "#ebdbb2", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#ebdbb2", + "peekViewResult.lineForeground": "#ebdbb2", + "peekViewResult.matchHighlightBackground": "#504945", + "peekViewTitle.background": "#3c383670", + "peekViewTitleDescription.foreground": "#bdae93", + "peekViewTitleLabel.foreground": "#ebdbb2", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#32302f00", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#3c3836", + "panelTitle.activeForeground": "#ebdbb2", + + "statusBar.background": "#32302f", + "statusBar.border": "#3c3836", + "statusBar.foreground": "#ebdbb2", + "statusBar.debuggingBackground": "#fe8019", + "statusBar.debuggingForeground": "#32302f", + "statusBar.debuggingBorder": "#32302f00", + "statusBar.noFolderBackground": "#32302f", + "statusBar.noFolderBorder": "#32302f00", + + "terminal.ansiBlack": "#3c3836", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#fb4934", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#b8bb26", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#fabd2f", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#83a598", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#d3869b", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#8ec07c", + "terminal.ansiWhite": "#a89984", + "terminal.ansiBrightWhite": "#ebdbb2", + "terminal.foreground": "#ebdbb2", + "terminal.background": "#32302f", + + "titleBar.activeBackground": "#32302f", + "titleBar.activeForeground": "#ebdbb2", + "titleBar.inactiveBackground": "#32302f", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#7c6f64", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#3c3836", + "menu.separatorBackground": "#3c3836", + + "notebook.cellEditorBackground": "#282828", + "notebook.focusedCellBorder": "#a89984", + "notebook.cellBorderColor": "#665c54", + "notebook.focusedEditorBorder": "#665c54", + + "extensionButton.prominentBackground": "#b8bb2680", + "extensionButton.prominentHoverBackground": "#b8bb2630", + + "textLink.foreground": "#83a598", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#32302f" + }, + "semanticTokenColors": { + "constant.builtin": "#d3869b", + "property": "#83a598", + "property:python": "#ebdbb2", + "parameter": "#83a598", + "variable": "#ebdbb2", + "function": "#8ec07c", + "function.builtin": "#fe8019", + "method": "#8ec07c" + } +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-light-hard.json b/assets/themes/src/vscode/gruvbox/gruvbox-light-hard.json new file mode 100644 index 0000000000000000000000000000000000000000..bd0f60eac99bb62216a58fb90932016741fb172f --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-light-hard.json @@ -0,0 +1,1073 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Light Hard", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#7c6f64" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#b57614", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#b57614" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#665c54" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#076678", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#3c3836" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#b57614" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#79740e" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#427b58", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#076678" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#076678" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#665c54" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#af3a03" + } + } + ], + "colors": { + "focusBorder": "#ebdbb2", + "foreground": "#3c3836", + "widget.shadow": "#f9f5d730", + "selection.background": "#689d6a80", + "errorForeground": "#9d0006", + + "button.background": "#45858880", + "button.foreground": "#3c3836", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#f9f5d7", + "dropdown.border": "#ebdbb2", + "dropdown.foreground": "#3c3836", + + "input.background": "#3c383605", + "input.border": "#ebdbb2", + "input.foreground": "#3c3836", + "input.placeholderForeground": "#3c383660", + "inputValidation.errorBorder": "#9d0006", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#076678", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#b57614", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#3c383660", + + "scrollbar.shadow": "#f9f5d7", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#bdae93", + "scrollbarSlider.background": "#d5c4a199", + + "badge.background": "#8f3f71", + "badge.foreground": "#f9f5d7", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#ebdbb280", + "list.activeSelectionForeground": "#af3a03", + "list.hoverBackground": "#ebdbb280", + "list.hoverForeground": "#504945", + "list.focusBackground": "#ebdbb2", + "list.focusForeground": "#3c3836", + "list.inactiveSelectionForeground": "#d65d0e", + "list.inactiveSelectionBackground": "#ebdbb280", + "list.dropBackground": "#ebdbb2", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#f9f5d7", + "sideBar.foreground": "#504945", + "sideBar.border": "#ebdbb2", + "sideBarTitle.foreground": "#3c3836", + "sideBarSectionHeader.background": "#f9f5d700", + "sideBarSectionHeader.foreground": "#3c3836", + + "activityBar.background": "#f9f5d7", + "activityBar.foreground": "#3c3836", + "activityBar.border": "#ebdbb2", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#ebdbb2", + "editorGroup.dropBackground": "#ebdbb260", + "editorGroupHeader.noTabsBackground": "#ebdbb2", + "editorGroupHeader.tabsBackground": "#f9f5d7", + "editorGroupHeader.tabsBorder": "#ebdbb2", + + "tab.border": "#f9f5d700", + "tab.activeBackground": "#f2e5bc", + "tab.activeBorder": "#d65d0e", + "tab.activeForeground": "#3c3836", + "tab.inactiveForeground": "#7c6f64", + "tab.inactiveBackground": "#f9f5d7", + "tab.unfocusedActiveForeground": "#7c6f64", + "tab.unfocusedActiveBorder": "#f9f5d700", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#f9f5d7", + "editor.foreground": "#3c3836", + "editorLineNumber.foreground": "#bdae93", + "editorCursor.foreground": "#3c3836", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#b5761440", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#3c3836", + "editor.findMatchBackground": "#07667870", + "editor.findMatchHighlightBackground": "#af3a0330", + "editor.findRangeHighlightBackground": "#07667870", + "editor.lineHighlightBackground": "#ebdbb260", + "editor.lineHighlightBorder": "#ebdbb200", + "editorWhitespace.foreground": "#7c6f6420", + "editorRuler.foreground": "#7c6f6440", + "editorCodeLens.foreground": "#7c6f6490", + "editorBracketMatch.border": "#f9f5d700", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#f9f5d7", + "editorHoverWidget.border": "#ebdbb2", + "editorOverviewRuler.border": "#f9f5d700", + "editorOverviewRuler.findMatchForeground": "#665c54", + "editorOverviewRuler.rangeHighlightForeground": "#665c54", + "editorOverviewRuler.selectionHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightStrongForeground": "#bdae93", + "editorOverviewRuler.modifiedForeground": "#076678", + "editorOverviewRuler.addedForeground": "#076678", + "editorOverviewRuler.deletedForeground": "#076678", + "editorOverviewRuler.errorForeground": "#9d0006", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#8f3f71", + "editorGutter.background": "#f9f5d700", + "editorGutter.modifiedBackground": "#076678", + "editorGutter.addedBackground": "#79740e", + "editorGutter.deletedBackground": "#9d0006", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#79740e30", + "diffEditor.removedTextBackground": "#9d000630", + + "editorWidget.background": "#f9f5d7", + "editorWidget.border": "#ebdbb2", + "editorSuggestWidget.background": "#f9f5d7", + "editorSuggestWidget.foreground": "#3c3836", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#ebdbb260", + "editorSuggestWidget.border": "#ebdbb2", + + "peekView.border": "#ebdbb2", + "peekViewEditor.background": "#ebdbb270", + "peekViewEditor.matchHighlightBackground": "#d5c4a1", + "peekViewEditorGutter.background": "#ebdbb270", + "peekViewResult.background": "#ebdbb270", + "peekViewResult.fileForeground": "#3c3836", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#3c3836", + "peekViewResult.lineForeground": "#3c3836", + "peekViewResult.matchHighlightBackground": "#d5c4a1", + "peekViewTitle.background": "#ebdbb270", + "peekViewTitleDescription.foreground": "#665c54", + "peekViewTitleLabel.foreground": "#3c3836", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#f9f5d700", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#ebdbb2", + "panelTitle.activeForeground": "#3c3836", + + "statusBar.background": "#f9f5d7", + "statusBar.border": "#ebdbb2", + "statusBar.foreground": "#3c3836", + "statusBar.debuggingBackground": "#af3a03", + "statusBar.debuggingForeground": "#f9f5d7", + "statusBar.debuggingBorder": "#f9f5d700", + "statusBar.noFolderBackground": "#f9f5d7", + "statusBar.noFolderBorder": "#f9f5d700", + + "terminal.ansiBlack": "#ebdbb2", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#9d0006", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#79740e", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#b57614", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#076678", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#8f3f71", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#427b58", + "terminal.ansiWhite": "#7c6f64", + "terminal.ansiBrightWhite": "#3c3836", + "terminal.foreground": "#3c3836", + "terminal.background": "#f9f5d7", + + "titleBar.activeBackground": "#f9f5d7", + "titleBar.activeForeground": "#3c3836", + "titleBar.inactiveBackground": "#f9f5d7", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#a89984", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#ebdbb2", + "menu.separatorBackground": "#ebdbb2", + + "notebook.cellEditorBackground": "#fbf1c7", + "notebook.focusedCellBorder": "#7c6f64", + "notebook.cellBorderColor": "#d5c4a1", + "notebook.focusedEditorBorder": "#d5c4a1", + + "extensionButton.prominentBackground": "#79740e80", + "extensionButton.prominentHoverBackground": "#79740e30", + + "textLink.foreground": "#076678", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#f9f5d7" + }, + "semanticTokenColors": { + "constant.builtin": "#8f3f71", + "property": "#076678", + "property:python": "#3c3836", + "parameter": "#076678", + "variable": "#3c3836", + "function": "#427b58", + "function.builtin": "#af3a03", + "method": "#427b58" + } +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-light-medium.json b/assets/themes/src/vscode/gruvbox/gruvbox-light-medium.json new file mode 100644 index 0000000000000000000000000000000000000000..6cd742090e8bcfbb7daad2d87a063edec8775e93 --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-light-medium.json @@ -0,0 +1,1073 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Light Medium", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#7c6f64" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#b57614", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#b57614" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#665c54" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#076678", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#3c3836" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#b57614" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#79740e" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#427b58", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#076678" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#076678" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#665c54" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#af3a03" + } + } + ], + "colors": { + "focusBorder": "#ebdbb2", + "foreground": "#3c3836", + "widget.shadow": "#fbf1c730", + "selection.background": "#689d6a80", + "errorForeground": "#9d0006", + + "button.background": "#45858880", + "button.foreground": "#3c3836", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#fbf1c7", + "dropdown.border": "#ebdbb2", + "dropdown.foreground": "#3c3836", + + "input.background": "#3c383605", + "input.border": "#ebdbb2", + "input.foreground": "#3c3836", + "input.placeholderForeground": "#3c383660", + "inputValidation.errorBorder": "#9d0006", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#076678", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#b57614", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#3c383660", + + "scrollbar.shadow": "#fbf1c7", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#bdae93", + "scrollbarSlider.background": "#d5c4a199", + + "badge.background": "#8f3f71", + "badge.foreground": "#fbf1c7", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#ebdbb280", + "list.activeSelectionForeground": "#af3a03", + "list.hoverBackground": "#ebdbb280", + "list.hoverForeground": "#504945", + "list.focusBackground": "#ebdbb2", + "list.focusForeground": "#3c3836", + "list.inactiveSelectionForeground": "#d65d0e", + "list.inactiveSelectionBackground": "#ebdbb280", + "list.dropBackground": "#ebdbb2", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#fbf1c7", + "sideBar.foreground": "#504945", + "sideBar.border": "#ebdbb2", + "sideBarTitle.foreground": "#3c3836", + "sideBarSectionHeader.background": "#fbf1c700", + "sideBarSectionHeader.foreground": "#3c3836", + + "activityBar.background": "#fbf1c7", + "activityBar.foreground": "#3c3836", + "activityBar.border": "#ebdbb2", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#ebdbb2", + "editorGroup.dropBackground": "#ebdbb260", + "editorGroupHeader.noTabsBackground": "#ebdbb2", + "editorGroupHeader.tabsBackground": "#fbf1c7", + "editorGroupHeader.tabsBorder": "#ebdbb2", + + "tab.border": "#fbf1c700", + "tab.activeBackground": "#ebdbb2", + "tab.activeBorder": "#d65d0e", + "tab.activeForeground": "#3c3836", + "tab.inactiveForeground": "#7c6f64", + "tab.inactiveBackground": "#fbf1c7", + "tab.unfocusedActiveForeground": "#7c6f64", + "tab.unfocusedActiveBorder": "#fbf1c700", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#fbf1c7", + "editor.foreground": "#3c3836", + "editorLineNumber.foreground": "#bdae93", + "editorCursor.foreground": "#3c3836", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#b5761440", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#3c3836", + "editor.findMatchBackground": "#07667870", + "editor.findMatchHighlightBackground": "#af3a0330", + "editor.findRangeHighlightBackground": "#07667870", + "editor.lineHighlightBackground": "#ebdbb260", + "editor.lineHighlightBorder": "#ebdbb200", + "editorWhitespace.foreground": "#7c6f6420", + "editorRuler.foreground": "#7c6f6440", + "editorCodeLens.foreground": "#7c6f6490", + "editorBracketMatch.border": "#fbf1c700", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#fbf1c7", + "editorHoverWidget.border": "#ebdbb2", + "editorOverviewRuler.border": "#fbf1c700", + "editorOverviewRuler.findMatchForeground": "#665c54", + "editorOverviewRuler.rangeHighlightForeground": "#665c54", + "editorOverviewRuler.selectionHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightStrongForeground": "#bdae93", + "editorOverviewRuler.modifiedForeground": "#076678", + "editorOverviewRuler.addedForeground": "#076678", + "editorOverviewRuler.deletedForeground": "#076678", + "editorOverviewRuler.errorForeground": "#9d0006", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#8f3f71", + "editorGutter.background": "#fbf1c700", + "editorGutter.modifiedBackground": "#076678", + "editorGutter.addedBackground": "#79740e", + "editorGutter.deletedBackground": "#9d0006", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#79740e30", + "diffEditor.removedTextBackground": "#9d000630", + + "editorWidget.background": "#fbf1c7", + "editorWidget.border": "#ebdbb2", + "editorSuggestWidget.background": "#fbf1c7", + "editorSuggestWidget.foreground": "#3c3836", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#ebdbb260", + "editorSuggestWidget.border": "#ebdbb2", + + "peekView.border": "#ebdbb2", + "peekViewEditor.background": "#ebdbb270", + "peekViewEditor.matchHighlightBackground": "#d5c4a1", + "peekViewEditorGutter.background": "#ebdbb270", + "peekViewResult.background": "#ebdbb270", + "peekViewResult.fileForeground": "#3c3836", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#3c3836", + "peekViewResult.lineForeground": "#3c3836", + "peekViewResult.matchHighlightBackground": "#d5c4a1", + "peekViewTitle.background": "#ebdbb270", + "peekViewTitleDescription.foreground": "#665c54", + "peekViewTitleLabel.foreground": "#3c3836", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#fbf1c700", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#ebdbb2", + "panelTitle.activeForeground": "#3c3836", + + "statusBar.background": "#fbf1c7", + "statusBar.border": "#ebdbb2", + "statusBar.foreground": "#3c3836", + "statusBar.debuggingBackground": "#af3a03", + "statusBar.debuggingForeground": "#fbf1c7", + "statusBar.debuggingBorder": "#fbf1c700", + "statusBar.noFolderBackground": "#fbf1c7", + "statusBar.noFolderBorder": "#fbf1c700", + + "terminal.ansiBlack": "#ebdbb2", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#9d0006", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#79740e", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#b57614", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#076678", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#8f3f71", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#427b58", + "terminal.ansiWhite": "#7c6f64", + "terminal.ansiBrightWhite": "#3c3836", + "terminal.foreground": "#3c3836", + "terminal.background": "#fbf1c7", + + "titleBar.activeBackground": "#fbf1c7", + "titleBar.activeForeground": "#3c3836", + "titleBar.inactiveBackground": "#fbf1c7", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#a89984", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#ebdbb2", + "menu.separatorBackground": "#ebdbb2", + + "notebook.cellEditorBackground": "#f2e5bc", + "notebook.focusedCellBorder": "#665c54", + "notebook.cellBorderColor": "#bdae93", + "notebook.focusedEditorBorder": "#bdae93", + + "extensionButton.prominentBackground": "#79740e80", + "extensionButton.prominentHoverBackground": "#79740e30", + + "textLink.foreground": "#076678", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#fbf1c7" + }, + "semanticTokenColors": { + "constant.builtin": "#8f3f71", + "property": "#076678", + "property:python": "#3c3836", + "parameter": "#076678", + "variable": "#3c3836", + "function": "#427b58", + "function.builtin": "#af3a03", + "method": "#427b58" + } +} diff --git a/assets/themes/src/vscode/gruvbox/gruvbox-light-soft.json b/assets/themes/src/vscode/gruvbox/gruvbox-light-soft.json new file mode 100644 index 0000000000000000000000000000000000000000..a101704eed4ed97a68ea33e59f051969d8b9c4a2 --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/gruvbox-light-soft.json @@ -0,0 +1,1073 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Gruvbox Light Soft", + "semanticHighlighting": true, + "tokenColors": [ + { + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#458588" + } + }, + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#928374", + "fontStyle": "italic" + } + }, + { + "scope": ["constant", "support.constant", "variable.arguments"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "constant.rgb-value", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["entity.name.tag", "punctuation.tag"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#cc241d" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "foreground": "#b16286" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "meta.header.diff", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "string.escape", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "string.quasi", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "string.entity", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "object", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "module.node", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "support.type.property-name", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "keyword.control.module", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.control.less", + "settings": { + "foreground": "#d79921" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "keyword.operator.new", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "metatag.php", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.type.name", + "meta.return.type", + "meta.return-type", + "meta.cast", + "meta.type.annotation", + "support.type", + "storage.type.cs", + "variable.class" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["variable.this", "support.variable"], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": [ + "entity.name", + "entity.static", + "entity.name.class.static.function", + "entity.name.function", + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Function declarations", + "scope": ["entity.function", "entity.name.function.static"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "entity.name.function.function-call", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.builtin", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": [ + "entity.name.method", + "entity.name.method.function-call", + "entity.name.static.function-call" + ], + "settings": { + "foreground": "#689d6a" + } + }, + { + "scope": "brace", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "variables", + "scope": [ + "meta.parameter.type.variable", + "variable.parameter", + "variable.name", + "variable.other", + "variable", + "string.constant.other.placeholder" + ], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": "prototype", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#7c6f64" + } + }, + { + "scope": "punctuation.quoted", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "punctuation.quasi", + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "URL", + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "fontStyle": "underline" + } + }, + + { + "name": "Python function", + "scope": ["meta.function.python", "entity.name.function.python"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "Python Function and Class definition keywords", + "scope": [ + "storage.type.function.python", + "storage.modifier.declaration", + "storage.type.class.python", + "storage.type.string.python" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Async keyword", + "scope": ["storage.type.function.async.python"], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "Python Function Call", + "scope": "meta.function-call.generic", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "Python Function Arguments", + "scope": "meta.function-call.arguments", + "settings": { + "foreground": "#504945" + } + }, + { + "name": "Python Function decorator", + "scope": "entity.name.function.decorator", + "settings": { + "foreground": "#b57614", + "fontStyle": "bold" + } + }, + { + "name": "Python ALL CAPS", + "scope": "constant.other.caps", + "settings": { + "fontStyle": "bold" + } + }, + + { + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#9d0006" + } + }, + { + "scope": "punctuation.definition.logical-expression", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": ["string.interpolated.dollar.shell", "string.interpolated.backtick.shell"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "keyword.control.directive", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "support.function.C99", + "settings": { + "foreground": "#b57614" + } + }, + + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": ["keyword.other.this.cs", "keyword.other.base.cs"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": "meta.scope.prerequisites", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "entity.name.function.target", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#665c54" + } + }, + { + "scope": ["keyword.other.import.java", "keyword.other.package.java"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "storage.type.java", + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": "storage.type.annotation", + "settings": { + "foreground": "#076678", + "fontStyle": "bold" + } + }, + { + "scope": "keyword.other.documentation.javadoc", + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": "comment.block.javadoc variable.parameter.java", + "settings": { + "foreground": "#79740e", + "fontStyle": "bold" + } + }, + { + "scope": [ + "source.java variable.other.object", + "source.java variable.other.definition.java" + ], + "settings": { + "foreground": "#3c3836" + } + }, + + { + "name": "Lisp optional function parameters", + "scope": "meta.function-parameters.lisp", + "settings": { + "foreground": "#b57614" + } + }, + + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "string.other.link.title.markdown", + "settings": { + "foreground": "#928374", + "fontStyle": "underline" + } + }, + { + "scope": "markup.underline.link", + "settings": { + "foreground": "#8f3f71" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#af3a03" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "markup.punctuation.quote.beginning", + "settings": { + "foreground": "#98971a" + } + }, + { + "scope": "markup.punctuation.list.beginning", + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["markup.inline.raw", "markup.fenced_code.block"], + "settings": { + "foreground": "#427b58" + } + }, + + { + "scope": "string.quoted.double.json", + "settings": { + "foreground": "#076678" + } + }, + { + "name": "JSON Level 0", + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "JSON Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "JSON Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8f3f71" + } + }, + { + "name": "JSON Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#79740e" + } + }, + + { + "scope": "entity.other.attribute-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "source.css meta.selector", + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#af3a03" + } + }, + { + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": [ + "source.css support.function.transform", + "source.css support.function.timing-function", + "source.css support.function.misc" + ], + "settings": { + "foreground": "#9d0006" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.property-value", + "constant.rgb-value", + "support.property-value.scss", + "constant.rgb-value.scss" + ], + "settings": { + "foreground": "#d65d0e" + } + }, + { + "scope": ["entity.name.tag.css"], + "settings": { + "fontStyle": "" + } + }, + + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["text.html entity.name.tag", "text.html punctuation.tag"], + "settings": { + "foreground": "#427b58", + "fontStyle": "bold" + } + }, + + { + "scope": ["source.js variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.ts variable.language"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "scope": ["source.go storage.type"], + "settings": { + "foreground": "#b57614" + } + }, + { + "scope": ["source.go entity.name.import"], + "settings": { + "foreground": "#79740e" + } + }, + { + "scope": ["source.go keyword.package", "source.go keyword.import"], + "settings": { + "foreground": "#427b58" + } + }, + { + "scope": ["source.go keyword.interface", "source.go keyword.struct"], + "settings": { + "foreground": "#076678" + } + }, + { + "scope": ["source.go entity.name.type"], + "settings": { + "foreground": "#3c3836" + } + }, + { + "scope": ["source.go entity.name.function"], + "settings": { + "foreground": "#8f3f71" + } + }, + + { + "scope": ["keyword.control.cucumber.table"], + "settings": { + "foreground": "#076678" + } + }, + + { + "name": "ReasonML String", + "scope": ["source.reason string.double", "source.reason string.regexp"], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "ReasonML equals sign", + "scope": ["source.reason keyword.control.less"], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "ReasonML variable", + "scope": ["source.reason entity.name.function"], + "settings": { + "foreground": "#076678" + } + }, + { + "name": "ReasonML property", + "scope": ["source.reason support.property-value", "source.reason entity.name.filename"], + "settings": { + "foreground": "#af3a03" + } + }, + + { + "name": "Powershell member", + "scope": ["source.powershell variable.other.member.powershell"], + "settings": { + "foreground": "#af3a03" + } + }, + { + "name": "Powershell function", + "scope": ["source.powershell support.function.powershell"], + "settings": { + "foreground": "#b57614" + } + }, + { + "name": "Powershell function attribute", + "scope": ["source.powershell support.function.attribute.powershell"], + "settings": { + "foreground": "#665c54" + } + }, + { + "name": "Powershell hashtable member", + "scope": [ + "source.powershell meta.hashtable.assignment.powershell variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#af3a03" + } + } + ], + "colors": { + "focusBorder": "#ebdbb2", + "foreground": "#3c3836", + "widget.shadow": "#f2e5bc30", + "selection.background": "#689d6a80", + "errorForeground": "#9d0006", + + "button.background": "#45858880", + "button.foreground": "#3c3836", + "button.hoverBackground": "#45858860", + + "dropdown.background": "#f2e5bc", + "dropdown.border": "#ebdbb2", + "dropdown.foreground": "#3c3836", + + "input.background": "#3c383605", + "input.border": "#ebdbb2", + "input.foreground": "#3c3836", + "input.placeholderForeground": "#3c383660", + "inputValidation.errorBorder": "#9d0006", + "inputValidation.errorBackground": "#cc241d80", + "inputValidation.infoBorder": "#076678", + "inputValidation.infoBackground": "#45858880", + "inputValidation.warningBorder": "#b57614", + "inputValidation.warningBackground": "#d7992180", + "inputOption.activeBorder": "#3c383660", + + "scrollbar.shadow": "#f2e5bc", + "scrollbarSlider.activeBackground": "#689d6a", + "scrollbarSlider.hoverBackground": "#bdae93", + "scrollbarSlider.background": "#d5c4a199", + + "badge.background": "#8f3f71", + "badge.foreground": "#f2e5bc", + + "progressBar.background": "#689d6a", + + "list.activeSelectionBackground": "#ebdbb280", + "list.activeSelectionForeground": "#af3a03", + "list.hoverBackground": "#ebdbb280", + "list.hoverForeground": "#504945", + "list.focusBackground": "#ebdbb2", + "list.focusForeground": "#3c3836", + "list.inactiveSelectionForeground": "#d65d0e", + "list.inactiveSelectionBackground": "#ebdbb280", + "list.dropBackground": "#ebdbb2", + "list.highlightForeground": "#689d6a", + + "sideBar.background": "#f2e5bc", + "sideBar.foreground": "#504945", + "sideBar.border": "#ebdbb2", + "sideBarTitle.foreground": "#3c3836", + "sideBarSectionHeader.background": "#f2e5bc00", + "sideBarSectionHeader.foreground": "#3c3836", + + "activityBar.background": "#f2e5bc", + "activityBar.foreground": "#3c3836", + "activityBar.border": "#ebdbb2", + "activityBarBadge.background": "#458588", + "activityBarBadge.foreground": "#ebdbb2", + + "editorGroup.border": "#ebdbb2", + "editorGroup.dropBackground": "#ebdbb260", + "editorGroupHeader.noTabsBackground": "#ebdbb2", + "editorGroupHeader.tabsBackground": "#f2e5bc", + "editorGroupHeader.tabsBorder": "#ebdbb2", + + "tab.border": "#f2e5bc00", + "tab.activeBackground": "#d5c4a1", + "tab.activeBorder": "#d65d0e", + "tab.activeForeground": "#3c3836", + "tab.inactiveForeground": "#7c6f64", + "tab.inactiveBackground": "#f2e5bc", + "tab.unfocusedActiveForeground": "#7c6f64", + "tab.unfocusedActiveBorder": "#f2e5bc00", + "tab.unfocusedInactiveForeground": "#928374", + + "editor.background": "#f2e5bc", + "editor.foreground": "#3c3836", + "editorLineNumber.foreground": "#bdae93", + "editorCursor.foreground": "#3c3836", + "editor.selectionBackground": "#689d6a40", + "editor.selectionHighlightBackground": "#b5761440", + "editor.hoverHighlightBackground": "#689d6a50", + "editorLink.activeForeground": "#3c3836", + "editor.findMatchBackground": "#07667870", + "editor.findMatchHighlightBackground": "#af3a0330", + "editor.findRangeHighlightBackground": "#07667870", + "editor.lineHighlightBackground": "#ebdbb260", + "editor.lineHighlightBorder": "#ebdbb200", + "editorWhitespace.foreground": "#7c6f6420", + "editorRuler.foreground": "#7c6f6440", + "editorCodeLens.foreground": "#7c6f6490", + "editorBracketMatch.border": "#f2e5bc00", + "editorBracketMatch.background": "#92837480", + "editorHoverWidget.background": "#f2e5bc", + "editorHoverWidget.border": "#ebdbb2", + "editorOverviewRuler.border": "#f2e5bc00", + "editorOverviewRuler.findMatchForeground": "#665c54", + "editorOverviewRuler.rangeHighlightForeground": "#665c54", + "editorOverviewRuler.selectionHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightForeground": "#bdae93", + "editorOverviewRuler.wordHighlightStrongForeground": "#bdae93", + "editorOverviewRuler.modifiedForeground": "#076678", + "editorOverviewRuler.addedForeground": "#076678", + "editorOverviewRuler.deletedForeground": "#076678", + "editorOverviewRuler.errorForeground": "#9d0006", + "editorOverviewRuler.warningForeground": "#d79921", + "editorOverviewRuler.infoForeground": "#8f3f71", + "editorGutter.background": "#f2e5bc00", + "editorGutter.modifiedBackground": "#076678", + "editorGutter.addedBackground": "#79740e", + "editorGutter.deletedBackground": "#9d0006", + "editorError.foreground": "#cc241d", + "editorWarning.foreground": "#d79921", + "editorInfo.foreground": "#458588", + + "editorBracketHighlight.foreground1": "#b16286", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#689d6a", + "editorBracketHighlight.foreground4": "#98971a", + "editorBracketHighlight.foreground5": "#d79921", + "editorBracketHighlight.foreground6": "#d65d0e", + "editorBracketHighlight.unexpectedBracket.foreground": "#cc241d", + + "diffEditor.insertedTextBackground": "#79740e30", + "diffEditor.removedTextBackground": "#9d000630", + + "editorWidget.background": "#f2e5bc", + "editorWidget.border": "#ebdbb2", + "editorSuggestWidget.background": "#f2e5bc", + "editorSuggestWidget.foreground": "#3c3836", + "editorSuggestWidget.highlightForeground": "#689d6a", + "editorSuggestWidget.selectedBackground": "#ebdbb260", + "editorSuggestWidget.border": "#ebdbb2", + + "peekView.border": "#ebdbb2", + "peekViewEditor.background": "#ebdbb270", + "peekViewEditor.matchHighlightBackground": "#d5c4a1", + "peekViewEditorGutter.background": "#ebdbb270", + "peekViewResult.background": "#ebdbb270", + "peekViewResult.fileForeground": "#3c3836", + "peekViewResult.selectionBackground": "#45858820", + "peekViewResult.selectionForeground": "#3c3836", + "peekViewResult.lineForeground": "#3c3836", + "peekViewResult.matchHighlightBackground": "#d5c4a1", + "peekViewTitle.background": "#ebdbb270", + "peekViewTitleDescription.foreground": "#665c54", + "peekViewTitleLabel.foreground": "#3c3836", + + "merge.currentHeaderBackground": "#45858840", + "merge.currentContentBackground": "#45858820", + "merge.incomingHeaderBackground": "#689d6a40", + "merge.incomingContentBackground": "#689d6a20", + "merge.border": "#f2e5bc00", + "editorOverviewRuler.currentContentForeground": "#458588", + "editorOverviewRuler.incomingContentForeground": "#689d6a", + "editorOverviewRuler.commonContentForeground": "#928374", + + "panel.border": "#ebdbb2", + "panelTitle.activeForeground": "#3c3836", + + "statusBar.background": "#f2e5bc", + "statusBar.border": "#ebdbb2", + "statusBar.foreground": "#3c3836", + "statusBar.debuggingBackground": "#af3a03", + "statusBar.debuggingForeground": "#f2e5bc", + "statusBar.debuggingBorder": "#f2e5bc00", + "statusBar.noFolderBackground": "#f2e5bc", + "statusBar.noFolderBorder": "#f2e5bc00", + + "terminal.ansiBlack": "#ebdbb2", + "terminal.ansiBrightBlack": "#928374", + "terminal.ansiRed": "#cc241d", + "terminal.ansiBrightRed": "#9d0006", + "terminal.ansiGreen": "#98971a", + "terminal.ansiBrightGreen": "#79740e", + "terminal.ansiYellow": "#d79921", + "terminal.ansiBrightYellow": "#b57614", + "terminal.ansiBlue": "#458588", + "terminal.ansiBrightBlue": "#076678", + "terminal.ansiMagenta": "#b16286", + "terminal.ansiBrightMagenta": "#8f3f71", + "terminal.ansiCyan": "#689d6a", + "terminal.ansiBrightCyan": "#427b58", + "terminal.ansiWhite": "#7c6f64", + "terminal.ansiBrightWhite": "#3c3836", + "terminal.foreground": "#3c3836", + "terminal.background": "#f2e5bc", + + "titleBar.activeBackground": "#f2e5bc", + "titleBar.activeForeground": "#3c3836", + "titleBar.inactiveBackground": "#f2e5bc", + + "gitDecoration.modifiedResourceForeground": "#d79921", + "gitDecoration.deletedResourceForeground": "#cc241d", + "gitDecoration.untrackedResourceForeground": "#98971a", + "gitDecoration.ignoredResourceForeground": "#a89984", + "gitDecoration.conflictingResourceForeground": "#b16286", + + "menu.border": "#ebdbb2", + "menu.separatorBackground": "#ebdbb2", + + "notebook.cellEditorBackground": "#ebdbb2", + "notebook.focusedCellBorder": "#665c54", + "notebook.cellBorderColor": "#a89984", + "notebook.focusedEditorBorder": "#a89984", + + "extensionButton.prominentBackground": "#79740e80", + "extensionButton.prominentHoverBackground": "#79740e30", + + "textLink.foreground": "#076678", + "textLink.activeForeground": "#458588", + "debugToolBar.background": "#f2e5bc" + }, + "semanticTokenColors": { + "constant.builtin": "#8f3f71", + "property": "#076678", + "property:python": "#3c3836", + "parameter": "#076678", + "variable": "#3c3836", + "function": "#427b58", + "function.builtin": "#af3a03", + "method": "#427b58" + } +} From ee28cc5deb68178d48ecc34aed2c352c59735128 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:21:34 +0100 Subject: [PATCH 029/110] chore: Run multitarget build in script/bundle This has a chance to speed up a build in case where e.g. we're single-threaded in aarch64 build; at that point the x86_64 codegen can take place. Also, MIR can probably be shared between the two architectures, further reducing build time. --- script/bundle | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/script/bundle b/script/bundle index 69a2f165dc605fceb36a1d86be42b4c3a1305cee..a55ff714ce42ec8cd5683f91ec16e99e740db8c5 100755 --- a/script/bundle +++ b/script/bundle @@ -83,14 +83,8 @@ if [ "$local_arch" = true ]; then cargo build ${build_flag} --package zed cargo build ${build_flag} --package cli else - echo "Compiling zed binary for aarch64-apple-darwin" - cargo build ${build_flag} --package zed --target aarch64-apple-darwin - echo "Compiling zed binary for x86_64-apple-darwin" - cargo build ${build_flag} --package zed --target x86_64-apple-darwin - echo "Compiling cli binary for aarch64-apple-darwin" - cargo build ${build_flag} --package cli --target aarch64-apple-darwin - echo "Compiling cli binary for x86_64-apple-darwin" - cargo build ${build_flag} --package cli --target x86_64-apple-darwin + echo "Compiling zed binaries" + cargo build ${build_flag} --package zed --package cli --target aarch64-apple-darwin --target x86_64-apple-darwin fi echo "Creating application bundle" From f730982e7b18ad73f9b7f33d9bcfcecadebef3e8 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 6 Nov 2023 09:38:09 -0700 Subject: [PATCH 030/110] Use notarytool to bundle --- script/bundle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/bundle b/script/bundle index 69a2f165dc605fceb36a1d86be42b4c3a1305cee..c3c5bd76ab5a900da0aaed5dd07eba98dc7b72eb 100755 --- a/script/bundle +++ b/script/bundle @@ -228,8 +228,7 @@ else if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then echo "Notarizing DMG with Apple" - npm install -g notarize-cli - npx notarize-cli --file "${dmg_file_path}" --bundle-id dev.zed.Zed --username "$APPLE_NOTARIZATION_USERNAME" --password "$APPLE_NOTARIZATION_PASSWORD" + "$(xcode-select -p)/usr/bin/notarytool" submit --wait --apple-id "$APPLE_NOTARIZATION_USERNAME" --password "$APPLE_NOTARIZATION_PASSWORD" --team-id MQ55VZLNZQ "${dmg_file_path}" fi if [ "$open_result" = true ]; then From 4d88a326e102a7123a258d8c4de927b88f12b994 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 6 Nov 2023 10:37:35 -0700 Subject: [PATCH 031/110] Tidy up a bit better --- script/bundle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/bundle b/script/bundle index c3c5bd76ab5a900da0aaed5dd07eba98dc7b72eb..b8e64b53ce9e5e4ab36cb3280862eb2677e6d7d6 100755 --- a/script/bundle +++ b/script/bundle @@ -10,6 +10,9 @@ local_only=false overwrite_local_app=false bundle_name="" +# This must match the team in the provsiioning profile. +APPLE_NOTORIZATION_TEAM="MQ55VZLNZQ" + # Function for displaying help info help_info() { echo " @@ -228,7 +231,7 @@ else if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then echo "Notarizing DMG with Apple" - "$(xcode-select -p)/usr/bin/notarytool" submit --wait --apple-id "$APPLE_NOTARIZATION_USERNAME" --password "$APPLE_NOTARIZATION_PASSWORD" --team-id MQ55VZLNZQ "${dmg_file_path}" + "$(xcode-select -p)/usr/bin/notarytool" submit --wait --apple-id "$APPLE_NOTARIZATION_USERNAME" --password "$APPLE_NOTARIZATION_PASSWORD" --team-id "$APPLE_NOTORIZATION_TEAM" "${dmg_file_path}" fi if [ "$open_result" = true ]; then From 80f80df5cf31573a8ce2defdfd980fe9fc836817 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 12:43:10 -0500 Subject: [PATCH 032/110] Add Noctis Theme --- .gitignore | 2 - assets/themes/src/vscode/gruvbox/family.json | 2 +- assets/themes/src/vscode/noctis/LICENSE | 9 + assets/themes/src/vscode/noctis/azureus.json | 1113 +++++++++++++++++ assets/themes/src/vscode/noctis/bordo.json | 1112 ++++++++++++++++ assets/themes/src/vscode/noctis/family.json | 61 + assets/themes/src/vscode/noctis/hibernus.json | 1108 ++++++++++++++++ assets/themes/src/vscode/noctis/lilac.json | 1113 +++++++++++++++++ assets/themes/src/vscode/noctis/lux.json | 1108 ++++++++++++++++ assets/themes/src/vscode/noctis/minimus.json | 1113 +++++++++++++++++ assets/themes/src/vscode/noctis/noctis.json | 1108 ++++++++++++++++ assets/themes/src/vscode/noctis/obscuro.json | 1108 ++++++++++++++++ assets/themes/src/vscode/noctis/sereno.json | 1108 ++++++++++++++++ assets/themes/src/vscode/noctis/uva.json | 1112 ++++++++++++++++ assets/themes/src/vscode/noctis/viola.json | 1112 ++++++++++++++++ crates/theme2/src/theme2.rs | 2 + crates/theme2/src/themes/andromeda.rs | 18 + crates/theme2/src/themes/ayu.rs | 18 + crates/theme2/src/themes/dracula.rs | 18 + crates/theme2/src/themes/gruvbox.rs | 18 + crates/theme2/src/themes/mod.rs | 12 + crates/theme2/src/themes/notctis.rs | 18 + crates/theme_importer/src/main.rs | 23 +- 23 files changed, 12412 insertions(+), 4 deletions(-) create mode 100644 assets/themes/src/vscode/noctis/LICENSE create mode 100644 assets/themes/src/vscode/noctis/azureus.json create mode 100644 assets/themes/src/vscode/noctis/bordo.json create mode 100644 assets/themes/src/vscode/noctis/family.json create mode 100644 assets/themes/src/vscode/noctis/hibernus.json create mode 100644 assets/themes/src/vscode/noctis/lilac.json create mode 100644 assets/themes/src/vscode/noctis/lux.json create mode 100644 assets/themes/src/vscode/noctis/minimus.json create mode 100644 assets/themes/src/vscode/noctis/noctis.json create mode 100644 assets/themes/src/vscode/noctis/obscuro.json create mode 100644 assets/themes/src/vscode/noctis/sereno.json create mode 100644 assets/themes/src/vscode/noctis/uva.json create mode 100644 assets/themes/src/vscode/noctis/viola.json create mode 100644 crates/theme2/src/themes/andromeda.rs create mode 100644 crates/theme2/src/themes/ayu.rs create mode 100644 crates/theme2/src/themes/dracula.rs create mode 100644 crates/theme2/src/themes/gruvbox.rs create mode 100644 crates/theme2/src/themes/mod.rs create mode 100644 crates/theme2/src/themes/notctis.rs diff --git a/.gitignore b/.gitignore index 6231dd2f60fd06c0f2aac44402152ab54978f230..2d8807a4b0559751ff341eacf7dfaf51c84c405c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,3 @@ DerivedData/ .netrc .swiftpm **/*.db -**/src/themes/*.rs -!**/src/themes/.gitkeep diff --git a/assets/themes/src/vscode/gruvbox/family.json b/assets/themes/src/vscode/gruvbox/family.json index 4d3d4d66510f45007e5b7033d053f699636a8ded..7ff7589a8e1f3a05bd78aa14f3557ed07e00e7d6 100644 --- a/assets/themes/src/vscode/gruvbox/family.json +++ b/assets/themes/src/vscode/gruvbox/family.json @@ -1,5 +1,5 @@ { - "name": "Andromeda", + "name": "Gruvbox", "author": "morhetz", "themes": [ { diff --git a/assets/themes/src/vscode/noctis/LICENSE b/assets/themes/src/vscode/noctis/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..44dde44047f940872711c022cd2bc40e79482a8f --- /dev/null +++ b/assets/themes/src/vscode/noctis/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2018 Liviu Schera + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets/themes/src/vscode/noctis/azureus.json b/assets/themes/src/vscode/noctis/azureus.json new file mode 100644 index 0000000000000000000000000000000000000000..d550e74811b63e329f46142f6c5bff6e51584b61 --- /dev/null +++ b/assets/themes/src/vscode/noctis/azureus.json @@ -0,0 +1,1113 @@ +{ + "name": "Noctis Azureus", + "type": "dark", + "colors": { + "selection.background": "#1679b6cc", + "descriptionForeground": "#61a6d1", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#07273b", + "editor.foreground": "#becfda", + "editorLineNumber.foreground": "#4d6c80", + "editorLineNumber.activeForeground": "#61a6d1", + "editorCursor.foreground": "#b3e2ff", + "badge.background": "#49ace9", + "badge.foreground": "#0f1315", + "activityBar.background": "#07273b", + "activityBar.dropBackground": "#61a6d165", + "activityBar.border": "#0f1315", + "activityBar.foreground": "#1679b6", + "activityBar.inactiveForeground": "#1679b677", + "activityBarBadge.background": "#49ace9", + "activityBarBadge.foreground": "#0f1315", + "activityBar.activeBackground": "#49ace933", + "activityBar.activeBorder": "#49ace9", + "sideBar.background": "#062132", + "sideBar.dropBackground": "#062132", + "sideBar.border": "#0f1315", + "sideBar.foreground": "#9fb6c6", + "sideBarSectionHeader.background": "#09334e", + "sideBarSectionHeader.foreground": "#9fb6c6", + "sideBarTitle.foreground": "#9fb6c6", + "sideBarSectionHeader.border": "#0f1315", + "statusBar.foreground": "#1679b6", + "statusBar.background": "#07273b", + "statusBar.border": "#0f1315", + "statusBar.debuggingBackground": "#07273b", + "statusBar.debuggingForeground": "#ff80ac50", + "statusBar.debuggingBorder": "#ff80acaf", + "statusBar.noFolderForeground": "#879dab", + "statusBar.noFolderBackground": "#07273b", + "statusBar.noFolderBorder": "#07273b", + "statusBarItem.activeBackground": "#007ecc59", + "statusBarItem.hoverBackground": "#0a3652", + "statusBarItem.prominentBackground": "#051e2e", + "statusBarItem.prominentHoverBackground": "#002f4d", + "button.background": "#007f99", + "button.foreground": "#ebf7ff", + "button.hoverBackground": "#0ac", + "dropdown.background": "#09334e", + "dropdown.border": "#09334e", + "dropdown.foreground": "#61a6d1", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#07273b", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#07273b", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#07273b", + "editorInfo.foreground": "#49ace9", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#4d6c8033", + "editorGroup.border": "#0f1315", + "editorGroup.dropBackground": "#4d6c8033", + "editorGroupHeader.noTabsBackground": "#09334e", + "editorGroupHeader.tabsBackground": "#09334e", + "editorGroupHeader.tabsBorder": "#09334e", + "tab.activeBackground": "#07273b", + "tab.unfocusedActiveBackground": "#002c47", + "tab.activeForeground": "#49ace9", + "tab.border": "#0f1315", + "tab.inactiveBackground": "#09334e", + "tab.inactiveForeground": "#9fb6c6", + "tab.unfocusedActiveForeground": "#9fb6c6", + "tab.unfocusedInactiveForeground": "#9fb6c6", + "tab.activeBorderTop": "#49ace9", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#07273b", + "tab.unfocusedActiveBorder": "#07273b", + "tab.unfocusedHoverBackground": "#1679b621", + "textBlockQuote.background": "#07273b", + "textBlockQuote.border": "#1679b6", + "textCodeBlock.background": "#07273b", + "textLink.activeForeground": "#49ace9", + "textLink.foreground": "#49ace9", + "textPreformat.foreground": "#ffc180", + "textSeparator.foreground": "#07273b", + "walkThrough.embeddedEditorBackground": "#07273b", + "welcomePage.buttonBackground": "#051b29", + "welcomePage.buttonHoverBackground": "#09334e", + "input.background": "#051b29", + "input.border": "#002f4d", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#879dab", + "inputOption.activeBorder": "#1679b6", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#09334e", + "editorWidget.border": "#0f1315", + "editorHoverWidget.background": "#002942", + "editorHoverWidget.border": "#0f1315", + "editorSuggestWidget.background": "#002942", + "editorSuggestWidget.border": "#0f1315", + "editorSuggestWidget.foreground": "#9fb6c6", + "editorSuggestWidget.highlightForeground": "#49ace9", + "editorSuggestWidget.selectedBackground": "#0c3f5f", + "editorGutter.background": "#07273b", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#ffc180", + "editor.selectionBackground": "#1679b655", + "editor.selectionHighlightBackground": "#49ace933", + "editor.inactiveSelectionBackground": "#1679b633", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a622", + "editor.hoverHighlightBackground": "#1679b63f", + "editor.lineHighlightBackground": "#003c61ee", + "editor.lineHighlightBorder": "#003c61", + "editor.rangeHighlightBackground": "#49d6e922", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#183c53", + "editorIndentGuide.activeBackground": "#28658a", + "editorBracketMatch.background": "#1679b622", + "editorBracketMatch.border": "#1679b6", + "editorRuler.foreground": "#1a425b", + "editorCodeLens.foreground": "#5b858b", + "terminal.ansiBlack": "#28353e", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#aec3d0", + "terminal.ansiBrightBlack": "#475e6c", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#becfda", + "terminal.background": "#051b29", + "terminal.foreground": "#becfda", + "terminalCursor.background": "#051b29", + "terminalCursor.foreground": "#becfda", + "merge.border": "#07273b00", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#07273b", + "notificationCenter.border": "#09334e", + "notificationCenterHeader.foreground": "#879dab", + "notificationCenterHeader.background": "#09334e", + "notificationToast.border": "#09334e", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#09334e", + "notifications.border": "#09334e", + "notificationLink.foreground": "#879dab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#07273b", + "debugExceptionWidget.background": "#07273b", + "debugExceptionWidget.border": "#1679b6", + "extensionButton.prominentBackground": "#008c99", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#00bbcc", + "focusBorder": "#09334e", + "foreground": "#becfda", + "panel.background": "#051b29", + "panel.border": "#1679b6", + "panelTitle.activeBorder": "#1679b6", + "panelTitle.activeForeground": "#49ace9", + "panelTitle.inactiveForeground": "#507b95", + "peekView.border": "#1679b6", + "peekViewEditor.background": "#001f33", + "peekViewEditor.matchHighlightBackground": "#005b9433", + "peekViewEditor.matchHighlightBorder": "#007ecc", + "peekViewEditorGutter.background": "#001f33", + "peekViewResult.background": "#002338", + "peekViewResult.fileForeground": "#ffc180", + "peekViewResult.lineForeground": "#879dab", + "peekViewResult.matchHighlightBackground": "#09334e", + "peekViewResult.selectionBackground": "#09334e", + "peekViewResult.selectionForeground": "#879dab", + "peekViewTitle.background": "#002338", + "peekViewTitleDescription.foreground": "#879dab", + "peekViewTitleLabel.foreground": "#ffc180", + "progressBar.background": "#49ace9", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#008ee677", + "scrollbarSlider.background": "#008ee633", + "scrollbarSlider.hoverBackground": "#008ee655", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#5b788b", + "gitDecoration.conflictingResourceForeground": "#ffc180", + "pickerGroup.border": "#1679b6", + "pickerGroup.foreground": "#49ace9", + "list.activeSelectionBackground": "#0c3f5f", + "list.activeSelectionForeground": "#ebf7ff", + "list.dropBackground": "#002a4d", + "list.focusBackground": "#0b3c5b", + "list.focusForeground": "#ebf7ff", + "list.highlightForeground": "#49ace9", + "list.hoverBackground": "#00558a65", + "list.hoverForeground": "#ebf7ff", + "list.inactiveFocusBackground": "#082d44", + "list.inactiveSelectionBackground": "#09334e", + "list.inactiveSelectionForeground": "#becfda", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa857", + "listFilterWidget.background": "#002a4d", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#4d6c80", + "settings.headerForeground": "#becfda", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#0051a877", + "settings.dropdownBackground": "#09334e", + "settings.dropdownForeground": "#0ac", + "settings.dropdownBorder": "#09334e", + "settings.checkboxBackground": "#09334e", + "settings.checkboxForeground": "#0ac", + "settings.checkboxBorder": "#09334e", + "settings.textInputBackground": "#09334e", + "settings.textInputForeground": "#0ac", + "settings.textInputBorder": "#09334e", + "settings.numberInputBackground": "#051b29", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#051b29", + "breadcrumb.foreground": "#9fb6c6", + "breadcrumb.background": "#07273b", + "breadcrumb.focusForeground": "#49ace9", + "breadcrumb.activeSelectionForeground": "#ebf7ff", + "breadcrumbPicker.background": "#09334e", + "titleBar.activeBackground": "#07273b", + "titleBar.activeForeground": "#becfda", + "titleBar.inactiveBackground": "#07273b", + "titleBar.inactiveForeground": "#9fb6c6", + "menu.background": "#09334e", + "menu.foreground": "#9fb6c6", + "menu.selectionBackground": "#0b3c5b", + "menu.selectionForeground": "#49ace9", + "menu.selectionBorder": "#0b3c5b", + "menu.separatorBackground": "#49ace9", + "menubar.selectionBackground": "#0b3c5b", + "menubar.selectionForeground": "#49ace9", + "menubar.selectionBorder": "#0b3c5b", + "editor.snippetTabstopHighlightBackground": "#051b29", + "editor.snippetTabstopHighlightBorder": "#062132", + "editor.snippetFinalTabstopHighlightBackground": "#051b29", + "editor.snippetFinalTabstopHighlightBorder": "#062132", + "minimap.findMatchHighlight": "#49ace9ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#07273b99" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#5988a6" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#becfda" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/src/vscode/noctis/bordo.json b/assets/themes/src/vscode/noctis/bordo.json new file mode 100644 index 0000000000000000000000000000000000000000..a6c4853c3b078e7373f69ae1084ab7a9d5c47784 --- /dev/null +++ b/assets/themes/src/vscode/noctis/bordo.json @@ -0,0 +1,1112 @@ +{ + "name": "Noctis Bordo", + "type": "dark", + "colors": { + "selection.background": "#88445cbb", + "descriptionForeground": "#bb778f", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#322a2d", + "editor.foreground": "#cbbec2", + "editorLineNumber.foreground": "#715b63", + "editorLineNumber.activeForeground": "#bb778f", + "editorCursor.foreground": "#ffb3cd", + "badge.background": "#f18eb0", + "badge.foreground": "#1f191b", + "activityBar.background": "#322a2d", + "activityBar.dropBackground": "#bb778f65", + "activityBar.border": "#1f191b", + "activityBar.foreground": "#997582", + "activityBar.inactiveForeground": "#99758277", + "activityBarBadge.background": "#f18eb0", + "activityBarBadge.foreground": "#1f191b", + "activityBar.activeBackground": "#f18eb033", + "activityBar.activeBorder": "#f18eb0", + "sideBar.background": "#2c2528", + "sideBar.dropBackground": "#2c2528", + "sideBar.border": "#1f191b", + "sideBar.foreground": "#bbaab0", + "sideBarSectionHeader.background": "#413036", + "sideBarSectionHeader.foreground": "#bbaab0", + "sideBarTitle.foreground": "#bbaab0", + "sideBarSectionHeader.border": "#1f191b", + "statusBar.foreground": "#997582", + "statusBar.background": "#322a2d", + "statusBar.border": "#1f191b", + "statusBar.debuggingBackground": "#322a2d", + "statusBar.debuggingForeground": "#ff80ac50", + "statusBar.debuggingBorder": "#ff80acaf", + "statusBar.noFolderForeground": "#a48e96", + "statusBar.noFolderBackground": "#322a2d", + "statusBar.noFolderBorder": "#322a2d", + "statusBarItem.activeBackground": "#8f566a77", + "statusBarItem.hoverBackground": "#8f566a33", + "statusBarItem.prominentBackground": "#272022", + "statusBarItem.prominentHoverBackground": "#43142488", + "button.background": "#007f99", + "button.foreground": "#edebff", + "button.hoverBackground": "#0ac", + "dropdown.background": "#413036", + "dropdown.border": "#413036", + "dropdown.foreground": "#bb778f", + "editorMarkerNavigation.background": "#5f3a4729", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#322a2d", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#322a2d", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#322a2d", + "editorInfo.foreground": "#40d4e7", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#715b6333", + "editorGroup.border": "#1f191b", + "editorGroup.dropBackground": "#715b6333", + "editorGroupHeader.noTabsBackground": "#413036", + "editorGroupHeader.tabsBackground": "#413036", + "editorGroupHeader.tabsBorder": "#413036", + "tab.activeBackground": "#322a2d", + "tab.unfocusedActiveBackground": "#38232b", + "tab.activeForeground": "#f18eb0", + "tab.border": "#1f191b", + "tab.inactiveBackground": "#413036", + "tab.inactiveForeground": "#bbaab0", + "tab.unfocusedActiveForeground": "#bbaab0", + "tab.unfocusedInactiveForeground": "#bbaab0", + "tab.activeBorderTop": "#f18eb0", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#322a2d", + "tab.unfocusedActiveBorder": "#322a2d", + "tab.unfocusedHoverBackground": "#f18eb021", + "textBlockQuote.background": "#322a2d", + "textBlockQuote.border": "#997582", + "textCodeBlock.background": "#322a2d", + "textLink.activeForeground": "#f18eb0", + "textLink.foreground": "#f18eb0", + "textPreformat.foreground": "#ffc180", + "textSeparator.foreground": "#322a2d", + "walkThrough.embeddedEditorBackground": "#322a2d", + "welcomePage.buttonBackground": "#272022", + "welcomePage.buttonHoverBackground": "#413036", + "input.background": "#272022", + "input.border": "#412a32", + "input.foreground": "#ddd5d7", + "input.placeholderForeground": "#a48e96", + "inputOption.activeBorder": "#997582", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#413036", + "editorWidget.border": "#1f191b", + "editorHoverWidget.background": "#3e2e33", + "editorHoverWidget.border": "#1f191b", + "editorSuggestWidget.background": "#3e2e33", + "editorSuggestWidget.border": "#1f191b", + "editorSuggestWidget.foreground": "#bbaab0", + "editorSuggestWidget.highlightForeground": "#f18eb0", + "editorSuggestWidget.selectedBackground": "#563440", + "editorGutter.background": "#322a2d", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#ffc180", + "editor.selectionBackground": "#99758255", + "editor.selectionHighlightBackground": "#7f536299", + "editor.inactiveSelectionBackground": "#99758233", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a622", + "editor.hoverHighlightBackground": "#9975823f", + "editor.lineHighlightBackground": "#453138aa", + "editor.lineHighlightBorder": "#45313899", + "editor.rangeHighlightBackground": "#49d6e922", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffccde21", + "editorIndentGuide.background": "#48373d", + "editorIndentGuide.activeBackground": "#7f5362", + "editorBracketMatch.background": "#99758222", + "editorBracketMatch.border": "#997582", + "editorRuler.foreground": "#593a46", + "editorCodeLens.foreground": "#776284", + "terminal.ansiBlack": "#47393e", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#b9acb0", + "terminal.ansiBrightBlack": "#69545b", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#cbbec2", + "terminal.background": "#272022", + "terminal.foreground": "#cbbec2", + "terminalCursor.background": "#272022", + "terminalCursor.foreground": "#cbbec2", + "merge.border": "#322a2d00", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#322a2d", + "notificationCenter.border": "#413036", + "notificationCenterHeader.foreground": "#a48e96", + "notificationCenterHeader.background": "#413036", + "notificationToast.border": "#413036", + "notifications.foreground": "#ddd5d7", + "notifications.background": "#413036", + "notifications.border": "#413036", + "notificationLink.foreground": "#a48e96", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#322a2d", + "debugExceptionWidget.background": "#322a2d", + "debugExceptionWidget.border": "#997582", + "extensionButton.prominentBackground": "#008c99", + "extensionButton.prominentForeground": "#e4e2f9", + "extensionButton.prominentHoverBackground": "#00bbcc", + "focusBorder": "#413036", + "foreground": "#cbbec2", + "panel.background": "#272022", + "panel.border": "#997582", + "panelTitle.activeBorder": "#997582", + "panelTitle.activeForeground": "#f18eb0", + "panelTitle.inactiveForeground": "#936c7a", + "peekView.border": "#997582", + "peekViewEditor.background": "#2c2125", + "peekViewEditor.matchHighlightBackground": "#88445c55", + "peekViewEditorGutter.background": "#2c2125", + "peekViewResult.background": "#322529", + "peekViewResult.fileForeground": "#ffc180", + "peekViewResult.lineForeground": "#a48e96", + "peekViewResult.matchHighlightBackground": "#47393e", + "peekViewResult.selectionBackground": "#47393e", + "peekViewResult.selectionForeground": "#a48e96", + "peekViewTitle.background": "#322529", + "peekViewTitleDescription.foreground": "#a48e96", + "peekViewTitleLabel.foreground": "#ffc180", + "progressBar.background": "#f18eb0", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#eb609155", + "scrollbarSlider.background": "#eb609133", + "scrollbarSlider.hoverBackground": "#eb609144", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#5b788b", + "gitDecoration.conflictingResourceForeground": "#ffc180", + "pickerGroup.border": "#997582", + "pickerGroup.foreground": "#f18eb0", + "list.activeSelectionBackground": "#5c2e3e99", + "list.activeSelectionForeground": "#edebff", + "list.dropBackground": "#38292e", + "list.focusBackground": "#824a5e66", + "list.focusForeground": "#edebff", + "list.highlightForeground": "#f18eb0", + "list.hoverBackground": "#533641", + "list.hoverForeground": "#edebff", + "list.inactiveFocusBackground": "#2c2528", + "list.inactiveSelectionBackground": "#3b2b31", + "list.inactiveSelectionForeground": "#cbbec2", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa857", + "listFilterWidget.background": "#202040", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#715b63", + "settings.headerForeground": "#cbbec2", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#824a5e77", + "settings.dropdownBackground": "#413036", + "settings.dropdownForeground": "#0ac", + "settings.dropdownBorder": "#413036", + "settings.checkboxBackground": "#413036", + "settings.checkboxForeground": "#0ac", + "settings.checkboxBorder": "#413036", + "settings.textInputBackground": "#413036", + "settings.textInputForeground": "#0ac", + "settings.textInputBorder": "#413036", + "settings.numberInputBackground": "#272022", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#272022", + "breadcrumb.foreground": "#bbaab0", + "breadcrumb.background": "#322a2d", + "breadcrumb.focusForeground": "#f18eb0", + "breadcrumb.activeSelectionForeground": "#edebff", + "breadcrumbPicker.background": "#413036", + "titleBar.activeBackground": "#322a2d", + "titleBar.activeForeground": "#cbbec2", + "titleBar.inactiveBackground": "#322a2d", + "titleBar.inactiveForeground": "#bbaab0", + "menu.background": "#413036", + "menu.foreground": "#bbaab0", + "menu.selectionBackground": "#824a5e66", + "menu.selectionForeground": "#f18eb0", + "menu.selectionBorder": "#824a5e66", + "menu.separatorBackground": "#f18eb0", + "menubar.selectionBackground": "#824a5e66", + "menubar.selectionForeground": "#f18eb0", + "menubar.selectionBorder": "#824a5e66", + "editor.snippetTabstopHighlightBackground": "#272022", + "editor.snippetTabstopHighlightBorder": "#2c2528", + "editor.snippetFinalTabstopHighlightBackground": "#272022", + "editor.snippetFinalTabstopHighlightBorder": "#2c2528", + "minimap.findMatchHighlight": "#f18eb0ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#322a2d99" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#8b747c" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#cbbec2" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/src/vscode/noctis/family.json b/assets/themes/src/vscode/noctis/family.json new file mode 100644 index 0000000000000000000000000000000000000000..26aba7e21357fb566a46f5d3f4ed8d59ba1226a7 --- /dev/null +++ b/assets/themes/src/vscode/noctis/family.json @@ -0,0 +1,61 @@ +{ + "name": "Notctis", + "author": "Liviu Schera (liviuschera)", + "themes": [ + { + "name": "Noctis Azureus", + "file_name": "azureus.json", + "appearance": "dark" + }, + { + "name": "Noctis Bordo", + "file_name": "bordo.json", + "appearance": "dark" + }, + { + "name": "Noctus Hibernus", + "file_name": "hibernus.json", + "appearance": "light" + }, + { + "name": "Noctis Lilac", + "file_name": "lilac.json", + "appearance": "dark" + }, + { + "name": "Noctis Lux", + "file_name": "lux.json", + "appearance": "light" + }, + { + "name": "Noctis Minimus", + "file_name": "minimus.json", + "appearance": "dark" + }, + { + "name": "Noctis", + "file_name": "noctis.json", + "appearance": "dark" + }, + { + "name": "Noctis Obscuro", + "file_name": "obscuro.json", + "appearance": "dark" + }, + { + "name": "Noctis Sereno", + "file_name": "obscuro.json", + "appearance": "dark" + }, + { + "name": "Noctis Uva", + "file_name": "uva.json", + "appearance": "dark" + }, + { + "name": "Noctis Viola", + "file_name": "viola.json", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vscode/noctis/hibernus.json b/assets/themes/src/vscode/noctis/hibernus.json new file mode 100644 index 0000000000000000000000000000000000000000..a20a19289ea539b675cb42b3480eb6ff57e90e53 --- /dev/null +++ b/assets/themes/src/vscode/noctis/hibernus.json @@ -0,0 +1,1108 @@ +{ + "name": "Noctis Hibernus", + "type": "light", + "colors": { + "selection.background": "#169fb177", + "descriptionForeground": "#929ea0", + "errorForeground": "#ff4000", + "widget.shadow": "#00000055", + "editor.background": "#f4f6f6", + "editor.foreground": "#005661", + "editorLineNumber.foreground": "#a0abac", + "editorLineNumber.activeForeground": "#0099ad", + "editorCursor.foreground": "#0092a8", + "badge.background": "#0099ad", + "badge.foreground": "#f4f6f6", + "activityBar.background": "#f4f6f6", + "activityBar.dropBackground": "#0099ad65", + "activityBar.foreground": "#0099ad", + "activityBar.border": "#ece2c600", + "activityBarBadge.background": "#0099ad", + "activityBarBadge.foreground": "#f4f6f6", + "activityBar.activeBackground": "#0099ad33", + "activityBar.activeBorder": "#0099ad", + "sideBar.background": "#e7f2f3", + "sideBar.foreground": "#71838e", + "sideBar.border": "#ece2c600", + "sideBar.dropBackground": "#e7f2f3", + "sideBarTitle.foreground": "#71838e", + "sideBarSectionHeader.background": "#c1def0", + "sideBarSectionHeader.foreground": "#71838e", + "statusBar.background": "#caedf2", + "statusBar.foreground": "#0099ad", + "statusBar.border": "#ece2c600", + "statusBar.debuggingBackground": "#e7f2f3", + "statusBar.debuggingForeground": "#e9498150", + "statusBar.debuggingBorder": "#e94981af", + "statusBar.noFolderForeground": "#87a7ab", + "statusBar.noFolderBackground": "#e7f2f3", + "statusBar.noFolderBorder": "#e7f2f3", + "statusBarItem.activeBackground": "#dfeff1", + "statusBarItem.hoverBackground": "#d1e8eb", + "statusBarItem.prominentBackground": "#c1d4d7", + "statusBarItem.prominentHoverBackground": "#bfdee3", + "button.background": "#099099", + "button.foreground": "#f1f1f1", + "button.hoverBackground": "#0cc", + "dropdown.background": "#f4f6f6", + "dropdown.border": "#f4f6f6", + "dropdown.foreground": "#005661", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#ff4000", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#f4f6f6", + "editorError.foreground": "#ff4000", + "editorWarning.border": "#f4f6f6", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#f4f6f6", + "editorInfo.foreground": "#00c6e0", + "editorHint.border": "#58cc6d00", + "editorHint.foreground": "#58cc6d", + "editorGroup.emptyBackground": "#93b4b833", + "editorGroup.border": "#d0edf1", + "editorGroup.dropBackground": "#93b4b833", + "editorGroupHeader.noTabsBackground": "#caedf2", + "editorGroupHeader.tabsBackground": "#caedf2", + "editorGroupHeader.tabsBorder": "#caedf200", + "tab.activeBackground": "#f4f6f6", + "tab.unfocusedActiveBackground": "#e3f5f7", + "tab.activeForeground": "#0099ad", + "tab.border": "#b2d2e6", + "tab.inactiveBackground": "#caedf2", + "tab.inactiveForeground": "#71838e", + "tab.unfocusedActiveForeground": "#71838e", + "tab.unfocusedInactiveForeground": "#71838e", + "tab.activeBorderTop": "#00c6e0", + "tab.activeModifiedBorder": "#00b368", + "tab.activeBorder": "#f4f6f6", + "tab.unfocusedActiveBorder": "#f4f6f600", + "tab.unfocusedHoverBackground": "#0099ad21", + "textBlockQuote.background": "#e7f2f3", + "textBlockQuote.border": "#00899e", + "textCodeBlock.background": "#e7f2f3", + "textLink.activeForeground": "#00c6e0", + "textLink.foreground": "#00c6e0", + "textPreformat.foreground": "#e9a149", + "textSeparator.foreground": "#e7f2f3", + "walkThrough.embeddedEditorBackground": "#e7f2f3", + "welcomePage.buttonBackground": "#e7f2f3", + "welcomePage.buttonHoverBackground": "#caedf2", + "input.background": "#f4f6f6", + "input.border": "#e0eff1", + "input.foreground": "#6a7a7c", + "input.placeholderForeground": "#9fabad", + "inputOption.activeBorder": "#0099ad", + "inputValidation.errorBackground": "#ff400041", + "inputValidation.errorBorder": "#ff4000", + "inputValidation.infoBackground": "#00c6e0cc", + "inputValidation.infoBorder": "#00c6e0", + "inputValidation.warningBackground": "#ffa587cc", + "inputValidation.warningBorder": "#ffa487", + "editorWidget.background": "#e0eff1", + "editorWidget.border": "#ece2c600", + "editorHoverWidget.background": "#e0eff1", + "editorHoverWidget.border": "#ece2c600", + "editorSuggestWidget.background": "#e0eff1", + "editorSuggestWidget.border": "#ece2c600", + "editorSuggestWidget.foreground": "#6a7a7c", + "editorSuggestWidget.highlightForeground": "#0099ad", + "editorSuggestWidget.selectedBackground": "#bbe0f7", + "editorGutter.background": "#f4f6f6", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#ff4000", + "editorGutter.modifiedBackground": "#e9a149", + "editor.selectionBackground": "#ade2eb77", + "editor.selectionHighlightBackground": "#14a5ff33", + "editor.selectionHighlightBorder": "#14a5ff00", + "editor.inactiveSelectionBackground": "#ade2eb55", + "editor.wordHighlightStrongBackground": "#b5890027", + "editor.wordHighlightStrongBorder": "#b5890000", + "editor.wordHighlightBackground": "#e9a14922", + "editor.wordHighlightBorder": "#e9a14900", + "editor.findMatchBackground": "#8ce99a60", + "editor.findMatchBorder": "#8ce99a00", + "editor.findMatchHighlightBackground": "#148f9f33", + "editor.findMatchHighlightBorder": "#148f9f00", + "editor.findRangeHighlightBackground": "#99e62a55", + "editor.findRangeHighlightBorder": "#58CC6D00", + "editor.hoverHighlightBackground": "#0099ad3f", + "editor.lineHighlightBackground": "#d1ebefcc", + "editor.lineHighlightBorder": "#d1ebef00", + "editor.rangeHighlightBackground": "#f1e9d5a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#c1d4d7bb", + "editorIndentGuide.background": "#c1d4d7aa", + "editorIndentGuide.activeBackground": "#88bcc3", + "editorBracketMatch.background": "#0099ad20", + "editorBracketMatch.border": "#0099ad", + "editorRuler.foreground": "#d0edf1", + "editorCodeLens.foreground": "#77aaca", + "terminal.ansiBlack": "#003b42", + "terminal.ansiRed": "#e34e1c", + "terminal.ansiGreen": "#00b368", + "terminal.ansiYellow": "#f49725", + "terminal.ansiBlue": "#0094f0", + "terminal.ansiMagenta": "#ff5792", + "terminal.ansiCyan": "#00bdd6", + "terminal.ansiWhite": "#8ca6a6", + "terminal.ansiBrightBlack": "#004d57", + "terminal.ansiBrightRed": "#ff4000", + "terminal.ansiBrightGreen": "#00d17a", + "terminal.ansiBrightYellow": "#ff8c00", + "terminal.ansiBrightBlue": "#0fa3ff", + "terminal.ansiBrightMagenta": "#ff6b9f", + "terminal.ansiBrightCyan": "#00cbe6", + "terminal.ansiBrightWhite": "#bbc3c4", + "terminal.background": "#e1eeef", + "terminal.foreground": "#005661", + "terminalCursor.background": "#e1eeef", + "terminalCursor.foreground": "#005661", + "merge.border": "#f4f6f600", + "merge.currentContentBackground": "#33e7ff33", + "merge.currentHeaderBackground": "#33e7ff55", + "merge.incomingContentBackground": "#9d92f233", + "merge.incomingHeaderBackground": "#9d92f255", + "merge.commonContentBackground": "#ffc18033", + "merge.commonHeaderBackground": "#ffc18055", + "editorOverviewRuler.currentContentForeground": "#33e7ff55", + "editorOverviewRuler.incomingContentForeground": "#9d92f255", + "editorOverviewRuler.commonContentForeground": "#ffc18055", + "editorOverviewRuler.border": "#f4f6f6", + "notificationCenter.border": "#e0eff1", + "notificationCenterHeader.foreground": "#005661", + "notificationCenterHeader.background": "#e0eff1", + "notificationToast.border": "#e0eff1", + "notifications.foreground": "#005661", + "notifications.background": "#e0eff1", + "notifications.border": "#e0eff1", + "notificationLink.foreground": "#005661", + "diffEditor.insertedTextBackground": "#14b83230", + "diffEditor.removedTextBackground": "#BB1F0522", + "debugToolBar.background": "#e7f2f3", + "debugExceptionWidget.background": "#e7f2f3", + "debugExceptionWidget.border": "#00899e", + "extensionButton.prominentBackground": "#099099", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#0cc", + "focusBorder": "#e0eff1", + "foreground": "#005661", + "panel.background": "#e1eeef", + "panel.border": "#00c6e0", + "panelTitle.activeBorder": "#00c6e0", + "panelTitle.activeForeground": "#0099ad", + "panelTitle.inactiveForeground": "#71838e", + "peekView.border": "#0099ad", + "peekViewEditor.background": "#e5fcff", + "peekViewEditor.matchHighlightBackground": "#148f9f33", + "peekViewEditor.matchHighlightBorder": "#148f9f79", + "peekViewEditorGutter.background": "#e5fcff", + "peekViewResult.background": "#e7f2f3", + "peekViewResult.fileForeground": "#e9a149", + "peekViewResult.lineForeground": "#87a7ab", + "peekViewResult.matchHighlightBackground": "#e0eff1", + "peekViewResult.selectionBackground": "#e0eff1", + "peekViewResult.selectionForeground": "#6a7a7c", + "peekViewTitle.background": "#e7f2f3", + "peekViewTitleDescription.foreground": "#87a7ab", + "peekViewTitleLabel.foreground": "#e9a149", + "progressBar.background": "#00c6e0", + "scrollbar.shadow": "#00000055", + "scrollbarSlider.activeBackground": "#0099adad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#0099ad62", + "gitDecoration.addedResourceForeground": "#009456", + "gitDecoration.modifiedResourceForeground": "#14b832", + "gitDecoration.deletedResourceForeground": "#ff4000", + "gitDecoration.untrackedResourceForeground": "#00c6e0", + "gitDecoration.ignoredResourceForeground": "#a8a28faa", + "gitDecoration.conflictingResourceForeground": "#e9a149", + "pickerGroup.border": "#00c6e0", + "pickerGroup.foreground": "#0099ad", + "list.activeSelectionBackground": "#b6e1e7", + "list.activeSelectionForeground": "#005661", + "list.dropBackground": "#b2cacd", + "list.focusBackground": "#bed9ea", + "list.focusForeground": "#005661", + "list.highlightForeground": "#0099ad", + "list.hoverBackground": "#d1eafa", + "list.hoverForeground": "#005661", + "list.inactiveFocusBackground": "#c9eaed", + "list.inactiveSelectionBackground": "#c6e7ec", + "list.inactiveSelectionForeground": "#949384", + "list.errorForeground": "#c9481d", + "list.warningForeground": "#e07a52", + "listFilterWidget.background": "#d5eef1", + "listFilterWidget.outline": "#14b832", + "listFilterWidget.noMatchesOutline": "#ff4000", + "tree.indentGuidesStroke": "#d3cec5", + "settings.headerForeground": "#004d57", + "settings.modifiedItemIndicator": "#00bd23", + "settings.dropdownListBorder": "#ade2eb88", + "settings.dropdownBackground": "#e0eff1", + "settings.dropdownForeground": "#0bb", + "settings.dropdownBorder": "#e0eff1", + "settings.checkboxBackground": "#e0eff1", + "settings.checkboxForeground": "#0bb", + "settings.checkboxBorder": "#e0eff1", + "settings.textInputBackground": "#e0eff1", + "settings.textInputForeground": "#0bb", + "settings.textInputBorder": "#e0eff1", + "settings.numberInputBackground": "#d0edf1", + "settings.numberInputForeground": "#5842ff", + "settings.numberInputBorder": "#d0edf1", + "breadcrumb.foreground": "#71838e", + "breadcrumb.background": "#f4f6f6", + "breadcrumb.focusForeground": "#0099ad", + "breadcrumb.activeSelectionForeground": "#005661", + "breadcrumbPicker.background": "#e0eff1", + "titleBar.activeBackground": "#e7f2f3", + "titleBar.activeForeground": "#005661", + "titleBar.inactiveBackground": "#e7f2f3", + "titleBar.inactiveForeground": "#71838e", + "menu.background": "#e0eff1", + "menu.foreground": "#71838e", + "menu.selectionBackground": "#d1eafa", + "menu.selectionForeground": "#0099ad", + "menu.selectionBorder": "#d1eafa", + "menubar.selectionBackground": "#d1eafa", + "menubar.selectionForeground": "#0099ad", + "menubar.selectionBorder": "#d1eafa", + "editor.snippetTabstopHighlightBackground": "#abe4ed77", + "editor.snippetTabstopHighlightBorder": "#d6f1f5", + "editor.snippetFinalTabstopHighlightBackground": "#abe4ed77", + "editor.snippetFinalTabstopHighlightBorder": "#d6f1f5", + "minimap.findMatchHighlight": "#0099adaa", + "minimap.errorHighlight": "#ff4000ee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#009456", + "minimapGutter.modifiedBackground": "#14b832", + "minimapGutter.deletedBackground": "#ff4000", + "minimap.background": "#f4f6f699" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#8ca6a6" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#004d57" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#ff5792" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#fa8900" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#b3694d" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#a88c00" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e64100" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#00b368" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#009456" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#5842ff" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#0095a8" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#00bdd6" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#0094f0" + } + }, + { + "name": "INVALID", + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#ff530f" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} diff --git a/assets/themes/src/vscode/noctis/lilac.json b/assets/themes/src/vscode/noctis/lilac.json new file mode 100644 index 0000000000000000000000000000000000000000..26e0fe422376496a3a91cc7d191a7057dc986073 --- /dev/null +++ b/assets/themes/src/vscode/noctis/lilac.json @@ -0,0 +1,1113 @@ +{ + "name": "Noctis Lilac", + "type": "dark", + "colors": { + "selection.background": "#b4adebbb", + "descriptionForeground": "#908ea4", + "errorForeground": "#ff4000", + "widget.shadow": "#00000055", + "editor.background": "#f2f1f8", + "editor.foreground": "#0c006b", + "editorLineNumber.foreground": "#9d9ab1", + "editorLineNumber.activeForeground": "#7060eb", + "editorCursor.foreground": "#5c49e9", + "badge.background": "#7060eb", + "badge.foreground": "#f2f1f8", + "activityBar.background": "#f2f1f8", + "activityBar.dropBackground": "#7060eb65", + "activityBar.foreground": "#7060eb", + "activityBar.border": "#ece2c600", + "activityBarBadge.background": "#7060eb", + "activityBarBadge.foreground": "#f2f1f8", + "activityBar.activeBackground": "#7060eb33", + "activityBar.activeBorder": "#7060eb", + "sideBar.background": "#edecf8", + "sideBar.foreground": "#75718e", + "sideBar.border": "#ece2c600", + "sideBar.dropBackground": "#edecf8", + "sideBarTitle.foreground": "#75718e", + "sideBarSectionHeader.background": "#dedbf5", + "sideBarSectionHeader.foreground": "#75718e", + "statusBar.background": "#e2dff6", + "statusBar.foreground": "#7060eb", + "statusBar.border": "#ece2c600", + "statusBar.debuggingBackground": "#edecf8", + "statusBar.debuggingForeground": "#e9498150", + "statusBar.debuggingBorder": "#e94981af", + "statusBar.noFolderForeground": "#8b87ab", + "statusBar.noFolderBackground": "#edecf8", + "statusBar.noFolderBorder": "#edecf8", + "statusBarItem.activeBackground": "#c1bbec", + "statusBarItem.hoverBackground": "#c9c2f9", + "statusBarItem.prominentBackground": "#a9a4e544", + "statusBarItem.prominentHoverBackground": "#a9a4e599", + "button.background": "#8e80ff", + "button.foreground": "#f1f1f1", + "button.hoverBackground": "#a599ff", + "dropdown.background": "#f2f1f8", + "dropdown.border": "#f2f1f8", + "dropdown.foreground": "#0c006b", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#ff4000", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#f2f1f8", + "editorError.foreground": "#ff4000", + "editorWarning.border": "#f2f1f8", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#f2f1f8", + "editorInfo.foreground": "#00c6e0", + "editorHint.border": "#58cc6d00", + "editorHint.foreground": "#58cc6d", + "editorGroup.emptyBackground": "#958fbc33", + "editorGroup.border": "#d4d0f1", + "editorGroup.dropBackground": "#958fbc33", + "editorGroupHeader.noTabsBackground": "#e2dff6", + "editorGroupHeader.tabsBackground": "#e2dff6", + "editorGroupHeader.tabsBorder": "#e2dff600", + "tab.activeBackground": "#f2f1f8", + "tab.unfocusedActiveBackground": "#e9e7f3", + "tab.activeForeground": "#7060eb", + "tab.border": "#b5adeb", + "tab.inactiveBackground": "#e2dff6", + "tab.inactiveForeground": "#75718e", + "tab.unfocusedActiveForeground": "#75718e", + "tab.unfocusedInactiveForeground": "#75718e", + "tab.activeBorderTop": "#00c6e0", + "tab.activeModifiedBorder": "#00b368", + "tab.activeBorder": "#f2f1f8", + "tab.unfocusedActiveBorder": "#f2f1f800", + "tab.unfocusedHoverBackground": "#7060eb21", + "textBlockQuote.background": "#edecf8", + "textBlockQuote.border": "#00899e", + "textCodeBlock.background": "#edecf8", + "textLink.activeForeground": "#00c6e0", + "textLink.foreground": "#00c6e0", + "textPreformat.foreground": "#e9a149", + "textSeparator.foreground": "#edecf8", + "walkThrough.embeddedEditorBackground": "#edecf8", + "welcomePage.buttonBackground": "#edecf8", + "welcomePage.buttonHoverBackground": "#e2dff6", + "input.background": "#f2f1f8", + "input.border": "#dedbf5", + "input.foreground": "#666284", + "input.placeholderForeground": "#9391a6", + "inputOption.activeBorder": "#7060eb", + "inputValidation.errorBackground": "#ff400041", + "inputValidation.errorBorder": "#ff4000", + "inputValidation.infoBackground": "#00c6ea599ff", + "inputValidation.infoBorder": "#00c6e0", + "inputValidation.warningBackground": "#ffa587cc", + "inputValidation.warningBorder": "#ffa487", + "editorWidget.background": "#dedbf5", + "editorWidget.border": "#ece2c600", + "editorHoverWidget.background": "#dedbf5", + "editorHoverWidget.border": "#ece2c600", + "editorSuggestWidget.background": "#dedbf5", + "editorSuggestWidget.border": "#ece2c600", + "editorSuggestWidget.foreground": "#666284", + "editorSuggestWidget.highlightForeground": "#7060eb", + "editorSuggestWidget.selectedBackground": "#cac4f3", + "editorGutter.background": "#f2f1f8", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#ff4000", + "editorGutter.modifiedBackground": "#e9a149", + "editor.selectionBackground": "#b4adeb77", + "editor.selectionHighlightBackground": "#14a5ff33", + "editor.selectionHighlightBorder": "#14a5ff00", + "editor.inactiveSelectionBackground": "#b4adeb55", + "editor.wordHighlightStrongBackground": "#b5890027", + "editor.wordHighlightStrongBorder": "#b5890000", + "editor.wordHighlightBackground": "#e9a14922", + "editor.wordHighlightBorder": "#e9a14900", + "editor.findMatchBackground": "#8ce99a60", + "editor.findMatchBorder": "#8ce99a00", + "editor.findMatchHighlightBackground": "#148f9f33", + "editor.findMatchHighlightBorder": "#148f9f00", + "editor.findRangeHighlightBackground": "#99e62a55", + "editor.findRangeHighlightBorder": "#58CC6D00", + "editor.hoverHighlightBackground": "#7060eb3f", + "editor.lineHighlightBackground": "#d5d2ef99", + "editor.lineHighlightBorder": "#d5d2ef00", + "editor.rangeHighlightBackground": "#f1e9d5a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#c3c1d7bb", + "editorIndentGuide.background": "#c3c1d7aa", + "editorIndentGuide.activeBackground": "#9f99cc", + "editorBracketMatch.background": "#7060eb20", + "editorBracketMatch.border": "#7060eb", + "editorRuler.foreground": "#d4d0f1", + "editorCodeLens.foreground": "#77aaca", + "terminal.ansiBlack": "#0c006b", + "terminal.ansiRed": "#e34e1c", + "terminal.ansiGreen": "#00b368", + "terminal.ansiYellow": "#f49725", + "terminal.ansiBlue": "#0094f0", + "terminal.ansiMagenta": "#ff5792", + "terminal.ansiCyan": "#00bdd6", + "terminal.ansiWhite": "#8ca6a6", + "terminal.ansiBrightBlack": "#0f0080", + "terminal.ansiBrightRed": "#ff4000", + "terminal.ansiBrightGreen": "#00d17a", + "terminal.ansiBrightYellow": "#ff8c00", + "terminal.ansiBrightBlue": "#0fa3ff", + "terminal.ansiBrightMagenta": "#ff6b9f", + "terminal.ansiBrightCyan": "#00cbe6", + "terminal.ansiBrightWhite": "#bbc3c4", + "terminal.background": "#e9e7f3", + "terminal.foreground": "#0c006b", + "terminalCursor.background": "#e9e7f3", + "terminalCursor.foreground": "#0c006b", + "merge.border": "#f2f1f800", + "merge.currentContentBackground": "#33e7ff33", + "merge.currentHeaderBackground": "#33e7ff55", + "merge.incomingContentBackground": "#9d92f233", + "merge.incomingHeaderBackground": "#9d92f255", + "merge.commonContentBackground": "#ffc18033", + "merge.commonHeaderBackground": "#ffc18055", + "editorOverviewRuler.currentContentForeground": "#33e7ff55", + "editorOverviewRuler.incomingContentForeground": "#9d92f255", + "editorOverviewRuler.commonContentForeground": "#ffc18055", + "editorOverviewRuler.border": "#f2f1f8", + "notificationCenter.border": "#dedbf5", + "notificationCenterHeader.foreground": "#0c006b", + "notificationCenterHeader.background": "#dedbf5", + "notificationToast.border": "#dedbf5", + "notifications.foreground": "#0c006b", + "notifications.background": "#dedbf5", + "notifications.border": "#dedbf5", + "notificationLink.foreground": "#0c006b", + "diffEditor.insertedTextBackground": "#14b83230", + "diffEditor.removedTextBackground": "#BB1F0522", + "debugToolBar.background": "#edecf8", + "debugExceptionWidget.background": "#edecf8", + "debugExceptionWidget.border": "#00899e", + "extensionButton.prominentBackground": "#8e80ff", + "extensionButton.prominentForeground": "#e4e2f9", + "extensionButton.prominentHoverBackground": "#a599ff", + "focusBorder": "#dedbf5", + "foreground": "#0c006b", + "panel.background": "#e9e7f3", + "panel.border": "#aea4f4", + "panelTitle.activeBorder": "#aea4f4", + "panelTitle.activeForeground": "#7060eb", + "panelTitle.inactiveForeground": "#75718e", + "peekView.border": "#7060eb", + "peekViewEditor.background": "#eae7fd", + "peekViewEditor.matchHighlightBackground": "#148f9f33", + "peekViewEditor.matchHighlightBorder": "#148f9f79", + "peekViewEditorGutter.background": "#eae7fd", + "peekViewResult.background": "#edecf8", + "peekViewResult.fileForeground": "#e9a149", + "peekViewResult.lineForeground": "#8b87ab", + "peekViewResult.matchHighlightBackground": "#dedbf5", + "peekViewResult.selectionBackground": "#dedbf5", + "peekViewResult.selectionForeground": "#666284", + "peekViewTitle.background": "#edecf8", + "peekViewTitleDescription.foreground": "#8b87ab", + "peekViewTitleLabel.foreground": "#e9a149", + "progressBar.background": "#00c6e0", + "scrollbar.shadow": "#00000055", + "scrollbarSlider.activeBackground": "#7060ebad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#7060eb62", + "gitDecoration.addedResourceForeground": "#009456", + "gitDecoration.modifiedResourceForeground": "#14b832", + "gitDecoration.deletedResourceForeground": "#ff4000", + "gitDecoration.untrackedResourceForeground": "#00c6e0", + "gitDecoration.ignoredResourceForeground": "#a8a28faa", + "gitDecoration.conflictingResourceForeground": "#e9a149", + "pickerGroup.border": "#aea4f4", + "pickerGroup.foreground": "#7060eb", + "list.activeSelectionBackground": "#bcb6e7", + "list.activeSelectionForeground": "#0c006b", + "list.dropBackground": "#afaad4aa", + "list.focusBackground": "#c3beea", + "list.focusForeground": "#0c006b", + "list.highlightForeground": "#7060eb", + "list.hoverBackground": "#d2ccff", + "list.hoverForeground": "#0c006b", + "list.inactiveFocusBackground": "#cec9ed", + "list.inactiveSelectionBackground": "#d7d3f3", + "list.inactiveSelectionForeground": "#838099", + "list.errorForeground": "#c9481d", + "list.warningForeground": "#e07a52", + "listFilterWidget.background": "#d7d3f3", + "listFilterWidget.outline": "#14b832", + "listFilterWidget.noMatchesOutline": "#ff4000", + "tree.indentGuidesStroke": "#c3c1d7", + "settings.headerForeground": "#0c006b", + "settings.modifiedItemIndicator": "#00bd23", + "settings.dropdownListBorder": "#b4adeb88", + "settings.dropdownBackground": "#dedbf5", + "settings.dropdownForeground": "#0bb", + "settings.dropdownBorder": "#dedbf5", + "settings.checkboxBackground": "#dedbf5", + "settings.checkboxForeground": "#0bb", + "settings.checkboxBorder": "#dedbf5", + "settings.textInputBackground": "#dedbf5", + "settings.textInputForeground": "#0bb", + "settings.textInputBorder": "#dedbf5", + "settings.numberInputBackground": "#d4d0f1", + "settings.numberInputForeground": "#5842ff", + "settings.numberInputBorder": "#d4d0f1", + "breadcrumb.foreground": "#75718e", + "breadcrumb.background": "#f2f1f8", + "breadcrumb.focusForeground": "#7060eb", + "breadcrumb.activeSelectionForeground": "#0c006b", + "breadcrumbPicker.background": "#dedbf5", + "titleBar.activeBackground": "#edecf8", + "titleBar.activeForeground": "#0c006b", + "titleBar.inactiveBackground": "#edecf8", + "titleBar.inactiveForeground": "#75718e", + "menu.background": "#dedbf5", + "menu.foreground": "#75718e", + "menu.selectionBackground": "#d6d1fa", + "menu.selectionForeground": "#7060eb", + "menu.selectionBorder": "#d6d1fa", + "menubar.selectionBackground": "#d6d1fa", + "menubar.selectionForeground": "#7060eb", + "menubar.selectionBorder": "#d6d1fa", + "editor.snippetTabstopHighlightBackground": "#b3abed77", + "editor.snippetTabstopHighlightBorder": "#dad6f5", + "editor.snippetFinalTabstopHighlightBackground": "#b3abed77", + "editor.snippetFinalTabstopHighlightBorder": "#dad6f5", + "minimap.findMatchHighlight": "#7060ebaa", + "minimap.errorHighlight": "#ff4000ee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#009456", + "minimapGutter.modifiedBackground": "#14b832", + "minimapGutter.deletedBackground": "#ff4000", + "minimap.background": "#f2f1f899" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#9995b7" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#0c006b" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#ff5792" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#fa8900" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#b3694d" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#a88c00" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e64100" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#00b368" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#009456" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#5842ff" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#0095a8" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#00bdd6" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#0094f0" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#ff530f" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/src/vscode/noctis/lux.json b/assets/themes/src/vscode/noctis/lux.json new file mode 100644 index 0000000000000000000000000000000000000000..1f72b0e59cab91cb2255ee1438ace7b0102dfbcf --- /dev/null +++ b/assets/themes/src/vscode/noctis/lux.json @@ -0,0 +1,1108 @@ +{ + "name": "Noctis Lux", + "type": "light", + "colors": { + "selection.background": "#169fb155", + "descriptionForeground": "#929ea0", + "errorForeground": "#ff4000", + "widget.shadow": "#00000055", + "editor.background": "#fef8ec", + "editor.foreground": "#005661", + "editorLineNumber.foreground": "#a0abac", + "editorLineNumber.activeForeground": "#0099ad", + "editorCursor.foreground": "#0092a8", + "badge.background": "#0099ad", + "badge.foreground": "#fef8ec", + "activityBar.background": "#fef8ec", + "activityBar.dropBackground": "#0099ad65", + "activityBar.foreground": "#0099ad", + "activityBar.border": "#ece2c600", + "activityBarBadge.background": "#0099ad", + "activityBarBadge.foreground": "#fef8ec", + "activityBar.activeBackground": "#0099ad33", + "activityBar.activeBorder": "#0099ad", + "sideBar.background": "#f9f1e1", + "sideBar.foreground": "#888477", + "sideBar.border": "#ece2c600", + "sideBar.dropBackground": "#f9f1e1", + "sideBarTitle.foreground": "#888477", + "sideBarSectionHeader.background": "#f2e7ca", + "sideBarSectionHeader.foreground": "#888477", + "statusBar.background": "#f0e9d6", + "statusBar.foreground": "#0099ad", + "statusBar.border": "#ece2c600", + "statusBar.debuggingBackground": "#f9f1e1", + "statusBar.debuggingForeground": "#e9498150", + "statusBar.debuggingBorder": "#e94981af", + "statusBar.noFolderForeground": "#87a7ab", + "statusBar.noFolderBackground": "#f9f1e1", + "statusBar.noFolderBorder": "#f9f1e1", + "statusBarItem.activeBackground": "#dfeff1", + "statusBarItem.hoverBackground": "#d1e8eb", + "statusBarItem.prominentBackground": "#c1d4d7", + "statusBarItem.prominentHoverBackground": "#bfdee3", + "button.background": "#099099", + "button.foreground": "#f1f1f1", + "button.hoverBackground": "#0cc", + "dropdown.background": "#fef8ec", + "dropdown.border": "#fef8ec", + "dropdown.foreground": "#005661", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#ff4000", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#fef8ec", + "editorError.foreground": "#ff4000", + "editorWarning.border": "#fef8ec", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#fef8ec", + "editorInfo.foreground": "#00c6e0", + "editorHint.border": "#58cc6d00", + "editorHint.foreground": "#58cc6d", + "editorGroup.emptyBackground": "#b8ae9333", + "editorGroup.border": "#f0e7d1", + "editorGroup.dropBackground": "#b8ae9333", + "editorGroupHeader.noTabsBackground": "#f0e9d6", + "editorGroupHeader.tabsBackground": "#f0e9d6", + "editorGroupHeader.tabsBorder": "#f0e9d600", + "tab.activeBackground": "#fef8ec", + "tab.unfocusedActiveBackground": "#f7f2e3", + "tab.activeForeground": "#0099ad", + "tab.border": "#e6d7b2", + "tab.inactiveBackground": "#f0e9d6", + "tab.inactiveForeground": "#888477", + "tab.unfocusedActiveForeground": "#888477", + "tab.unfocusedInactiveForeground": "#888477", + "tab.activeBorderTop": "#00c6e0", + "tab.activeModifiedBorder": "#00b368", + "tab.activeBorder": "#fef8ec", + "tab.unfocusedActiveBorder": "#fef8ec00", + "tab.unfocusedHoverBackground": "#0099ad21", + "textBlockQuote.background": "#f9f1e1", + "textBlockQuote.border": "#00899e", + "textCodeBlock.background": "#f9f1e1", + "textLink.activeForeground": "#00c6e0", + "textLink.foreground": "#00c6e0", + "textPreformat.foreground": "#e9a149", + "textSeparator.foreground": "#f9f1e1", + "walkThrough.embeddedEditorBackground": "#f9f1e1", + "welcomePage.buttonBackground": "#f9f1e1", + "welcomePage.buttonHoverBackground": "#e1e0d0", + "input.background": "#fef8ec", + "input.border": "#f2edde", + "input.foreground": "#6a7a7c", + "input.placeholderForeground": "#9fabad", + "inputOption.activeBorder": "#0099ad", + "inputValidation.errorBackground": "#ff400041", + "inputValidation.errorBorder": "#ff4000", + "inputValidation.infoBackground": "#00c6e0cc", + "inputValidation.infoBorder": "#00c6e0", + "inputValidation.warningBackground": "#ffa587cc", + "inputValidation.warningBorder": "#ffa487", + "editorWidget.background": "#f2edde", + "editorWidget.border": "#ece2c600", + "editorHoverWidget.background": "#f2edde", + "editorHoverWidget.border": "#ece2c600", + "editorSuggestWidget.background": "#f2edde", + "editorSuggestWidget.border": "#ece2c600", + "editorSuggestWidget.foreground": "#6a7a7c", + "editorSuggestWidget.highlightForeground": "#0099ad", + "editorSuggestWidget.selectedBackground": "#dbfaff", + "editorGutter.background": "#fef8ec", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#ff4000", + "editorGutter.modifiedBackground": "#e9a149", + "editor.selectionBackground": "#ade2eb77", + "editor.selectionHighlightBackground": "#14a5ff33", + "editor.selectionHighlightBorder": "#14a5ff00", + "editor.inactiveSelectionBackground": "#ade2eb55", + "editor.wordHighlightStrongBackground": "#b5890027", + "editor.wordHighlightStrongBorder": "#b5890000", + "editor.wordHighlightBackground": "#e9a14922", + "editor.wordHighlightBorder": "#e9a14900", + "editor.findMatchBackground": "#8ce99a55", + "editor.findMatchBorder": "#8ce99a00", + "editor.findMatchHighlightBackground": "#148f9f33", + "editor.findMatchHighlightBorder": "#148f9f00", + "editor.findRangeHighlightBackground": "#99e62a55", + "editor.findRangeHighlightBorder": "#58CC6D00", + "editor.hoverHighlightBackground": "#0099ad3f", + "editor.lineHighlightBackground": "#d1ebefcc", + "editor.lineHighlightBorder": "#d1ebef00", + "editor.rangeHighlightBackground": "#f1e9d5a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#d3cec5bb", + "editorIndentGuide.background": "#d3cec5aa", + "editorIndentGuide.activeBackground": "#88adc3", + "editorBracketMatch.background": "#0099ad20", + "editorBracketMatch.border": "#0099ad", + "editorRuler.foreground": "#f1e6d0", + "editorCodeLens.foreground": "#77aaca", + "terminal.ansiBlack": "#003b42", + "terminal.ansiRed": "#e34e1c", + "terminal.ansiGreen": "#00b368", + "terminal.ansiYellow": "#f49725", + "terminal.ansiBlue": "#0094f0", + "terminal.ansiMagenta": "#ff5792", + "terminal.ansiCyan": "#00bdd6", + "terminal.ansiWhite": "#8ca6a6", + "terminal.ansiBrightBlack": "#004d57", + "terminal.ansiBrightRed": "#ff4000", + "terminal.ansiBrightGreen": "#00d17a", + "terminal.ansiBrightYellow": "#ff8c00", + "terminal.ansiBrightBlue": "#0fa3ff", + "terminal.ansiBrightMagenta": "#ff6b9f", + "terminal.ansiBrightCyan": "#00cbe6", + "terminal.ansiBrightWhite": "#bbc3c4", + "terminal.background": "#f6edda", + "terminal.foreground": "#005661", + "terminalCursor.background": "#f6edda", + "terminalCursor.foreground": "#005661", + "merge.border": "#fef8ec00", + "merge.currentContentBackground": "#33e7ff33", + "merge.currentHeaderBackground": "#33e7ff55", + "merge.incomingContentBackground": "#9d92f233", + "merge.incomingHeaderBackground": "#9d92f255", + "merge.commonContentBackground": "#ffc18033", + "merge.commonHeaderBackground": "#ffc18055", + "editorOverviewRuler.currentContentForeground": "#33e7ff55", + "editorOverviewRuler.incomingContentForeground": "#9d92f255", + "editorOverviewRuler.commonContentForeground": "#ffc18055", + "editorOverviewRuler.border": "#fef8ec", + "notificationCenter.border": "#f2edde", + "notificationCenterHeader.foreground": "#005661", + "notificationCenterHeader.background": "#f2edde", + "notificationToast.border": "#f2edde", + "notifications.foreground": "#005661", + "notifications.background": "#f2edde", + "notifications.border": "#f2edde", + "notificationLink.foreground": "#005661", + "diffEditor.insertedTextBackground": "#14b83230", + "diffEditor.removedTextBackground": "#BB1F0522", + "debugToolBar.background": "#f9f1e1", + "debugExceptionWidget.background": "#f9f1e1", + "debugExceptionWidget.border": "#00899e", + "extensionButton.prominentBackground": "#099099", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#0cc", + "focusBorder": "#f2edde", + "foreground": "#005661", + "panel.background": "#f6edda", + "panel.border": "#00c6e0", + "panelTitle.activeBorder": "#00c6e0", + "panelTitle.activeForeground": "#0099ad", + "panelTitle.inactiveForeground": "#888477", + "peekView.border": "#0099ad", + "peekViewEditor.background": "#fff7e5", + "peekViewEditor.matchHighlightBackground": "#148f9f33", + "peekViewEditor.matchHighlightBorder": "#148f9f79", + "peekViewEditorGutter.background": "#fff7e5", + "peekViewResult.background": "#f9f1e1", + "peekViewResult.fileForeground": "#e9a149", + "peekViewResult.lineForeground": "#87a7ab", + "peekViewResult.matchHighlightBackground": "#f2edde", + "peekViewResult.selectionBackground": "#f2edde", + "peekViewResult.selectionForeground": "#6a7a7c", + "peekViewTitle.background": "#f9f1e1", + "peekViewTitleDescription.foreground": "#87a7ab", + "peekViewTitleLabel.foreground": "#e9a149", + "progressBar.background": "#00c6e0", + "scrollbar.shadow": "#00000055", + "scrollbarSlider.activeBackground": "#0099adad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#0099ad62", + "gitDecoration.addedResourceForeground": "#009456", + "gitDecoration.modifiedResourceForeground": "#14b832", + "gitDecoration.deletedResourceForeground": "#ff4000", + "gitDecoration.untrackedResourceForeground": "#00c6e0", + "gitDecoration.ignoredResourceForeground": "#a8a28faa", + "gitDecoration.conflictingResourceForeground": "#e9a149", + "pickerGroup.border": "#00c6e0", + "pickerGroup.foreground": "#0099ad", + "list.activeSelectionBackground": "#b6e1e7", + "list.activeSelectionForeground": "#005661", + "list.dropBackground": "#cdcbb2", + "list.focusBackground": "#bee3ea", + "list.focusForeground": "#005661", + "list.highlightForeground": "#0099ad", + "list.hoverBackground": "#d2f3f9", + "list.hoverForeground": "#005661", + "list.inactiveFocusBackground": "#c9eaed", + "list.inactiveSelectionBackground": "#d5eef1", + "list.inactiveSelectionForeground": "#949384", + "list.errorForeground": "#c9481d", + "list.warningForeground": "#e07a52", + "listFilterWidget.background": "#d5eef1", + "listFilterWidget.outline": "#14b832", + "listFilterWidget.noMatchesOutline": "#ff4000", + "tree.indentGuidesStroke": "#d3cec5", + "settings.headerForeground": "#004d57", + "settings.modifiedItemIndicator": "#00bd23", + "settings.dropdownListBorder": "#ade2eb88", + "settings.dropdownBackground": "#f2edde", + "settings.dropdownForeground": "#0bb", + "settings.dropdownBorder": "#f2edde", + "settings.checkboxBackground": "#f2edde", + "settings.checkboxForeground": "#0bb", + "settings.checkboxBorder": "#f2edde", + "settings.textInputBackground": "#f2edde", + "settings.textInputForeground": "#0bb", + "settings.textInputBorder": "#f2edde", + "settings.numberInputBackground": "#f0e7d1", + "settings.numberInputForeground": "#5842ff", + "settings.numberInputBorder": "#f0e7d1", + "breadcrumb.foreground": "#888477", + "breadcrumb.background": "#fef8ec", + "breadcrumb.focusForeground": "#0099ad", + "breadcrumb.activeSelectionForeground": "#005661", + "breadcrumbPicker.background": "#f2edde", + "titleBar.activeBackground": "#f9f1e1", + "titleBar.activeForeground": "#005661", + "titleBar.inactiveBackground": "#f9f1e1", + "titleBar.inactiveForeground": "#888477", + "menu.background": "#f2edde", + "menu.foreground": "#888477", + "menu.selectionBackground": "#d2f3f9", + "menu.selectionForeground": "#0099ad", + "menu.selectionBorder": "#d2f3f9", + "menubar.selectionBackground": "#d2f3f9", + "menubar.selectionForeground": "#0099ad", + "menubar.selectionBorder": "#d2f3f9", + "editor.snippetTabstopHighlightBackground": "#fdefd3", + "editor.snippetTabstopHighlightBorder": "#fdf3dd", + "editor.snippetFinalTabstopHighlightBackground": "#fdefd3", + "editor.snippetFinalTabstopHighlightBorder": "#fdf3dd", + "minimap.findMatchHighlight": "#0099adaa", + "minimap.errorHighlight": "#ff4000ee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#009456", + "minimapGutter.modifiedBackground": "#14b832", + "minimapGutter.deletedBackground": "#ff4000", + "minimap.background": "#fef8ec99" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#8ca6a6" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#004d57" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#ff5792" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#fa8900" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#b3694d" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#a88c00" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e64100" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#00b368" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#009456" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#5842ff" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#0095a8" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#00bdd6" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#0094f0" + } + }, + { + "name": "INVALID", + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#ff530f" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} diff --git a/assets/themes/src/vscode/noctis/minimus.json b/assets/themes/src/vscode/noctis/minimus.json new file mode 100644 index 0000000000000000000000000000000000000000..88493d99d5993b6d72ef9a1a81228b8a82fe54c3 --- /dev/null +++ b/assets/themes/src/vscode/noctis/minimus.json @@ -0,0 +1,1113 @@ +{ + "name": "Noctis Minimus", + "type": "dark", + "colors": { + "selection.background": "#5998c077", + "descriptionForeground": "#6496b4", + "errorForeground": "#b96346", + "widget.shadow": "#00000044", + "editor.background": "#1b2932", + "editor.foreground": "#c5cdd3", + "editorLineNumber.foreground": "#5d6e79", + "editorLineNumber.activeForeground": "#6496b4", + "editorCursor.foreground": "#b3d2e6", + "badge.background": "#5998c0", + "badge.foreground": "#101213", + "activityBar.background": "#1b2932", + "activityBar.dropBackground": "#6496b465", + "activityBar.border": "#101213", + "activityBar.foreground": "#496d83", + "activityBar.inactiveForeground": "#496d8377", + "activityBarBadge.background": "#5998c0", + "activityBarBadge.foreground": "#101213", + "activityBar.activeBackground": "#5998c033", + "activityBar.activeBorder": "#5998c0", + "sideBar.background": "#17232b", + "sideBar.dropBackground": "#17232b", + "sideBar.border": "#101213", + "sideBar.foreground": "#96a8b6", + "sideBarSectionHeader.background": "#202e37", + "sideBarSectionHeader.foreground": "#96a8b6", + "sideBarTitle.foreground": "#96a8b6", + "sideBarSectionHeader.border": "#101213", + "statusBar.foreground": "#496d83", + "statusBar.background": "#1b2932", + "statusBar.border": "#101213", + "statusBar.debuggingBackground": "#1b2932", + "statusBar.debuggingForeground": "#d2799850", + "statusBar.debuggingBorder": "#d27998af", + "statusBar.noFolderForeground": "#98a6ae", + "statusBar.noFolderBackground": "#1b2932", + "statusBar.noFolderBorder": "#1b2932", + "statusBarItem.activeBackground": "#3d708f66", + "statusBarItem.hoverBackground": "#243742", + "statusBarItem.prominentBackground": "#152128", + "statusBarItem.prominentHoverBackground": "#102837", + "button.background": "#2e616b", + "button.foreground": "#ebf7ff", + "button.hoverBackground": "#3d818f", + "dropdown.background": "#202e37", + "dropdown.border": "#202e37", + "dropdown.foreground": "#6496b4", + "editorMarkerNavigation.background": "#43435629", + "editorMarkerNavigationError.background": "#b96346", + "editorMarkerNavigationWarning.background": "#c09159", + "editorError.border": "#1b2932", + "editorError.foreground": "#b96346", + "editorWarning.border": "#1b2932", + "editorWarning.foreground": "#c09159", + "editorInfo.border": "#1b2932", + "editorInfo.foreground": "#5998c0", + "editorHint.border": "#72c09f00", + "editorHint.foreground": "#72c09f", + "editorGroup.emptyBackground": "#5d6e7933", + "editorGroup.border": "#101213", + "editorGroup.dropBackground": "#5d6e7933", + "editorGroupHeader.noTabsBackground": "#202e37", + "editorGroupHeader.tabsBackground": "#24333d", + "editorGroupHeader.tabsBorder": "#202e37", + "tab.activeBackground": "#1b2932", + "tab.unfocusedActiveBackground": "#1e2b33", + "tab.activeForeground": "#5998c0", + "tab.border": "#101213", + "tab.inactiveBackground": "#202e37", + "tab.inactiveForeground": "#96a8b6", + "tab.unfocusedActiveForeground": "#96a8b6", + "tab.unfocusedInactiveForeground": "#96a8b6", + "tab.activeBorderTop": "#5998c0", + "tab.activeModifiedBorder": "#72c09f", + "tab.activeBorder": "#1b2932", + "tab.unfocusedActiveBorder": "#1b2932", + "tab.unfocusedHoverBackground": "#5998c021", + "textBlockQuote.background": "#1b2932", + "textBlockQuote.border": "#496d83", + "textCodeBlock.background": "#1b2932", + "textLink.activeForeground": "#5998c0", + "textLink.foreground": "#5998c0", + "textPreformat.foreground": "#dfc09f", + "textSeparator.foreground": "#1b2932", + "walkThrough.embeddedEditorBackground": "#1b2932", + "welcomePage.buttonBackground": "#0e1920", + "welcomePage.buttonHoverBackground": "#202e37", + "input.background": "#0e1920", + "input.border": "#1a2f3d", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#98a6ae", + "inputOption.activeBorder": "#496d83", + "inputValidation.errorForeground": "#b96346", + "inputValidation.errorBackground": "#3b2016ee", + "inputValidation.errorBorder": "#4e291d", + "inputValidation.infoForeground": "#6fb0b8", + "inputValidation.infoBackground": "#2d575cee", + "inputValidation.infoBorder": "#3b7178", + "inputValidation.warningForeground": "#c09159", + "inputValidation.warningBackground": "#736759cc", + "inputValidation.warningBorder": "#94826b", + "editorWidget.background": "#202e37", + "editorWidget.border": "#101213", + "editorHoverWidget.background": "#14242e", + "editorHoverWidget.border": "#101213", + "editorSuggestWidget.background": "#14242e", + "editorSuggestWidget.border": "#101213", + "editorSuggestWidget.foreground": "#96a8b6", + "editorSuggestWidget.highlightForeground": "#5998c0", + "editorSuggestWidget.selectedBackground": "#2c414e", + "editorGutter.background": "#1b2932", + "editorGutter.addedBackground": "#a0d4a8", + "editorGutter.deletedBackground": "#b96346", + "editorGutter.modifiedBackground": "#dfc09f", + "editor.selectionBackground": "#496d8355", + "editor.selectionHighlightBackground": "#5998c033", + "editor.inactiveSelectionBackground": "#496d8333", + "editor.wordHighlightStrongBackground": "#b3994d33", + "editor.wordHighlightBackground": "#d3b69233", + "editor.findMatchBackground": "#72c09f25", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#72c09f22", + "editor.hoverHighlightBackground": "#496d833f", + "editor.lineHighlightBackground": "#1d3544ee", + "editor.lineHighlightBorder": "#1d3544", + "editor.rangeHighlightBackground": "#72b7c022", + "editorLink.activeForeground": "#649fc4", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#2f404b", + "editorIndentGuide.activeBackground": "#405f72", + "editorBracketMatch.background": "#496d8322", + "editorBracketMatch.border": "#496d83", + "editorRuler.foreground": "#334652", + "editorCodeLens.foreground": "#667c7f", + "terminal.ansiBlack": "#182a35", + "terminal.ansiRed": "#c08872", + "terminal.ansiGreen": "#72c09f", + "terminal.ansiYellow": "#c8a984", + "terminal.ansiBlue": "#6196b8", + "terminal.ansiMagenta": "#c28097", + "terminal.ansiCyan": "#72b7c0", + "terminal.ansiWhite": "#c5cdd3", + "terminal.ansiBrightBlack": "#425866", + "terminal.ansiBrightRed": "#ca8468", + "terminal.ansiBrightGreen": "#84c8ab", + "terminal.ansiBrightYellow": "#d1aa7b", + "terminal.ansiBrightBlue": "#68a4ca", + "terminal.ansiBrightMagenta": "#c88da2", + "terminal.ansiBrightCyan": "#84c0c8", + "terminal.ansiBrightWhite": "#c5d1d3", + "terminal.background": "#0e1920", + "terminal.foreground": "#c5cdd3", + "terminalCursor.background": "#0e1920", + "terminalCursor.foreground": "#c5cdd3", + "merge.border": "#1b293200", + "merge.currentContentBackground": "#a6d7dd22", + "merge.currentHeaderBackground": "#a6d7dd44", + "merge.incomingContentBackground": "#aea8dc22", + "merge.incomingHeaderBackground": "#aea8dc44", + "merge.commonContentBackground": "#dfc09f22", + "merge.commonHeaderBackground": "#dfc09f44", + "editorOverviewRuler.currentContentForeground": "#a6d7dd44", + "editorOverviewRuler.incomingContentForeground": "#cac4f544", + "editorOverviewRuler.commonContentForeground": "#dfc09f44", + "editorOverviewRuler.border": "#1b2932", + "notificationCenter.border": "#202e37", + "notificationCenterHeader.foreground": "#98a6ae", + "notificationCenterHeader.background": "#202e37", + "notificationToast.border": "#202e37", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#202e37", + "notifications.border": "#202e37", + "notificationLink.foreground": "#98a6ae", + "diffEditor.insertedTextBackground": "#72c09f25", + "diffEditor.removedTextBackground": "#c3745530", + "debugToolBar.background": "#1b2932", + "debugExceptionWidget.background": "#1b2932", + "debugExceptionWidget.border": "#496d83", + "extensionButton.prominentBackground": "#28828a", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#39bac6", + "focusBorder": "#202e37", + "foreground": "#c5cdd3", + "panel.background": "#0e1920", + "panel.border": "#496d83", + "panelTitle.activeBorder": "#496d83", + "panelTitle.activeForeground": "#5998c0", + "panelTitle.inactiveForeground": "#5e7887", + "peekView.border": "#496d83", + "peekViewEditor.background": "#0e1c25", + "peekViewEditor.matchHighlightBackground": "#26526d33", + "peekViewEditor.matchHighlightBorder": "#3d708f", + "peekViewEditorGutter.background": "#0e1c25", + "peekViewResult.background": "#0d202b", + "peekViewResult.fileForeground": "#dfc09f", + "peekViewResult.lineForeground": "#98a6ae", + "peekViewResult.matchHighlightBackground": "#202e37", + "peekViewResult.selectionBackground": "#202e37", + "peekViewResult.selectionForeground": "#98a6ae", + "peekViewTitle.background": "#0d202b", + "peekViewTitleDescription.foreground": "#98a6ae", + "peekViewTitleLabel.foreground": "#dfc09f", + "progressBar.background": "#5998c0", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#3f7fa677", + "scrollbarSlider.background": "#3f7fa633", + "scrollbarSlider.hoverBackground": "#3f7fa655", + "gitDecoration.addedResourceForeground": "#3f8d6c", + "gitDecoration.modifiedResourceForeground": "#72c09f", + "gitDecoration.deletedResourceForeground": "#b96346", + "gitDecoration.untrackedResourceForeground": "#6fb0b8", + "gitDecoration.ignoredResourceForeground": "#5b788b", + "gitDecoration.conflictingResourceForeground": "#dfc09f", + "pickerGroup.border": "#496d83", + "pickerGroup.foreground": "#5998c0", + "list.activeSelectionBackground": "#2c414e", + "list.activeSelectionForeground": "#ebf7ff", + "list.dropBackground": "#152837", + "list.focusBackground": "#213745", + "list.focusForeground": "#ebf7ff", + "list.highlightForeground": "#5998c0", + "list.hoverBackground": "#00558a", + "list.hoverForeground": "#ebf7ff", + "list.inactiveFocusBackground": "#1e2b33", + "list.inactiveSelectionBackground": "#22313a", + "list.inactiveSelectionForeground": "#c5cdd3", + "list.errorForeground": "#b96346", + "list.warningForeground": "#ffa857", + "listFilterWidget.background": "#152837", + "listFilterWidget.outline": "#72c09f", + "listFilterWidget.noMatchesOutline": "#b96346", + "tree.indentGuidesStroke": "#5d6e79", + "settings.headerForeground": "#c5cdd3", + "settings.modifiedItemIndicator": "#3f8d6c", + "settings.dropdownListBorder": "#2964a377", + "settings.dropdownBackground": "#202e37", + "settings.dropdownForeground": "#3d818f", + "settings.dropdownBorder": "#202e37", + "settings.checkboxBackground": "#202e37", + "settings.checkboxForeground": "#3d818f", + "settings.checkboxBorder": "#202e37", + "settings.textInputBackground": "#202e37", + "settings.textInputForeground": "#3d818f", + "settings.textInputBorder": "#202e37", + "settings.numberInputBackground": "#0e1920", + "settings.numberInputForeground": "#7068b1", + "settings.numberInputBorder": "#0e1920", + "breadcrumb.foreground": "#96a8b6", + "breadcrumb.background": "#1b2932", + "breadcrumb.focusForeground": "#5998c0", + "breadcrumb.activeSelectionForeground": "#ebf7ff", + "breadcrumbPicker.background": "#202e37", + "titleBar.activeBackground": "#1b2932", + "titleBar.activeForeground": "#c5cdd3", + "titleBar.inactiveBackground": "#1b2932", + "titleBar.inactiveForeground": "#96a8b6", + "menu.background": "#202e37", + "menu.foreground": "#96a8b6", + "menu.selectionBackground": "#213745", + "menu.selectionForeground": "#5998c0", + "menu.selectionBorder": "#213745", + "menu.separatorBackground": "#5998c0", + "menubar.selectionBackground": "#213745", + "menubar.selectionForeground": "#5998c0", + "menubar.selectionBorder": "#213745", + "editor.snippetTabstopHighlightBackground": "#0e1920", + "editor.snippetTabstopHighlightBorder": "#17232b", + "editor.snippetFinalTabstopHighlightBackground": "#0e1920", + "editor.snippetFinalTabstopHighlightBorder": "#17232b", + "minimap.findMatchHighlight": "#5998c0ee", + "minimap.errorHighlight": "#b96346ee", + "minimap.warningHighlight": "#c09159ee", + "minimapGutter.addedBackground": "#3f8d6c", + "minimapGutter.modifiedBackground": "#72c09f", + "minimapGutter.deletedBackground": "#b96346", + "minimap.background": "#1b293299" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#5e7887" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#c5cdd3" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#c88da2" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#d3b692" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#be856f" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#a88c00" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#c37455" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#72c09f" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#3f8d6c" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7068b1" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#3f848d" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#72b7c0" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#5998c0" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#b16a4e" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/src/vscode/noctis/noctis.json b/assets/themes/src/vscode/noctis/noctis.json new file mode 100644 index 0000000000000000000000000000000000000000..cc270fe526f10f3f1fea30464390f1d8d5a76c8e --- /dev/null +++ b/assets/themes/src/vscode/noctis/noctis.json @@ -0,0 +1,1108 @@ +{ + "name": "Noctis", + "type": "dark", + "colors": { + "selection.background": "#107684", + "descriptionForeground": "#929ea0", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#052529", + "editor.foreground": "#b2cacd", + "editorLineNumber.foreground": "#4e6b6e", + "editorLineNumber.activeForeground": "#169fb1", + "editorCursor.foreground": "#85efff", + "badge.background": "#40d4e7", + "badge.foreground": "#0f1415", + "activityBar.background": "#052529", + "activityBar.dropBackground": "#929ea065", + "activityBar.foreground": "#169fb1", + "activityBar.inactiveForeground": "#169fb177", + "activityBar.border": "#0f1415", + "activityBarBadge.background": "#40d4e7", + "activityBarBadge.foreground": "#0f1415", + "activityBar.activeBackground": "#40d4e733", + "activityBar.activeBorder": "#40d4e7", + "sideBar.background": "#041d20", + "sideBar.foreground": "#a5b5b5", + "sideBar.border": "#0f1415", + "sideBar.dropBackground": "#041d20", + "sideBarTitle.foreground": "#a5b5b5", + "sideBarSectionHeader.background": "#083d44", + "sideBarSectionHeader.foreground": "#a5b5b5", + "sideBarSectionHeader.border": "#0f1415", + "statusBar.background": "#041d20", + "statusBar.foreground": "#169fb1", + "statusBar.border": "#0f1415", + "statusBar.debuggingBackground": "#041d20", + "statusBar.debuggingForeground": "#df769b50", + "statusBar.debuggingBorder": "#df769baf", + "statusBar.noFolderForeground": "#87a7ab", + "statusBar.noFolderBackground": "#041d20", + "statusBar.noFolderBorder": "#041d20", + "statusBarItem.activeBackground": "#19bacc45", + "statusBarItem.hoverBackground": "#062e32", + "statusBarItem.prominentBackground": "#020c0e", + "statusBarItem.prominentHoverBackground": "#00292e", + "button.background": "#099099", + "button.foreground": "#ebfdff", + "button.hoverBackground": "#0cc", + "dropdown.background": "#073940", + "dropdown.border": "#073940", + "dropdown.foreground": "#87a7ab", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#052529", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#052529", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#052529", + "editorInfo.foreground": "#40d4e7", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#5f6b6d33", + "editorGroup.border": "#0f1415", + "editorGroup.dropBackground": "#5f6b6d33", + "editorGroupHeader.noTabsBackground": "#062e32", + "editorGroupHeader.tabsBackground": "#062e32", + "editorGroupHeader.tabsBorder": "#062e32", + "tab.activeBackground": "#052529", + "tab.unfocusedActiveBackground": "#0e1e20", + "tab.activeForeground": "#40d4e7", + "tab.border": "#0f1415", + "tab.inactiveBackground": "#062e32", + "tab.inactiveForeground": "#87a7ab", + "tab.unfocusedActiveForeground": "#87a7ab", + "tab.unfocusedInactiveForeground": "#87a7ab", + "tab.activeBorderTop": "#40d4e7", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#052529", + "tab.unfocusedActiveBorder": "#052529", + "tab.unfocusedHoverBackground": "#169fb121", + "textBlockQuote.background": "#041d20", + "textBlockQuote.border": "#16a3b6", + "textCodeBlock.background": "#041d20", + "textLink.activeForeground": "#40d4e7", + "textLink.foreground": "#40d4e7", + "textPreformat.foreground": "#e4b781", + "textSeparator.foreground": "#041d20", + "walkThrough.embeddedEditorBackground": "#041d20", + "welcomePage.buttonBackground": "#041d20", + "welcomePage.buttonHoverBackground": "#003742", + "input.background": "#052529", + "input.border": "#073940", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#87a7ab", + "inputOption.activeBorder": "#169fb1", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#073940", + "editorWidget.border": "#0f1415", + "editorHoverWidget.background": "#073940", + "editorHoverWidget.border": "#0f1415", + "editorSuggestWidget.background": "#073940", + "editorSuggestWidget.border": "#0f1415", + "editorSuggestWidget.foreground": "#87a7ab", + "editorSuggestWidget.highlightForeground": "#40d4e7", + "editorSuggestWidget.selectedBackground": "#0e6671", + "editorGutter.background": "#052529", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#e0c184", + "editor.selectionBackground": "#169fb144", + "editor.selectionHighlightBackground": "#49ace944", + "editor.inactiveSelectionBackground": "#0e657155", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a633", + "editor.hoverHighlightBackground": "#169fb13f", + "editor.lineHighlightBackground": "#083d44ee", + "editor.lineHighlightBorder": "#083d44", + "editor.rangeHighlightBackground": "#083d44a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#223b3f", + "editorIndentGuide.activeBackground": "#3e6f74", + "editorBracketMatch.background": "#169fb122", + "editorBracketMatch.border": "#169fb1", + "editorRuler.foreground": "#29484c", + "editorCodeLens.foreground": "#507b95", + "terminal.ansiBlack": "#324a4d", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#b2cacd", + "terminal.ansiBrightBlack": "#47686c", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#c1d4d7", + "terminal.background": "#03191b", + "terminal.foreground": "#b2cacd", + "terminalCursor.background": "#03191b", + "terminalCursor.foreground": "#b2cacd", + "merge.border": "#05252900", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#052529", + "notificationCenter.border": "#073940", + "notificationCenterHeader.foreground": "#87a7ab", + "notificationCenterHeader.background": "#073940", + "notificationToast.border": "#073940", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#073940", + "notifications.border": "#073940", + "notificationLink.foreground": "#87a7ab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#041d20", + "debugExceptionWidget.background": "#041d20", + "debugExceptionWidget.border": "#16a3b6", + "extensionButton.prominentBackground": "#099099", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#0cc", + "focusBorder": "#073940", + "foreground": "#b2cacd", + "panel.background": "#03191b", + "panel.border": "#0e6671", + "panelTitle.activeBorder": "#0e6671", + "panelTitle.activeForeground": "#40d4e7", + "panelTitle.inactiveForeground": "#87a7ab", + "peekView.border": "#169fb1", + "peekViewEditor.background": "#002124", + "peekViewEditor.matchHighlightBackground": "#00718079", + "peekViewEditor.matchHighlightBorder": "#007180cc", + "peekViewEditorGutter.background": "#002124", + "peekViewResult.background": "#041d20", + "peekViewResult.fileForeground": "#e4b781", + "peekViewResult.lineForeground": "#87a7ab", + "peekViewResult.matchHighlightBackground": "#073940", + "peekViewResult.selectionBackground": "#073940", + "peekViewResult.selectionForeground": "#87a7ab", + "peekViewTitle.background": "#041d20", + "peekViewTitleDescription.foreground": "#87a7ab", + "peekViewTitleLabel.foreground": "#e4b781", + "progressBar.background": "#40d4e7", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#169fb1ad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#169fb162", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#5b858b", + "gitDecoration.conflictingResourceForeground": "#e4b781", + "pickerGroup.border": "#0e6671", + "pickerGroup.foreground": "#169fb1", + "list.activeSelectionBackground": "#0e6671", + "list.activeSelectionForeground": "#ebfdff", + "list.dropBackground": "#00404d", + "list.focusBackground": "#00404d", + "list.focusForeground": "#ebfdff", + "list.highlightForeground": "#40d4e7", + "list.hoverBackground": "#0b515b", + "list.hoverForeground": "#ebfdff", + "list.inactiveFocusBackground": "#062d32", + "list.inactiveSelectionBackground": "#07353b", + "list.inactiveSelectionForeground": "#b2cacd", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa487", + "listFilterWidget.background": "#00404d", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#3e6f74", + "settings.headerForeground": "#b2cacd", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#0e657188", + "settings.dropdownBackground": "#073940", + "settings.dropdownForeground": "#0cc", + "settings.dropdownBorder": "#073940", + "settings.checkboxBackground": "#073940", + "settings.checkboxForeground": "#0cc", + "settings.checkboxBorder": "#073940", + "settings.textInputBackground": "#073940", + "settings.textInputForeground": "#0cc", + "settings.textInputBorder": "#073940", + "settings.numberInputBackground": "#041d20", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#041d20", + "breadcrumb.foreground": "#87a7ab", + "breadcrumb.background": "#052529", + "breadcrumb.focusForeground": "#40d4e7", + "breadcrumb.activeSelectionForeground": "#ebfdff", + "breadcrumbPicker.background": "#073940", + "titleBar.activeBackground": "#041d20", + "titleBar.activeForeground": "#b2cacd", + "titleBar.inactiveBackground": "#041d20", + "titleBar.inactiveForeground": "#87a7ab", + "menu.background": "#073940", + "menu.foreground": "#87a7ab", + "menu.selectionBackground": "#0b515b", + "menu.selectionForeground": "#40d4e7", + "menu.selectionBorder": "#0b515b", + "menu.separatorBackground": "#40d4e7", + "menubar.selectionBackground": "#0b515b", + "menubar.selectionForeground": "#40d4e7", + "menubar.selectionBorder": "#0b515b", + "editor.snippetTabstopHighlightBackground": "#03181b", + "editor.snippetTabstopHighlightBorder": "#042124", + "editor.snippetFinalTabstopHighlightBackground": "#03181b", + "editor.snippetFinalTabstopHighlightBorder": "#042124", + "minimap.findMatchHighlight": "#49d6e9ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#05252999" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#5b858b" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#b2cacd" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} diff --git a/assets/themes/src/vscode/noctis/obscuro.json b/assets/themes/src/vscode/noctis/obscuro.json new file mode 100644 index 0000000000000000000000000000000000000000..26d1a02de84a4bad2056444302b5e9d83faa8312 --- /dev/null +++ b/assets/themes/src/vscode/noctis/obscuro.json @@ -0,0 +1,1108 @@ +{ + "name": "Noctis Obscuro", + "type": "dark", + "colors": { + "selection.background": "#107684", + "descriptionForeground": "#929ea0", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#031417", + "editor.foreground": "#b2cacd", + "editorLineNumber.foreground": "#4e6b6e", + "editorLineNumber.activeForeground": "#169fb1", + "editorCursor.foreground": "#85efff", + "badge.background": "#169fb1", + "badge.foreground": "#0f1415", + "activityBar.background": "#031417", + "activityBar.dropBackground": "#929ea065", + "activityBar.border": "#0f1415", + "activityBar.foreground": "#169fb1", + "activityBar.inactiveForeground": "#169fb177", + "activityBarBadge.background": "#169fb1", + "activityBarBadge.foreground": "#0f1415", + "activityBar.activeBackground": "#40d4e733", + "activityBar.activeBorder": "#40d4e7", + "sideBar.background": "#021012", + "sideBar.dropBackground": "#042124", + "sideBar.border": "#0f1415", + "sideBar.foreground": "#a5b5b5", + "sideBarSectionHeader.background": "#083d44", + "sideBarSectionHeader.foreground": "#a5b5b5", + "sideBarTitle.foreground": "#a5b5b5", + "sideBarSectionHeader.border": "#0f1415", + "statusBar.foreground": "#169fb1", + "statusBar.background": "#031417", + "statusBar.border": "#0f1415", + "statusBar.debuggingBackground": "#031417", + "statusBar.debuggingForeground": "#df769b50", + "statusBar.debuggingBorder": "#df769baf", + "statusBar.noFolderForeground": "#87a7ab", + "statusBar.noFolderBackground": "#031417", + "statusBar.noFolderBorder": "#031417", + "statusBarItem.activeBackground": "#19bacc45", + "statusBarItem.hoverBackground": "#062e32", + "statusBarItem.prominentBackground": "#020c0e", + "statusBarItem.prominentHoverBackground": "#00292e", + "button.background": "#099099", + "button.foreground": "#ebfdff", + "button.hoverBackground": "#0cc", + "dropdown.background": "#031417", + "dropdown.border": "#031417", + "dropdown.foreground": "#87a7ab", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#031417", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#031417", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#031417", + "editorInfo.foreground": "#40d4e7", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#5f6b6d33", + "editorGroup.border": "#0f1415", + "editorGroup.dropBackground": "#5f6b6d33", + "editorGroupHeader.noTabsBackground": "#062e32", + "editorGroupHeader.tabsBackground": "#062e32", + "editorGroupHeader.tabsBorder": "#062e32", + "tab.activeBackground": "#031417", + "tab.unfocusedActiveBackground": "#0b1819", + "tab.activeForeground": "#ebfdff", + "tab.border": "#0f1415", + "tab.inactiveBackground": "#062e32", + "tab.inactiveForeground": "#87a7ab", + "tab.unfocusedActiveForeground": "#87a7ab", + "tab.unfocusedInactiveForeground": "#87a7ab", + "tab.activeBorderTop": "#40d4e7", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#031417", + "tab.unfocusedActiveBorder": "#031417", + "tab.unfocusedHoverBackground": "#169fb121", + "textBlockQuote.background": "#031417", + "textBlockQuote.border": "#16a3b6", + "textCodeBlock.background": "#031417", + "textLink.activeForeground": "#40d4e7", + "textLink.foreground": "#40d4e7", + "textPreformat.foreground": "#e4b781", + "textSeparator.foreground": "#031417", + "walkThrough.embeddedEditorBackground": "#031417", + "welcomePage.buttonBackground": "#052529", + "welcomePage.buttonHoverBackground": "#062e32", + "input.background": "#052529", + "input.border": "#083f44", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#87a7ab", + "inputOption.activeBorder": "#169fb1", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#062e32", + "editorWidget.border": "#0f1415", + "editorHoverWidget.background": "#062e32", + "editorHoverWidget.border": "#0f1415", + "editorSuggestWidget.background": "#062e32", + "editorSuggestWidget.border": "#0f1415", + "editorSuggestWidget.foreground": "#87a7ab", + "editorSuggestWidget.highlightForeground": "#40d4e7", + "editorSuggestWidget.selectedBackground": "#0e6671", + "editorGutter.background": "#031417", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#e4b781", + "editor.selectionBackground": "#169fb144", + "editor.selectionHighlightBackground": "#49ace944", + "editor.inactiveSelectionBackground": "#0e657155", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a633", + "editor.hoverHighlightBackground": "#169fb13f", + "editor.lineHighlightBackground": "#083d44ee", + "editor.lineHighlightBorder": "#083d44", + "editor.rangeHighlightBackground": "#083d44a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#223b3f", + "editorIndentGuide.activeBackground": "#3e6f74", + "editorBracketMatch.background": "#169fb122", + "editorBracketMatch.border": "#169fb1", + "editorRuler.foreground": "#243f42", + "editorCodeLens.foreground": "#507b95", + "terminal.ansiBlack": "#324a4d", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#b2cacd", + "terminal.ansiBrightBlack": "#47686c", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#c1d4d7", + "terminal.background": "#020c0e", + "terminal.foreground": "#b2cacd", + "terminalCursor.background": "#020c0e", + "terminalCursor.foreground": "#b2cacd", + "merge.border": "#03141700", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#031417", + "notificationCenter.border": "#062e32", + "notificationCenterHeader.foreground": "#87a7ab", + "notificationCenterHeader.background": "#062e32", + "notificationToast.border": "#062e32", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#062e32", + "notifications.border": "#062e32", + "notificationLink.foreground": "#87a7ab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#031417", + "debugExceptionWidget.background": "#031417", + "debugExceptionWidget.border": "#16a3b6", + "extensionButton.prominentBackground": "#099099", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#0cc", + "focusBorder": "#062e32", + "foreground": "#b2cacd", + "panel.background": "#020c0e", + "panel.border": "#0e6671", + "panelTitle.activeBorder": "#0e6671", + "panelTitle.activeForeground": "#40d4e7", + "panelTitle.inactiveForeground": "#87a7ab", + "peekView.border": "#169fb1", + "peekViewEditor.background": "#002124", + "peekViewEditor.matchHighlightBackground": "#00718079", + "peekViewEditor.matchHighlightBorder": "#007180cc", + "peekViewEditorGutter.background": "#002124", + "peekViewResult.background": "#031417", + "peekViewResult.fileForeground": "#e4b781", + "peekViewResult.lineForeground": "#87a7ab", + "peekViewResult.matchHighlightBackground": "#062e32", + "peekViewResult.selectionBackground": "#062e32", + "peekViewResult.selectionForeground": "#87a7ab", + "peekViewTitle.background": "#031417", + "peekViewTitleDescription.foreground": "#87a7ab", + "peekViewTitleLabel.foreground": "#e4b781", + "progressBar.background": "#40d4e7", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#169fb1ad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#169fb162", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#647e82", + "gitDecoration.conflictingResourceForeground": "#e4b781", + "pickerGroup.border": "#0e6671", + "pickerGroup.foreground": "#169fb1", + "list.activeSelectionBackground": "#0e6671", + "list.activeSelectionForeground": "#ebfdff", + "list.dropBackground": "#00404d", + "list.focusBackground": "#00404d", + "list.focusForeground": "#ebfdff", + "list.highlightForeground": "#40d4e7", + "list.hoverBackground": "#0b515b", + "list.hoverForeground": "#ebfdff", + "list.inactiveFocusBackground": "#062d32", + "list.inactiveSelectionBackground": "#07353b", + "list.inactiveSelectionForeground": "#b2cacd", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa487", + "listFilterWidget.background": "#00404d", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#3e6f74", + "settings.headerForeground": "#b2cacd", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#0e657188", + "settings.dropdownBackground": "#073940", + "settings.dropdownForeground": "#0cc", + "settings.dropdownBorder": "#073940", + "settings.checkboxBackground": "#073940", + "settings.checkboxForeground": "#0cc", + "settings.checkboxBorder": "#073940", + "settings.textInputBackground": "#073940", + "settings.textInputForeground": "#0cc", + "settings.textInputBorder": "#073940", + "settings.numberInputBackground": "#062e32", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#062e32", + "breadcrumb.foreground": "#87a7ab", + "breadcrumb.background": "#031417", + "breadcrumb.focusForeground": "#40d4e7", + "breadcrumb.activeSelectionForeground": "#ebfdff", + "breadcrumbPicker.background": "#062e32", + "titleBar.activeBackground": "#031417", + "titleBar.activeForeground": "#b2cacd", + "titleBar.inactiveBackground": "#031417", + "titleBar.inactiveForeground": "#87a7ab", + "menu.background": "#062e32", + "menu.foreground": "#87a7ab", + "menu.selectionBackground": "#0b515b", + "menu.selectionForeground": "#40d4e7", + "menu.selectionBorder": "#0b515b", + "menu.separatorBackground": "#40d4e7", + "menubar.selectionBackground": "#0b515b", + "menubar.selectionForeground": "#40d4e7", + "menubar.selectionBorder": "#0b515b", + "editor.snippetTabstopHighlightBackground": "#06292d", + "editor.snippetTabstopHighlightBorder": "#073136", + "editor.snippetFinalTabstopHighlightBackground": "#06292d", + "editor.snippetFinalTabstopHighlightBorder": "#073136", + "minimap.findMatchHighlight": "#49d6e9ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#03141799" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#5b858b" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#b2cacd" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} diff --git a/assets/themes/src/vscode/noctis/sereno.json b/assets/themes/src/vscode/noctis/sereno.json new file mode 100644 index 0000000000000000000000000000000000000000..05768aff356e40078973f34650143e9089e1971d --- /dev/null +++ b/assets/themes/src/vscode/noctis/sereno.json @@ -0,0 +1,1108 @@ +{ + "name": "Noctis Sereno", + "type": "dark", + "colors": { + "selection.background": "#107684", + "descriptionForeground": "#929ea0", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#062e32", + "editor.foreground": "#b2cacd", + "editorLineNumber.foreground": "#4e6b6e", + "editorLineNumber.activeForeground": "#169fb1", + "editorCursor.foreground": "#85efff", + "badge.background": "#40d4e7", + "badge.foreground": "#0f1415", + "activityBar.background": "#062e32", + "activityBar.dropBackground": "#929ea065", + "activityBar.border": "#0f1415", + "activityBar.foreground": "#169fb1", + "activityBar.inactiveForeground": "#169fb177", + "activityBarBadge.background": "#40d4e7", + "activityBarBadge.foreground": "#0f1415", + "activityBar.activeBackground": "#40d4e733", + "activityBar.activeBorder": "#40d4e7", + "sideBar.background": "#052629", + "sideBar.dropBackground": "#052629dd", + "sideBar.border": "#0f1415", + "sideBar.foreground": "#a5b5b5", + "sideBarSectionHeader.background": "#083d44", + "sideBarSectionHeader.foreground": "#a5b5b5", + "sideBarSectionHeader.border": "#0f1415", + "sideBarTitle.foreground": "#a5b5b5", + "statusBar.background": "#052629", + "statusBar.foreground": "#169fb1", + "statusBar.border": "#0f1415", + "statusBar.debuggingBackground": "#052629", + "statusBar.debuggingForeground": "#df769b50", + "statusBar.debuggingBorder": "#df769baf", + "statusBar.noFolderForeground": "#87a7ab", + "statusBar.noFolderBackground": "#052629", + "statusBar.noFolderBorder": "#052629", + "statusBarItem.activeBackground": "#19bacc45", + "statusBarItem.hoverBackground": "#07373b", + "statusBarItem.prominentBackground": "#03191b", + "statusBarItem.prominentHoverBackground": "#003338", + "button.background": "#099099", + "button.foreground": "#ebfdff", + "button.hoverBackground": "#0cc", + "dropdown.background": "#083f44", + "dropdown.border": "#083f44", + "dropdown.foreground": "#87a7ab", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#062e32", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#062e32", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#062e32", + "editorInfo.foreground": "#40d4e7", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#5f6b6d33", + "editorGroup.border": "#0f1415", + "editorGroup.dropBackground": "#5f6b6d33", + "editorGroupHeader.noTabsBackground": "#062e32", + "editorGroupHeader.tabsBackground": "#062e32", + "editorGroupHeader.tabsBorder": "#062e32", + "tab.activeBackground": "#062e32", + "tab.unfocusedActiveBackground": "#112527", + "tab.activeForeground": "#40d4e7", + "tab.border": "#0f1415", + "tab.inactiveBackground": "#062e32", + "tab.inactiveForeground": "#87a7ab", + "tab.unfocusedActiveForeground": "#87a7ab", + "tab.unfocusedInactiveForeground": "#87a7ab", + "tab.activeBorderTop": "#40d4e7", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#062e32", + "tab.unfocusedActiveBorder": "#062e32", + "tab.unfocusedHoverBackground": "#169fb121", + "textBlockQuote.background": "#052629", + "textBlockQuote.border": "#16a3b6", + "textCodeBlock.background": "#052629", + "textLink.activeForeground": "#40d4e7", + "textLink.foreground": "#40d4e7", + "textPreformat.foreground": "#e4b781", + "textSeparator.foreground": "#052629", + "walkThrough.embeddedEditorBackground": "#052629", + "welcomePage.buttonBackground": "#052629", + "welcomePage.buttonHoverBackground": "#003742", + "input.background": "#062e32", + "input.border": "#083d44", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#87a7ab", + "inputOption.activeBorder": "#169fb1", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#083d44", + "editorWidget.border": "#0f1415", + "editorHoverWidget.background": "#083d44", + "editorHoverWidget.border": "#0f1415", + "editorSuggestWidget.background": "#083d44", + "editorSuggestWidget.border": "#0f1415", + "editorSuggestWidget.foreground": "#87a7ab", + "editorSuggestWidget.highlightForeground": "#40d4e7", + "editorSuggestWidget.selectedBackground": "#0e6671", + "editorGutter.background": "#062e32", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#e0c184", + "editor.selectionBackground": "#169fb144", + "editor.selectionHighlightBackground": "#49ace944", + "editor.inactiveSelectionBackground": "#0e657155", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a633", + "editor.hoverHighlightBackground": "#169fb13f", + "editor.lineHighlightBackground": "#083d44ee", + "editor.lineHighlightBorder": "#083d44", + "editor.rangeHighlightBackground": "#083d44a1", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#223b3f", + "editorIndentGuide.activeBackground": "#3e6f74", + "editorBracketMatch.background": "#169fb122", + "editorBracketMatch.border": "#169fb1", + "editorRuler.foreground": "#29484c", + "editorCodeLens.foreground": "#507b95", + "terminal.ansiBlack": "#324a4d", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#b2cacd", + "terminal.ansiBrightBlack": "#47686c", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#c1d4d7", + "terminal.background": "#041d20", + "terminal.foreground": "#b2cacd", + "terminalCursor.background": "#041d20", + "terminalCursor.foreground": "#b2cacd", + "merge.border": "#062e3200", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#062e32", + "notificationCenter.border": "#083d44", + "notificationCenterHeader.foreground": "#87a7ab", + "notificationCenterHeader.background": "#083d44", + "notificationToast.border": "#083d44", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#083d44", + "notifications.border": "#083d44", + "notificationLink.foreground": "#87a7ab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#052629", + "debugExceptionWidget.background": "#052629", + "debugExceptionWidget.border": "#16a3b6", + "extensionButton.prominentBackground": "#099099", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#0cc", + "focusBorder": "#083d44", + "foreground": "#b2cacd", + "panel.background": "#041d20", + "panel.border": "#169fb1", + "panelTitle.activeBorder": "#169fb1", + "panelTitle.activeForeground": "#40d4e7", + "panelTitle.inactiveForeground": "#87a7ab", + "peekView.border": "#169fb1", + "peekViewEditor.background": "#002124", + "peekViewEditor.matchHighlightBackground": "#00718079", + "peekViewEditor.matchHighlightBorder": "#007180cc", + "peekViewEditorGutter.background": "#002124", + "peekViewResult.background": "#052629", + "peekViewResult.fileForeground": "#e4b781", + "peekViewResult.lineForeground": "#87a7ab", + "peekViewResult.matchHighlightBackground": "#083d44", + "peekViewResult.selectionBackground": "#083d44", + "peekViewResult.selectionForeground": "#87a7ab", + "peekViewTitle.background": "#052629", + "peekViewTitleDescription.foreground": "#87a7ab", + "peekViewTitleLabel.foreground": "#e4b781", + "progressBar.background": "#40d4e7", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#169fb1ad", + "scrollbarSlider.background": "#6a90955b", + "scrollbarSlider.hoverBackground": "#169fb162", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#647e82", + "gitDecoration.conflictingResourceForeground": "#e4b781", + "pickerGroup.border": "#0e6671", + "pickerGroup.foreground": "#169fb1", + "list.activeSelectionBackground": "#0e6671", + "list.activeSelectionForeground": "#ebfdff", + "list.dropBackground": "#00404d", + "list.focusBackground": "#00404d", + "list.focusForeground": "#ebfdff", + "list.highlightForeground": "#40d4e7", + "list.hoverBackground": "#0b515b", + "list.hoverForeground": "#ebfdff", + "list.inactiveFocusBackground": "#062d32", + "list.inactiveSelectionBackground": "#07353b", + "list.inactiveSelectionForeground": "#b2cacd", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa487", + "listFilterWidget.background": "#00404d", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#3e6f74", + "settings.headerForeground": "#b2cacd", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#0e657188", + "settings.dropdownBackground": "#083d44", + "settings.dropdownForeground": "#0cc", + "settings.dropdownBorder": "#083d44", + "settings.checkboxBackground": "#083d44", + "settings.checkboxForeground": "#0cc", + "settings.checkboxBorder": "#083d44", + "settings.textInputBackground": "#083d44", + "settings.textInputForeground": "#0cc", + "settings.textInputBorder": "#083d44", + "settings.numberInputBackground": "#052629", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#052629", + "breadcrumb.foreground": "#87a7ab", + "breadcrumb.background": "#062e32", + "breadcrumb.focusForeground": "#40d4e7", + "breadcrumb.activeSelectionForeground": "#ebfdff", + "breadcrumbPicker.background": "#083d44", + "titleBar.activeBackground": "#052629", + "titleBar.activeForeground": "#b2cacd", + "titleBar.inactiveBackground": "#052629", + "titleBar.inactiveForeground": "#87a7ab", + "menu.background": "#083d44", + "menu.foreground": "#87a7ab", + "menu.selectionBackground": "#0b515b", + "menu.selectionForeground": "#40d4e7", + "menu.selectionBorder": "#0b515b", + "menu.separatorBackground": "#40d4e7", + "menubar.selectionBackground": "#0b515b", + "menubar.selectionForeground": "#40d4e7", + "menubar.selectionBorder": "#0b515b", + "editor.snippetTabstopHighlightBackground": "#052629", + "editor.snippetTabstopHighlightBorder": "#062f32", + "editor.snippetFinalTabstopHighlightBackground": "#052629", + "editor.snippetFinalTabstopHighlightBorder": "#062f32", + "minimap.findMatchHighlight": "#49d6e9ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#062e3299" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#5b858b" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#b2cacd" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} diff --git a/assets/themes/src/vscode/noctis/uva.json b/assets/themes/src/vscode/noctis/uva.json new file mode 100644 index 0000000000000000000000000000000000000000..6ccbff372b8a965d9451279380f07f069b8f8f67 --- /dev/null +++ b/assets/themes/src/vscode/noctis/uva.json @@ -0,0 +1,1112 @@ +{ + "name": "Noctis Uva", + "type": "dark", + "colors": { + "selection.background": "#7a70c277", + "descriptionForeground": "#7a70c2", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#292640", + "editor.foreground": "#c5c2d6", + "editorLineNumber.foreground": "#5c5973", + "editorLineNumber.activeForeground": "#7a70c2", + "editorCursor.foreground": "#bbb3ff", + "badge.background": "#998ef1", + "badge.foreground": "#171523", + "activityBar.background": "#292640", + "activityBar.dropBackground": "#7a70c265", + "activityBar.border": "#171523", + "activityBar.foreground": "#6e67a8", + "activityBar.inactiveForeground": "#6e67a877", + "activityBarBadge.background": "#998ef1", + "activityBarBadge.foreground": "#171523", + "activityBar.activeBackground": "#998ef133", + "activityBar.activeBorder": "#998ef1", + "sideBar.background": "#232136", + "sideBar.dropBackground": "#232136", + "sideBar.border": "#171523", + "sideBar.foreground": "#a9a5c0", + "sideBarSectionHeader.background": "#2f2c49", + "sideBarSectionHeader.foreground": "#a9a5c0", + "sideBarTitle.foreground": "#a9a5c0", + "sideBarSectionHeader.border": "#171523", + "statusBar.foreground": "#6e67a8", + "statusBar.background": "#292640", + "statusBar.border": "#171523", + "statusBar.debuggingBackground": "#292640", + "statusBar.debuggingForeground": "#ff80ac50", + "statusBar.debuggingBorder": "#ff80acaf", + "statusBar.noFolderForeground": "#8787ab", + "statusBar.noFolderBackground": "#292640", + "statusBar.noFolderBorder": "#292640", + "statusBarItem.activeBackground": "#564d9977", + "statusBarItem.hoverBackground": "#363253", + "statusBarItem.prominentBackground": "#1f1d30", + "statusBarItem.prominentHoverBackground": "#1b1641", + "button.background": "#007f99", + "button.foreground": "#edebff", + "button.hoverBackground": "#0ac", + "dropdown.background": "#2f2c49", + "dropdown.border": "#2f2c49", + "dropdown.foreground": "#7a70c2", + "editorMarkerNavigation.background": "#3a3a5e29", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#292640", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#292640", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#292640", + "editorInfo.foreground": "#998ef1", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#5c597333", + "editorGroup.border": "#171523", + "editorGroup.dropBackground": "#5c597333", + "editorGroupHeader.noTabsBackground": "#2f2c49", + "editorGroupHeader.tabsBackground": "#2f2c49", + "editorGroupHeader.tabsBorder": "#2f2c49", + "tab.activeBackground": "#292640", + "tab.unfocusedActiveBackground": "#2d2b3b", + "tab.activeForeground": "#998ef1", + "tab.border": "#171523", + "tab.inactiveBackground": "#2f2c49", + "tab.inactiveForeground": "#a9a5c0", + "tab.unfocusedActiveForeground": "#a9a5c0", + "tab.unfocusedInactiveForeground": "#a9a5c0", + "tab.activeBorderTop": "#998ef1", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#292640", + "tab.unfocusedActiveBorder": "#292640", + "tab.unfocusedHoverBackground": "#998ef121", + "textBlockQuote.background": "#292640", + "textBlockQuote.border": "#6e67a8", + "textCodeBlock.background": "#292640", + "textLink.activeForeground": "#998ef1", + "textLink.foreground": "#998ef1", + "textPreformat.foreground": "#ffc180", + "textSeparator.foreground": "#292640", + "walkThrough.embeddedEditorBackground": "#292640", + "welcomePage.buttonBackground": "#1f1d30", + "welcomePage.buttonHoverBackground": "#2f2c49", + "input.background": "#1f1d30", + "input.border": "#27274e", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#8787ab", + "inputOption.activeBorder": "#6e67a8", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#2f2c49", + "editorWidget.border": "#171523", + "editorHoverWidget.background": "#322d52", + "editorHoverWidget.border": "#171523", + "editorSuggestWidget.background": "#322d52", + "editorSuggestWidget.border": "#171523", + "editorSuggestWidget.foreground": "#a9a5c0", + "editorSuggestWidget.highlightForeground": "#998ef1", + "editorSuggestWidget.selectedBackground": "#453f73", + "editorGutter.background": "#292640", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#ffc180", + "editor.selectionBackground": "#6e67a855", + "editor.selectionHighlightBackground": "#49ace933", + "editor.inactiveSelectionBackground": "#6e67a833", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a622", + "editor.hoverHighlightBackground": "#6e67a83f", + "editor.lineHighlightBackground": "#35305aee", + "editor.lineHighlightBorder": "#35305a", + "editor.rangeHighlightBackground": "#49d6e922", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#383450", + "editorIndentGuide.activeBackground": "#595289", + "editorBracketMatch.background": "#6e67a822", + "editorBracketMatch.border": "#6e67a8", + "editorRuler.foreground": "#473856", + "editorCodeLens.foreground": "#776284", + "terminal.ansiBlack": "#302f3d", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#b6b3cc", + "terminal.ansiBrightBlack": "#504e65", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#c5c2d6", + "terminal.background": "#1f1d30", + "terminal.foreground": "#c5c2d6", + "terminalCursor.background": "#1f1d30", + "terminalCursor.foreground": "#c5c2d6", + "merge.border": "#29264000", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#292640", + "notificationCenter.border": "#2f2c49", + "notificationCenterHeader.foreground": "#8787ab", + "notificationCenterHeader.background": "#2f2c49", + "notificationToast.border": "#2f2c49", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#2f2c49", + "notifications.border": "#2f2c49", + "notificationLink.foreground": "#8787ab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#292640", + "debugExceptionWidget.background": "#292640", + "debugExceptionWidget.border": "#6e67a8", + "extensionButton.prominentBackground": "#008c99", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#00bbcc", + "focusBorder": "#2f2c49", + "foreground": "#c5c2d6", + "panel.background": "#1f1d30", + "panel.border": "#6e67a8", + "panelTitle.activeBorder": "#6e67a8", + "panelTitle.activeForeground": "#998ef1", + "panelTitle.inactiveForeground": "#716c93", + "peekView.border": "#6e67a8", + "peekViewEditor.background": "#201d3a", + "peekViewEditor.matchHighlightBackground": "#4c448899", + "peekViewEditorGutter.background": "#201d3a", + "peekViewResult.background": "#221f3d", + "peekViewResult.fileForeground": "#ffc180", + "peekViewResult.lineForeground": "#8787ab", + "peekViewResult.matchHighlightBackground": "#343050", + "peekViewResult.selectionBackground": "#343050", + "peekViewResult.selectionForeground": "#8787ab", + "peekViewTitle.background": "#221f3d", + "peekViewTitleDescription.foreground": "#8787ab", + "peekViewTitleLabel.foreground": "#ffc180", + "progressBar.background": "#998ef1", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#7060eb77", + "scrollbarSlider.background": "#7060eb33", + "scrollbarSlider.hoverBackground": "#7060eb55", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#5b788b", + "gitDecoration.conflictingResourceForeground": "#ffc180", + "pickerGroup.border": "#6e67a8", + "pickerGroup.foreground": "#998ef1", + "list.activeSelectionBackground": "#332e5c", + "list.activeSelectionForeground": "#edebff", + "list.dropBackground": "#202040", + "list.focusBackground": "#3a3a78", + "list.focusForeground": "#edebff", + "list.highlightForeground": "#998ef1", + "list.hoverBackground": "#383866", + "list.hoverForeground": "#edebff", + "list.inactiveFocusBackground": "#2b2843", + "list.inactiveSelectionBackground": "#2f2c49", + "list.inactiveSelectionForeground": "#c5c2d6", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa857", + "listFilterWidget.background": "#202040", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#5c5973", + "settings.headerForeground": "#c5c2d6", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#49408c77", + "settings.dropdownBackground": "#2f2c49", + "settings.dropdownForeground": "#0ac", + "settings.dropdownBorder": "#2f2c49", + "settings.checkboxBackground": "#2f2c49", + "settings.checkboxForeground": "#0ac", + "settings.checkboxBorder": "#2f2c49", + "settings.textInputBackground": "#2f2c49", + "settings.textInputForeground": "#0ac", + "settings.textInputBorder": "#2f2c49", + "settings.numberInputBackground": "#1f1d30", + "settings.numberInputForeground": "#7060eb", + "settings.numberInputBorder": "#1f1d30", + "breadcrumb.foreground": "#a9a5c0", + "breadcrumb.background": "#292640", + "breadcrumb.focusForeground": "#998ef1", + "breadcrumb.activeSelectionForeground": "#edebff", + "breadcrumbPicker.background": "#2f2c49", + "titleBar.activeBackground": "#292640", + "titleBar.activeForeground": "#c5c2d6", + "titleBar.inactiveBackground": "#292640", + "titleBar.inactiveForeground": "#a9a5c0", + "menu.background": "#2f2c49", + "menu.foreground": "#a9a5c0", + "menu.selectionBackground": "#3a3a78", + "menu.selectionForeground": "#998ef1", + "menu.selectionBorder": "#3a3a78", + "menu.separatorBackground": "#998ef1", + "menubar.selectionBackground": "#3a3a78", + "menubar.selectionForeground": "#998ef1", + "menubar.selectionBorder": "#3a3a78", + "editor.snippetTabstopHighlightBackground": "#211f33", + "editor.snippetTabstopHighlightBorder": "#2b2843", + "editor.snippetFinalTabstopHighlightBackground": "#211f33", + "editor.snippetFinalTabstopHighlightBorder": "#2b2843", + "minimap.findMatchHighlight": "#998ef1ee", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#29264099" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#716c93" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#c5c2d6" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/src/vscode/noctis/viola.json b/assets/themes/src/vscode/noctis/viola.json new file mode 100644 index 0000000000000000000000000000000000000000..4d474ad31173c6e8e5888faa44e501cbc0e95aaa --- /dev/null +++ b/assets/themes/src/vscode/noctis/viola.json @@ -0,0 +1,1112 @@ +{ + "name": "Noctis Viola", + "type": "dark", + "colors": { + "selection.background": "#bf8ef166", + "descriptionForeground": "#996bc7", + "errorForeground": "#e34e1c", + "widget.shadow": "#00000044", + "editor.background": "#30243d", + "editor.foreground": "#ccbfd9", + "editorLineNumber.foreground": "#665973", + "editorLineNumber.activeForeground": "#996bc7", + "editorCursor.foreground": "#d9b3ff", + "badge.background": "#bf8ef1", + "badge.foreground": "#1c1226", + "activityBar.background": "#30243d", + "activityBar.dropBackground": "#996bc765", + "activityBar.border": "#1c1226", + "activityBar.foreground": "#8767a8", + "activityBar.inactiveForeground": "#8767a877", + "activityBarBadge.background": "#bf8ef1", + "activityBarBadge.foreground": "#1c1226", + "activityBar.activeBackground": "#bf8ef133", + "activityBar.activeBorder": "#bf8ef1", + "sideBar.background": "#2b2136", + "sideBar.dropBackground": "#2b2136", + "sideBar.border": "#1c1226", + "sideBar.foreground": "#b3a5c0", + "sideBarSectionHeader.background": "#3d2e4d", + "sideBarSectionHeader.foreground": "#b3a5c0", + "sideBarTitle.foreground": "#b3a5c0", + "sideBarSectionHeader.border": "#1c1226", + "statusBar.foreground": "#8767a8", + "statusBar.background": "#30243d", + "statusBar.border": "#1c1226", + "statusBar.debuggingBackground": "#30243d", + "statusBar.debuggingForeground": "#ff80ac50", + "statusBar.debuggingBorder": "#ff80acaf", + "statusBar.noFolderForeground": "#9987ab", + "statusBar.noFolderBackground": "#30243d", + "statusBar.noFolderBorder": "#30243d", + "statusBarItem.activeBackground": "#734b9b88", + "statusBarItem.hoverBackground": "#422b5a", + "statusBarItem.prominentBackground": "#21162d", + "statusBarItem.prominentHoverBackground": "#2b1145", + "button.background": "#007f99", + "button.foreground": "#edebff", + "button.hoverBackground": "#0ac", + "dropdown.background": "#3d2e4d", + "dropdown.border": "#3d2e4d", + "dropdown.foreground": "#996bc7", + "editorMarkerNavigation.background": "#4c326729", + "editorMarkerNavigationError.background": "#e34e1c", + "editorMarkerNavigationWarning.background": "#e69533", + "editorError.border": "#30243d", + "editorError.foreground": "#e34e1c", + "editorWarning.border": "#30243d", + "editorWarning.foreground": "#e69533", + "editorInfo.border": "#30243d", + "editorInfo.foreground": "#bf8ef1", + "editorHint.border": "#49e9a600", + "editorHint.foreground": "#49e9a6", + "editorGroup.emptyBackground": "#66597333", + "editorGroup.border": "#1c1226", + "editorGroup.dropBackground": "#66597333", + "editorGroupHeader.noTabsBackground": "#3d2e4d", + "editorGroupHeader.tabsBackground": "#3d2e4d", + "editorGroupHeader.tabsBorder": "#3d2e4d", + "tab.activeBackground": "#30243d", + "tab.unfocusedActiveBackground": "#302b36", + "tab.activeForeground": "#bf8ef1", + "tab.border": "#1c1226", + "tab.inactiveBackground": "#3d2e4d", + "tab.inactiveForeground": "#b3a5c0", + "tab.unfocusedActiveForeground": "#b3a5c0", + "tab.unfocusedInactiveForeground": "#b3a5c0", + "tab.activeBorderTop": "#bf8ef1", + "tab.activeModifiedBorder": "#49e9a6", + "tab.activeBorder": "#30243d", + "tab.unfocusedActiveBorder": "#30243d", + "tab.unfocusedHoverBackground": "#996bc721", + "textBlockQuote.background": "#30243d", + "textBlockQuote.border": "#8767a8", + "textCodeBlock.background": "#30243d", + "textLink.activeForeground": "#bf8ef1", + "textLink.foreground": "#bf8ef1", + "textPreformat.foreground": "#ffc180", + "textSeparator.foreground": "#30243d", + "walkThrough.embeddedEditorBackground": "#30243d", + "welcomePage.buttonBackground": "#291d35", + "welcomePage.buttonHoverBackground": "#3d2e4d", + "input.background": "#291d35", + "input.border": "#402956", + "input.foreground": "#CDD3DE", + "input.placeholderForeground": "#9987ab", + "inputOption.activeBorder": "#8767a8", + "inputValidation.errorForeground": "#ff4000", + "inputValidation.errorBackground": "#501502ee", + "inputValidation.errorBorder": "#691c02", + "inputValidation.infoForeground": "#40d4e7", + "inputValidation.infoBackground": "#0f6e7bee", + "inputValidation.infoBorder": "#148f9f", + "inputValidation.warningForeground": "#e69533", + "inputValidation.warningBackground": "#82694acc", + "inputValidation.warningBorder": "#a88457", + "editorWidget.background": "#3d2e4d", + "editorWidget.border": "#1c1226", + "editorHoverWidget.background": "#462d5d", + "editorHoverWidget.border": "#1c1226", + "editorSuggestWidget.background": "#462d5d", + "editorSuggestWidget.border": "#1c1226", + "editorSuggestWidget.foreground": "#b3a5c0", + "editorSuggestWidget.highlightForeground": "#bf8ef1", + "editorSuggestWidget.selectedBackground": "#593a78", + "editorGutter.background": "#30243d", + "editorGutter.addedBackground": "#8ce99a", + "editorGutter.deletedBackground": "#e34e1c", + "editorGutter.modifiedBackground": "#ffc180", + "editor.selectionBackground": "#8767a855", + "editor.selectionHighlightBackground": "#49ace933", + "editor.inactiveSelectionBackground": "#8767a833", + "editor.wordHighlightStrongBackground": "#cc990033", + "editor.wordHighlightBackground": "#e4b78133", + "editor.findMatchBackground": "#40bf6a11", + "editor.findMatchHighlightBackground": "#0e667179", + "editor.findRangeHighlightBackground": "#49e9a622", + "editor.hoverHighlightBackground": "#8767a83f", + "editor.lineHighlightBackground": "#402d53ee", + "editor.lineHighlightBorder": "#402d53", + "editor.rangeHighlightBackground": "#49d6e922", + "editorLink.activeForeground": "#14a5ff", + "editorWhitespace.foreground": "#ffffff21", + "editorIndentGuide.background": "#422e56", + "editorIndentGuide.activeBackground": "#595289", + "editorBracketMatch.background": "#8767a822", + "editorBracketMatch.border": "#8767a8", + "editorRuler.foreground": "#473856", + "editorCodeLens.foreground": "#776284", + "terminal.ansiBlack": "#362f3d", + "terminal.ansiRed": "#e66533", + "terminal.ansiGreen": "#49e9a6", + "terminal.ansiYellow": "#e4b781", + "terminal.ansiBlue": "#49ace9", + "terminal.ansiMagenta": "#df769b", + "terminal.ansiCyan": "#49d6e9", + "terminal.ansiWhite": "#bfafcf", + "terminal.ansiBrightBlack": "#594e65", + "terminal.ansiBrightRed": "#e97749", + "terminal.ansiBrightGreen": "#60ebb1", + "terminal.ansiBrightYellow": "#e69533", + "terminal.ansiBrightBlue": "#60b6eb", + "terminal.ansiBrightMagenta": "#e798b3", + "terminal.ansiBrightCyan": "#60dbeb", + "terminal.ansiBrightWhite": "#ccbfd9", + "terminal.background": "#291d35", + "terminal.foreground": "#ccbfd9", + "terminalCursor.background": "#291d35", + "terminalCursor.foreground": "#ccbfd9", + "merge.border": "#30243d00", + "merge.currentContentBackground": "#85f1ff22", + "merge.currentHeaderBackground": "#85f1ff44", + "merge.incomingContentBackground": "#9d92f222", + "merge.incomingHeaderBackground": "#9d92f244", + "merge.commonContentBackground": "#ffc18022", + "merge.commonHeaderBackground": "#ffc18044", + "editorOverviewRuler.currentContentForeground": "#85f1ff44", + "editorOverviewRuler.incomingContentForeground": "#9d92f244", + "editorOverviewRuler.commonContentForeground": "#ffc18044", + "editorOverviewRuler.border": "#30243d", + "notificationCenter.border": "#3d2e4d", + "notificationCenterHeader.foreground": "#9987ab", + "notificationCenterHeader.background": "#3d2e4d", + "notificationToast.border": "#3d2e4d", + "notifications.foreground": "#CDD3DE", + "notifications.background": "#3d2e4d", + "notifications.border": "#3d2e4d", + "notificationLink.foreground": "#9987ab", + "diffEditor.insertedTextBackground": "#16b67327", + "diffEditor.removedTextBackground": "#e6653341", + "debugToolBar.background": "#30243d", + "debugExceptionWidget.background": "#30243d", + "debugExceptionWidget.border": "#8767a8", + "extensionButton.prominentBackground": "#008c99", + "extensionButton.prominentForeground": "#e5f5f5", + "extensionButton.prominentHoverBackground": "#00bbcc", + "focusBorder": "#3d2e4d", + "foreground": "#ccbfd9", + "panel.background": "#291d35", + "panel.border": "#8767a8", + "panelTitle.activeBorder": "#8767a8", + "panelTitle.activeForeground": "#bf8ef1", + "panelTitle.inactiveForeground": "#725b8b", + "peekView.border": "#8767a8", + "peekViewEditor.background": "#2b1d3a", + "peekViewEditor.matchHighlightBackground": "#63438499", + "peekViewEditorGutter.background": "#2b1d3a", + "peekViewResult.background": "#2e1f3d", + "peekViewResult.fileForeground": "#ffc180", + "peekViewResult.lineForeground": "#9987ab", + "peekViewResult.matchHighlightBackground": "#343050", + "peekViewResult.selectionBackground": "#343050", + "peekViewResult.selectionForeground": "#9987ab", + "peekViewTitle.background": "#2e1f3d", + "peekViewTitleDescription.foreground": "#9987ab", + "peekViewTitleLabel.foreground": "#ffc180", + "progressBar.background": "#bf8ef1", + "scrollbar.shadow": "#00000044", + "scrollbarSlider.activeBackground": "#a660eb77", + "scrollbarSlider.background": "#a660eb33", + "scrollbarSlider.hoverBackground": "#a660eb55", + "gitDecoration.addedResourceForeground": "#16b673", + "gitDecoration.modifiedResourceForeground": "#49e9a6", + "gitDecoration.deletedResourceForeground": "#e34e1c", + "gitDecoration.untrackedResourceForeground": "#40d4e7", + "gitDecoration.ignoredResourceForeground": "#5b788b", + "gitDecoration.conflictingResourceForeground": "#ffc180", + "pickerGroup.border": "#8767a8", + "pickerGroup.foreground": "#bf8ef1", + "list.activeSelectionBackground": "#472e60", + "list.activeSelectionForeground": "#edebff", + "list.dropBackground": "#302040", + "list.focusBackground": "#593a78", + "list.focusForeground": "#edebff", + "list.highlightForeground": "#bf8ef1", + "list.hoverBackground": "#6a448d", + "list.hoverForeground": "#edebff", + "list.inactiveFocusBackground": "#362546", + "list.inactiveSelectionBackground": "#3d2e4d", + "list.inactiveSelectionForeground": "#ccbfd9", + "list.errorForeground": "#e34e1c", + "list.warningForeground": "#ffa857", + "listFilterWidget.background": "#302040", + "listFilterWidget.outline": "#49e9a6", + "listFilterWidget.noMatchesOutline": "#e34e1c", + "tree.indentGuidesStroke": "#665973", + "settings.headerForeground": "#ccbfd9", + "settings.modifiedItemIndicator": "#15ac31", + "settings.dropdownListBorder": "#66408c77", + "settings.dropdownBackground": "#3d2e4d", + "settings.dropdownForeground": "#0ac", + "settings.dropdownBorder": "#3d2e4d", + "settings.checkboxBackground": "#3d2e4d", + "settings.checkboxForeground": "#0ac", + "settings.checkboxBorder": "#3d2e4d", + "settings.textInputBackground": "#3d2e4d", + "settings.textInputForeground": "#0ac", + "settings.textInputBorder": "#3d2e4d", + "settings.numberInputBackground": "#291d35", + "settings.numberInputForeground": "#a660eb", + "settings.numberInputBorder": "#291d35", + "breadcrumb.foreground": "#b3a5c0", + "breadcrumb.background": "#30243d", + "breadcrumb.focusForeground": "#bf8ef1", + "breadcrumb.activeSelectionForeground": "#edebff", + "breadcrumbPicker.background": "#3d2e4d", + "titleBar.activeBackground": "#30243d", + "titleBar.activeForeground": "#ccbfd9", + "titleBar.inactiveBackground": "#30243d", + "titleBar.inactiveForeground": "#b3a5c0", + "menu.background": "#3d2e4d", + "menu.foreground": "#b3a5c0", + "menu.selectionBackground": "#593a78", + "menu.selectionForeground": "#bf8ef1", + "menu.selectionBorder": "#593a78", + "menu.separatorBackground": "#bf8ef1", + "menubar.selectionBackground": "#593a78", + "menubar.selectionForeground": "#bf8ef1", + "menubar.selectionBorder": "#593a78", + "editor.snippetTabstopHighlightBackground": "#21162d", + "editor.snippetTabstopHighlightBorder": "#30243d", + "editor.snippetFinalTabstopHighlightBackground": "#21162d", + "editor.snippetFinalTabstopHighlightBorder": "#30243d", + "minimap.findMatchHighlight": "#bf8ef1aa", + "minimap.errorHighlight": "#e34e1cee", + "minimap.warningHighlight": "#e69533ee", + "minimapGutter.addedBackground": "#16b673", + "minimapGutter.modifiedBackground": "#49e9a6", + "minimapGutter.deletedBackground": "#e34e1c", + "minimap.background": "#30243d99" + }, + "tokenColors": [ + { + "name": "COMMENT", + "scope": [ + "comment", + "punctuation.definition.comment", + "punctuation.definition.tag", + "comment.block.documentation punctuation.definition.bracket", + "source.ocaml comment constant.regexp meta.separator", + "markup.other.anchor support.constant", + "markup.fenced_code", + "markup.fenced_code punctuation.definition", + "punctuation.definition.heading", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown", + "punctuation.definition.strikethrough.markdown" + ], + "settings": { + "foreground": "#7f659a" + } + }, + { + "name": "TEXT", + "scope": [ + "constant.character", + "constant.escape", + "text.html.markdown", + "punctuation.definition.list_item", + "keyword.begin.tag.ejs", + "constant.name.attribute.tag.pug", + "source.clojure meta.symbol", + "constant.other.description.jsdoc", + "keyword.other.array.phpdoc.php", + "keyword.operator.other.powershell", + "meta.link.inline punctuation.definition.string", + "source.sql", + "source meta.brace", + "source punctuation", + "text.html punctuation", + "markup meta punctuation.definition", + "meta.bracket.julia", + "meta.array.julia", + "entity.name.footnote", + "source.ocaml punctuation.definition.tag", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "entity.other.attribute-name strong", + "binding.fsharp keyword.symbol.fsharp", + "entity.name.record.field.elm", + "entity.name.record.field.accessor.elm", + "storage.modifier.array.bracket", + "source.css entity.other", + "meta.attribute-selector punctuation.definition.entity", + "markup.other.anchor string", + "punctuation.separator", + "punctuation.section", + "punctuation.terminator" + ], + "settings": { + "foreground": "#ccbfd9" + } + }, + { + "name": "KEYWORD", + "scope": [ + "keyword", + "keyword.control", + "keyword.other.template", + "keyword.other.substitution", + "storage.modifier", + "meta.tag.sgml", + "punctuation.accessor", + "constant.other.color", + "entity.name.section", + "markup.heading", + "markup.heading punctuation.definition", + "entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "storage.type.function.pug", + "text.pug storage.type", + "text.pug meta.tag.other", + "source.clojure storage.control", + "meta.expression.clojure", + "punctuation.separator.slice.python", + "punctuation.separator.question-mark.cs", + "punctuation.definition.parameters.varargs", + "source.go keyword.operator", + "punctuation.separator.pointer-access", + "punctuation.separator.other.ruby", + "keyword.package", + "keyword.import", + "punctuation.definition.keyword", + "punctuation.separator.hash.cs", + "entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css", + "entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css", + "source.kotlin storage.type.import", + "source.kotlin storage.type.package", + "constant.string.documentation.powershell", + "punctuation.section.directive", + "storage.type.rust", + "punctuation.definition.attribute", + "punctuation.definition.preprocessor", + "punctuation.separator.namespace", + "punctuation.separator.method", + "keyword.control punctuation.definition.function", + "source.ocaml variable.interpolation string", + "source.reason variable.interpolation", + "punctuation.definition.directive", + "storage.type.modifier", + "keyword.other.class.fileds", + "source.toml entity.other.attribute-name", + "source.css entity.name.tag.custom", + "sharing.modifier", + "keyword.control.class.ruby", + "keyword.control.def.ruby" + ], + "settings": { + "foreground": "#df769b" + } + }, + { + "name": "VARIABLE", + "scope": [ + "variable", + "variable.object", + "variable.other", + "variable.parameter", + "support", + "entity.name.module", + "variable.import.parameter", + "variable.other.class", + "meta.toc-list.id.html", + "source.json meta.structure.dictionary.json support.type.property-name.json", + "meta.var.clojure", + "entity.name.variable", + "source.java meta.class.body.java", + "entity.name.package.go", + "source.c", + "source.cpp", + "source.go", + "source.python", + "meta.function-call.arguments.python", + "source.ruby", + "source.coffee.embedded.source", + "source.coffee", + "storage.modifier.import", + "storage.modifier.package", + "storage.type.annotation", + "punctuation.definition.annotation", + "source.groovy.embedded.source", + "punctuation.definition.variable", + "source.powershell", + "string.quoted.interpolated.vala constant.character.escape.vala", + "source.apacheconf", + "source.objc", + "source.crystal", + "string.quoted.double.kotlin entity.string.template.element.kotlin", + "entity.name.package.kotlin", + "meta.template.expression.kotlin", + "parameter.variable.function", + "variable.other.constant.elixir", + "source.elixir.embedded.source", + "source.sql.embedded", + "punctuation.definition.placeholder", + "source.swift", + "source.julia", + "source.shell", + "variable.other.normal punctuation.definition.variable.shell", + "source.reason variable.language", + "source.reason variable.language string.other.link", + "source.elm meta.value", + "source.elm meta.declaration.module", + "meta.embedded.block variable punctuation.definition.variable.php", + "string.quoted.double.class.other", + "source.toml keyword", + "support.type.nim", + "source.tf meta.template.expression", + "source.scala entity.name.import", + "markup.code", + "markup.fenced_code.block" + ], + "settings": { + "foreground": "#e4b781" + } + }, + { + "name": "ANNOTATION", + "scope": [ + "support.variable.property", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "entity.other.attribute-name.id", + "entity.other.attribute-name.id punctuation.definition.entity", + "entity.name.type.annotation.kotlin", + "support.type.primitive", + "meta.type.parameters entity.name.type", + "meta.type.annotation entity.name.type", + "punctuation.definition.typeparameters", + "source.python support.type.python", + "comment.block.documentation.phpdoc.php keyword.other.type.php", + "storage.type.php", + "keyword.type", + "storage.type.cs", + "storage.type.c", + "storage.type.objc", + "punctuation.definition.storage.type.objc", + "markup punctuation.definition", + "storage.type.powershell", + "comment.block.documentation entity.name.type", + "source.java storage.type", + "storage.type.primitive", + "source.groovy storage.type", + "storage.type.r", + "source.haskell storage.type", + "punctuation.separator.clause-head-body", + "source.go storage.type", + "storage.type.core.rust", + "storage.class.std.rust", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "support.type.vb", + "entity.name.type.kotlin", + "support.type.julia", + "constant.other.reference", + "source.graphql support.type", + "source.reason support.type string", + "entity.name.type.fsharp", + "source.elm storage.type", + "storage.type.user-defined", + "storage.type.built-in", + "support.type.builtin", + "source.swift support.type", + "support.class.crystal", + "storage.type.integral", + "source.cpp storage.type.cpp", + "source.vala storage.type", + "source.hlsl storage.type.basic", + "source.hlsl support.type.other", + "source.apex storage.type", + "source.nim storage.type", + "source.cpp entity.name.type", + "support.class.builtin", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "markup.raw.monospace", + "markup.mark", + "entity.name.type.primitive", + "entity.name.type.numeric" + ], + "settings": { + "foreground": "#d67e5c" + } + }, + { + "name": "CONSTANT", + "scope": [ + "constant", + "variable.other.constant", + "support.constant", + "punctuation.definition.entity", + "constant.character.entity", + "support.variable.magic", + "markup.quote", + "entity.name.type.type-parameter.cs", + "punctuation.bracket.angle", + "entity.name.function.preprocessor.c", + "storage.type.scala", + "entity.helper.apacheconf", + "variable.language.crystal", + "punctuation.definition.constant", + "support.constant punctuation.definition.variable", + "constant.character.math", + "support.class.math", + "source.graphql constant.character", + "source.reason constant.language.list", + "source.cpp variable.other.enummember", + "support.variable.class.hideshow", + "entity.other.attribute-name.class", + "meta.attribute.id entity.other.attribute-name", + "text.html entity.other.attribute-name", + "meta.tag.attributes entity.other.attribute-name", + "text.xml entity.other.attribute-name", + "source.cs entity.other.attribute-name", + "constant.character.format.placeholder", + "constant.other.placeholder", + "source.vue entity.other.attribute-name", + "entity.other.attribute-name.mjml", + "source.vue meta.directive punctuation.separator.key-value", + "meta.definition.attribute-entry punctuation.separator" + ], + "settings": { + "foreground": "#d5971a" + } + }, + { + "name": "TAG", + "scope": [ + "variable.language", + "variable.parameter.function.language.special", + "punctuation.definition.italic", + "punctuation.definition.bold", + "entity.name.tag", + "variable.language punctuation.definition.variable", + "keyword.control.clojure", + "support.type.exception.python", + "keyword.other.this.cs", + "keyword.other.base.cs", + "keyword.other.var.cs", + "storage.modifier.super", + "source.go keyword", + "keyword.function.go", + "meta.separator", + "keyword.other.fn.rust", + "storage.modifier.static.rust", + "source.r meta.function.r keyword.control.r", + "storage.type.def", + "meta.class.identifier storage.modifier", + "source.scala keyword.declaration", + "storage.type", + "comment.block.documentation punctuation.definition.block.tag", + "comment.block.documentation punctuation.definition.inline.tag", + "entity.tag.apacheconf", + "keyword.other.julia", + "source.julia storage.modifier", + "constant.language.empty-list.haskell", + "meta.function.powershell storage.type.powershell", + "keyword.control.fun", + "punctuation.terminator.function", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "keyword.control.class", + "keyword.control.def", + "source.ocaml keyword markup.underline", + "source.ocaml storage.type markup.underline", + "binding.fsharp keyword", + "function.anonymous keyword", + "function.anonymous keyword.symbol.fsharp", + "meta.embedded.block variable.language punctuation.definition.variable.php", + "keyword.declaration.dart", + "source.wsd keyword.other.class", + "source.wsd keyword.other.linebegin", + "keyword.other.skinparam.keyword", + "keyword.other.nim", + "markup.deleted.diff", + "source.tf support.class.variable", + "meta.function.lua keyword.control.lua", + "markup.block entity.name.tag", + "markup.meta.attribute-list", + "source.zig keyword.default", + "source.zig keyword.structure" + ], + "settings": { + "foreground": "#e66533" + } + }, + { + "name": "STRING", + "scope": [ + "string", + "punctuation.definition.string", + "source.css support.constant", + "entity.name.import.go", + "markup.raw.texttt", + "markup.inserted.diff", + "source.scala punctuation.definition.character", + "constant.character.literal.scala", + "source.tf entity.name" + ], + "settings": { + "foreground": "#49e9a6" + } + }, + { + "name": "STRINGINTERPOLATED", + "scope": [ + "string.template", + "punctuation.definition.string.template", + "string.interpolated.python string.quoted.single.python", + "string.quoted.double.heredoc", + "string.quoted.interpolated.vala", + "string.quoted.interpolated.vala punctuation.definition.string", + "string.regexp.apacheconf", + "markup.inline.raw.string", + "markup.inline.raw punctuation.definition.raw", + "string.quoted.double.interpolated.crystal", + "string.quoted.double.interpolated.crystal punctuation.definition.string", + "text.tex markup.raw" + ], + "settings": { + "foreground": "#16b673" + } + }, + { + "name": "NUMBER", + "scope": [ + "constant.numeric", + "constant.language", + "punctuation.separator.decimal.period.php", + "keyword.operator.null-conditional.cs", + "punctuation.separator.question-mark.cs", + "constant.integer.apacheconf", + "keyword.operator.nullable-type", + "constant.language punctuation.definition.variable", + "constant.others.fsharp", + "keyword.other.unit", + "string.quoted.double.skinparam.value", + "source.toml constant", + "source.zig keyword.constant.bool", + "source.zig keyword.constant.default" + ], + "settings": { + "foreground": "#7060eb" + } + }, + { + "name": "FUNCTION", + "scope": [ + "variable.function", + "support.type.property-name", + "entity.name.function", + "string.other.link", + "markup.link", + "support.type.vendored", + "support.other.variable", + "meta.function-call.generic.python", + "meta.method-call.groovy meta.method.groovy", + "meta.class.body.groovy meta.method.body.java storage.type.groovy", + "punctuation.definition.decorator", + "support.function.any-method", + "text.tex support.function", + "text.tex punctuation.definition.function", + "entity.name.section.fsharp entity.name.section.fsharp", + "support.variable.class.function", + "keyword.control.cucumber.table", + "punctuation.decorator", + "source.tf support.class" + ], + "settings": { + "foreground": "#16a3b6" + } + }, + { + "name": "SUPPORT", + "scope": [ + "entity.name", + "entity.other", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "support.type", + "support.class", + "punctuation.definition.parameters", + "support.function", + "support.function.construct", + "markup.changed.git_gutter", + "markup.underline.link", + "markup.underline.link.image", + "markup.underline", + "meta.symbol.namespace.clojure", + "entity.mime-type.apacheconf", + "keyword.operator.function.infix", + "entity.name.function.infix", + "entity.name.function.call.kotlin", + "text.tex support.function.verb", + "text.tex support.function.texttt", + "source.reason constant.language.unit", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "constant.language.unit.fsharp", + "source.wsd support.class.preprocessings", + "keyword.language.gherkin.feature.scenario", + "source.nim keyword.other.common.function", + "entity.name.type.namespace", + "entity.name.scope-resolution.function.call" + ], + "settings": { + "foreground": "#49d6e9" + } + }, + { + "name": "MISC", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js", + "source.js punctuation.section.embedded", + "punctuation.definition.template-expression", + "support.class", + "storage.type.string.python", + "string.interpolated.pug", + "support.constant.handlebars", + "source.clojure punctuation.section.set", + "source.clojure punctuation.section.metadata", + "entity.global.clojure", + "source.python meta.function-call.python support.type.python", + "entity.other.inherited-class.python", + "punctuation.definition.interpolation", + "punctuation.section.embedded.begin.ruby", + "punctuation.section.embedded.end.ruby source.ruby", + "support.constant.math", + "entity.namespace.r", + "meta.method-call.groovy storage.type.groovy", + "source.scala entity.name.class.declaration", + "constant.character.escape", + "support.function.macro.julia", + "string.replacement.apacheconf", + "storage.modifier.using.vala", + "constant.other.haskell", + "source.objc entity.name.tag", + "string.quoted.other.literal.upper.crystal punctuation.definition.string", + "meta.embedded.line.crystal punctuation.section.embedded", + "meta.embedded.line.crystal punctuation.section.embedded source.crystal", + "punctuation.section.embedded", + "punctuation.section.tag", + "punctuation.section.embedded source.swift", + "variable.other.bracket punctuation.definition.variable", + "string.interpolated.dollar punctuation.definition.string", + "constant.character.escape punctuation.definition.keyword", + "source.ocaml entity.name.class constant.numeric", + "source.reason entity.name.class", + "keyword.format.specifier.fsharp", + "support.module.elm", + "meta.embedded.block.php punctuation.definition.variable.php", + "source.vala storage.type", + "support.variable.class.group", + "entity.name.type.class", + "source.tf meta.keyword.list", + "source.tf meta.keyword.map", + "entity.name.class.lua", + "markup.substitution" + ], + "settings": { + "foreground": "#49ace9" + } + }, + { + "name": "INVALID", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#e3541c" + } + }, + { + "name": "ITALIC", + "scope": [ + "comment", + "storage.modifier", + "punctuation.definition.comment", + "entity.other", + "variable.language", + "support.type.vendored", + "support.constant.vendored", + "markup.quote", + "markup.italic", + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js", + "keyword.control.clojure", + "source.clojure meta.symbol.dynamic", + "keyword.other.this.cs", + "keyword.other.base.cs", + "variable.other.member.c", + "support.type.core.rust", + "variable.other.object.property", + "variable.other.property", + "source.r meta.function.r keyword.control.r", + "comment.line.roxygen.r keyword", + "comment.line.roxygen.r variable.parameter.r", + "keyword.control.inheritance.coffee", + "comment.block.documentation.phpdoc.php keyword", + "keyword.other.array.phpdoc.php", + "storage.type.modifier", + "comment.block.javadoc.java keyword", + "comment.block.javadoc.java variable.parameter.java", + "keyword.operator.documentation.powershell", + "storage.type.scala", + "variable.parameter.function.language.special", + "comment.block.documentation.scala keyword", + "comment.block.documentation.scala variable.parameter", + "support.function.builtin.go", + "constant.other.symbol.hashkey.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.ruby", + "source.vala storage.type.generic", + "constant.other.table-name", + "constant.other.placeholder", + "variable.other.field", + "entity.alias.import.go", + "source.swift keyword.other.declaration-specifier", + "support.variable.swift", + "keyword.other.capture-specifier", + "text.tex support.function.emph", + "constant.other.math", + "support.function.textit", + "entity.name.footnote", + "entity.name.function.directive.graphql", + "source.graphql support.type.enum", + "source.ocaml entity.name.filename", + "source.reason entity.name.filename", + "abstract.definition.fsharp keyword", + "abstract.definition.fsharp entity", + "function.anonymous keyword", + "entity.name.record.field.accessor.elm", + "support.type.primitive", + "support.type.builtin", + "keyword.type.cs", + "storage.type.built-in", + "storage.type.primitive", + "source.python support.type.python", + "storage.type.core.rust", + "source.swift support.type", + "source.go storage.type", + "storage.type.php", + "storage.type.function.kotlin", + "entity.name.type.kotlin", + "support.type.julia", + "variable.other.member", + "keyword.other.import", + "keyword.package", + "keyword.import", + "source.wsd keyword.control.diagram", + "keyword.language.gherkin.feature.step", + "source.hlsl storage.type.basic", + "source.apex keyword.type", + "sharing.modifier", + "source.nim storage.type.concrete", + "meta.preprocessor.pragma.nim", + "storage.type.integral", + "entity.name.scope-resolution.function.call", + "support.class.builtin", + "comment.block.documentation storage.type.class", + "source.tf meta.keyword.string", + "source.tf meta.keyword.number", + "source.scala entity.name.class", + "meta.import keyword.control", + "keyword.control.export", + "source.vue meta.directive punctuation.separator.key-value", + "keyword.local.lua", + "markup.mark.constrained markup.mark", + "markup.block.open", + "entity.name.type.primitive", + "entity.name.type.numeric", + "source.zig keyword.type", + "source.zig keyword.storage", + "source.zig keyword.structure" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "BOLD", + "scope": [ + "keyword", + "keyword.control", + "keyword.operator", + "keyword.other.template", + "keyword.other.substitution", + "storage.type.function.arrow", + "constant.other.color", + "punctuation.accessor", + "entity.name.section", + "markdown.heading", + "markup.inline.raw punctuation.definition.raw", + "markup.heading", + "storage.type.function.pug", + "storage.type.function.python", + "storage.type.annotation", + "punctuation.bracket.angle", + "keyword.other.new", + "storage.type.generic.wildcard", + "source.go keyword.operator", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "variable.parameter", + "support.function.builtin.rust", + "storage.type.function.coffee", + "entity.name.variable.parameter", + "punctuation.separator.hash.cs", + "constant.other.symbol.ruby punctuation.definition.constant.ruby", + "constant.other.symbol.hashkey.ruby punctuation.definition.constant.ruby", + "meta.function.parameters variable.other", + "entity.name.type.annotation.kotlin", + "storage.type.objc", + "parameter.variable.function", + "markup punctuation.definition", + "punctuation.section.directive", + "punctuation.definition.preprocessor", + "source.ruby punctuation.definition.variable", + "support.function.textbf", + "source.graphql support.type.builtin", + "source.ocaml variable.interpolation string", + "entity.name.function.definition.special.constructor", + "entity.name.function.definition.special.member.destructor.", + "meta.function.parameters variable punctuation.definition.variable.php", + "source.wsd keyword.other.activity", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.function.go", + "keyword.other.fn.rust", + "markup.other.anchor", + "markup.list.bullet", + "markup.list punctuation.definition", + "keyword.control.default", + "punctuation.section", + "punctuation.separator", + "punctuation.terminator", + "markup.bold.markdown", + "source.zig storage.type.function" + ], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "BOLD-ITALIC", + "scope": [ + "markup.quote markup.bold", + "text.html punctuation.section.embedded", + "variable.other.c", + "storage.modifier.lifetime.rust", + "entity.name.lifetime.rust", + "source.rust meta.attribute.rust", + "meta.attribute.id entity.other.attribute-name", + "source.ocaml punctuation.definition.tag emphasis", + "source.tf entity.name", + "markup.quote punctuation.definition", + "markup.fenced_code punctuation.definition", + "fenced_code.block.language" + ], + "settings": { + "fontStyle": "bold italic" + } + }, + { + "name": "NORMAL", + "scope": [ + "keyword.begin.tag.ejs", + "source.python meta.function.decorator.python support.type.python", + "source.cs keyword.other", + "keyword.other.var.cs", + "source.go keyword", + "storage.modifier.static.rust", + "variable.parameter.r", + "variable.parameter.handlebars", + "storage.modifier.import", + "storage.modifier.package", + "meta.class.identifier storage.modifier", + "keyword.operator.other.powershell", + "source.css variable.parameter", + "string.interpolated variable.parameter", + "source.apacheconf keyword", + "keyword.other.julia", + "storage.modifier.using.vala", + "source.objc keyword.other.property.attribute", + "source.sql keyword.other", + "keyword.other.using.vala", + "keyword.operator.function.infix", + "keyword.control.directive", + "keyword.other.rust", + "keyword.other.declaration-specifier.swift", + "entity.name.function.swift", + "keyword.control.class", + "keyword.control.def", + "punctuation.definition.variable", + "entity.name.section.latex", + "source.ocaml keyword markup.underline", + "source.ocaml constant.language constant.numeric entity.other.attribute-name.id.css", + "source.reason entity.other.attribute-name constant.language constant.numeric", + "keyword.format.specifier.fsharp", + "entity.name.section.fsharp", + "binding.fsharp keyword", + "binding.fsharp keyword.symbol", + "record.fsharp keyword", + "keyword.symbol.fsharp", + "entity.name.section.fsharp keyword", + "namespace.open.fsharp keyword", + "namespace.open.fsharp entity", + "storage.type", + "source.cpp keyword.other", + "source.c keyword.other", + "keyword.other.unit", + "storage.modifier.array.bracket", + "meta.import.haskell keyword", + "keyword.declaration.dart", + "source.wsd keyword.other", + "keyword.other.skinparam", + "source.css keyword.control", + "source.css keyword.operator", + "keyword.language.gherkin.feature.scenario", + "keyword.control.cucumber.table", + "source.toml entity.other.attribute-name", + "source.toml keyword", + "keyword.other.nim", + "source.nim keyword.other.common.function", + "source.nim keyword.other", + "source.scala keyword.declaration", + "source.scala entity.name.class.declaration", + "keyword.control.lua", + "source.css punctuation.section", + "punctuation.section.embedded", + "source.c punctuation.section", + "source.cpp punctuation.section", + "source.java punctuation.section", + "source.php punctuation.section", + "source.powershell punctuation.section", + "source.r punctuation.section", + "source.ruby punctuation.section", + "source.swift punctuation.section", + "source.objc punctuation.section", + "source.zig keyword.constant.bool", + "source.zig keyword.default", + "source.zig keyword.statement", + "source.zig keyword.constant.default" + ], + "settings": { + "fontStyle": "" + } + }, + { + "name": "STRIKETHROUGH", + "scope": [ + "markup.strikethrough" + ], + "settings": { + "fontStyle": "strikethrough" + } + } + ] +} \ No newline at end of file diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 707d27573009f47d082b328532d99d7794ccd70d..bbeea1817f60f67aeddd4c9488f9da3b3834647a 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -5,6 +5,7 @@ mod registry; mod scale; mod settings; mod syntax; +mod themes; use ::settings::Settings; pub use colors::*; @@ -14,6 +15,7 @@ pub use registry::*; pub use scale::*; pub use settings::*; pub use syntax::*; +pub use themes::*; use gpui::{AppContext, Hsla, SharedString}; diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs new file mode 100644 index 0000000000000000000000000000000000000000..780c002a76fa099da84b879858d050b6e7954f31 --- /dev/null +++ b/crates/theme2/src/themes/andromeda.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn andromeda() -> ThemeFamily { + ThemeFamily { + id: "59c3749c-1bd0-4ee7-903b-5ffc7d097bf1".into(), + name: "Andromeda".into(), + author: "Eliver Lara (EliverLara)".into(), + themes: vec![ThemeVariant { id: "bdd515ce-a2e2-4414-a877-521bde0b47a1".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x23262eff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x23262eff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "c296bb0e-d931-4b11-a480-b1b79cc931b3".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x262933ff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x262933ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs new file mode 100644 index 0000000000000000000000000000000000000000..664c6e4938786d8bfa6c2ef7c038ba7ca96bfb4c --- /dev/null +++ b/crates/theme2/src/themes/ayu.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn ayu() -> ThemeFamily { + ThemeFamily { + id: "d002a0c0-915d-4778-9b6e-33e212ce36ad".into(), + name: "Ayu".into(), + author: "dempfi (Ike Ku)".into(), + themes: vec![ThemeVariant { id: "5c9909bb-b36d-438d-bad3-0a4d4d1d98cd".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6b7d8f1f).into(), border_variant: rgba(0x6b7d8f1f).into(), border_focused: rgba(0x6b7d8f1f).into(), border_transparent: rgba(0x6b7d8f1f).into(), elevated_surface_background: rgba(0xf8f9faff).into(), surface_background: rgba(0xf8f9faff).into(), background: rgba(0xf8f9faff).into(), element_background: rgba(0xffaa32ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x8a9199ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf8f9faff).into(), tab_active_background: rgba(0xf8f9faff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf8f9faff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7070ff).into(), terminal_ansi_bright_green: rgba(0x86b300ff).into(), terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), terminal_ansi_bright_magenta: rgba(0xa37accff).into(), terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), terminal_ansi_black: rgba(0x000000ff).into(), terminal_ansi_red: rgba(0xea6c6dff).into(), terminal_ansi_green: rgba(0x6cbf43ff).into(), terminal_ansi_yellow: rgba(0xeca944ff).into(), terminal_ansi_blue: rgba(0x3198e1ff).into(), terminal_ansi_magenta: rgba(0x9e75c7ff).into(), terminal_ansi_cyan: rgba(0x46ba94ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "fc965133-79ea-408a-8418-6e58124d6116".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x171a24ff).into(), border_variant: rgba(0x171a24ff).into(), border_focused: rgba(0x171a24ff).into(), border_transparent: rgba(0x171a24ff).into(), elevated_surface_background: rgba(0x1f2430ff).into(), surface_background: rgba(0x1f2430ff).into(), background: rgba(0x1f2430ff).into(), element_background: rgba(0xffcb65ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x707a8cff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1f2430ff).into(), tab_active_background: rgba(0x1f2430ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f2430ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xf18678ff).into(), terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), terminal_ansi_bright_blue: rgba(0x73cfffff).into(), terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x171a24ff).into(), terminal_ansi_red: rgba(0xed8173ff).into(), terminal_ansi_green: rgba(0x86d96bff).into(), terminal_ansi_yellow: rgba(0xfacc6eff).into(), terminal_ansi_blue: rgba(0x6ccafaff).into(), terminal_ansi_magenta: rgba(0xdabafaff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3b9fd3a3-3582-4de9-ae4b-dfffccc0f0e0".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1e232bff).into(), border_variant: rgba(0x1e232bff).into(), border_focused: rgba(0x1e232bff).into(), border_transparent: rgba(0x1e232bff).into(), elevated_surface_background: rgba(0x0b0e14ff).into(), surface_background: rgba(0x0b0e14ff).into(), background: rgba(0x0b0e14ff).into(), element_background: rgba(0xe6b450ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x565b66ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x0b0e14ff).into(), tab_active_background: rgba(0x0b0e14ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0b0e14ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7077ff).into(), terminal_ansi_bright_green: rgba(0xa9d94bff).into(), terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x1e232bff).into(), terminal_ansi_red: rgba(0xea6c72ff).into(), terminal_ansi_green: rgba(0x7ed962ff).into(), terminal_ansi_yellow: rgba(0xf9af4fff).into(), terminal_ansi_blue: rgba(0x52bdfaff).into(), terminal_ansi_magenta: rgba(0xcca1faff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs new file mode 100644 index 0000000000000000000000000000000000000000..3bb9d0c0bc1e9978a507cd1fa0d73e7ab7784954 --- /dev/null +++ b/crates/theme2/src/themes/dracula.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn dracula() -> ThemeFamily { + ThemeFamily { + id: "a8d7fe1f-5446-4d10-a462-5c4693d889d3".into(), + name: "Dracula".into(), + author: "Zeno Rocha".into(), + themes: vec![ThemeVariant { id: "ff2a239f-097b-4c86-a517-14011cd7fb52".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xbd93f9ff).into(), border_variant: rgba(0xbd93f9ff).into(), border_focused: rgba(0xbd93f9ff).into(), border_transparent: rgba(0xbd93f9ff).into(), elevated_surface_background: rgba(0x282a35ff).into(), surface_background: rgba(0x282a35ff).into(), background: rgba(0x282a35ff).into(), element_background: rgba(0x44475aff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xf8f8f2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x21222cff).into(), tab_active_background: rgba(0x282a35ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282a35ff).into(), terminal_ansi_bright_black: rgba(0x6272a4ff).into(), terminal_ansi_bright_red: rgba(0xff6d6dff).into(), terminal_ansi_bright_green: rgba(0x69ff94ff).into(), terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x21222cff).into(), terminal_ansi_red: rgba(0xff5555ff).into(), terminal_ansi_green: rgba(0x50fa7bff).into(), terminal_ansi_yellow: rgba(0xf1fa8cff).into(), terminal_ansi_blue: rgba(0xbd93f9ff).into(), terminal_ansi_magenta: rgba(0xff79c6ff).into(), terminal_ansi_cyan: rgba(0x8be9fdff).into(), terminal_ansi_white: rgba(0xf8f8f2ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs new file mode 100644 index 0000000000000000000000000000000000000000..8ed6787c03db20cf0beaf08103d198865c367396 --- /dev/null +++ b/crates/theme2/src/themes/gruvbox.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn gruvbox() -> ThemeFamily { + ThemeFamily { + id: "aed09b4b-6e2c-4de2-ac0e-a17f5575b8ce".into(), + name: "Gruvbox".into(), + author: "morhetz".into(), + themes: vec![ThemeVariant { id: "53e773b8-60fe-40dc-b624-ab33a834627b".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x1d2021ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1d2021ff).into(), tab_active_background: rgba(0x32302fff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1d2021ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "515bf7d7-1299-437e-a130-35e8bc76fe4e".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x282828ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x282828ff).into(), tab_active_background: rgba(0x3c3836ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282828ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "afb31789-7208-491a-b1ac-f92780a9bff5".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x32302fff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x32302fff).into(), tab_active_background: rgba(0x504945ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x32302fff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "a8802a22-d4ae-49b9-9785-b912844fc9e0".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf9f5d7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf9f5d7ff).into(), tab_active_background: rgba(0xf2e5bcff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf9f5d7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "de7f0ba5-5ea8-483b-a71a-bd1313c84dfb".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfbf1c7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xfbf1c7ff).into(), tab_active_background: rgba(0xebdbb2ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xfbf1c7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "45966b1b-6f0c-411b-be6b-3db6626f48c7".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf2e5bcff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf2e5bcff).into(), tab_active_background: rgba(0xd5c4a1ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf2e5bcff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..af2b0d51ee6c230f1ed21a1ea5f95003967a6fa8 --- /dev/null +++ b/crates/theme2/src/themes/mod.rs @@ -0,0 +1,12 @@ + +mod andromeda; +mod ayu; +mod dracula; +mod gruvbox; +mod notctis; + +pub use andromeda::*; +pub use ayu::*; +pub use dracula::*; +pub use gruvbox::*; +pub use notctis::*; diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs new file mode 100644 index 0000000000000000000000000000000000000000..4a21844e48b220e0b6bd6018a76265d3417e4812 --- /dev/null +++ b/crates/theme2/src/themes/notctis.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn notctis() -> ThemeFamily { + ThemeFamily { + id: "ad886135-2fff-4311-b2bb-2ce1ebd1c50d".into(), + name: "Notctis".into(), + author: "Liviu Schera (liviuschera)".into(), + themes: vec![ThemeVariant { id: "b79ece4f-89f3-4388-94ad-edeabfddba87".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1579b6ff).into(), border_variant: rgba(0x1579b6ff).into(), border_focused: rgba(0x1579b6ff).into(), border_transparent: rgba(0x1579b6ff).into(), elevated_surface_background: rgba(0x051b28ff).into(), surface_background: rgba(0x051b28ff).into(), background: rgba(0x07263aff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xbecfdaff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x08324eff).into(), tab_active_background: rgba(0x07263aff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x051b28ff).into(), terminal_ansi_bright_black: rgba(0x475e6cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xbecfdaff).into(), terminal_ansi_black: rgba(0x28343dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xaec3d0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "664a1471-1c92-44d1-84c5-3b8de9f40c5b".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x997582ff).into(), border_variant: rgba(0x997582ff).into(), border_focused: rgba(0x997582ff).into(), border_transparent: rgba(0x997582ff).into(), elevated_surface_background: rgba(0x272022ff).into(), surface_background: rgba(0x272022ff).into(), background: rgba(0x322a2dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xcbbec2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x413036ff).into(), tab_active_background: rgba(0x322a2dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x272022ff).into(), terminal_ansi_bright_black: rgba(0x69545bff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), terminal_ansi_black: rgba(0x47393eff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb9acb0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "a42edabe-8b86-482e-ae16-d036183ed66b".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xe1eeefff).into(), surface_background: rgba(0xe1eeefff).into(), background: rgba(0xf4f6f6ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xcaedf2ff).into(), tab_active_background: rgba(0xf4f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xe1eeefff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "5999de6b-6933-47d7-bcce-cba3d34d8f38".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xaea4f4ff).into(), border_variant: rgba(0xaea4f4ff).into(), border_focused: rgba(0xaea4f4ff).into(), border_transparent: rgba(0xaea4f4ff).into(), elevated_surface_background: rgba(0xe9e7f3ff).into(), surface_background: rgba(0xe9e7f3ff).into(), background: rgba(0xf2f1f8ff).into(), element_background: rgba(0x8d7ffeff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x0c006bff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0xe2dff6ff).into(), tab_active_background: rgba(0xf2f1f8ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0xe9e7f3ff).into(), terminal_ansi_bright_black: rgba(0x0f0080ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x0c006bff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "45aee81e-7464-4ce3-a5a2-0d48e943eb5c".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xf6eddaff).into(), surface_background: rgba(0xf6eddaff).into(), background: rgba(0xfef8ecff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf0e9d6ff).into(), tab_active_background: rgba(0xfef8ecff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf6eddaff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aea2719c-b339-41ff-a008-9ed15172c56a".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x496c83ff).into(), border_variant: rgba(0x496c83ff).into(), border_focused: rgba(0x496c83ff).into(), border_transparent: rgba(0x496c83ff).into(), elevated_surface_background: rgba(0x0e1920ff).into(), surface_background: rgba(0x0e1920ff).into(), background: rgba(0x1b2932ff).into(), element_background: rgba(0x2e616bff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5cdd3ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x202d37ff).into(), tab_active_background: rgba(0x1b2932ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0e1920ff).into(), terminal_ansi_bright_black: rgba(0x425866ff).into(), terminal_ansi_bright_red: rgba(0xca8468ff).into(), terminal_ansi_bright_green: rgba(0x84c8abff).into(), terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), terminal_ansi_bright_blue: rgba(0x68a4caff).into(), terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), terminal_ansi_black: rgba(0x182935ff).into(), terminal_ansi_red: rgba(0xc08872ff).into(), terminal_ansi_green: rgba(0x72c09fff).into(), terminal_ansi_yellow: rgba(0xc8a984ff).into(), terminal_ansi_blue: rgba(0x6095b7ff).into(), terminal_ansi_magenta: rgba(0xc28097ff).into(), terminal_ansi_cyan: rgba(0x72b7c0ff).into(), terminal_ansi_white: rgba(0xc5cdd3ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aa3f19d1-b767-4a33-b424-96ee06f91d50".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x03181aff).into(), surface_background: rgba(0x03181aff).into(), background: rgba(0x052428ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x052428ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x03181aff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "19cd0824-8b0f-446a-8f2f-46d88f103cb7".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "01ae3458-f6a4-4d37-b348-88f99295cb13".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "5c3f4b73-63c6-4732-b57c-8cae9868d08b".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6d66a7ff).into(), border_variant: rgba(0x6d66a7ff).into(), border_focused: rgba(0x6d66a7ff).into(), border_transparent: rgba(0x6d66a7ff).into(), elevated_surface_background: rgba(0x1f1d30ff).into(), surface_background: rgba(0x1f1d30ff).into(), background: rgba(0x292640ff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5c2d6ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2f2c49ff).into(), tab_active_background: rgba(0x292640ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f1d30ff).into(), terminal_ansi_bright_black: rgba(0x504e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), terminal_ansi_black: rgba(0x302f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb6b3ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "544dcfe0-a878-4e58-b3d2-f6f28f765266".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x8666a7ff).into(), border_variant: rgba(0x8666a7ff).into(), border_focused: rgba(0x8666a7ff).into(), border_transparent: rgba(0x8666a7ff).into(), elevated_surface_background: rgba(0x291d35ff).into(), surface_background: rgba(0x291d35ff).into(), background: rgba(0x30243dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xccbfd9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x3d2e4dff).into(), tab_active_background: rgba(0x30243dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x291d35ff).into(), terminal_ansi_bright_black: rgba(0x594e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), terminal_ansi_black: rgba(0x362f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xbfafcfff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index e2436b1129b001562381f6e46cab13ee3df759e7..8ee4df2e96b5257aa8eda8bd85fe2cab8ec8579c 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -52,11 +52,14 @@ pub struct ThemeMetadata { fn main() -> Result<()> { SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); + println!("Creating path: assets/themes/src/vscode/"); let vscode_themes_path = PathBuf::from_str("assets/themes/src/vscode/")?; let mut theme_families = Vec::new(); for theme_family_dir in fs::read_dir(&vscode_themes_path)? { + println!("Reading directory: {:?}", vscode_themes_path); + let theme_family_dir = theme_family_dir?; if theme_family_dir.file_name().to_str() == Some(".DS_Store") { @@ -69,6 +72,10 @@ fn main() -> Result<()> { .ok_or(anyhow!("no file stem")) .map(|stem| stem.to_string_lossy().to_string())?; + println!( + "Opening file: {:?}", + theme_family_dir.path().join("family.json") + ); let family_metadata_file = File::open(theme_family_dir.path().join("family.json")) .context(format!("no `family.json` found for '{theme_family_slug}'"))?; @@ -82,7 +89,13 @@ fn main() -> Result<()> { for theme_metadata in family_metadata.themes { let theme_file_path = theme_family_dir.path().join(&theme_metadata.file_name); - let theme_file = File::open(&theme_file_path)?; + let theme_file = match File::open(&theme_file_path) { + Ok(file) => file, + Err(_) => { + println!("Failed to open file at path: {:?}", theme_file_path); + continue; + } + }; let vscode_theme: VsCodeTheme = serde_json::from_reader(theme_file) .context(format!("failed to parse theme {theme_file_path:?}"))?; @@ -114,6 +127,10 @@ fn main() -> Result<()> { let mut output_file = File::create(themes_output_path.join(format!("{theme_family_slug}.rs")))?; + println!( + "Creating file: {:?}", + themes_output_path.join(format!("{theme_family_slug}.rs")) + ); let theme_module = format!( r#" @@ -136,6 +153,10 @@ fn main() -> Result<()> { theme_modules.push(theme_family_slug); } + println!( + "Creating file: {:?}", + themes_output_path.join(format!("mod.rs")) + ); let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; let mod_rs_contents = format!( From e460f6a27c32c2188a1c609f8f55190cc233abd9 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 6 Nov 2023 18:59:46 +0100 Subject: [PATCH 033/110] WIP --- crates/editor2/src/editor.rs | 6 +- crates/editor2/src/element.rs | 1187 +++++++++++++------------- crates/gpui2/src/text_system/line.rs | 4 - 3 files changed, 611 insertions(+), 586 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 70a1af6299e4ecfc7662e2334080f9e2d86a52ba..4e15519b62f2362898758f3e3cbdfb083ebd9fbd 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -8693,9 +8693,9 @@ impl Editor { } } - // pub fn show_local_cursors(&self, cx: &AppContext) -> bool { - // self.blink_manager.read(cx).visible() && self.focused - // } + pub fn show_local_cursors(&self, cx: &AppContext) -> bool { + self.blink_manager.read(cx).visible() && self.focused + } fn on_buffer_changed(&mut self, _: Model, cx: &mut ViewContext) { cx.notify(); diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index acf9afb487c48f1b6464cd06712b37dc2d2b2d7e..071c103de0e2c0db6123f1b7206252b148a7a599 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -9,12 +9,13 @@ use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ black, hsla, point, px, relative, size, transparent_black, AnyElement, BorrowWindow, Bounds, - ContentMask, Corners, Edges, Element, Hsla, Line, Pixels, Size, Style, TextRun, TextStyle, - TextSystem, ViewContext, WindowContext, + ContentMask, Corners, Edges, Element, Hsla, Line, Pixels, ShapedGlyph, Size, Style, TextRun, + TextStyle, TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; use multi_buffer::Anchor; +use project::project_settings::{GitGutterSetting, ProjectSettings}; use settings::Settings; use smallvec::SmallVec; use std::{ @@ -373,29 +374,29 @@ impl EditorElement { // ); // if editor.has_pending_selection() { - // let mut scroll_delta = gpui::Point::zero(); + // let mut scroll_delta = gpui::Point::::zero(); // let vertical_margin = position_map.line_height.min(text_bounds.height() / 3.0); // let top = text_bounds.origin.y + vertical_margin; - // let bottom = text_bounds.lower_left().y() - vertical_margin; - // if position.y() < top { - // scroll_delta.set_y(-scale_vertical_mouse_autoscroll_delta(top - position.y())) + // let bottom = text_bounds.lower_left().y - vertical_margin; + // if position.y < top { + // scroll_delta.set_y(-scale_vertical_mouse_autoscroll_delta(top - position.y)) // } - // if position.y() > bottom { - // scroll_delta.set_y(scale_vertical_mouse_autoscroll_delta(position.y() - bottom)) + // if position.y > bottom { + // scroll_delta.set_y(scale_vertical_mouse_autoscroll_delta(position.y - bottom)) // } // let horizontal_margin = position_map.line_height.min(text_bounds.width() / 3.0); // let left = text_bounds.origin.x + horizontal_margin; - // let right = text_bounds.upper_right().x() - horizontal_margin; - // if position.x() < left { + // let right = text_bounds.upper_right().x - horizontal_margin; + // if position.x < left { // scroll_delta.set_x(-scale_horizontal_mouse_autoscroll_delta( - // left - position.x(), + // left - position.x, // )) // } - // if position.x() > right { + // if position.x > right { // scroll_delta.set_x(scale_horizontal_mouse_autoscroll_delta( - // position.x() - right, + // position.x - right, // )) // } @@ -406,7 +407,7 @@ impl EditorElement { // position: point_for_position.previous_valid, // goal_column: point_for_position.exact_unclipped.column(), // scroll_position: (position_map.snapshot.scroll_position() + scroll_delta) - // .clamp(gpui::Point::zero(), position_map.scroll_max), + // .clamp(gpui::Point::::zero(), position_map.scroll_max), // }, // cx, // ); @@ -489,9 +490,9 @@ impl EditorElement { // }; // let scroll_position = position_map.snapshot.scroll_position(); - // let x = (scroll_position.x() * max_glyph_width - delta.x()) / max_glyph_width; - // let y = (scroll_position.y() * line_height - delta.y()) / line_height; - // let scroll_position = point(x, y).clamp(gpui::Point::zero(), position_map.scroll_max); + // let x = (scroll_position.x * max_glyph_width - delta.x) / max_glyph_width; + // let y = (scroll_position.y * line_height - delta.y) / line_height; + // let scroll_position = point(x, y).clamp(gpui::Point::::zero(), position_map.scroll_max); // editor.scroll(scroll_position, axis, cx); // true @@ -608,452 +609,476 @@ impl EditorElement { } } - // fn paint_gutter( - // &mut self, - // bounds: Bounds, - // visible_bounds: Bounds, - // layout: &mut LayoutState, - // editor: &mut Editor, - // cx: &mut ViewContext, - // ) { - // let line_height = layout.position_map.line_height; - - // let scroll_position = layout.position_map.snapshot.scroll_position(); - // let scroll_top = scroll_position.y() * line_height; - - // let show_gutter = matches!( - // settings::get::(cx).git.git_gutter, - // Some(GitGutterSetting::TrackedFiles) - // ); - - // if show_gutter { - // Self::paint_diff_hunks(bounds, layout, cx); - // } - - // for (ix, line) in layout.line_number_layouts.iter().enumerate() { - // if let Some(line) = line { - // let line_origin = bounds.origin() - // + point( - // bounds.width() - line.width() - layout.gutter_padding, - // ix as f32 * line_height - (scroll_top % line_height), - // ); - - // line.paint(line_origin, visible_bounds, line_height, cx); - // } - // } - - // for (ix, fold_indicator) in layout.fold_indicators.iter_mut().enumerate() { - // if let Some(indicator) = fold_indicator.as_mut() { - // let position = point( - // bounds.width() - layout.gutter_padding, - // ix as f32 * line_height - (scroll_top % line_height), - // ); - // let centering_offset = point( - // (layout.gutter_padding + layout.gutter_margin - indicator.size().x()) / 2., - // (line_height - indicator.size().y()) / 2., - // ); - - // let indicator_origin = bounds.origin() + position + centering_offset; - - // indicator.paint(indicator_origin, visible_bounds, editor, cx); - // } - // } - - // if let Some((row, indicator)) = layout.code_actions_indicator.as_mut() { - // let mut x = 0.; - // let mut y = *row as f32 * line_height - scroll_top; - // x += ((layout.gutter_padding + layout.gutter_margin) - indicator.size().x()) / 2.; - // y += (line_height - indicator.size().y()) / 2.; - // indicator.paint(bounds.origin() + point(x, y), visible_bounds, editor, cx); - // } - // } - - // fn paint_diff_hunks(bounds: Bounds, layout: &mut LayoutState, cx: &mut ViewContext) { - // let diff_style = &theme::current(cx).editor.diff.clone(); - // let line_height = layout.position_map.line_height; - - // let scroll_position = layout.position_map.snapshot.scroll_position(); - // let scroll_top = scroll_position.y() * line_height; - - // for hunk in &layout.display_hunks { - // let (display_row_range, status) = match hunk { - // //TODO: This rendering is entirely a horrible hack - // &DisplayDiffHunk::Folded { display_row: row } => { - // let start_y = row as f32 * line_height - scroll_top; - // let end_y = start_y + line_height; - - // let width = diff_style.removed_width_em * line_height; - // let highlight_origin = bounds.origin() + point(-width, start_y); - // let highlight_size = point(width * 2., end_y - start_y); - // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - - // cx.paint_quad(Quad { - // bounds: highlight_bounds, - // background: Some(diff_style.modified), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: (1. * line_height).into(), - // }); - - // continue; - // } - - // DisplayDiffHunk::Unfolded { - // display_row_range, - // status, - // } => (display_row_range, status), - // }; - - // let color = match status { - // DiffHunkStatus::Added => diff_style.inserted, - // DiffHunkStatus::Modified => diff_style.modified, - - // //TODO: This rendering is entirely a horrible hack - // DiffHunkStatus::Removed => { - // let row = display_row_range.start; + fn paint_gutter( + &mut self, + bounds: Bounds, + layout: &mut LayoutState, + editor: &mut Editor, + cx: &mut ViewContext, + ) { + let line_height = layout.position_map.line_height; - // let offset = line_height / 2.; - // let start_y = row as f32 * line_height - offset - scroll_top; - // let end_y = start_y + line_height; + let scroll_position = layout.position_map.snapshot.scroll_position(); + let scroll_top = scroll_position.y * line_height; - // let width = diff_style.removed_width_em * line_height; - // let highlight_origin = bounds.origin() + point(-width, start_y); - // let highlight_size = point(width * 2., end_y - start_y); - // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); + let show_gutter = matches!( + ProjectSettings::get_global(cx).git.git_gutter, + Some(GitGutterSetting::TrackedFiles) + ); - // cx.paint_quad(Quad { - // bounds: highlight_bounds, - // background: Some(diff_style.deleted), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: (1. * line_height).into(), - // }); + if show_gutter { + Self::paint_diff_hunks(bounds, layout, cx); + } - // continue; - // } - // }; + for (ix, line) in layout.line_number_layouts.iter().enumerate() { + if let Some(line) = line { + let line_origin = bounds.origin + + point( + bounds.size.width - line.width - layout.gutter_padding, + ix as f32 * line_height - (scroll_top % line_height), + ); - // let start_row = display_row_range.start; - // let end_row = display_row_range.end; + line.paint(line_origin, line_height, cx); + } + } - // let start_y = start_row as f32 * line_height - scroll_top; - // let end_y = end_row as f32 * line_height - scroll_top; + // todo!("fold indicators") + // for (ix, fold_indicator) in layout.fold_indicators.iter_mut().enumerate() { + // if let Some(indicator) = fold_indicator.as_mut() { + // let position = point( + // bounds.width() - layout.gutter_padding, + // ix as f32 * line_height - (scroll_top % line_height), + // ); + // let centering_offset = point( + // (layout.gutter_padding + layout.gutter_margin - indicator.size().x) / 2., + // (line_height - indicator.size().y) / 2., + // ); - // let width = diff_style.width_em * line_height; - // let highlight_origin = bounds.origin() + point(-width, start_y); - // let highlight_size = point(width * 2., end_y - start_y); - // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); + // let indicator_origin = bounds.origin + position + centering_offset; - // cx.paint_quad(Quad { - // bounds: highlight_bounds, - // background: Some(color), - // border: Border::new(0., Color::transparent_black()).into(), - // corner_radii: (diff_style.corner_radius * line_height).into(), - // }); - // } - // } + // indicator.paint(indicator_origin, visible_bounds, editor, cx); + // } + // } - // fn paint_text( - // &mut self, - // bounds: Bounds, - // visible_bounds: Bounds, - // layout: &mut LayoutState, - // editor: &mut Editor, - // cx: &mut ViewContext, - // ) { - // let style = &self.style; - // let scroll_position = layout.position_map.snapshot.scroll_position(); - // let start_row = layout.visible_display_row_range.start; - // let scroll_top = scroll_position.y() * layout.position_map.line_height; - // let max_glyph_width = layout.position_map.em_width; - // let scroll_left = scroll_position.x() * max_glyph_width; - // let content_origin = bounds.origin() + point(layout.gutter_margin, 0.); - // let line_end_overshoot = 0.15 * layout.position_map.line_height; - // let whitespace_setting = editor.buffer.read(cx).settings_at(0, cx).show_whitespaces; + // todo!("code actions indicator") + // if let Some((row, indicator)) = layout.code_actions_indicator.as_mut() { + // let mut x = 0.; + // let mut y = *row as f32 * line_height - scroll_top; + // x += ((layout.gutter_padding + layout.gutter_margin) - indicator.size().x) / 2.; + // y += (line_height - indicator.size().y) / 2.; + // indicator.paint(bounds.origin + point(x, y), visible_bounds, editor, cx); + // } + } - // cx.scene().push_layer(Some(bounds)); + fn paint_diff_hunks( + bounds: Bounds, + layout: &mut LayoutState, + cx: &mut ViewContext, + ) { + // todo!() + // let diff_style = &theme::current(cx).editor.diff.clone(); + // let line_height = layout.position_map.line_height; + + // let scroll_position = layout.position_map.snapshot.scroll_position(); + // let scroll_top = scroll_position.y * line_height; + + // for hunk in &layout.display_hunks { + // let (display_row_range, status) = match hunk { + // //TODO: This rendering is entirely a horrible hack + // &DisplayDiffHunk::Folded { display_row: row } => { + // let start_y = row as f32 * line_height - scroll_top; + // let end_y = start_y + line_height; + + // let width = diff_style.removed_width_em * line_height; + // let highlight_origin = bounds.origin + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); + // let highlight_bounds = Bounds::::new(highlight_origin, highlight_size); + + // cx.paint_quad(Quad { + // bounds: highlight_bounds, + // background: Some(diff_style.modified), + // border: Border::new(0., Color::transparent_black()).into(), + // corner_radii: (1. * line_height).into(), + // }); + + // continue; + // } - // cx.scene().push_cursor_region(CursorRegion { - // bounds, - // style: if !editor.link_go_to_definition_state.definitions.is_empty() { - // CursorStyle::PointingHand - // } else { - // CursorStyle::IBeam - // }, - // }); + // DisplayDiffHunk::Unfolded { + // display_row_range, + // status, + // } => (display_row_range, status), + // }; + + // let color = match status { + // DiffHunkStatus::Added => diff_style.inserted, + // DiffHunkStatus::Modified => diff_style.modified, + + // //TODO: This rendering is entirely a horrible hack + // DiffHunkStatus::Removed => { + // let row = display_row_range.start; + + // let offset = line_height / 2.; + // let start_y = row as f32 * line_height - offset - scroll_top; + // let end_y = start_y + line_height; + + // let width = diff_style.removed_width_em * line_height; + // let highlight_origin = bounds.origin + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); + // let highlight_bounds = Bounds::::new(highlight_origin, highlight_size); + + // cx.paint_quad(Quad { + // bounds: highlight_bounds, + // background: Some(diff_style.deleted), + // border: Border::new(0., Color::transparent_black()).into(), + // corner_radii: (1. * line_height).into(), + // }); + + // continue; + // } + // }; - // let fold_corner_radius = - // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; - // for (id, range, color) in layout.fold_ranges.iter() { - // self.paint_highlighted_range( - // range.clone(), - // *color, - // fold_corner_radius, - // fold_corner_radius * 2., - // layout, - // content_origin, - // scroll_top, - // scroll_left, - // bounds, - // cx, - // ); + // let start_row = display_row_range.start; + // let end_row = display_row_range.end; - // for bound in range_to_bounds( - // &range, - // content_origin, - // scroll_left, - // scroll_top, - // &layout.visible_display_row_range, - // line_end_overshoot, - // &layout.position_map, - // ) { - // cx.scene().push_cursor_region(CursorRegion { - // bounds: bound, - // style: CursorStyle::PointingHand, - // }); - - // let display_row = range.start.row(); - - // let buffer_row = DisplayPoint::new(display_row, 0) - // .to_point(&layout.position_map.snapshot.display_snapshot) - // .row; - - // let view_id = cx.view_id(); - // cx.scene().push_mouse_region( - // MouseRegion::new::(view_id, *id as usize, bound) - // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { - // editor.unfold_at(&UnfoldAt { buffer_row }, cx) - // }) - // .with_notify_on_hover(true) - // .with_notify_on_click(true), - // ) - // } - // } + // let start_y = start_row as f32 * line_height - scroll_top; + // let end_y = end_row as f32 * line_height - scroll_top; - // for (range, color) in &layout.highlighted_ranges { - // self.paint_highlighted_range( - // range.clone(), - // *color, - // 0., - // line_end_overshoot, - // layout, - // content_origin, - // scroll_top, - // scroll_left, - // bounds, - // cx, - // ); - // } + // let width = diff_style.width_em * line_height; + // let highlight_origin = bounds.origin + point(-width, start_y); + // let highlight_size = point(width * 2., end_y - start_y); + // let highlight_bounds = Bounds::::new(highlight_origin, highlight_size); - // let mut cursors = SmallVec::<[Cursor; 32]>::new(); - // let corner_radius = 0.15 * layout.position_map.line_height; - // let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); - - // for (selection_style, selections) in &layout.selections { - // for selection in selections { - // self.paint_highlighted_range( - // selection.range.clone(), - // selection_style.selection, - // corner_radius, - // corner_radius * 2., - // layout, - // content_origin, - // scroll_top, - // scroll_left, - // bounds, - // cx, - // ); - - // if selection.is_local && !selection.range.is_empty() { - // invisible_display_ranges.push(selection.range.clone()); - // } - // if !selection.is_local || editor.show_local_cursors(cx) { - // let cursor_position = selection.head; - // if layout - // .visible_display_row_range - // .contains(&cursor_position.row()) - // { - // let cursor_row_layout = &layout.position_map.line_layouts - // [(cursor_position.row() - start_row) as usize] - // .line; - // let cursor_column = cursor_position.column() as usize; - - // let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); - // let mut block_width = - // cursor_row_layout.x_for_index(cursor_column + 1) - cursor_character_x; - // if block_width == 0.0 { - // block_width = layout.position_map.em_width; - // } - // let block_text = if let CursorShape::Block = selection.cursor_shape { - // layout - // .position_map - // .snapshot - // .chars_at(cursor_position) - // .next() - // .and_then(|(character, _)| { - // let font_id = - // cursor_row_layout.font_for_index(cursor_column)?; - // let text = character.to_string(); - - // Some(cx.text_layout_cache().layout_str( - // &text, - // cursor_row_layout.font_size(), - // &[( - // text.chars().count(), - // RunStyle { - // font_id, - // color: style.background, - // underline: Default::default(), - // }, - // )], - // )) - // }) - // } else { - // None - // }; + // cx.paint_quad(Quad { + // bounds: highlight_bounds, + // background: Some(color), + // border: Border::new(0., Color::transparent_black()).into(), + // corner_radii: (diff_style.corner_radius * line_height).into(), + // }); + // } + } - // let x = cursor_character_x - scroll_left; - // let y = cursor_position.row() as f32 * layout.position_map.line_height - // - scroll_top; - // if selection.is_newest { - // editor.pixel_position_of_newest_cursor = Some(point( - // bounds.origin.x + x + block_width / 2., - // bounds.origin.y + y + layout.position_map.line_height / 2., - // )); - // } - // cursors.push(Cursor { - // color: selection_style.cursor, - // block_width, - // origin: point(x, y), - // line_height: layout.position_map.line_height, - // shape: selection.cursor_shape, - // block_text, - // }); - // } - // } - // } - // } + fn paint_text( + &mut self, + bounds: Bounds, + layout: &mut LayoutState, + editor: &mut Editor, + cx: &mut ViewContext, + ) { + let style = &self.style; + let scroll_position = layout.position_map.snapshot.scroll_position(); + let start_row = layout.visible_display_row_range.start; + let scroll_top = scroll_position.y * layout.position_map.line_height; + let max_glyph_width = layout.position_map.em_width; + let scroll_left = scroll_position.x * max_glyph_width; + let content_origin = bounds.origin + point(layout.gutter_margin, Pixels::ZERO); + let line_end_overshoot = 0.15 * layout.position_map.line_height; + let whitespace_setting = editor.buffer.read(cx).settings_at(0, cx).show_whitespaces; - // if let Some(visible_text_bounds) = bounds.intersection(visible_bounds) { - // for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { - // let row = start_row + ix as u32; - // line_with_invisibles.draw( - // layout, - // row, - // scroll_top, - // content_origin, - // scroll_left, - // visible_text_bounds, - // whitespace_setting, - // &invisible_display_ranges, - // visible_bounds, - // cx, - // ) - // } - // } + cx.with_content_mask(ContentMask { bounds }, |cx| { + // todo!("cursor region") + // cx.scene().push_cursor_region(CursorRegion { + // bounds, + // style: if !editor.link_go_to_definition_state.definitions.is_empty { + // CursorStyle::PointingHand + // } else { + // CursorStyle::IBeam + // }, + // }); + + // todo!("fold ranges") + // let fold_corner_radius = + // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; + // for (id, range, color) in layout.fold_ranges.iter() { + // self.paint_highlighted_range( + // range.clone(), + // *color, + // fold_corner_radius, + // fold_corner_radius * 2., + // layout, + // content_origin, + // scroll_top, + // scroll_left, + // bounds, + // cx, + // ); + + // for bound in range_to_bounds( + // &range, + // content_origin, + // scroll_left, + // scroll_top, + // &layout.visible_display_row_range, + // line_end_overshoot, + // &layout.position_map, + // ) { + // cx.scene().push_cursor_region(CursorRegion { + // bounds: bound, + // style: CursorStyle::PointingHand, + // }); + + // let display_row = range.start.row(); + + // let buffer_row = DisplayPoint::new(display_row, 0) + // .to_point(&layout.position_map.snapshot.display_snapshot) + // .row; + + // let view_id = cx.view_id(); + // cx.scene().push_mouse_region( + // MouseRegion::new::(view_id, *id as usize, bound) + // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { + // editor.unfold_at(&UnfoldAt { buffer_row }, cx) + // }) + // .with_notify_on_hover(true) + // .with_notify_on_click(true), + // ) + // } + // } + + for (range, color) in &layout.highlighted_ranges { + self.paint_highlighted_range( + range.clone(), + *color, + Pixels::ZERO, + line_end_overshoot, + layout, + content_origin, + scroll_top, + scroll_left, + bounds, + cx, + ); + } - // cx.scene().push_layer(Some(bounds)); - // for cursor in cursors { - // cursor.paint(content_origin, cx); - // } - // cx.scene().pop_layer(); - - // if let Some((position, context_menu)) = layout.context_menu.as_mut() { - // cx.scene().push_stacking_context(None, None); - // let cursor_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; - // let mut list_origin = content_origin + point(x, y); - // let list_width = context_menu.size().x(); - // let list_height = context_menu.size().y(); - - // // Snap the right edge of the list to the right edge of the window if - // // its horizontal bounds overflow. - // if list_origin.x() + list_width > cx.window_size().x() { - // list_origin.set_x((cx.window_size().x() - list_width).max(0.)); - // } + let mut cursors = SmallVec::<[Cursor; 32]>::new(); + let corner_radius = 0.15 * layout.position_map.line_height; + let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); + + for (selection_style, selections) in &layout.selections { + for selection in selections { + self.paint_highlighted_range( + selection.range.clone(), + selection_style.selection, + corner_radius, + corner_radius * 2., + layout, + content_origin, + scroll_top, + scroll_left, + bounds, + cx, + ); - // if list_origin.y() + list_height > bounds.max_y() { - // list_origin.set_y(list_origin.y() - layout.position_map.line_height - list_height); - // } + if selection.is_local && !selection.range.is_empty() { + invisible_display_ranges.push(selection.range.clone()); + } + if !selection.is_local || editor.show_local_cursors(cx) { + let cursor_position = selection.head; + if layout + .visible_display_row_range + .contains(&cursor_position.row()) + { + let cursor_row_layout = &layout.position_map.line_layouts + [(cursor_position.row() - start_row) as usize] + .line; + let cursor_column = cursor_position.column() as usize; + + let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); + let mut block_width = cursor_row_layout.x_for_index(cursor_column + 1) + - cursor_character_x; + if block_width == Pixels::ZERO { + block_width = layout.position_map.em_width; + } + let block_text = if let CursorShape::Block = selection.cursor_shape { + layout + .position_map + .snapshot + .chars_at(cursor_position) + .next() + .and_then(|(character, _)| { + let font_id = + cursor_row_layout.font_for_index(cursor_column)?; + let text = character.to_string(); + + cx.text_system().layout_text( + &text, + cursor_row_layout.font_size, + &[TextRun { + len: text.len(), + font: todo!(), + color: todo!(), + underline: todo!(), + }], + None, + ); + Some(cx.text_layout_cache().layout_str( + &text, + cursor_row_layout.font_size, + &[( + text.chars().count(), + RunStyle { + font_id, + color: style.background, + underline: Default::default(), + }, + )], + )) + }) + } else { + None + }; + + let x = cursor_character_x - scroll_left; + let y = cursor_position.row() as f32 * layout.position_map.line_height + - scroll_top; + if selection.is_newest { + editor.pixel_position_of_newest_cursor = Some(point( + bounds.origin.x + x + block_width / 2., + bounds.origin.y + y + layout.position_map.line_height / 2., + )); + } + cursors.push(Cursor { + color: selection_style.cursor, + block_width, + origin: point(x, y), + line_height: layout.position_map.line_height, + shape: selection.cursor_shape, + block_text, + }); + } + } + } + } - // context_menu.paint( - // list_origin, - // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor - // editor, - // cx, - // ); + for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { + let row = start_row + ix as u32; + line_with_invisibles.draw( + layout, + row, + scroll_top, + content_origin, + scroll_left, + visible_text_bounds, + whitespace_setting, + &invisible_display_ranges, + visible_bounds, + cx, + ) + } - // cx.scene().pop_stacking_context(); - // } + cx.scene().push_layer(Some(bounds)); + for cursor in cursors { + cursor.paint(content_origin, cx); + } + cx.scene().pop_layer(); + + if let Some((position, context_menu)) = layout.context_menu.as_mut() { + cx.scene().push_stacking_context(None, None); + let cursor_row_layout = + &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; + let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; + let mut list_origin = content_origin + point(x, y); + let list_width = context_menu.size().x; + let list_height = context_menu.size().y; + + // Snap the right edge of the list to the right edge of the window if + // its horizontal bounds overflow. + if list_origin.x + list_width > cx.window_size().x { + list_origin.set_x((cx.window_size().x - list_width).max(0.)); + } - // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { - // cx.scene().push_stacking_context(None, None); - - // // This is safe because we check on layout whether the required row is available - // let hovered_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - - // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover - // // height. This is the size we will use to decide whether to render popovers above or below - // // the hovered line. - // let first_size = hover_popovers[0].size(); - // let height_to_reserve = first_size.y() - // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; - - // // Compute Hovered Point - // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; - // let hovered_point = content_origin + point(x, y); - - // if hovered_point.y() - height_to_reserve > 0.0 { - // // There is enough space above. Render popovers above the hovered point - // let mut current_y = hovered_point.y(); - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x(), current_y - size.y()); - - // let x_out_of_bounds = bounds.max_x() - (popover_origin.x() + size.x()); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x() + x_out_of_bounds); - // } + if list_origin.y + list_height > bounds.max_y { + list_origin + .set_y(list_origin.y - layout.position_map.line_height - list_height); + } - // hover_popover.paint( - // popover_origin, - // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor - // editor, - // cx, - // ); + context_menu.paint( + list_origin, + Bounds::::from_points( + gpui::Point::::zero(), + point(f32::MAX, f32::MAX), + ), // Let content bleed outside of editor + editor, + cx, + ); - // current_y = popover_origin.y() - HOVER_POPOVER_GAP; - // } - // } else { - // // There is not enough space above. Render popovers below the hovered point - // let mut current_y = hovered_point.y() + layout.position_map.line_height; - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x(), current_y); - - // let x_out_of_bounds = bounds.max_x() - (popover_origin.x() + size.x()); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x() + x_out_of_bounds); - // } + cx.scene().pop_stacking_context(); + } - // hover_popover.paint( - // popover_origin, - // Bounds::from_points(gpui::Point::zero(), point(f32::MAX, f32::MAX)), // Let content bleed outside of editor - // editor, - // cx, - // ); + if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { + cx.scene().push_stacking_context(None, None); + + // This is safe because we check on layout whether the required row is available + let hovered_row_layout = + &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + + // Minimum required size: Take the first popover, and add 1.5 times the minimum popover + // height. This is the size we will use to decide whether to render popovers above or below + // the hovered line. + let first_size = hover_popovers[0].size(); + let height_to_reserve = first_size.y + + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; + + // Compute Hovered Point + let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; + let y = position.row() as f32 * layout.position_map.line_height - scroll_top; + let hovered_point = content_origin + point(x, y); + + if hovered_point.y - height_to_reserve > 0.0 { + // There is enough space above. Render popovers above the hovered point + let mut current_y = hovered_point.y; + for hover_popover in hover_popovers { + let size = hover_popover.size(); + let mut popover_origin = point(hovered_point.x, current_y - size.y); + + let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + if x_out_of_bounds < 0.0 { + popover_origin.set_x(popover_origin.x + x_out_of_bounds); + } - // current_y = popover_origin.y() + size.y() + HOVER_POPOVER_GAP; - // } - // } + hover_popover.paint( + popover_origin, + Bounds::::from_points( + gpui::Point::::zero(), + point(f32::MAX, f32::MAX), + ), // Let content bleed outside of editor + editor, + cx, + ); + + current_y = popover_origin.y - HOVER_POPOVER_GAP; + } + } else { + // There is not enough space above. Render popovers below the hovered point + let mut current_y = hovered_point.y + layout.position_map.line_height; + for hover_popover in hover_popovers { + let size = hover_popover.size(); + let mut popover_origin = point(hovered_point.x, current_y); + + let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + if x_out_of_bounds < 0.0 { + popover_origin.set_x(popover_origin.x + x_out_of_bounds); + } - // cx.scene().pop_stacking_context(); - // } + hover_popover.paint( + popover_origin, + Bounds::::from_points( + gpui::Point::::zero(), + point(f32::MAX, f32::MAX), + ), // Let content bleed outside of editor + editor, + cx, + ); + + current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; + } + } - // cx.scene().pop_layer(); - // } + cx.scene().pop_stacking_context(); + } + }) + } fn scrollbar_left(&self, bounds: &Bounds) -> Pixels { bounds.upper_right().x - self.style.scrollbar_width @@ -1073,9 +1098,9 @@ impl EditorElement { // let style = &self.style.theme.scrollbar; - // let top = bounds.min_y(); - // let bottom = bounds.max_y(); - // let right = bounds.max_x(); + // let top = bounds.min_y; + // let bottom = bounds.max_y; + // let right = bounds.max_x; // let left = self.scrollbar_left(&bounds); // let row_range = &layout.scrollbar_row_range; // let max_row = layout.max_row as f32 + (row_range.end - row_range.start); @@ -1097,8 +1122,8 @@ impl EditorElement { // let thumb_top = y_for_row(row_range.start) - first_row_y_offset; // let thumb_bottom = y_for_row(row_range.end) + first_row_y_offset; - // let track_bounds = Bounds::from_points(point(left, top), point(right, bottom)); - // let thumb_bounds = Bounds::from_points(point(left, thumb_top), point(right, thumb_bottom)); + // let track_bounds = Bounds::::from_points(point(left, top), point(right, bottom)); + // let thumb_bounds = Bounds::::from_points(point(left, thumb_top), point(right, thumb_bottom)); // if layout.show_scrollbars { // cx.paint_quad(Quad { @@ -1112,7 +1137,7 @@ impl EditorElement { // let scrollbar_theme = &theme.editor.scrollbar; // if layout.is_singleton && scrollbar_settings.selections { // let start_anchor = Anchor::min(); - // let end_anchor = Anchor::max(); + // let end_anchor = Anchor::max; // let color = scrollbar_theme.selections; // let border = Border { // width: 1., @@ -1129,7 +1154,7 @@ impl EditorElement { // if end_y - start_y < 1. { // end_y = start_y + 1.; // } - // let bounds = Bounds::from_points(point(left, start_y), point(right, end_y)); + // let bounds = Bounds::::from_points(point(left, start_y), point(right, end_y)); // cx.paint_quad(Quad { // bounds, @@ -1173,7 +1198,7 @@ impl EditorElement { // if end_y - start_y < 1. { // end_y = start_y + 1.; // } - // let bounds = Bounds::from_points(point(left, start_y), point(right, end_y)); + // let bounds = Bounds::::from_points(point(left, start_y), point(right, end_y)); // let color = match hunk.status() { // DiffHunkStatus::Added => diff_style.inserted, @@ -1223,7 +1248,7 @@ impl EditorElement { // .on_down(MouseButton::Left, { // let row_range = row_range.clone(); // move |event, editor: &mut Editor, cx| { - // let y = event.position.y(); + // let y = event.position.y; // if y < thumb_top || thumb_bottom < y { // let center_row = ((y - top) * max_row as f32 / height).round() as u32; // let top_row = center_row @@ -1242,12 +1267,12 @@ impl EditorElement { // return; // } - // let y = event.prev_mouse_position.y(); - // let new_y = event.position.y(); + // let y = event.prev_mouse_position.y; + // let new_y = event.position.y; // if thumb_top < y && y < thumb_bottom { // let mut position = editor.scroll_position(cx); - // position.set_y(position.y() + (new_y - y) * (max_row as f32) / height); - // if position.y() < 0.0 { + // position.set_y(position.y + (new_y - y) * (max_row as f32) / height); + // if position.y < 0.0 { // position.set_y(0.); // } // editor.set_scroll_position(position, cx); @@ -1257,65 +1282,65 @@ impl EditorElement { // ); // } - // #[allow(clippy::too_many_arguments)] - // fn paint_highlighted_range( - // &self, - // range: Range, - // color: Color, - // corner_radius: f32, - // line_end_overshoot: f32, - // layout: &LayoutState, - // content_origin: gpui::Point, - // scroll_top: f32, - // scroll_left: f32, - // bounds: Bounds, - // cx: &mut ViewContext, - // ) { - // let start_row = layout.visible_display_row_range.start; - // let end_row = layout.visible_display_row_range.end; - // if range.start != range.end { - // let row_range = if range.end.column() == 0 { - // cmp::max(range.start.row(), start_row)..cmp::min(range.end.row(), end_row) - // } else { - // cmp::max(range.start.row(), start_row)..cmp::min(range.end.row() + 1, end_row) - // }; + #[allow(clippy::too_many_arguments)] + fn paint_highlighted_range( + &self, + range: Range, + color: Hsla, + corner_radius: Pixels, + line_end_overshoot: Pixels, + layout: &LayoutState, + content_origin: gpui::Point, + scroll_top: Pixels, + scroll_left: Pixels, + bounds: Bounds, + cx: &mut ViewContext, + ) { + let start_row = layout.visible_display_row_range.start; + let end_row = layout.visible_display_row_range.end; + if range.start != range.end { + let row_range = if range.end.column() == 0 { + cmp::max(range.start.row(), start_row)..cmp::min(range.end.row(), end_row) + } else { + cmp::max(range.start.row(), start_row)..cmp::min(range.end.row() + 1, end_row) + }; - // let highlighted_range = HighlightedRange { - // color, - // line_height: layout.position_map.line_height, - // corner_radius, - // start_y: content_origin.y() - // + row_range.start as f32 * layout.position_map.line_height - // - scroll_top, - // lines: row_range - // .into_iter() - // .map(|row| { - // let line_layout = - // &layout.position_map.line_layouts[(row - start_row) as usize].line; - // HighlightedRangeLine { - // start_x: if row == range.start.row() { - // content_origin.x() - // + line_layout.x_for_index(range.start.column() as usize) - // - scroll_left - // } else { - // content_origin.x() - scroll_left - // }, - // end_x: if row == range.end.row() { - // content_origin.x() - // + line_layout.x_for_index(range.end.column() as usize) - // - scroll_left - // } else { - // content_origin.x() + line_layout.width() + line_end_overshoot - // - scroll_left - // }, - // } - // }) - // .collect(), - // }; + let highlighted_range = HighlightedRange { + color, + line_height: layout.position_map.line_height, + corner_radius, + start_y: content_origin.y + + row_range.start as f32 * layout.position_map.line_height + - scroll_top, + lines: row_range + .into_iter() + .map(|row| { + let line_layout = + &layout.position_map.line_layouts[(row - start_row) as usize].line; + HighlightedRangeLine { + start_x: if row == range.start.row() { + content_origin.x + + line_layout.x_for_index(range.start.column() as usize) + - scroll_left + } else { + content_origin.x - scroll_left + }, + end_x: if row == range.end.row() { + content_origin.x + + line_layout.x_for_index(range.end.column() as usize) + - scroll_left + } else { + content_origin.x + line_layout.width + line_end_overshoot + - scroll_left + }, + } + }) + .collect(), + }; - // highlighted_range.paint(bounds, cx); - // } - // } + highlighted_range.paint(bounds, cx); + } + } // fn paint_blocks( // &mut self, @@ -1326,11 +1351,11 @@ impl EditorElement { // cx: &mut ViewContext, // ) { // let scroll_position = layout.position_map.snapshot.scroll_position(); - // let scroll_left = scroll_position.x() * layout.position_map.em_width; - // let scroll_top = scroll_position.y() * layout.position_map.line_height; + // let scroll_left = scroll_position.x * layout.position_map.em_width; + // let scroll_top = scroll_position.y * layout.position_map.line_height; // for block in &mut layout.blocks { - // let mut origin = bounds.origin() + // let mut origin = bounds.origin // + point( // 0., // block.row as f32 * layout.position_map.line_height - scroll_top, @@ -1530,7 +1555,7 @@ impl EditorElement { } // When the editor is empty and unfocused, then show the placeholder. - if snapshot.is_empty() { + if snapshot.is_empty { let font_size = self.style.text.font_size * cx.rem_size(); let placeholder_color = cx.theme().styles.colors.text_placeholder; let placeholder_text = snapshot.placeholder_text(); @@ -1583,7 +1608,7 @@ impl EditorElement { bounds: Bounds, ) -> LayoutState { // let mut size = constraint.max; - // if size.x().is_infinite() { + // if size.x.is_infinite() { // unimplemented!("we don't yet handle an infinite width constraint on buffer elements"); // } @@ -1615,9 +1640,9 @@ impl EditorElement { gutter_width = self.max_line_number_width(&snapshot, cx) + gutter_padding * 2.0; gutter_margin = -descent; } else { - gutter_padding = px(0.0); - gutter_width = px(0.0); - gutter_margin = px(0.0); + gutter_padding = Pixels::ZERO; + gutter_width = Pixels::ZERO; + gutter_margin = Pixels::ZERO; }; let text_width = bounds.size.width - gutter_width; @@ -1662,7 +1687,7 @@ impl EditorElement { // size.set_y(line_height.max(constraint.min_along(Axis::Vertical))) } // todo!() - // else if size.y().is_infinite() { + // else if size.y.is_infinite() { // // size.set_y(scroll_height); // } // @@ -1691,7 +1716,7 @@ impl EditorElement { .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) }; let end_anchor = if end_row > max_row { - Anchor::max() + Anchor::max } else { snapshot .buffer_snapshot @@ -1822,7 +1847,7 @@ impl EditorElement { (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) || // Selections - (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) + (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty) // Scrollmanager || editor.scroll_manager.scrollbars_visible() } @@ -1890,7 +1915,7 @@ impl EditorElement { // let (scroll_width, blocks) = self.layout_blocks( // start_row..end_row, // &snapshot, - // size.x(), + // size.x, // scroll_width, // gutter_padding, // gutter_width, @@ -1973,10 +1998,10 @@ impl EditorElement { // if let Some((_, context_menu)) = context_menu.as_mut() { // context_menu.layout( // SizeConstraint { - // min: gpui::Point::zero(), + // min: gpui::Point::::zero(), // max: point( - // cx.window_size().x() * 0.7, - // (12. * line_height).min((size.y() - line_height) / 2.), + // cx.window_size().x * 0.7, + // (12. * line_height).min((size.y - line_height) / 2.), // ), // }, // editor, @@ -2015,13 +2040,13 @@ impl EditorElement { // for hover_popover in hover_popovers.iter_mut() { // hover_popover.layout( // SizeConstraint { - // min: gpui::Point::zero(), + // min: gpui::Point::::zero(), // max: point( // (120. * em_width) // Default size - // .min(size.x() / 2.) // Shrink to half of the editor width + // .min(size.x / 2.) // Shrink to half of the editor width // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters // (16. * line_height) // Default size - // .min(size.y() / 2.) // Shrink to half of the editor height + // .min(size.y / 2.) // Shrink to half of the editor height // .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines // ), // }, @@ -2121,7 +2146,7 @@ impl EditorElement { // cx: &mut ViewContext, // ) -> (f32, Vec) { // let mut block_id = 0; - // let scroll_x = snapshot.scroll_anchor.offset.x(); + // let scroll_x = snapshot.scroll_anchor.offset.x; // let (fixed_blocks, non_fixed_blocks) = snapshot // .blocks_in_range(rows.clone()) // .partition::, _>(|(_, block)| match block { @@ -2233,9 +2258,9 @@ impl EditorElement { // let mut parent_path = None; // // Can't use .and_then() because `.file_name()` and `.parent()` return references :( // if let Some(path) = path { - // filename = path.file_name().map(|f| f.to_string_lossy().to_string()); + // filename = path.file_name().map(|f| f.to_string_lossy.to_string()); // parent_path = - // path.parent().map(|p| p.to_string_lossy().to_string() + "/"); + // path.parent().map(|p| p.to_string_lossy.to_string() + "/"); // } // Flex::row() @@ -2277,7 +2302,7 @@ impl EditorElement { // element.layout( // SizeConstraint { - // min: gpui::Point::zero(), + // min: gpui::Point::::zero(), // max: point(width, block.height() as f32 * line_height), // }, // editor, @@ -2291,7 +2316,7 @@ impl EditorElement { // for (row, block) in fixed_blocks { // let element = render_block(block, f32::INFINITY, block_id); // block_id += 1; - // fixed_block_max_width = fixed_block_max_width.max(element.size().x() + em_width); + // fixed_block_max_width = fixed_block_max_width.max(element.size().x + em_width); // blocks.push(BlockLayout { // row, // element, @@ -2375,7 +2400,7 @@ impl LineWithInvisibles { } } - if !line_chunk.is_empty() && !line_exceeded_max_len { + if !line_chunk.is_empty && !line_exceeded_max_len { let text_style = if let Some(style) = highlighted_chunk.style { text_style .clone() @@ -2574,6 +2599,10 @@ impl Element for EditorElement { }; self.paint_background(gutter_bounds, text_bounds, &layout, cx); + if layout.gutter_size.width > Pixels::ZERO { + self.paint_gutter(gutter_bounds, layout, editor, cx); + } + self.paint_text(text_bounds, layout, editor, cx); }); } } @@ -2589,7 +2618,7 @@ impl Element for EditorElement { // cx: &mut ViewContext, // ) -> (gpui::Point, Self::LayoutState) { // let mut size = constraint.max; -// if size.x().is_infinite() { +// if size.x.is_infinite() { // unimplemented!("we don't yet handle an infinite width constraint on buffer elements"); // } @@ -2612,14 +2641,14 @@ impl Element for EditorElement { // gutter_margin = 0.0; // }; -// let text_width = size.x() - gutter_width; +// let text_width = size.x - gutter_width; // let em_width = style.text.em_width(cx.font_cache()); // let em_advance = style.text.em_advance(cx.font_cache()); // let overscroll = point(em_width, 0.); // let snapshot = { -// editor.set_visible_line_count(size.y() / line_height, cx); +// editor.set_visible_line_count(size.y / line_height, cx); -// let editor_width = text_width - gutter_margin - overscroll.x() - em_width; +// let editor_width = text_width - gutter_margin - overscroll.x - em_width; // let wrap_width = match editor.soft_wrap_mode(cx) { // SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance, // SoftWrap::EditorWidth => editor_width, @@ -2650,25 +2679,25 @@ impl Element for EditorElement { // ) // } else if let EditorMode::SingleLine = snapshot.mode { // size.set_y(line_height.max(constraint.min_along(Axis::Vertical))) -// } else if size.y().is_infinite() { +// } else if size.y.is_infinite() { // size.set_y(scroll_height); // } -// let gutter_size = point(gutter_width, size.y()); -// let text_size = point(text_width, size.y()); +// let gutter_size = point(gutter_width, size.y); +// let text_size = point(text_width, size.y); -// let autoscroll_horizontally = editor.autoscroll_vertically(size.y(), line_height, cx); +// let autoscroll_horizontally = editor.autoscroll_vertically(size.y, line_height, cx); // let mut snapshot = editor.snapshot(cx); // let scroll_position = snapshot.scroll_position(); // // The scroll position is a fractional point, the whole number of which represents // // the top of the window in terms of display rows. -// let start_row = scroll_position.y() as u32; -// let height_in_lines = size.y() / line_height; +// let start_row = scroll_position.y as u32; +// let height_in_lines = size.y / line_height; // let max_row = snapshot.max_point().row(); // // Add 1 to ensure selections bleed off screen // let end_row = 1 + cmp::min( -// (scroll_position.y() + height_in_lines).ceil() as u32, +// (scroll_position.y + height_in_lines).ceil() as u32, // max_row, // ); @@ -2680,7 +2709,7 @@ impl Element for EditorElement { // .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) // }; // let end_anchor = if end_row > max_row { -// Anchor::max() +// Anchor::max // } else { // snapshot // .buffer_snapshot @@ -2808,7 +2837,7 @@ impl Element for EditorElement { // (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) // || // // Selections -// (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) +// (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty) // // Scrollmanager // || editor.scroll_manager.scrollbars_visible() // } @@ -2856,7 +2885,7 @@ impl Element for EditorElement { // let display_hunks = self.layout_git_gutters(start_row..end_row, &snapshot); -// let scrollbar_row_range = scroll_position.y()..(scroll_position.y() + height_in_lines); +// let scrollbar_row_range = scroll_position.y..(scroll_position.y + height_in_lines); // let mut max_visible_line_width = 0.0; // let line_layouts = @@ -2875,12 +2904,12 @@ impl Element for EditorElement { // cx.text_layout_cache(), // ) // .width(); -// let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.x(); +// let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.x; // let em_width = style.text.em_width(cx.font_cache()); // let (scroll_width, blocks) = self.layout_blocks( // start_row..end_row, // &snapshot, -// size.x(), +// size.x, // scroll_width, // gutter_padding, // gutter_width, @@ -2894,16 +2923,16 @@ impl Element for EditorElement { // ); // let scroll_max = point( -// ((scroll_width - text_size.x()) / em_width).max(0.0), +// ((scroll_width - text_size.x) / em_width).max(0.0), // max_row as f32, // ); -// let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x()); +// let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x); // let autoscrolled = if autoscroll_horizontally { // editor.autoscroll_horizontally( // start_row, -// text_size.x(), +// text_size.x, // scroll_width, // em_width, // &line_layouts, @@ -2961,10 +2990,10 @@ impl Element for EditorElement { // if let Some((_, context_menu)) = context_menu.as_mut() { // context_menu.layout( // SizeConstraint { -// min: gpui::Point::zero(), +// min: gpui::Point::::zero(), // max: point( -// cx.window_size().x() * 0.7, -// (12. * line_height).min((size.y() - line_height) / 2.), +// cx.window_size().x * 0.7, +// (12. * line_height).min((size.y - line_height) / 2.), // ), // }, // editor, @@ -3000,13 +3029,13 @@ impl Element for EditorElement { // for hover_popover in hover_popovers.iter_mut() { // hover_popover.layout( // SizeConstraint { -// min: gpui::Point::zero(), +// min: gpui::Point::::zero(), // max: point( // (120. * em_width) // Default size -// .min(size.x() / 2.) // Shrink to half of the editor width +// .min(size.x / 2.) // Shrink to half of the editor width // .max(MIN_POPOVER_CHARACTER_WIDTH * em_width), // Apply minimum width of 20 characters // (16. * line_height) // Default size -// .min(size.y() / 2.) // Shrink to half of the editor height +// .min(size.y / 2.) // Shrink to half of the editor height // .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines // ), // }, @@ -3083,9 +3112,9 @@ impl Element for EditorElement { // let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default(); // cx.scene().push_layer(Some(visible_bounds)); -// let gutter_bounds = Bounds::new(bounds.origin(), layout.gutter_size); -// let text_bounds = Bounds::new( -// bounds.origin() + point(layout.gutter_size.x(), 0.0), +// let gutter_bounds = Bounds::::new(bounds.origin, layout.gutter_size); +// let text_bounds = Bounds::::new( +// bounds.origin + point(layout.gutter_size.x, 0.0), // layout.text_size, // ); @@ -3100,13 +3129,13 @@ impl Element for EditorElement { // ); // self.paint_background(gutter_bounds, text_bounds, layout, cx); -// if layout.gutter_size.x() > 0. { +// if layout.gutter_size.x > 0. { // self.paint_gutter(gutter_bounds, visible_bounds, layout, editor, cx); // } // self.paint_text(text_bounds, visible_bounds, layout, editor, cx); // cx.scene().push_layer(Some(bounds)); -// if !layout.blocks.is_empty() { +// if !layout.blocks.is_empty { // self.paint_blocks(bounds, visible_bounds, layout, editor, cx); // } // self.paint_scrollbar(bounds, layout, &editor, cx); @@ -3124,15 +3153,15 @@ impl Element for EditorElement { // _: &Editor, // _: &ViewContext, // ) -> Option> { -// let text_bounds = Bounds::new( -// bounds.origin() + point(layout.gutter_size.x(), 0.0), +// let text_bounds = Bounds::::new( +// bounds.origin + point(layout.gutter_size.x, 0.0), // layout.text_size, // ); -// let content_origin = text_bounds.origin() + point(layout.gutter_margin, 0.); +// let content_origin = text_bounds.origin + point(layout.gutter_margin, 0.); // let scroll_position = layout.position_map.snapshot.scroll_position(); -// let start_row = scroll_position.y() as u32; -// let scroll_top = scroll_position.y() * layout.position_map.line_height; -// let scroll_left = scroll_position.x() * layout.position_map.em_width; +// let start_row = scroll_position.y as u32; +// let scroll_top = scroll_position.y * layout.position_map.line_height; +// let scroll_left = scroll_position.x * layout.position_map.em_width; // let range_start = OffsetUtf16(range_utf16.start) // .to_display_point(&layout.position_map.snapshot.display_snapshot); @@ -3147,7 +3176,7 @@ impl Element for EditorElement { // .line; // let range_start_x = line.x_for_index(range_start.column() as usize); // let range_start_y = range_start.row() as f32 * layout.position_map.line_height; -// Some(Bounds::new( +// Some(Bounds::::new( // content_origin // + point( // range_start_x, @@ -3265,7 +3294,7 @@ impl PositionMap { if let Some(ix) = line.index_for_x(x) { (ix as u32, px(0.)) } else { - (line.len as u32, px(0.).max(x - line.width())) + (line.len as u32, px(0.).max(x - line.width)) } } else { (0, x) @@ -3375,7 +3404,7 @@ impl Cursor { CursorShape::Underscore => Bounds { origin: self.origin + origin - + gpui::Point::new(px(0.0), self.line_height - px(2.0)), + + gpui::Point::new(Pixels::ZERO, self.line_height - px(2.0)), size: size(self.block_width, px(2.0)), }, }; @@ -3446,7 +3475,7 @@ impl HighlightedRange { bounds: Bounds, cx: &mut WindowContext, ) { - if lines.is_empty() { + if lines.is_empty { return; } @@ -3570,25 +3599,25 @@ impl HighlightedRange { // }; // let first_y = -// content_origin.y() + row_range.start as f32 * position_map.line_height - scroll_top; +// content_origin.y + row_range.start as f32 * position_map.line_height - scroll_top; // for (idx, row) in row_range.enumerate() { // let line_layout = &position_map.line_layouts[(row - start_row) as usize].line; // let start_x = if row == range.start.row() { -// content_origin.x() + line_layout.x_for_index(range.start.column() as usize) +// content_origin.x + line_layout.x_for_index(range.start.column() as usize) // - scroll_left // } else { -// content_origin.x() - scroll_left +// content_origin.x - scroll_left // }; // let end_x = if row == range.end.row() { -// content_origin.x() + line_layout.x_for_index(range.end.column() as usize) - scroll_left +// content_origin.x + line_layout.x_for_index(range.end.column() as usize) - scroll_left // } else { -// content_origin.x() + line_layout.width() + line_end_overshoot - scroll_left +// content_origin.x + line_layout.width() + line_end_overshoot - scroll_left // }; -// bounds.push(Bounds::from_points( +// bounds.push(Bounds::::from_points( // point(start_x, first_y + position_map.line_height * idx as f32), // point(end_x, first_y + position_map.line_height * (idx + 1) as f32), // )) @@ -3830,7 +3859,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // disposition: BlockDisposition::Above, // height: 3, // position: Anchor::min(), -// render: Arc::new(|_| Empty::new().into_any()), +// render: Arc::new(|_| Empty::new().into_any), // }], // None, // cx, @@ -3860,7 +3889,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // ); // // Don't panic. -// let bounds = Bounds::new(Default::default(), size); +// let bounds = Bounds::::new(Default::default(), size); // editor.update(cx, |editor, cx| { // element.paint(bounds, bounds, &mut state, editor, cx); // }); @@ -3928,7 +3957,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // "\t\t\t| | a b", // 500.0, // ); -// assert!(invisibles.is_empty(), +// assert!(invisibles.is_empty, // "For editor mode {editor_mode_without_invisibles:?} no invisibles was expected but got {invisibles:?}"); // } // } @@ -4001,7 +4030,7 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // } // let missing_expected_invisibles = &expected_invisibles[i + 1..]; // assert!( -// missing_expected_invisibles.is_empty(), +// missing_expected_invisibles.is_empty, // "Missing expected invisibles after index {i}: {missing_expected_invisibles:?}" // ); diff --git a/crates/gpui2/src/text_system/line.rs b/crates/gpui2/src/text_system/line.rs index 63aac96faff9be6f3a452ecf034f501952a4285f..ad70a79bb1e411fdaa4b0fddc0de39bdbf96e7af 100644 --- a/crates/gpui2/src/text_system/line.rs +++ b/crates/gpui2/src/text_system/line.rs @@ -29,10 +29,6 @@ impl Line { ) } - pub fn width(&self) -> Pixels { - self.layout.width - } - pub fn wrap_count(&self) -> usize { self.layout.wrap_boundaries.len() } From 3940e02a73f9dab99b147f6d4f419ce58eb8ce43 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 13:25:27 -0500 Subject: [PATCH 034/110] Add Nord Theme --- assets/themes/src/vscode/nord/LICENSE | 21 + assets/themes/src/vscode/nord/family.json | 11 + assets/themes/src/vscode/nord/nord.json | 1353 +++++++++++++++++++++ 3 files changed, 1385 insertions(+) create mode 100644 assets/themes/src/vscode/nord/LICENSE create mode 100644 assets/themes/src/vscode/nord/family.json create mode 100644 assets/themes/src/vscode/nord/nord.json diff --git a/assets/themes/src/vscode/nord/LICENSE b/assets/themes/src/vscode/nord/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..996f8fb61226844c6bbd2167a8b1a118be10609f --- /dev/null +++ b/assets/themes/src/vscode/nord/LICENSE @@ -0,0 +1,21 @@ +MIT License (MIT) + +Copyright (c) 2016-present Sven Greb (https://www.svengreb.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vscode/nord/family.json b/assets/themes/src/vscode/nord/family.json new file mode 100644 index 0000000000000000000000000000000000000000..eb0e94d202eefb58d95e20c933e230d40492bb30 --- /dev/null +++ b/assets/themes/src/vscode/nord/family.json @@ -0,0 +1,11 @@ +{ + "name": "Nord", + "author": "Sven Greb (svengreb)", + "themes": [ + { + "name": "Nord", + "file_name": "nord.json", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vscode/nord/nord.json b/assets/themes/src/vscode/nord/nord.json new file mode 100644 index 0000000000000000000000000000000000000000..480bf9abe0ab645f2abd8bb8150a7bfa2cfd7482 --- /dev/null +++ b/assets/themes/src/vscode/nord/nord.json @@ -0,0 +1,1353 @@ +{ + "name": "Nord", + "type": "dark", + "semanticHighlighting": true, + "colors": { + "focusBorder": "#3b4252", + "foreground": "#d8dee9", + "activityBar.background": "#2e3440", + "activityBar.dropBackground": "#3b4252", + "activityBar.foreground": "#d8dee9", + "activityBar.activeBorder": "#88c0d0", + "activityBar.activeBackground": "#3b4252", + "activityBarBadge.background": "#88c0d0", + "activityBarBadge.foreground": "#2e3440", + "badge.foreground": "#2e3440", + "badge.background": "#88c0d0", + "button.background": "#88c0d0ee", + "button.foreground": "#2e3440", + "button.hoverBackground": "#88c0d0", + "button.secondaryBackground": "#434c5e", + "button.secondaryForeground": "#d8dee9", + "button.secondaryHoverBackground": "#4c566a", + "charts.red": "#bf616a", + "charts.blue": "#81a1c1", + "charts.yellow": "#ebcb8b", + "charts.orange": "#d08770", + "charts.green": "#a3be8c", + "charts.purple": "#b48ead", + "charts.foreground": "#d8dee9", + "charts.lines": "#88c0d0", + "debugConsole.infoForeground": "#88c0d0", + "debugConsole.warningForeground": "#ebcb8b", + "debugConsole.errorForeground": "#bf616a", + "debugConsole.sourceForeground": "#616e88", + "debugConsoleInputIcon.foreground": "#81a1c1", + "debugExceptionWidget.background": "#4c566a", + "debugExceptionWidget.border": "#2e3440", + "debugToolBar.background": "#3b4252", + "descriptionForeground": "#d8dee9e6", + "diffEditor.insertedTextBackground": "#81a1c133", + "diffEditor.removedTextBackground": "#bf616a4d", + "dropdown.background": "#3b4252", + "dropdown.border": "#3b4252", + "dropdown.foreground": "#d8dee9", + "editorActiveLineNumber.foreground": "#d8dee9cc", + "editorCursor.foreground": "#d8dee9", + "editorHint.border": "#ebcb8b00", + "editorHint.foreground": "#ebcb8b", + "editorIndentGuide.background": "#434c5eb3", + "editorIndentGuide.activeBackground": "#4c566a", + "editorInlayHint.background": "#434c5e", + "editorInlayHint.foreground": "#d8dee9", + "editorLineNumber.foreground": "#4c566a", + "editorLineNumber.activeForeground": "#d8dee9", + "editorWhitespace.foreground": "#4c566ab3", + "editorWidget.background": "#2e3440", + "editorWidget.border": "#3b4252", + "editor.background": "#2e3440", + "editor.foreground": "#d8dee9", + "editor.hoverHighlightBackground": "#3b4252", + "editor.findMatchBackground": "#88c0d066", + "editor.findMatchHighlightBackground": "#88c0d033", + "editor.findRangeHighlightBackground": "#88c0d033", + "editor.lineHighlightBackground": "#3b4252", + "editor.lineHighlightBorder": "#3b4252", + "editor.inactiveSelectionBackground": "#434c5ecc", + "editor.inlineValuesBackground": "#4c566a", + "editor.inlineValuesForeground": "#eceff4", + "editor.selectionBackground": "#434c5ecc", + "editor.selectionHighlightBackground": "#434c5ecc", + "editor.rangeHighlightBackground": "#434c5e52", + "editor.wordHighlightBackground": "#81a1c166", + "editor.wordHighlightStrongBackground": "#81a1c199", + "editor.stackFrameHighlightBackground": "#5e81ac", + "editor.focusedStackFrameHighlightBackground": "#5e81ac", + "editorError.foreground": "#bf616a", + "editorError.border": "#bf616a00", + "editorWarning.foreground": "#ebcb8b", + "editorWarning.border": "#ebcb8b00", + "editorBracketMatch.background": "#2e344000", + "editorBracketMatch.border": "#88c0d0", + "editorBracketHighlight.foreground1": "#8fbcbb", + "editorBracketHighlight.foreground2": "#88c0d0", + "editorBracketHighlight.foreground3": "#81a1c1", + "editorBracketHighlight.foreground4": "#5e81ac", + "editorBracketHighlight.foreground5": "#8fbcbb", + "editorBracketHighlight.foreground6": "#88c0d0", + "editorBracketHighlight.unexpectedBracket.foreground": "#bf616a", + "editorCodeLens.foreground": "#4c566a", + "editorGroup.background": "#2e3440", + "editorGroup.border": "#3b425201", + "editorGroup.dropBackground": "#3b425299", + "editorGroupHeader.border": "#3b425200", + "editorGroupHeader.noTabsBackground": "#2e3440", + "editorGroupHeader.tabsBackground": "#2e3440", + "editorGroupHeader.tabsBorder": "#3b425200", + "editorGutter.background": "#2e3440", + "editorGutter.modifiedBackground": "#ebcb8b", + "editorGutter.addedBackground": "#a3be8c", + "editorGutter.deletedBackground": "#bf616a", + "editorHoverWidget.background": "#3b4252", + "editorHoverWidget.border": "#3b4252", + "editorLink.activeForeground": "#88c0d0", + "editorMarkerNavigation.background": "#5e81acc0", + "editorMarkerNavigationError.background": "#bf616ac0", + "editorMarkerNavigationWarning.background": "#ebcb8bc0", + "editorOverviewRuler.border": "#3b4252", + "editorOverviewRuler.currentContentForeground": "#3b4252", + "editorOverviewRuler.incomingContentForeground": "#3b4252", + "editorOverviewRuler.findMatchForeground": "#88c0d066", + "editorOverviewRuler.rangeHighlightForeground": "#88c0d066", + "editorOverviewRuler.selectionHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightStrongForeground": "#88c0d066", + "editorOverviewRuler.modifiedForeground": "#ebcb8b", + "editorOverviewRuler.addedForeground": "#a3be8c", + "editorOverviewRuler.deletedForeground": "#bf616a", + "editorOverviewRuler.errorForeground": "#bf616a", + "editorOverviewRuler.warningForeground": "#ebcb8b", + "editorOverviewRuler.infoForeground": "#81a1c1", + "editorRuler.foreground": "#434c5e", + "editorSuggestWidget.background": "#2e3440", + "editorSuggestWidget.border": "#3b4252", + "editorSuggestWidget.foreground": "#d8dee9", + "editorSuggestWidget.focusHighlightForeground": "#88c0d0", + "editorSuggestWidget.highlightForeground": "#88c0d0", + "editorSuggestWidget.selectedBackground": "#434c5e", + "editorSuggestWidget.selectedForeground": "#d8dee9", + "extensionButton.prominentForeground": "#d8dee9", + "extensionButton.prominentBackground": "#434c5e", + "extensionButton.prominentHoverBackground": "#4c566a", + "errorForeground": "#bf616a", + "gitDecoration.modifiedResourceForeground": "#ebcb8b", + "gitDecoration.deletedResourceForeground": "#bf616a", + "gitDecoration.untrackedResourceForeground": "#a3be8c", + "gitDecoration.ignoredResourceForeground": "#d8dee966", + "gitDecoration.conflictingResourceForeground": "#5e81ac", + "gitDecoration.submoduleResourceForeground": "#8fbcbb", + "gitDecoration.stageDeletedResourceForeground": "#bf616a", + "gitDecoration.stageModifiedResourceForeground": "#ebcb8b", + "input.background": "#3b4252", + "input.foreground": "#d8dee9", + "input.placeholderForeground": "#d8dee999", + "input.border": "#3b4252", + "inputOption.activeBackground": "#5e81ac", + "inputOption.activeBorder": "#5e81ac", + "inputOption.activeForeground": "#eceff4", + "inputValidation.errorBackground": "#bf616a", + "inputValidation.errorBorder": "#bf616a", + "inputValidation.infoBackground": "#81a1c1", + "inputValidation.infoBorder": "#81a1c1", + "inputValidation.warningBackground": "#d08770", + "inputValidation.warningBorder": "#d08770", + "keybindingLabel.background": "#4c566a", + "keybindingLabel.border": "#4c566a", + "keybindingLabel.bottomBorder": "#4c566a", + "keybindingLabel.foreground": "#d8dee9", + "list.activeSelectionBackground": "#88c0d0", + "list.activeSelectionForeground": "#2e3440", + "list.inactiveSelectionBackground": "#434c5e", + "list.inactiveSelectionForeground": "#d8dee9", + "list.inactiveFocusBackground": "#434c5ecc", + "list.hoverForeground": "#eceff4", + "list.focusForeground": "#d8dee9", + "list.focusBackground": "#88c0d099", + "list.focusHighlightForeground": "#eceff4", + "list.hoverBackground": "#3b4252", + "list.dropBackground": "#88c0d099", + "list.highlightForeground": "#88c0d0", + "list.errorForeground": "#bf616a", + "list.warningForeground": "#ebcb8b", + "merge.currentHeaderBackground": "#81a1c166", + "merge.currentContentBackground": "#81a1c14d", + "merge.incomingHeaderBackground": "#8fbcbb66", + "merge.incomingContentBackground": "#8fbcbb4d", + "merge.border": "#3b425200", + "minimap.background": "#2e3440", + "minimap.errorHighlight": "#bf616acc", + "minimap.findMatchHighlight": "#88c0d0", + "minimap.selectionHighlight": "#88c0d0cc", + "minimap.warningHighlight": "#ebcb8bcc", + "minimapGutter.addedBackground": "#a3be8c", + "minimapGutter.deletedBackground": "#bf616a", + "minimapGutter.modifiedBackground": "#ebcb8b", + "minimapSlider.activeBackground": "#434c5eaa", + "minimapSlider.background": "#434c5e99", + "minimapSlider.hoverBackground": "#434c5eaa", + + /* `notification.*` keys are legacy support for VS Code versions >1.21.0 */ + "notification.background": "#3b4252", + "notification.buttonBackground": "#434c5e", + "notification.buttonForeground": "#d8dee9", + "notification.buttonHoverBackground": "#4c566a", + "notification.errorBackground": "#bf616a", + "notification.errorForeground": "#2e3440", + "notification.foreground": "#d8dee9", + "notification.infoBackground": "#88c0d0", + "notification.infoForeground": "#2e3440", + "notification.warningBackground": "#ebcb8b", + "notification.warningForeground": "#2e3440", + + "notificationCenter.border": "#3b425200", + "notificationCenterHeader.background": "#2e3440", + "notificationCenterHeader.foreground": "#88c0d0", + "notificationLink.foreground": "#88c0d0", + "notifications.background": "#3b4252", + "notifications.border": "#2e3440", + "notifications.foreground": "#d8dee9", + "notificationToast.border": "#3b425200", + + "panel.background": "#2e3440", + "panel.border": "#3b4252", + "panelTitle.activeBorder": "#88c0d000", + "panelTitle.activeForeground": "#88c0d0", + "panelTitle.inactiveForeground": "#d8dee9", + "peekView.border": "#4c566a", + "peekViewEditor.background": "#2e3440", + "peekViewEditorGutter.background": "#2e3440", + "peekViewEditor.matchHighlightBackground": "#88c0d04d", + "peekViewResult.background": "#2e3440", + "peekViewResult.fileForeground": "#88c0d0", + "peekViewResult.lineForeground": "#d8dee966", + "peekViewResult.matchHighlightBackground": "#88c0d0cc", + "peekViewResult.selectionBackground": "#434c5e", + "peekViewResult.selectionForeground": "#d8dee9", + "peekViewTitle.background": "#3b4252", + "peekViewTitleDescription.foreground": "#d8dee9", + "peekViewTitleLabel.foreground": "#88c0d0", + "pickerGroup.border": "#3b4252", + "pickerGroup.foreground": "#88c0d0", + "progressBar.background": "#88c0d0", + "quickInputList.focusBackground": "#88c0d0", + "quickInputList.focusForeground": "#2e3440", + "sash.hoverBorder": "#88c0d0", + "scrollbar.shadow": "#00000066", + "scrollbarSlider.activeBackground": "#434c5eaa", + "scrollbarSlider.background": "#434c5e99", + "scrollbarSlider.hoverBackground": "#434c5eaa", + "selection.background": "#88c0d099", + "sideBar.background": "#2e3440", + "sideBar.foreground": "#d8dee9", + "sideBar.border": "#3b4252", + "sideBarSectionHeader.background": "#3b4252", + "sideBarSectionHeader.foreground": "#d8dee9", + "sideBarTitle.foreground": "#d8dee9", + "statusBar.background": "#3b4252", + "statusBar.debuggingBackground": "#5e81ac", + "statusBar.debuggingForeground": "#d8dee9", + "statusBar.noFolderForeground": "#d8dee9", + "statusBar.noFolderBackground": "#3b4252", + "statusBar.foreground": "#d8dee9", + "statusBarItem.activeBackground": "#4c566a", + "statusBarItem.hoverBackground": "#434c5e", + "statusBarItem.prominentBackground": "#3b4252", + "statusBarItem.prominentHoverBackground": "#434c5e", + "statusBarItem.errorBackground": "#3b4252", + "statusBarItem.errorForeground": "#bf616a", + "statusBarItem.warningBackground": "#ebcb8b", + "statusBarItem.warningForeground": "#2e3440", + "statusBar.border": "#3b425200", + "tab.activeBackground": "#3b4252", + "tab.activeForeground": "#d8dee9", + "tab.border": "#3b425200", + "tab.activeBorder": "#88c0d000", + "tab.unfocusedActiveBorder": "#88c0d000", + "tab.inactiveBackground": "#2e3440", + "tab.inactiveForeground": "#d8dee966", + "tab.unfocusedActiveForeground": "#d8dee999", + "tab.unfocusedInactiveForeground": "#d8dee966", + "tab.hoverBackground": "#3b4252cc", + "tab.unfocusedHoverBackground": "#3b4252b3", + "tab.hoverBorder": "#88c0d000", + "tab.unfocusedHoverBorder": "#88c0d000", + "tab.activeBorderTop": "#88c0d000", + "tab.unfocusedActiveBorderTop": "#88c0d000", + "tab.lastPinnedBorder": "#4c566a", + "terminal.background": "#2e3440", + "terminal.foreground": "#d8dee9", + "terminal.ansiBlack": "#3b4252", + "terminal.ansiRed": "#bf616a", + "terminal.ansiGreen": "#a3be8c", + "terminal.ansiYellow": "#ebcb8b", + "terminal.ansiBlue": "#81a1c1", + "terminal.ansiMagenta": "#b48ead", + "terminal.ansiCyan": "#88c0d0", + "terminal.ansiWhite": "#e5e9f0", + "terminal.ansiBrightBlack": "#4c566a", + "terminal.ansiBrightRed": "#bf616a", + "terminal.ansiBrightGreen": "#a3be8c", + "terminal.ansiBrightYellow": "#ebcb8b", + "terminal.ansiBrightBlue": "#81a1c1", + "terminal.ansiBrightMagenta": "#b48ead", + "terminal.ansiBrightCyan": "#8fbcbb", + "terminal.ansiBrightWhite": "#eceff4", + "terminal.tab.activeBorder": "#88c0d0", + "textBlockQuote.background": "#3b4252", + "textBlockQuote.border": "#81a1c1", + "textCodeBlock.background": "#4c566a", + "textLink.activeForeground": "#88c0d0", + "textLink.foreground": "#88c0d0", + "textPreformat.foreground": "#8fbcbb", + "textSeparator.foreground": "#eceff4", + "titleBar.activeBackground": "#2e3440", + "titleBar.activeForeground": "#d8dee9", + "titleBar.border": "#2e344000", + "titleBar.inactiveBackground": "#2e3440", + "titleBar.inactiveForeground": "#d8dee966", + "tree.indentGuidesStroke": "#616e88", + "walkThrough.embeddedEditorBackground": "#2e3440", + "welcomePage.buttonBackground": "#434c5e", + "welcomePage.buttonHoverBackground": "#4c566a", + "widget.shadow": "#00000066" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#d8dee9ff", + "background": "#2e3440ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Constant Character", + "scope": "constant.character", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Language", + "scope": "constant.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Constant Numeric", + "scope": "constant.numeric", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "Constant Regexp", + "scope": "constant.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Entity Name Class/Type", + "scope": ["entity.name.class", "entity.name.type.class"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Entity Name Tag", + "scope": "entity.name.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Entity Other Attribute Name", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Other Inherited Class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "bold", + "foreground": "#8FBCBB" + } + }, + { + "name": "Invalid Deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#D8DEE9", + "background": "#EBCB8B" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#D8DEE9", + "background": "#BF616A" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Other New", + "scope": "keyword.other.new", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Changed", + "scope": "markup.changed", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Markup Deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#BF616A" + } + }, + { + "name": "Markup Inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "Meta Preprocessor", + "scope": "meta.preprocessor", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": [ + "punctuation.definition.method-parameters", + "punctuation.definition.function-parameters", + "punctuation.definition.parameters" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Tag", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Definition Comment", + "scope": [ + "punctuation.definition.comment", + "punctuation.end.definition.comment", + "punctuation.start.definition.comment" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Punctuation Section", + "scope": "punctuation.section", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Terminator", + "scope": "punctuation.terminator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Variable", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "String Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Support Class", + "scope": "support.class", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Constant", + "scope": "support.constant", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Support Function Construct", + "scope": "support.function.construct", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Type", + "scope": "support.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Type Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Token Debug", + "scope": "token.debug-token", + "settings": { + "foreground": "#b48ead" + } + }, + { + "name": "Token Error", + "scope": "token.error-token", + "settings": { + "foreground": "#bf616a" + } + }, + { + "name": "Token Info", + "scope": "token.info-token", + "settings": { + "foreground": "#88c0d0" + } + }, + { + "name": "Token Warning", + "scope": "token.warn-token", + "settings": { + "foreground": "#ebcb8b" + } + }, + { + "name": "Variable", + "scope": "variable.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "Variable Language", + "scope": "variable.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Variable Parameter", + "scope": "variable.parameter", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[C/CPP] Punctuation Separator Pointer-Access", + "scope": "punctuation.separator.pointer-access.c", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[C/CPP] Meta Preprocessor Include", + "scope": ["source.c meta.preprocessor.include", "source.c string.quoted.other.lt-gt.include"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[C/CPP] Conditional Directive", + "scope": [ + "source.cpp keyword.control.directive.conditional", + "source.cpp punctuation.definition.directive", + "source.c keyword.control.directive.conditional", + "source.c punctuation.definition.directive" + ], + "settings": { + "foreground": "#5E81AC", + "fontStyle": "bold" + } + }, + { + "name": "[CSS] Constant Other Color RGB Value", + "scope": "source.css constant.other.color.rgb-value", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "[CSS](Function) Meta Property-Value", + "scope": "source.css meta.property-value", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[CSS] Media Queries", + "scope": [ + "source.css keyword.control.at-rule.media", + "source.css keyword.control.at-rule.media punctuation.definition.keyword" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[CSS] Punctuation Definition Keyword", + "scope": "source.css punctuation.definition.keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[CSS] Support Type Property Name", + "scope": "source.css support.type.property-name", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[diff] Meta Range Context", + "scope": "source.diff meta.diff.range.context", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Meta Header From-File", + "scope": "source.diff meta.diff.header.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition From-File", + "scope": "source.diff punctuation.definition.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Range", + "scope": "source.diff punctuation.definition.range", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Separator", + "scope": "source.diff punctuation.definition.separator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module names", + "scope": "entity.name.type.module.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module attributes", + "scope": "variable.other.readwrite.module.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) atoms", + "scope": "constant.other.symbol.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) modules", + "scope": "variable.other.constant.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Go] String Format Placeholder", + "scope": "source.go constant.other.placeholder.go", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[Java](JavaDoc) Comment Block Documentation HTML Entities", + "scope": "source.java comment.block.documentation.javadoc punctuation.definition.entity.html", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Java](JavaDoc) Constant Other", + "scope": "source.java constant.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation", + "scope": "source.java keyword.other.documentation", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Author", + "scope": "source.java keyword.other.documentation.author.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Directive/Custom", + "scope": ["source.java keyword.other.documentation.directive", "source.java keyword.other.documentation.custom"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation See", + "scope": "source.java keyword.other.documentation.see.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Meta Method-Call", + "scope": "source.java meta.method-call meta.method", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Link", + "scope": ["source.java meta.tag.template.link.javadoc", "source.java string.other.link.title.javadoc"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Value", + "scope": "source.java meta.tag.template.value.javadoc", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Keyword", + "scope": "source.java punctuation.definition.keyword.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Tag", + "scope": [ + "source.java punctuation.definition.tag.begin.javadoc", + "source.java punctuation.definition.tag.end.javadoc" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Java] Storage Modifier Import", + "scope": "source.java storage.modifier.import", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Modifier Package", + "scope": "source.java storage.modifier.package", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type", + "scope": "source.java storage.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Annotation", + "scope": "source.java storage.type.annotation", + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Java] Storage Type Generic", + "scope": "source.java storage.type.generic", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Primitive", + "scope": "source.java storage.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Decorator", + "scope": [ + "source.js punctuation.decorator", + "source.js meta.decorator variable.other.readwrite", + "source.js meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[JavaScript] Meta Object-Literal Key", + "scope": "source.js meta.object-literal.key", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[JavaScript](JSDoc) Storage Type Class", + "scope": "source.js storage.type.class.jsdoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] String Template Literals Punctuation", + "scope": [ + "source.js string.quoted.template punctuation.quasi.element.begin", + "source.js string.quoted.template punctuation.quasi.element.end", + "source.js string.template punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Interpolated String Template Punctuation Functions", + "scope": "source.js string.quoted.template meta.method-call.with-arguments", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[JavaScript] String Template Literal Variable", + "scope": [ + "source.js string.template meta.template.expression support.variable.property", + "source.js string.template meta.template.expression variable.other.object" + ], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Support Type Primitive", + "scope": "source.js support.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Variable Other Object", + "scope": "source.js variable.other.object", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Variable Other Read-Write Alias", + "scope": "source.js variable.other.readwrite.alias", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] Parentheses in Template Strings", + "scope": [ + "source.js meta.embedded.line meta.brace.square", + "source.js meta.embedded.line meta.brace.round", + /* Required for extension `mgmcdermott.vscode-language-babel`. */ + "source.js string.quoted.template meta.brace.square", + "source.js string.quoted.template meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[HTML] Constant Character Entity", + "scope": "text.html.basic constant.character.entity.html", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[HTML] Constant Other Inline-Data", + "scope": "text.html.basic constant.other.inline-data", + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[HTML] Meta Tag SGML Doctype", + "scope": "text.html.basic meta.tag.sgml.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[HTML] Punctuation Definition Entity", + "scope": "text.html.basic punctuation.definition.entity", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[INI] Entity Name Section Group-Title", + "scope": "source.properties entity.name.section.group-title.ini", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[INI] Punctuation Separator Key-Value", + "scope": "source.properties punctuation.separator.key-value.ini", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Fenced Code Block", + "scope": [ + "text.html.markdown markup.fenced_code.block", + "text.html.markdown markup.fenced_code.block punctuation.definition" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Heading", + "scope": "markup.heading", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Inline", + "scope": [ + "text.html.markdown markup.inline.raw", + "text.html.markdown markup.inline.raw punctuation.definition.raw" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Italic", + "scope": "text.html.markdown markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "[Markdown] Markup Link", + "scope": "text.html.markdown markup.underline.link", + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "[Markdown] Markup List Numbered/Unnumbered", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown beginning.punctuation.definition.quote", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown markup.quote", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Markdown] Markup Math Constant", + "scope": "text.html.markdown constant.character.math.tex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Math Definition Marker", + "scope": [ + "text.html.markdown punctuation.definition.math.begin", + "text.html.markdown punctuation.definition.math.end" + ], + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[Markdown] Markup Math Function Definition Marker", + "scope": "text.html.markdown punctuation.definition.function.math.tex", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Math Operator", + "scope": "text.html.markdown punctuation.math.operator.latex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Heading", + "scope": "text.html.markdown punctuation.definition.heading", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Constant/String", + "scope": [ + "text.html.markdown punctuation.definition.constant", + "text.html.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] String Other Link Description/Title", + "scope": [ + "text.html.markdown constant.other.reference.link", + "text.html.markdown string.other.link.description", + "text.html.markdown string.other.link.title" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Perl] Perl Sigils", + "scope": "source.perl punctuation.definition.variable", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[PHP] Meta Function-Call Object", + "scope": ["source.php meta.function-call", "source.php meta.function-call.object"], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Decorator", + "scope": ["source.python entity.name.function.decorator", "source.python meta.function.decorator support.type"], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Python] Function Call", + "scope": "source.python meta.function-call.generic", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Support Type", + "scope": "source.python support.type", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Function Parameter", + "scope": ["source.python variable.parameter.function.language"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Python] Function Parameter Special", + "scope": ["source.python meta.function.parameters variable.parameter.function.language.special.self"], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[SCSS] Punctuation Definition Interpolation Bracket Curly", + "scope": [ + "source.css.scss punctuation.definition.interpolation.begin.bracket.curly", + "source.css.scss punctuation.definition.interpolation.end.bracket.curly" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[SCSS] Variable Interpolation", + "scope": "source.css.scss variable.interpolation", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "italic" + } + }, + { + "name": "[TypeScript] Decorators", + "scope": [ + "source.ts punctuation.decorator", + "source.ts meta.decorator variable.other.readwrite", + "source.ts meta.decorator entity.name.function", + "source.tsx punctuation.decorator", + "source.tsx meta.decorator variable.other.readwrite", + "source.tsx meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[TypeScript] Object-literal keys", + "scope": ["source.ts meta.object-literal.key", "source.tsx meta.object-literal.key"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Object-literal functions", + "scope": [ + "source.ts meta.object-literal.key entity.name.function", + "source.tsx meta.object-literal.key entity.name.function" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[TypeScript] Type/Class", + "scope": [ + "source.ts support.class", + "source.ts support.type", + "source.ts entity.name.type", + "source.ts entity.name.class", + "source.tsx support.class", + "source.tsx support.type", + "source.tsx entity.name.type", + "source.tsx entity.name.class" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Static Class Support", + "scope": [ + "source.ts support.constant.math", + "source.ts support.constant.dom", + "source.ts support.constant.json", + "source.tsx support.constant.math", + "source.tsx support.constant.dom", + "source.tsx support.constant.json" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Variables", + "scope": ["source.ts support.variable", "source.tsx support.variable"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Parentheses in Template Strings", + "scope": [ + "source.ts meta.embedded.line meta.brace.square", + "source.ts meta.embedded.line meta.brace.round", + "source.tsx meta.embedded.line meta.brace.square", + "source.tsx meta.embedded.line meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": "text.xml entity.name.tag.namespace", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[XML] Keyword Other Doctype", + "scope": "text.xml keyword.other.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Meta Tag Preprocessor", + "scope": "text.xml meta.tag.preprocessor entity.name.tag", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": ["text.xml string.unquoted.cdata", "text.xml string.unquoted.cdata punctuation.definition.string"], + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[YAML] Entity Name Tag", + "scope": "source.yaml entity.name.tag", + "settings": { + "foreground": "#8FBCBB" + } + } + ] +} From c47c64184c20fda23fc8ea8b23520df4a906e58f Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 14:54:21 -0500 Subject: [PATCH 035/110] Add additional themes, update theme importer --- assets/themes/src/vscode/nord/nord.json | 2711 ++++++++++---------- crates/theme2/src/registry.rs | 7 +- crates/theme2/src/themes/.gitkeep | 0 crates/theme2/src/themes/andromeda.rs | 4 +- crates/theme2/src/themes/ayu.rs | 4 +- crates/theme2/src/themes/dracula.rs | 4 +- crates/theme2/src/themes/gruvbox.rs | 4 +- crates/theme2/src/themes/mod.rs | 23 +- crates/theme2/src/themes/nord.rs | 18 + crates/theme2/src/themes/notctis.rs | 4 +- crates/theme_importer/src/main.rs | 73 +- crates/theme_importer/src/theme_printer.rs | 2 + crates/theme_importer/src/vscode.rs | 8 + 13 files changed, 1479 insertions(+), 1383 deletions(-) delete mode 100644 crates/theme2/src/themes/.gitkeep create mode 100644 crates/theme2/src/themes/nord.rs diff --git a/assets/themes/src/vscode/nord/nord.json b/assets/themes/src/vscode/nord/nord.json index 480bf9abe0ab645f2abd8bb8150a7bfa2cfd7482..bb300297c1863bcfe765a0692c31e7e10051deda 100644 --- a/assets/themes/src/vscode/nord/nord.json +++ b/assets/themes/src/vscode/nord/nord.json @@ -1,1353 +1,1368 @@ { - "name": "Nord", - "type": "dark", - "semanticHighlighting": true, - "colors": { - "focusBorder": "#3b4252", - "foreground": "#d8dee9", - "activityBar.background": "#2e3440", - "activityBar.dropBackground": "#3b4252", - "activityBar.foreground": "#d8dee9", - "activityBar.activeBorder": "#88c0d0", - "activityBar.activeBackground": "#3b4252", - "activityBarBadge.background": "#88c0d0", - "activityBarBadge.foreground": "#2e3440", - "badge.foreground": "#2e3440", - "badge.background": "#88c0d0", - "button.background": "#88c0d0ee", - "button.foreground": "#2e3440", - "button.hoverBackground": "#88c0d0", - "button.secondaryBackground": "#434c5e", - "button.secondaryForeground": "#d8dee9", - "button.secondaryHoverBackground": "#4c566a", - "charts.red": "#bf616a", - "charts.blue": "#81a1c1", - "charts.yellow": "#ebcb8b", - "charts.orange": "#d08770", - "charts.green": "#a3be8c", - "charts.purple": "#b48ead", - "charts.foreground": "#d8dee9", - "charts.lines": "#88c0d0", - "debugConsole.infoForeground": "#88c0d0", - "debugConsole.warningForeground": "#ebcb8b", - "debugConsole.errorForeground": "#bf616a", - "debugConsole.sourceForeground": "#616e88", - "debugConsoleInputIcon.foreground": "#81a1c1", - "debugExceptionWidget.background": "#4c566a", - "debugExceptionWidget.border": "#2e3440", - "debugToolBar.background": "#3b4252", - "descriptionForeground": "#d8dee9e6", - "diffEditor.insertedTextBackground": "#81a1c133", - "diffEditor.removedTextBackground": "#bf616a4d", - "dropdown.background": "#3b4252", - "dropdown.border": "#3b4252", - "dropdown.foreground": "#d8dee9", - "editorActiveLineNumber.foreground": "#d8dee9cc", - "editorCursor.foreground": "#d8dee9", - "editorHint.border": "#ebcb8b00", - "editorHint.foreground": "#ebcb8b", - "editorIndentGuide.background": "#434c5eb3", - "editorIndentGuide.activeBackground": "#4c566a", - "editorInlayHint.background": "#434c5e", - "editorInlayHint.foreground": "#d8dee9", - "editorLineNumber.foreground": "#4c566a", - "editorLineNumber.activeForeground": "#d8dee9", - "editorWhitespace.foreground": "#4c566ab3", - "editorWidget.background": "#2e3440", - "editorWidget.border": "#3b4252", - "editor.background": "#2e3440", - "editor.foreground": "#d8dee9", - "editor.hoverHighlightBackground": "#3b4252", - "editor.findMatchBackground": "#88c0d066", - "editor.findMatchHighlightBackground": "#88c0d033", - "editor.findRangeHighlightBackground": "#88c0d033", - "editor.lineHighlightBackground": "#3b4252", - "editor.lineHighlightBorder": "#3b4252", - "editor.inactiveSelectionBackground": "#434c5ecc", - "editor.inlineValuesBackground": "#4c566a", - "editor.inlineValuesForeground": "#eceff4", - "editor.selectionBackground": "#434c5ecc", - "editor.selectionHighlightBackground": "#434c5ecc", - "editor.rangeHighlightBackground": "#434c5e52", - "editor.wordHighlightBackground": "#81a1c166", - "editor.wordHighlightStrongBackground": "#81a1c199", - "editor.stackFrameHighlightBackground": "#5e81ac", - "editor.focusedStackFrameHighlightBackground": "#5e81ac", - "editorError.foreground": "#bf616a", - "editorError.border": "#bf616a00", - "editorWarning.foreground": "#ebcb8b", - "editorWarning.border": "#ebcb8b00", - "editorBracketMatch.background": "#2e344000", - "editorBracketMatch.border": "#88c0d0", - "editorBracketHighlight.foreground1": "#8fbcbb", - "editorBracketHighlight.foreground2": "#88c0d0", - "editorBracketHighlight.foreground3": "#81a1c1", - "editorBracketHighlight.foreground4": "#5e81ac", - "editorBracketHighlight.foreground5": "#8fbcbb", - "editorBracketHighlight.foreground6": "#88c0d0", - "editorBracketHighlight.unexpectedBracket.foreground": "#bf616a", - "editorCodeLens.foreground": "#4c566a", - "editorGroup.background": "#2e3440", - "editorGroup.border": "#3b425201", - "editorGroup.dropBackground": "#3b425299", - "editorGroupHeader.border": "#3b425200", - "editorGroupHeader.noTabsBackground": "#2e3440", - "editorGroupHeader.tabsBackground": "#2e3440", - "editorGroupHeader.tabsBorder": "#3b425200", - "editorGutter.background": "#2e3440", - "editorGutter.modifiedBackground": "#ebcb8b", - "editorGutter.addedBackground": "#a3be8c", - "editorGutter.deletedBackground": "#bf616a", - "editorHoverWidget.background": "#3b4252", - "editorHoverWidget.border": "#3b4252", - "editorLink.activeForeground": "#88c0d0", - "editorMarkerNavigation.background": "#5e81acc0", - "editorMarkerNavigationError.background": "#bf616ac0", - "editorMarkerNavigationWarning.background": "#ebcb8bc0", - "editorOverviewRuler.border": "#3b4252", - "editorOverviewRuler.currentContentForeground": "#3b4252", - "editorOverviewRuler.incomingContentForeground": "#3b4252", - "editorOverviewRuler.findMatchForeground": "#88c0d066", - "editorOverviewRuler.rangeHighlightForeground": "#88c0d066", - "editorOverviewRuler.selectionHighlightForeground": "#88c0d066", - "editorOverviewRuler.wordHighlightForeground": "#88c0d066", - "editorOverviewRuler.wordHighlightStrongForeground": "#88c0d066", - "editorOverviewRuler.modifiedForeground": "#ebcb8b", - "editorOverviewRuler.addedForeground": "#a3be8c", - "editorOverviewRuler.deletedForeground": "#bf616a", - "editorOverviewRuler.errorForeground": "#bf616a", - "editorOverviewRuler.warningForeground": "#ebcb8b", - "editorOverviewRuler.infoForeground": "#81a1c1", - "editorRuler.foreground": "#434c5e", - "editorSuggestWidget.background": "#2e3440", - "editorSuggestWidget.border": "#3b4252", - "editorSuggestWidget.foreground": "#d8dee9", - "editorSuggestWidget.focusHighlightForeground": "#88c0d0", - "editorSuggestWidget.highlightForeground": "#88c0d0", - "editorSuggestWidget.selectedBackground": "#434c5e", - "editorSuggestWidget.selectedForeground": "#d8dee9", - "extensionButton.prominentForeground": "#d8dee9", - "extensionButton.prominentBackground": "#434c5e", - "extensionButton.prominentHoverBackground": "#4c566a", - "errorForeground": "#bf616a", - "gitDecoration.modifiedResourceForeground": "#ebcb8b", - "gitDecoration.deletedResourceForeground": "#bf616a", - "gitDecoration.untrackedResourceForeground": "#a3be8c", - "gitDecoration.ignoredResourceForeground": "#d8dee966", - "gitDecoration.conflictingResourceForeground": "#5e81ac", - "gitDecoration.submoduleResourceForeground": "#8fbcbb", - "gitDecoration.stageDeletedResourceForeground": "#bf616a", - "gitDecoration.stageModifiedResourceForeground": "#ebcb8b", - "input.background": "#3b4252", - "input.foreground": "#d8dee9", - "input.placeholderForeground": "#d8dee999", - "input.border": "#3b4252", - "inputOption.activeBackground": "#5e81ac", - "inputOption.activeBorder": "#5e81ac", - "inputOption.activeForeground": "#eceff4", - "inputValidation.errorBackground": "#bf616a", - "inputValidation.errorBorder": "#bf616a", - "inputValidation.infoBackground": "#81a1c1", - "inputValidation.infoBorder": "#81a1c1", - "inputValidation.warningBackground": "#d08770", - "inputValidation.warningBorder": "#d08770", - "keybindingLabel.background": "#4c566a", - "keybindingLabel.border": "#4c566a", - "keybindingLabel.bottomBorder": "#4c566a", - "keybindingLabel.foreground": "#d8dee9", - "list.activeSelectionBackground": "#88c0d0", - "list.activeSelectionForeground": "#2e3440", - "list.inactiveSelectionBackground": "#434c5e", - "list.inactiveSelectionForeground": "#d8dee9", - "list.inactiveFocusBackground": "#434c5ecc", - "list.hoverForeground": "#eceff4", - "list.focusForeground": "#d8dee9", - "list.focusBackground": "#88c0d099", - "list.focusHighlightForeground": "#eceff4", - "list.hoverBackground": "#3b4252", - "list.dropBackground": "#88c0d099", - "list.highlightForeground": "#88c0d0", - "list.errorForeground": "#bf616a", - "list.warningForeground": "#ebcb8b", - "merge.currentHeaderBackground": "#81a1c166", - "merge.currentContentBackground": "#81a1c14d", - "merge.incomingHeaderBackground": "#8fbcbb66", - "merge.incomingContentBackground": "#8fbcbb4d", - "merge.border": "#3b425200", - "minimap.background": "#2e3440", - "minimap.errorHighlight": "#bf616acc", - "minimap.findMatchHighlight": "#88c0d0", - "minimap.selectionHighlight": "#88c0d0cc", - "minimap.warningHighlight": "#ebcb8bcc", - "minimapGutter.addedBackground": "#a3be8c", - "minimapGutter.deletedBackground": "#bf616a", - "minimapGutter.modifiedBackground": "#ebcb8b", - "minimapSlider.activeBackground": "#434c5eaa", - "minimapSlider.background": "#434c5e99", - "minimapSlider.hoverBackground": "#434c5eaa", + "name": "Nord", + "type": "dark", + "semanticHighlighting": true, + "colors": { + "focusBorder": "#3b4252", + "foreground": "#d8dee9", + "activityBar.background": "#2e3440", + "activityBar.dropBackground": "#3b4252", + "activityBar.foreground": "#d8dee9", + "activityBar.activeBorder": "#88c0d0", + "activityBar.activeBackground": "#3b4252", + "activityBarBadge.background": "#88c0d0", + "activityBarBadge.foreground": "#2e3440", + "badge.foreground": "#2e3440", + "badge.background": "#88c0d0", + "button.background": "#88c0d0ee", + "button.foreground": "#2e3440", + "button.hoverBackground": "#88c0d0", + "button.secondaryBackground": "#434c5e", + "button.secondaryForeground": "#d8dee9", + "button.secondaryHoverBackground": "#4c566a", + "charts.red": "#bf616a", + "charts.blue": "#81a1c1", + "charts.yellow": "#ebcb8b", + "charts.orange": "#d08770", + "charts.green": "#a3be8c", + "charts.purple": "#b48ead", + "charts.foreground": "#d8dee9", + "charts.lines": "#88c0d0", + "debugConsole.infoForeground": "#88c0d0", + "debugConsole.warningForeground": "#ebcb8b", + "debugConsole.errorForeground": "#bf616a", + "debugConsole.sourceForeground": "#616e88", + "debugConsoleInputIcon.foreground": "#81a1c1", + "debugExceptionWidget.background": "#4c566a", + "debugExceptionWidget.border": "#2e3440", + "debugToolBar.background": "#3b4252", + "descriptionForeground": "#d8dee9e6", + "diffEditor.insertedTextBackground": "#81a1c133", + "diffEditor.removedTextBackground": "#bf616a4d", + "dropdown.background": "#3b4252", + "dropdown.border": "#3b4252", + "dropdown.foreground": "#d8dee9", + "editorActiveLineNumber.foreground": "#d8dee9cc", + "editorCursor.foreground": "#d8dee9", + "editorHint.border": "#ebcb8b00", + "editorHint.foreground": "#ebcb8b", + "editorIndentGuide.background": "#434c5eb3", + "editorIndentGuide.activeBackground": "#4c566a", + "editorInlayHint.background": "#434c5e", + "editorInlayHint.foreground": "#d8dee9", + "editorLineNumber.foreground": "#4c566a", + "editorLineNumber.activeForeground": "#d8dee9", + "editorWhitespace.foreground": "#4c566ab3", + "editorWidget.background": "#2e3440", + "editorWidget.border": "#3b4252", + "editor.background": "#2e3440", + "editor.foreground": "#d8dee9", + "editor.hoverHighlightBackground": "#3b4252", + "editor.findMatchBackground": "#88c0d066", + "editor.findMatchHighlightBackground": "#88c0d033", + "editor.findRangeHighlightBackground": "#88c0d033", + "editor.lineHighlightBackground": "#3b4252", + "editor.lineHighlightBorder": "#3b4252", + "editor.inactiveSelectionBackground": "#434c5ecc", + "editor.inlineValuesBackground": "#4c566a", + "editor.inlineValuesForeground": "#eceff4", + "editor.selectionBackground": "#434c5ecc", + "editor.selectionHighlightBackground": "#434c5ecc", + "editor.rangeHighlightBackground": "#434c5e52", + "editor.wordHighlightBackground": "#81a1c166", + "editor.wordHighlightStrongBackground": "#81a1c199", + "editor.stackFrameHighlightBackground": "#5e81ac", + "editor.focusedStackFrameHighlightBackground": "#5e81ac", + "editorError.foreground": "#bf616a", + "editorError.border": "#bf616a00", + "editorWarning.foreground": "#ebcb8b", + "editorWarning.border": "#ebcb8b00", + "editorBracketMatch.background": "#2e344000", + "editorBracketMatch.border": "#88c0d0", + "editorBracketHighlight.foreground1": "#8fbcbb", + "editorBracketHighlight.foreground2": "#88c0d0", + "editorBracketHighlight.foreground3": "#81a1c1", + "editorBracketHighlight.foreground4": "#5e81ac", + "editorBracketHighlight.foreground5": "#8fbcbb", + "editorBracketHighlight.foreground6": "#88c0d0", + "editorBracketHighlight.unexpectedBracket.foreground": "#bf616a", + "editorCodeLens.foreground": "#4c566a", + "editorGroup.background": "#2e3440", + "editorGroup.border": "#3b425201", + "editorGroup.dropBackground": "#3b425299", + "editorGroupHeader.border": "#3b425200", + "editorGroupHeader.noTabsBackground": "#2e3440", + "editorGroupHeader.tabsBackground": "#2e3440", + "editorGroupHeader.tabsBorder": "#3b425200", + "editorGutter.background": "#2e3440", + "editorGutter.modifiedBackground": "#ebcb8b", + "editorGutter.addedBackground": "#a3be8c", + "editorGutter.deletedBackground": "#bf616a", + "editorHoverWidget.background": "#3b4252", + "editorHoverWidget.border": "#3b4252", + "editorLink.activeForeground": "#88c0d0", + "editorMarkerNavigation.background": "#5e81acc0", + "editorMarkerNavigationError.background": "#bf616ac0", + "editorMarkerNavigationWarning.background": "#ebcb8bc0", + "editorOverviewRuler.border": "#3b4252", + "editorOverviewRuler.currentContentForeground": "#3b4252", + "editorOverviewRuler.incomingContentForeground": "#3b4252", + "editorOverviewRuler.findMatchForeground": "#88c0d066", + "editorOverviewRuler.rangeHighlightForeground": "#88c0d066", + "editorOverviewRuler.selectionHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightStrongForeground": "#88c0d066", + "editorOverviewRuler.modifiedForeground": "#ebcb8b", + "editorOverviewRuler.addedForeground": "#a3be8c", + "editorOverviewRuler.deletedForeground": "#bf616a", + "editorOverviewRuler.errorForeground": "#bf616a", + "editorOverviewRuler.warningForeground": "#ebcb8b", + "editorOverviewRuler.infoForeground": "#81a1c1", + "editorRuler.foreground": "#434c5e", + "editorSuggestWidget.background": "#2e3440", + "editorSuggestWidget.border": "#3b4252", + "editorSuggestWidget.foreground": "#d8dee9", + "editorSuggestWidget.focusHighlightForeground": "#88c0d0", + "editorSuggestWidget.highlightForeground": "#88c0d0", + "editorSuggestWidget.selectedBackground": "#434c5e", + "editorSuggestWidget.selectedForeground": "#d8dee9", + "extensionButton.prominentForeground": "#d8dee9", + "extensionButton.prominentBackground": "#434c5e", + "extensionButton.prominentHoverBackground": "#4c566a", + "errorForeground": "#bf616a", + "gitDecoration.modifiedResourceForeground": "#ebcb8b", + "gitDecoration.deletedResourceForeground": "#bf616a", + "gitDecoration.untrackedResourceForeground": "#a3be8c", + "gitDecoration.ignoredResourceForeground": "#d8dee966", + "gitDecoration.conflictingResourceForeground": "#5e81ac", + "gitDecoration.submoduleResourceForeground": "#8fbcbb", + "gitDecoration.stageDeletedResourceForeground": "#bf616a", + "gitDecoration.stageModifiedResourceForeground": "#ebcb8b", + "input.background": "#3b4252", + "input.foreground": "#d8dee9", + "input.placeholderForeground": "#d8dee999", + "input.border": "#3b4252", + "inputOption.activeBackground": "#5e81ac", + "inputOption.activeBorder": "#5e81ac", + "inputOption.activeForeground": "#eceff4", + "inputValidation.errorBackground": "#bf616a", + "inputValidation.errorBorder": "#bf616a", + "inputValidation.infoBackground": "#81a1c1", + "inputValidation.infoBorder": "#81a1c1", + "inputValidation.warningBackground": "#d08770", + "inputValidation.warningBorder": "#d08770", + "keybindingLabel.background": "#4c566a", + "keybindingLabel.border": "#4c566a", + "keybindingLabel.bottomBorder": "#4c566a", + "keybindingLabel.foreground": "#d8dee9", + "list.activeSelectionBackground": "#88c0d0", + "list.activeSelectionForeground": "#2e3440", + "list.inactiveSelectionBackground": "#434c5e", + "list.inactiveSelectionForeground": "#d8dee9", + "list.inactiveFocusBackground": "#434c5ecc", + "list.hoverForeground": "#eceff4", + "list.focusForeground": "#d8dee9", + "list.focusBackground": "#88c0d099", + "list.focusHighlightForeground": "#eceff4", + "list.hoverBackground": "#3b4252", + "list.dropBackground": "#88c0d099", + "list.highlightForeground": "#88c0d0", + "list.errorForeground": "#bf616a", + "list.warningForeground": "#ebcb8b", + "merge.currentHeaderBackground": "#81a1c166", + "merge.currentContentBackground": "#81a1c14d", + "merge.incomingHeaderBackground": "#8fbcbb66", + "merge.incomingContentBackground": "#8fbcbb4d", + "merge.border": "#3b425200", + "minimap.background": "#2e3440", + "minimap.errorHighlight": "#bf616acc", + "minimap.findMatchHighlight": "#88c0d0", + "minimap.selectionHighlight": "#88c0d0cc", + "minimap.warningHighlight": "#ebcb8bcc", + "minimapGutter.addedBackground": "#a3be8c", + "minimapGutter.deletedBackground": "#bf616a", + "minimapGutter.modifiedBackground": "#ebcb8b", + "minimapSlider.activeBackground": "#434c5eaa", + "minimapSlider.background": "#434c5e99", + "minimapSlider.hoverBackground": "#434c5eaa", - /* `notification.*` keys are legacy support for VS Code versions >1.21.0 */ - "notification.background": "#3b4252", - "notification.buttonBackground": "#434c5e", - "notification.buttonForeground": "#d8dee9", - "notification.buttonHoverBackground": "#4c566a", - "notification.errorBackground": "#bf616a", - "notification.errorForeground": "#2e3440", - "notification.foreground": "#d8dee9", - "notification.infoBackground": "#88c0d0", - "notification.infoForeground": "#2e3440", - "notification.warningBackground": "#ebcb8b", - "notification.warningForeground": "#2e3440", + "notification.background": "#3b4252", + "notification.buttonBackground": "#434c5e", + "notification.buttonForeground": "#d8dee9", + "notification.buttonHoverBackground": "#4c566a", + "notification.errorBackground": "#bf616a", + "notification.errorForeground": "#2e3440", + "notification.foreground": "#d8dee9", + "notification.infoBackground": "#88c0d0", + "notification.infoForeground": "#2e3440", + "notification.warningBackground": "#ebcb8b", + "notification.warningForeground": "#2e3440", - "notificationCenter.border": "#3b425200", - "notificationCenterHeader.background": "#2e3440", - "notificationCenterHeader.foreground": "#88c0d0", - "notificationLink.foreground": "#88c0d0", - "notifications.background": "#3b4252", - "notifications.border": "#2e3440", - "notifications.foreground": "#d8dee9", - "notificationToast.border": "#3b425200", + "notificationCenter.border": "#3b425200", + "notificationCenterHeader.background": "#2e3440", + "notificationCenterHeader.foreground": "#88c0d0", + "notificationLink.foreground": "#88c0d0", + "notifications.background": "#3b4252", + "notifications.border": "#2e3440", + "notifications.foreground": "#d8dee9", + "notificationToast.border": "#3b425200", - "panel.background": "#2e3440", - "panel.border": "#3b4252", - "panelTitle.activeBorder": "#88c0d000", - "panelTitle.activeForeground": "#88c0d0", - "panelTitle.inactiveForeground": "#d8dee9", - "peekView.border": "#4c566a", - "peekViewEditor.background": "#2e3440", - "peekViewEditorGutter.background": "#2e3440", - "peekViewEditor.matchHighlightBackground": "#88c0d04d", - "peekViewResult.background": "#2e3440", - "peekViewResult.fileForeground": "#88c0d0", - "peekViewResult.lineForeground": "#d8dee966", - "peekViewResult.matchHighlightBackground": "#88c0d0cc", - "peekViewResult.selectionBackground": "#434c5e", - "peekViewResult.selectionForeground": "#d8dee9", - "peekViewTitle.background": "#3b4252", - "peekViewTitleDescription.foreground": "#d8dee9", - "peekViewTitleLabel.foreground": "#88c0d0", - "pickerGroup.border": "#3b4252", - "pickerGroup.foreground": "#88c0d0", - "progressBar.background": "#88c0d0", - "quickInputList.focusBackground": "#88c0d0", - "quickInputList.focusForeground": "#2e3440", - "sash.hoverBorder": "#88c0d0", - "scrollbar.shadow": "#00000066", - "scrollbarSlider.activeBackground": "#434c5eaa", - "scrollbarSlider.background": "#434c5e99", - "scrollbarSlider.hoverBackground": "#434c5eaa", - "selection.background": "#88c0d099", - "sideBar.background": "#2e3440", - "sideBar.foreground": "#d8dee9", - "sideBar.border": "#3b4252", - "sideBarSectionHeader.background": "#3b4252", - "sideBarSectionHeader.foreground": "#d8dee9", - "sideBarTitle.foreground": "#d8dee9", - "statusBar.background": "#3b4252", - "statusBar.debuggingBackground": "#5e81ac", - "statusBar.debuggingForeground": "#d8dee9", - "statusBar.noFolderForeground": "#d8dee9", - "statusBar.noFolderBackground": "#3b4252", - "statusBar.foreground": "#d8dee9", - "statusBarItem.activeBackground": "#4c566a", - "statusBarItem.hoverBackground": "#434c5e", - "statusBarItem.prominentBackground": "#3b4252", - "statusBarItem.prominentHoverBackground": "#434c5e", - "statusBarItem.errorBackground": "#3b4252", - "statusBarItem.errorForeground": "#bf616a", - "statusBarItem.warningBackground": "#ebcb8b", - "statusBarItem.warningForeground": "#2e3440", - "statusBar.border": "#3b425200", - "tab.activeBackground": "#3b4252", - "tab.activeForeground": "#d8dee9", - "tab.border": "#3b425200", - "tab.activeBorder": "#88c0d000", - "tab.unfocusedActiveBorder": "#88c0d000", - "tab.inactiveBackground": "#2e3440", - "tab.inactiveForeground": "#d8dee966", - "tab.unfocusedActiveForeground": "#d8dee999", - "tab.unfocusedInactiveForeground": "#d8dee966", - "tab.hoverBackground": "#3b4252cc", - "tab.unfocusedHoverBackground": "#3b4252b3", - "tab.hoverBorder": "#88c0d000", - "tab.unfocusedHoverBorder": "#88c0d000", - "tab.activeBorderTop": "#88c0d000", - "tab.unfocusedActiveBorderTop": "#88c0d000", - "tab.lastPinnedBorder": "#4c566a", - "terminal.background": "#2e3440", - "terminal.foreground": "#d8dee9", - "terminal.ansiBlack": "#3b4252", - "terminal.ansiRed": "#bf616a", - "terminal.ansiGreen": "#a3be8c", - "terminal.ansiYellow": "#ebcb8b", - "terminal.ansiBlue": "#81a1c1", - "terminal.ansiMagenta": "#b48ead", - "terminal.ansiCyan": "#88c0d0", - "terminal.ansiWhite": "#e5e9f0", - "terminal.ansiBrightBlack": "#4c566a", - "terminal.ansiBrightRed": "#bf616a", - "terminal.ansiBrightGreen": "#a3be8c", - "terminal.ansiBrightYellow": "#ebcb8b", - "terminal.ansiBrightBlue": "#81a1c1", - "terminal.ansiBrightMagenta": "#b48ead", - "terminal.ansiBrightCyan": "#8fbcbb", - "terminal.ansiBrightWhite": "#eceff4", - "terminal.tab.activeBorder": "#88c0d0", - "textBlockQuote.background": "#3b4252", - "textBlockQuote.border": "#81a1c1", - "textCodeBlock.background": "#4c566a", - "textLink.activeForeground": "#88c0d0", - "textLink.foreground": "#88c0d0", - "textPreformat.foreground": "#8fbcbb", - "textSeparator.foreground": "#eceff4", - "titleBar.activeBackground": "#2e3440", - "titleBar.activeForeground": "#d8dee9", - "titleBar.border": "#2e344000", - "titleBar.inactiveBackground": "#2e3440", - "titleBar.inactiveForeground": "#d8dee966", - "tree.indentGuidesStroke": "#616e88", - "walkThrough.embeddedEditorBackground": "#2e3440", - "welcomePage.buttonBackground": "#434c5e", - "welcomePage.buttonHoverBackground": "#4c566a", - "widget.shadow": "#00000066" - }, - "tokenColors": [ - { - "settings": { - "foreground": "#d8dee9ff", - "background": "#2e3440ff" - } - }, - { - "scope": "emphasis", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "strong", - "settings": { - "fontStyle": "bold" - } - }, - { - "name": "Comment", - "scope": "comment", - "settings": { - "foreground": "#616E88" - } - }, - { - "name": "Constant Character", - "scope": "constant.character", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "Constant Character Escape", - "scope": "constant.character.escape", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "Constant Language", - "scope": "constant.language", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Constant Numeric", - "scope": "constant.numeric", - "settings": { - "foreground": "#B48EAD" - } - }, - { - "name": "Constant Regexp", - "scope": "constant.regexp", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "Entity Name Class/Type", - "scope": ["entity.name.class", "entity.name.type.class"], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "Entity Name Function", - "scope": "entity.name.function", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "Entity Name Tag", - "scope": "entity.name.tag", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Entity Other Attribute Name", - "scope": "entity.other.attribute-name", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "Entity Other Inherited Class", - "scope": "entity.other.inherited-class", - "settings": { - "fontStyle": "bold", - "foreground": "#8FBCBB" - } - }, - { - "name": "Invalid Deprecated", - "scope": "invalid.deprecated", - "settings": { - "foreground": "#D8DEE9", - "background": "#EBCB8B" - } - }, - { - "name": "Invalid Illegal", - "scope": "invalid.illegal", - "settings": { - "foreground": "#D8DEE9", - "background": "#BF616A" - } - }, - { - "name": "Keyword", - "scope": "keyword", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Keyword Operator", - "scope": "keyword.operator", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Keyword Other New", - "scope": "keyword.other.new", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Markup Bold", - "scope": "markup.bold", - "settings": { - "fontStyle": "bold" - } - }, - { - "name": "Markup Changed", - "scope": "markup.changed", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "Markup Deleted", - "scope": "markup.deleted", - "settings": { - "foreground": "#BF616A" - } - }, - { - "name": "Markup Inserted", - "scope": "markup.inserted", - "settings": { - "foreground": "#A3BE8C" - } - }, - { - "name": "Meta Preprocessor", - "scope": "meta.preprocessor", - "settings": { - "foreground": "#5E81AC" - } - }, - { - "name": "Punctuation", - "scope": "punctuation", - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "Punctuation Definition Parameters", - "scope": [ - "punctuation.definition.method-parameters", - "punctuation.definition.function-parameters", - "punctuation.definition.parameters" - ], - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "Punctuation Definition Tag", - "scope": "punctuation.definition.tag", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Punctuation Definition Comment", - "scope": [ - "punctuation.definition.comment", - "punctuation.end.definition.comment", - "punctuation.start.definition.comment" - ], - "settings": { - "foreground": "#616E88" - } - }, - { - "name": "Punctuation Section", - "scope": "punctuation.section", - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "Punctuation Section Embedded", - "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Punctuation Terminator", - "scope": "punctuation.terminator", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Punctuation Variable", - "scope": "punctuation.definition.variable", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Storage", - "scope": "storage", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "String", - "scope": "string", - "settings": { - "foreground": "#A3BE8C" - } - }, - { - "name": "String Regexp", - "scope": "string.regexp", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "Support Class", - "scope": "support.class", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "Support Constant", - "scope": "support.constant", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Support Function", - "scope": "support.function", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "Support Function Construct", - "scope": "support.function.construct", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Support Type", - "scope": "support.type", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "Support Type Exception", - "scope": "support.type.exception", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "Token Debug", - "scope": "token.debug-token", - "settings": { - "foreground": "#b48ead" - } - }, - { - "name": "Token Error", - "scope": "token.error-token", - "settings": { - "foreground": "#bf616a" - } - }, - { - "name": "Token Info", - "scope": "token.info-token", - "settings": { - "foreground": "#88c0d0" - } - }, - { - "name": "Token Warning", - "scope": "token.warn-token", - "settings": { - "foreground": "#ebcb8b" - } - }, - { - "name": "Variable", - "scope": "variable.other", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "Variable Language", - "scope": "variable.language", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "Variable Parameter", - "scope": "variable.parameter", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[C/CPP] Punctuation Separator Pointer-Access", - "scope": "punctuation.separator.pointer-access.c", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[C/CPP] Meta Preprocessor Include", - "scope": ["source.c meta.preprocessor.include", "source.c string.quoted.other.lt-gt.include"], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[C/CPP] Conditional Directive", - "scope": [ - "source.cpp keyword.control.directive.conditional", - "source.cpp punctuation.definition.directive", - "source.c keyword.control.directive.conditional", - "source.c punctuation.definition.directive" - ], - "settings": { - "foreground": "#5E81AC", - "fontStyle": "bold" - } - }, - { - "name": "[CSS] Constant Other Color RGB Value", - "scope": "source.css constant.other.color.rgb-value", - "settings": { - "foreground": "#B48EAD" - } - }, - { - "name": "[CSS](Function) Meta Property-Value", - "scope": "source.css meta.property-value", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[CSS] Media Queries", - "scope": [ - "source.css keyword.control.at-rule.media", - "source.css keyword.control.at-rule.media punctuation.definition.keyword" - ], - "settings": { - "foreground": "#D08770" - } - }, - { - "name": "[CSS] Punctuation Definition Keyword", - "scope": "source.css punctuation.definition.keyword", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[CSS] Support Type Property Name", - "scope": "source.css support.type.property-name", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[diff] Meta Range Context", - "scope": "source.diff meta.diff.range.context", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[diff] Meta Header From-File", - "scope": "source.diff meta.diff.header.from-file", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[diff] Punctuation Definition From-File", - "scope": "source.diff punctuation.definition.from-file", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[diff] Punctuation Definition Range", - "scope": "source.diff punctuation.definition.range", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[diff] Punctuation Definition Separator", - "scope": "source.diff punctuation.definition.separator", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Elixir](JakeBecker.elixir-ls) module names", - "scope": "entity.name.type.module.elixir", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Elixir](JakeBecker.elixir-ls) module attributes", - "scope": "variable.other.readwrite.module.elixir", - "settings": { - "foreground": "#D8DEE9", - "fontStyle": "bold" - } - }, - { - "name": "[Elixir](JakeBecker.elixir-ls) atoms", - "scope": "constant.other.symbol.elixir", - "settings": { - "foreground": "#D8DEE9", - "fontStyle": "bold" - } - }, - { - "name": "[Elixir](JakeBecker.elixir-ls) modules", - "scope": "variable.other.constant.elixir", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Go] String Format Placeholder", - "scope": "source.go constant.other.placeholder.go", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "[Java](JavaDoc) Comment Block Documentation HTML Entities", - "scope": "source.java comment.block.documentation.javadoc punctuation.definition.entity.html", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Java](JavaDoc) Constant Other", - "scope": "source.java constant.other", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[Java](JavaDoc) Keyword Other Documentation", - "scope": "source.java keyword.other.documentation", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java](JavaDoc) Keyword Other Documentation Author", - "scope": "source.java keyword.other.documentation.author.javadoc", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java](JavaDoc) Keyword Other Documentation Directive/Custom", - "scope": ["source.java keyword.other.documentation.directive", "source.java keyword.other.documentation.custom"], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java](JavaDoc) Keyword Other Documentation See", - "scope": "source.java keyword.other.documentation.see.javadoc", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java] Meta Method-Call", - "scope": "source.java meta.method-call meta.method", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Java](JavaDoc) Meta Tag Template Link", - "scope": ["source.java meta.tag.template.link.javadoc", "source.java string.other.link.title.javadoc"], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java](JavaDoc) Meta Tag Template Value", - "scope": "source.java meta.tag.template.value.javadoc", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Java](JavaDoc) Punctuation Definition Keyword", - "scope": "source.java punctuation.definition.keyword.javadoc", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java](JavaDoc) Punctuation Definition Tag", - "scope": [ - "source.java punctuation.definition.tag.begin.javadoc", - "source.java punctuation.definition.tag.end.javadoc" - ], - "settings": { - "foreground": "#616E88" - } - }, - { - "name": "[Java] Storage Modifier Import", - "scope": "source.java storage.modifier.import", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java] Storage Modifier Package", - "scope": "source.java storage.modifier.package", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java] Storage Type", - "scope": "source.java storage.type", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java] Storage Type Annotation", - "scope": "source.java storage.type.annotation", - "settings": { - "foreground": "#D08770" - } - }, - { - "name": "[Java] Storage Type Generic", - "scope": "source.java storage.type.generic", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Java] Storage Type Primitive", - "scope": "source.java storage.type.primitive", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[JavaScript] Decorator", - "scope": [ - "source.js punctuation.decorator", - "source.js meta.decorator variable.other.readwrite", - "source.js meta.decorator entity.name.function" - ], - "settings": { - "foreground": "#D08770" - } - }, - { - "name": "[JavaScript] Meta Object-Literal Key", - "scope": "source.js meta.object-literal.key", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[JavaScript](JSDoc) Storage Type Class", - "scope": "source.js storage.type.class.jsdoc", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[JavaScript] String Template Literals Punctuation", - "scope": [ - "source.js string.quoted.template punctuation.quasi.element.begin", - "source.js string.quoted.template punctuation.quasi.element.end", - "source.js string.template punctuation.definition.template-expression" - ], - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[JavaScript] Interpolated String Template Punctuation Functions", - "scope": "source.js string.quoted.template meta.method-call.with-arguments", - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "[JavaScript] String Template Literal Variable", - "scope": [ - "source.js string.template meta.template.expression support.variable.property", - "source.js string.template meta.template.expression variable.other.object" - ], - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[JavaScript] Support Type Primitive", - "scope": "source.js support.type.primitive", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[JavaScript] Variable Other Object", - "scope": "source.js variable.other.object", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[JavaScript] Variable Other Read-Write Alias", - "scope": "source.js variable.other.readwrite.alias", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[JavaScript] Parentheses in Template Strings", - "scope": [ - "source.js meta.embedded.line meta.brace.square", - "source.js meta.embedded.line meta.brace.round", - /* Required for extension `mgmcdermott.vscode-language-babel`. */ - "source.js string.quoted.template meta.brace.square", - "source.js string.quoted.template meta.brace.round" - ], - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "[HTML] Constant Character Entity", - "scope": "text.html.basic constant.character.entity.html", - "settings": { - "foreground": "#EBCB8B" - } - }, - { - "name": "[HTML] Constant Other Inline-Data", - "scope": "text.html.basic constant.other.inline-data", - "settings": { - "foreground": "#D08770", - "fontStyle": "italic" - } - }, - { - "name": "[HTML] Meta Tag SGML Doctype", - "scope": "text.html.basic meta.tag.sgml.doctype", - "settings": { - "foreground": "#5E81AC" - } - }, - { - "name": "[HTML] Punctuation Definition Entity", - "scope": "text.html.basic punctuation.definition.entity", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[INI] Entity Name Section Group-Title", - "scope": "source.properties entity.name.section.group-title.ini", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[INI] Punctuation Separator Key-Value", - "scope": "source.properties punctuation.separator.key-value.ini", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] Markup Fenced Code Block", - "scope": [ - "text.html.markdown markup.fenced_code.block", - "text.html.markdown markup.fenced_code.block punctuation.definition" - ], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Markdown] Markup Heading", - "scope": "markup.heading", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Markdown] Markup Inline", - "scope": [ - "text.html.markdown markup.inline.raw", - "text.html.markdown markup.inline.raw punctuation.definition.raw" - ], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Markdown] Markup Italic", - "scope": "text.html.markdown markup.italic", - "settings": { - "fontStyle": "italic" - } - }, - { - "name": "[Markdown] Markup Link", - "scope": "text.html.markdown markup.underline.link", - "settings": { - "fontStyle": "underline" - } - }, - { - "name": "[Markdown] Markup List Numbered/Unnumbered", - "scope": "text.html.markdown beginning.punctuation.definition.list", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] Markup Quote Punctuation Definition", - "scope": "text.html.markdown beginning.punctuation.definition.quote", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[Markdown] Markup Quote Punctuation Definition", - "scope": "text.html.markdown markup.quote", - "settings": { - "foreground": "#616E88" - } - }, - { - "name": "[Markdown] Markup Math Constant", - "scope": "text.html.markdown constant.character.math.tex", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] Markup Math Definition Marker", - "scope": [ - "text.html.markdown punctuation.definition.math.begin", - "text.html.markdown punctuation.definition.math.end" - ], - "settings": { - "foreground": "#5E81AC" - } - }, - { - "name": "[Markdown] Markup Math Function Definition Marker", - "scope": "text.html.markdown punctuation.definition.function.math.tex", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Markdown] Markup Math Operator", - "scope": "text.html.markdown punctuation.math.operator.latex", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] Punctuation Definition Heading", - "scope": "text.html.markdown punctuation.definition.heading", - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] Punctuation Definition Constant/String", - "scope": [ - "text.html.markdown punctuation.definition.constant", - "text.html.markdown punctuation.definition.string" - ], - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[Markdown] String Other Link Description/Title", - "scope": [ - "text.html.markdown constant.other.reference.link", - "text.html.markdown string.other.link.description", - "text.html.markdown string.other.link.title" - ], - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Perl] Perl Sigils", - "scope": "source.perl punctuation.definition.variable", - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[PHP] Meta Function-Call Object", - "scope": ["source.php meta.function-call", "source.php meta.function-call.object"], - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Python] Decorator", - "scope": ["source.python entity.name.function.decorator", "source.python meta.function.decorator support.type"], - "settings": { - "foreground": "#D08770" - } - }, - { - "name": "[Python] Function Call", - "scope": "source.python meta.function-call.generic", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Python] Support Type", - "scope": "source.python support.type", - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[Python] Function Parameter", - "scope": ["source.python variable.parameter.function.language"], - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[Python] Function Parameter Special", - "scope": ["source.python meta.function.parameters variable.parameter.function.language.special.self"], - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[SCSS] Punctuation Definition Interpolation Bracket Curly", - "scope": [ - "source.css.scss punctuation.definition.interpolation.begin.bracket.curly", - "source.css.scss punctuation.definition.interpolation.end.bracket.curly" - ], - "settings": { - "foreground": "#81A1C1" - } - }, - { - "name": "[SCSS] Variable Interpolation", - "scope": "source.css.scss variable.interpolation", - "settings": { - "foreground": "#D8DEE9", - "fontStyle": "italic" - } - }, - { - "name": "[TypeScript] Decorators", - "scope": [ - "source.ts punctuation.decorator", - "source.ts meta.decorator variable.other.readwrite", - "source.ts meta.decorator entity.name.function", - "source.tsx punctuation.decorator", - "source.tsx meta.decorator variable.other.readwrite", - "source.tsx meta.decorator entity.name.function" - ], - "settings": { - "foreground": "#D08770" - } - }, - { - "name": "[TypeScript] Object-literal keys", - "scope": ["source.ts meta.object-literal.key", "source.tsx meta.object-literal.key"], - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[TypeScript] Object-literal functions", - "scope": [ - "source.ts meta.object-literal.key entity.name.function", - "source.tsx meta.object-literal.key entity.name.function" - ], - "settings": { - "foreground": "#88C0D0" - } - }, - { - "name": "[TypeScript] Type/Class", - "scope": [ - "source.ts support.class", - "source.ts support.type", - "source.ts entity.name.type", - "source.ts entity.name.class", - "source.tsx support.class", - "source.tsx support.type", - "source.tsx entity.name.type", - "source.tsx entity.name.class" - ], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[TypeScript] Static Class Support", - "scope": [ - "source.ts support.constant.math", - "source.ts support.constant.dom", - "source.ts support.constant.json", - "source.tsx support.constant.math", - "source.tsx support.constant.dom", - "source.tsx support.constant.json" - ], - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[TypeScript] Variables", - "scope": ["source.ts support.variable", "source.tsx support.variable"], - "settings": { - "foreground": "#D8DEE9" - } - }, - { - "name": "[TypeScript] Parentheses in Template Strings", - "scope": [ - "source.ts meta.embedded.line meta.brace.square", - "source.ts meta.embedded.line meta.brace.round", - "source.tsx meta.embedded.line meta.brace.square", - "source.tsx meta.embedded.line meta.brace.round" - ], - "settings": { - "foreground": "#ECEFF4" - } - }, - { - "name": "[XML] Entity Name Tag Namespace", - "scope": "text.xml entity.name.tag.namespace", - "settings": { - "foreground": "#8FBCBB" - } - }, - { - "name": "[XML] Keyword Other Doctype", - "scope": "text.xml keyword.other.doctype", - "settings": { - "foreground": "#5E81AC" - } - }, - { - "name": "[XML] Meta Tag Preprocessor", - "scope": "text.xml meta.tag.preprocessor entity.name.tag", - "settings": { - "foreground": "#5E81AC" - } - }, - { - "name": "[XML] Entity Name Tag Namespace", - "scope": ["text.xml string.unquoted.cdata", "text.xml string.unquoted.cdata punctuation.definition.string"], - "settings": { - "foreground": "#D08770", - "fontStyle": "italic" - } - }, - { - "name": "[YAML] Entity Name Tag", - "scope": "source.yaml entity.name.tag", - "settings": { - "foreground": "#8FBCBB" - } - } - ] + "panel.background": "#2e3440", + "panel.border": "#3b4252", + "panelTitle.activeBorder": "#88c0d000", + "panelTitle.activeForeground": "#88c0d0", + "panelTitle.inactiveForeground": "#d8dee9", + "peekView.border": "#4c566a", + "peekViewEditor.background": "#2e3440", + "peekViewEditorGutter.background": "#2e3440", + "peekViewEditor.matchHighlightBackground": "#88c0d04d", + "peekViewResult.background": "#2e3440", + "peekViewResult.fileForeground": "#88c0d0", + "peekViewResult.lineForeground": "#d8dee966", + "peekViewResult.matchHighlightBackground": "#88c0d0cc", + "peekViewResult.selectionBackground": "#434c5e", + "peekViewResult.selectionForeground": "#d8dee9", + "peekViewTitle.background": "#3b4252", + "peekViewTitleDescription.foreground": "#d8dee9", + "peekViewTitleLabel.foreground": "#88c0d0", + "pickerGroup.border": "#3b4252", + "pickerGroup.foreground": "#88c0d0", + "progressBar.background": "#88c0d0", + "quickInputList.focusBackground": "#88c0d0", + "quickInputList.focusForeground": "#2e3440", + "sash.hoverBorder": "#88c0d0", + "scrollbar.shadow": "#00000066", + "scrollbarSlider.activeBackground": "#434c5eaa", + "scrollbarSlider.background": "#434c5e99", + "scrollbarSlider.hoverBackground": "#434c5eaa", + "selection.background": "#88c0d099", + "sideBar.background": "#2e3440", + "sideBar.foreground": "#d8dee9", + "sideBar.border": "#3b4252", + "sideBarSectionHeader.background": "#3b4252", + "sideBarSectionHeader.foreground": "#d8dee9", + "sideBarTitle.foreground": "#d8dee9", + "statusBar.background": "#3b4252", + "statusBar.debuggingBackground": "#5e81ac", + "statusBar.debuggingForeground": "#d8dee9", + "statusBar.noFolderForeground": "#d8dee9", + "statusBar.noFolderBackground": "#3b4252", + "statusBar.foreground": "#d8dee9", + "statusBarItem.activeBackground": "#4c566a", + "statusBarItem.hoverBackground": "#434c5e", + "statusBarItem.prominentBackground": "#3b4252", + "statusBarItem.prominentHoverBackground": "#434c5e", + "statusBarItem.errorBackground": "#3b4252", + "statusBarItem.errorForeground": "#bf616a", + "statusBarItem.warningBackground": "#ebcb8b", + "statusBarItem.warningForeground": "#2e3440", + "statusBar.border": "#3b425200", + "tab.activeBackground": "#3b4252", + "tab.activeForeground": "#d8dee9", + "tab.border": "#3b425200", + "tab.activeBorder": "#88c0d000", + "tab.unfocusedActiveBorder": "#88c0d000", + "tab.inactiveBackground": "#2e3440", + "tab.inactiveForeground": "#d8dee966", + "tab.unfocusedActiveForeground": "#d8dee999", + "tab.unfocusedInactiveForeground": "#d8dee966", + "tab.hoverBackground": "#3b4252cc", + "tab.unfocusedHoverBackground": "#3b4252b3", + "tab.hoverBorder": "#88c0d000", + "tab.unfocusedHoverBorder": "#88c0d000", + "tab.activeBorderTop": "#88c0d000", + "tab.unfocusedActiveBorderTop": "#88c0d000", + "tab.lastPinnedBorder": "#4c566a", + "terminal.background": "#2e3440", + "terminal.foreground": "#d8dee9", + "terminal.ansiBlack": "#3b4252", + "terminal.ansiRed": "#bf616a", + "terminal.ansiGreen": "#a3be8c", + "terminal.ansiYellow": "#ebcb8b", + "terminal.ansiBlue": "#81a1c1", + "terminal.ansiMagenta": "#b48ead", + "terminal.ansiCyan": "#88c0d0", + "terminal.ansiWhite": "#e5e9f0", + "terminal.ansiBrightBlack": "#4c566a", + "terminal.ansiBrightRed": "#bf616a", + "terminal.ansiBrightGreen": "#a3be8c", + "terminal.ansiBrightYellow": "#ebcb8b", + "terminal.ansiBrightBlue": "#81a1c1", + "terminal.ansiBrightMagenta": "#b48ead", + "terminal.ansiBrightCyan": "#8fbcbb", + "terminal.ansiBrightWhite": "#eceff4", + "terminal.tab.activeBorder": "#88c0d0", + "textBlockQuote.background": "#3b4252", + "textBlockQuote.border": "#81a1c1", + "textCodeBlock.background": "#4c566a", + "textLink.activeForeground": "#88c0d0", + "textLink.foreground": "#88c0d0", + "textPreformat.foreground": "#8fbcbb", + "textSeparator.foreground": "#eceff4", + "titleBar.activeBackground": "#2e3440", + "titleBar.activeForeground": "#d8dee9", + "titleBar.border": "#2e344000", + "titleBar.inactiveBackground": "#2e3440", + "titleBar.inactiveForeground": "#d8dee966", + "tree.indentGuidesStroke": "#616e88", + "walkThrough.embeddedEditorBackground": "#2e3440", + "welcomePage.buttonBackground": "#434c5e", + "welcomePage.buttonHoverBackground": "#4c566a", + "widget.shadow": "#00000066" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#d8dee9ff", + "background": "#2e3440ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Constant Character", + "scope": "constant.character", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Language", + "scope": "constant.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Constant Numeric", + "scope": "constant.numeric", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "Constant Regexp", + "scope": "constant.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Entity Name Class/Type", + "scope": ["entity.name.class", "entity.name.type.class"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Entity Name Tag", + "scope": "entity.name.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Entity Other Attribute Name", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Other Inherited Class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "bold", + "foreground": "#8FBCBB" + } + }, + { + "name": "Invalid Deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#D8DEE9", + "background": "#EBCB8B" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#D8DEE9", + "background": "#BF616A" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Other New", + "scope": "keyword.other.new", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Changed", + "scope": "markup.changed", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Markup Deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#BF616A" + } + }, + { + "name": "Markup Inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "Meta Preprocessor", + "scope": "meta.preprocessor", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": [ + "punctuation.definition.method-parameters", + "punctuation.definition.function-parameters", + "punctuation.definition.parameters" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Tag", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Definition Comment", + "scope": [ + "punctuation.definition.comment", + "punctuation.end.definition.comment", + "punctuation.start.definition.comment" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Punctuation Section", + "scope": "punctuation.section", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Terminator", + "scope": "punctuation.terminator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Variable", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "String Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Support Class", + "scope": "support.class", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Constant", + "scope": "support.constant", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Support Function Construct", + "scope": "support.function.construct", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Type", + "scope": "support.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Type Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Token Debug", + "scope": "token.debug-token", + "settings": { + "foreground": "#b48ead" + } + }, + { + "name": "Token Error", + "scope": "token.error-token", + "settings": { + "foreground": "#bf616a" + } + }, + { + "name": "Token Info", + "scope": "token.info-token", + "settings": { + "foreground": "#88c0d0" + } + }, + { + "name": "Token Warning", + "scope": "token.warn-token", + "settings": { + "foreground": "#ebcb8b" + } + }, + { + "name": "Variable", + "scope": "variable.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "Variable Language", + "scope": "variable.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Variable Parameter", + "scope": "variable.parameter", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[C/CPP] Punctuation Separator Pointer-Access", + "scope": "punctuation.separator.pointer-access.c", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[C/CPP] Meta Preprocessor Include", + "scope": [ + "source.c meta.preprocessor.include", + "source.c string.quoted.other.lt-gt.include" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[C/CPP] Conditional Directive", + "scope": [ + "source.cpp keyword.control.directive.conditional", + "source.cpp punctuation.definition.directive", + "source.c keyword.control.directive.conditional", + "source.c punctuation.definition.directive" + ], + "settings": { + "foreground": "#5E81AC", + "fontStyle": "bold" + } + }, + { + "name": "[CSS] Constant Other Color RGB Value", + "scope": "source.css constant.other.color.rgb-value", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "[CSS](Function) Meta Property-Value", + "scope": "source.css meta.property-value", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[CSS] Media Queries", + "scope": [ + "source.css keyword.control.at-rule.media", + "source.css keyword.control.at-rule.media punctuation.definition.keyword" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[CSS] Punctuation Definition Keyword", + "scope": "source.css punctuation.definition.keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[CSS] Support Type Property Name", + "scope": "source.css support.type.property-name", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[diff] Meta Range Context", + "scope": "source.diff meta.diff.range.context", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Meta Header From-File", + "scope": "source.diff meta.diff.header.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition From-File", + "scope": "source.diff punctuation.definition.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Range", + "scope": "source.diff punctuation.definition.range", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Separator", + "scope": "source.diff punctuation.definition.separator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module names", + "scope": "entity.name.type.module.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module attributes", + "scope": "variable.other.readwrite.module.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) atoms", + "scope": "constant.other.symbol.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) modules", + "scope": "variable.other.constant.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Go] String Format Placeholder", + "scope": "source.go constant.other.placeholder.go", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[Java](JavaDoc) Comment Block Documentation HTML Entities", + "scope": "source.java comment.block.documentation.javadoc punctuation.definition.entity.html", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Java](JavaDoc) Constant Other", + "scope": "source.java constant.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation", + "scope": "source.java keyword.other.documentation", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Author", + "scope": "source.java keyword.other.documentation.author.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Directive/Custom", + "scope": [ + "source.java keyword.other.documentation.directive", + "source.java keyword.other.documentation.custom" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation See", + "scope": "source.java keyword.other.documentation.see.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Meta Method-Call", + "scope": "source.java meta.method-call meta.method", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Link", + "scope": [ + "source.java meta.tag.template.link.javadoc", + "source.java string.other.link.title.javadoc" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Value", + "scope": "source.java meta.tag.template.value.javadoc", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Keyword", + "scope": "source.java punctuation.definition.keyword.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Tag", + "scope": [ + "source.java punctuation.definition.tag.begin.javadoc", + "source.java punctuation.definition.tag.end.javadoc" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Java] Storage Modifier Import", + "scope": "source.java storage.modifier.import", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Modifier Package", + "scope": "source.java storage.modifier.package", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type", + "scope": "source.java storage.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Annotation", + "scope": "source.java storage.type.annotation", + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Java] Storage Type Generic", + "scope": "source.java storage.type.generic", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Primitive", + "scope": "source.java storage.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Decorator", + "scope": [ + "source.js punctuation.decorator", + "source.js meta.decorator variable.other.readwrite", + "source.js meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[JavaScript] Meta Object-Literal Key", + "scope": "source.js meta.object-literal.key", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[JavaScript](JSDoc) Storage Type Class", + "scope": "source.js storage.type.class.jsdoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] String Template Literals Punctuation", + "scope": [ + "source.js string.quoted.template punctuation.quasi.element.begin", + "source.js string.quoted.template punctuation.quasi.element.end", + "source.js string.template punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Interpolated String Template Punctuation Functions", + "scope": "source.js string.quoted.template meta.method-call.with-arguments", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[JavaScript] String Template Literal Variable", + "scope": [ + "source.js string.template meta.template.expression support.variable.property", + "source.js string.template meta.template.expression variable.other.object" + ], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Support Type Primitive", + "scope": "source.js support.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Variable Other Object", + "scope": "source.js variable.other.object", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Variable Other Read-Write Alias", + "scope": "source.js variable.other.readwrite.alias", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] Parentheses in Template Strings", + "scope": [ + "source.js meta.embedded.line meta.brace.square", + "source.js meta.embedded.line meta.brace.round", + "source.js string.quoted.template meta.brace.square", + "source.js string.quoted.template meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[HTML] Constant Character Entity", + "scope": "text.html.basic constant.character.entity.html", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[HTML] Constant Other Inline-Data", + "scope": "text.html.basic constant.other.inline-data", + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[HTML] Meta Tag SGML Doctype", + "scope": "text.html.basic meta.tag.sgml.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[HTML] Punctuation Definition Entity", + "scope": "text.html.basic punctuation.definition.entity", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[INI] Entity Name Section Group-Title", + "scope": "source.properties entity.name.section.group-title.ini", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[INI] Punctuation Separator Key-Value", + "scope": "source.properties punctuation.separator.key-value.ini", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Fenced Code Block", + "scope": [ + "text.html.markdown markup.fenced_code.block", + "text.html.markdown markup.fenced_code.block punctuation.definition" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Heading", + "scope": "markup.heading", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Inline", + "scope": [ + "text.html.markdown markup.inline.raw", + "text.html.markdown markup.inline.raw punctuation.definition.raw" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Italic", + "scope": "text.html.markdown markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "[Markdown] Markup Link", + "scope": "text.html.markdown markup.underline.link", + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "[Markdown] Markup List Numbered/Unnumbered", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown beginning.punctuation.definition.quote", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown markup.quote", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Markdown] Markup Math Constant", + "scope": "text.html.markdown constant.character.math.tex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Math Definition Marker", + "scope": [ + "text.html.markdown punctuation.definition.math.begin", + "text.html.markdown punctuation.definition.math.end" + ], + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[Markdown] Markup Math Function Definition Marker", + "scope": "text.html.markdown punctuation.definition.function.math.tex", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Math Operator", + "scope": "text.html.markdown punctuation.math.operator.latex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Heading", + "scope": "text.html.markdown punctuation.definition.heading", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Constant/String", + "scope": [ + "text.html.markdown punctuation.definition.constant", + "text.html.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] String Other Link Description/Title", + "scope": [ + "text.html.markdown constant.other.reference.link", + "text.html.markdown string.other.link.description", + "text.html.markdown string.other.link.title" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Perl] Perl Sigils", + "scope": "source.perl punctuation.definition.variable", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[PHP] Meta Function-Call Object", + "scope": ["source.php meta.function-call", "source.php meta.function-call.object"], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Decorator", + "scope": [ + "source.python entity.name.function.decorator", + "source.python meta.function.decorator support.type" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Python] Function Call", + "scope": "source.python meta.function-call.generic", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Support Type", + "scope": "source.python support.type", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Function Parameter", + "scope": ["source.python variable.parameter.function.language"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Python] Function Parameter Special", + "scope": [ + "source.python meta.function.parameters variable.parameter.function.language.special.self" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[SCSS] Punctuation Definition Interpolation Bracket Curly", + "scope": [ + "source.css.scss punctuation.definition.interpolation.begin.bracket.curly", + "source.css.scss punctuation.definition.interpolation.end.bracket.curly" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[SCSS] Variable Interpolation", + "scope": "source.css.scss variable.interpolation", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "italic" + } + }, + { + "name": "[TypeScript] Decorators", + "scope": [ + "source.ts punctuation.decorator", + "source.ts meta.decorator variable.other.readwrite", + "source.ts meta.decorator entity.name.function", + "source.tsx punctuation.decorator", + "source.tsx meta.decorator variable.other.readwrite", + "source.tsx meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[TypeScript] Object-literal keys", + "scope": ["source.ts meta.object-literal.key", "source.tsx meta.object-literal.key"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Object-literal functions", + "scope": [ + "source.ts meta.object-literal.key entity.name.function", + "source.tsx meta.object-literal.key entity.name.function" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[TypeScript] Type/Class", + "scope": [ + "source.ts support.class", + "source.ts support.type", + "source.ts entity.name.type", + "source.ts entity.name.class", + "source.tsx support.class", + "source.tsx support.type", + "source.tsx entity.name.type", + "source.tsx entity.name.class" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Static Class Support", + "scope": [ + "source.ts support.constant.math", + "source.ts support.constant.dom", + "source.ts support.constant.json", + "source.tsx support.constant.math", + "source.tsx support.constant.dom", + "source.tsx support.constant.json" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Variables", + "scope": ["source.ts support.variable", "source.tsx support.variable"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Parentheses in Template Strings", + "scope": [ + "source.ts meta.embedded.line meta.brace.square", + "source.ts meta.embedded.line meta.brace.round", + "source.tsx meta.embedded.line meta.brace.square", + "source.tsx meta.embedded.line meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": "text.xml entity.name.tag.namespace", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[XML] Keyword Other Doctype", + "scope": "text.xml keyword.other.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Meta Tag Preprocessor", + "scope": "text.xml meta.tag.preprocessor entity.name.tag", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": [ + "text.xml string.unquoted.cdata", + "text.xml string.unquoted.cdata punctuation.definition.string" + ], + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[YAML] Entity Name Tag", + "scope": "source.yaml entity.name.tag", + "settings": { + "foreground": "#8FBCBB" + } + } + ] } diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index c1bba121e1bff5895a68b3acacd33943441d28a9..bc6f8dbe945a2c137409b5bfddd1d796a65b3616 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -1,4 +1,4 @@ -use crate::{zed_pro_family, ThemeFamily, ThemeVariant}; +use crate::{all_imported_themes, zed_pro_family, ThemeFamily, ThemeVariant}; use anyhow::{anyhow, Result}; use gpui::SharedString; use std::{collections::HashMap, sync::Arc}; @@ -42,7 +42,10 @@ impl Default for ThemeRegistry { themes: HashMap::default(), }; - this.insert_theme_families([zed_pro_family()]); + let mut all_themes = vec![zed_pro_family()]; + all_themes.extend(all_imported_themes()); + + this.insert_theme_families(all_themes); this } diff --git a/crates/theme2/src/themes/.gitkeep b/crates/theme2/src/themes/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 780c002a76fa099da84b879858d050b6e7954f31..8b32d20480d8104aea8e1fa4e6886347d68d4357 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -8,10 +8,10 @@ pub fn andromeda() -> ThemeFamily { ThemeFamily { - id: "59c3749c-1bd0-4ee7-903b-5ffc7d097bf1".into(), + id: "0d2fdd0e-de6d-44b2-8f16-f4da10a78f2e".into(), name: "Andromeda".into(), author: "Eliver Lara (EliverLara)".into(), - themes: vec![ThemeVariant { id: "bdd515ce-a2e2-4414-a877-521bde0b47a1".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x23262eff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x23262eff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "c296bb0e-d931-4b11-a480-b1b79cc931b3".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x262933ff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x262933ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + themes: vec![ThemeVariant { id: "8a4e3be2-0ea0-4a0c-9fee-bc63123205ba".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x23262eff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x23262eff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "812f0805-5f84-4f3f-97d3-b38b44307132".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x262933ff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x262933ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 664c6e4938786d8bfa6c2ef7c038ba7ca96bfb4c..4e12340d3f223aea6a58a1decaf5ae7ee93d6b87 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -8,10 +8,10 @@ pub fn ayu() -> ThemeFamily { ThemeFamily { - id: "d002a0c0-915d-4778-9b6e-33e212ce36ad".into(), + id: "769923cd-f2b6-4675-96b8-8a2953fc635b".into(), name: "Ayu".into(), author: "dempfi (Ike Ku)".into(), - themes: vec![ThemeVariant { id: "5c9909bb-b36d-438d-bad3-0a4d4d1d98cd".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6b7d8f1f).into(), border_variant: rgba(0x6b7d8f1f).into(), border_focused: rgba(0x6b7d8f1f).into(), border_transparent: rgba(0x6b7d8f1f).into(), elevated_surface_background: rgba(0xf8f9faff).into(), surface_background: rgba(0xf8f9faff).into(), background: rgba(0xf8f9faff).into(), element_background: rgba(0xffaa32ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x8a9199ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf8f9faff).into(), tab_active_background: rgba(0xf8f9faff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf8f9faff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7070ff).into(), terminal_ansi_bright_green: rgba(0x86b300ff).into(), terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), terminal_ansi_bright_magenta: rgba(0xa37accff).into(), terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), terminal_ansi_black: rgba(0x000000ff).into(), terminal_ansi_red: rgba(0xea6c6dff).into(), terminal_ansi_green: rgba(0x6cbf43ff).into(), terminal_ansi_yellow: rgba(0xeca944ff).into(), terminal_ansi_blue: rgba(0x3198e1ff).into(), terminal_ansi_magenta: rgba(0x9e75c7ff).into(), terminal_ansi_cyan: rgba(0x46ba94ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "fc965133-79ea-408a-8418-6e58124d6116".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x171a24ff).into(), border_variant: rgba(0x171a24ff).into(), border_focused: rgba(0x171a24ff).into(), border_transparent: rgba(0x171a24ff).into(), elevated_surface_background: rgba(0x1f2430ff).into(), surface_background: rgba(0x1f2430ff).into(), background: rgba(0x1f2430ff).into(), element_background: rgba(0xffcb65ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x707a8cff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1f2430ff).into(), tab_active_background: rgba(0x1f2430ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f2430ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xf18678ff).into(), terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), terminal_ansi_bright_blue: rgba(0x73cfffff).into(), terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x171a24ff).into(), terminal_ansi_red: rgba(0xed8173ff).into(), terminal_ansi_green: rgba(0x86d96bff).into(), terminal_ansi_yellow: rgba(0xfacc6eff).into(), terminal_ansi_blue: rgba(0x6ccafaff).into(), terminal_ansi_magenta: rgba(0xdabafaff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3b9fd3a3-3582-4de9-ae4b-dfffccc0f0e0".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1e232bff).into(), border_variant: rgba(0x1e232bff).into(), border_focused: rgba(0x1e232bff).into(), border_transparent: rgba(0x1e232bff).into(), elevated_surface_background: rgba(0x0b0e14ff).into(), surface_background: rgba(0x0b0e14ff).into(), background: rgba(0x0b0e14ff).into(), element_background: rgba(0xe6b450ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x565b66ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x0b0e14ff).into(), tab_active_background: rgba(0x0b0e14ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0b0e14ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7077ff).into(), terminal_ansi_bright_green: rgba(0xa9d94bff).into(), terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x1e232bff).into(), terminal_ansi_red: rgba(0xea6c72ff).into(), terminal_ansi_green: rgba(0x7ed962ff).into(), terminal_ansi_yellow: rgba(0xf9af4fff).into(), terminal_ansi_blue: rgba(0x52bdfaff).into(), terminal_ansi_magenta: rgba(0xcca1faff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + themes: vec![ThemeVariant { id: "f6ae55e2-a844-47ba-a720-ca88dd7b2a12".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6b7d8f1f).into(), border_variant: rgba(0x6b7d8f1f).into(), border_focused: rgba(0x6b7d8f1f).into(), border_disabled: rgba(0x6b7d8f1f).into(), border_selected: rgba(0x6b7d8f1f).into(), border_transparent: rgba(0x6b7d8f1f).into(), elevated_surface_background: rgba(0xf8f9faff).into(), surface_background: rgba(0xf8f9faff).into(), background: rgba(0xf8f9faff).into(), element_background: rgba(0xffaa32ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x8a9199ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf8f9faff).into(), tab_active_background: rgba(0xf8f9faff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf8f9faff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7070ff).into(), terminal_ansi_bright_green: rgba(0x86b300ff).into(), terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), terminal_ansi_bright_magenta: rgba(0xa37accff).into(), terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), terminal_ansi_black: rgba(0x000000ff).into(), terminal_ansi_red: rgba(0xea6c6dff).into(), terminal_ansi_green: rgba(0x6cbf43ff).into(), terminal_ansi_yellow: rgba(0xeca944ff).into(), terminal_ansi_blue: rgba(0x3198e1ff).into(), terminal_ansi_magenta: rgba(0x9e75c7ff).into(), terminal_ansi_cyan: rgba(0x46ba94ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "440f604c-3a70-4bac-901a-2dc92c7a241a".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x171a24ff).into(), border_variant: rgba(0x171a24ff).into(), border_focused: rgba(0x171a24ff).into(), border_disabled: rgba(0x171a24ff).into(), border_selected: rgba(0x171a24ff).into(), border_transparent: rgba(0x171a24ff).into(), elevated_surface_background: rgba(0x1f2430ff).into(), surface_background: rgba(0x1f2430ff).into(), background: rgba(0x1f2430ff).into(), element_background: rgba(0xffcb65ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x707a8cff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1f2430ff).into(), tab_active_background: rgba(0x1f2430ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f2430ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xf18678ff).into(), terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), terminal_ansi_bright_blue: rgba(0x73cfffff).into(), terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x171a24ff).into(), terminal_ansi_red: rgba(0xed8173ff).into(), terminal_ansi_green: rgba(0x86d96bff).into(), terminal_ansi_yellow: rgba(0xfacc6eff).into(), terminal_ansi_blue: rgba(0x6ccafaff).into(), terminal_ansi_magenta: rgba(0xdabafaff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "0135d1f0-1331-4e5a-9634-73e8f72356d0".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1e232bff).into(), border_variant: rgba(0x1e232bff).into(), border_focused: rgba(0x1e232bff).into(), border_disabled: rgba(0x1e232bff).into(), border_selected: rgba(0x1e232bff).into(), border_transparent: rgba(0x1e232bff).into(), elevated_surface_background: rgba(0x0b0e14ff).into(), surface_background: rgba(0x0b0e14ff).into(), background: rgba(0x0b0e14ff).into(), element_background: rgba(0xe6b450ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x565b66ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x0b0e14ff).into(), tab_active_background: rgba(0x0b0e14ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0b0e14ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7077ff).into(), terminal_ansi_bright_green: rgba(0xa9d94bff).into(), terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x1e232bff).into(), terminal_ansi_red: rgba(0xea6c72ff).into(), terminal_ansi_green: rgba(0x7ed962ff).into(), terminal_ansi_yellow: rgba(0xf9af4fff).into(), terminal_ansi_blue: rgba(0x52bdfaff).into(), terminal_ansi_magenta: rgba(0xcca1faff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index 3bb9d0c0bc1e9978a507cd1fa0d73e7ab7784954..aff13ecae5c282cb30e8001fdab4243797994555 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -8,10 +8,10 @@ pub fn dracula() -> ThemeFamily { ThemeFamily { - id: "a8d7fe1f-5446-4d10-a462-5c4693d889d3".into(), + id: "690e6a78-4aa6-471e-a342-4d0e0ee14952".into(), name: "Dracula".into(), author: "Zeno Rocha".into(), - themes: vec![ThemeVariant { id: "ff2a239f-097b-4c86-a517-14011cd7fb52".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xbd93f9ff).into(), border_variant: rgba(0xbd93f9ff).into(), border_focused: rgba(0xbd93f9ff).into(), border_transparent: rgba(0xbd93f9ff).into(), elevated_surface_background: rgba(0x282a35ff).into(), surface_background: rgba(0x282a35ff).into(), background: rgba(0x282a35ff).into(), element_background: rgba(0x44475aff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xf8f8f2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x21222cff).into(), tab_active_background: rgba(0x282a35ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282a35ff).into(), terminal_ansi_bright_black: rgba(0x6272a4ff).into(), terminal_ansi_bright_red: rgba(0xff6d6dff).into(), terminal_ansi_bright_green: rgba(0x69ff94ff).into(), terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x21222cff).into(), terminal_ansi_red: rgba(0xff5555ff).into(), terminal_ansi_green: rgba(0x50fa7bff).into(), terminal_ansi_yellow: rgba(0xf1fa8cff).into(), terminal_ansi_blue: rgba(0xbd93f9ff).into(), terminal_ansi_magenta: rgba(0xff79c6ff).into(), terminal_ansi_cyan: rgba(0x8be9fdff).into(), terminal_ansi_white: rgba(0xf8f8f2ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + themes: vec![ThemeVariant { id: "b4d04bac-514f-4a38-bf03-df54bb135d82".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xbd93f9ff).into(), border_variant: rgba(0xbd93f9ff).into(), border_focused: rgba(0xbd93f9ff).into(), border_disabled: rgba(0xbd93f9ff).into(), border_selected: rgba(0xbd93f9ff).into(), border_transparent: rgba(0xbd93f9ff).into(), elevated_surface_background: rgba(0x282a35ff).into(), surface_background: rgba(0x282a35ff).into(), background: rgba(0x282a35ff).into(), element_background: rgba(0x44475aff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xf8f8f2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x21222cff).into(), tab_active_background: rgba(0x282a35ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282a35ff).into(), terminal_ansi_bright_black: rgba(0x6272a4ff).into(), terminal_ansi_bright_red: rgba(0xff6d6dff).into(), terminal_ansi_bright_green: rgba(0x69ff94ff).into(), terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x21222cff).into(), terminal_ansi_red: rgba(0xff5555ff).into(), terminal_ansi_green: rgba(0x50fa7bff).into(), terminal_ansi_yellow: rgba(0xf1fa8cff).into(), terminal_ansi_blue: rgba(0xbd93f9ff).into(), terminal_ansi_magenta: rgba(0xff79c6ff).into(), terminal_ansi_cyan: rgba(0x8be9fdff).into(), terminal_ansi_white: rgba(0xf8f8f2ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index 8ed6787c03db20cf0beaf08103d198865c367396..e5d8507ee6b23086ad09799d3c0ce0613ac1a893 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -8,10 +8,10 @@ pub fn gruvbox() -> ThemeFamily { ThemeFamily { - id: "aed09b4b-6e2c-4de2-ac0e-a17f5575b8ce".into(), + id: "c3d8b05f-5538-4b73-9ce9-30a31f73f5f2".into(), name: "Gruvbox".into(), author: "morhetz".into(), - themes: vec![ThemeVariant { id: "53e773b8-60fe-40dc-b624-ab33a834627b".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x1d2021ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1d2021ff).into(), tab_active_background: rgba(0x32302fff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1d2021ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "515bf7d7-1299-437e-a130-35e8bc76fe4e".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x282828ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x282828ff).into(), tab_active_background: rgba(0x3c3836ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282828ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "afb31789-7208-491a-b1ac-f92780a9bff5".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x32302fff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x32302fff).into(), tab_active_background: rgba(0x504945ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x32302fff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "a8802a22-d4ae-49b9-9785-b912844fc9e0".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf9f5d7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf9f5d7ff).into(), tab_active_background: rgba(0xf2e5bcff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf9f5d7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "de7f0ba5-5ea8-483b-a71a-bd1313c84dfb".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfbf1c7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xfbf1c7ff).into(), tab_active_background: rgba(0xebdbb2ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xfbf1c7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "45966b1b-6f0c-411b-be6b-3db6626f48c7".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf2e5bcff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf2e5bcff).into(), tab_active_background: rgba(0xd5c4a1ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf2e5bcff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + themes: vec![ThemeVariant { id: "014ce751-7184-44a0-b977-001d88e94d75".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x1d2021ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1d2021ff).into(), tab_active_background: rgba(0x32302fff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1d2021ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "abf0dd62-cc6a-464b-bd63-75c28eabb1c0".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x282828ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x282828ff).into(), tab_active_background: rgba(0x3c3836ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282828ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "03a2ee16-8076-449b-9bb2-16fd02fbf21d".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x32302fff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x32302fff).into(), tab_active_background: rgba(0x504945ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x32302fff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "7bbc0a0b-5b57-4731-bfae-02b4ff7ee821".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf9f5d7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf9f5d7ff).into(), tab_active_background: rgba(0xf2e5bcff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf9f5d7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3319ee0f-2d7f-4efc-84ae-132b30126bb1".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfbf1c7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xfbf1c7ff).into(), tab_active_background: rgba(0xebdbb2ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xfbf1c7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "d455f416-a0a5-4ef6-a808-64aafeb7aaae".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf2e5bcff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf2e5bcff).into(), tab_active_background: rgba(0xd5c4a1ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf2e5bcff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index af2b0d51ee6c230f1ed21a1ea5f95003967a6fa8..41071e86551f08c23082593721c349c421493a94 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -1,12 +1,23 @@ -mod andromeda; -mod ayu; + mod andromeda; mod dracula; -mod gruvbox; +mod nord; mod notctis; +mod ayu; +mod gruvbox; -pub use andromeda::*; -pub use ayu::*; + pub use andromeda::*; pub use dracula::*; -pub use gruvbox::*; +pub use nord::*; pub use notctis::*; +pub use ayu::*; +pub use gruvbox::*; + + + use crate::ThemeFamily; + + pub(crate) fn all_imported_themes() -> Vec { + vec![andromeda(), dracula(), nord(), notctis(), ayu(), gruvbox()] + } + + \ No newline at end of file diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs new file mode 100644 index 0000000000000000000000000000000000000000..25d2e6e6cf317f338cf705eec21131ed59f880b0 --- /dev/null +++ b/crates/theme2/src/themes/nord.rs @@ -0,0 +1,18 @@ + + use gpui::rgba; + + use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + }; + + pub fn nord() -> ThemeFamily { + ThemeFamily { + id: "63407887-c052-4dd4-b781-e6194ddcbead".into(), + name: "Nord".into(), + author: "Sven Greb (svengreb)".into(), + themes: vec![ThemeVariant { id: "27d48816-e82b-4285-a615-7a970d51b4a0".into(), name: "Nord".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3b4252ff).into(), border_variant: rgba(0x3b4252ff).into(), border_focused: rgba(0x3b4252ff).into(), border_disabled: rgba(0x3b4252ff).into(), border_selected: rgba(0x3b4252ff).into(), border_transparent: rgba(0x3b4252ff).into(), elevated_surface_background: rgba(0x2e3440ff).into(), surface_background: rgba(0x2e3440ff).into(), background: rgba(0x2e3440ff).into(), element_background: rgba(0x88bfd0ee).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd8dee9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2e3440ff).into(), tab_active_background: rgba(0x3b4252ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x2e3440ff).into(), terminal_ansi_bright_black: rgba(0x4c566aff).into(), terminal_ansi_bright_red: rgba(0xbf616aff).into(), terminal_ansi_bright_green: rgba(0xa3be8cff).into(), terminal_ansi_bright_yellow: rgba(0xebcb8bff).into(), terminal_ansi_bright_blue: rgba(0x81a1c1ff).into(), terminal_ansi_bright_magenta: rgba(0xb48eacff).into(), terminal_ansi_bright_cyan: rgba(0x8fbcbbff).into(), terminal_ansi_bright_white: rgba(0xeceff4ff).into(), terminal_ansi_black: rgba(0x3b4252ff).into(), terminal_ansi_red: rgba(0xbf616aff).into(), terminal_ansi_green: rgba(0xa3be8cff).into(), terminal_ansi_yellow: rgba(0xebcb8bff).into(), terminal_ansi_blue: rgba(0x81a1c1ff).into(), terminal_ansi_magenta: rgba(0xb48eacff).into(), terminal_ansi_cyan: rgba(0x88bfd0ff).into(), terminal_ansi_white: rgba(0xe5e9f0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + scales: default_color_scales(), +} + } + \ No newline at end of file diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index 4a21844e48b220e0b6bd6018a76265d3417e4812..2f228a9b6f80792f951b2831221aea339926f689 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -8,10 +8,10 @@ pub fn notctis() -> ThemeFamily { ThemeFamily { - id: "ad886135-2fff-4311-b2bb-2ce1ebd1c50d".into(), + id: "7cd79bb0-ffd7-48b5-b104-a6c171161a1b".into(), name: "Notctis".into(), author: "Liviu Schera (liviuschera)".into(), - themes: vec![ThemeVariant { id: "b79ece4f-89f3-4388-94ad-edeabfddba87".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1579b6ff).into(), border_variant: rgba(0x1579b6ff).into(), border_focused: rgba(0x1579b6ff).into(), border_transparent: rgba(0x1579b6ff).into(), elevated_surface_background: rgba(0x051b28ff).into(), surface_background: rgba(0x051b28ff).into(), background: rgba(0x07263aff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xbecfdaff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x08324eff).into(), tab_active_background: rgba(0x07263aff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x051b28ff).into(), terminal_ansi_bright_black: rgba(0x475e6cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xbecfdaff).into(), terminal_ansi_black: rgba(0x28343dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xaec3d0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "664a1471-1c92-44d1-84c5-3b8de9f40c5b".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x997582ff).into(), border_variant: rgba(0x997582ff).into(), border_focused: rgba(0x997582ff).into(), border_transparent: rgba(0x997582ff).into(), elevated_surface_background: rgba(0x272022ff).into(), surface_background: rgba(0x272022ff).into(), background: rgba(0x322a2dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xcbbec2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x413036ff).into(), tab_active_background: rgba(0x322a2dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x272022ff).into(), terminal_ansi_bright_black: rgba(0x69545bff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), terminal_ansi_black: rgba(0x47393eff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb9acb0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "a42edabe-8b86-482e-ae16-d036183ed66b".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xe1eeefff).into(), surface_background: rgba(0xe1eeefff).into(), background: rgba(0xf4f6f6ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xcaedf2ff).into(), tab_active_background: rgba(0xf4f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xe1eeefff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "5999de6b-6933-47d7-bcce-cba3d34d8f38".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xaea4f4ff).into(), border_variant: rgba(0xaea4f4ff).into(), border_focused: rgba(0xaea4f4ff).into(), border_transparent: rgba(0xaea4f4ff).into(), elevated_surface_background: rgba(0xe9e7f3ff).into(), surface_background: rgba(0xe9e7f3ff).into(), background: rgba(0xf2f1f8ff).into(), element_background: rgba(0x8d7ffeff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x0c006bff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0xe2dff6ff).into(), tab_active_background: rgba(0xf2f1f8ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0xe9e7f3ff).into(), terminal_ansi_bright_black: rgba(0x0f0080ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x0c006bff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "45aee81e-7464-4ce3-a5a2-0d48e943eb5c".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xf6eddaff).into(), surface_background: rgba(0xf6eddaff).into(), background: rgba(0xfef8ecff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf0e9d6ff).into(), tab_active_background: rgba(0xfef8ecff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf6eddaff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aea2719c-b339-41ff-a008-9ed15172c56a".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x496c83ff).into(), border_variant: rgba(0x496c83ff).into(), border_focused: rgba(0x496c83ff).into(), border_transparent: rgba(0x496c83ff).into(), elevated_surface_background: rgba(0x0e1920ff).into(), surface_background: rgba(0x0e1920ff).into(), background: rgba(0x1b2932ff).into(), element_background: rgba(0x2e616bff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5cdd3ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x202d37ff).into(), tab_active_background: rgba(0x1b2932ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0e1920ff).into(), terminal_ansi_bright_black: rgba(0x425866ff).into(), terminal_ansi_bright_red: rgba(0xca8468ff).into(), terminal_ansi_bright_green: rgba(0x84c8abff).into(), terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), terminal_ansi_bright_blue: rgba(0x68a4caff).into(), terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), terminal_ansi_black: rgba(0x182935ff).into(), terminal_ansi_red: rgba(0xc08872ff).into(), terminal_ansi_green: rgba(0x72c09fff).into(), terminal_ansi_yellow: rgba(0xc8a984ff).into(), terminal_ansi_blue: rgba(0x6095b7ff).into(), terminal_ansi_magenta: rgba(0xc28097ff).into(), terminal_ansi_cyan: rgba(0x72b7c0ff).into(), terminal_ansi_white: rgba(0xc5cdd3ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aa3f19d1-b767-4a33-b424-96ee06f91d50".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x03181aff).into(), surface_background: rgba(0x03181aff).into(), background: rgba(0x052428ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x052428ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x03181aff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "19cd0824-8b0f-446a-8f2f-46d88f103cb7".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "01ae3458-f6a4-4d37-b348-88f99295cb13".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "5c3f4b73-63c6-4732-b57c-8cae9868d08b".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6d66a7ff).into(), border_variant: rgba(0x6d66a7ff).into(), border_focused: rgba(0x6d66a7ff).into(), border_transparent: rgba(0x6d66a7ff).into(), elevated_surface_background: rgba(0x1f1d30ff).into(), surface_background: rgba(0x1f1d30ff).into(), background: rgba(0x292640ff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5c2d6ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2f2c49ff).into(), tab_active_background: rgba(0x292640ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f1d30ff).into(), terminal_ansi_bright_black: rgba(0x504e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), terminal_ansi_black: rgba(0x302f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb6b3ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "544dcfe0-a878-4e58-b3d2-f6f28f765266".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x8666a7ff).into(), border_variant: rgba(0x8666a7ff).into(), border_focused: rgba(0x8666a7ff).into(), border_transparent: rgba(0x8666a7ff).into(), elevated_surface_background: rgba(0x291d35ff).into(), surface_background: rgba(0x291d35ff).into(), background: rgba(0x30243dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xccbfd9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x3d2e4dff).into(), tab_active_background: rgba(0x30243dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x291d35ff).into(), terminal_ansi_bright_black: rgba(0x594e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), terminal_ansi_black: rgba(0x362f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xbfafcfff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], + themes: vec![ThemeVariant { id: "66251405-0342-4f10-849c-b81fe33009aa".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1579b6ff).into(), border_variant: rgba(0x1579b6ff).into(), border_focused: rgba(0x1579b6ff).into(), border_disabled: rgba(0x1579b6ff).into(), border_selected: rgba(0x1579b6ff).into(), border_transparent: rgba(0x1579b6ff).into(), elevated_surface_background: rgba(0x051b28ff).into(), surface_background: rgba(0x051b28ff).into(), background: rgba(0x07263aff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xbecfdaff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x08324eff).into(), tab_active_background: rgba(0x07263aff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x051b28ff).into(), terminal_ansi_bright_black: rgba(0x475e6cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xbecfdaff).into(), terminal_ansi_black: rgba(0x28343dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xaec3d0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3717c8d5-deb9-4551-ac9b-12cf37c5af11".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x997582ff).into(), border_variant: rgba(0x997582ff).into(), border_focused: rgba(0x997582ff).into(), border_disabled: rgba(0x997582ff).into(), border_selected: rgba(0x997582ff).into(), border_transparent: rgba(0x997582ff).into(), elevated_surface_background: rgba(0x272022ff).into(), surface_background: rgba(0x272022ff).into(), background: rgba(0x322a2dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xcbbec2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x413036ff).into(), tab_active_background: rgba(0x322a2dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x272022ff).into(), terminal_ansi_bright_black: rgba(0x69545bff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), terminal_ansi_black: rgba(0x47393eff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb9acb0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "9143cedc-71a4-4005-9b4d-ed23c4ac83fc".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xe1eeefff).into(), surface_background: rgba(0xe1eeefff).into(), background: rgba(0xf4f6f6ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xcaedf2ff).into(), tab_active_background: rgba(0xf4f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xe1eeefff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "82f6e468-a5de-4e3a-ba13-4ced22ac819b".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xaea4f4ff).into(), border_variant: rgba(0xaea4f4ff).into(), border_focused: rgba(0xaea4f4ff).into(), border_disabled: rgba(0xaea4f4ff).into(), border_selected: rgba(0xaea4f4ff).into(), border_transparent: rgba(0xaea4f4ff).into(), elevated_surface_background: rgba(0xe9e7f3ff).into(), surface_background: rgba(0xe9e7f3ff).into(), background: rgba(0xf2f1f8ff).into(), element_background: rgba(0x8d7ffeff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x0c006bff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0xe2dff6ff).into(), tab_active_background: rgba(0xf2f1f8ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0xe9e7f3ff).into(), terminal_ansi_bright_black: rgba(0x0f0080ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x0c006bff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "655fe060-e62c-4582-a9d2-87ab9f8f21b7".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xf6eddaff).into(), surface_background: rgba(0xf6eddaff).into(), background: rgba(0xfef8ecff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf0e9d6ff).into(), tab_active_background: rgba(0xfef8ecff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf6eddaff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "b8540210-1aff-4d72-bb65-040b2c575e35".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x496c83ff).into(), border_variant: rgba(0x496c83ff).into(), border_focused: rgba(0x496c83ff).into(), border_disabled: rgba(0x496c83ff).into(), border_selected: rgba(0x496c83ff).into(), border_transparent: rgba(0x496c83ff).into(), elevated_surface_background: rgba(0x0e1920ff).into(), surface_background: rgba(0x0e1920ff).into(), background: rgba(0x1b2932ff).into(), element_background: rgba(0x2e616bff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5cdd3ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x202d37ff).into(), tab_active_background: rgba(0x1b2932ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0e1920ff).into(), terminal_ansi_bright_black: rgba(0x425866ff).into(), terminal_ansi_bright_red: rgba(0xca8468ff).into(), terminal_ansi_bright_green: rgba(0x84c8abff).into(), terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), terminal_ansi_bright_blue: rgba(0x68a4caff).into(), terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), terminal_ansi_black: rgba(0x182935ff).into(), terminal_ansi_red: rgba(0xc08872ff).into(), terminal_ansi_green: rgba(0x72c09fff).into(), terminal_ansi_yellow: rgba(0xc8a984ff).into(), terminal_ansi_blue: rgba(0x6095b7ff).into(), terminal_ansi_magenta: rgba(0xc28097ff).into(), terminal_ansi_cyan: rgba(0x72b7c0ff).into(), terminal_ansi_white: rgba(0xc5cdd3ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "70577f71-a351-43c6-9b64-7a5f95ef0ad2".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x03181aff).into(), surface_background: rgba(0x03181aff).into(), background: rgba(0x052428ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x052428ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x03181aff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "abcd25b0-8740-430f-a7e0-0b193ef1c271".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "86b6a2b4-69b9-40d5-b078-3feb93d0786d".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aa50141c-1c64-4773-980f-e4bf062f893f".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6d66a7ff).into(), border_variant: rgba(0x6d66a7ff).into(), border_focused: rgba(0x6d66a7ff).into(), border_disabled: rgba(0x6d66a7ff).into(), border_selected: rgba(0x6d66a7ff).into(), border_transparent: rgba(0x6d66a7ff).into(), elevated_surface_background: rgba(0x1f1d30ff).into(), surface_background: rgba(0x1f1d30ff).into(), background: rgba(0x292640ff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5c2d6ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2f2c49ff).into(), tab_active_background: rgba(0x292640ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f1d30ff).into(), terminal_ansi_bright_black: rgba(0x504e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), terminal_ansi_black: rgba(0x302f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb6b3ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "ce4ba03d-5a76-4e6c-9b45-f7c2c2fa3b41".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x8666a7ff).into(), border_variant: rgba(0x8666a7ff).into(), border_focused: rgba(0x8666a7ff).into(), border_disabled: rgba(0x8666a7ff).into(), border_selected: rgba(0x8666a7ff).into(), border_transparent: rgba(0x8666a7ff).into(), elevated_surface_background: rgba(0x291d35ff).into(), surface_background: rgba(0x291d35ff).into(), background: rgba(0x30243dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xccbfd9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x3d2e4dff).into(), tab_active_background: rgba(0x30243dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x291d35ff).into(), terminal_ansi_bright_black: rgba(0x594e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), terminal_ansi_black: rgba(0x362f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xbfafcfff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], scales: default_color_scales(), } } diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 8ee4df2e96b5257aa8eda8bd85fe2cab8ec8579c..3fd2b71ac0a3721e702d7f9b46be4f2e5215ea19 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -50,19 +50,42 @@ pub struct ThemeMetadata { } fn main() -> Result<()> { + const SOURCE_PATH: &str = "assets/themes/src/vscode"; + const OUT_PATH: &str = "crates/theme2/src/themes"; + SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); - println!("Creating path: assets/themes/src/vscode/"); - let vscode_themes_path = PathBuf::from_str("assets/themes/src/vscode/")?; + let themes_output_path = PathBuf::from_str(OUT_PATH)?; + + if !themes_output_path.exists() { + println!("Creating directory: {:?}", themes_output_path); + fs::create_dir_all(&themes_output_path)?; + } + + // We create mod.rs at the beginning to prevent `mod themes;`/`pub use themes::*;` from being + // invalid in the theme crate root. + println!( + "Creating file: {:?}", + themes_output_path.join(format!("mod.rs")) + ); + + let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; + + println!("Loading themes source..."); + let vscode_themes_path = PathBuf::from_str(SOURCE_PATH)?; + if !vscode_themes_path.exists() { + return Err(anyhow!(format!( + "Couldn't find {}, make sure it exists", + SOURCE_PATH + ))); + } let mut theme_families = Vec::new(); for theme_family_dir in fs::read_dir(&vscode_themes_path)? { - println!("Reading directory: {:?}", vscode_themes_path); - let theme_family_dir = theme_family_dir?; - if theme_family_dir.file_name().to_str() == Some(".DS_Store") { + if !theme_family_dir.file_type()?.is_dir() { continue; } @@ -72,12 +95,18 @@ fn main() -> Result<()> { .ok_or(anyhow!("no file stem")) .map(|stem| stem.to_string_lossy().to_string())?; - println!( - "Opening file: {:?}", - theme_family_dir.path().join("family.json") - ); let family_metadata_file = File::open(theme_family_dir.path().join("family.json")) - .context(format!("no `family.json` found for '{theme_family_slug}'"))?; + .context(format!( + "no `family.json` found for '{}'", + theme_family_slug + ))?; + + let license_file_path = theme_family_dir.path().join("LICENSE"); + + if !license_file_path.exists() { + println!("Skipping theme family '{}' because it does not have a LICENSE file. This theme will only be imported once a LICENSE file is provided.", theme_family_slug); + continue; + } let family_metadata: FamilyMetadata = serde_json::from_reader(family_metadata_file) .context(format!( @@ -118,8 +147,6 @@ fn main() -> Result<()> { theme_families.push(theme_family); } - let themes_output_path = PathBuf::from_str("crates/theme2/src/themes")?; - let mut theme_modules = Vec::new(); for theme_family in theme_families { @@ -153,17 +180,28 @@ fn main() -> Result<()> { theme_modules.push(theme_family_slug); } - println!( - "Creating file: {:?}", - themes_output_path.join(format!("mod.rs")) + let themes_vector_contents = format!( + r#" + use crate::ThemeFamily; + + pub(crate) fn all_imported_themes() -> Vec {{ + vec![{all_themes}] + }} + "#, + all_themes = theme_modules + .iter() + .map(|module| format!("{}()", module)) + .collect::>() + .join(", ") ); - let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; let mod_rs_contents = format!( r#" {mod_statements} {use_statements} + + {themes_vector_contents} "#, mod_statements = theme_modules .iter() @@ -174,7 +212,8 @@ fn main() -> Result<()> { .iter() .map(|module| format!("pub use {module}::*;")) .collect::>() - .join("\n") + .join("\n"), + themes_vector_contents = themes_vector_contents ); mod_rs_file.write_all(mod_rs_contents.as_bytes())?; diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 1c4d263389177538e36773e761371c42bc5e08e3..98765d612942db461f94c7290a86c39bae589cee 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -134,6 +134,8 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { .field("border", &HslaPrinter(self.0.border)) .field("border_variant", &HslaPrinter(self.0.border_variant)) .field("border_focused", &HslaPrinter(self.0.border_focused)) + .field("border_disabled", &HslaPrinter(self.0.border_disabled)) + .field("border_selected", &HslaPrinter(self.0.border_selected)) .field( "border_transparent", &HslaPrinter(self.0.border_transparent), diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index 06c4653decdda15332ad8afb01b0c3ba0dc30491..f63766b6a50c8e8db957e0e4b0a833c5f7e9c1e6 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -456,6 +456,14 @@ impl VsCodeThemeConverter { .panel_border .as_ref() .traverse(|color| try_parse_color(&color))?, + border_disabled: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, + border_selected: vscode_colors + .panel_border + .as_ref() + .traverse(|color| try_parse_color(&color))?, border_transparent: vscode_colors .panel_border .as_ref() From 62981fc2ee9d2ff48ec326eaf6fea8ee741c32a6 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 14:58:34 -0500 Subject: [PATCH 036/110] Format themes --- crates/theme2/src/themes/andromeda.rs | 345 ++++- crates/theme2/src/themes/ayu.rs | 503 ++++++- crates/theme2/src/themes/dracula.rs | 185 ++- crates/theme2/src/themes/gruvbox.rs | 977 +++++++++++++- crates/theme2/src/themes/mod.rs | 24 +- crates/theme2/src/themes/nord.rs | 185 ++- crates/theme2/src/themes/notctis.rs | 1767 ++++++++++++++++++++++++- 7 files changed, 3882 insertions(+), 104 deletions(-) diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 8b32d20480d8104aea8e1fa4e6886347d68d4357..e9bbbc48b422760636879aea7179821d187a5895 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -1,18 +1,333 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn andromeda() -> ThemeFamily { - ThemeFamily { - id: "0d2fdd0e-de6d-44b2-8f16-f4da10a78f2e".into(), - name: "Andromeda".into(), - author: "Eliver Lara (EliverLara)".into(), - themes: vec![ThemeVariant { id: "8a4e3be2-0ea0-4a0c-9fee-bc63123205ba".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x23262eff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x23262eff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "812f0805-5f84-4f3f-97d3-b38b44307132".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x262933ff).into(), element_background: rgba(0x00e8c5cc).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd4cdd8ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x262933ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), terminal_ansi_bright_green: rgba(0x95e072ff).into(), terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_bright_white: rgba(0xb0b4baff).into(), terminal_ansi_black: rgba(0x000000f2).into(), terminal_ansi_red: rgba(0xee5d42ff).into(), terminal_ansi_green: rgba(0x95e072ff).into(), terminal_ansi_yellow: rgba(0xffe66dff).into(), terminal_ansi_blue: rgba(0x7bb7ffff).into(), terminal_ansi_magenta: rgba(0xff00a9ff).into(), terminal_ansi_cyan: rgba(0x00e8c6ff).into(), terminal_ansi_white: rgba(0xedeef0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn andromeda() -> ThemeFamily { + ThemeFamily { + id: "0d2fdd0e-de6d-44b2-8f16-f4da10a78f2e".into(), + name: "Andromeda".into(), + author: "Eliver Lara (EliverLara)".into(), + themes: vec![ + ThemeVariant { + id: "8a4e3be2-0ea0-4a0c-9fee-bc63123205ba".into(), + name: "Andromeda".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x1b1d23ff).into(), + border_variant: rgba(0x1b1d23ff).into(), + border_focused: rgba(0x1b1d23ff).into(), + border_disabled: rgba(0x1b1d23ff).into(), + border_selected: rgba(0x1b1d23ff).into(), + border_transparent: rgba(0x1b1d23ff).into(), + elevated_surface_background: rgba(0x23262eff).into(), + surface_background: rgba(0x23262eff).into(), + background: rgba(0x23262eff).into(), + element_background: rgba(0x00e8c5cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xd4cdd8ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x23262eff).into(), + tab_active_background: rgba(0x23262eff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x000000e6).into(), + terminal_ansi_bright_red: rgba(0xee5d42ff).into(), + terminal_ansi_bright_green: rgba(0x95e072ff).into(), + terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), + terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), + terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), + terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), + terminal_ansi_bright_white: rgba(0xb0b4baff).into(), + terminal_ansi_black: rgba(0x000000f2).into(), + terminal_ansi_red: rgba(0xee5d42ff).into(), + terminal_ansi_green: rgba(0x95e072ff).into(), + terminal_ansi_yellow: rgba(0xffe66dff).into(), + terminal_ansi_blue: rgba(0x7bb7ffff).into(), + terminal_ansi_magenta: rgba(0xff00a9ff).into(), + terminal_ansi_cyan: rgba(0x00e8c6ff).into(), + terminal_ansi_white: rgba(0xedeef0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "812f0805-5f84-4f3f-97d3-b38b44307132".into(), + name: "Andromeda Bordered".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x1b1d23ff).into(), + border_variant: rgba(0x1b1d23ff).into(), + border_focused: rgba(0x1b1d23ff).into(), + border_disabled: rgba(0x1b1d23ff).into(), + border_selected: rgba(0x1b1d23ff).into(), + border_transparent: rgba(0x1b1d23ff).into(), + elevated_surface_background: rgba(0x23262eff).into(), + surface_background: rgba(0x23262eff).into(), + background: rgba(0x262933ff).into(), + element_background: rgba(0x00e8c5cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xd4cdd8ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x23262eff).into(), + tab_active_background: rgba(0x262933ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x000000e6).into(), + terminal_ansi_bright_red: rgba(0xee5d42ff).into(), + terminal_ansi_bright_green: rgba(0x95e072ff).into(), + terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), + terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), + terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), + terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), + terminal_ansi_bright_white: rgba(0xb0b4baff).into(), + terminal_ansi_black: rgba(0x000000f2).into(), + terminal_ansi_red: rgba(0xee5d42ff).into(), + terminal_ansi_green: rgba(0x95e072ff).into(), + terminal_ansi_yellow: rgba(0xffe66dff).into(), + terminal_ansi_blue: rgba(0x7bb7ffff).into(), + terminal_ansi_magenta: rgba(0xff00a9ff).into(), + terminal_ansi_cyan: rgba(0x00e8c6ff).into(), + terminal_ansi_white: rgba(0xedeef0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } } - } - \ No newline at end of file diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 4e12340d3f223aea6a58a1decaf5ae7ee93d6b87..14e316e400dd01c219c6bf53f9f81da67a7abbf6 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -1,18 +1,491 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn ayu() -> ThemeFamily { - ThemeFamily { - id: "769923cd-f2b6-4675-96b8-8a2953fc635b".into(), - name: "Ayu".into(), - author: "dempfi (Ike Ku)".into(), - themes: vec![ThemeVariant { id: "f6ae55e2-a844-47ba-a720-ca88dd7b2a12".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6b7d8f1f).into(), border_variant: rgba(0x6b7d8f1f).into(), border_focused: rgba(0x6b7d8f1f).into(), border_disabled: rgba(0x6b7d8f1f).into(), border_selected: rgba(0x6b7d8f1f).into(), border_transparent: rgba(0x6b7d8f1f).into(), elevated_surface_background: rgba(0xf8f9faff).into(), surface_background: rgba(0xf8f9faff).into(), background: rgba(0xf8f9faff).into(), element_background: rgba(0xffaa32ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x8a9199ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf8f9faff).into(), tab_active_background: rgba(0xf8f9faff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf8f9faff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7070ff).into(), terminal_ansi_bright_green: rgba(0x86b300ff).into(), terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), terminal_ansi_bright_magenta: rgba(0xa37accff).into(), terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), terminal_ansi_black: rgba(0x000000ff).into(), terminal_ansi_red: rgba(0xea6c6dff).into(), terminal_ansi_green: rgba(0x6cbf43ff).into(), terminal_ansi_yellow: rgba(0xeca944ff).into(), terminal_ansi_blue: rgba(0x3198e1ff).into(), terminal_ansi_magenta: rgba(0x9e75c7ff).into(), terminal_ansi_cyan: rgba(0x46ba94ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "440f604c-3a70-4bac-901a-2dc92c7a241a".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x171a24ff).into(), border_variant: rgba(0x171a24ff).into(), border_focused: rgba(0x171a24ff).into(), border_disabled: rgba(0x171a24ff).into(), border_selected: rgba(0x171a24ff).into(), border_transparent: rgba(0x171a24ff).into(), elevated_surface_background: rgba(0x1f2430ff).into(), surface_background: rgba(0x1f2430ff).into(), background: rgba(0x1f2430ff).into(), element_background: rgba(0xffcb65ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x707a8cff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1f2430ff).into(), tab_active_background: rgba(0x1f2430ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f2430ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xf18678ff).into(), terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), terminal_ansi_bright_blue: rgba(0x73cfffff).into(), terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x171a24ff).into(), terminal_ansi_red: rgba(0xed8173ff).into(), terminal_ansi_green: rgba(0x86d96bff).into(), terminal_ansi_yellow: rgba(0xfacc6eff).into(), terminal_ansi_blue: rgba(0x6ccafaff).into(), terminal_ansi_magenta: rgba(0xdabafaff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "0135d1f0-1331-4e5a-9634-73e8f72356d0".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1e232bff).into(), border_variant: rgba(0x1e232bff).into(), border_focused: rgba(0x1e232bff).into(), border_disabled: rgba(0x1e232bff).into(), border_selected: rgba(0x1e232bff).into(), border_transparent: rgba(0x1e232bff).into(), elevated_surface_background: rgba(0x0b0e14ff).into(), surface_background: rgba(0x0b0e14ff).into(), background: rgba(0x0b0e14ff).into(), element_background: rgba(0xe6b450ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x565b66ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x0b0e14ff).into(), tab_active_background: rgba(0x0b0e14ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0b0e14ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7077ff).into(), terminal_ansi_bright_green: rgba(0xa9d94bff).into(), terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x1e232bff).into(), terminal_ansi_red: rgba(0xea6c72ff).into(), terminal_ansi_green: rgba(0x7ed962ff).into(), terminal_ansi_yellow: rgba(0xf9af4fff).into(), terminal_ansi_blue: rgba(0x52bdfaff).into(), terminal_ansi_magenta: rgba(0xcca1faff).into(), terminal_ansi_cyan: rgba(0x90e1c6ff).into(), terminal_ansi_white: rgba(0xc7c7c7ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn ayu() -> ThemeFamily { + ThemeFamily { + id: "769923cd-f2b6-4675-96b8-8a2953fc635b".into(), + name: "Ayu".into(), + author: "dempfi (Ike Ku)".into(), + themes: vec![ + ThemeVariant { + id: "f6ae55e2-a844-47ba-a720-ca88dd7b2a12".into(), + name: "Ayu Light".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x6b7d8f1f).into(), + border_variant: rgba(0x6b7d8f1f).into(), + border_focused: rgba(0x6b7d8f1f).into(), + border_disabled: rgba(0x6b7d8f1f).into(), + border_selected: rgba(0x6b7d8f1f).into(), + border_transparent: rgba(0x6b7d8f1f).into(), + elevated_surface_background: rgba(0xf8f9faff).into(), + surface_background: rgba(0xf8f9faff).into(), + background: rgba(0xf8f9faff).into(), + element_background: rgba(0xffaa32ff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x8a9199ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xf8f9faff).into(), + tab_active_background: rgba(0xf8f9faff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xf8f9faff).into(), + terminal_ansi_bright_black: rgba(0x686868ff).into(), + terminal_ansi_bright_red: rgba(0xef7070ff).into(), + terminal_ansi_bright_green: rgba(0x86b300ff).into(), + terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), + terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), + terminal_ansi_bright_magenta: rgba(0xa37accff).into(), + terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), + terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), + terminal_ansi_black: rgba(0x000000ff).into(), + terminal_ansi_red: rgba(0xea6c6dff).into(), + terminal_ansi_green: rgba(0x6cbf43ff).into(), + terminal_ansi_yellow: rgba(0xeca944ff).into(), + terminal_ansi_blue: rgba(0x3198e1ff).into(), + terminal_ansi_magenta: rgba(0x9e75c7ff).into(), + terminal_ansi_cyan: rgba(0x46ba94ff).into(), + terminal_ansi_white: rgba(0xc7c7c7ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "440f604c-3a70-4bac-901a-2dc92c7a241a".into(), + name: "Ayu Mirage".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x171a24ff).into(), + border_variant: rgba(0x171a24ff).into(), + border_focused: rgba(0x171a24ff).into(), + border_disabled: rgba(0x171a24ff).into(), + border_selected: rgba(0x171a24ff).into(), + border_transparent: rgba(0x171a24ff).into(), + elevated_surface_background: rgba(0x1f2430ff).into(), + surface_background: rgba(0x1f2430ff).into(), + background: rgba(0x1f2430ff).into(), + element_background: rgba(0xffcb65ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0x707a8cff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x1f2430ff).into(), + tab_active_background: rgba(0x1f2430ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x1f2430ff).into(), + terminal_ansi_bright_black: rgba(0x686868ff).into(), + terminal_ansi_bright_red: rgba(0xf18678ff).into(), + terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), + terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), + terminal_ansi_bright_blue: rgba(0x73cfffff).into(), + terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), + terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x171a24ff).into(), + terminal_ansi_red: rgba(0xed8173ff).into(), + terminal_ansi_green: rgba(0x86d96bff).into(), + terminal_ansi_yellow: rgba(0xfacc6eff).into(), + terminal_ansi_blue: rgba(0x6ccafaff).into(), + terminal_ansi_magenta: rgba(0xdabafaff).into(), + terminal_ansi_cyan: rgba(0x90e1c6ff).into(), + terminal_ansi_white: rgba(0xc7c7c7ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "0135d1f0-1331-4e5a-9634-73e8f72356d0".into(), + name: "Ayu Dark".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x1e232bff).into(), + border_variant: rgba(0x1e232bff).into(), + border_focused: rgba(0x1e232bff).into(), + border_disabled: rgba(0x1e232bff).into(), + border_selected: rgba(0x1e232bff).into(), + border_transparent: rgba(0x1e232bff).into(), + elevated_surface_background: rgba(0x0b0e14ff).into(), + surface_background: rgba(0x0b0e14ff).into(), + background: rgba(0x0b0e14ff).into(), + element_background: rgba(0xe6b450ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0x565b66ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x0b0e14ff).into(), + tab_active_background: rgba(0x0b0e14ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x0b0e14ff).into(), + terminal_ansi_bright_black: rgba(0x686868ff).into(), + terminal_ansi_bright_red: rgba(0xef7077ff).into(), + terminal_ansi_bright_green: rgba(0xa9d94bff).into(), + terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), + terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), + terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), + terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x1e232bff).into(), + terminal_ansi_red: rgba(0xea6c72ff).into(), + terminal_ansi_green: rgba(0x7ed962ff).into(), + terminal_ansi_yellow: rgba(0xf9af4fff).into(), + terminal_ansi_blue: rgba(0x52bdfaff).into(), + terminal_ansi_magenta: rgba(0xcca1faff).into(), + terminal_ansi_cyan: rgba(0x90e1c6ff).into(), + terminal_ansi_white: rgba(0xc7c7c7ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } } - } - \ No newline at end of file diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index aff13ecae5c282cb30e8001fdab4243797994555..0f8de4996fc202520a1de5f03160a7bbace93e3c 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -1,18 +1,173 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn dracula() -> ThemeFamily { - ThemeFamily { - id: "690e6a78-4aa6-471e-a342-4d0e0ee14952".into(), - name: "Dracula".into(), - author: "Zeno Rocha".into(), - themes: vec![ThemeVariant { id: "b4d04bac-514f-4a38-bf03-df54bb135d82".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xbd93f9ff).into(), border_variant: rgba(0xbd93f9ff).into(), border_focused: rgba(0xbd93f9ff).into(), border_disabled: rgba(0xbd93f9ff).into(), border_selected: rgba(0xbd93f9ff).into(), border_transparent: rgba(0xbd93f9ff).into(), elevated_surface_background: rgba(0x282a35ff).into(), surface_background: rgba(0x282a35ff).into(), background: rgba(0x282a35ff).into(), element_background: rgba(0x44475aff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xf8f8f2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x21222cff).into(), tab_active_background: rgba(0x282a35ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282a35ff).into(), terminal_ansi_bright_black: rgba(0x6272a4ff).into(), terminal_ansi_bright_red: rgba(0xff6d6dff).into(), terminal_ansi_bright_green: rgba(0x69ff94ff).into(), terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), terminal_ansi_bright_white: rgba(0xffffffff).into(), terminal_ansi_black: rgba(0x21222cff).into(), terminal_ansi_red: rgba(0xff5555ff).into(), terminal_ansi_green: rgba(0x50fa7bff).into(), terminal_ansi_yellow: rgba(0xf1fa8cff).into(), terminal_ansi_blue: rgba(0xbd93f9ff).into(), terminal_ansi_magenta: rgba(0xff79c6ff).into(), terminal_ansi_cyan: rgba(0x8be9fdff).into(), terminal_ansi_white: rgba(0xf8f8f2ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn dracula() -> ThemeFamily { + ThemeFamily { + id: "690e6a78-4aa6-471e-a342-4d0e0ee14952".into(), + name: "Dracula".into(), + author: "Zeno Rocha".into(), + themes: vec![ThemeVariant { + id: "b4d04bac-514f-4a38-bf03-df54bb135d82".into(), + name: "Dracula".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xbd93f9ff).into(), + border_variant: rgba(0xbd93f9ff).into(), + border_focused: rgba(0xbd93f9ff).into(), + border_disabled: rgba(0xbd93f9ff).into(), + border_selected: rgba(0xbd93f9ff).into(), + border_transparent: rgba(0xbd93f9ff).into(), + elevated_surface_background: rgba(0x282a35ff).into(), + surface_background: rgba(0x282a35ff).into(), + background: rgba(0x282a35ff).into(), + element_background: rgba(0x44475aff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xf8f8f2ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x21222cff).into(), + tab_active_background: rgba(0x282a35ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x282a35ff).into(), + terminal_ansi_bright_black: rgba(0x6272a4ff).into(), + terminal_ansi_bright_red: rgba(0xff6d6dff).into(), + terminal_ansi_bright_green: rgba(0x69ff94ff).into(), + terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), + terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), + terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), + terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x21222cff).into(), + terminal_ansi_red: rgba(0xff5555ff).into(), + terminal_ansi_green: rgba(0x50fa7bff).into(), + terminal_ansi_yellow: rgba(0xf1fa8cff).into(), + terminal_ansi_blue: rgba(0xbd93f9ff).into(), + terminal_ansi_magenta: rgba(0xff79c6ff).into(), + terminal_ansi_cyan: rgba(0x8be9fdff).into(), + terminal_ansi_white: rgba(0xf8f8f2ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }], + scales: default_color_scales(), + } } - } - \ No newline at end of file diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index e5d8507ee6b23086ad09799d3c0ce0613ac1a893..baf0df33415169c3ca2af695a3e6ff66b2050a37 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -1,18 +1,965 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn gruvbox() -> ThemeFamily { - ThemeFamily { - id: "c3d8b05f-5538-4b73-9ce9-30a31f73f5f2".into(), - name: "Gruvbox".into(), - author: "morhetz".into(), - themes: vec![ThemeVariant { id: "014ce751-7184-44a0-b977-001d88e94d75".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x1d2021ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x1d2021ff).into(), tab_active_background: rgba(0x32302fff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1d2021ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "abf0dd62-cc6a-464b-bd63-75c28eabb1c0".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x282828ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x282828ff).into(), tab_active_background: rgba(0x3c3836ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x282828ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "03a2ee16-8076-449b-9bb2-16fd02fbf21d".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x32302fff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xebdbb2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x32302fff).into(), tab_active_background: rgba(0x504945ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x32302fff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), terminal_ansi_bright_blue: rgba(0x83a598ff).into(), terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), terminal_ansi_black: rgba(0x3c3836ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0xa89984ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "7bbc0a0b-5b57-4731-bfae-02b4ff7ee821".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf9f5d7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf9f5d7ff).into(), tab_active_background: rgba(0xf2e5bcff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf9f5d7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3319ee0f-2d7f-4efc-84ae-132b30126bb1".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfbf1c7ff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xfbf1c7ff).into(), tab_active_background: rgba(0xebdbb2ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xfbf1c7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "d455f416-a0a5-4ef6-a808-64aafeb7aaae".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf2e5bcff).into(), element_background: rgba(0x44858780).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x3c3836ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf2e5bcff).into(), tab_active_background: rgba(0xd5c4a1ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf2e5bcff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), terminal_ansi_bright_green: rgba(0x79740eff).into(), terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), terminal_ansi_bright_blue: rgba(0x066578ff).into(), terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), terminal_ansi_bright_white: rgba(0x3c3836ff).into(), terminal_ansi_black: rgba(0xebdbb2ff).into(), terminal_ansi_red: rgba(0xcc241cff).into(), terminal_ansi_green: rgba(0x989719ff).into(), terminal_ansi_yellow: rgba(0xd79920ff).into(), terminal_ansi_blue: rgba(0x448587ff).into(), terminal_ansi_magenta: rgba(0xb16185ff).into(), terminal_ansi_cyan: rgba(0x679d6aff).into(), terminal_ansi_white: rgba(0x7c6f64ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn gruvbox() -> ThemeFamily { + ThemeFamily { + id: "c3d8b05f-5538-4b73-9ce9-30a31f73f5f2".into(), + name: "Gruvbox".into(), + author: "morhetz".into(), + themes: vec![ + ThemeVariant { + id: "014ce751-7184-44a0-b977-001d88e94d75".into(), + name: "Gruvbox Dark Hard".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x3c3836ff).into(), + border_variant: rgba(0x3c3836ff).into(), + border_focused: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), + border_selected: rgba(0x3c3836ff).into(), + border_transparent: rgba(0x3c3836ff).into(), + elevated_surface_background: rgba(0x18191bff).into(), + surface_background: rgba(0x18191bff).into(), + background: rgba(0x1d2021ff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xebdbb2ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x1d2021ff).into(), + tab_active_background: rgba(0x32302fff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x1d2021ff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0xfb4833ff).into(), + terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), + terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), + terminal_ansi_bright_blue: rgba(0x83a598ff).into(), + terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), + terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), + terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), + terminal_ansi_black: rgba(0x3c3836ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0xa89984ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "abf0dd62-cc6a-464b-bd63-75c28eabb1c0".into(), + name: "Gruvbox Dark Medium".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x3c3836ff).into(), + border_variant: rgba(0x3c3836ff).into(), + border_focused: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), + border_selected: rgba(0x3c3836ff).into(), + border_transparent: rgba(0x3c3836ff).into(), + elevated_surface_background: rgba(0x18191bff).into(), + surface_background: rgba(0x18191bff).into(), + background: rgba(0x282828ff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xebdbb2ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x282828ff).into(), + tab_active_background: rgba(0x3c3836ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x282828ff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0xfb4833ff).into(), + terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), + terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), + terminal_ansi_bright_blue: rgba(0x83a598ff).into(), + terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), + terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), + terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), + terminal_ansi_black: rgba(0x3c3836ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0xa89984ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "03a2ee16-8076-449b-9bb2-16fd02fbf21d".into(), + name: "Gruvbox Dark Soft".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x3c3836ff).into(), + border_variant: rgba(0x3c3836ff).into(), + border_focused: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), + border_selected: rgba(0x3c3836ff).into(), + border_transparent: rgba(0x3c3836ff).into(), + elevated_surface_background: rgba(0x18191bff).into(), + surface_background: rgba(0x18191bff).into(), + background: rgba(0x32302fff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xebdbb2ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x32302fff).into(), + tab_active_background: rgba(0x504945ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x32302fff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0xfb4833ff).into(), + terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), + terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), + terminal_ansi_bright_blue: rgba(0x83a598ff).into(), + terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), + terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), + terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), + terminal_ansi_black: rgba(0x3c3836ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0xa89984ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "7bbc0a0b-5b57-4731-bfae-02b4ff7ee821".into(), + name: "Gruvbox Light Hard".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xebdbb2ff).into(), + border_variant: rgba(0xebdbb2ff).into(), + border_focused: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), + border_selected: rgba(0xebdbb2ff).into(), + border_transparent: rgba(0xebdbb2ff).into(), + elevated_surface_background: rgba(0xf9f9fbff).into(), + surface_background: rgba(0xf9f9fbff).into(), + background: rgba(0xf9f5d7ff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x3c3836ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xf9f5d7ff).into(), + tab_active_background: rgba(0xf2e5bcff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xf9f5d7ff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0x9d0006ff).into(), + terminal_ansi_bright_green: rgba(0x79740eff).into(), + terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), + terminal_ansi_bright_blue: rgba(0x066578ff).into(), + terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), + terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), + terminal_ansi_bright_white: rgba(0x3c3836ff).into(), + terminal_ansi_black: rgba(0xebdbb2ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0x7c6f64ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "3319ee0f-2d7f-4efc-84ae-132b30126bb1".into(), + name: "Gruvbox Light Medium".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xebdbb2ff).into(), + border_variant: rgba(0xebdbb2ff).into(), + border_focused: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), + border_selected: rgba(0xebdbb2ff).into(), + border_transparent: rgba(0xebdbb2ff).into(), + elevated_surface_background: rgba(0xf9f9fbff).into(), + surface_background: rgba(0xf9f9fbff).into(), + background: rgba(0xfbf1c7ff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x3c3836ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xfbf1c7ff).into(), + tab_active_background: rgba(0xebdbb2ff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xfbf1c7ff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0x9d0006ff).into(), + terminal_ansi_bright_green: rgba(0x79740eff).into(), + terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), + terminal_ansi_bright_blue: rgba(0x066578ff).into(), + terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), + terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), + terminal_ansi_bright_white: rgba(0x3c3836ff).into(), + terminal_ansi_black: rgba(0xebdbb2ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0x7c6f64ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "d455f416-a0a5-4ef6-a808-64aafeb7aaae".into(), + name: "Gruvbox Light Soft".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xebdbb2ff).into(), + border_variant: rgba(0xebdbb2ff).into(), + border_focused: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), + border_selected: rgba(0xebdbb2ff).into(), + border_transparent: rgba(0xebdbb2ff).into(), + elevated_surface_background: rgba(0xf9f9fbff).into(), + surface_background: rgba(0xf9f9fbff).into(), + background: rgba(0xf2e5bcff).into(), + element_background: rgba(0x44858780).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x3c3836ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xf2e5bcff).into(), + tab_active_background: rgba(0xd5c4a1ff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xf2e5bcff).into(), + terminal_ansi_bright_black: rgba(0x928374ff).into(), + terminal_ansi_bright_red: rgba(0x9d0006ff).into(), + terminal_ansi_bright_green: rgba(0x79740eff).into(), + terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), + terminal_ansi_bright_blue: rgba(0x066578ff).into(), + terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), + terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), + terminal_ansi_bright_white: rgba(0x3c3836ff).into(), + terminal_ansi_black: rgba(0xebdbb2ff).into(), + terminal_ansi_red: rgba(0xcc241cff).into(), + terminal_ansi_green: rgba(0x989719ff).into(), + terminal_ansi_yellow: rgba(0xd79920ff).into(), + terminal_ansi_blue: rgba(0x448587ff).into(), + terminal_ansi_magenta: rgba(0xb16185ff).into(), + terminal_ansi_cyan: rgba(0x679d6aff).into(), + terminal_ansi_white: rgba(0x7c6f64ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } } - } - \ No newline at end of file diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index 41071e86551f08c23082593721c349c421493a94..bb60ec829426630f691d9b8265205fcaff229375 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -1,23 +1,19 @@ - - mod andromeda; +mod andromeda; +mod ayu; mod dracula; +mod gruvbox; mod nord; mod notctis; -mod ayu; -mod gruvbox; - pub use andromeda::*; +pub use andromeda::*; +pub use ayu::*; pub use dracula::*; +pub use gruvbox::*; pub use nord::*; pub use notctis::*; -pub use ayu::*; -pub use gruvbox::*; - - use crate::ThemeFamily; +use crate::ThemeFamily; - pub(crate) fn all_imported_themes() -> Vec { - vec![andromeda(), dracula(), nord(), notctis(), ayu(), gruvbox()] - } - - \ No newline at end of file +pub(crate) fn all_imported_themes() -> Vec { + vec![andromeda(), dracula(), nord(), notctis(), ayu(), gruvbox()] +} diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index 25d2e6e6cf317f338cf705eec21131ed59f880b0..f5db8a9be6eaa5aebe85a85fa9bfc27688b53f7e 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -1,18 +1,173 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn nord() -> ThemeFamily { - ThemeFamily { - id: "63407887-c052-4dd4-b781-e6194ddcbead".into(), - name: "Nord".into(), - author: "Sven Greb (svengreb)".into(), - themes: vec![ThemeVariant { id: "27d48816-e82b-4285-a615-7a970d51b4a0".into(), name: "Nord".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x3b4252ff).into(), border_variant: rgba(0x3b4252ff).into(), border_focused: rgba(0x3b4252ff).into(), border_disabled: rgba(0x3b4252ff).into(), border_selected: rgba(0x3b4252ff).into(), border_transparent: rgba(0x3b4252ff).into(), elevated_surface_background: rgba(0x2e3440ff).into(), surface_background: rgba(0x2e3440ff).into(), background: rgba(0x2e3440ff).into(), element_background: rgba(0x88bfd0ee).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xd8dee9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2e3440ff).into(), tab_active_background: rgba(0x3b4252ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x2e3440ff).into(), terminal_ansi_bright_black: rgba(0x4c566aff).into(), terminal_ansi_bright_red: rgba(0xbf616aff).into(), terminal_ansi_bright_green: rgba(0xa3be8cff).into(), terminal_ansi_bright_yellow: rgba(0xebcb8bff).into(), terminal_ansi_bright_blue: rgba(0x81a1c1ff).into(), terminal_ansi_bright_magenta: rgba(0xb48eacff).into(), terminal_ansi_bright_cyan: rgba(0x8fbcbbff).into(), terminal_ansi_bright_white: rgba(0xeceff4ff).into(), terminal_ansi_black: rgba(0x3b4252ff).into(), terminal_ansi_red: rgba(0xbf616aff).into(), terminal_ansi_green: rgba(0xa3be8cff).into(), terminal_ansi_yellow: rgba(0xebcb8bff).into(), terminal_ansi_blue: rgba(0x81a1c1ff).into(), terminal_ansi_magenta: rgba(0xb48eacff).into(), terminal_ansi_cyan: rgba(0x88bfd0ff).into(), terminal_ansi_white: rgba(0xe5e9f0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn nord() -> ThemeFamily { + ThemeFamily { + id: "63407887-c052-4dd4-b781-e6194ddcbead".into(), + name: "Nord".into(), + author: "Sven Greb (svengreb)".into(), + themes: vec![ThemeVariant { + id: "27d48816-e82b-4285-a615-7a970d51b4a0".into(), + name: "Nord".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x3b4252ff).into(), + border_variant: rgba(0x3b4252ff).into(), + border_focused: rgba(0x3b4252ff).into(), + border_disabled: rgba(0x3b4252ff).into(), + border_selected: rgba(0x3b4252ff).into(), + border_transparent: rgba(0x3b4252ff).into(), + elevated_surface_background: rgba(0x2e3440ff).into(), + surface_background: rgba(0x2e3440ff).into(), + background: rgba(0x2e3440ff).into(), + element_background: rgba(0x88bfd0ee).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xd8dee9ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x2e3440ff).into(), + tab_active_background: rgba(0x3b4252ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x2e3440ff).into(), + terminal_ansi_bright_black: rgba(0x4c566aff).into(), + terminal_ansi_bright_red: rgba(0xbf616aff).into(), + terminal_ansi_bright_green: rgba(0xa3be8cff).into(), + terminal_ansi_bright_yellow: rgba(0xebcb8bff).into(), + terminal_ansi_bright_blue: rgba(0x81a1c1ff).into(), + terminal_ansi_bright_magenta: rgba(0xb48eacff).into(), + terminal_ansi_bright_cyan: rgba(0x8fbcbbff).into(), + terminal_ansi_bright_white: rgba(0xeceff4ff).into(), + terminal_ansi_black: rgba(0x3b4252ff).into(), + terminal_ansi_red: rgba(0xbf616aff).into(), + terminal_ansi_green: rgba(0xa3be8cff).into(), + terminal_ansi_yellow: rgba(0xebcb8bff).into(), + terminal_ansi_blue: rgba(0x81a1c1ff).into(), + terminal_ansi_magenta: rgba(0xb48eacff).into(), + terminal_ansi_cyan: rgba(0x88bfd0ff).into(), + terminal_ansi_white: rgba(0xe5e9f0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }], + scales: default_color_scales(), + } } - } - \ No newline at end of file diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index 2f228a9b6f80792f951b2831221aea339926f689..7f68cf1da463af3bf679d645eda0d94707b5dce1 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -1,18 +1,1755 @@ +use gpui::rgba; - use gpui::rgba; +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; - use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, - }; - - pub fn notctis() -> ThemeFamily { - ThemeFamily { - id: "7cd79bb0-ffd7-48b5-b104-a6c171161a1b".into(), - name: "Notctis".into(), - author: "Liviu Schera (liviuschera)".into(), - themes: vec![ThemeVariant { id: "66251405-0342-4f10-849c-b81fe33009aa".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x1579b6ff).into(), border_variant: rgba(0x1579b6ff).into(), border_focused: rgba(0x1579b6ff).into(), border_disabled: rgba(0x1579b6ff).into(), border_selected: rgba(0x1579b6ff).into(), border_transparent: rgba(0x1579b6ff).into(), elevated_surface_background: rgba(0x051b28ff).into(), surface_background: rgba(0x051b28ff).into(), background: rgba(0x07263aff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xbecfdaff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x08324eff).into(), tab_active_background: rgba(0x07263aff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x051b28ff).into(), terminal_ansi_bright_black: rgba(0x475e6cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xbecfdaff).into(), terminal_ansi_black: rgba(0x28343dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xaec3d0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "3717c8d5-deb9-4551-ac9b-12cf37c5af11".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x997582ff).into(), border_variant: rgba(0x997582ff).into(), border_focused: rgba(0x997582ff).into(), border_disabled: rgba(0x997582ff).into(), border_selected: rgba(0x997582ff).into(), border_transparent: rgba(0x997582ff).into(), elevated_surface_background: rgba(0x272022ff).into(), surface_background: rgba(0x272022ff).into(), background: rgba(0x322a2dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xcbbec2ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x413036ff).into(), tab_active_background: rgba(0x322a2dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x272022ff).into(), terminal_ansi_bright_black: rgba(0x69545bff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), terminal_ansi_black: rgba(0x47393eff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb9acb0ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "9143cedc-71a4-4005-9b4d-ed23c4ac83fc".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xe1eeefff).into(), surface_background: rgba(0xe1eeefff).into(), background: rgba(0xf4f6f6ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xcaedf2ff).into(), tab_active_background: rgba(0xf4f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xe1eeefff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "82f6e468-a5de-4e3a-ba13-4ced22ac819b".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0xaea4f4ff).into(), border_variant: rgba(0xaea4f4ff).into(), border_focused: rgba(0xaea4f4ff).into(), border_disabled: rgba(0xaea4f4ff).into(), border_selected: rgba(0xaea4f4ff).into(), border_transparent: rgba(0xaea4f4ff).into(), elevated_surface_background: rgba(0xe9e7f3ff).into(), surface_background: rgba(0xe9e7f3ff).into(), background: rgba(0xf2f1f8ff).into(), element_background: rgba(0x8d7ffeff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0x0c006bff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0xe2dff6ff).into(), tab_active_background: rgba(0xf2f1f8ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0xe9e7f3ff).into(), terminal_ansi_bright_black: rgba(0x0f0080ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x0c006bff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "655fe060-e62c-4582-a9d2-87ab9f8f21b7".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xf6eddaff).into(), surface_background: rgba(0xf6eddaff).into(), background: rgba(0xfef8ecff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0xe8e8ecff).into(), element_active: rgba(0xe0e1e6ff).into(), element_selected: rgba(0xe0e1e6ff).into(), element_disabled: rgba(0x0000320f).into(), element_placeholder: rgba(0x60646cff).into(), element_drop_target: rgba(0x008bff0b).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0xe8e8ecff).into(), ghost_element_active: rgba(0xe0e1e6ff).into(), ghost_element_selected: rgba(0xe0e1e6ff).into(), ghost_element_disabled: rgba(0x0000320f).into(), text: rgba(0x005661ff).into(), text_muted: rgba(0x60646cff).into(), text_placeholder: rgba(0x80838dff).into(), text_disabled: rgba(0x8b8d98ff).into(), text_accent: rgba(0x0c73ceff).into(), icon: rgba(0x60646cff).into(), icon_muted: rgba(0x80838dff).into(), icon_disabled: rgba(0x8b8d98ff).into(), icon_placeholder: rgba(0x80838dff).into(), icon_accent: rgba(0x0c73ceff).into(), status_bar_background: rgba(0xf9f9fbff).into(), title_bar_background: rgba(0xf9f9fbff).into(), toolbar_background: rgba(0xfcfcfdff).into(), tab_bar_background: rgba(0xf9f9fbff).into(), tab_inactive_background: rgba(0xf0e9d6ff).into(), tab_active_background: rgba(0xfef8ecff).into(), editor_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), editor_active_line: rgba(0x0000320f).into(), terminal_background: rgba(0xf6eddaff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), terminal_ansi_bright_green: rgba(0x00d17aff).into(), terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), terminal_ansi_black: rgba(0x003b41ff).into(), terminal_ansi_red: rgba(0xe34d1bff).into(), terminal_ansi_green: rgba(0x00b368ff).into(), terminal_ansi_yellow: rgba(0xf49724ff).into(), terminal_ansi_blue: rgba(0x0094f0ff).into(), terminal_ansi_magenta: rgba(0xff5792ff).into(), terminal_ansi_cyan: rgba(0x00bdd6ff).into(), terminal_ansi_white: rgba(0x8ca6a6ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "b8540210-1aff-4d72-bb65-040b2c575e35".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x496c83ff).into(), border_variant: rgba(0x496c83ff).into(), border_focused: rgba(0x496c83ff).into(), border_disabled: rgba(0x496c83ff).into(), border_selected: rgba(0x496c83ff).into(), border_transparent: rgba(0x496c83ff).into(), elevated_surface_background: rgba(0x0e1920ff).into(), surface_background: rgba(0x0e1920ff).into(), background: rgba(0x1b2932ff).into(), element_background: rgba(0x2e616bff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5cdd3ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x202d37ff).into(), tab_active_background: rgba(0x1b2932ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x0e1920ff).into(), terminal_ansi_bright_black: rgba(0x425866ff).into(), terminal_ansi_bright_red: rgba(0xca8468ff).into(), terminal_ansi_bright_green: rgba(0x84c8abff).into(), terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), terminal_ansi_bright_blue: rgba(0x68a4caff).into(), terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), terminal_ansi_black: rgba(0x182935ff).into(), terminal_ansi_red: rgba(0xc08872ff).into(), terminal_ansi_green: rgba(0x72c09fff).into(), terminal_ansi_yellow: rgba(0xc8a984ff).into(), terminal_ansi_blue: rgba(0x6095b7ff).into(), terminal_ansi_magenta: rgba(0xc28097ff).into(), terminal_ansi_cyan: rgba(0x72b7c0ff).into(), terminal_ansi_white: rgba(0xc5cdd3ff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "70577f71-a351-43c6-9b64-7a5f95ef0ad2".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x03181aff).into(), surface_background: rgba(0x03181aff).into(), background: rgba(0x052428ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x052428ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x03181aff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "abcd25b0-8740-430f-a7e0-0b193ef1c271".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "86b6a2b4-69b9-40d5-b078-3feb93d0786d".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), element_background: rgba(0x089099ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xb1c9ccff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), terminal_ansi_black: rgba(0x324a4dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb1c9ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "aa50141c-1c64-4773-980f-e4bf062f893f".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x6d66a7ff).into(), border_variant: rgba(0x6d66a7ff).into(), border_focused: rgba(0x6d66a7ff).into(), border_disabled: rgba(0x6d66a7ff).into(), border_selected: rgba(0x6d66a7ff).into(), border_transparent: rgba(0x6d66a7ff).into(), elevated_surface_background: rgba(0x1f1d30ff).into(), surface_background: rgba(0x1f1d30ff).into(), background: rgba(0x292640ff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xc5c2d6ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x2f2c49ff).into(), tab_active_background: rgba(0x292640ff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x1f1d30ff).into(), terminal_ansi_bright_black: rgba(0x504e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), terminal_ansi_black: rgba(0x302f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xb6b3ccff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }, ThemeVariant { id: "ce4ba03d-5a76-4e6c-9b45-f7c2c2fa3b41".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { system: SystemColors { transparent: rgba(0x00000000).into(), mac_os_traffic_light_red: rgba(0xec6b5fff).into(), mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), mac_os_traffic_light_green: rgba(0x61c454ff).into() }, colors: ThemeColors { border: rgba(0x8666a7ff).into(), border_variant: rgba(0x8666a7ff).into(), border_focused: rgba(0x8666a7ff).into(), border_disabled: rgba(0x8666a7ff).into(), border_selected: rgba(0x8666a7ff).into(), border_transparent: rgba(0x8666a7ff).into(), elevated_surface_background: rgba(0x291d35ff).into(), surface_background: rgba(0x291d35ff).into(), background: rgba(0x30243dff).into(), element_background: rgba(0x007e99ff).into(), element_hover: rgba(0x272a2dff).into(), element_active: rgba(0x2e3135ff).into(), element_selected: rgba(0x2e3135ff).into(), element_disabled: rgba(0xddeaf814).into(), element_placeholder: rgba(0xb0b4baff).into(), element_drop_target: rgba(0x1166fb18).into(), ghost_element_background: rgba(0x00000000).into(), ghost_element_hover: rgba(0x272a2dff).into(), ghost_element_active: rgba(0x2e3135ff).into(), ghost_element_selected: rgba(0x2e3135ff).into(), ghost_element_disabled: rgba(0xddeaf814).into(), text: rgba(0xccbfd9ff).into(), text_muted: rgba(0xb0b4baff).into(), text_placeholder: rgba(0x767a83ff).into(), text_disabled: rgba(0x696e77ff).into(), text_accent: rgba(0x6fb8ffff).into(), icon: rgba(0xb0b4baff).into(), icon_muted: rgba(0x767a83ff).into(), icon_disabled: rgba(0x696e77ff).into(), icon_placeholder: rgba(0x767a83ff).into(), icon_accent: rgba(0x6fb8ffff).into(), status_bar_background: rgba(0x18191bff).into(), title_bar_background: rgba(0x18191bff).into(), toolbar_background: rgba(0x111113ff).into(), tab_bar_background: rgba(0x18191bff).into(), tab_inactive_background: rgba(0x3d2e4dff).into(), tab_active_background: rgba(0x30243dff).into(), editor_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), editor_active_line: rgba(0xddeaf814).into(), terminal_background: rgba(0x291d35ff).into(), terminal_ansi_bright_black: rgba(0x594e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), terminal_ansi_bright_green: rgba(0x5febb1ff).into(), terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), terminal_ansi_black: rgba(0x362f3dff).into(), terminal_ansi_red: rgba(0xe66432ff).into(), terminal_ansi_green: rgba(0x49e9a6ff).into(), terminal_ansi_yellow: rgba(0xe4b781ff).into(), terminal_ansi_blue: rgba(0x49ace9ff).into(), terminal_ansi_magenta: rgba(0xdf759aff).into(), terminal_ansi_cyan: rgba(0x49d5e9ff).into(), terminal_ansi_white: rgba(0xbfafcfff).into() }, status: StatusColors { conflict: rgba(0xff9592ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), error: rgba(0xff9592ff).into(), hidden: rgba(0xb0b4baff).into(), ignored: rgba(0xb0b4baff).into(), info: rgba(0x6fb8ffff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into(), success: rgba(0x70cf82ff).into(), warning: rgba(0xf5e147ff).into() }, git: GitStatusColors { conflict: rgba(0xffa057ff).into(), created: rgba(0x70cf82ff).into(), deleted: rgba(0xff9592ff).into(), ignored: rgba(0xb0b4baff).into(), modified: rgba(0xf5e147ff).into(), renamed: rgba(0x6fb8ffff).into() }, player: PlayerColors(vec![PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }, PlayerColor { cursor: rgba(0x00000000).into(), background: rgba(0x00000000).into(), selection: rgba(0x00000000).into() }]), syntax: SyntaxTheme { highlights: vec![("attribute".into(), rgba(0x4ccce6ff).into()), ("boolean".into(), rgba(0xff977dff).into()), ("comment".into(), rgba(0xb0b4baff).into()), ("comment.doc".into(), rgba(0xe0dffeff).into()), ("constant".into(), rgba(0x8c323aff).into()), ("constructor".into(), rgba(0x8c323aff).into()), ("embedded".into(), rgba(0x8c323aff).into()), ("emphasis".into(), rgba(0x8c323aff).into()), ("emphasis.strong".into(), rgba(0x8c323aff).into()), ("enum".into(), rgba(0x8c323aff).into()), ("function".into(), rgba(0x8c323aff).into()), ("hint".into(), rgba(0x8c323aff).into()), ("keyword".into(), rgba(0xffa057ff).into()), ("label".into(), rgba(0x8c323aff).into()), ("link_text".into(), rgba(0x8c323aff).into()), ("link_uri".into(), rgba(0x8c323aff).into()), ("number".into(), rgba(0x8c323aff).into()), ("operator".into(), rgba(0x8c323aff).into()), ("predictive".into(), rgba(0x8c323aff).into()), ("preproc".into(), rgba(0x8c323aff).into()), ("primary".into(), rgba(0x8c323aff).into()), ("property".into(), rgba(0x8c323aff).into()), ("punctuation".into(), rgba(0xb0b4baff).into()), ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), ("punctuation.special".into(), rgba(0x8c323aff).into()), ("string".into(), rgba(0x1ed8a3ff).into()), ("string.escape".into(), rgba(0x8c323aff).into()), ("string.regex".into(), rgba(0xff977dff).into()), ("string.special".into(), rgba(0x8c323aff).into()), ("string.special.symbol".into(), rgba(0x8c323aff).into()), ("tag".into(), rgba(0x8c323aff).into()), ("text.literal".into(), rgba(0x8c323aff).into()), ("title".into(), rgba(0x8c323aff).into()), ("type".into(), rgba(0x8c323aff).into()), ("variable".into(), rgba(0x8c323aff).into()), ("variable.special".into(), rgba(0x8c323aff).into()), ("variant".into(), rgba(0x8c323aff).into())] } } }], - scales: default_color_scales(), +pub fn notctis() -> ThemeFamily { + ThemeFamily { + id: "7cd79bb0-ffd7-48b5-b104-a6c171161a1b".into(), + name: "Notctis".into(), + author: "Liviu Schera (liviuschera)".into(), + themes: vec![ + ThemeVariant { + id: "66251405-0342-4f10-849c-b81fe33009aa".into(), + name: "Noctis Azureus".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x1579b6ff).into(), + border_variant: rgba(0x1579b6ff).into(), + border_focused: rgba(0x1579b6ff).into(), + border_disabled: rgba(0x1579b6ff).into(), + border_selected: rgba(0x1579b6ff).into(), + border_transparent: rgba(0x1579b6ff).into(), + elevated_surface_background: rgba(0x051b28ff).into(), + surface_background: rgba(0x051b28ff).into(), + background: rgba(0x07263aff).into(), + element_background: rgba(0x007e99ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xbecfdaff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x08324eff).into(), + tab_active_background: rgba(0x07263aff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x051b28ff).into(), + terminal_ansi_bright_black: rgba(0x475e6cff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xbecfdaff).into(), + terminal_ansi_black: rgba(0x28343dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xaec3d0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "3717c8d5-deb9-4551-ac9b-12cf37c5af11".into(), + name: "Noctis Bordo".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x997582ff).into(), + border_variant: rgba(0x997582ff).into(), + border_focused: rgba(0x997582ff).into(), + border_disabled: rgba(0x997582ff).into(), + border_selected: rgba(0x997582ff).into(), + border_transparent: rgba(0x997582ff).into(), + elevated_surface_background: rgba(0x272022ff).into(), + surface_background: rgba(0x272022ff).into(), + background: rgba(0x322a2dff).into(), + element_background: rgba(0x007e99ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xcbbec2ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x413036ff).into(), + tab_active_background: rgba(0x322a2dff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x272022ff).into(), + terminal_ansi_bright_black: rgba(0x69545bff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), + terminal_ansi_black: rgba(0x47393eff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xb9acb0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "9143cedc-71a4-4005-9b4d-ed23c4ac83fc".into(), + name: "Noctus Hibernus".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x00c6e0ff).into(), + border_variant: rgba(0x00c6e0ff).into(), + border_focused: rgba(0x00c6e0ff).into(), + border_disabled: rgba(0x00c6e0ff).into(), + border_selected: rgba(0x00c6e0ff).into(), + border_transparent: rgba(0x00c6e0ff).into(), + elevated_surface_background: rgba(0xe1eeefff).into(), + surface_background: rgba(0xe1eeefff).into(), + background: rgba(0xf4f6f6ff).into(), + element_background: rgba(0x089099ff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x005661ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xcaedf2ff).into(), + tab_active_background: rgba(0xf4f6f6ff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xe1eeefff).into(), + terminal_ansi_bright_black: rgba(0x004d57ff).into(), + terminal_ansi_bright_red: rgba(0xff3f00ff).into(), + terminal_ansi_bright_green: rgba(0x00d17aff).into(), + terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), + terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), + terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), + terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), + terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), + terminal_ansi_black: rgba(0x003b41ff).into(), + terminal_ansi_red: rgba(0xe34d1bff).into(), + terminal_ansi_green: rgba(0x00b368ff).into(), + terminal_ansi_yellow: rgba(0xf49724ff).into(), + terminal_ansi_blue: rgba(0x0094f0ff).into(), + terminal_ansi_magenta: rgba(0xff5792ff).into(), + terminal_ansi_cyan: rgba(0x00bdd6ff).into(), + terminal_ansi_white: rgba(0x8ca6a6ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "82f6e468-a5de-4e3a-ba13-4ced22ac819b".into(), + name: "Noctis Lilac".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xaea4f4ff).into(), + border_variant: rgba(0xaea4f4ff).into(), + border_focused: rgba(0xaea4f4ff).into(), + border_disabled: rgba(0xaea4f4ff).into(), + border_selected: rgba(0xaea4f4ff).into(), + border_transparent: rgba(0xaea4f4ff).into(), + elevated_surface_background: rgba(0xe9e7f3ff).into(), + surface_background: rgba(0xe9e7f3ff).into(), + background: rgba(0xf2f1f8ff).into(), + element_background: rgba(0x8d7ffeff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0x0c006bff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0xe2dff6ff).into(), + tab_active_background: rgba(0xf2f1f8ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0xe9e7f3ff).into(), + terminal_ansi_bright_black: rgba(0x0f0080ff).into(), + terminal_ansi_bright_red: rgba(0xff3f00ff).into(), + terminal_ansi_bright_green: rgba(0x00d17aff).into(), + terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), + terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), + terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), + terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), + terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), + terminal_ansi_black: rgba(0x0c006bff).into(), + terminal_ansi_red: rgba(0xe34d1bff).into(), + terminal_ansi_green: rgba(0x00b368ff).into(), + terminal_ansi_yellow: rgba(0xf49724ff).into(), + terminal_ansi_blue: rgba(0x0094f0ff).into(), + terminal_ansi_magenta: rgba(0xff5792ff).into(), + terminal_ansi_cyan: rgba(0x00bdd6ff).into(), + terminal_ansi_white: rgba(0x8ca6a6ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "655fe060-e62c-4582-a9d2-87ab9f8f21b7".into(), + name: "Noctis Lux".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x00c6e0ff).into(), + border_variant: rgba(0x00c6e0ff).into(), + border_focused: rgba(0x00c6e0ff).into(), + border_disabled: rgba(0x00c6e0ff).into(), + border_selected: rgba(0x00c6e0ff).into(), + border_transparent: rgba(0x00c6e0ff).into(), + elevated_surface_background: rgba(0xf6eddaff).into(), + surface_background: rgba(0xf6eddaff).into(), + background: rgba(0xfef8ecff).into(), + element_background: rgba(0x089099ff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x005661ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xf0e9d6ff).into(), + tab_active_background: rgba(0xfef8ecff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xf6eddaff).into(), + terminal_ansi_bright_black: rgba(0x004d57ff).into(), + terminal_ansi_bright_red: rgba(0xff3f00ff).into(), + terminal_ansi_bright_green: rgba(0x00d17aff).into(), + terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), + terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), + terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), + terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), + terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), + terminal_ansi_black: rgba(0x003b41ff).into(), + terminal_ansi_red: rgba(0xe34d1bff).into(), + terminal_ansi_green: rgba(0x00b368ff).into(), + terminal_ansi_yellow: rgba(0xf49724ff).into(), + terminal_ansi_blue: rgba(0x0094f0ff).into(), + terminal_ansi_magenta: rgba(0xff5792ff).into(), + terminal_ansi_cyan: rgba(0x00bdd6ff).into(), + terminal_ansi_white: rgba(0x8ca6a6ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "b8540210-1aff-4d72-bb65-040b2c575e35".into(), + name: "Noctis Minimus".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x496c83ff).into(), + border_variant: rgba(0x496c83ff).into(), + border_focused: rgba(0x496c83ff).into(), + border_disabled: rgba(0x496c83ff).into(), + border_selected: rgba(0x496c83ff).into(), + border_transparent: rgba(0x496c83ff).into(), + elevated_surface_background: rgba(0x0e1920ff).into(), + surface_background: rgba(0x0e1920ff).into(), + background: rgba(0x1b2932ff).into(), + element_background: rgba(0x2e616bff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xc5cdd3ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x202d37ff).into(), + tab_active_background: rgba(0x1b2932ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x0e1920ff).into(), + terminal_ansi_bright_black: rgba(0x425866ff).into(), + terminal_ansi_bright_red: rgba(0xca8468ff).into(), + terminal_ansi_bright_green: rgba(0x84c8abff).into(), + terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), + terminal_ansi_bright_blue: rgba(0x68a4caff).into(), + terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), + terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), + terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), + terminal_ansi_black: rgba(0x182935ff).into(), + terminal_ansi_red: rgba(0xc08872ff).into(), + terminal_ansi_green: rgba(0x72c09fff).into(), + terminal_ansi_yellow: rgba(0xc8a984ff).into(), + terminal_ansi_blue: rgba(0x6095b7ff).into(), + terminal_ansi_magenta: rgba(0xc28097ff).into(), + terminal_ansi_cyan: rgba(0x72b7c0ff).into(), + terminal_ansi_white: rgba(0xc5cdd3ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "70577f71-a351-43c6-9b64-7a5f95ef0ad2".into(), + name: "Noctis".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x0d6571ff).into(), + border_variant: rgba(0x0d6571ff).into(), + border_focused: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), + border_selected: rgba(0x0d6571ff).into(), + border_transparent: rgba(0x0d6571ff).into(), + elevated_surface_background: rgba(0x03181aff).into(), + surface_background: rgba(0x03181aff).into(), + background: rgba(0x052428ff).into(), + element_background: rgba(0x089099ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xb1c9ccff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x052e32ff).into(), + tab_active_background: rgba(0x052428ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x03181aff).into(), + terminal_ansi_bright_black: rgba(0x47686cff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), + terminal_ansi_black: rgba(0x324a4dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xb1c9ccff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "abcd25b0-8740-430f-a7e0-0b193ef1c271".into(), + name: "Noctis Obscuro".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x0d6571ff).into(), + border_variant: rgba(0x0d6571ff).into(), + border_focused: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), + border_selected: rgba(0x0d6571ff).into(), + border_transparent: rgba(0x0d6571ff).into(), + elevated_surface_background: rgba(0x020c0eff).into(), + surface_background: rgba(0x020c0eff).into(), + background: rgba(0x031316ff).into(), + element_background: rgba(0x089099ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xb1c9ccff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x052e32ff).into(), + tab_active_background: rgba(0x031316ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x020c0eff).into(), + terminal_ansi_bright_black: rgba(0x47686cff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), + terminal_ansi_black: rgba(0x324a4dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xb1c9ccff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "86b6a2b4-69b9-40d5-b078-3feb93d0786d".into(), + name: "Noctis Sereno".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x0d6571ff).into(), + border_variant: rgba(0x0d6571ff).into(), + border_focused: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), + border_selected: rgba(0x0d6571ff).into(), + border_transparent: rgba(0x0d6571ff).into(), + elevated_surface_background: rgba(0x020c0eff).into(), + surface_background: rgba(0x020c0eff).into(), + background: rgba(0x031316ff).into(), + element_background: rgba(0x089099ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xb1c9ccff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x052e32ff).into(), + tab_active_background: rgba(0x031316ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x020c0eff).into(), + terminal_ansi_bright_black: rgba(0x47686cff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), + terminal_ansi_black: rgba(0x324a4dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xb1c9ccff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "aa50141c-1c64-4773-980f-e4bf062f893f".into(), + name: "Noctis Uva".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x6d66a7ff).into(), + border_variant: rgba(0x6d66a7ff).into(), + border_focused: rgba(0x6d66a7ff).into(), + border_disabled: rgba(0x6d66a7ff).into(), + border_selected: rgba(0x6d66a7ff).into(), + border_transparent: rgba(0x6d66a7ff).into(), + elevated_surface_background: rgba(0x1f1d30ff).into(), + surface_background: rgba(0x1f1d30ff).into(), + background: rgba(0x292640ff).into(), + element_background: rgba(0x007e99ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xc5c2d6ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x2f2c49ff).into(), + tab_active_background: rgba(0x292640ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x1f1d30ff).into(), + terminal_ansi_bright_black: rgba(0x504e65ff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), + terminal_ansi_black: rgba(0x302f3dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xb6b3ccff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "ce4ba03d-5a76-4e6c-9b45-f7c2c2fa3b41".into(), + name: "Noctis Viola".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x8666a7ff).into(), + border_variant: rgba(0x8666a7ff).into(), + border_focused: rgba(0x8666a7ff).into(), + border_disabled: rgba(0x8666a7ff).into(), + border_selected: rgba(0x8666a7ff).into(), + border_transparent: rgba(0x8666a7ff).into(), + elevated_surface_background: rgba(0x291d35ff).into(), + surface_background: rgba(0x291d35ff).into(), + background: rgba(0x30243dff).into(), + element_background: rgba(0x007e99ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xccbfd9ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x3d2e4dff).into(), + tab_active_background: rgba(0x30243dff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x291d35ff).into(), + terminal_ansi_bright_black: rgba(0x594e65ff).into(), + terminal_ansi_bright_red: rgba(0xe97749ff).into(), + terminal_ansi_bright_green: rgba(0x5febb1ff).into(), + terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), + terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), + terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), + terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), + terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), + terminal_ansi_black: rgba(0x362f3dff).into(), + terminal_ansi_red: rgba(0xe66432ff).into(), + terminal_ansi_green: rgba(0x49e9a6ff).into(), + terminal_ansi_yellow: rgba(0xe4b781ff).into(), + terminal_ansi_blue: rgba(0x49ace9ff).into(), + terminal_ansi_magenta: rgba(0xdf759aff).into(), + terminal_ansi_cyan: rgba(0x49d5e9ff).into(), + terminal_ansi_white: rgba(0xbfafcfff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } } - } - \ No newline at end of file From 3cb72610b3182cdb8f66853a742e3ee801776397 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 15:24:36 -0500 Subject: [PATCH 037/110] Finish up initial themes --- assets/themes/src/vscode/night-owl/LICENSE | 21 + .../themes/src/vscode/night-owl/family.json | 16 + .../src/vscode/night-owl/night-owl-light.json | 1723 ++++++++++++++++ .../src/vscode/night-owl/night-owl.json | 1832 +++++++++++++++++ assets/themes/src/vscode/palenight/LICENSE | 7 + .../themes/src/vscode/palenight/family.json | 21 + .../palenight/palenight-mild-contrast.json | 1569 ++++++++++++++ .../vscode/palenight/palenight-operator.json | 1640 +++++++++++++++ .../src/vscode/palenight/palenight.json | 1569 ++++++++++++++ assets/themes/src/vscode/rose-pine/LICENSE | 21 + .../themes/src/vscode/rose-pine/family.json | 21 + .../src/vscode/rose-pine/rose-pine-dawn.json | 680 ++++++ .../src/vscode/rose-pine/rose-pine-moon.json | 680 ++++++ .../src/vscode/rose-pine/rose-pine.json | 680 ++++++ assets/themes/src/vscode/solarized/LICENSE | 19 + assets/themes/src/vscode/solarized/dark.json | 558 +++++ .../themes/src/vscode/solarized/family.json | 16 + assets/themes/src/vscode/solarized/light.json | 591 ++++++ assets/themes/src/vscode/synthwave-84/LICENSE | 21 + .../src/vscode/synthwave-84/family.json | 11 + .../src/vscode/synthwave-84/synthwave.json | 822 ++++++++ crates/theme2/src/themes/andromeda.rs | 6 +- crates/theme2/src/themes/ayu.rs | 8 +- crates/theme2/src/themes/dracula.rs | 4 +- crates/theme2/src/themes/gruvbox.rs | 14 +- crates/theme2/src/themes/mod.rs | 24 +- crates/theme2/src/themes/night_owl.rs | 333 +++ crates/theme2/src/themes/nord.rs | 4 +- crates/theme2/src/themes/notctis.rs | 24 +- crates/theme2/src/themes/palenight.rs | 491 +++++ crates/theme2/src/themes/rose_pine.rs | 491 +++++ crates/theme2/src/themes/solarized.rs | 333 +++ crates/theme2/src/themes/synthwave_84.rs | 173 ++ crates/theme_importer/src/main.rs | 25 +- 34 files changed, 14401 insertions(+), 47 deletions(-) create mode 100644 assets/themes/src/vscode/night-owl/LICENSE create mode 100644 assets/themes/src/vscode/night-owl/family.json create mode 100644 assets/themes/src/vscode/night-owl/night-owl-light.json create mode 100644 assets/themes/src/vscode/night-owl/night-owl.json create mode 100644 assets/themes/src/vscode/palenight/LICENSE create mode 100644 assets/themes/src/vscode/palenight/family.json create mode 100644 assets/themes/src/vscode/palenight/palenight-mild-contrast.json create mode 100644 assets/themes/src/vscode/palenight/palenight-operator.json create mode 100644 assets/themes/src/vscode/palenight/palenight.json create mode 100644 assets/themes/src/vscode/rose-pine/LICENSE create mode 100644 assets/themes/src/vscode/rose-pine/family.json create mode 100644 assets/themes/src/vscode/rose-pine/rose-pine-dawn.json create mode 100644 assets/themes/src/vscode/rose-pine/rose-pine-moon.json create mode 100644 assets/themes/src/vscode/rose-pine/rose-pine.json create mode 100644 assets/themes/src/vscode/solarized/LICENSE create mode 100644 assets/themes/src/vscode/solarized/dark.json create mode 100644 assets/themes/src/vscode/solarized/family.json create mode 100644 assets/themes/src/vscode/solarized/light.json create mode 100644 assets/themes/src/vscode/synthwave-84/LICENSE create mode 100644 assets/themes/src/vscode/synthwave-84/family.json create mode 100644 assets/themes/src/vscode/synthwave-84/synthwave.json create mode 100644 crates/theme2/src/themes/night_owl.rs create mode 100644 crates/theme2/src/themes/palenight.rs create mode 100644 crates/theme2/src/themes/rose_pine.rs create mode 100644 crates/theme2/src/themes/solarized.rs create mode 100644 crates/theme2/src/themes/synthwave_84.rs diff --git a/assets/themes/src/vscode/night-owl/LICENSE b/assets/themes/src/vscode/night-owl/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e1de2ebbb6c9de263842a913f6e57e9905645708 --- /dev/null +++ b/assets/themes/src/vscode/night-owl/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Sarah Drasner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vscode/night-owl/family.json b/assets/themes/src/vscode/night-owl/family.json new file mode 100644 index 0000000000000000000000000000000000000000..81c6ca7534ef045b6b4aeed60d926bb391663432 --- /dev/null +++ b/assets/themes/src/vscode/night-owl/family.json @@ -0,0 +1,16 @@ +{ + "name": "Night Owl", + "author": "Sarah Drasner (sdras)", + "themes": [ + { + "name": "Night Owl", + "file_name": "night-owl.json", + "appearance": "dark" + }, + { + "name": "Night Owl Light", + "file_name": "night-owl-light.json", + "appearance": "light" + } + ] +} diff --git a/assets/themes/src/vscode/night-owl/night-owl-light.json b/assets/themes/src/vscode/night-owl/night-owl-light.json new file mode 100644 index 0000000000000000000000000000000000000000..81e0fc0092279aec3298ff2f77a81137e0340a68 --- /dev/null +++ b/assets/themes/src/vscode/night-owl/night-owl-light.json @@ -0,0 +1,1723 @@ +{ + "name": "Night Owl Light", + "type": "light", + "semanticHighlighting": false, + "colors": { + "foreground": "#403f53", + "focusBorder": "#93A1A1", + "errorForeground": "#403f53", + "selection.background": "#7a8181ad", + "descriptionForeground": "#403f53", + "widget.shadow": "#d9d9d9", + "titleBar.activeBackground": "#F0F0F0", + + "notifications.background": "#F0F0F0", + "notifications.foreground": "#403f53", + "notificationLink.foreground": "#994cc3", + "notifications.border": "#CCCCCC", + "notificationCenter.border": "#CCCCCC", + "notificationToast.border": "#CCCCCC", + "notificationCenterHeader.foreground": "#403f53", + "notificationCenterHeader.background": "#F0F0F0", + + "button.background": "#2AA298", + "button.foreground": "#F0F0F0", + + "dropdown.background": "#F0F0F0", + "dropdown.foreground": "#403f53", + "dropdown.border": "#d9d9d9", + + "input.background": "#F0F0F0", + "input.foreground": "#403f53", + "input.border": "#d9d9d9", + "input.placeholderForeground": "#93A1A1", + "inputOption.activeBorder": "#2AA298", + "inputValidation.infoBorder": "#D0D0D0", + "inputValidation.infoBackground": "#F0F0F0", + "inputValidation.warningBackground": "#daaa01", + "inputValidation.warningBorder": "#E0AF02", + "inputValidation.errorBackground": "#f76e6e", + "inputValidation.errorBorder": "#de3d3b", + + "badge.background": "#2AA298", + "badge.foreground": "#F0F0F0", + + "progressBar.background": "#2AA298", + + "list.activeSelectionBackground": "#d3e8f8", + "list.activeSelectionForeground": "#403f53", + "list.inactiveSelectionBackground": "#E0E7EA", + "list.inactiveSelectionForeground": "#403f53", + "list.focusBackground": "#d3e8f8", + "list.hoverBackground": "#d3e8f8", + "list.focusForeground": "#403f53", + "list.hoverForeground": "#403f53", + "list.highlightForeground": "#403f53", + "list.errorForeground": "#E64D49", + "list.warningForeground": "#daaa01", + + "activityBar.background": "#F0F0F0", + "activityBar.foreground": "#403f53", + "activityBar.dropBackground": "#D0D0D0", + "activityBarBadge.background": "#403f53", + "activityBarBadge.foreground": "#F0F0F0", + "activityBar.border": "#F0F0F0", + + "sideBar.background": "#F0F0F0", + "sideBar.foreground": "#403f53", + "sideBarTitle.foreground": "#403f53", + "sideBar.border": "#F0F0F0", + + "scrollbar.shadow": "#CCCCCC", + + "tab.border": "#F0F0F0", + "tab.activeBackground": "#F6F6F6", + "tab.activeForeground": "#403f53", + "tab.inactiveForeground": "#403f53", + "tab.inactiveBackground": "#F0F0F0", + "editorGroup.border": "#F0F0F0", + "editorGroup.background": "#F6F6F6", + "editorGroupHeader.tabsBackground": "#F0F0F0", + "editorGroupHeader.tabsBorder": "#F0F0F0", + "editorGroupHeader.noTabsBackground": "#F0F0F0", + "tab.activeModifiedBorder": "#2AA298", + "tab.inactiveModifiedBorder": "#93A1A1", + "tab.unfocusedActiveModifiedBorder": "#93A1A1", + "tab.unfocusedInactiveModifiedBorder": "#93A1A1", + + "editor.background": "#FBFBFB", + "editor.foreground": "#403f53", + "editorCursor.foreground": "#90A7B2", + "editorLineNumber.foreground": "#90A7B2", + "editorLineNumber.activeForeground": "#403f53", + "editor.selectionBackground": "#E0E0E0", + "editor.selectionHighlightBackground": "#339cec33", + "editor.wordHighlightBackground": "#339cec33", + "editor.wordHighlightStrongBackground": "#007dd659", + "editor.findMatchBackground": "#93A1A16c", + "editor.findMatchHighlightBackground": "#93a1a16c", + "editor.findRangeHighlightBackground": "#7497a633", + "editor.hoverHighlightBackground": "#339cec33", + "editor.lineHighlightBackground": "#F0F0F0", + "editor.rangeHighlightBackground": "#7497a633", + "editorWhitespace.foreground": "#d9d9d9", + "editorIndentGuide.background": "#d9d9d9", + "editorCodeLens.foreground": "#403f53", + "editorBracketMatch.background": "#d3e8f8", + "editorBracketMatch.border": "#2AA298", + "editorError.foreground": "#E64D49", + "editorError.border": "#FBFBFB", + "editorWarning.foreground": "#daaa01", + "editorWarning.border": "#daaa01", + "editorGutter.addedBackground": "#49d0c5", + "editorGutter.modifiedBackground": "#6fbef6", + "editorGutter.deletedBackground": "#f76e6e", + "editorRuler.foreground": "#d9d9d9", + "editorOverviewRuler.errorForeground": "#E64D49", + "editorOverviewRuler.warningForeground": "#daaa01", + + "editorWidget.background": "#F0F0F0", + "editorWidget.border": "#d9d9d9", + "editorSuggestWidget.background": "#F0F0F0", + "editorSuggestWidget.foreground": "#403f53", + "editorSuggestWidget.highlightForeground": "#403f53", + "editorSuggestWidget.selectedBackground": "#d3e8f8", + "editorSuggestWidget.border": "#d9d9d9", + "editorHoverWidget.background": "#F0F0F0", + "editorHoverWidget.border": "#d9d9d9", + "debugExceptionWidget.background": "#F0F0F0", + "debugExceptionWidget.border": "#d9d9d9", + "editorMarkerNavigation.background": "#D0D0D0", + "editorMarkerNavigationError.background": "#f76e6e", + "editorMarkerNavigationWarning.background": "#daaa01", + + "debugToolBar.background": "#F0F0F0", + + "pickerGroup.border": "#d9d9d9", + "pickerGroup.foreground": "#403f53", + + "extensionButton.prominentBackground": "#2AA298", + "extensionButton.prominentForeground": "#F0F0F0", + + "statusBar.background": "#F0F0F0", + "statusBar.border": "#F0F0F0", + "statusBar.debuggingBackground": "#F0F0F0", + "statusBar.debuggingForeground": "#403f53", + "statusBar.foreground": "#403f53", + "statusBar.noFolderBackground": "#F0F0F0", + "statusBar.noFolderForeground": "#403f53", + + "panel.background": "#F0F0F0", + "panel.border": "#d9d9d9", + + "peekView.border": "#d9d9d9", + "peekViewEditor.background": "#F6F6F6", + "peekViewEditorGutter.background": "#F6F6F6", + "peekViewEditor.matchHighlightBackground": "#49d0c5", + "peekViewResult.background": "#F0F0F0", + "peekViewResult.fileForeground": "#403f53", + "peekViewResult.lineForeground": "#403f53", + "peekViewResult.matchHighlightBackground": "#49d0c5", + "peekViewResult.selectionBackground": "#E0E7EA", + "peekViewResult.selectionForeground": "#403f53", + "peekViewTitle.background": "#F0F0F0", + "peekViewTitleLabel.foreground": "#403f53", + "peekViewTitleDescription.foreground": "#403f53", + + "terminal.ansiBrightBlack": "#403f53", + "terminal.ansiBlack": "#403f53", + "terminal.ansiBrightBlue": "#288ed7", + "terminal.ansiBlue": "#288ed7", + "terminal.ansiBrightCyan": "#2AA298", + "terminal.ansiCyan": "#2AA298", + "terminal.ansiBrightGreen": "#08916a", + "terminal.ansiGreen": "#08916a", + "terminal.ansiBrightMagenta": "#d6438a", + "terminal.ansiMagenta": "#d6438a", + "terminal.ansiBrightRed": "#de3d3b", + "terminal.ansiRed": "#de3d3b", + "terminal.ansiBrightWhite": "#F0F0F0", + "terminal.ansiWhite": "#F0F0F0", + "terminal.ansiBrightYellow": "#daaa01", + "terminal.ansiYellow": "#E0AF02", + "terminal.background": "#F6F6F6", + "terminal.foreground": "#403f53" + }, + "tokenColors": [ + { + "name": "Changed", + "scope": [ + "markup.changed", + "meta.diff.header.git", + "meta.diff.header.from-file", + "meta.diff.header.to-file" + ], + "settings": { + "foreground": "#a2bffc", + "fontStyle": "italic" + } + }, + { + "name": "Deleted", + "scope": "markup.deleted.diff", + "settings": { + "foreground": "#EF535090", + "fontStyle": "italic" + } + }, + { + "name": "Inserted", + "scope": "markup.inserted.diff", + "settings": { + "foreground": "#4876d6ff", + "fontStyle": "italic" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#011627", + "foreground": "#403f53" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#989fb1", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "String Quoted", + "scope": ["string.quoted", "variable.other.readwrite.js"], + "settings": { + "foreground": "#c96765" + } + }, + { + "name": "Support Constant Math", + "scope": "support.constant.math", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Number", + "scope": ["constant.numeric", "constant.character.numeric"], + "settings": { + "foreground": "#aa0982", + "fontStyle": "" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "punctuation.definition.constant", + "variable.other.constant" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "RegExp String", + "scope": ["string.regexp", "string.regexp keyword.other"], + "settings": { + "foreground": "#5ca7e4" + } + }, + { + "name": "Comma in functions", + "scope": "meta.function punctuation.separator.comma", + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Keyword", + "scope": ["punctuation.accessor", "keyword"], + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "meta.var.expr", + "meta.class meta.method.declaration meta.var.expr storage.type.js", + "storage.type.property.js", + "storage.type.property.ts", + "storage.type.property.tsx" + ], + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Storage type", + "scope": "storage.type.function.arrow.js", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "meta.class entity.name.type.class"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Meta Tag", + "scope": ["punctuation.definition.tag", "meta.tag"], + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "HTML Tag names", + "scope": [ + "entity.name.tag", + "meta.tag.other.html", + "meta.tag.other.js", + "meta.tag.other.tsx", + "entity.name.tag.tsx", + "entity.name.tag.js", + "entity.name.tag", + "meta.tag.js", + "meta.tag.tsx", + "meta.tag.html" + ], + "settings": { + "foreground": "#994cc3", + "fontStyle": "" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "italic", + "foreground": "#4876d6" + } + }, + { + "name": "Entity Name Tag Custom", + "scope": "entity.name.tag.custom", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Library (function & constant)", + "scope": ["support.function", "support.constant"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Support Constant Property Value meta", + "scope": "support.constant.meta.property-value", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Support Variable DOM", + "scope": "support.variable.dom", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "foreground": "#ff2c83" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#0c969b", + "fontStyle": "" + } + }, + { + "name": "Keyword Operator Relational", + "scope": "keyword.operator.relational", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Operator Assignment", + "scope": "keyword.operator.assignment", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Keyword Operator Arithmetic", + "scope": "keyword.operator.arithmetic", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Keyword Operator Bitwise", + "scope": "keyword.operator.bitwise", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Keyword Operator Increment", + "scope": "keyword.operator.increment", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Keyword Operator Ternary", + "scope": "keyword.operator.ternary", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "Double-Slashed Comment", + "scope": "comment.line.double-slash", + "settings": { + "foreground": "#939dbb" + } + }, + { + "name": "Object", + "scope": "object", + "settings": { + "foreground": "#cdebf7" + } + }, + { + "name": "Null", + "scope": "constant.language.null", + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "Meta Brace", + "scope": "meta.brace", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Meta Delimiter Period", + "scope": "meta.delimiter.period", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition String", + "scope": "punctuation.definition.string", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Punctuation Definition String Markdown", + "scope": "punctuation.definition.string.begin.markdown", + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "Object Comma", + "scope": "object.comma", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Variable Parameter Function", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#0c969b", + "fontStyle": "" + } + }, + { + "name": "Support Type Property Name & entity name tags", + "scope": [ + "support.type.vendor.property-name", + "support.constant.vendor.property-value", + "support.type.property-name", + "meta.property-list entity.name.tag" + ], + "settings": { + "foreground": "#0c969b", + "fontStyle": "" + } + }, + { + "name": "Entity Name tag reference in stylesheets", + "scope": "meta.property-list entity.name.tag.reference", + "settings": { + "foreground": "#57eaf1" + } + }, + { + "name": "Constant Other Color RGB Value Punctuation Definition Constant", + "scope": "constant.other.color.rgb-value punctuation.definition.constant", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Constant Other Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Keyword Other Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Meta Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Entity Other Attribute Name Id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Meta Property Name", + "scope": "meta.property-name", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Doctypes", + "scope": ["entity.name.tag.doctype", "meta.tag.sgml.doctype"], + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": "punctuation.definition.parameters", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Keyword Control Operator", + "scope": "keyword.control.operator", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Keyword Operator Logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#994cc3", + "fontStyle": "" + } + }, + { + "name": "Variable Instances", + "scope": [ + "variable.instance", + "variable.other.instance", + "variable.readwrite.instance", + "variable.other.readwrite.instance", + "variable.other.property" + ], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Variable Property Other object property", + "scope": ["variable.other.object.property"], + "settings": { + "foreground": "#111111", + "fontStyle": "italic" + } + }, + { + "name": "Variable Property Other object", + "scope": ["variable.other.object.js"], + "settings": { + "fontStyle": "" + } + }, + { + "name": "Entity Name Function", + "scope": ["entity.name.function"], + "settings": { + "foreground": "#4876d6", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Operator Comparison, imports, returns and Keyword Operator Ruby", + "scope": [ + "keyword.operator.comparison", + "keyword.control.flow.js", + "keyword.control.flow.ts", + "keyword.control.flow.tsx", + "keyword.control.ruby", + "keyword.control.module.ruby", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.control.loop.js", + "keyword.control.loop.ts", + "keyword.control.import.js", + "keyword.control.import.ts", + "keyword.control.import.tsx", + "keyword.control.from.js", + "keyword.control.from.ts", + "keyword.control.from.tsx", + "keyword.operator.instanceof.js", + "keyword.operator.expression.instanceof.ts", + "keyword.operator.expression.instanceof.tsx" + ], + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Control Conditional", + "scope": [ + "keyword.control.conditional.js", + "keyword.control.conditional.ts", + "keyword.control.switch.js", + "keyword.control.switch.ts" + ], + "settings": { + "foreground": "#994cc3", + "fontStyle": "" + } + }, + { + "name": "Support Constant, `new` keyword, Special Method Keyword, `debugger`, other keywords", + "scope": [ + "support.constant", + "keyword.other.special-method", + "keyword.other.new", + "keyword.other.debugger", + "keyword.control" + ], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Invalid Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Invalid Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "foreground": "#8BD649" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#c96765" + } + }, + { + "name": "Language Variable", + "scope": "variable.language", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Support Variable Property", + "scope": "support.variable.property", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Variable Function", + "scope": "variable.function", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Variable Interpolation", + "scope": "variable.interpolation", + "settings": { + "foreground": "#ec5f67" + } + }, + { + "name": "Meta Function Call", + "scope": "meta.function-call", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Punctuation Tweaks", + "scope": [ + "punctuation.terminator.expression", + "punctuation.definition.arguments", + "punctuation.definition.array", + "punctuation.section.array", + "meta.array" + ], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "More Punctuation Tweaks", + "scope": [ + "punctuation.definition.list.begin", + "punctuation.definition.list.end", + "punctuation.separator.arguments", + "punctuation.definition.list" + ], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Template Strings", + "scope": "string.template meta.template.expression", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Backtics(``) in Template Strings", + "scope": "string.template punctuation.definition.string", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Italics", + "scope": "italic", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Bold", + "scope": "bold", + "settings": { + "foreground": "#4876d6", + "fontStyle": "bold" + } + }, + { + "name": "Quote", + "scope": "quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Raw Code", + "scope": "raw", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "CoffeScript Variable Assignment", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#31e1eb" + } + }, + { + "name": "CoffeScript Parameter Function", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "CoffeeScript Assignments", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "C# Readwrite Variables", + "scope": "variable.other.readwrite.cs", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "C# Classes & Storage types", + "scope": ["entity.name.type.class.cs", "storage.type.cs"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "C# Namespaces", + "scope": "entity.name.type.namespace.cs", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Tag names in Stylesheets", + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less", + "entity.name.tag.custom.css", + "support.constant.property-value.css" + ], + "settings": { + "foreground": "#c96765", + "fontStyle": "" + } + }, + { + "name": "Wildcard(*) selector in Stylesheets", + "scope": [ + "entity.name.tag.wildcard.css", + "entity.name.tag.wildcard.less", + "entity.name.tag.wildcard.scss", + "entity.name.tag.wildcard.sass" + ], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "CSS Keyword Other Unit", + "scope": "keyword.other.unit.css", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Attribute Name for CSS", + "scope": [ + "meta.attribute-selector.css entity.other.attribute-name.attribute", + "variable.other.readwrite.js" + ], + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Elixir String Punctuations", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Elixir Binary Punctuations", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Closure Constant Keyword", + "scope": "constant.keyword.clojure", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Go Keywords", + "scope": [ + "source.go keyword.package.go", + "source.go keyword.import.go", + "source.go keyword.function.go", + "source.go keyword.type.go", + "source.go keyword.struct.go", + "source.go keyword.interface.go", + "source.go keyword.const.go", + "source.go keyword.var.go", + "source.go keyword.map.go", + "source.go keyword.channel.go", + "source.go keyword.control.go" + ], + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Go Constants e.g. nil, string format (%s, %d, etc.)", + "scope": ["source.go constant.language.go", "source.go constant.other.placeholder.go"], + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "C++ Functions", + "scope": ["entity.name.function.preprocessor.cpp", "entity.scope.name.cpp"], + "settings": { + "foreground": "#0c969bff" + } + }, + { + "name": "C++ Meta Namespace", + "scope": ["meta.namespace-block.cpp"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "C++ Language Primitive Storage", + "scope": ["storage.type.language.primitive.cpp"], + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "C++ Preprocessor Macro", + "scope": ["meta.preprocessor.macro.cpp"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "C++ Variable Parameter", + "scope": ["variable.parameter"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Powershell Variables", + "scope": ["variable.other.readwrite.powershell"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Powershell Function", + "scope": ["support.function.powershell"], + "settings": { + "foreground": "#0c969bff" + } + }, + { + "name": "ID Attribute Name in HTML", + "scope": "entity.other.attribute-name.id.html", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "HTML Punctuation Definition Tag", + "scope": "punctuation.definition.tag.html", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "HTML Doctype", + "scope": "meta.tag.sgml.doctype.html", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "JavaScript Classes", + "scope": "meta.class entity.name.type.class.js", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "JavaScript Method Declaration e.g. `constructor`", + "scope": "meta.method.declaration storage.type.js", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "JavaScript Terminator", + "scope": "terminator.js", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "JavaScript Meta Punctuation Definition", + "scope": "meta.js punctuation.definition.js", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Entity Names in Code Documentations", + "scope": ["entity.name.type.instance.jsdoc", "entity.name.type.instance.phpdoc"], + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "Other Variables in Code Documentations", + "scope": ["variable.other.jsdoc", "variable.other.phpdoc"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "JavaScript module imports and exports", + "scope": [ + "variable.other.meta.import.js", + "meta.import.js variable.other", + "variable.other.meta.export.js", + "meta.export.js variable.other" + ], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "JavaScript Variable Parameter Function", + "scope": "variable.parameter.function.js", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "JavaScript[React] Variable Other Object", + "scope": [ + "variable.other.object.js", + "variable.other.object.jsx", + "variable.object.property.js", + "variable.object.property.jsx" + ], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "JavaScript Variables", + "scope": ["variable.js", "variable.other.js"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "JavaScript Entity Name Type", + "scope": ["entity.name.type.js", "entity.name.type.module.js"], + "settings": { + "foreground": "#111111", + "fontStyle": "" + } + }, + { + "name": "JavaScript Support Classes", + "scope": "support.class.js", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "JSON Property Names", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "JSON Support Constants", + "scope": "support.constant.json", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "JSON Property values (string)", + "scope": "meta.structure.dictionary.value.json string.quoted.double", + "settings": { + "foreground": "#c789d6" + } + }, + { + "name": "Strings in JSON values", + "scope": "string.quoted.double.json punctuation.definition.string.json", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Specific JSON Property values like null", + "scope": "meta.structure.dictionary.json meta.structure.dictionary.value constant.language", + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "JavaScript Other Variable", + "scope": "variable.other.object.js", + "settings": { + "foreground": "#0c969b", + "fontStyle": "italic" + } + }, + { + "name": "Ruby Variables", + "scope": ["variable.other.ruby"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Ruby Class", + "scope": ["entity.name.type.class.ruby"], + "settings": { + "foreground": "#c96765" + } + }, + { + "name": "Ruby Hashkeys", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Ruby Symbols", + "scope": "constant.language.symbol.ruby", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "LESS Tag names", + "scope": "entity.name.tag.less", + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "LESS Keyword Other Unit", + "scope": "keyword.other.unit.css", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Attribute Name for LESS", + "scope": "meta.attribute-selector.less entity.other.attribute-name.attribute", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Markdown Headings", + "scope": [ + "markup.heading.markdown", + "markup.heading.setext.1.markdown", + "markup.heading.setext.2.markdown" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Markdown Italics", + "scope": "markup.italic.markdown", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "Markdown Bold", + "scope": "markup.bold.markdown", + "settings": { + "foreground": "#4876d6", + "fontStyle": "bold" + } + }, + { + "name": "Markdown Quote + others", + "scope": "markup.quote.markdown", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Markdown Raw Code + others", + "scope": "markup.inline.raw.markdown", + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Markdown Links", + "scope": ["markup.underline.link.markdown", "markup.underline.link.image.markdown"], + "settings": { + "foreground": "#ff869a" + } + }, + { + "name": "Markdown Link Title and Description", + "scope": ["string.other.link.title.markdown", "string.other.link.description.markdown"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Markdown Punctuation", + "scope": [ + "punctuation.definition.string.markdown", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "meta.link.inline.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Markdown MetaData Punctuation", + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Markdown Inline Raw String", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "PHP Variables", + "scope": ["variable.other.php", "variable.other.property.php"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Support Classes in PHP", + "scope": "support.class.php", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Punctuations in PHP function calls", + "scope": "meta.function-call.php punctuation", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "PHP Global Variables", + "scope": "variable.other.global.php", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Declaration Punctuation in PHP Global Variables", + "scope": "variable.other.global.php punctuation.definition.variable", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Language Constants in Python", + "scope": "constant.language.python", + "settings": { + "foreground": "#bc5454" + } + }, + { + "name": "Python Function Parameter and Arguments", + "scope": ["variable.parameter.function.python", "meta.function-call.arguments.python"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Python Function Call", + "scope": ["meta.function-call.python", "meta.function-call.generic.python"], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "Punctuations in Python", + "scope": "punctuation.python", + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Decorator Functions in Python", + "scope": "entity.name.function.decorator.python", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Python Language Variable", + "scope": "source.python variable.language.special", + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Python import control keyword", + "scope": "keyword.control", + "settings": { + "foreground": "#994cc3", + "fontStyle": "italic" + } + }, + { + "name": "SCSS Variable", + "scope": [ + "variable.scss", + "variable.sass", + "variable.parameter.url.scss", + "variable.parameter.url.sass" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "Attribute Name for SASS", + "scope": [ + "meta.attribute-selector.scss entity.other.attribute-name.attribute", + "meta.attribute-selector.sass entity.other.attribute-name.attribute" + ], + "settings": { + "foreground": "#aa0982" + } + }, + { + "name": "Tag names in SASS", + "scope": ["entity.name.tag.scss", "entity.name.tag.sass"], + "settings": { + "foreground": "#0c969b" + } + }, + { + "name": "SASS Keyword Other Unit", + "scope": ["keyword.other.unit.scss", "keyword.other.unit.sass"], + "settings": { + "foreground": "#994cc3" + } + }, + { + "name": "TypeScript[React] Variables and Object Properties", + "scope": [ + "variable.other.readwrite.alias.ts", + "variable.other.readwrite.alias.tsx", + "variable.other.readwrite.ts", + "variable.other.readwrite.tsx", + "variable.other.object.ts", + "variable.other.object.tsx", + "variable.object.property.ts", + "variable.object.property.tsx", + "variable.other.ts", + "variable.other.tsx", + "variable.tsx", + "variable.ts" + ], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "TypeScript[React] Entity Name Types", + "scope": ["entity.name.type.ts", "entity.name.type.tsx"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "TypeScript[React] Node Classes", + "scope": ["support.class.node.ts", "support.class.node.tsx"], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "TypeScript[React] Entity Name Types as Parameters", + "scope": [ + "meta.type.parameters.ts entity.name.type", + "meta.type.parameters.tsx entity.name.type" + ], + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "TypeScript[React] Import/Export Punctuations", + "scope": [ + "meta.import.ts punctuation.definition.block", + "meta.import.tsx punctuation.definition.block", + "meta.export.ts punctuation.definition.block", + "meta.export.tsx punctuation.definition.block" + ], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": [ + "meta.decorator punctuation.decorator.ts", + "meta.decorator punctuation.decorator.tsx" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": "meta.tag.js meta.jsx.children.tsx", + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "YAML Entity Name Tags", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "JavaScript Variable Other ReadWrite", + "scope": ["variable.other.readwrite.js", "variable.parameter"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "Support Class Component", + "scope": ["support.class.component.js", "support.class.component.tsx"], + "settings": { + "foreground": "#aa0982", + "fontStyle": "" + } + }, + { + "name": "Text nested in React tags", + "scope": ["meta.jsx.children", "meta.jsx.children.js", "meta.jsx.children.tsx"], + "settings": { + "foreground": "#403f53" + } + }, + { + "name": "TypeScript Classes", + "scope": "meta.class entity.name.type.class.tsx", + "settings": { + "foreground": "#111111" + } + }, + { + "name": "TypeScript Entity Name Type", + "scope": ["entity.name.type.tsx", "entity.name.type.module.tsx"], + "settings": { + "foreground": "#111111" + } + }, + { + "name": "TypeScript Class Variable Keyword", + "scope": [ + "meta.class.ts meta.var.expr.ts storage.type.ts", + "meta.class.tsx meta.var.expr.tsx storage.type.tsx" + ], + "settings": { + "foreground": "#994CC3" + } + }, + { + "name": "TypeScript Method Declaration e.g. `constructor`", + "scope": [ + "meta.method.declaration storage.type.ts", + "meta.method.declaration storage.type.tsx" + ], + "settings": { + "foreground": "#4876d6" + } + }, + { + "name": "normalize font style of certain components", + "scope": [ + "meta.property-list.css meta.property-value.css variable.other.less", + "meta.property-list.scss variable.scss", + "meta.property-list.sass variable.sass", + "meta.brace", + "keyword.operator.operator", + "keyword.operator.or.regexp", + "keyword.operator.expression.in", + "keyword.operator.relational", + "keyword.operator.assignment", + "keyword.operator.comparison", + "keyword.operator.type", + "keyword.operator", + "keyword", + "punctuation.definintion.string", + "punctuation", + "variable.other.readwrite.js", + "storage.type", + "source.css", + "string.quoted" + ], + "settings": { + "fontStyle": "" + } + } + ] +} diff --git a/assets/themes/src/vscode/night-owl/night-owl.json b/assets/themes/src/vscode/night-owl/night-owl.json new file mode 100644 index 0000000000000000000000000000000000000000..6d41b6299b4b911ff5d9952e56255a090c981704 --- /dev/null +++ b/assets/themes/src/vscode/night-owl/night-owl.json @@ -0,0 +1,1832 @@ +{ + "name": "Night Owl", + "type": "dark", + "semanticHighlighting": false, + "colors": { + "contrastBorder": "#122d42", + "focusBorder": "#122d42", + "foreground": "#d6deeb", + "widget.shadow": "#011627", + "selection.background": "#4373c2", + "errorForeground": "#EF5350", + "button.background": "#7e57c2cc", + "button.foreground": "#ffffffcc", + "button.hoverBackground": "#7e57c2", + "dropdown.background": "#011627", + "dropdown.border": "#5f7e97", + "dropdown.foreground": "#ffffffcc", + "input.background": "#0b253a", + "input.border": "#5f7e97", + "input.foreground": "#ffffffcc", + "input.placeholderForeground": "#5f7e97", + "inputOption.activeBorder": "#ffffffcc", + "punctuation.definition.generic.begin.html": "#ef5350f2", + "inputValidation.errorBackground": "#AB0300F2", + "inputValidation.errorBorder": "#EF5350", + "inputValidation.infoBackground": "#00589EF2", + "inputValidation.infoBorder": "#64B5F6", + "inputValidation.warningBackground": "#675700F2", + "inputValidation.warningBorder": "#FFCA28", + "scrollbar.shadow": "#010b14", + "scrollbarSlider.activeBackground": "#084d8180", + "scrollbarSlider.background": "#084d8180", + "scrollbarSlider.hoverBackground": "#084d8180", + "badge.background": "#5f7e97", + "badge.foreground": "#ffffff", + "progress.background": "#7e57c2", + "breadcrumb.foreground": "#A599E9", + "breadcrumb.focusForeground": "#ffffff", + "breadcrumb.activeSelectionForeground": "#FFFFFF", + "breadcrumbPicker.background": "#001122", + "list.activeSelectionBackground": "#234d708c", + "list.activeSelectionForeground": "#ffffff", + "list.invalidItemForeground": "#975f94", + "list.dropBackground": "#011627", + "list.focusBackground": "#010d18", + "list.focusForeground": "#ffffff", + "list.highlightForeground": "#ffffff", + "list.hoverBackground": "#011627", + "list.hoverForeground": "#ffffff", + "list.inactiveSelectionBackground": "#0e293f", + "list.inactiveSelectionForeground": "#5f7e97", + "activityBar.background": "#011627", + "activityBar.dropBackground": "#5f7e97", + "activityBar.foreground": "#5f7e97", + "activityBar.border": "#011627", + "activityBarBadge.background": "#44596b", + "activityBarBadge.foreground": "#ffffff", + "sideBar.background": "#011627", + "sideBar.foreground": "#89a4bb", + "sideBar.border": "#011627", + "sideBarTitle.foreground": "#5f7e97", + "sideBarSectionHeader.background": "#011627", + "sideBarSectionHeader.foreground": "#5f7e97", + "editorGroup.emptyBackground": "#011627", + "editorGroup.border": "#011627", + "editorGroup.dropBackground": "#7e57c273", + "editorGroupHeader.noTabsBackground": "#011627", + "editorGroupHeader.tabsBackground": "#011627", + "editorGroupHeader.tabsBorder": "#262A39", + "tab.activeBackground": "#0b2942", + "tab.activeForeground": "#d2dee7", + "tab.border": "#272B3B", + "tab.activeBorder": "#262A39", + "tab.unfocusedActiveBorder": "#262A39", + "tab.inactiveBackground": "#01111d", + "tab.inactiveForeground": "#5f7e97", + "tab.unfocusedActiveForeground": "#5f7e97", + "tab.unfocusedInactiveForeground": "#5f7e97", + "editor.background": "#011627", + "editor.foreground": "#d6deeb", + "editorLineNumber.foreground": "#4b6479", + "editorLineNumber.activeForeground": "#C5E4FD", + "editorCursor.foreground": "#80a4c2", + "editor.selectionBackground": "#1d3b53", + "editor.selectionHighlightBackground": "#5f7e9779", + "editor.inactiveSelectionBackground": "#7e57c25a", + "editor.wordHighlightBackground": "#f6bbe533", + "editor.wordHighlightStrongBackground": "#e2a2f433", + "editor.findMatchBackground": "#5f7e9779", + "editor.findMatchHighlightBackground": "#1085bb5d", + "editor.findRangeHighlightBackground": null, + "editor.hoverHighlightBackground": "#7e57c25a", + "editor.lineHighlightBackground": "#0003", + "editor.lineHighlightBorder": null, + "editorLink.activeForeground": null, + "editor.rangeHighlightBackground": "#7e57c25a", + "editorWhitespace.foreground": null, + "editorIndentGuide.background": "#5e81ce52", + "editorIndentGuide.activeBackground": "#7E97AC", + "editorRuler.foreground": "#5e81ce52", + "editorCodeLens.foreground": "#5e82ceb4", + "editorBracketMatch.background": "#5f7e974d", + "editorBracketMatch.border": null, + "editorOverviewRuler.currentContentForeground": "#7e57c2", + "editorOverviewRuler.incomingContentForeground": "#7e57c2", + "editorOverviewRuler.commonContentForeground": "#7e57c2", + "editorError.foreground": "#EF5350", + "editorError.border": null, + "editorWarning.foreground": "#b39554", + "editorWarning.border": null, + "editorGutter.background": "#011627", + "editorGutter.modifiedBackground": "#e2b93d", + "editorGutter.addedBackground": "#9CCC65", + "editorGutter.deletedBackground": "#EF5350", + "diffEditor.insertedTextBackground": "#99b76d23", + "diffEditor.insertedTextBorder": "#c5e47833", + "diffEditor.removedTextBackground": "#ef535033", + "diffEditor.removedTextBorder": "#ef53504d", + "editorWidget.background": "#021320", + "editorWidget.border": "#5f7e97", + "editorSuggestWidget.background": "#2C3043", + "editorSuggestWidget.border": "#2B2F40", + "editorSuggestWidget.foreground": "#d6deeb", + "editorSuggestWidget.highlightForeground": "#ffffff", + "editorSuggestWidget.selectedBackground": "#5f7e97", + "editorHoverWidget.background": "#011627", + "editorHoverWidget.border": "#5f7e97", + "debugExceptionWidget.background": "#011627", + "debugExceptionWidget.border": "#5f7e97", + "editorMarkerNavigation.background": "#0b2942", + "editorMarkerNavigationError.background": "#EF5350", + "editorMarkerNavigationWarning.background": "#FFCA28", + "peekView.border": "#5f7e97", + "peekViewEditor.background": "#011627", + "peekViewEditor.matchHighlightBackground": "#7e57c25a", + "peekViewResult.background": "#011627", + "peekViewResult.fileForeground": "#5f7e97", + "peekViewResult.lineForeground": "#5f7e97", + "peekViewResult.matchHighlightBackground": "#ffffffcc", + "peekViewResult.selectionBackground": "#2E3250", + "peekViewResult.selectionForeground": "#5f7e97", + "peekViewTitle.background": "#011627", + "peekViewTitleDescription.foreground": "#697098", + "peekViewTitleLabel.foreground": "#5f7e97", + "merge.currentHeaderBackground": "#5f7e97", + "merge.currentContentBackground": null, + "merge.incomingHeaderBackground": "#7e57c25a", + "merge.incomingContentBackground": null, + "merge.border": null, + "panel.background": "#011627", + "panel.border": "#5f7e97", + "panelTitle.activeBorder": "#5f7e97", + "panelTitle.activeForeground": "#ffffffcc", + "panelTitle.inactiveForeground": "#d6deeb80", + "statusBar.background": "#011627", + "statusBar.foreground": "#5f7e97", + "statusBar.border": "#262A39", + "statusBar.debuggingBackground": "#202431", + "statusBar.debuggingForeground": null, + "statusBar.debuggingBorder": "#1F2330", + "statusBar.noFolderForeground": null, + "statusBar.noFolderBackground": "#011627", + "statusBar.noFolderBorder": "#25293A", + "statusBarItem.activeBackground": "#202431", + "statusBarItem.hoverBackground": "#202431", + "statusBarItem.prominentBackground": "#202431", + "statusBarItem.prominentHoverBackground": "#202431", + "titleBar.activeBackground": "#011627", + "titleBar.activeForeground": "#eeefff", + "titleBar.inactiveBackground": "#010e1a", + "titleBar.inactiveForeground": null, + "notifications.background": "#01111d", + "notifications.border": "#262a39", + "notificationCenter.border": "#262a39", + "notificationToast.border": "#262a39", + "notifications.foreground": "#ffffffcc", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentForeground": "#ffffffcc", + "extensionButton.prominentBackground": "#7e57c2cc", + "extensionButton.prominentHoverBackground": "#7e57c2", + "pickerGroup.foreground": "#d1aaff", + "pickerGroup.border": "#011627", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiBlack": "#011627", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiCyan": "#21c7a8", + "terminal.ansiGreen": "#22da6e", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#EF5350", + "terminal.ansiYellow": "#c5e478", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightBlack": "#575656", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#7fdbca", + "terminal.ansiBrightGreen": "#22da6e", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#EF5350", + "terminal.ansiBrightYellow": "#ffeb95", + "terminal.selectionBackground": "#1b90dd4d", + "terminalCursor.background": "#234d70", + "textCodeBlock.background": "#4f4f4f", + "debugToolBar.background": "#011627", + "welcomePage.buttonBackground": "#011627", + "welcomePage.buttonHoverBackground": "#011627", + "walkThrough.embeddedEditorBackground": "#011627", + "gitDecoration.modifiedResourceForeground": "#a2bffc", + "gitDecoration.deletedResourceForeground": "#EF535090", + "gitDecoration.untrackedResourceForeground": "#c5e478ff", + "gitDecoration.ignoredResourceForeground": "#395a75", + "gitDecoration.conflictingResourceForeground": "#ffeb95cc", + "source.elm": "#5f7e97", + "string.quoted.single.js": "#ffffff", + "meta.objectliteral.js": "#82AAFF" + }, + "tokenColors": [ + { + "name": "Changed", + "scope": [ + "markup.changed", + "meta.diff.header.git", + "meta.diff.header.from-file", + "meta.diff.header.to-file" + ], + "settings": { + "foreground": "#a2bffc", + "fontStyle": "italic" + } + }, + { + "name": "Deleted", + "scope": "markup.deleted.diff", + "settings": { + "foreground": "#EF535090", + "fontStyle": "italic" + } + }, + { + "name": "Inserted", + "scope": "markup.inserted.diff", + "settings": { + "foreground": "#c5e478ff", + "fontStyle": "italic" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#011627", + "foreground": "#d6deeb" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#637777", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#ecc48d" + } + }, + { + "name": "String Quoted", + "scope": ["string.quoted", "variable.other.readwrite.js"], + "settings": { + "foreground": "#ecc48d" + } + }, + { + "name": "Support Constant Math", + "scope": "support.constant.math", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Number", + "scope": ["constant.numeric", "constant.character.numeric"], + "settings": { + "foreground": "#F78C6C", + "fontStyle": "" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "punctuation.definition.constant", + "variable.other.constant" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "RegExp String", + "scope": ["string.regexp", "string.regexp keyword.other"], + "settings": { + "foreground": "#5ca7e4" + } + }, + { + "name": "Comma in functions", + "scope": "meta.function punctuation.separator.comma", + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Keyword", + "scope": ["punctuation.accessor", "keyword"], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "meta.var.expr", + "meta.class meta.method.declaration meta.var.expr storage.type.js", + "storage.type.property.js", + "storage.type.property.ts", + "storage.type.property.tsx" + ], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Storage type", + "scope": "storage.type.function.arrow.js", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "meta.class entity.name.type.class"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Meta Tag", + "scope": ["punctuation.definition.tag", "meta.tag"], + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "HTML Tag names", + "scope": [ + "entity.name.tag", + "meta.tag.other.html", + "meta.tag.other.js", + "meta.tag.other.tsx", + "entity.name.tag.tsx", + "entity.name.tag.js", + "entity.name.tag", + "meta.tag.js", + "meta.tag.tsx", + "meta.tag.html" + ], + "settings": { + "foreground": "#caece6", + "fontStyle": "" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "italic", + "foreground": "#c5e478" + } + }, + { + "name": "Entity Name Tag Custom", + "scope": "entity.name.tag.custom", + "settings": { + "foreground": "#f78c6c" + } + }, + { + "name": "Library (function & constant)", + "scope": ["support.function", "support.constant"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Support Constant Property Value meta", + "scope": "support.constant.meta.property-value", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Support Variable DOM", + "scope": "support.variable.dom", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#ff2c83", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#ffffff", + "background": "#d3423e" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#7fdbca", + "fontStyle": "" + } + }, + { + "name": "Keyword Operator Relational", + "scope": "keyword.operator.relational", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Operator Assignment", + "scope": "keyword.operator.assignment", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Arithmetic", + "scope": "keyword.operator.arithmetic", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Bitwise", + "scope": "keyword.operator.bitwise", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Increment", + "scope": "keyword.operator.increment", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Ternary", + "scope": "keyword.operator.ternary", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Double-Slashed Comment", + "scope": "comment.line.double-slash", + "settings": { + "foreground": "#637777" + } + }, + { + "name": "Object", + "scope": "object", + "settings": { + "foreground": "#cdebf7" + } + }, + { + "name": "Null", + "scope": "constant.language.null", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Meta Brace", + "scope": "meta.brace", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Meta Delimiter Period", + "scope": "meta.delimiter.period", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition String", + "scope": "punctuation.definition.string", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Punctuation Definition String Markdown", + "scope": "punctuation.definition.string.begin.markdown", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Object Comma", + "scope": "object.comma", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Variable Parameter Function", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#7fdbca", + "fontStyle": "" + } + }, + { + "name": "Support Type Property Name & entity name tags", + "scope": [ + "support.type.vendor.property-name", + "support.constant.vendor.property-value", + "support.type.property-name", + "meta.property-list entity.name.tag" + ], + "settings": { + "foreground": "#80CBC4", + "fontStyle": "" + } + }, + { + "name": "Entity Name tag reference in stylesheets", + "scope": "meta.property-list entity.name.tag.reference", + "settings": { + "foreground": "#57eaf1" + } + }, + { + "name": "Constant Other Color RGB Value Punctuation Definition Constant", + "scope": "constant.other.color.rgb-value punctuation.definition.constant", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Constant Other Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Keyword Other Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Meta Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Entity Other Attribute Name Id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#FAD430" + } + }, + { + "name": "Meta Property Name", + "scope": "meta.property-name", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Doctypes", + "scope": ["entity.name.tag.doctype", "meta.tag.sgml.doctype"], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": "punctuation.definition.parameters", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Keyword Control Operator", + "scope": "keyword.control.operator", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Keyword Operator Logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#c792ea", + "fontStyle": "" + } + }, + { + "name": "Variable Instances", + "scope": [ + "variable.instance", + "variable.other.instance", + "variable.readwrite.instance", + "variable.other.readwrite.instance", + "variable.other.property" + ], + "settings": { + "foreground": "#baebe2" + } + }, + { + "name": "Variable Property Other object property", + "scope": ["variable.other.object.property"], + "settings": { + "foreground": "#faf39f", + "fontStyle": "italic" + } + }, + { + "name": "Variable Property Other object", + "scope": ["variable.other.object.js"], + "settings": { + "fontStyle": "" + } + }, + { + "name": "Entity Name Function", + "scope": ["entity.name.function"], + "settings": { + "foreground": "#82AAFF", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Operator Comparison, imports, returns and Keyword Operator Ruby", + "scope": [ + "keyword.operator.comparison", + "keyword.control.flow.js", + "keyword.control.flow.ts", + "keyword.control.flow.tsx", + "keyword.control.ruby", + "keyword.control.module.ruby", + "keyword.control.class.ruby", + "keyword.control.def.ruby", + "keyword.control.loop.js", + "keyword.control.loop.ts", + "keyword.control.import.js", + "keyword.control.import.ts", + "keyword.control.import.tsx", + "keyword.control.from.js", + "keyword.control.from.ts", + "keyword.control.from.tsx", + "keyword.operator.instanceof.js", + "keyword.operator.expression.instanceof.ts", + "keyword.operator.expression.instanceof.tsx" + ], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Keyword Control Conditional", + "scope": [ + "keyword.control.conditional.js", + "keyword.control.conditional.ts", + "keyword.control.switch.js", + "keyword.control.switch.ts" + ], + "settings": { + "foreground": "#c792ea", + "fontStyle": "" + } + }, + { + "name": "Support Constant, `new` keyword, Special Method Keyword, `debugger`, other keywords", + "scope": [ + "support.constant", + "keyword.other.special-method", + "keyword.other.new", + "keyword.other.debugger", + "keyword.control" + ], + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Invalid Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#020e14", + "background": "#F78C6C" + } + }, + { + "name": "Invalid Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "background": "#8BD649", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#ffffff", + "background": "#ec5f67" + } + }, + { + "name": "Language Variable", + "scope": "variable.language", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Support Variable Property", + "scope": "support.variable.property", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Variable Function", + "scope": "variable.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variable Interpolation", + "scope": "variable.interpolation", + "settings": { + "foreground": "#ec5f67" + } + }, + { + "name": "Meta Function Call", + "scope": "meta.function-call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Punctuation Tweaks", + "scope": [ + "punctuation.terminator.expression", + "punctuation.definition.arguments", + "punctuation.definition.array", + "punctuation.section.array", + "meta.array" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "More Punctuation Tweaks", + "scope": [ + "punctuation.definition.list.begin", + "punctuation.definition.list.end", + "punctuation.separator.arguments", + "punctuation.definition.list" + ], + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Template Strings", + "scope": "string.template meta.template.expression", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Backtics(``) in Template Strings", + "scope": "string.template punctuation.definition.string", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Italics", + "scope": "italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Bold", + "scope": "bold", + "settings": { + "foreground": "#c5e478", + "fontStyle": "bold" + } + }, + { + "name": "Quote", + "scope": "quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Raw Code", + "scope": "raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "CoffeScript Variable Assignment", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#31e1eb" + } + }, + { + "name": "CoffeScript Parameter Function", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "CoffeeScript Assignments", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "C# Readwrite Variables", + "scope": "variable.other.readwrite.cs", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "C# Classes & Storage types", + "scope": ["entity.name.type.class.cs", "storage.type.cs"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "C# Namespaces", + "scope": "entity.name.type.namespace.cs", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "C# Unquoted String Zone", + "scope": "string.unquoted.preprocessor.message.cs", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "C# Region", + "scope": [ + "punctuation.separator.hash.cs", + "keyword.preprocessor.region.cs", + "keyword.preprocessor.endregion.cs" + ], + "settings": { + "foreground": "#ffcb8b", + "fontStyle": "bold" + } + }, + { + "name": "C# Other Variables", + "scope": "variable.other.object.cs", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "C# Enum", + "scope": "entity.name.type.enum.cs", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Dart String", + "scope": [ + "string.interpolated.single.dart", + "string.interpolated.double.dart" + ], + "settings": { + "foreground": "#FFCB8B" + } + }, + { + "name": "Dart Class", + "scope": "support.class.dart", + "settings": { + "foreground": "#FFCB8B" + } + }, + { + "name": "Tag names in Stylesheets", + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less", + "entity.name.tag.custom.css", + "support.constant.property-value.css" + ], + "settings": { + "foreground": "#ff6363", + "fontStyle": "" + } + }, + { + "name": "Wildcard(*) selector in Stylesheets", + "scope": [ + "entity.name.tag.wildcard.css", + "entity.name.tag.wildcard.less", + "entity.name.tag.wildcard.scss", + "entity.name.tag.wildcard.sass" + ], + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "CSS Keyword Other Unit", + "scope": "keyword.other.unit.css", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Attribute Name for CSS", + "scope": [ + "meta.attribute-selector.css entity.other.attribute-name.attribute", + "variable.other.readwrite.js" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir String Punctuations", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Elixir Binary Punctuations", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Closure Constant Keyword", + "scope": "constant.keyword.clojure", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "Go Keywords", + "scope": [ + "source.go keyword.package.go", + "source.go keyword.import.go", + "source.go keyword.function.go", + "source.go keyword.type.go", + "source.go keyword.struct.go", + "source.go keyword.interface.go", + "source.go keyword.const.go", + "source.go keyword.var.go", + "source.go keyword.map.go", + "source.go keyword.channel.go", + "source.go keyword.control.go" + ], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Go Constants e.g. nil, string format (%s, %d, etc.)", + "scope": [ + "source.go constant.language.go", + "source.go constant.other.placeholder.go" + ], + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "C++ Functions", + "scope": [ + "entity.name.function.preprocessor.cpp", + "entity.scope.name.cpp" + ], + "settings": { + "foreground": "#7fdbcaff" + } + }, + { + "name": "C++ Meta Namespace", + "scope": ["meta.namespace-block.cpp"], + "settings": { + "foreground": "#e0dec6" + } + }, + { + "name": "C++ Language Primitive Storage", + "scope": ["storage.type.language.primitive.cpp"], + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "C++ Preprocessor Macro", + "scope": ["meta.preprocessor.macro.cpp"], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "C++ Variable Parameter", + "scope": ["variable.parameter"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Powershell Variables", + "scope": ["variable.other.readwrite.powershell"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Powershell Function", + "scope": ["support.function.powershell"], + "settings": { + "foreground": "#7fdbcaff" + } + }, + { + "name": "ID Attribute Name in HTML", + "scope": "entity.other.attribute-name.id.html", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "HTML Punctuation Definition Tag", + "scope": "punctuation.definition.tag.html", + "settings": { + "foreground": "#6ae9f0" + } + }, + { + "name": "HTML Doctype", + "scope": "meta.tag.sgml.doctype.html", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "JavaScript Classes", + "scope": "meta.class entity.name.type.class.js", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Method Declaration e.g. `constructor`", + "scope": "meta.method.declaration storage.type.js", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "JavaScript Terminator", + "scope": "terminator.js", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "JavaScript Meta Punctuation Definition", + "scope": "meta.js punctuation.definition.js", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Entity Names in Code Documentations", + "scope": [ + "entity.name.type.instance.jsdoc", + "entity.name.type.instance.phpdoc" + ], + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "Other Variables in Code Documentations", + "scope": ["variable.other.jsdoc", "variable.other.phpdoc"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "JavaScript module imports and exports", + "scope": [ + "variable.other.meta.import.js", + "meta.import.js variable.other", + "variable.other.meta.export.js", + "meta.export.js variable.other" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "JavaScript Variable Parameter Function", + "scope": "variable.parameter.function.js", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "JavaScript[React] Variable Other Object", + "scope": [ + "variable.other.object.js", + "variable.other.object.jsx", + "variable.object.property.js", + "variable.object.property.jsx" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "JavaScript Variables", + "scope": ["variable.js", "variable.other.js"], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "JavaScript Entity Name Type", + "scope": ["entity.name.type.js", "entity.name.type.module.js"], + "settings": { + "foreground": "#ffcb8b", + "fontStyle": "" + } + }, + { + "name": "JavaScript Support Classes", + "scope": "support.class.js", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "JSON Property Names", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "JSON Support Constants", + "scope": "support.constant.json", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "JSON Property values (string)", + "scope": "meta.structure.dictionary.value.json string.quoted.double", + "settings": { + "foreground": "#c789d6" + } + }, + { + "name": "Strings in JSON values", + "scope": "string.quoted.double.json punctuation.definition.string.json", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Specific JSON Property values like null", + "scope": "meta.structure.dictionary.json meta.structure.dictionary.value constant.language", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "JavaScript Other Variable", + "scope": "variable.other.object.js", + "settings": { + "foreground": "#7fdbca", + "fontStyle": "italic" + } + }, + { + "name": "Ruby Variables", + "scope": ["variable.other.ruby"], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Ruby Class", + "scope": ["entity.name.type.class.ruby"], + "settings": { + "foreground": "#ecc48d" + } + }, + { + "name": "Ruby Hashkeys", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Ruby Symbols", + "scope": "constant.language.symbol.ruby", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "LESS Tag names", + "scope": "entity.name.tag.less", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "LESS Keyword Other Unit", + "scope": "keyword.other.unit.css", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Attribute Name for LESS", + "scope": "meta.attribute-selector.less entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown Headings", + "scope": [ + "markup.heading.markdown", + "markup.heading.setext.1.markdown", + "markup.heading.setext.2.markdown" + ], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown Italics", + "scope": "markup.italic.markdown", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Markdown Bold", + "scope": "markup.bold.markdown", + "settings": { + "foreground": "#c5e478", + "fontStyle": "bold" + } + }, + { + "name": "Markdown Quote + others", + "scope": "markup.quote.markdown", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Markdown Raw Code + others", + "scope": "markup.inline.raw.markdown", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Markdown Links", + "scope": [ + "markup.underline.link.markdown", + "markup.underline.link.image.markdown" + ], + "settings": { + "foreground": "#ff869a" + } + }, + { + "name": "Markdown Link Title and Description", + "scope": [ + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Markdown Punctuation", + "scope": [ + "punctuation.definition.string.markdown", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "meta.link.inline.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown MetaData Punctuation", + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown Inline Raw String", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "PHP Variables", + "scope": ["variable.other.php", "variable.other.property.php"], + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Support Classes in PHP", + "scope": "support.class.php", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Punctuations in PHP function calls", + "scope": "meta.function-call.php punctuation", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "PHP Global Variables", + "scope": "variable.other.global.php", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Declaration Punctuation in PHP Global Variables", + "scope": "variable.other.global.php punctuation.definition.variable", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Language Constants in Python", + "scope": "constant.language.python", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Python Function Parameter and Arguments", + "scope": [ + "variable.parameter.function.python", + "meta.function-call.arguments.python" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Python Function Call", + "scope": [ + "meta.function-call.python", + "meta.function-call.generic.python" + ], + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Punctuations in Python", + "scope": "punctuation.python", + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "Decorator Functions in Python", + "scope": "entity.name.function.decorator.python", + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Python Language Variable", + "scope": "source.python variable.language.special", + "settings": { + "foreground": "#8EACE3" + } + }, + { + "name": "Python import control keyword", + "scope": "keyword.control", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "SCSS Variable", + "scope": [ + "variable.scss", + "variable.sass", + "variable.parameter.url.scss", + "variable.parameter.url.sass" + ], + "settings": { + "foreground": "#c5e478" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Attribute Name for SASS", + "scope": [ + "meta.attribute-selector.scss entity.other.attribute-name.attribute", + "meta.attribute-selector.sass entity.other.attribute-name.attribute" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Tag names in SASS", + "scope": ["entity.name.tag.scss", "entity.name.tag.sass"], + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "SASS Keyword Other Unit", + "scope": ["keyword.other.unit.scss", "keyword.other.unit.sass"], + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "TypeScript[React] Variables and Object Properties", + "scope": [ + "variable.other.readwrite.alias.ts", + "variable.other.readwrite.alias.tsx", + "variable.other.readwrite.ts", + "variable.other.readwrite.tsx", + "variable.other.object.ts", + "variable.other.object.tsx", + "variable.object.property.ts", + "variable.object.property.tsx", + "variable.other.ts", + "variable.other.tsx", + "variable.tsx", + "variable.ts" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "TypeScript[React] Entity Name Types", + "scope": ["entity.name.type.ts", "entity.name.type.tsx"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "TypeScript[React] Node Classes", + "scope": ["support.class.node.ts", "support.class.node.tsx"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Entity Name Types as Parameters", + "scope": [ + "meta.type.parameters.ts entity.name.type", + "meta.type.parameters.tsx entity.name.type" + ], + "settings": { + "foreground": "#5f7e97" + } + }, + { + "name": "TypeScript[React] Import/Export Punctuations", + "scope": [ + "meta.import.ts punctuation.definition.block", + "meta.import.tsx punctuation.definition.block", + "meta.export.ts punctuation.definition.block", + "meta.export.tsx punctuation.definition.block" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": [ + "meta.decorator punctuation.decorator.ts", + "meta.decorator punctuation.decorator.tsx" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": "meta.tag.js meta.jsx.children.tsx", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "YAML Entity Name Tags", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#7fdbca" + } + }, + { + "name": "JavaScript Variable Other ReadWrite", + "scope": ["variable.other.readwrite.js", "variable.parameter"], + "settings": { + "foreground": "#d7dbe0" + } + }, + { + "name": "Support Class Component", + "scope": ["support.class.component.js", "support.class.component.tsx"], + "settings": { + "foreground": "#f78c6c", + "fontStyle": "" + } + }, + { + "name": "Text nested in React tags", + "scope": [ + "meta.jsx.children", + "meta.jsx.children.js", + "meta.jsx.children.tsx" + ], + "settings": { + "foreground": "#d6deeb" + } + }, + { + "name": "TypeScript Classes", + "scope": "meta.class entity.name.type.class.tsx", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "TypeScript Entity Name Type", + "scope": ["entity.name.type.tsx", "entity.name.type.module.tsx"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "TypeScript Class Variable Keyword", + "scope": [ + "meta.class.ts meta.var.expr.ts storage.type.ts", + "meta.class.tsx meta.var.expr.tsx storage.type.tsx" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "TypeScript Method Declaration e.g. `constructor`", + "scope": [ + "meta.method.declaration storage.type.ts", + "meta.method.declaration storage.type.tsx" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "normalize font style of certain components", + "scope": [ + "meta.property-list.css meta.property-value.css variable.other.less", + "meta.property-list.scss variable.scss", + "meta.property-list.sass variable.sass", + "meta.brace", + "keyword.operator.operator", + "keyword.operator.or.regexp", + "keyword.operator.expression.in", + "keyword.operator.relational", + "keyword.operator.assignment", + "keyword.operator.comparison", + "keyword.operator.type", + "keyword.operator", + "keyword", + "punctuation.definintion.string", + "punctuation", + "variable.other.readwrite.js", + "storage.type", + "source.css", + "string.quoted" + ], + "settings": { + "fontStyle": "" + } + } + ] +} diff --git a/assets/themes/src/vscode/palenight/LICENSE b/assets/themes/src/vscode/palenight/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..139fba6d40385d8d49de862d570216308e663fd7 --- /dev/null +++ b/assets/themes/src/vscode/palenight/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2017-present Olaolu Olawuyi + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets/themes/src/vscode/palenight/family.json b/assets/themes/src/vscode/palenight/family.json new file mode 100644 index 0000000000000000000000000000000000000000..69379fafe27932049f6ece763522ea6f95e0a08a --- /dev/null +++ b/assets/themes/src/vscode/palenight/family.json @@ -0,0 +1,21 @@ +{ + "name": "Palenight", + "author": "Olaolu Olawuyi (whizkydee)", + "themes": [ + { + "name": "Palenight", + "file_name": "palenight.json", + "appearance": "dark" + }, + { + "name": "Palenight Operator", + "file_name": "palenight-operator.json", + "appearance": "dark" + }, + { + "name": "Palenight (Mild Contrast)", + "file_name": "palenight-mild-contrast.json", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vscode/palenight/palenight-mild-contrast.json b/assets/themes/src/vscode/palenight/palenight-mild-contrast.json new file mode 100644 index 0000000000000000000000000000000000000000..60164e29c72228a0acd6b56c3a76ac426da1a362 --- /dev/null +++ b/assets/themes/src/vscode/palenight/palenight-mild-contrast.json @@ -0,0 +1,1569 @@ +{ + "name": "Palenight (Mild Contrast)", + "author": "Olaolu Olawuyi", + "maintainers": ["Olaolu Olawuyi "], + "type": "dark", + "semanticClass": "palenight-mild-contrast", + "colors": { + "contrastActiveBorder": null, + "contrastBorder": "#2C2F40", + "focusBorder": "#2C2F40", + "foreground": "#ffffff", + "widget.shadow": "#232635", + "selection.background": "#7580B850", + "descriptionForeground": null, + "errorForeground": "#EF5350", + "button.background": "#7e57c2cc", + "button.foreground": "#ffffffcc", + "button.hoverBackground": "#7e57c2", + "dropdown.background": "#292D3E", + "dropdown.border": "#7e57c2", + "dropdown.foreground": "#ffffffcc", + "input.background": "#313850", + "input.border": "#7e57c2", + "input.foreground": "#ffffffcc", + "input.placeholderForeground": "#ffffffcc", + "inputOption.activeBorder": "#ffffffcc", + "inputValidation.errorBackground": "#ef5350f2", + "inputValidation.errorBorder": "#EF5350", + "inputValidation.infoBackground": "#64b5f6f2", + "inputValidation.infoBorder": "#64B5F6", + "inputValidation.warningBackground": "#ffca28f2", + "inputValidation.warningBorder": "#FFCA28", + "scrollbar.shadow": "#292D3E00", + "scrollbarSlider.activeBackground": "#694CA4cc", + "scrollbarSlider.background": "#694CA466", + "scrollbarSlider.hoverBackground": "#694CA4cc", + "badge.background": "#7e57c2", + "badge.foreground": "#ffffff", + "progress.background": "#7e57c2", + "list.activeSelectionBackground": "#7e57c2", + "list.activeSelectionForeground": "#ffffff", + "list.dropBackground": "#2E3245", + "list.focusBackground": "#0000002e", + "list.focusForeground": "#ffffff", + "list.highlightForeground": "#ffffff", + "list.hoverBackground": "#0000001a", + "list.hoverForeground": "#ffffff", + "list.inactiveSelectionBackground": "#929ac90d", + "list.inactiveSelectionForeground": "#929ac9", + "activityBar.background": "#242839", + "activityBar.dropBackground": "#7e57c2e3", + "activityBar.foreground": "#eeffff", + "activityBar.border": "#2E3243", + "activityBarBadge.background": "#7e57c2", + "activityBarBadge.foreground": "#ffffff", + "sideBar.background": "#25293A", + "sideBar.foreground": "#6C739A", + "sideBar.border": "#2C2F40", + "sideBarTitle.foreground": "#eeffff", + "sideBarSectionHeader.background": "#25293A", + "sideBarSectionHeader.foreground": "#eeffff", + "editorGroup.background": "#32374C", + "editorGroup.border": "#2E3245", + "editorGroup.dropBackground": "#7e57c273", + "editorGroupHeader.noTabsBackground": "#32374C", + "editorGroupHeader.tabsBackground": "#31364a", + "editorGroupHeader.tabsBorder": "#2C3041", + "tab.activeBackground": "#25293A", + "tab.activeForeground": "#eeffff", + "tab.border": "#272B3B", + "tab.activeBorder": "#2C3041", + "tab.unfocusedActiveBorder": "#2C3041", + "tab.inactiveBackground": "#31364A", + "tab.inactiveForeground": "#929ac9", + "tab.unfocusedActiveForeground": null, + "tab.unfocusedInactiveForeground": null, + "editor.background": "#292D3E", + "editor.foreground": "#BFC7D5", + "editorLineNumber.foreground": "#4c5374", + "editorLineNumber.activeForeground": "#eeffff", + "editorCursor.foreground": "#7e57c2", + "editorCursor.background": null, + "editor.selectionBackground": "#7580B850", + "editor.selectionHighlightBackground": "#383D51", + "editor.inactiveSelectionBackground": "#7e57c25a", + "editor.wordHighlightBackground": "#32374D", + "editor.wordHighlightStrongBackground": "#2E3250", + "editor.findMatchBackground": "#2e3248fc", + "editor.findMatchHighlightBackground": "#7e57c233", + "editor.findRangeHighlightBackground": null, + "editor.hoverHighlightBackground": "#7e57c25a", + "editor.lineHighlightBackground": "#0003", + "editor.lineHighlightBorder": null, + "editorLink.activeForeground": null, + "editor.rangeHighlightBackground": "#7e57c25a", + "editorWhitespace.foreground": null, + "editorIndentGuide.background": "#4E557980", + "editorRuler.foreground": "#4E557980", + "editorCodeLens.foreground": "#FFCA28", + "editorBracketMatch.background": null, + "editorBracketMatch.border": null, + "editorOverviewRuler.currentContentForeground": "#7e57c2", + "editorOverviewRuler.incomingContentForeground": "#7e57c2", + "editorOverviewRuler.commonContentForeground": "#7e57c2", + "editorError.foreground": "#EF5350", + "editorError.border": null, + "editorWarning.foreground": "#FFCA28", + "editorWarning.border": null, + "editorGutter.background": null, + "editorGutter.modifiedBackground": "#e2b93d", + "editorGutter.addedBackground": "#9CCC65", + "editorGutter.deletedBackground": "#EF5350", + "diffEditor.insertedTextBackground": "#99b76d23", + "diffEditor.removedTextBackground": "#ef535033", + "editorWidget.background": "#31364a", + "editorWidget.border": null, + "editorSuggestWidget.background": "#2C3043", + "editorSuggestWidget.border": "#2B2F40", + "editorSuggestWidget.foreground": "#bfc7d5", + "editorSuggestWidget.highlightForeground": "#ffffff", + "editorSuggestWidget.selectedBackground": "#7e57c2", + "editorHoverWidget.background": "#292D3E", + "editorHoverWidget.border": "#7e57c2", + "debugExceptionWidget.background": "#292D3E", + "debugExceptionWidget.border": "#7e57c2", + "editorMarkerNavigation.background": "#31364a", + "editorMarkerNavigationError.background": "#EF5350", + "editorMarkerNavigationWarning.background": "#FFCA28", + "peekView.border": "#7e57c2", + "peekViewEditor.background": "#232635", + "peekViewEditor.matchHighlightBackground": "#7e57c25a", + "peekViewResult.background": "#2E3245", + "peekViewResult.fileForeground": "#eeffff", + "peekViewResult.lineForeground": "#eeffff", + "peekViewResult.matchHighlightBackground": "#7e57c25a", + "peekViewResult.selectionBackground": "#2E3250", + "peekViewResult.selectionForeground": "#eeffff", + "peekViewTitle.background": "#292D3E", + "peekViewTitleDescription.foreground": "#697098", + "peekViewTitleLabel.foreground": "#eeffff", + "merge.currentHeaderBackground": "#7e57c25a", + "merge.currentContentBackground": null, + "merge.incomingHeaderBackground": "#7e57c25a", + "merge.incomingContentBackground": null, + "merge.border": null, + "panel.background": "#25293A", + "panel.border": "#2C2F40", + "panelTitle.activeBorder": "#7e57c2", + "panelTitle.activeForeground": "#eeffff", + "panelTitle.inactiveForeground": "#bfc7d580", + "statusBar.background": "#25293A", + "statusBar.foreground": "#676E95", + "statusBar.border": "#2C3041", + "statusBar.debuggingBackground": "#202431", + "statusBar.debuggingForeground": null, + "statusBar.debuggingBorder": "#1F2330", + "statusBar.noFolderForeground": null, + "statusBar.noFolderBackground": "#292D3E", + "statusBar.noFolderBorder": "#25293A", + "statusBarItem.activeBackground": "#202431", + "statusBarItem.hoverBackground": "#202431", + "statusBarItem.prominentBackground": "#202431", + "statusBarItem.prominentHoverBackground": "#202431", + "titleBar.activeBackground": "#25293A", + "titleBar.activeForeground": "#eeefff", + "titleBar.border": "#2C3041", + "titleBar.inactiveBackground": "#30364c", + "titleBar.inactiveForeground": null, + "notifications.background": "#292D3E", + "notifications.foreground": "#ffffffcc", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentForeground": "#ffffffcc", + "extensionButton.prominentBackground": "#7e57c2cc", + "extensionButton.prominentHoverBackground": "#7e57c2", + "pickerGroup.foreground": "#d1aaff", + "pickerGroup.border": "#2E3245", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiBlack": "#676E95", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#a9c77d", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#ff5572", + "terminal.ansiYellow": "#FFCB6B", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightBlack": "#676E95", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#ff5572", + "terminal.ansiBrightYellow": "#FFCB6B", + "debugToolBar.background": "#292D3E", + "welcomePage.buttonBackground": null, + "welcomePage.buttonHoverBackground": null, + "walkThrough.embeddedEditorBackground": "#232635", + "gitDecoration.modifiedResourceForeground": "#e2c08de6", + "gitDecoration.deletedResourceForeground": "#EF535090", + "gitDecoration.untrackedResourceForeground": "#a9c77dff", + "gitDecoration.ignoredResourceForeground": "#69709890", + "gitDecoration.conflictingResourceForeground": "#FFEB95CC", + "editorActiveLineNumber.foreground": "#eeffff", + "breadcrumb.foreground": "#6c739a", + "breadcrumb.focusForeground": "#bfc7d5", + "breadcrumb.activeSelectionForeground": "#eeffff", + "breadcrumbPicker.background": "#292D3E" + }, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#292D3E", + "foreground": "#bfc7d5" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Quoted", + "scope": "string.quoted", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Unquoted", + "scope": "string.unquoted", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Support Constant Math", + "scope": "support.constant.math", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Number", + "scope": ["constant.numeric", "constant.character.numeric"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "punctuation.definition.constant", + "variable.other.constant" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "RegExp String", + "scope": ["string.regexp", "string.regexp keyword.other"], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Comma in functions", + "scope": "meta.function punctuation.separator.comma", + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Keyword", + "scope": ["punctuation.accessor", "keyword"], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "storage.type", + "meta.var.expr storage.type", + "storage.type.property.js", + "storage.type.property.ts", + "storage.type.property.tsx", + "meta.class meta.method.declaration meta.var.expr storage.type.js" + ], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "meta.class entity.name.type.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Function Parameters", + "scope": "variable.parameter", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Meta Tag", + "scope": ["punctuation.definition.tag", "meta.tag"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Tag names", + "scope": [ + "entity.name.tag support.class.component", + "meta.tag.other.html", + "meta.tag.other.js", + "meta.tag.other.tsx", + "entity.name.tag.tsx", + "entity.name.tag.js", + "entity.name.tag", + "meta.tag.js", + "meta.tag.tsx", + "meta.tag.html" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Entity Name Tag Custom", + "scope": "entity.name.tag.custom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Library (function & constant)", + "scope": ["support.function", "support.constant"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Support Constant Property Value meta", + "scope": "support.constant.meta.property-value", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Support Variable DOM", + "scope": "support.variable.dom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#ff2c83", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#ffffff", + "background": "#d3423e" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Relational", + "scope": "keyword.operator.relational", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Assignment", + "scope": "keyword.operator.assignment", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Double-Slashed Comment", + "scope": "comment.line.double-slash", + "settings": { + "foreground": "#697098" + } + }, + { + "name": "Object", + "scope": "object", + "settings": { + "foreground": "#cdebf7" + } + }, + { + "name": "Null", + "scope": "constant.language.null", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Meta Brace", + "scope": "meta.brace", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Meta Delimiter Period", + "scope": "meta.delimiter.period", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Punctuation Definition String", + "scope": "punctuation.definition.string", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Object Comma", + "scope": "object.comma", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Variable Parameter Function", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Type Property Name & entity name tags", + "scope": [ + "support.type.vendored.property-name", + "support.constant.vendored.property-value", + "support.type.property-name", + "meta.property-list entity.name.tag" + ], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Entity Name tag reference in stylesheets", + "scope": "meta.property-list entity.name.tag.reference", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Constant Other Color RGB Value Punctuation Definition Constant", + "scope": "constant.other.color.rgb-value punctuation.definition.constant", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Constant Other Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Keyword Other Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Meta Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Entity Other Attribute Name Id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#FAD430" + } + }, + { + "name": "Meta Property Name", + "scope": "meta.property-name", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Doctypes", + "scope": ["entity.name.tag.doctype", "meta.tag.sgml.doctype"], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": "punctuation.definition.parameters", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Keyword Control Operator", + "scope": "keyword.control.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Variable Instances", + "scope": [ + "variable.instance", + "variable.other.instance", + "variable.reaedwrite.instance", + "variable.other.readwrite.instance" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Variable Property Other", + "scope": ["variable.other.property", "variable.other.object.property"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Keyword Operator Comparison", + "scope": "keyword.operator.comparison", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Support Constant, `new` keyword, Special Method Keyword", + "scope": [ + "support.constant", + "keyword.other.special-method", + "keyword.other.new" + ], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Invalid Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#020e14", + "background": "#F78C6C" + } + }, + { + "name": "Invalid Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "background": "#8BD649", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#ffffff", + "background": "#ec5f67" + } + }, + { + "name": "Language Variable", + "scope": "variable.language", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Support Variable Property", + "scope": "support.variable.property", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Variable Function", + "scope": "variable.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variable Interpolation", + "scope": "variable.interpolation", + "settings": { + "foreground": "#ec5f67" + } + }, + { + "name": "Meta Function Call", + "scope": "meta.function-call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Punctuation Tweaks", + "scope": [ + "punctuation.terminator.expression", + "punctuation.definition.arguments", + "punctuation.definition.array", + "punctuation.section.array", + "meta.array" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "More Punctuation Tweaks", + "scope": [ + "punctuation.definition.list.begin", + "punctuation.definition.list.end", + "punctuation.separator.arguments", + "punctuation.definition.list" + ], + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Template Strings", + "scope": "string.template meta.template.expression", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Backtics(``) in Template Strings", + "scope": "string.template punctuation.definition.string", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Italics", + "scope": "italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Bold", + "scope": "bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Quote", + "scope": "quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Raw Code", + "scope": "raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "CoffeScript Variable Assignment", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CoffeScript Parameter Function", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "CoffeeScript Assignments", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# Readwrite Variables", + "scope": "variable.other.readwrite.cs", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "C# Classes & Storage types", + "scope": ["entity.name.type.class.cs", "storage.type.cs"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# Namespaces", + "scope": "entity.name.type.namespace.cs", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Tag names in Stylesheets", + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less", + "entity.name.tag.custom.css" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Wildcard(*) selector in Stylesheets", + "scope": [ + "entity.name.tag.wildcard.css", + "entity.name.tag.wildcard.less", + "entity.name.tag.wildcard.scss", + "entity.name.tag.wildcard.sass" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "(C|SC|SA|LE)SS property value unit", + "scope": [ + "keyword.other.unit.css", + "constant.length.units.css", + "keyword.other.unit.less", + "constant.length.units.less", + "keyword.other.unit.scss", + "constant.length.units.scss", + "keyword.other.unit.sass", + "constant.length.units.sass" + ], + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Attribute Name for CSS", + "scope": "meta.attribute-selector.css entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "punctuations in styled components", + "scope": [ + "source.js source.css meta.property-list", + "source.js source.css punctuation.section", + "source.js source.css punctuation.terminator.rule", + "source.js source.css punctuation.definition.entity.end.bracket", + "source.js source.css punctuation.definition.entity.begin.bracket", + "source.js source.css punctuation.separator.key-value", + "source.js source.css punctuation.definition.attribute-selector", + "source.js source.css meta.property-list", + "source.js source.css meta.property-list punctuation.separator.comma", + "source.ts source.css punctuation.section", + "source.ts source.css punctuation.terminator.rule", + "source.ts source.css punctuation.definition.entity.end.bracket", + "source.ts source.css punctuation.definition.entity.begin.bracket", + "source.ts source.css punctuation.separator.key-value", + "source.ts source.css punctuation.definition.attribute-selector", + "source.ts source.css meta.property-list", + "source.ts source.css meta.property-list punctuation.separator.comma" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir String Punctuations", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Binary Punctuations", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "GraphQL Variables", + "scope": "variable.qraphql", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "ID Attribute Name in HTML", + "scope": "entity.other.attribute-name.id.html", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "HTML Punctuation Definition Tag", + "scope": "punctuation.definition.tag.html", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Doctype", + "scope": "meta.tag.sgml.doctype.html", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "JavaScript Classes", + "scope": "meta.class entity.name.type.class.js", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Method Declaration e.g. `constructor`", + "scope": "meta.method.declaration storage.type.js", + "settings": { + "foreground": "#82AAFF", + "fontStyle": "normal" + } + }, + { + "name": "JavaScript Terminator", + "scope": "terminator.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Meta Punctuation Definition", + "scope": "meta.js punctuation.definition.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Entity Names in Code Documentations", + "scope": [ + "entity.name.type.instance.jsdoc", + "entity.name.type.instance.phpdoc" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Other Variables in Code Documentations", + "scope": ["variable.other.jsdoc", "variable.other.phpdoc"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "JavaScript module imports and exports", + "scope": [ + "variable.other.meta.import.js", + "meta.import.js variable.other", + "variable.other.meta.export.js", + "meta.export.js variable.other" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variable Parameter Function", + "scope": "variable.parameter.function.js", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "JavaScript Variable Other ReadWrite", + "scope": "variable.other.readwrite.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Text nested in React tags", + "scope": [ + "meta.jsx.children", + "meta.jsx.children.js", + "meta.jsx.children.tsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript[React] Variable Other Object", + "scope": [ + "variable.other.object.js", + "variable.other.object.jsx", + "meta.object-literal.key.js", + "meta.object-literal.key.jsx", + "variable.object.property.js", + "variable.object.property.jsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variables", + "scope": ["variable.js", "variable.other.js"], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Entity Name Type", + "scope": ["entity.name.type.js", "entity.name.type.module.js"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Support Classes", + "scope": "support.class.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JSON Property Names", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#C3E88D", + "fontStyle": "normal" + } + }, + { + "name": "JSON Support Constants", + "scope": "support.constant.json", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "JSON Property values (string)", + "scope": "meta.structure.dictionary.value.json string.quoted.double", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Strings in JSON values", + "scope": "string.quoted.double.json punctuation.definition.string.json", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Specific JSON Property values like null", + "scope": "meta.structure.dictionary.json meta.structure.dictionary.value constant.language", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Ruby Variables", + "scope": "variable.other.ruby", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Ruby Hashkeys", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "LESS Tag names", + "scope": "entity.name.tag.less", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Attribute Name for LESS", + "scope": "meta.attribute-selector.less entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markup Italics", + "scope": "markup.italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Markup Quote + others", + "scope": "markup.quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Markup Raw Code + others", + "scope": "markup.inline.raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Markup Links", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#ff869a" + } + }, + { + "name": "Markup Attributes", + "scope": ["markup.meta.attribute-list"], + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Markup Admonitions", + "scope": "markup.admonition", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list.bullet", + "settings": { + "foreground": "#D9F5DD" + } + }, + { + "name": "Markup Superscript and Subscript", + "scope": ["markup.superscript", "markup.subscript"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Markdown Link Title and Description", + "scope": [ + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Markdown Punctuation", + "scope": [ + "punctuation.definition.string.markdown", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "meta.link.inline.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown MetaData Punctuation", + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Asciidoc Function", + "scope": "entity.name.function.asciidoc", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "PHP Variables", + "scope": "variable.other.php", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Support Classes in PHP", + "scope": "support.class.php", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Punctuations in PHP function calls", + "scope": "meta.function-call.php punctuation", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "PHP Global Variables", + "scope": "variable.other.global.php", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Declaration Punctuation in PHP Global Variables", + "scope": "variable.other.global.php punctuation.definition.variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Language Constants in Python", + "scope": "constant.language.python", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Python Function Parameter and Arguments", + "scope": [ + "variable.parameter.function.python", + "meta.function-call.arguments.python" + ], + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Python Function Call", + "scope": [ + "meta.function-call.python", + "meta.function-call.generic.python" + ], + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Punctuations in Python", + "scope": "punctuation.python", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Decorator Functions in Python", + "scope": "entity.name.function.decorator.python", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Python Language Variable", + "scope": "source.python variable.language.special", + "settings": { + "foreground": "#8EACE3" + } + }, + { + "name": "SCSS Variable", + "scope": [ + "variable.scss", + "variable.sass", + "variable.parameter.url.scss", + "variable.parameter.url.sass" + ], + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Attribute Name for SASS", + "scope": [ + "meta.attribute-selector.scss entity.other.attribute-name.attribute", + "meta.attribute-selector.sass entity.other.attribute-name.attribute" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Tag names in SASS", + "scope": ["entity.name.tag.scss", "entity.name.tag.sass"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "TypeScript[React] Variables and Object Properties", + "scope": [ + "variable.other.readwrite.alias.ts", + "variable.other.readwrite.alias.tsx", + "variable.other.readwrite.ts", + "variable.other.readwrite.tsx", + "variable.other.object.ts", + "variable.other.object.tsx", + "variable.object.property.ts", + "variable.object.property.tsx", + "variable.other.ts", + "variable.other.tsx", + "variable.tsx", + "variable.ts" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Entity Name Types", + "scope": ["entity.name.type.ts", "entity.name.type.tsx"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "TypeScript[React] Node Classes", + "scope": ["support.class.node.ts", "support.class.node.tsx"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Entity Name Types as Parameters", + "scope": [ + "meta.type.parameters.ts entity.name.type", + "meta.type.parameters.tsx entity.name.type" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "TypeScript[React] Import/Export Punctuations", + "scope": [ + "meta.import.ts punctuation.definition.block", + "meta.import.tsx punctuation.definition.block", + "meta.export.ts punctuation.definition.block", + "meta.export.tsx punctuation.definition.block" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": [ + "meta.decorator punctuation.decorator.ts", + "meta.decorator punctuation.decorator.tsx" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": "meta.tag.js meta.jsx.children.tsx", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "YAML Entity Name Tags", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars variables", + "scope": "variable.parameter.handlebars", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "handlebars parameters", + "scope": "entity.other.attribute-name.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "handlebars enitity attribute names", + "scope": "entity.other.attribute-name.handlebars", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars enitity attribute values", + "scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "normalize font style of certain components", + "scope": [ + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.begin.js", + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.end.js", + "meta.property-list.css meta.property-value.css variable.other.less", + "punctuation.section.embedded.begin.js.jsx", + "punctuation.section.embedded.end.js.jsx", + "meta.property-list.scss variable.scss", + "meta.property-list.sass variable.sass", + "keyword.operator.logical", + "keyword.operator.arithmetic", + "keyword.operator.bitwise", + "keyword.operator.increment", + "keyword.operator.ternary", + "keyword.operator.comparison", + "keyword.operator.assignment", + "keyword.operator.operator", + "keyword.operator.or.regexp", + "keyword.operator.expression.in", + "keyword.operator.type", + "punctuation.section.embedded.js", + "punctuation.definintion.string", + "punctuation" + ], + "settings": { + "fontStyle": "normal" + } + } + ] +} diff --git a/assets/themes/src/vscode/palenight/palenight-operator.json b/assets/themes/src/vscode/palenight/palenight-operator.json new file mode 100644 index 0000000000000000000000000000000000000000..92104cd9edf493785961407824aa5e372eb9d6e7 --- /dev/null +++ b/assets/themes/src/vscode/palenight/palenight-operator.json @@ -0,0 +1,1640 @@ +{ + "name": "Palenight Operator", + "author": "Olaolu Olawuyi", + "maintainers": ["Olaolu Olawuyi "], + "type": "dark", + "semanticClass": "palenight-operator", + "colors": { + "contrastActiveBorder": null, + "contrastBorder": "#282B3C", + "focusBorder": "#282B3C", + "foreground": "#ffffff", + "widget.shadow": "#232635", + "selection.background": "#7580B850", + "descriptionForeground": null, + "errorForeground": "#EF5350", + "button.background": "#7e57c2cc", + "button.foreground": "#ffffffcc", + "button.hoverBackground": "#7e57c2", + "dropdown.background": "#292D3E", + "dropdown.border": "#7e57c2", + "dropdown.foreground": "#ffffffcc", + "input.background": "#313850", + "input.border": "#7e57c2", + "input.foreground": "#ffffffcc", + "input.placeholderForeground": "#ffffffcc", + "inputOption.activeBorder": "#ffffffcc", + "inputValidation.errorBackground": "#ef5350f2", + "inputValidation.errorBorder": "#EF5350", + "inputValidation.infoBackground": "#64b5f6f2", + "inputValidation.infoBorder": "#64B5F6", + "inputValidation.warningBackground": "#ffca28f2", + "inputValidation.warningBorder": "#FFCA28", + "scrollbar.shadow": "#292D3E00", + "scrollbarSlider.activeBackground": "#694CA4cc", + "scrollbarSlider.background": "#694CA466", + "scrollbarSlider.hoverBackground": "#694CA4cc", + "badge.background": "#7e57c2", + "badge.foreground": "#ffffff", + "progress.background": "#7e57c2", + "list.activeSelectionBackground": "#7e57c2", + "list.activeSelectionForeground": "#ffffff", + "list.dropBackground": "#2E3245", + "list.focusBackground": "#0000002e", + "list.focusForeground": "#ffffff", + "list.highlightForeground": "#ffffff", + "list.hoverBackground": "#0000001a", + "list.hoverForeground": "#ffffff", + "list.inactiveSelectionBackground": "#929ac90d", + "list.inactiveSelectionForeground": "#929ac9", + "activityBar.background": "#282C3D", + "activityBar.dropBackground": "#7e57c2e3", + "activityBar.foreground": "#eeffff", + "activityBar.border": "#282C3D", + "activityBarBadge.background": "#7e57c2", + "activityBarBadge.foreground": "#ffffff", + "sideBar.background": "#292D3E", + "sideBar.foreground": "#6C739A", + "sideBar.border": "#282B3C", + "sideBarTitle.foreground": "#eeffff", + "sideBarSectionHeader.background": "#292D3E", + "sideBarSectionHeader.foreground": "#eeffff", + "editorGroup.background": "#32374C", + "editorGroup.border": "#2E3245", + "editorGroup.dropBackground": "#7e57c273", + "editorGroupHeader.noTabsBackground": "#32374C", + "editorGroupHeader.tabsBackground": "#31364a", + "editorGroupHeader.tabsBorder": "#262A39", + "tab.activeBackground": "#292D3E", + "tab.activeForeground": "#eeffff", + "tab.border": "#272B3B", + "tab.activeBorder": "#262A39", + "tab.unfocusedActiveBorder": "#262A39", + "tab.inactiveBackground": "#31364A", + "tab.inactiveForeground": "#929ac9", + "tab.unfocusedActiveForeground": null, + "tab.unfocusedInactiveForeground": null, + "editor.background": "#292D3E", + "editor.foreground": "#BFC7D5", + "editorLineNumber.foreground": "#4c5374", + "editorLineNumber.activeForeground": "#eeffff", + "editorCursor.foreground": "#7e57c2", + "editorCursor.background": null, + "editor.selectionBackground": "#7580B850", + "editor.selectionHighlightBackground": "#383D51", + "editor.inactiveSelectionBackground": "#7e57c25a", + "editor.wordHighlightBackground": "#32374D", + "editor.wordHighlightStrongBackground": "#2E3250", + "editor.findMatchBackground": "#2e3248fc", + "editor.findMatchHighlightBackground": "#7e57c233", + "editor.findRangeHighlightBackground": null, + "editor.hoverHighlightBackground": "#7e57c25a", + "editor.lineHighlightBackground": "#0003", + "editor.lineHighlightBorder": null, + "editorLink.activeForeground": null, + "editor.rangeHighlightBackground": "#7e57c25a", + "editorWhitespace.foreground": null, + "editorIndentGuide.background": "#4E557980", + "editorRuler.foreground": "#4E557980", + "editorCodeLens.foreground": "#FFCA28", + "editorBracketMatch.background": null, + "editorBracketMatch.border": null, + "editorOverviewRuler.currentContentForeground": "#7e57c2", + "editorOverviewRuler.incomingContentForeground": "#7e57c2", + "editorOverviewRuler.commonContentForeground": "#7e57c2", + "editorError.foreground": "#EF5350", + "editorError.border": null, + "editorWarning.foreground": "#FFCA28", + "editorWarning.border": null, + "editorGutter.background": null, + "editorGutter.modifiedBackground": "#e2b93d", + "editorGutter.addedBackground": "#9CCC65", + "editorGutter.deletedBackground": "#EF5350", + "diffEditor.insertedTextBackground": "#99b76d23", + "diffEditor.removedTextBackground": "#ef535033", + "editorWidget.background": "#31364a", + "editorWidget.border": null, + "editorSuggestWidget.background": "#2C3043", + "editorSuggestWidget.border": "#2B2F40", + "editorSuggestWidget.foreground": "#bfc7d5", + "editorSuggestWidget.highlightForeground": "#ffffff", + "editorSuggestWidget.selectedBackground": "#7e57c2", + "editorHoverWidget.background": "#292D3E", + "editorHoverWidget.border": "#7e57c2", + "debugExceptionWidget.background": "#292D3E", + "debugExceptionWidget.border": "#7e57c2", + "editorMarkerNavigation.background": "#31364a", + "editorMarkerNavigationError.background": "#EF5350", + "editorMarkerNavigationWarning.background": "#FFCA28", + "peekView.border": "#7e57c2", + "peekViewEditor.background": "#232635", + "peekViewEditor.matchHighlightBackground": "#7e57c25a", + "peekViewResult.background": "#2E3245", + "peekViewResult.fileForeground": "#eeffff", + "peekViewResult.lineForeground": "#eeffff", + "peekViewResult.matchHighlightBackground": "#7e57c25a", + "peekViewResult.selectionBackground": "#2E3250", + "peekViewResult.selectionForeground": "#eeffff", + "peekViewTitle.background": "#292D3E", + "peekViewTitleDescription.foreground": "#697098", + "peekViewTitleLabel.foreground": "#eeffff", + "merge.currentHeaderBackground": "#7e57c25a", + "merge.currentContentBackground": null, + "merge.incomingHeaderBackground": "#7e57c25a", + "merge.incomingContentBackground": null, + "merge.border": null, + "panel.background": "#292D3E", + "panel.border": "#282B3C", + "panelTitle.activeBorder": "#7e57c2", + "panelTitle.activeForeground": "#eeffff", + "panelTitle.inactiveForeground": "#bfc7d580", + "statusBar.background": "#282C3D", + "statusBar.foreground": "#676E95", + "statusBar.border": "#262A39", + "statusBar.debuggingBackground": "#202431", + "statusBar.debuggingForeground": null, + "statusBar.debuggingBorder": "#1F2330", + "statusBar.noFolderForeground": null, + "statusBar.noFolderBackground": "#292D3E", + "statusBar.noFolderBorder": "#25293A", + "statusBarItem.activeBackground": "#202431", + "statusBarItem.hoverBackground": "#202431", + "statusBarItem.prominentBackground": "#202431", + "statusBarItem.prominentHoverBackground": "#202431", + "titleBar.activeBackground": "#292d3e", + "titleBar.activeForeground": "#eeefff", + "titleBar.border": "#30364c", + "titleBar.inactiveBackground": "#30364c", + "titleBar.inactiveForeground": null, + "notifications.background": "#292D3E", + "notifications.foreground": "#ffffffcc", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentForeground": "#ffffffcc", + "extensionButton.prominentBackground": "#7e57c2cc", + "extensionButton.prominentHoverBackground": "#7e57c2", + "pickerGroup.foreground": "#d1aaff", + "pickerGroup.border": "#2E3245", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiBlack": "#676E95", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#a9c77d", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#ff5572", + "terminal.ansiYellow": "#FFCB6B", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightBlack": "#676E95", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#ff5572", + "terminal.ansiBrightYellow": "#FFCB6B", + "debugToolBar.background": "#292D3E", + "welcomePage.buttonBackground": null, + "welcomePage.buttonHoverBackground": null, + "walkThrough.embeddedEditorBackground": "#232635", + "gitDecoration.modifiedResourceForeground": "#e2c08de6", + "gitDecoration.deletedResourceForeground": "#EF535090", + "gitDecoration.untrackedResourceForeground": "#a9c77dff", + "gitDecoration.ignoredResourceForeground": "#69709890", + "gitDecoration.conflictingResourceForeground": "#FFEB95CC", + "editorActiveLineNumber.foreground": "#eeffff", + "breadcrumb.foreground": "#6c739a", + "breadcrumb.focusForeground": "#bfc7d5", + "breadcrumb.activeSelectionForeground": "#eeffff", + "breadcrumbPicker.background": "#292D3E" + }, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#292D3E", + "foreground": "#bfc7d5" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Quoted", + "scope": "string.quoted", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Unquoted", + "scope": "string.unquoted", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Support Constant Math", + "scope": "support.constant.math", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Number", + "scope": ["constant.numeric", "constant.character.numeric"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "punctuation.definition.constant", + "variable.other.constant" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "RegExp String", + "scope": ["string.regexp", "string.regexp keyword.other"], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Comma in functions", + "scope": "meta.function punctuation.separator.comma", + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Keyword", + "scope": ["punctuation.accessor", "keyword"], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "storage.type", + "meta.var.expr storage.type", + "storage.type.property.js", + "storage.type.property.ts", + "storage.type.property.tsx", + "meta.class meta.method.declaration meta.var.expr storage.type.js" + ], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "meta.class entity.name.type.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Function Parameters", + "scope": "variable.parameter", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Meta Tag", + "scope": ["punctuation.definition.tag", "meta.tag"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Tag names", + "scope": [ + "entity.name.tag support.class.component", + "meta.tag.other.html", + "meta.tag.other.js", + "meta.tag.other.tsx", + "entity.name.tag.tsx", + "entity.name.tag.js", + "entity.name.tag", + "meta.tag.js", + "meta.tag.tsx", + "meta.tag.html" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Entity Name Tag Custom", + "scope": "entity.name.tag.custom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Library (function & constant)", + "scope": ["support.function", "support.constant"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Support Constant Property Value meta", + "scope": "support.constant.meta.property-value", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Support Variable DOM", + "scope": "support.variable.dom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#ff2c83", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#ffffff", + "background": "#d3423e" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Relational", + "scope": "keyword.operator.relational", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Assignment", + "scope": "keyword.operator.assignment", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Double-Slashed Comment", + "scope": "comment.line.double-slash", + "settings": { + "foreground": "#697098" + } + }, + { + "name": "Object", + "scope": "object", + "settings": { + "foreground": "#cdebf7" + } + }, + { + "name": "Null", + "scope": "constant.language.null", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Meta Brace", + "scope": "meta.brace", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Meta Delimiter Period", + "scope": "meta.delimiter.period", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Punctuation Definition String", + "scope": "punctuation.definition.string", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Object Comma", + "scope": "object.comma", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Variable Parameter Function", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Type Property Name & entity name tags", + "scope": [ + "support.type.vendored.property-name", + "support.constant.vendored.property-value", + "support.type.property-name", + "meta.property-list entity.name.tag" + ], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Entity Name tag reference in stylesheets", + "scope": "meta.property-list entity.name.tag.reference", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Constant Other Color RGB Value Punctuation Definition Constant", + "scope": "constant.other.color.rgb-value punctuation.definition.constant", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Constant Other Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Keyword Other Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Meta Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Entity Other Attribute Name Id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#FAD430" + } + }, + { + "name": "Meta Property Name", + "scope": "meta.property-name", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Doctypes", + "scope": ["entity.name.tag.doctype", "meta.tag.sgml.doctype"], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": "punctuation.definition.parameters", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Keyword Control Operator", + "scope": "keyword.control.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Variable Instances", + "scope": [ + "variable.instance", + "variable.other.instance", + "variable.reaedwrite.instance", + "variable.other.readwrite.instance" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Variable Property Other", + "scope": ["variable.other.property", "variable.other.object.property"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Keyword Operator Comparison", + "scope": "keyword.operator.comparison", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Support Constant, `new` keyword, Special Method Keyword", + "scope": [ + "support.constant", + "keyword.other.special-method", + "keyword.other.new" + ], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Invalid Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#020e14", + "background": "#F78C6C" + } + }, + { + "name": "Invalid Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "background": "#8BD649", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#ffffff", + "background": "#ec5f67" + } + }, + { + "name": "Language Variable", + "scope": "variable.language", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Support Variable Property", + "scope": "support.variable.property", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Variable Function", + "scope": "variable.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variable Interpolation", + "scope": "variable.interpolation", + "settings": { + "foreground": "#ec5f67" + } + }, + { + "name": "Meta Function Call", + "scope": "meta.function-call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Punctuation Tweaks", + "scope": [ + "punctuation.terminator.expression", + "punctuation.definition.arguments", + "punctuation.definition.array", + "punctuation.section.array", + "meta.array" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "More Punctuation Tweaks", + "scope": [ + "punctuation.definition.list.begin", + "punctuation.definition.list.end", + "punctuation.separator.arguments", + "punctuation.definition.list" + ], + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Template Strings", + "scope": "string.template meta.template.expression", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Backtics(``) in Template Strings", + "scope": "string.template punctuation.definition.string", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Italics", + "scope": "italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Bold", + "scope": "bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Quote", + "scope": "quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Raw Code", + "scope": "raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "CoffeScript Variable Assignment", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CoffeScript Parameter Function", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "CoffeeScript Assignments", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# Readwrite Variables", + "scope": "variable.other.readwrite.cs", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "C# Classes & Storage types", + "scope": ["entity.name.type.class.cs", "storage.type.cs"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# Namespaces", + "scope": "entity.name.type.namespace.cs", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Tag names in Stylesheets", + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less", + "entity.name.tag.custom.css" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Wildcard(*) selector in Stylesheets", + "scope": [ + "entity.name.tag.wildcard.css", + "entity.name.tag.wildcard.less", + "entity.name.tag.wildcard.scss", + "entity.name.tag.wildcard.sass" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "(C|SC|SA|LE)SS property value unit", + "scope": [ + "keyword.other.unit.css", + "constant.length.units.css", + "keyword.other.unit.less", + "constant.length.units.less", + "keyword.other.unit.scss", + "constant.length.units.scss", + "keyword.other.unit.sass", + "constant.length.units.sass" + ], + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Attribute Name for CSS", + "scope": "meta.attribute-selector.css entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "punctuations in styled components", + "scope": [ + "source.js source.css meta.property-list", + "source.js source.css punctuation.section", + "source.js source.css punctuation.terminator.rule", + "source.js source.css punctuation.definition.entity.end.bracket", + "source.js source.css punctuation.definition.entity.begin.bracket", + "source.js source.css punctuation.separator.key-value", + "source.js source.css punctuation.definition.attribute-selector", + "source.js source.css meta.property-list", + "source.js source.css meta.property-list punctuation.separator.comma", + "source.ts source.css punctuation.section", + "source.ts source.css punctuation.terminator.rule", + "source.ts source.css punctuation.definition.entity.end.bracket", + "source.ts source.css punctuation.definition.entity.begin.bracket", + "source.ts source.css punctuation.separator.key-value", + "source.ts source.css punctuation.definition.attribute-selector", + "source.ts source.css meta.property-list", + "source.ts source.css meta.property-list punctuation.separator.comma" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir String Punctuations", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Binary Punctuations", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "GraphQL Variables", + "scope": "variable.qraphql", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "ID Attribute Name in HTML", + "scope": "entity.other.attribute-name.id.html", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "HTML Punctuation Definition Tag", + "scope": "punctuation.definition.tag.html", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Doctype", + "scope": "meta.tag.sgml.doctype.html", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "JavaScript Classes", + "scope": "meta.class entity.name.type.class.js", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Method Declaration e.g. `constructor`", + "scope": "meta.method.declaration storage.type.js", + "settings": { + "foreground": "#82AAFF", + "fontStyle": "normal" + } + }, + { + "name": "JavaScript Terminator", + "scope": "terminator.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Meta Punctuation Definition", + "scope": "meta.js punctuation.definition.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Entity Names in Code Documentations", + "scope": [ + "entity.name.type.instance.jsdoc", + "entity.name.type.instance.phpdoc" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Other Variables in Code Documentations", + "scope": ["variable.other.jsdoc", "variable.other.phpdoc"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "JavaScript module imports and exports", + "scope": [ + "variable.other.meta.import.js", + "meta.import.js variable.other", + "variable.other.meta.export.js", + "meta.export.js variable.other" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variable Parameter Function", + "scope": "variable.parameter.function.js", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "JavaScript Variable Other ReadWrite", + "scope": "variable.other.readwrite.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Text nested in React tags", + "scope": [ + "meta.jsx.children", + "meta.jsx.children.js", + "meta.jsx.children.tsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript[React] Variable Other Object", + "scope": [ + "variable.other.object.js", + "variable.other.object.jsx", + "meta.object-literal.key.js", + "meta.object-literal.key.jsx", + "variable.object.property.js", + "variable.object.property.jsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variables", + "scope": ["variable.js", "variable.other.js"], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Entity Name Type", + "scope": ["entity.name.type.js", "entity.name.type.module.js"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Support Classes", + "scope": "support.class.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JSON Property Names", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#C3E88D", + "fontStyle": "normal" + } + }, + { + "name": "JSON Support Constants", + "scope": "support.constant.json", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "JSON Property values (string)", + "scope": "meta.structure.dictionary.value.json string.quoted.double", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Strings in JSON values", + "scope": "string.quoted.double.json punctuation.definition.string.json", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Specific JSON Property values like null", + "scope": "meta.structure.dictionary.json meta.structure.dictionary.value constant.language", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Ruby Variables", + "scope": "variable.other.ruby", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Ruby Hashkeys", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "LESS Tag names", + "scope": "entity.name.tag.less", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Attribute Name for LESS", + "scope": "meta.attribute-selector.less entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markup Italics", + "scope": "markup.italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Markup Quote + others", + "scope": "markup.quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Markup Raw Code + others", + "scope": "markup.inline.raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Markup Links", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#ff869a" + } + }, + { + "name": "Markup Attributes", + "scope": ["markup.meta.attribute-list"], + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Markup Admonitions", + "scope": "markup.admonition", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list.bullet", + "settings": { + "foreground": "#D9F5DD" + } + }, + { + "name": "Markup Superscript and Subscript", + "scope": ["markup.superscript", "markup.subscript"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Markdown Link Title and Description", + "scope": [ + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Markdown Punctuation", + "scope": [ + "punctuation.definition.string.markdown", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "meta.link.inline.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown MetaData Punctuation", + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Asciidoc Function", + "scope": "entity.name.function.asciidoc", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "PHP Variables", + "scope": "variable.other.php", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Support Classes in PHP", + "scope": "support.class.php", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Punctuations in PHP function calls", + "scope": "meta.function-call.php punctuation", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "PHP Global Variables", + "scope": "variable.other.global.php", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Declaration Punctuation in PHP Global Variables", + "scope": "variable.other.global.php punctuation.definition.variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Language Constants in Python", + "scope": "constant.language.python", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Python Function Parameter and Arguments", + "scope": [ + "variable.parameter.function.python", + "meta.function-call.arguments.python" + ], + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Python Function Call", + "scope": [ + "meta.function-call.python", + "meta.function-call.generic.python" + ], + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Punctuations in Python", + "scope": "punctuation.python", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Decorator Functions in Python", + "scope": "entity.name.function.decorator.python", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Python Language Variable", + "scope": "source.python variable.language.special", + "settings": { + "foreground": "#8EACE3" + } + }, + { + "name": "SCSS Variable", + "scope": [ + "variable.scss", + "variable.sass", + "variable.parameter.url.scss", + "variable.parameter.url.sass" + ], + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Attribute Name for SASS", + "scope": [ + "meta.attribute-selector.scss entity.other.attribute-name.attribute", + "meta.attribute-selector.sass entity.other.attribute-name.attribute" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Tag names in SASS", + "scope": ["entity.name.tag.scss", "entity.name.tag.sass"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "TypeScript[React] Variables and Object Properties", + "scope": [ + "variable.other.readwrite.alias.ts", + "variable.other.readwrite.alias.tsx", + "variable.other.readwrite.ts", + "variable.other.readwrite.tsx", + "variable.other.object.ts", + "variable.other.object.tsx", + "variable.object.property.ts", + "variable.object.property.tsx", + "variable.other.ts", + "variable.other.tsx", + "variable.tsx", + "variable.ts" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Entity Name Types", + "scope": ["entity.name.type.ts", "entity.name.type.tsx"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "TypeScript[React] Node Classes", + "scope": ["support.class.node.ts", "support.class.node.tsx"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Entity Name Types as Parameters", + "scope": [ + "meta.type.parameters.ts entity.name.type", + "meta.type.parameters.tsx entity.name.type" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "TypeScript[React] Import/Export Punctuations", + "scope": [ + "meta.import.ts punctuation.definition.block", + "meta.import.tsx punctuation.definition.block", + "meta.export.ts punctuation.definition.block", + "meta.export.tsx punctuation.definition.block" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": [ + "meta.decorator punctuation.decorator.ts", + "meta.decorator punctuation.decorator.tsx" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": "meta.tag.js meta.jsx.children.tsx", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "YAML Entity Name Tags", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars variables", + "scope": "variable.parameter.handlebars", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "handlebars parameters", + "scope": "entity.other.attribute-name.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "handlebars enitity attribute names", + "scope": "entity.other.attribute-name.handlebars", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars enitity attribute values", + "scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "normalize font style of certain components", + "scope": [ + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.begin.js", + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.end.js", + "meta.property-list.css meta.property-value.css variable.other.less", + "punctuation.section.embedded.begin.js.jsx", + "punctuation.section.embedded.end.js.jsx", + "meta.property-list.scss variable.scss", + "meta.property-list.sass variable.sass", + "keyword.operator.logical", + "keyword.operator.arithmetic", + "keyword.operator.bitwise", + "keyword.operator.increment", + "keyword.operator.ternary", + "keyword.operator.comparison", + "keyword.operator.assignment", + "keyword.operator.operator", + "keyword.operator.or.regexp", + "keyword.operator.expression.in", + "keyword.operator.type", + "punctuation.section.embedded.js", + "punctuation.definintion.string", + "punctuation" + ], + "settings": { + "fontStyle": "normal" + } + }, + { + "name": "italicsify for operator mono", + "scope": [ + "keyword.other.unit", + "support.type.property-name.css", + "support.type.vendored.property-name.css", + "support.constant.vendored.property-value.css", + "meta.import.ts meta.block.ts variable.other.readwrite.alias.ts", + "meta.import.tsx meta.block.tsx variable.other.readwrite.alias.tsx", + "meta.import.js variable.other", + "meta.export.ts meta.block.ts variable.other.readwrite.alias.ts", + "meta.export.tsx meta.block.tsx variable.other.readwrite.alias.tsx", + "meta.export.js variable.other", + "entity.name.function.ts", + "entity.name.function.tsx", + "support.type.primitive", + "entity.name.tag.yaml", + "entity.other.attribute-name", + "meta.tag.sgml.doctype.html", + "entity.name.tag.doctype", + "meta.tag.sgml.doctype", + "entity.name.tag.custom", + "source.js.jsx keyword.control.flow.js", + "support.type.property.css", + "support.function.basic_functions", + "constant.other.color.rgb-value.hex.css", + "constant.other.rgb-value.css", + "variable.assignment.coffee", + "support.function.basic_functions", + "keyword.operator.expression.typeof", + "punctuation.section.embedded", + "keyword.operator.type.annotation", + "variable.object.property.ts", + "variable.object.property.js", + "variable.object.property.jsx", + "variable.object.property.tsx", + "assignment.coffee", + "entity.name.type.ts", + "support.constant.math", + "meta.object-literal.key", + "meta.var.expr storage.type", + "variable.scss", + "variable.sass", + "variable.other.less", + "variable.parameter.url.scss", + "variable.parameter.url.sass", + "parameter", + "string", + "italic", + "quote", + "keyword", + "storage", + "language", + "constant.language", + "variable.language", + "type .function", + "type.function", + "storage.type.class", + "type.var", + "meta.parameter", + "variable.parameter", + "meta.parameters", + "keyword.control", + "modifier", + "this", + "comment" + ], + "settings": { + "fontStyle": "italic" + } + } + ] +} diff --git a/assets/themes/src/vscode/palenight/palenight.json b/assets/themes/src/vscode/palenight/palenight.json new file mode 100644 index 0000000000000000000000000000000000000000..5351dc4f2312a54c3714ab14641d27cfc4b6988a --- /dev/null +++ b/assets/themes/src/vscode/palenight/palenight.json @@ -0,0 +1,1569 @@ +{ + "name": "Palenight Theme", + "author": "Olaolu Olawuyi", + "maintainers": ["Olaolu Olawuyi "], + "type": "dark", + "semanticClass": "palenight", + "colors": { + "contrastActiveBorder": null, + "contrastBorder": "#282B3C", + "focusBorder": "#282B3C", + "foreground": "#ffffff", + "widget.shadow": "#232635", + "selection.background": "#7580B850", + "descriptionForeground": null, + "errorForeground": "#EF5350", + "button.background": "#7e57c2cc", + "button.foreground": "#ffffffcc", + "button.hoverBackground": "#7e57c2", + "dropdown.background": "#292D3E", + "dropdown.border": "#7e57c2", + "dropdown.foreground": "#ffffffcc", + "input.background": "#313850", + "input.border": "#7e57c2", + "input.foreground": "#ffffffcc", + "input.placeholderForeground": "#ffffffcc", + "inputOption.activeBorder": "#ffffffcc", + "inputValidation.errorBackground": "#ef5350f2", + "inputValidation.errorBorder": "#EF5350", + "inputValidation.infoBackground": "#64b5f6f2", + "inputValidation.infoBorder": "#64B5F6", + "inputValidation.warningBackground": "#ffca28f2", + "inputValidation.warningBorder": "#FFCA28", + "scrollbar.shadow": "#292D3E00", + "scrollbarSlider.activeBackground": "#694CA4cc", + "scrollbarSlider.background": "#694CA466", + "scrollbarSlider.hoverBackground": "#694CA4cc", + "badge.background": "#7e57c2", + "badge.foreground": "#ffffff", + "progress.background": "#7e57c2", + "list.activeSelectionBackground": "#7e57c2", + "list.activeSelectionForeground": "#ffffff", + "list.dropBackground": "#2E3245", + "list.focusBackground": "#0000002e", + "list.focusForeground": "#ffffff", + "list.highlightForeground": "#ffffff", + "list.hoverBackground": "#0000001a", + "list.hoverForeground": "#ffffff", + "list.inactiveSelectionBackground": "#929ac90d", + "list.inactiveSelectionForeground": "#929ac9", + "activityBar.background": "#282C3D", + "activityBar.dropBackground": "#7e57c2e3", + "activityBar.foreground": "#eeffff", + "activityBar.border": "#282C3D", + "activityBarBadge.background": "#7e57c2", + "activityBarBadge.foreground": "#ffffff", + "sideBar.background": "#292D3E", + "sideBar.foreground": "#6C739A", + "sideBar.border": "#282B3C", + "sideBarTitle.foreground": "#eeffff", + "sideBarSectionHeader.background": "#292D3E", + "sideBarSectionHeader.foreground": "#eeffff", + "editorGroup.background": "#32374C", + "editorGroup.border": "#2E3245", + "editorGroup.dropBackground": "#7e57c273", + "editorGroupHeader.noTabsBackground": "#32374C", + "editorGroupHeader.tabsBackground": "#31364a", + "editorGroupHeader.tabsBorder": "#262A39", + "tab.activeBackground": "#292D3E", + "tab.activeForeground": "#eeffff", + "tab.border": "#272B3B", + "tab.activeBorder": "#262A39", + "tab.unfocusedActiveBorder": "#262A39", + "tab.inactiveBackground": "#31364A", + "tab.inactiveForeground": "#929ac9", + "tab.unfocusedActiveForeground": null, + "tab.unfocusedInactiveForeground": null, + "editor.background": "#292D3E", + "editor.foreground": "#BFC7D5", + "editorLineNumber.foreground": "#4c5374", + "editorLineNumber.activeForeground": "#eeffff", + "editorCursor.foreground": "#7e57c2", + "editorCursor.background": null, + "editor.selectionBackground": "#7580B850", + "editor.selectionHighlightBackground": "#383D51", + "editor.inactiveSelectionBackground": "#7e57c25a", + "editor.wordHighlightBackground": "#32374D", + "editor.wordHighlightStrongBackground": "#2E3250", + "editor.findMatchBackground": "#2e3248fc", + "editor.findMatchHighlightBackground": "#7e57c233", + "editor.findRangeHighlightBackground": null, + "editor.hoverHighlightBackground": "#7e57c25a", + "editor.lineHighlightBackground": "#0003", + "editor.lineHighlightBorder": null, + "editorLink.activeForeground": null, + "editor.rangeHighlightBackground": "#7e57c25a", + "editorWhitespace.foreground": null, + "editorIndentGuide.background": "#4E557980", + "editorRuler.foreground": "#4E557980", + "editorCodeLens.foreground": "#FFCA28", + "editorBracketMatch.background": null, + "editorBracketMatch.border": null, + "editorOverviewRuler.currentContentForeground": "#7e57c2", + "editorOverviewRuler.incomingContentForeground": "#7e57c2", + "editorOverviewRuler.commonContentForeground": "#7e57c2", + "editorError.foreground": "#EF5350", + "editorError.border": null, + "editorWarning.foreground": "#FFCA28", + "editorWarning.border": null, + "editorGutter.background": null, + "editorGutter.modifiedBackground": "#e2b93d", + "editorGutter.addedBackground": "#9CCC65", + "editorGutter.deletedBackground": "#EF5350", + "diffEditor.insertedTextBackground": "#99b76d23", + "diffEditor.removedTextBackground": "#ef535033", + "editorWidget.background": "#31364a", + "editorWidget.border": null, + "editorSuggestWidget.background": "#2C3043", + "editorSuggestWidget.border": "#2B2F40", + "editorSuggestWidget.foreground": "#bfc7d5", + "editorSuggestWidget.highlightForeground": "#ffffff", + "editorSuggestWidget.selectedBackground": "#7e57c2", + "editorHoverWidget.background": "#292D3E", + "editorHoverWidget.border": "#7e57c2", + "debugExceptionWidget.background": "#292D3E", + "debugExceptionWidget.border": "#7e57c2", + "editorMarkerNavigation.background": "#31364a", + "editorMarkerNavigationError.background": "#EF5350", + "editorMarkerNavigationWarning.background": "#FFCA28", + "peekView.border": "#7e57c2", + "peekViewEditor.background": "#232635", + "peekViewEditor.matchHighlightBackground": "#7e57c25a", + "peekViewResult.background": "#2E3245", + "peekViewResult.fileForeground": "#eeffff", + "peekViewResult.lineForeground": "#eeffff", + "peekViewResult.matchHighlightBackground": "#7e57c25a", + "peekViewResult.selectionBackground": "#2E3250", + "peekViewResult.selectionForeground": "#eeffff", + "peekViewTitle.background": "#292D3E", + "peekViewTitleDescription.foreground": "#697098", + "peekViewTitleLabel.foreground": "#eeffff", + "merge.currentHeaderBackground": "#7e57c25a", + "merge.currentContentBackground": null, + "merge.incomingHeaderBackground": "#7e57c25a", + "merge.incomingContentBackground": null, + "merge.border": null, + "panel.background": "#292D3E", + "panel.border": "#282B3C", + "panelTitle.activeBorder": "#7e57c2", + "panelTitle.activeForeground": "#eeffff", + "panelTitle.inactiveForeground": "#bfc7d580", + "statusBar.background": "#282C3D", + "statusBar.foreground": "#676E95", + "statusBar.border": "#262A39", + "statusBar.debuggingBackground": "#202431", + "statusBar.debuggingForeground": null, + "statusBar.debuggingBorder": "#1F2330", + "statusBar.noFolderForeground": null, + "statusBar.noFolderBackground": "#292D3E", + "statusBar.noFolderBorder": "#25293A", + "statusBarItem.activeBackground": "#202431", + "statusBarItem.hoverBackground": "#202431", + "statusBarItem.prominentBackground": "#202431", + "statusBarItem.prominentHoverBackground": "#202431", + "titleBar.activeBackground": "#292d3e", + "titleBar.activeForeground": "#eeefff", + "titleBar.border": "#30364c", + "titleBar.inactiveBackground": "#30364c", + "titleBar.inactiveForeground": null, + "notifications.background": "#292D3E", + "notifications.foreground": "#ffffffcc", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentForeground": "#ffffffcc", + "extensionButton.prominentBackground": "#7e57c2cc", + "extensionButton.prominentHoverBackground": "#7e57c2", + "pickerGroup.foreground": "#d1aaff", + "pickerGroup.border": "#2E3245", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiBlack": "#676E95", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#a9c77d", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#ff5572", + "terminal.ansiYellow": "#FFCB6B", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightBlack": "#676E95", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#ff5572", + "terminal.ansiBrightYellow": "#FFCB6B", + "debugToolBar.background": "#292D3E", + "welcomePage.buttonBackground": null, + "welcomePage.buttonHoverBackground": null, + "walkThrough.embeddedEditorBackground": "#232635", + "gitDecoration.modifiedResourceForeground": "#e2c08de6", + "gitDecoration.deletedResourceForeground": "#EF535090", + "gitDecoration.untrackedResourceForeground": "#a9c77dff", + "gitDecoration.ignoredResourceForeground": "#69709890", + "gitDecoration.conflictingResourceForeground": "#FFEB95CC", + "editorActiveLineNumber.foreground": "#eeffff", + "breadcrumb.foreground": "#6c739a", + "breadcrumb.focusForeground": "#bfc7d5", + "breadcrumb.activeSelectionForeground": "#eeffff", + "breadcrumbPicker.background": "#292D3E" + }, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#292D3E", + "foreground": "#bfc7d5" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Quoted", + "scope": "string.quoted", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "String Unquoted", + "scope": "string.unquoted", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Support Constant Math", + "scope": "support.constant.math", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Number", + "scope": ["constant.numeric", "constant.character.numeric"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "punctuation.definition.constant", + "variable.other.constant" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "RegExp String", + "scope": ["string.regexp", "string.regexp keyword.other"], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Comma in functions", + "scope": "meta.function punctuation.separator.comma", + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Keyword", + "scope": ["punctuation.accessor", "keyword"], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "storage.type", + "meta.var.expr storage.type", + "storage.type.property.js", + "storage.type.property.ts", + "storage.type.property.tsx", + "meta.class meta.method.declaration meta.var.expr storage.type.js" + ], + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "meta.class entity.name.type.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Function Parameters", + "scope": "variable.parameter", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Meta Tag", + "scope": ["punctuation.definition.tag", "meta.tag"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Tag names", + "scope": [ + "entity.name.tag support.class.component", + "meta.tag.other.html", + "meta.tag.other.js", + "meta.tag.other.tsx", + "entity.name.tag.tsx", + "entity.name.tag.js", + "entity.name.tag", + "meta.tag.js", + "meta.tag.tsx", + "meta.tag.html" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Entity Name Tag Custom", + "scope": "entity.name.tag.custom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Library (function & constant)", + "scope": ["support.function", "support.constant"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Support Constant Property Value meta", + "scope": "support.constant.meta.property-value", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Support Variable DOM", + "scope": "support.variable.dom", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#ff2c83", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#ffffff", + "background": "#d3423e" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Relational", + "scope": "keyword.operator.relational", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Keyword Operator Assignment", + "scope": "keyword.operator.assignment", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Double-Slashed Comment", + "scope": "comment.line.double-slash", + "settings": { + "foreground": "#697098" + } + }, + { + "name": "Object", + "scope": "object", + "settings": { + "foreground": "#cdebf7" + } + }, + { + "name": "Null", + "scope": "constant.language.null", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Meta Brace", + "scope": "meta.brace", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Meta Delimiter Period", + "scope": "meta.delimiter.period", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Punctuation Definition String", + "scope": "punctuation.definition.string", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Object Comma", + "scope": "object.comma", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Variable Parameter Function", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Type Property Name & entity name tags", + "scope": [ + "support.type.vendored.property-name", + "support.constant.vendored.property-value", + "support.type.property-name", + "meta.property-list entity.name.tag" + ], + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Entity Name tag reference in stylesheets", + "scope": "meta.property-list entity.name.tag.reference", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Constant Other Color RGB Value Punctuation Definition Constant", + "scope": "constant.other.color.rgb-value punctuation.definition.constant", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Constant Other Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Keyword Other Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Meta Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Entity Other Attribute Name Id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#FAD430" + } + }, + { + "name": "Meta Property Name", + "scope": "meta.property-name", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Doctypes", + "scope": ["entity.name.tag.doctype", "meta.tag.sgml.doctype"], + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": "punctuation.definition.parameters", + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Keyword Control Operator", + "scope": "keyword.control.operator", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Keyword Operator Logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Variable Instances", + "scope": [ + "variable.instance", + "variable.other.instance", + "variable.reaedwrite.instance", + "variable.other.readwrite.instance" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Variable Property Other", + "scope": ["variable.other.property", "variable.other.object.property"], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Keyword Operator Comparison", + "scope": "keyword.operator.comparison", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Support Constant, `new` keyword, Special Method Keyword", + "scope": [ + "support.constant", + "keyword.other.special-method", + "keyword.other.new" + ], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Invalid Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#020e14", + "background": "#F78C6C" + } + }, + { + "name": "Invalid Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "background": "#8BD649", + "foreground": "#ffffff" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#ffffff", + "background": "#ec5f67" + } + }, + { + "name": "Language Variable", + "scope": "variable.language", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Support Variable Property", + "scope": "support.variable.property", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Variable Function", + "scope": "variable.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variable Interpolation", + "scope": "variable.interpolation", + "settings": { + "foreground": "#ec5f67" + } + }, + { + "name": "Meta Function Call", + "scope": "meta.function-call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Punctuation Tweaks", + "scope": [ + "punctuation.terminator.expression", + "punctuation.definition.arguments", + "punctuation.definition.array", + "punctuation.section.array", + "meta.array" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "More Punctuation Tweaks", + "scope": [ + "punctuation.definition.list.begin", + "punctuation.definition.list.end", + "punctuation.separator.arguments", + "punctuation.definition.list" + ], + "settings": { + "foreground": "#d9f5dd" + } + }, + { + "name": "Template Strings", + "scope": "string.template meta.template.expression", + "settings": { + "foreground": "#d3423e" + } + }, + { + "name": "Backtics(``) in Template Strings", + "scope": "string.template punctuation.definition.string", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Italics", + "scope": "italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Bold", + "scope": "bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Quote", + "scope": "quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Raw Code", + "scope": "raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "CoffeScript Variable Assignment", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CoffeScript Parameter Function", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "CoffeeScript Assignments", + "scope": "variable.assignment.coffee", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# Readwrite Variables", + "scope": "variable.other.readwrite.cs", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "C# Classes & Storage types", + "scope": ["entity.name.type.class.cs", "storage.type.cs"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# Namespaces", + "scope": "entity.name.type.namespace.cs", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Tag names in Stylesheets", + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less", + "entity.name.tag.custom.css" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Wildcard(*) selector in Stylesheets", + "scope": [ + "entity.name.tag.wildcard.css", + "entity.name.tag.wildcard.less", + "entity.name.tag.wildcard.scss", + "entity.name.tag.wildcard.sass" + ], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "(C|SC|SA|LE)SS property value unit", + "scope": [ + "keyword.other.unit.css", + "constant.length.units.css", + "keyword.other.unit.less", + "constant.length.units.less", + "keyword.other.unit.scss", + "constant.length.units.scss", + "keyword.other.unit.sass", + "constant.length.units.sass" + ], + "settings": { + "foreground": "#FFEB95" + } + }, + { + "name": "Attribute Name for CSS", + "scope": "meta.attribute-selector.css entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "punctuations in styled components", + "scope": [ + "source.js source.css meta.property-list", + "source.js source.css punctuation.section", + "source.js source.css punctuation.terminator.rule", + "source.js source.css punctuation.definition.entity.end.bracket", + "source.js source.css punctuation.definition.entity.begin.bracket", + "source.js source.css punctuation.separator.key-value", + "source.js source.css punctuation.definition.attribute-selector", + "source.js source.css meta.property-list", + "source.js source.css meta.property-list punctuation.separator.comma", + "source.ts source.css punctuation.section", + "source.ts source.css punctuation.terminator.rule", + "source.ts source.css punctuation.definition.entity.end.bracket", + "source.ts source.css punctuation.definition.entity.begin.bracket", + "source.ts source.css punctuation.separator.key-value", + "source.ts source.css punctuation.definition.attribute-selector", + "source.ts source.css meta.property-list", + "source.ts source.css meta.property-list punctuation.separator.comma" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Elixir String Punctuations", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Elixir Binary Punctuations", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#c792ea" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "GraphQL Variables", + "scope": "variable.qraphql", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "ID Attribute Name in HTML", + "scope": "entity.other.attribute-name.id.html", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "HTML Punctuation Definition Tag", + "scope": "punctuation.definition.tag.html", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML Doctype", + "scope": "meta.tag.sgml.doctype.html", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "JavaScript Classes", + "scope": "meta.class entity.name.type.class.js", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Method Declaration e.g. `constructor`", + "scope": "meta.method.declaration storage.type.js", + "settings": { + "foreground": "#82AAFF", + "fontStyle": "normal" + } + }, + { + "name": "JavaScript Terminator", + "scope": "terminator.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Meta Punctuation Definition", + "scope": "meta.js punctuation.definition.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Entity Names in Code Documentations", + "scope": [ + "entity.name.type.instance.jsdoc", + "entity.name.type.instance.phpdoc" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "Other Variables in Code Documentations", + "scope": ["variable.other.jsdoc", "variable.other.phpdoc"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "JavaScript module imports and exports", + "scope": [ + "variable.other.meta.import.js", + "meta.import.js variable.other", + "variable.other.meta.export.js", + "meta.export.js variable.other" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variable Parameter Function", + "scope": "variable.parameter.function.js", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "JavaScript Variable Other ReadWrite", + "scope": "variable.other.readwrite.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Text nested in React tags", + "scope": [ + "meta.jsx.children", + "meta.jsx.children.js", + "meta.jsx.children.tsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript[React] Variable Other Object", + "scope": [ + "variable.other.object.js", + "variable.other.object.jsx", + "meta.object-literal.key.js", + "meta.object-literal.key.jsx", + "variable.object.property.js", + "variable.object.property.jsx" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Variables", + "scope": ["variable.js", "variable.other.js"], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JavaScript Entity Name Type", + "scope": ["entity.name.type.js", "entity.name.type.module.js"], + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "JavaScript Support Classes", + "scope": "support.class.js", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "JSON Property Names", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#C3E88D", + "fontStyle": "normal" + } + }, + { + "name": "JSON Support Constants", + "scope": "support.constant.json", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "JSON Property values (string)", + "scope": "meta.structure.dictionary.value.json string.quoted.double", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Strings in JSON values", + "scope": "string.quoted.double.json punctuation.definition.string.json", + "settings": { + "foreground": "#80CBC4", + "fontStyle": "normal" + } + }, + { + "name": "Specific JSON Property values like null", + "scope": "meta.structure.dictionary.json meta.structure.dictionary.value constant.language", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Ruby Variables", + "scope": "variable.other.ruby", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Ruby Hashkeys", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "LESS Tag names", + "scope": "entity.name.tag.less", + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Attribute Name for LESS", + "scope": "meta.attribute-selector.less entity.other.attribute-name.attribute", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markup Italics", + "scope": "markup.italic", + "settings": { + "foreground": "#c792ea", + "fontStyle": "italic" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "foreground": "#ffcb6b", + "fontStyle": "bold" + } + }, + { + "name": "Markup Quote + others", + "scope": "markup.quote", + "settings": { + "foreground": "#697098", + "fontStyle": "italic" + } + }, + { + "name": "Markup Raw Code + others", + "scope": "markup.inline.raw", + "settings": { + "foreground": "#80CBC4" + } + }, + { + "name": "Markup Links", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#ff869a" + } + }, + { + "name": "Markup Attributes", + "scope": ["markup.meta.attribute-list"], + "settings": { + "foreground": "#a9c77d" + } + }, + { + "name": "Markup Admonitions", + "scope": "markup.admonition", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list.bullet", + "settings": { + "foreground": "#D9F5DD" + } + }, + { + "name": "Markup Superscript and Subscript", + "scope": ["markup.superscript", "markup.subscript"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Markdown Link Title and Description", + "scope": [ + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Markdown Punctuation", + "scope": [ + "punctuation.definition.string.markdown", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "meta.link.inline.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Markdown MetaData Punctuation", + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#82b1ff" + } + }, + { + "name": "Asciidoc Function", + "scope": "entity.name.function.asciidoc", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "PHP Variables", + "scope": "variable.other.php", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Support Classes in PHP", + "scope": "support.class.php", + "settings": { + "foreground": "#ffcb8b" + } + }, + { + "name": "Punctuations in PHP function calls", + "scope": "meta.function-call.php punctuation", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "PHP Global Variables", + "scope": "variable.other.global.php", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Declaration Punctuation in PHP Global Variables", + "scope": "variable.other.global.php punctuation.definition.variable", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Language Constants in Python", + "scope": "constant.language.python", + "settings": { + "foreground": "#ff5874" + } + }, + { + "name": "Python Function Parameter and Arguments", + "scope": [ + "variable.parameter.function.python", + "meta.function-call.arguments.python" + ], + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "Python Function Call", + "scope": [ + "meta.function-call.python", + "meta.function-call.generic.python" + ], + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "Punctuations in Python", + "scope": "punctuation.python", + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "Decorator Functions in Python", + "scope": "entity.name.function.decorator.python", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "Python Language Variable", + "scope": "source.python variable.language.special", + "settings": { + "foreground": "#8EACE3" + } + }, + { + "name": "SCSS Variable", + "scope": [ + "variable.scss", + "variable.sass", + "variable.parameter.url.scss", + "variable.parameter.url.sass" + ], + "settings": { + "foreground": "#DDDDDD" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Variables in SASS At-Rules", + "scope": [ + "source.css.scss meta.at-rule variable", + "source.css.sass meta.at-rule variable" + ], + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "Attribute Name for SASS", + "scope": [ + "meta.attribute-selector.scss entity.other.attribute-name.attribute", + "meta.attribute-selector.sass entity.other.attribute-name.attribute" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Tag names in SASS", + "scope": ["entity.name.tag.scss", "entity.name.tag.sass"], + "settings": { + "foreground": "#ff5572" + } + }, + { + "name": "TypeScript[React] Variables and Object Properties", + "scope": [ + "variable.other.readwrite.alias.ts", + "variable.other.readwrite.alias.tsx", + "variable.other.readwrite.ts", + "variable.other.readwrite.tsx", + "variable.other.object.ts", + "variable.other.object.tsx", + "variable.object.property.ts", + "variable.object.property.tsx", + "variable.other.ts", + "variable.other.tsx", + "variable.tsx", + "variable.ts" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Entity Name Types", + "scope": ["entity.name.type.ts", "entity.name.type.tsx"], + "settings": { + "foreground": "#78ccf0" + } + }, + { + "name": "TypeScript[React] Node Classes", + "scope": ["support.class.node.ts", "support.class.node.tsx"], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Entity Name Types as Parameters", + "scope": [ + "meta.type.parameters.ts entity.name.type", + "meta.type.parameters.tsx entity.name.type" + ], + "settings": { + "foreground": "#eeffff" + } + }, + { + "name": "TypeScript[React] Import/Export Punctuations", + "scope": [ + "meta.import.ts punctuation.definition.block", + "meta.import.tsx punctuation.definition.block", + "meta.export.ts punctuation.definition.block", + "meta.export.tsx punctuation.definition.block" + ], + "settings": { + "foreground": "#bfc7d5" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": [ + "meta.decorator punctuation.decorator.ts", + "meta.decorator punctuation.decorator.tsx" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "TypeScript[React] Punctuation Decorators", + "scope": "meta.tag.js meta.jsx.children.tsx", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "YAML Entity Name Tags", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars variables", + "scope": "variable.parameter.handlebars", + "settings": { + "foreground": "#bec5d4" + } + }, + { + "name": "handlebars parameters", + "scope": "entity.other.attribute-name.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#ffcb6b" + } + }, + { + "name": "handlebars enitity attribute names", + "scope": "entity.other.attribute-name.handlebars", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "handlebars enitity attribute values", + "scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars", + "settings": { + "foreground": "#7986E7" + } + }, + { + "name": "normalize font style of certain components", + "scope": [ + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.begin.js", + "meta.tag.js meta.embedded.expression.js punctuation.section.embedded.end.js", + "meta.property-list.css meta.property-value.css variable.other.less", + "punctuation.section.embedded.begin.js.jsx", + "punctuation.section.embedded.end.js.jsx", + "meta.property-list.scss variable.scss", + "meta.property-list.sass variable.sass", + "keyword.operator.logical", + "keyword.operator.arithmetic", + "keyword.operator.bitwise", + "keyword.operator.increment", + "keyword.operator.ternary", + "keyword.operator.comparison", + "keyword.operator.assignment", + "keyword.operator.operator", + "keyword.operator.or.regexp", + "keyword.operator.expression.in", + "keyword.operator.type", + "punctuation.section.embedded.js", + "punctuation.definintion.string", + "punctuation" + ], + "settings": { + "fontStyle": "normal" + } + } + ] +} diff --git a/assets/themes/src/vscode/rose-pine/LICENSE b/assets/themes/src/vscode/rose-pine/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..158292b8df2daace3c0def82ef3331bbf0df387c --- /dev/null +++ b/assets/themes/src/vscode/rose-pine/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Rosé Pine + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vscode/rose-pine/family.json b/assets/themes/src/vscode/rose-pine/family.json new file mode 100644 index 0000000000000000000000000000000000000000..5b72edd300fe585f6c92121813c0baf61a5778e8 --- /dev/null +++ b/assets/themes/src/vscode/rose-pine/family.json @@ -0,0 +1,21 @@ +{ + "name": "Rose Pine", + "author": "Rosé Pine", + "themes": [ + { + "name": "Rose Pine", + "file_name": "rose-pine.json", + "appearance": "dark" + }, + { + "name": "Rose Moon", + "file_name": "rose-pine-moon.json", + "appearance": "dark" + }, + { + "name": "Rose Pine Dawn", + "file_name": "rose-pine-dawn.json", + "appearance": "light" + } + ] +} diff --git a/assets/themes/src/vscode/rose-pine/rose-pine-dawn.json b/assets/themes/src/vscode/rose-pine/rose-pine-dawn.json new file mode 100644 index 0000000000000000000000000000000000000000..39cc251fe95a2828237f4154663ed610880f26a5 --- /dev/null +++ b/assets/themes/src/vscode/rose-pine/rose-pine-dawn.json @@ -0,0 +1,680 @@ +{ + "name": "Rosé Pine Dawn", + "type": "light", + "colors": { + "activityBar.activeBorder": "#575279", + "activityBar.background": "#faf4ed", + "activityBar.dropBorder": "#f2e9e1", + "activityBar.foreground": "#575279", + "activityBar.inactiveForeground": "#797593", + "activityBarBadge.background": "#d7827e", + "activityBarBadge.foreground": "#faf4ed", + "badge.background": "#d7827e", + "badge.foreground": "#faf4ed", + "banner.background": "#fffaf3", + "banner.foreground": "#575279", + "banner.iconForeground": "#797593", + "breadcrumb.activeSelectionForeground": "#d7827e", + "breadcrumb.background": "#faf4ed", + "breadcrumb.focusForeground": "#797593", + "breadcrumb.foreground": "#9893a5", + "breadcrumbPicker.background": "#fffaf3", + "button.background": "#d7827e", + "button.foreground": "#faf4ed", + "button.hoverBackground": "#d7827ee6", + "button.secondaryBackground": "#fffaf3", + "button.secondaryForeground": "#575279", + "button.secondaryHoverBackground": "#f2e9e1", + "charts.blue": "#56949f", + "charts.foreground": "#575279", + "charts.green": "#286983", + "charts.lines": "#797593", + "charts.orange": "#d7827e", + "charts.purple": "#907aa9", + "charts.red": "#b4637a", + "charts.yellow": "#ea9d34", + "checkbox.background": "#fffaf3", + "checkbox.border": "#6e6a8614", + "checkbox.foreground": "#575279", + "debugExceptionWidget.background": "#fffaf3", + "debugExceptionWidget.border": "#6e6a8614", + "debugIcon.breakpointCurrentStackframeForeground": "#797593", + "debugIcon.breakpointDisabledForeground": "#797593", + "debugIcon.breakpointForeground": "#797593", + "debugIcon.breakpointStackframeForeground": "#797593", + "debugIcon.breakpointUnverifiedForeground": "#797593", + "debugIcon.continueForeground": "#797593", + "debugIcon.disconnectForeground": "#797593", + "debugIcon.pauseForeground": "#797593", + "debugIcon.restartForeground": "#797593", + "debugIcon.startForeground": "#797593", + "debugIcon.stepBackForeground": "#797593", + "debugIcon.stepIntoForeground": "#797593", + "debugIcon.stepOutForeground": "#797593", + "debugIcon.stepOverForeground": "#797593", + "debugIcon.stopForeground": "#b4637a", + "debugToolBar.background": "#fffaf3", + "debugToolBar.border": "#f2e9e1", + "descriptionForeground": "#797593", + "diffEditor.border": "#f2e9e1", + "diffEditor.diagonalFill": "#6e6a8626", + "diffEditor.insertedLineBackground": "#56949f26", + "diffEditor.insertedTextBackground": "#56949f26", + "diffEditor.removedLineBackground": "#b4637a26", + "diffEditor.removedTextBackground": "#b4637a26", + "diffEditorOverview.insertedForeground": "#56949f80", + "diffEditorOverview.removedForeground": "#b4637a80", + "dropdown.background": "#fffaf3", + "dropdown.border": "#6e6a8614", + "dropdown.foreground": "#575279", + "dropdown.listBackground": "#fffaf3", + "editor.background": "#faf4ed", + "editor.findMatchBackground": "#6e6a8626", + "editor.findMatchHighlightBackground": "#6e6a8626", + "editor.findRangeHighlightBackground": "#6e6a8626", + "editor.findRangeHighlightBorder": "#000000", + "editor.focusedStackFrameHighlightBackground": "#6e6a8614", + "editor.foldBackground": "#fffaf3", + "editor.foreground": "#575279", + "editor.hoverHighlightBackground": "#000000", + "editor.inactiveSelectionBackground": "#6e6a860d", + "editor.inlineValuesBackground": "#000000", + "editor.inlineValuesForeground": "#797593", + "editor.lineHighlightBackground": "#6e6a860d", + "editor.lineHighlightBorder": "#000000", + "editor.linkedEditingBackground": "#fffaf3", + "editor.rangeHighlightBackground": "#6e6a860d", + "editor.selectionBackground": "#6e6a8614", + "editor.selectionForeground": "#575279", + "editor.selectionHighlightBackground": "#6e6a8614", + "editor.selectionHighlightBorder": "#faf4ed", + "editor.snippetFinalTabstopHighlightBackground": "#6e6a8614", + "editor.snippetFinalTabstopHighlightBorder": "#fffaf3", + "editor.snippetTabstopHighlightBackground": "#6e6a8614", + "editor.snippetTabstopHighlightBorder": "#fffaf3", + "editor.stackFrameHighlightBackground": "#6e6a8614", + "editor.symbolHighlightBackground": "#6e6a8614", + "editor.symbolHighlightBorder": "#000000", + "editor.wordHighlightBackground": "#6e6a8614", + "editor.wordHighlightBorder": "#000000", + "editor.wordHighlightStrongBackground": "#6e6a8614", + "editor.wordHighlightStrongBorder": "#6e6a8614", + "editorBracketHighlight.foreground1": "#b4637a80", + "editorBracketHighlight.foreground2": "#28698380", + "editorBracketHighlight.foreground3": "#ea9d3480", + "editorBracketHighlight.foreground4": "#56949f80", + "editorBracketHighlight.foreground5": "#d7827e80", + "editorBracketHighlight.foreground6": "#907aa980", + "editorBracketMatch.background": "#000000", + "editorBracketMatch.border": "#797593", + "editorBracketPairGuide.activeBackground1": "#286983", + "editorBracketPairGuide.activeBackground2": "#d7827e", + "editorBracketPairGuide.activeBackground3": "#907aa9", + "editorBracketPairGuide.activeBackground4": "#56949f", + "editorBracketPairGuide.activeBackground5": "#ea9d34", + "editorBracketPairGuide.activeBackground6": "#b4637a", + "editorBracketPairGuide.background1": "#28698380", + "editorBracketPairGuide.background2": "#d7827e80", + "editorBracketPairGuide.background3": "#907aa980", + "editorBracketPairGuide.background4": "#56949f80", + "editorBracketPairGuide.background5": "#ea9d3480", + "editorBracketPairGuide.background6": "#b4637a80", + "editorCodeLens.foreground": "#d7827e", + "editorCursor.background": "#575279", + "editorCursor.foreground": "#9893a5", + "editorError.border": "#000000", + "editorError.foreground": "#b4637a", + "editorGhostText.foreground": "#797593", + "editorGroup.border": "#000000", + "editorGroup.dropBackground": "#fffaf3", + "editorGroup.emptyBackground": "#000000", + "editorGroup.focusedEmptyBorder": "#000000", + "editorGroupHeader.noTabsBackground": "#000000", + "editorGroupHeader.tabsBackground": "#000000", + "editorGroupHeader.tabsBorder": "#000000", + "editorGutter.addedBackground": "#56949f", + "editorGutter.background": "#faf4ed", + "editorGutter.commentRangeForeground": "#797593", + "editorGutter.deletedBackground": "#b4637a", + "editorGutter.foldingControlForeground": "#907aa9", + "editorGutter.modifiedBackground": "#d7827e", + "editorHint.border": "#000000", + "editorHint.foreground": "#797593", + "editorHoverWidget.background": "#fffaf3", + "editorHoverWidget.border": "#9893a580", + "editorHoverWidget.foreground": "#797593", + "editorHoverWidget.highlightForeground": "#575279", + "editorHoverWidget.statusBarBackground": "#000000", + "editorIndentGuide.activeBackground": "#9893a5", + "editorIndentGuide.background": "#6e6a8626", + "editorInfo.border": "#f2e9e1", + "editorInfo.foreground": "#56949f", + "editorInlayHint.background": "#f2e9e1", + "editorInlayHint.foreground": "#797593", + "editorInlayHint.parameterBackground": "#f2e9e1", + "editorInlayHint.parameterForeground": "#907aa9", + "editorInlayHint.typeBackground": "#f2e9e1", + "editorInlayHint.typeForeground": "#56949f", + "editorLightBulb.foreground": "#286983", + "editorLightBulbAutoFix.foreground": "#d7827e", + "editorLineNumber.activeForeground": "#575279", + "editorLineNumber.foreground": "#797593", + "editorLink.activeForeground": "#d7827e", + "editorMarkerNavigation.background": "#fffaf3", + "editorMarkerNavigationError.background": "#fffaf3", + "editorMarkerNavigationInfo.background": "#fffaf3", + "editorMarkerNavigationWarning.background": "#fffaf3", + "editorOverviewRuler.addedForeground": "#56949f80", + "editorOverviewRuler.background": "#faf4ed", + "editorOverviewRuler.border": "#6e6a8626", + "editorOverviewRuler.bracketMatchForeground": "#797593", + "editorOverviewRuler.commonContentForeground": "#6e6a860d", + "editorOverviewRuler.currentContentForeground": "#6e6a8614", + "editorOverviewRuler.deletedForeground": "#b4637a80", + "editorOverviewRuler.errorForeground": "#b4637a80", + "editorOverviewRuler.findMatchForeground": "#6e6a8626", + "editorOverviewRuler.incomingContentForeground": "#907aa980", + "editorOverviewRuler.infoForeground": "#56949f80", + "editorOverviewRuler.modifiedForeground": "#d7827e80", + "editorOverviewRuler.rangeHighlightForeground": "#6e6a8626", + "editorOverviewRuler.selectionHighlightForeground": "#6e6a8626", + "editorOverviewRuler.warningForeground": "#ea9d3480", + "editorOverviewRuler.wordHighlightForeground": "#6e6a8614", + "editorOverviewRuler.wordHighlightStrongForeground": "#6e6a8626", + "editorPane.background": "#000000", + "editorRuler.foreground": "#6e6a8626", + "editorSuggestWidget.background": "#fffaf3", + "editorSuggestWidget.border": "#000000", + "editorSuggestWidget.focusHighlightForeground": "#d7827e", + "editorSuggestWidget.foreground": "#797593", + "editorSuggestWidget.highlightForeground": "#d7827e", + "editorSuggestWidget.selectedBackground": "#6e6a8614", + "editorSuggestWidget.selectedForeground": "#575279", + "editorSuggestWidget.selectedIconForeground": "#575279", + "editorUnnecessaryCode.border": "#000000", + "editorUnnecessaryCode.opacity": "#57527980", + "editorWarning.border": "#000000", + "editorWarning.foreground": "#ea9d34", + "editorWhitespace.foreground": "#9893a5", + "editorWidget.background": "#fffaf3", + "editorWidget.border": "#f2e9e1", + "editorWidget.foreground": "#797593", + "editorWidget.resizeBorder": "#9893a5", + "errorForeground": "#b4637a", + "extensionBadge.remoteBackground": "#907aa9", + "extensionBadge.remoteForeground": "#faf4ed", + "extensionButton.prominentBackground": "#d7827e", + "extensionButton.prominentForeground": "#faf4ed", + "extensionButton.prominentHoverBackground": "#d7827ee6", + "extensionIcon.preReleaseForeground": "#286983", + "extensionIcon.starForeground": "#d7827e", + "extensionIcon.verifiedForeground": "#907aa9", + "focusBorder": "#6e6a8614", + "foreground": "#575279", + "gitDecoration.addedResourceForeground": "#56949f", + "gitDecoration.conflictingResourceForeground": "#b4637a", + "gitDecoration.deletedResourceForeground": "#797593", + "gitDecoration.ignoredResourceForeground": "#9893a5", + "gitDecoration.modifiedResourceForeground": "#d7827e", + "gitDecoration.renamedResourceForeground": "#286983", + "gitDecoration.stageDeletedResourceForeground": "#b4637a", + "gitDecoration.stageModifiedResourceForeground": "#907aa9", + "gitDecoration.submoduleResourceForeground": "#ea9d34", + "gitDecoration.untrackedResourceForeground": "#ea9d34", + "icon.foreground": "#797593", + "input.background": "#f2e9e180", + "input.border": "#6e6a8614", + "input.foreground": "#575279", + "input.placeholderForeground": "#797593", + "inputOption.activeBackground": "#d7827e26", + "inputOption.activeForeground": "#d7827e", + "inputValidation.errorBackground": "#fffaf3", + "inputValidation.errorBorder": "#6e6a8626", + "inputValidation.errorForeground": "#b4637a", + "inputValidation.infoBackground": "#fffaf3", + "inputValidation.infoBorder": "#6e6a8626", + "inputValidation.infoForeground": "#56949f", + "inputValidation.warningBackground": "#fffaf3", + "inputValidation.warningBorder": "#6e6a8626", + "inputValidation.warningForeground": "#56949f80", + "keybindingLabel.background": "#f2e9e1", + "keybindingLabel.border": "#6e6a8626", + "keybindingLabel.bottomBorder": "#6e6a8626", + "keybindingLabel.foreground": "#907aa9", + "keybindingTable.headerBackground": "#f2e9e1", + "keybindingTable.rowsBackground": "#fffaf3", + "list.activeSelectionBackground": "#6e6a8614", + "list.activeSelectionForeground": "#575279", + "list.deemphasizedForeground": "#797593", + "list.dropBackground": "#fffaf3", + "list.errorForeground": "#b4637a", + "list.filterMatchBackground": "#fffaf3", + "list.filterMatchBorder": "#d7827e", + "list.focusBackground": "#6e6a8626", + "list.focusForeground": "#575279", + "list.focusOutline": "#6e6a8614", + "list.highlightForeground": "#d7827e", + "list.hoverBackground": "#6e6a860d", + "list.hoverForeground": "#575279", + "list.inactiveFocusBackground": "#6e6a860d", + "list.inactiveSelectionBackground": "#fffaf3", + "list.inactiveSelectionForeground": "#575279", + "list.invalidItemForeground": "#b4637a", + "list.warningForeground": "#ea9d34", + "listFilterWidget.background": "#fffaf3", + "listFilterWidget.noMatchesOutline": "#b4637a", + "listFilterWidget.outline": "#f2e9e1", + "menu.background": "#fffaf3", + "menu.border": "#6e6a860d", + "menu.foreground": "#575279", + "menu.selectionBackground": "#6e6a8614", + "menu.selectionBorder": "#f2e9e1", + "menu.selectionForeground": "#575279", + "menu.separatorBackground": "#6e6a8626", + "menubar.selectionBackground": "#6e6a8614", + "menubar.selectionBorder": "#6e6a860d", + "menubar.selectionForeground": "#575279", + "merge.border": "#f2e9e1", + "merge.commonContentBackground": "#6e6a8614", + "merge.commonHeaderBackground": "#6e6a8614", + "merge.currentContentBackground": "#ea9d3480", + "merge.currentHeaderBackground": "#ea9d3480", + "merge.incomingContentBackground": "#56949f80", + "merge.incomingHeaderBackground": "#56949f80", + "minimap.background": "#fffaf3", + "minimap.errorHighlight": "#b4637a80", + "minimap.findMatchHighlight": "#6e6a8614", + "minimap.selectionHighlight": "#6e6a8614", + "minimap.warningHighlight": "#ea9d3480", + "minimapGutter.addedBackground": "#56949f", + "minimapGutter.deletedBackground": "#b4637a", + "minimapGutter.modifiedBackground": "#d7827e", + "minimapSlider.activeBackground": "#6e6a8626", + "minimapSlider.background": "#6e6a8614", + "minimapSlider.hoverBackground": "#6e6a8614", + "notebook.cellBorderColor": "#56949f80", + "notebook.cellEditorBackground": "#fffaf3", + "notebook.cellHoverBackground": "#f2e9e180", + "notebook.focusedCellBackground": "#6e6a860d", + "notebook.focusedCellBorder": "#56949f", + "notebook.outputContainerBackgroundColor": "#6e6a860d", + "notificationCenter.border": "#6e6a8614", + "notificationCenterHeader.background": "#fffaf3", + "notificationCenterHeader.foreground": "#797593", + "notificationLink.foreground": "#907aa9", + "notifications.background": "#fffaf3", + "notifications.border": "#6e6a8614", + "notifications.foreground": "#575279", + "notificationsErrorIcon.foreground": "#b4637a", + "notificationsInfoIcon.foreground": "#56949f", + "notificationsWarningIcon.foreground": "#ea9d34", + "notificationToast.border": "#6e6a8614", + "panel.background": "#fffaf3", + "panel.border": "#000000", + "panel.dropBorder": "#f2e9e1", + "panelInput.border": "#fffaf3", + "panelSection.dropBackground": "#6e6a8614", + "panelSectionHeader.background": "#fffaf3", + "panelSectionHeader.foreground": "#575279", + "panelTitle.activeBorder": "#6e6a8626", + "panelTitle.activeForeground": "#575279", + "panelTitle.inactiveForeground": "#797593", + "peekView.border": "#f2e9e1", + "peekViewEditor.background": "#fffaf3", + "peekViewEditor.matchHighlightBackground": "#6e6a8626", + "peekViewResult.background": "#fffaf3", + "peekViewResult.fileForeground": "#797593", + "peekViewResult.lineForeground": "#797593", + "peekViewResult.matchHighlightBackground": "#6e6a8626", + "peekViewResult.selectionBackground": "#6e6a8614", + "peekViewResult.selectionForeground": "#575279", + "peekViewTitle.background": "#f2e9e1", + "peekViewTitleDescription.foreground": "#797593", + "pickerGroup.border": "#6e6a8626", + "pickerGroup.foreground": "#907aa9", + "ports.iconRunningProcessForeground": "#d7827e", + "problemsErrorIcon.foreground": "#b4637a", + "problemsInfoIcon.foreground": "#56949f", + "problemsWarningIcon.foreground": "#ea9d34", + "progressBar.background": "#d7827e", + "quickInput.background": "#fffaf3", + "quickInput.foreground": "#797593", + "quickInputList.focusBackground": "#6e6a8614", + "quickInputList.focusForeground": "#575279", + "quickInputList.focusIconForeground": "#575279", + "scrollbar.shadow": "#fffaf34d", + "scrollbarSlider.activeBackground": "#28698380", + "scrollbarSlider.background": "#6e6a8614", + "scrollbarSlider.hoverBackground": "#6e6a8626", + "searchEditor.findMatchBackground": "#6e6a8614", + "selection.background": "#6e6a8626", + "settings.focusedRowBackground": "#fffaf3", + "settings.headerForeground": "#575279", + "settings.modifiedItemIndicator": "#d7827e", + "settings.focusedRowBorder": "#6e6a8614", + "settings.rowHoverBackground": "#fffaf3", + "sideBar.background": "#faf4ed", + "sideBar.dropBackground": "#fffaf3", + "sideBar.foreground": "#797593", + "sideBarSectionHeader.background": "#000000", + "sideBarSectionHeader.border": "#6e6a8614", + "statusBar.background": "#faf4ed", + "statusBar.debuggingBackground": "#907aa9", + "statusBar.debuggingForeground": "#faf4ed", + "statusBar.foreground": "#797593", + "statusBar.noFolderBackground": "#faf4ed", + "statusBar.noFolderForeground": "#797593", + "statusBarItem.activeBackground": "#6e6a8626", + "statusBarItem.hoverBackground": "#6e6a8614", + "statusBarItem.prominentBackground": "#f2e9e1", + "statusBarItem.prominentForeground": "#575279", + "statusBarItem.prominentHoverBackground": "#6e6a8614", + "statusBarItem.remoteBackground": "#faf4ed", + "statusBarItem.remoteForeground": "#ea9d34", + "statusBarItem.errorBackground": "#faf4ed", + "statusBarItem.errorForeground": "#b4637a", + "symbolIcon.arrayForeground": "#797593", + "symbolIcon.classForeground": "#797593", + "symbolIcon.colorForeground": "#797593", + "symbolIcon.constantForeground": "#797593", + "symbolIcon.constructorForeground": "#797593", + "symbolIcon.enumeratorForeground": "#797593", + "symbolIcon.enumeratorMemberForeground": "#797593", + "symbolIcon.eventForeground": "#797593", + "symbolIcon.fieldForeground": "#797593", + "symbolIcon.fileForeground": "#797593", + "symbolIcon.folderForeground": "#797593", + "symbolIcon.functionForeground": "#797593", + "symbolIcon.interfaceForeground": "#797593", + "symbolIcon.keyForeground": "#797593", + "symbolIcon.keywordForeground": "#797593", + "symbolIcon.methodForeground": "#797593", + "symbolIcon.moduleForeground": "#797593", + "symbolIcon.namespaceForeground": "#797593", + "symbolIcon.nullForeground": "#797593", + "symbolIcon.numberForeground": "#797593", + "symbolIcon.objectForeground": "#797593", + "symbolIcon.operatorForeground": "#797593", + "symbolIcon.packageForeground": "#797593", + "symbolIcon.propertyForeground": "#797593", + "symbolIcon.referenceForeground": "#797593", + "symbolIcon.snippetForeground": "#797593", + "symbolIcon.stringForeground": "#797593", + "symbolIcon.structForeground": "#797593", + "symbolIcon.textForeground": "#797593", + "symbolIcon.typeParameterForeground": "#797593", + "symbolIcon.unitForeground": "#797593", + "symbolIcon.variableForeground": "#797593", + "tab.activeBackground": "#6e6a860d", + "tab.activeForeground": "#575279", + "tab.activeModifiedBorder": "#56949f", + "tab.border": "#000000", + "tab.hoverBackground": "#6e6a8614", + "tab.inactiveBackground": "#000000", + "tab.inactiveForeground": "#797593", + "tab.inactiveModifiedBorder": "#56949f80", + "tab.lastPinnedBorder": "#9893a5", + "tab.unfocusedActiveBackground": "#000000", + "tab.unfocusedHoverBackground": "#000000", + "tab.unfocusedInactiveBackground": "#000000", + "tab.unfocusedInactiveModifiedBorder": "#56949f80", + "terminal.ansiBlack": "#f2e9e1", + "terminal.ansiBlue": "#56949f", + "terminal.ansiBrightBlack": "#797593", + "terminal.ansiBrightBlue": "#56949f", + "terminal.ansiBrightCyan": "#d7827e", + "terminal.ansiBrightGreen": "#286983", + "terminal.ansiBrightMagenta": "#907aa9", + "terminal.ansiBrightRed": "#b4637a", + "terminal.ansiBrightWhite": "#575279", + "terminal.ansiBrightYellow": "#ea9d34", + "terminal.ansiCyan": "#d7827e", + "terminal.ansiGreen": "#286983", + "terminal.ansiMagenta": "#907aa9", + "terminal.ansiRed": "#b4637a", + "terminal.ansiWhite": "#575279", + "terminal.ansiYellow": "#ea9d34", + "terminal.dropBackground": "#6e6a8614", + "terminal.foreground": "#575279", + "terminal.selectionBackground": "#6e6a8614", + "terminal.tab.activeBorder": "#575279", + "terminalCursor.background": "#575279", + "terminalCursor.foreground": "#9893a5", + "textBlockQuote.background": "#fffaf3", + "textBlockQuote.border": "#6e6a8614", + "textCodeBlock.background": "#fffaf3", + "textLink.activeForeground": "#907aa9e6", + "textLink.foreground": "#907aa9", + "textPreformat.foreground": "#ea9d34", + "textSeparator.foreground": "#797593", + "titleBar.activeBackground": "#faf4ed", + "titleBar.activeForeground": "#797593", + "titleBar.inactiveBackground": "#fffaf3", + "titleBar.inactiveForeground": "#797593", + "toolbar.activeBackground": "#6e6a8626", + "toolbar.hoverBackground": "#6e6a8614", + "tree.indentGuidesStroke": "#797593", + "walkThrough.embeddedEditorBackground": "#faf4ed", + "welcomePage.background": "#faf4ed", + "welcomePage.buttonBackground": "#fffaf3", + "welcomePage.buttonHoverBackground": "#f2e9e1", + "widget.shadow": "#fffaf34d", + "window.activeBorder": "#fffaf3", + "window.inactiveBorder": "#fffaf3" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#9893a5", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#d7827e" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#d7827e" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#907aa9", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#b4637a" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#b4637a" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#907aa9" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#575279" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#907aa9", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#9893a5" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#b4637a", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#d7827e", + "fontStyle": "italic" + } + }, + { + "scope": [ + "variable.other", + "variable.language", + "variable.function", + "variable.argument" + ], + "settings": { + "foreground": "#575279" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#907aa9" + } + } + ] +} diff --git a/assets/themes/src/vscode/rose-pine/rose-pine-moon.json b/assets/themes/src/vscode/rose-pine/rose-pine-moon.json new file mode 100644 index 0000000000000000000000000000000000000000..dbbb757335f26eea1acb0ea7e7cfc4bfd3d9dc6a --- /dev/null +++ b/assets/themes/src/vscode/rose-pine/rose-pine-moon.json @@ -0,0 +1,680 @@ +{ + "name": "Rosé Pine Moon", + "type": "dark", + "colors": { + "activityBar.activeBorder": "#e0def4", + "activityBar.background": "#232136", + "activityBar.dropBorder": "#393552", + "activityBar.foreground": "#e0def4", + "activityBar.inactiveForeground": "#908caa", + "activityBarBadge.background": "#ea9a97", + "activityBarBadge.foreground": "#232136", + "badge.background": "#ea9a97", + "badge.foreground": "#232136", + "banner.background": "#2a273f", + "banner.foreground": "#e0def4", + "banner.iconForeground": "#908caa", + "breadcrumb.activeSelectionForeground": "#ea9a97", + "breadcrumb.background": "#232136", + "breadcrumb.focusForeground": "#908caa", + "breadcrumb.foreground": "#6e6a86", + "breadcrumbPicker.background": "#2a273f", + "button.background": "#ea9a97", + "button.foreground": "#232136", + "button.hoverBackground": "#ea9a97e6", + "button.secondaryBackground": "#2a273f", + "button.secondaryForeground": "#e0def4", + "button.secondaryHoverBackground": "#393552", + "charts.blue": "#9ccfd8", + "charts.foreground": "#e0def4", + "charts.green": "#3e8fb0", + "charts.lines": "#908caa", + "charts.orange": "#ea9a97", + "charts.purple": "#c4a7e7", + "charts.red": "#eb6f92", + "charts.yellow": "#f6c177", + "checkbox.background": "#2a273f", + "checkbox.border": "#817c9c26", + "checkbox.foreground": "#e0def4", + "debugExceptionWidget.background": "#2a273f", + "debugExceptionWidget.border": "#817c9c26", + "debugIcon.breakpointCurrentStackframeForeground": "#908caa", + "debugIcon.breakpointDisabledForeground": "#908caa", + "debugIcon.breakpointForeground": "#908caa", + "debugIcon.breakpointStackframeForeground": "#908caa", + "debugIcon.breakpointUnverifiedForeground": "#908caa", + "debugIcon.continueForeground": "#908caa", + "debugIcon.disconnectForeground": "#908caa", + "debugIcon.pauseForeground": "#908caa", + "debugIcon.restartForeground": "#908caa", + "debugIcon.startForeground": "#908caa", + "debugIcon.stepBackForeground": "#908caa", + "debugIcon.stepIntoForeground": "#908caa", + "debugIcon.stepOutForeground": "#908caa", + "debugIcon.stepOverForeground": "#908caa", + "debugIcon.stopForeground": "#eb6f92", + "debugToolBar.background": "#2a273f", + "debugToolBar.border": "#393552", + "descriptionForeground": "#908caa", + "diffEditor.border": "#393552", + "diffEditor.diagonalFill": "#817c9c4d", + "diffEditor.insertedLineBackground": "#9ccfd826", + "diffEditor.insertedTextBackground": "#9ccfd826", + "diffEditor.removedLineBackground": "#eb6f9226", + "diffEditor.removedTextBackground": "#eb6f9226", + "diffEditorOverview.insertedForeground": "#9ccfd880", + "diffEditorOverview.removedForeground": "#eb6f9280", + "dropdown.background": "#2a273f", + "dropdown.border": "#817c9c26", + "dropdown.foreground": "#e0def4", + "dropdown.listBackground": "#2a273f", + "editor.background": "#232136", + "editor.findMatchBackground": "#817c9c4d", + "editor.findMatchHighlightBackground": "#817c9c4d", + "editor.findRangeHighlightBackground": "#817c9c4d", + "editor.findRangeHighlightBorder": "#000000", + "editor.focusedStackFrameHighlightBackground": "#817c9c26", + "editor.foldBackground": "#2a273f", + "editor.foreground": "#e0def4", + "editor.hoverHighlightBackground": "#000000", + "editor.inactiveSelectionBackground": "#817c9c14", + "editor.inlineValuesBackground": "#000000", + "editor.inlineValuesForeground": "#908caa", + "editor.lineHighlightBackground": "#817c9c14", + "editor.lineHighlightBorder": "#000000", + "editor.linkedEditingBackground": "#2a273f", + "editor.rangeHighlightBackground": "#817c9c14", + "editor.selectionBackground": "#817c9c26", + "editor.selectionForeground": "#e0def4", + "editor.selectionHighlightBackground": "#817c9c26", + "editor.selectionHighlightBorder": "#232136", + "editor.snippetFinalTabstopHighlightBackground": "#817c9c26", + "editor.snippetFinalTabstopHighlightBorder": "#2a273f", + "editor.snippetTabstopHighlightBackground": "#817c9c26", + "editor.snippetTabstopHighlightBorder": "#2a273f", + "editor.stackFrameHighlightBackground": "#817c9c26", + "editor.symbolHighlightBackground": "#817c9c26", + "editor.symbolHighlightBorder": "#000000", + "editor.wordHighlightBackground": "#817c9c26", + "editor.wordHighlightBorder": "#000000", + "editor.wordHighlightStrongBackground": "#817c9c26", + "editor.wordHighlightStrongBorder": "#817c9c26", + "editorBracketHighlight.foreground1": "#eb6f9280", + "editorBracketHighlight.foreground2": "#3e8fb080", + "editorBracketHighlight.foreground3": "#f6c17780", + "editorBracketHighlight.foreground4": "#9ccfd880", + "editorBracketHighlight.foreground5": "#ea9a9780", + "editorBracketHighlight.foreground6": "#c4a7e780", + "editorBracketMatch.background": "#000000", + "editorBracketMatch.border": "#908caa", + "editorBracketPairGuide.activeBackground1": "#3e8fb0", + "editorBracketPairGuide.activeBackground2": "#ea9a97", + "editorBracketPairGuide.activeBackground3": "#c4a7e7", + "editorBracketPairGuide.activeBackground4": "#9ccfd8", + "editorBracketPairGuide.activeBackground5": "#f6c177", + "editorBracketPairGuide.activeBackground6": "#eb6f92", + "editorBracketPairGuide.background1": "#3e8fb080", + "editorBracketPairGuide.background2": "#ea9a9780", + "editorBracketPairGuide.background3": "#c4a7e780", + "editorBracketPairGuide.background4": "#9ccfd880", + "editorBracketPairGuide.background5": "#f6c17780", + "editorBracketPairGuide.background6": "#eb6f9280", + "editorCodeLens.foreground": "#ea9a97", + "editorCursor.background": "#e0def4", + "editorCursor.foreground": "#6e6a86", + "editorError.border": "#000000", + "editorError.foreground": "#eb6f92", + "editorGhostText.foreground": "#908caa", + "editorGroup.border": "#000000", + "editorGroup.dropBackground": "#2a273f", + "editorGroup.emptyBackground": "#000000", + "editorGroup.focusedEmptyBorder": "#000000", + "editorGroupHeader.noTabsBackground": "#000000", + "editorGroupHeader.tabsBackground": "#000000", + "editorGroupHeader.tabsBorder": "#000000", + "editorGutter.addedBackground": "#9ccfd8", + "editorGutter.background": "#232136", + "editorGutter.commentRangeForeground": "#908caa", + "editorGutter.deletedBackground": "#eb6f92", + "editorGutter.foldingControlForeground": "#c4a7e7", + "editorGutter.modifiedBackground": "#ea9a97", + "editorHint.border": "#000000", + "editorHint.foreground": "#908caa", + "editorHoverWidget.background": "#2a273f", + "editorHoverWidget.border": "#6e6a8680", + "editorHoverWidget.foreground": "#908caa", + "editorHoverWidget.highlightForeground": "#e0def4", + "editorHoverWidget.statusBarBackground": "#000000", + "editorIndentGuide.activeBackground": "#6e6a86", + "editorIndentGuide.background": "#817c9c4d", + "editorInfo.border": "#393552", + "editorInfo.foreground": "#9ccfd8", + "editorInlayHint.background": "#393552", + "editorInlayHint.foreground": "#908caa", + "editorInlayHint.parameterBackground": "#393552", + "editorInlayHint.parameterForeground": "#c4a7e7", + "editorInlayHint.typeBackground": "#393552", + "editorInlayHint.typeForeground": "#9ccfd8", + "editorLightBulb.foreground": "#3e8fb0", + "editorLightBulbAutoFix.foreground": "#ea9a97", + "editorLineNumber.activeForeground": "#e0def4", + "editorLineNumber.foreground": "#908caa", + "editorLink.activeForeground": "#ea9a97", + "editorMarkerNavigation.background": "#2a273f", + "editorMarkerNavigationError.background": "#2a273f", + "editorMarkerNavigationInfo.background": "#2a273f", + "editorMarkerNavigationWarning.background": "#2a273f", + "editorOverviewRuler.addedForeground": "#9ccfd880", + "editorOverviewRuler.background": "#232136", + "editorOverviewRuler.border": "#817c9c4d", + "editorOverviewRuler.bracketMatchForeground": "#908caa", + "editorOverviewRuler.commonContentForeground": "#817c9c14", + "editorOverviewRuler.currentContentForeground": "#817c9c26", + "editorOverviewRuler.deletedForeground": "#eb6f9280", + "editorOverviewRuler.errorForeground": "#eb6f9280", + "editorOverviewRuler.findMatchForeground": "#817c9c4d", + "editorOverviewRuler.incomingContentForeground": "#c4a7e780", + "editorOverviewRuler.infoForeground": "#9ccfd880", + "editorOverviewRuler.modifiedForeground": "#ea9a9780", + "editorOverviewRuler.rangeHighlightForeground": "#817c9c4d", + "editorOverviewRuler.selectionHighlightForeground": "#817c9c4d", + "editorOverviewRuler.warningForeground": "#f6c17780", + "editorOverviewRuler.wordHighlightForeground": "#817c9c26", + "editorOverviewRuler.wordHighlightStrongForeground": "#817c9c4d", + "editorPane.background": "#000000", + "editorRuler.foreground": "#817c9c4d", + "editorSuggestWidget.background": "#2a273f", + "editorSuggestWidget.border": "#000000", + "editorSuggestWidget.focusHighlightForeground": "#ea9a97", + "editorSuggestWidget.foreground": "#908caa", + "editorSuggestWidget.highlightForeground": "#ea9a97", + "editorSuggestWidget.selectedBackground": "#817c9c26", + "editorSuggestWidget.selectedForeground": "#e0def4", + "editorSuggestWidget.selectedIconForeground": "#e0def4", + "editorUnnecessaryCode.border": "#000000", + "editorUnnecessaryCode.opacity": "#e0def480", + "editorWarning.border": "#000000", + "editorWarning.foreground": "#f6c177", + "editorWhitespace.foreground": "#6e6a86", + "editorWidget.background": "#2a273f", + "editorWidget.border": "#393552", + "editorWidget.foreground": "#908caa", + "editorWidget.resizeBorder": "#6e6a86", + "errorForeground": "#eb6f92", + "extensionBadge.remoteBackground": "#c4a7e7", + "extensionBadge.remoteForeground": "#232136", + "extensionButton.prominentBackground": "#ea9a97", + "extensionButton.prominentForeground": "#232136", + "extensionButton.prominentHoverBackground": "#ea9a97e6", + "extensionIcon.preReleaseForeground": "#3e8fb0", + "extensionIcon.starForeground": "#ea9a97", + "extensionIcon.verifiedForeground": "#c4a7e7", + "focusBorder": "#817c9c26", + "foreground": "#e0def4", + "gitDecoration.addedResourceForeground": "#9ccfd8", + "gitDecoration.conflictingResourceForeground": "#eb6f92", + "gitDecoration.deletedResourceForeground": "#908caa", + "gitDecoration.ignoredResourceForeground": "#6e6a86", + "gitDecoration.modifiedResourceForeground": "#ea9a97", + "gitDecoration.renamedResourceForeground": "#3e8fb0", + "gitDecoration.stageDeletedResourceForeground": "#eb6f92", + "gitDecoration.stageModifiedResourceForeground": "#c4a7e7", + "gitDecoration.submoduleResourceForeground": "#f6c177", + "gitDecoration.untrackedResourceForeground": "#f6c177", + "icon.foreground": "#908caa", + "input.background": "#39355280", + "input.border": "#817c9c26", + "input.foreground": "#e0def4", + "input.placeholderForeground": "#908caa", + "inputOption.activeBackground": "#ea9a9726", + "inputOption.activeForeground": "#ea9a97", + "inputValidation.errorBackground": "#2a273f", + "inputValidation.errorBorder": "#817c9c4d", + "inputValidation.errorForeground": "#eb6f92", + "inputValidation.infoBackground": "#2a273f", + "inputValidation.infoBorder": "#817c9c4d", + "inputValidation.infoForeground": "#9ccfd8", + "inputValidation.warningBackground": "#2a273f", + "inputValidation.warningBorder": "#817c9c4d", + "inputValidation.warningForeground": "#9ccfd880", + "keybindingLabel.background": "#393552", + "keybindingLabel.border": "#817c9c4d", + "keybindingLabel.bottomBorder": "#817c9c4d", + "keybindingLabel.foreground": "#c4a7e7", + "keybindingTable.headerBackground": "#393552", + "keybindingTable.rowsBackground": "#2a273f", + "list.activeSelectionBackground": "#817c9c26", + "list.activeSelectionForeground": "#e0def4", + "list.deemphasizedForeground": "#908caa", + "list.dropBackground": "#2a273f", + "list.errorForeground": "#eb6f92", + "list.filterMatchBackground": "#2a273f", + "list.filterMatchBorder": "#ea9a97", + "list.focusBackground": "#817c9c4d", + "list.focusForeground": "#e0def4", + "list.focusOutline": "#817c9c26", + "list.highlightForeground": "#ea9a97", + "list.hoverBackground": "#817c9c14", + "list.hoverForeground": "#e0def4", + "list.inactiveFocusBackground": "#817c9c14", + "list.inactiveSelectionBackground": "#2a273f", + "list.inactiveSelectionForeground": "#e0def4", + "list.invalidItemForeground": "#eb6f92", + "list.warningForeground": "#f6c177", + "listFilterWidget.background": "#2a273f", + "listFilterWidget.noMatchesOutline": "#eb6f92", + "listFilterWidget.outline": "#393552", + "menu.background": "#2a273f", + "menu.border": "#817c9c14", + "menu.foreground": "#e0def4", + "menu.selectionBackground": "#817c9c26", + "menu.selectionBorder": "#393552", + "menu.selectionForeground": "#e0def4", + "menu.separatorBackground": "#817c9c4d", + "menubar.selectionBackground": "#817c9c26", + "menubar.selectionBorder": "#817c9c14", + "menubar.selectionForeground": "#e0def4", + "merge.border": "#393552", + "merge.commonContentBackground": "#817c9c26", + "merge.commonHeaderBackground": "#817c9c26", + "merge.currentContentBackground": "#f6c17780", + "merge.currentHeaderBackground": "#f6c17780", + "merge.incomingContentBackground": "#9ccfd880", + "merge.incomingHeaderBackground": "#9ccfd880", + "minimap.background": "#2a273f", + "minimap.errorHighlight": "#eb6f9280", + "minimap.findMatchHighlight": "#817c9c26", + "minimap.selectionHighlight": "#817c9c26", + "minimap.warningHighlight": "#f6c17780", + "minimapGutter.addedBackground": "#9ccfd8", + "minimapGutter.deletedBackground": "#eb6f92", + "minimapGutter.modifiedBackground": "#ea9a97", + "minimapSlider.activeBackground": "#817c9c4d", + "minimapSlider.background": "#817c9c26", + "minimapSlider.hoverBackground": "#817c9c26", + "notebook.cellBorderColor": "#9ccfd880", + "notebook.cellEditorBackground": "#2a273f", + "notebook.cellHoverBackground": "#39355280", + "notebook.focusedCellBackground": "#817c9c14", + "notebook.focusedCellBorder": "#9ccfd8", + "notebook.outputContainerBackgroundColor": "#817c9c14", + "notificationCenter.border": "#817c9c26", + "notificationCenterHeader.background": "#2a273f", + "notificationCenterHeader.foreground": "#908caa", + "notificationLink.foreground": "#c4a7e7", + "notifications.background": "#2a273f", + "notifications.border": "#817c9c26", + "notifications.foreground": "#e0def4", + "notificationsErrorIcon.foreground": "#eb6f92", + "notificationsInfoIcon.foreground": "#9ccfd8", + "notificationsWarningIcon.foreground": "#f6c177", + "notificationToast.border": "#817c9c26", + "panel.background": "#2a273f", + "panel.border": "#000000", + "panel.dropBorder": "#393552", + "panelInput.border": "#2a273f", + "panelSection.dropBackground": "#817c9c26", + "panelSectionHeader.background": "#2a273f", + "panelSectionHeader.foreground": "#e0def4", + "panelTitle.activeBorder": "#817c9c4d", + "panelTitle.activeForeground": "#e0def4", + "panelTitle.inactiveForeground": "#908caa", + "peekView.border": "#393552", + "peekViewEditor.background": "#2a273f", + "peekViewEditor.matchHighlightBackground": "#817c9c4d", + "peekViewResult.background": "#2a273f", + "peekViewResult.fileForeground": "#908caa", + "peekViewResult.lineForeground": "#908caa", + "peekViewResult.matchHighlightBackground": "#817c9c4d", + "peekViewResult.selectionBackground": "#817c9c26", + "peekViewResult.selectionForeground": "#e0def4", + "peekViewTitle.background": "#393552", + "peekViewTitleDescription.foreground": "#908caa", + "pickerGroup.border": "#817c9c4d", + "pickerGroup.foreground": "#c4a7e7", + "ports.iconRunningProcessForeground": "#ea9a97", + "problemsErrorIcon.foreground": "#eb6f92", + "problemsInfoIcon.foreground": "#9ccfd8", + "problemsWarningIcon.foreground": "#f6c177", + "progressBar.background": "#ea9a97", + "quickInput.background": "#2a273f", + "quickInput.foreground": "#908caa", + "quickInputList.focusBackground": "#817c9c26", + "quickInputList.focusForeground": "#e0def4", + "quickInputList.focusIconForeground": "#e0def4", + "scrollbar.shadow": "#2a273f4d", + "scrollbarSlider.activeBackground": "#3e8fb080", + "scrollbarSlider.background": "#817c9c26", + "scrollbarSlider.hoverBackground": "#817c9c4d", + "searchEditor.findMatchBackground": "#817c9c26", + "selection.background": "#817c9c4d", + "settings.focusedRowBackground": "#2a273f", + "settings.headerForeground": "#e0def4", + "settings.modifiedItemIndicator": "#ea9a97", + "settings.focusedRowBorder": "#817c9c26", + "settings.rowHoverBackground": "#2a273f", + "sideBar.background": "#232136", + "sideBar.dropBackground": "#2a273f", + "sideBar.foreground": "#908caa", + "sideBarSectionHeader.background": "#000000", + "sideBarSectionHeader.border": "#817c9c26", + "statusBar.background": "#232136", + "statusBar.debuggingBackground": "#c4a7e7", + "statusBar.debuggingForeground": "#232136", + "statusBar.foreground": "#908caa", + "statusBar.noFolderBackground": "#232136", + "statusBar.noFolderForeground": "#908caa", + "statusBarItem.activeBackground": "#817c9c4d", + "statusBarItem.hoverBackground": "#817c9c26", + "statusBarItem.prominentBackground": "#393552", + "statusBarItem.prominentForeground": "#e0def4", + "statusBarItem.prominentHoverBackground": "#817c9c26", + "statusBarItem.remoteBackground": "#232136", + "statusBarItem.remoteForeground": "#f6c177", + "statusBarItem.errorBackground": "#232136", + "statusBarItem.errorForeground": "#eb6f92", + "symbolIcon.arrayForeground": "#908caa", + "symbolIcon.classForeground": "#908caa", + "symbolIcon.colorForeground": "#908caa", + "symbolIcon.constantForeground": "#908caa", + "symbolIcon.constructorForeground": "#908caa", + "symbolIcon.enumeratorForeground": "#908caa", + "symbolIcon.enumeratorMemberForeground": "#908caa", + "symbolIcon.eventForeground": "#908caa", + "symbolIcon.fieldForeground": "#908caa", + "symbolIcon.fileForeground": "#908caa", + "symbolIcon.folderForeground": "#908caa", + "symbolIcon.functionForeground": "#908caa", + "symbolIcon.interfaceForeground": "#908caa", + "symbolIcon.keyForeground": "#908caa", + "symbolIcon.keywordForeground": "#908caa", + "symbolIcon.methodForeground": "#908caa", + "symbolIcon.moduleForeground": "#908caa", + "symbolIcon.namespaceForeground": "#908caa", + "symbolIcon.nullForeground": "#908caa", + "symbolIcon.numberForeground": "#908caa", + "symbolIcon.objectForeground": "#908caa", + "symbolIcon.operatorForeground": "#908caa", + "symbolIcon.packageForeground": "#908caa", + "symbolIcon.propertyForeground": "#908caa", + "symbolIcon.referenceForeground": "#908caa", + "symbolIcon.snippetForeground": "#908caa", + "symbolIcon.stringForeground": "#908caa", + "symbolIcon.structForeground": "#908caa", + "symbolIcon.textForeground": "#908caa", + "symbolIcon.typeParameterForeground": "#908caa", + "symbolIcon.unitForeground": "#908caa", + "symbolIcon.variableForeground": "#908caa", + "tab.activeBackground": "#817c9c14", + "tab.activeForeground": "#e0def4", + "tab.activeModifiedBorder": "#9ccfd8", + "tab.border": "#000000", + "tab.hoverBackground": "#817c9c26", + "tab.inactiveBackground": "#000000", + "tab.inactiveForeground": "#908caa", + "tab.inactiveModifiedBorder": "#9ccfd880", + "tab.lastPinnedBorder": "#6e6a86", + "tab.unfocusedActiveBackground": "#000000", + "tab.unfocusedHoverBackground": "#000000", + "tab.unfocusedInactiveBackground": "#000000", + "tab.unfocusedInactiveModifiedBorder": "#9ccfd880", + "terminal.ansiBlack": "#393552", + "terminal.ansiBlue": "#9ccfd8", + "terminal.ansiBrightBlack": "#908caa", + "terminal.ansiBrightBlue": "#9ccfd8", + "terminal.ansiBrightCyan": "#ea9a97", + "terminal.ansiBrightGreen": "#3e8fb0", + "terminal.ansiBrightMagenta": "#c4a7e7", + "terminal.ansiBrightRed": "#eb6f92", + "terminal.ansiBrightWhite": "#e0def4", + "terminal.ansiBrightYellow": "#f6c177", + "terminal.ansiCyan": "#ea9a97", + "terminal.ansiGreen": "#3e8fb0", + "terminal.ansiMagenta": "#c4a7e7", + "terminal.ansiRed": "#eb6f92", + "terminal.ansiWhite": "#e0def4", + "terminal.ansiYellow": "#f6c177", + "terminal.dropBackground": "#817c9c26", + "terminal.foreground": "#e0def4", + "terminal.selectionBackground": "#817c9c26", + "terminal.tab.activeBorder": "#e0def4", + "terminalCursor.background": "#e0def4", + "terminalCursor.foreground": "#6e6a86", + "textBlockQuote.background": "#2a273f", + "textBlockQuote.border": "#817c9c26", + "textCodeBlock.background": "#2a273f", + "textLink.activeForeground": "#c4a7e7e6", + "textLink.foreground": "#c4a7e7", + "textPreformat.foreground": "#f6c177", + "textSeparator.foreground": "#908caa", + "titleBar.activeBackground": "#232136", + "titleBar.activeForeground": "#908caa", + "titleBar.inactiveBackground": "#2a273f", + "titleBar.inactiveForeground": "#908caa", + "toolbar.activeBackground": "#817c9c4d", + "toolbar.hoverBackground": "#817c9c26", + "tree.indentGuidesStroke": "#908caa", + "walkThrough.embeddedEditorBackground": "#232136", + "welcomePage.background": "#232136", + "welcomePage.buttonBackground": "#2a273f", + "welcomePage.buttonHoverBackground": "#393552", + "widget.shadow": "#2a273f4d", + "window.activeBorder": "#2a273f", + "window.inactiveBorder": "#2a273f" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#6e6a86", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#ea9a97" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#ea9a97" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#c4a7e7" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#6e6a86" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#eb6f92", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#ea9a97", + "fontStyle": "italic" + } + }, + { + "scope": [ + "variable.other", + "variable.language", + "variable.function", + "variable.argument" + ], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#c4a7e7" + } + } + ] +} diff --git a/assets/themes/src/vscode/rose-pine/rose-pine.json b/assets/themes/src/vscode/rose-pine/rose-pine.json new file mode 100644 index 0000000000000000000000000000000000000000..c2a0d23efc59b8cb1da9b9a74e31ca3064df8cf4 --- /dev/null +++ b/assets/themes/src/vscode/rose-pine/rose-pine.json @@ -0,0 +1,680 @@ +{ + "name": "Rosé Pine", + "type": "dark", + "colors": { + "activityBar.activeBorder": "#e0def4", + "activityBar.background": "#191724", + "activityBar.dropBorder": "#26233a", + "activityBar.foreground": "#e0def4", + "activityBar.inactiveForeground": "#908caa", + "activityBarBadge.background": "#ebbcba", + "activityBarBadge.foreground": "#191724", + "badge.background": "#ebbcba", + "badge.foreground": "#191724", + "banner.background": "#1f1d2e", + "banner.foreground": "#e0def4", + "banner.iconForeground": "#908caa", + "breadcrumb.activeSelectionForeground": "#ebbcba", + "breadcrumb.background": "#191724", + "breadcrumb.focusForeground": "#908caa", + "breadcrumb.foreground": "#6e6a86", + "breadcrumbPicker.background": "#1f1d2e", + "button.background": "#ebbcba", + "button.foreground": "#191724", + "button.hoverBackground": "#ebbcbae6", + "button.secondaryBackground": "#1f1d2e", + "button.secondaryForeground": "#e0def4", + "button.secondaryHoverBackground": "#26233a", + "charts.blue": "#9ccfd8", + "charts.foreground": "#e0def4", + "charts.green": "#31748f", + "charts.lines": "#908caa", + "charts.orange": "#ebbcba", + "charts.purple": "#c4a7e7", + "charts.red": "#eb6f92", + "charts.yellow": "#f6c177", + "checkbox.background": "#1f1d2e", + "checkbox.border": "#6e6a8633", + "checkbox.foreground": "#e0def4", + "debugExceptionWidget.background": "#1f1d2e", + "debugExceptionWidget.border": "#6e6a8633", + "debugIcon.breakpointCurrentStackframeForeground": "#908caa", + "debugIcon.breakpointDisabledForeground": "#908caa", + "debugIcon.breakpointForeground": "#908caa", + "debugIcon.breakpointStackframeForeground": "#908caa", + "debugIcon.breakpointUnverifiedForeground": "#908caa", + "debugIcon.continueForeground": "#908caa", + "debugIcon.disconnectForeground": "#908caa", + "debugIcon.pauseForeground": "#908caa", + "debugIcon.restartForeground": "#908caa", + "debugIcon.startForeground": "#908caa", + "debugIcon.stepBackForeground": "#908caa", + "debugIcon.stepIntoForeground": "#908caa", + "debugIcon.stepOutForeground": "#908caa", + "debugIcon.stepOverForeground": "#908caa", + "debugIcon.stopForeground": "#eb6f92", + "debugToolBar.background": "#1f1d2e", + "debugToolBar.border": "#26233a", + "descriptionForeground": "#908caa", + "diffEditor.border": "#26233a", + "diffEditor.diagonalFill": "#6e6a8666", + "diffEditor.insertedLineBackground": "#9ccfd826", + "diffEditor.insertedTextBackground": "#9ccfd826", + "diffEditor.removedLineBackground": "#eb6f9226", + "diffEditor.removedTextBackground": "#eb6f9226", + "diffEditorOverview.insertedForeground": "#9ccfd880", + "diffEditorOverview.removedForeground": "#eb6f9280", + "dropdown.background": "#1f1d2e", + "dropdown.border": "#6e6a8633", + "dropdown.foreground": "#e0def4", + "dropdown.listBackground": "#1f1d2e", + "editor.background": "#191724", + "editor.findMatchBackground": "#6e6a8666", + "editor.findMatchHighlightBackground": "#6e6a8666", + "editor.findRangeHighlightBackground": "#6e6a8666", + "editor.findRangeHighlightBorder": "#000000", + "editor.focusedStackFrameHighlightBackground": "#6e6a8633", + "editor.foldBackground": "#1f1d2e", + "editor.foreground": "#e0def4", + "editor.hoverHighlightBackground": "#000000", + "editor.inactiveSelectionBackground": "#6e6a861a", + "editor.inlineValuesBackground": "#000000", + "editor.inlineValuesForeground": "#908caa", + "editor.lineHighlightBackground": "#6e6a861a", + "editor.lineHighlightBorder": "#000000", + "editor.linkedEditingBackground": "#1f1d2e", + "editor.rangeHighlightBackground": "#6e6a861a", + "editor.selectionBackground": "#6e6a8633", + "editor.selectionForeground": "#e0def4", + "editor.selectionHighlightBackground": "#6e6a8633", + "editor.selectionHighlightBorder": "#191724", + "editor.snippetFinalTabstopHighlightBackground": "#6e6a8633", + "editor.snippetFinalTabstopHighlightBorder": "#1f1d2e", + "editor.snippetTabstopHighlightBackground": "#6e6a8633", + "editor.snippetTabstopHighlightBorder": "#1f1d2e", + "editor.stackFrameHighlightBackground": "#6e6a8633", + "editor.symbolHighlightBackground": "#6e6a8633", + "editor.symbolHighlightBorder": "#000000", + "editor.wordHighlightBackground": "#6e6a8633", + "editor.wordHighlightBorder": "#000000", + "editor.wordHighlightStrongBackground": "#6e6a8633", + "editor.wordHighlightStrongBorder": "#6e6a8633", + "editorBracketHighlight.foreground1": "#eb6f9280", + "editorBracketHighlight.foreground2": "#31748f80", + "editorBracketHighlight.foreground3": "#f6c17780", + "editorBracketHighlight.foreground4": "#9ccfd880", + "editorBracketHighlight.foreground5": "#ebbcba80", + "editorBracketHighlight.foreground6": "#c4a7e780", + "editorBracketMatch.background": "#000000", + "editorBracketMatch.border": "#908caa", + "editorBracketPairGuide.activeBackground1": "#31748f", + "editorBracketPairGuide.activeBackground2": "#ebbcba", + "editorBracketPairGuide.activeBackground3": "#c4a7e7", + "editorBracketPairGuide.activeBackground4": "#9ccfd8", + "editorBracketPairGuide.activeBackground5": "#f6c177", + "editorBracketPairGuide.activeBackground6": "#eb6f92", + "editorBracketPairGuide.background1": "#31748f80", + "editorBracketPairGuide.background2": "#ebbcba80", + "editorBracketPairGuide.background3": "#c4a7e780", + "editorBracketPairGuide.background4": "#9ccfd880", + "editorBracketPairGuide.background5": "#f6c17780", + "editorBracketPairGuide.background6": "#eb6f9280", + "editorCodeLens.foreground": "#ebbcba", + "editorCursor.background": "#e0def4", + "editorCursor.foreground": "#6e6a86", + "editorError.border": "#000000", + "editorError.foreground": "#eb6f92", + "editorGhostText.foreground": "#908caa", + "editorGroup.border": "#000000", + "editorGroup.dropBackground": "#1f1d2e", + "editorGroup.emptyBackground": "#000000", + "editorGroup.focusedEmptyBorder": "#000000", + "editorGroupHeader.noTabsBackground": "#000000", + "editorGroupHeader.tabsBackground": "#000000", + "editorGroupHeader.tabsBorder": "#000000", + "editorGutter.addedBackground": "#9ccfd8", + "editorGutter.background": "#191724", + "editorGutter.commentRangeForeground": "#908caa", + "editorGutter.deletedBackground": "#eb6f92", + "editorGutter.foldingControlForeground": "#c4a7e7", + "editorGutter.modifiedBackground": "#ebbcba", + "editorHint.border": "#000000", + "editorHint.foreground": "#908caa", + "editorHoverWidget.background": "#1f1d2e", + "editorHoverWidget.border": "#6e6a8680", + "editorHoverWidget.foreground": "#908caa", + "editorHoverWidget.highlightForeground": "#e0def4", + "editorHoverWidget.statusBarBackground": "#000000", + "editorIndentGuide.activeBackground": "#6e6a86", + "editorIndentGuide.background": "#6e6a8666", + "editorInfo.border": "#26233a", + "editorInfo.foreground": "#9ccfd8", + "editorInlayHint.background": "#26233a", + "editorInlayHint.foreground": "#908caa", + "editorInlayHint.parameterBackground": "#26233a", + "editorInlayHint.parameterForeground": "#c4a7e7", + "editorInlayHint.typeBackground": "#26233a", + "editorInlayHint.typeForeground": "#9ccfd8", + "editorLightBulb.foreground": "#31748f", + "editorLightBulbAutoFix.foreground": "#ebbcba", + "editorLineNumber.activeForeground": "#e0def4", + "editorLineNumber.foreground": "#908caa", + "editorLink.activeForeground": "#ebbcba", + "editorMarkerNavigation.background": "#1f1d2e", + "editorMarkerNavigationError.background": "#1f1d2e", + "editorMarkerNavigationInfo.background": "#1f1d2e", + "editorMarkerNavigationWarning.background": "#1f1d2e", + "editorOverviewRuler.addedForeground": "#9ccfd880", + "editorOverviewRuler.background": "#191724", + "editorOverviewRuler.border": "#6e6a8666", + "editorOverviewRuler.bracketMatchForeground": "#908caa", + "editorOverviewRuler.commonContentForeground": "#6e6a861a", + "editorOverviewRuler.currentContentForeground": "#6e6a8633", + "editorOverviewRuler.deletedForeground": "#eb6f9280", + "editorOverviewRuler.errorForeground": "#eb6f9280", + "editorOverviewRuler.findMatchForeground": "#6e6a8666", + "editorOverviewRuler.incomingContentForeground": "#c4a7e780", + "editorOverviewRuler.infoForeground": "#9ccfd880", + "editorOverviewRuler.modifiedForeground": "#ebbcba80", + "editorOverviewRuler.rangeHighlightForeground": "#6e6a8666", + "editorOverviewRuler.selectionHighlightForeground": "#6e6a8666", + "editorOverviewRuler.warningForeground": "#f6c17780", + "editorOverviewRuler.wordHighlightForeground": "#6e6a8633", + "editorOverviewRuler.wordHighlightStrongForeground": "#6e6a8666", + "editorPane.background": "#000000", + "editorRuler.foreground": "#6e6a8666", + "editorSuggestWidget.background": "#1f1d2e", + "editorSuggestWidget.border": "#000000", + "editorSuggestWidget.focusHighlightForeground": "#ebbcba", + "editorSuggestWidget.foreground": "#908caa", + "editorSuggestWidget.highlightForeground": "#ebbcba", + "editorSuggestWidget.selectedBackground": "#6e6a8633", + "editorSuggestWidget.selectedForeground": "#e0def4", + "editorSuggestWidget.selectedIconForeground": "#e0def4", + "editorUnnecessaryCode.border": "#000000", + "editorUnnecessaryCode.opacity": "#e0def480", + "editorWarning.border": "#000000", + "editorWarning.foreground": "#f6c177", + "editorWhitespace.foreground": "#6e6a86", + "editorWidget.background": "#1f1d2e", + "editorWidget.border": "#26233a", + "editorWidget.foreground": "#908caa", + "editorWidget.resizeBorder": "#6e6a86", + "errorForeground": "#eb6f92", + "extensionBadge.remoteBackground": "#c4a7e7", + "extensionBadge.remoteForeground": "#191724", + "extensionButton.prominentBackground": "#ebbcba", + "extensionButton.prominentForeground": "#191724", + "extensionButton.prominentHoverBackground": "#ebbcbae6", + "extensionIcon.preReleaseForeground": "#31748f", + "extensionIcon.starForeground": "#ebbcba", + "extensionIcon.verifiedForeground": "#c4a7e7", + "focusBorder": "#6e6a8633", + "foreground": "#e0def4", + "gitDecoration.addedResourceForeground": "#9ccfd8", + "gitDecoration.conflictingResourceForeground": "#eb6f92", + "gitDecoration.deletedResourceForeground": "#908caa", + "gitDecoration.ignoredResourceForeground": "#6e6a86", + "gitDecoration.modifiedResourceForeground": "#ebbcba", + "gitDecoration.renamedResourceForeground": "#31748f", + "gitDecoration.stageDeletedResourceForeground": "#eb6f92", + "gitDecoration.stageModifiedResourceForeground": "#c4a7e7", + "gitDecoration.submoduleResourceForeground": "#f6c177", + "gitDecoration.untrackedResourceForeground": "#f6c177", + "icon.foreground": "#908caa", + "input.background": "#26233a80", + "input.border": "#6e6a8633", + "input.foreground": "#e0def4", + "input.placeholderForeground": "#908caa", + "inputOption.activeBackground": "#ebbcba26", + "inputOption.activeForeground": "#ebbcba", + "inputValidation.errorBackground": "#1f1d2e", + "inputValidation.errorBorder": "#6e6a8666", + "inputValidation.errorForeground": "#eb6f92", + "inputValidation.infoBackground": "#1f1d2e", + "inputValidation.infoBorder": "#6e6a8666", + "inputValidation.infoForeground": "#9ccfd8", + "inputValidation.warningBackground": "#1f1d2e", + "inputValidation.warningBorder": "#6e6a8666", + "inputValidation.warningForeground": "#9ccfd880", + "keybindingLabel.background": "#26233a", + "keybindingLabel.border": "#6e6a8666", + "keybindingLabel.bottomBorder": "#6e6a8666", + "keybindingLabel.foreground": "#c4a7e7", + "keybindingTable.headerBackground": "#26233a", + "keybindingTable.rowsBackground": "#1f1d2e", + "list.activeSelectionBackground": "#6e6a8633", + "list.activeSelectionForeground": "#e0def4", + "list.deemphasizedForeground": "#908caa", + "list.dropBackground": "#1f1d2e", + "list.errorForeground": "#eb6f92", + "list.filterMatchBackground": "#1f1d2e", + "list.filterMatchBorder": "#ebbcba", + "list.focusBackground": "#6e6a8666", + "list.focusForeground": "#e0def4", + "list.focusOutline": "#6e6a8633", + "list.highlightForeground": "#ebbcba", + "list.hoverBackground": "#6e6a861a", + "list.hoverForeground": "#e0def4", + "list.inactiveFocusBackground": "#6e6a861a", + "list.inactiveSelectionBackground": "#1f1d2e", + "list.inactiveSelectionForeground": "#e0def4", + "list.invalidItemForeground": "#eb6f92", + "list.warningForeground": "#f6c177", + "listFilterWidget.background": "#1f1d2e", + "listFilterWidget.noMatchesOutline": "#eb6f92", + "listFilterWidget.outline": "#26233a", + "menu.background": "#1f1d2e", + "menu.border": "#6e6a861a", + "menu.foreground": "#e0def4", + "menu.selectionBackground": "#6e6a8633", + "menu.selectionBorder": "#26233a", + "menu.selectionForeground": "#e0def4", + "menu.separatorBackground": "#6e6a8666", + "menubar.selectionBackground": "#6e6a8633", + "menubar.selectionBorder": "#6e6a861a", + "menubar.selectionForeground": "#e0def4", + "merge.border": "#26233a", + "merge.commonContentBackground": "#6e6a8633", + "merge.commonHeaderBackground": "#6e6a8633", + "merge.currentContentBackground": "#f6c17780", + "merge.currentHeaderBackground": "#f6c17780", + "merge.incomingContentBackground": "#9ccfd880", + "merge.incomingHeaderBackground": "#9ccfd880", + "minimap.background": "#1f1d2e", + "minimap.errorHighlight": "#eb6f9280", + "minimap.findMatchHighlight": "#6e6a8633", + "minimap.selectionHighlight": "#6e6a8633", + "minimap.warningHighlight": "#f6c17780", + "minimapGutter.addedBackground": "#9ccfd8", + "minimapGutter.deletedBackground": "#eb6f92", + "minimapGutter.modifiedBackground": "#ebbcba", + "minimapSlider.activeBackground": "#6e6a8666", + "minimapSlider.background": "#6e6a8633", + "minimapSlider.hoverBackground": "#6e6a8633", + "notebook.cellBorderColor": "#9ccfd880", + "notebook.cellEditorBackground": "#1f1d2e", + "notebook.cellHoverBackground": "#26233a80", + "notebook.focusedCellBackground": "#6e6a861a", + "notebook.focusedCellBorder": "#9ccfd8", + "notebook.outputContainerBackgroundColor": "#6e6a861a", + "notificationCenter.border": "#6e6a8633", + "notificationCenterHeader.background": "#1f1d2e", + "notificationCenterHeader.foreground": "#908caa", + "notificationLink.foreground": "#c4a7e7", + "notifications.background": "#1f1d2e", + "notifications.border": "#6e6a8633", + "notifications.foreground": "#e0def4", + "notificationsErrorIcon.foreground": "#eb6f92", + "notificationsInfoIcon.foreground": "#9ccfd8", + "notificationsWarningIcon.foreground": "#f6c177", + "notificationToast.border": "#6e6a8633", + "panel.background": "#1f1d2e", + "panel.border": "#000000", + "panel.dropBorder": "#26233a", + "panelInput.border": "#1f1d2e", + "panelSection.dropBackground": "#6e6a8633", + "panelSectionHeader.background": "#1f1d2e", + "panelSectionHeader.foreground": "#e0def4", + "panelTitle.activeBorder": "#6e6a8666", + "panelTitle.activeForeground": "#e0def4", + "panelTitle.inactiveForeground": "#908caa", + "peekView.border": "#26233a", + "peekViewEditor.background": "#1f1d2e", + "peekViewEditor.matchHighlightBackground": "#6e6a8666", + "peekViewResult.background": "#1f1d2e", + "peekViewResult.fileForeground": "#908caa", + "peekViewResult.lineForeground": "#908caa", + "peekViewResult.matchHighlightBackground": "#6e6a8666", + "peekViewResult.selectionBackground": "#6e6a8633", + "peekViewResult.selectionForeground": "#e0def4", + "peekViewTitle.background": "#26233a", + "peekViewTitleDescription.foreground": "#908caa", + "pickerGroup.border": "#6e6a8666", + "pickerGroup.foreground": "#c4a7e7", + "ports.iconRunningProcessForeground": "#ebbcba", + "problemsErrorIcon.foreground": "#eb6f92", + "problemsInfoIcon.foreground": "#9ccfd8", + "problemsWarningIcon.foreground": "#f6c177", + "progressBar.background": "#ebbcba", + "quickInput.background": "#1f1d2e", + "quickInput.foreground": "#908caa", + "quickInputList.focusBackground": "#6e6a8633", + "quickInputList.focusForeground": "#e0def4", + "quickInputList.focusIconForeground": "#e0def4", + "scrollbar.shadow": "#1f1d2e4d", + "scrollbarSlider.activeBackground": "#31748f80", + "scrollbarSlider.background": "#6e6a8633", + "scrollbarSlider.hoverBackground": "#6e6a8666", + "searchEditor.findMatchBackground": "#6e6a8633", + "selection.background": "#6e6a8666", + "settings.focusedRowBackground": "#1f1d2e", + "settings.headerForeground": "#e0def4", + "settings.modifiedItemIndicator": "#ebbcba", + "settings.focusedRowBorder": "#6e6a8633", + "settings.rowHoverBackground": "#1f1d2e", + "sideBar.background": "#191724", + "sideBar.dropBackground": "#1f1d2e", + "sideBar.foreground": "#908caa", + "sideBarSectionHeader.background": "#000000", + "sideBarSectionHeader.border": "#6e6a8633", + "statusBar.background": "#191724", + "statusBar.debuggingBackground": "#c4a7e7", + "statusBar.debuggingForeground": "#191724", + "statusBar.foreground": "#908caa", + "statusBar.noFolderBackground": "#191724", + "statusBar.noFolderForeground": "#908caa", + "statusBarItem.activeBackground": "#6e6a8666", + "statusBarItem.hoverBackground": "#6e6a8633", + "statusBarItem.prominentBackground": "#26233a", + "statusBarItem.prominentForeground": "#e0def4", + "statusBarItem.prominentHoverBackground": "#6e6a8633", + "statusBarItem.remoteBackground": "#191724", + "statusBarItem.remoteForeground": "#f6c177", + "statusBarItem.errorBackground": "#191724", + "statusBarItem.errorForeground": "#eb6f92", + "symbolIcon.arrayForeground": "#908caa", + "symbolIcon.classForeground": "#908caa", + "symbolIcon.colorForeground": "#908caa", + "symbolIcon.constantForeground": "#908caa", + "symbolIcon.constructorForeground": "#908caa", + "symbolIcon.enumeratorForeground": "#908caa", + "symbolIcon.enumeratorMemberForeground": "#908caa", + "symbolIcon.eventForeground": "#908caa", + "symbolIcon.fieldForeground": "#908caa", + "symbolIcon.fileForeground": "#908caa", + "symbolIcon.folderForeground": "#908caa", + "symbolIcon.functionForeground": "#908caa", + "symbolIcon.interfaceForeground": "#908caa", + "symbolIcon.keyForeground": "#908caa", + "symbolIcon.keywordForeground": "#908caa", + "symbolIcon.methodForeground": "#908caa", + "symbolIcon.moduleForeground": "#908caa", + "symbolIcon.namespaceForeground": "#908caa", + "symbolIcon.nullForeground": "#908caa", + "symbolIcon.numberForeground": "#908caa", + "symbolIcon.objectForeground": "#908caa", + "symbolIcon.operatorForeground": "#908caa", + "symbolIcon.packageForeground": "#908caa", + "symbolIcon.propertyForeground": "#908caa", + "symbolIcon.referenceForeground": "#908caa", + "symbolIcon.snippetForeground": "#908caa", + "symbolIcon.stringForeground": "#908caa", + "symbolIcon.structForeground": "#908caa", + "symbolIcon.textForeground": "#908caa", + "symbolIcon.typeParameterForeground": "#908caa", + "symbolIcon.unitForeground": "#908caa", + "symbolIcon.variableForeground": "#908caa", + "tab.activeBackground": "#6e6a861a", + "tab.activeForeground": "#e0def4", + "tab.activeModifiedBorder": "#9ccfd8", + "tab.border": "#000000", + "tab.hoverBackground": "#6e6a8633", + "tab.inactiveBackground": "#000000", + "tab.inactiveForeground": "#908caa", + "tab.inactiveModifiedBorder": "#9ccfd880", + "tab.lastPinnedBorder": "#6e6a86", + "tab.unfocusedActiveBackground": "#000000", + "tab.unfocusedHoverBackground": "#000000", + "tab.unfocusedInactiveBackground": "#000000", + "tab.unfocusedInactiveModifiedBorder": "#9ccfd880", + "terminal.ansiBlack": "#26233a", + "terminal.ansiBlue": "#9ccfd8", + "terminal.ansiBrightBlack": "#908caa", + "terminal.ansiBrightBlue": "#9ccfd8", + "terminal.ansiBrightCyan": "#ebbcba", + "terminal.ansiBrightGreen": "#31748f", + "terminal.ansiBrightMagenta": "#c4a7e7", + "terminal.ansiBrightRed": "#eb6f92", + "terminal.ansiBrightWhite": "#e0def4", + "terminal.ansiBrightYellow": "#f6c177", + "terminal.ansiCyan": "#ebbcba", + "terminal.ansiGreen": "#31748f", + "terminal.ansiMagenta": "#c4a7e7", + "terminal.ansiRed": "#eb6f92", + "terminal.ansiWhite": "#e0def4", + "terminal.ansiYellow": "#f6c177", + "terminal.dropBackground": "#6e6a8633", + "terminal.foreground": "#e0def4", + "terminal.selectionBackground": "#6e6a8633", + "terminal.tab.activeBorder": "#e0def4", + "terminalCursor.background": "#e0def4", + "terminalCursor.foreground": "#6e6a86", + "textBlockQuote.background": "#1f1d2e", + "textBlockQuote.border": "#6e6a8633", + "textCodeBlock.background": "#1f1d2e", + "textLink.activeForeground": "#c4a7e7e6", + "textLink.foreground": "#c4a7e7", + "textPreformat.foreground": "#f6c177", + "textSeparator.foreground": "#908caa", + "titleBar.activeBackground": "#191724", + "titleBar.activeForeground": "#908caa", + "titleBar.inactiveBackground": "#1f1d2e", + "titleBar.inactiveForeground": "#908caa", + "toolbar.activeBackground": "#6e6a8666", + "toolbar.hoverBackground": "#6e6a8633", + "tree.indentGuidesStroke": "#908caa", + "walkThrough.embeddedEditorBackground": "#191724", + "welcomePage.background": "#191724", + "welcomePage.buttonBackground": "#1f1d2e", + "welcomePage.buttonHoverBackground": "#26233a", + "widget.shadow": "#1f1d2e4d", + "window.activeBorder": "#1f1d2e", + "window.inactiveBorder": "#1f1d2e" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#6e6a86", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#ebbcba" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#ebbcba" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#c4a7e7" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#6e6a86" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#eb6f92", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#ebbcba", + "fontStyle": "italic" + } + }, + { + "scope": [ + "variable.other", + "variable.language", + "variable.function", + "variable.argument" + ], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#c4a7e7" + } + } + ] +} diff --git a/assets/themes/src/vscode/solarized/LICENSE b/assets/themes/src/vscode/solarized/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a6777a993513e838d5dc82fc66ff6b9733bd07d6 --- /dev/null +++ b/assets/themes/src/vscode/solarized/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Ethan Schoonover + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/assets/themes/src/vscode/solarized/dark.json b/assets/themes/src/vscode/solarized/dark.json new file mode 100644 index 0000000000000000000000000000000000000000..b7ea4f2b27e5160ca3550358b6a9c02431291d14 --- /dev/null +++ b/assets/themes/src/vscode/solarized/dark.json @@ -0,0 +1,558 @@ +{ + "type": "dark", + "colors": { + "errorForeground": "#ffeaea", + "focusBorder": "#2aa19899", + "selection.background": "#2aa19899", + "input.background": "#003847", + "input.foreground": "#93a1a1", + "inputOption.activeBorder": "#2aa19899", + "input.placeholderForeground": "#93a1a1aa", + "inputValidation.infoBackground": "#052730", + "inputValidation.infoBorder": "#363b5f", + "inputValidation.warningBackground": "#5d5938", + "inputValidation.warningBorder": "#9d8a5e", + "inputValidation.errorBackground": "#571b26", + "inputValidation.errorBorder": "#a92049", + "dropdown.background": "#00212b", + "dropdown.border": "#2aa19899", + "list.focusBackground": "#005a6f", + "list.activeSelectionBackground": "#005a6f", + "list.inactiveSelectionBackground": "#00445488", + "list.hoverBackground": "#004454aa", + "list.dropBackground": "#00445488", + "list.highlightForeground": "#1ebcc5", + "pickerGroup.foreground": "#2aa19899", + "pickerGroup.border": "#2aa19899", + "button.background": "#2aa19899", + "badge.background": "#047aa6", + "progressBar.background": "#047aa6", + "editor.background": "#002b36", + "editorWidget.background": "#00212b", + "editor.selectionBackground": "#073642", + "editor.selectionHighlightBackground": "#005a6faa", + "editorHoverWidget.background": "#004052", + "editor.lineHighlightBackground": "#073642", + "editorCursor.foreground": "#839496", + "editorWhitespace.foreground": "#93a1a180", + "editorLineNumber.foreground": "#566c74", + "editorLineNumber.activeForeground": "#6e8a93", + "editorGutter.background": "#073642", + "editorMarkerNavigationError.background": "#ab395b", + "editorMarkerNavigationWarning.background": "#5b7e7a", + "editor.wordHighlightBackground": "#004454aa", + "editor.wordHighlightStrongBackground": "#005a6faa", + "peekViewTitle.background": "#00212b", + "peekView.border": "#003847", + "peekViewResult.background": "#00212b", + "peekViewEditor.background": "#10192c", + "peekViewEditorGutter.background": "#073642", + "peekViewEditor.matchHighlightBackground": "#7744aa40", + "tab.activeBackground": "#002b37", + "tab.inactiveBackground": "#004052", + "tab.border": "#003847", + "tab.activeForeground": "#d6dbdb", + "tab.inactiveForeground": "#93a1a1", + "editorGroup.background": "#011b23", + "editorGroupHeader.tabsBackground": "#004052", + "editorGroup.border": "#00212b", + "editorGroup.dropBackground": "#2aa19844", + "panel.border": "#003847", + "statusBar.foreground": "#93a1a1", + "statusBar.background": "#00212b", + "statusBar.noFolderBackground": "#00212b", + "statusBarItem.prominentBackground": "#003847", + "statusBarItem.prominentHoverBackground": "#003847", + "activityBar.background": "#003847", + "sideBar.background": "#00212b", + "sideBarTitle.foreground": "#93a1a1", + "titleBar.activeBackground": "#002c39", + "terminal.foreground": "#839496", + "statusBar.debuggingBackground": "#00212b", + "debugExceptionWidget.border": "#ab395b", + "debugExceptionWidget.background": "#00212b", + "debugToolBar.background": "#00212b", + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#839496", + "terminal.ansiBrightBlack": "#586e75", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#859900", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#839496", + "editorBracketHighlight.foreground1": "#268bd2", + "editorBracketHighlight.foreground2": "#b58900", + "editorBracketHighlight.foreground3": "#d33682" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#bbbbbbff", + "background": "#002b36ff" + } + }, + { + "scope": ["meta.embedded", "source.groovy.embedded"], + "settings": { + "background": "#002B36", + "foreground": "#93A1A1" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#657B83" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": ["variable.language", "variable.other"], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#93A1A1" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "entity.name.type"], + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": [ + "punctuation.section.embedded.begin", + "punctuation.section.embedded.end" + ], + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Built-in constant", + "scope": ["constant.language", "meta.preprocessor"], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": ["support.function.construct", "keyword.other.new"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#6C71C4" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#657B83" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": {} + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": {} + }, + { + "name": "diff: header", + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "background": "#b58900", + "fontStyle": "italic", + "foreground": "#E0EDDD" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#dc322f" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#cb4b16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "background": "#eee8d5", + "foreground": "#219186" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": ["markup.bold", "markup.italic"], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + }, + { + "scope": "variable.object.property", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "variable.parameter", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "support.type", + "settings": { + "fontStyle": "" + } + }, + { + "scope": "storage.type.function", + "settings": { + "fontStyle": "" + } + }, + { + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "keyword.control.import", + "settings": { + "foreground": "#D33682" + } + }, + { + "scope": "storage.modifier.async", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "meta.import", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "source.ts", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "meta.function-call", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "entity.name.type", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "storage.modifier.tsx", + "settings": { + "foreground": "#859900" + } + }, + { + "scope": "entity.name.type.class.python", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "support.type.python", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "source.python", + "settings": { + "foreground": "#839496" + } + }, + { + "scope": "keyword.control.import", + "settings": { + "foreground": "#cb4b16" + } + }, + { + "scope": "keyword.control.from", + "settings": { + "foreground": "#cb4b16" + } + }, + { + "scope": "constant.language.python", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "entity.name.function.python", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "punctuation.separator.dictionary.key-value.json, punctuation.separator.array.json, punctuation.separator.dictionary.pair.json", + "settings": { + "foreground": "#657B83" + } + }, + { + "scope": "storage.type.ts", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "support.type.primitive", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json", + "settings": { + "foreground": "#DC3272" + } + } + ] +} diff --git a/assets/themes/src/vscode/solarized/family.json b/assets/themes/src/vscode/solarized/family.json new file mode 100644 index 0000000000000000000000000000000000000000..6c21ce8dcbb73e11ff3bf82318fb04c1ebbe33f8 --- /dev/null +++ b/assets/themes/src/vscode/solarized/family.json @@ -0,0 +1,16 @@ +{ + "name": "Solarized", + "author": "Ethan Schoonover (altercation)", + "themes": [ + { + "name": "Solarized Dark", + "file_name": "dark.json", + "appearance": "dark" + }, + { + "name": "Solarized Light", + "file_name": "light.json", + "appearance": "light" + } + ] +} diff --git a/assets/themes/src/vscode/solarized/light.json b/assets/themes/src/vscode/solarized/light.json new file mode 100644 index 0000000000000000000000000000000000000000..74f0ce47e395ca36da849f3d1ceca4d50cd24699 --- /dev/null +++ b/assets/themes/src/vscode/solarized/light.json @@ -0,0 +1,591 @@ +{ + "type": "light", + "colors": { + "focusBorder": "#d3af86", + "selection.background": "#ccc4b0", + "input.background": "#ddd6c1", + "input.foreground": "#586e75", + "inputOption.activeBorder": "#d3af86", + "input.placeholderForeground": "#586e75aa", + "dropdown.background": "#eee8d5", + "dropdown.border": "#d3af86", + "list.focusBackground": "#dfca8866", + "list.activeSelectionBackground": "#dfca88", + "list.activeSelectionForeground": "#6c6c6c", + "list.inactiveSelectionBackground": "#d1cbb8", + "list.hoverBackground": "#dfca8844", + "list.highlightForeground": "#b58900", + "pickerGroup.foreground": "#2aa19899", + "pickerGroup.border": "#2aa19899", + "button.background": "#ac9d57", + "badge.background": "#b58900aa", + "progressBar.background": "#b58900", + "editor.background": "#fdf6e3", + "editorWidget.background": "#eee8d5", + "editor.selectionBackground": "#eee8d5", + "editorHoverWidget.background": "#ccc4b0", + "editor.lineHighlightBackground": "#eee8d5", + "editorCursor.foreground": "#657b83", + "editorWhitespace.foreground": "#586e7580", + "editorLineNumber.foreground": "#9ca8a6", + "editorLineNumber.activeForeground": "#6f7776", + "editorGutter.background": "#eee8d5", + "peekViewTitle.background": "#eee8d5", + "peekView.border": "#b58900", + "peekViewResult.background": "#eee8d5", + "peekViewEditor.background": "#fffbf2", + "peekViewEditor.matchHighlightBackground": "#7744aa40", + "tab.activeBackground": "#fdf6e3", + "tab.inactiveBackground": "#d3cbb7", + "tab.border": "#ddd6c1", + "tab.inactiveForeground": "#586e75", + "editorGroup.background": "#fffbf2", + "editorGroupHeader.tabsBackground": "#d9d2c2", + "editorGroup.border": "#ddd6c1", + "editorGroup.dropBackground": "#ddd6c1aa", + "panel.border": "#ddd6c1", + "statusBar.foreground": "#586e75", + "statusBar.background": "#eee8d5", + "statusBar.noFolderBackground": "#eee8d5", + "statusBarItem.prominentBackground": "#ddd6c1", + "statusBarItem.prominentHoverBackground": "#ddd6c199", + "activityBar.background": "#ddd6c1", + "activityBar.foreground": "#584c27", + "activityBar.dropBackground": "#eee8d5", + "activityBarBadge.background": "#b58900", + "sideBar.background": "#eee8d5", + "sideBarTitle.foreground": "#586e75", + "titleBar.activeBackground": "#eee8d5", + "terminal.foreground": "#657b83", + "statusBar.debuggingBackground": "#eee8d5", + "debugExceptionWidget.border": "#ab395b", + "debugExceptionWidget.background": "#ddd6c1", + "debugToolBar.background": "#ddd6c1", + "extensionButton.prominentBackground": "#b58900", + "extensionButton.prominentHoverBackground": "#584c27aa", + "terminal.ansiBlack": "#657b83", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#657b83", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#859900", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#eee8d5", + "editorBracketHighlight.foreground1": "#268bd2", + "editorBracketHighlight.foreground2": "#b58900", + "editorBracketHighlight.foreground3": "#d33682" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#333333ff", + "background": "#fdf6e3ff" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded" + ], + "settings": { + "background": "#FDF6E3", + "foreground": "#657B83" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#93A1A1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": [ + "variable.language", + "variable.other" + ], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#073642" + } + }, + { + "name": "Class name", + "scope": [ + "entity.name.class", + "entity.name.type" + ], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": [ + "punctuation.section.embedded.begin", + "punctuation.section.embedded.end" + ], + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "meta.preprocessor" + ], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": [ + "support.function.construct", + "keyword.other.new" + ], + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "User-defined constant", + "scope": [ + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": {} + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": [ + "punctuation.definition.tag.begin", + "punctuation.definition.tag.end" + ], + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#D30102" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": {} + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class" + ], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": {} + }, + { + "name": "diff: header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "background": "#b58900", + "fontStyle": "italic", + "foreground": "#E0EDDD" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#dc322f" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#cb4b16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "background": "#eee8d5", + "foreground": "#219186" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": [ + "markup.bold", + "markup.italic" + ], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#316bcd" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#800080" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "keyword.control.import", + "settings": { + "foreground": "#D33682" + } + }, + { + "scope": "storage.modifier.async", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "meta.import", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "source.ts", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "meta.function-call", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "entity.name.type", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "storage.modifier.tsx", + "settings": { + "foreground": "#859900" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "keyword.control.import", + "settings": { + "foreground": "#D33682" + } + }, + { + "scope": "storage.modifier.async", + "settings": { + "foreground": "#859900ff", + "fontStyle": "" + } + }, + { + "scope": "meta.import", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "source.ts", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "meta.function-call", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "entity.name.type", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#657b83" + } + }, + { + "scope": "storage.modifier.tsx", + "settings": { + "foreground": "#859900" + } + }, + { + "scope": "punctuation.separator.dictionary.key-value.json, punctuation.separator.array.json, punctuation.separator.dictionary.pair.json", + "settings": { + "foreground": "#657B83" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#268BD2" + } + }, + { + "scope": "punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json", + "settings": { + "foreground": "#DC3272" + } + }, + { + "scope": "support.type.primitive", + "settings": { + "foreground": "#b58900" + } + }, + { + "scope": "keyword.control.import", + "settings": { + "foreground": "#cb4b16" + } + }, + { + "scope": "keyword.control.from", + "settings": { + "foreground": "#cb4b16" + } + }, + { + "scope": "source", + "settings": { + "foreground": "#657b83" + } + } + ] +} diff --git a/assets/themes/src/vscode/synthwave-84/LICENSE b/assets/themes/src/vscode/synthwave-84/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c3388dbb508151082a741664d00a3729cedb376b --- /dev/null +++ b/assets/themes/src/vscode/synthwave-84/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Robb Owen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/themes/src/vscode/synthwave-84/family.json b/assets/themes/src/vscode/synthwave-84/family.json new file mode 100644 index 0000000000000000000000000000000000000000..f8e0f5d9e6dfe4b10717d35490171c7f9b1f66e1 --- /dev/null +++ b/assets/themes/src/vscode/synthwave-84/family.json @@ -0,0 +1,11 @@ +{ + "name": "Synthwave 84", + "author": "Robb Owen (robb0wen)", + "themes": [ + { + "name": "Synthwave 84", + "file_name": "synthwave.json", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vscode/synthwave-84/synthwave.json b/assets/themes/src/vscode/synthwave-84/synthwave.json new file mode 100644 index 0000000000000000000000000000000000000000..5b38ef46fa70a932b94933b61c176c6842104a9c --- /dev/null +++ b/assets/themes/src/vscode/synthwave-84/synthwave.json @@ -0,0 +1,822 @@ +{ + "name": "SynthWave 84", + "type": "dark", + "semanticHighlighting": true, + "colors": { + "focusBorder": "#1f212b", + "foreground": "#ffffff", + "widget.shadow": "#2a2139", + "selection.background": "#ffffff20", + "errorForeground": "#fe4450", + "textLink.activeForeground": "#ff7edb", + "textLink.foreground": "#f97e72", + "button.background": "#614D85", + "dropdown.background": "#232530", + "dropdown.listBackground": "#2a2139", + "input.background": "#2a2139", + "inputOption.activeBorder": "#ff7edb99", + "inputValidation.errorBackground": "#fe445080", + "inputValidation.errorBorder": "#fe445000", + "scrollbar.shadow": "#2a2139", + "scrollbarSlider.activeBackground": "#9d8bca20", + "scrollbarSlider.background": "#9d8bca30", + "scrollbarSlider.hoverBackground": "#9d8bca50", + "badge.foreground": "#ffffff", + "badge.background": "#2a2139", + "progressBar.background": "#f97e72", + "list.activeSelectionBackground": "#ffffff20", + "list.activeSelectionForeground": "#ffffff", + "list.dropBackground": "#34294f66", + "list.focusBackground": "#ffffff20", + "list.focusForeground": "#ffffff", + "list.highlightForeground": "#f97e72", + "list.hoverBackground": "#37294d99", + "list.hoverForeground": "#ffffff", + "list.inactiveSelectionBackground": "#ffffff20", + "list.inactiveSelectionForeground": "#ffffff", + "list.inactiveFocusBackground": "#2a213999", + "list.errorForeground": "#fe4450E6", + "list.warningForeground": "#72f1b8bb", + "activityBar.background": "#171520", + "activityBar.dropBackground": "#34294f66", + "activityBar.foreground": "#ffffffCC", + "activityBarBadge.background": "#f97e72", + "activityBarBadge.foreground": "#2a2139", + "sideBar.background": "#241b2f", + "sideBar.foreground": "#ffffff99", + "sideBar.dropBackground": "#34294f4c", + "sideBarSectionHeader.background": "#241b2f", + "sideBarSectionHeader.foreground": "#ffffffca", + "menu.background": "#463465", + "editorGroup.border": "#495495", + "editorGroup.dropBackground": "#4954954a", + "editorGroupHeader.tabsBackground": "#241b2f", + "tab.border": "#241b2f00", + "tab.activeBorder": "#880088", + "tab.inactiveBackground": "#262335", + "editor.background": "#262335", + "editorLineNumber.foreground": "#ffffff73", + "editorLineNumber.activeForeground": "#ffffffcc", + "editorCursor.background": "#241b2f", + "editorCursor.foreground": "#f97e72", + "editor.selectionBackground": "#ffffff20", + "editor.selectionHighlightBackground": "#ffffff20", + "editor.wordHighlightBackground": "#34294f88", + "editor.wordHighlightStrongBackground": "#34294f88", + "editor.findMatchBackground": "#D18616bb", + "editor.findMatchHighlightBackground": "#D1861655", + "editor.findRangeHighlightBackground": "#34294f1a", + "editor.hoverHighlightBackground": "#463564", + "editor.lineHighlightBorder": "#7059AB66", + "editor.rangeHighlightBackground": "#49549539", + "editorIndentGuide.background": "#444251", + "editorIndentGuide.activeBackground": "#A148AB80", + "editorRuler.foreground": "#A148AB80", + "editorCodeLens.foreground": "#ffffff7c", + "editorBracketMatch.background": "#34294f66", + "editorBracketMatch.border": "#495495", + "editorOverviewRuler.border": "#34294fb3", + "editorOverviewRuler.findMatchForeground": "#D1861699", + "editorOverviewRuler.modifiedForeground": "#b893ce99", + "editorOverviewRuler.addedForeground": "#09f7a099", + "editorOverviewRuler.deletedForeground": "#fe445099", + "editorOverviewRuler.errorForeground": "#fe4450dd", + "editorOverviewRuler.warningForeground": "#72f1b8cc", + "editorError.foreground": "#fe4450", + "editorWarning.foreground": "#72f1b8cc", + "editorGutter.modifiedBackground": "#b893ce8f", + "editorGutter.addedBackground": "#206d4bd6", + "editorGutter.deletedBackground": "#fa2e46a4", + "diffEditor.insertedTextBackground": "#0beb9935", + "diffEditor.removedTextBackground": "#fe445035", + "editorWidget.background": "#171520DC", + "editorWidget.border": "#ffffff22", + "editorWidget.resizeBorder": "#ffffff44", + "editorSuggestWidget.highlightForeground": "#f97e72", + "editorSuggestWidget.selectedBackground": "#ffffff36", + "peekView.border": "#495495", + "peekViewEditor.background": "#232530", + "peekViewEditor.matchHighlightBackground": "#D18616bb", + "peekViewResult.background": "#232530", + "peekViewResult.matchHighlightBackground": "#D1861655", + "peekViewResult.selectionBackground": "#2a213980", + "peekViewTitle.background": "#232530", + "panelTitle.activeBorder": "#f97e72", + "statusBar.background": "#241b2f", + "statusBar.foreground": "#ffffff80", + "statusBar.debuggingBackground": "#f97e72", + "statusBar.debuggingForeground": "#08080f", + "statusBar.noFolderBackground": "#241b2f", + "statusBarItem.prominentBackground": "#2a2139", + "statusBarItem.prominentHoverBackground": "#34294f", + "titleBar.activeBackground": "#241b2f", + "titleBar.inactiveBackground": "#241b2f", + "extensionButton.prominentBackground": "#f97e72", + "extensionButton.prominentHoverBackground": "#ff7edb", + "pickerGroup.foreground": "#f97e72ea", + "terminal.foreground": "#ffffff", + "terminal.ansiBlue": "#03edf9", + "terminal.ansiBrightBlue": "#03edf9", + "terminal.ansiBrightCyan": "#03edf9", + "terminal.ansiBrightGreen": "#72f1b8", + "terminal.ansiBrightMagenta": "#ff7edb", + "terminal.ansiBrightRed": "#fe4450", + "terminal.ansiBrightYellow": "#fede5d", + "terminal.ansiCyan": "#03edf9", + "terminal.ansiGreen": "#72f1b8", + "terminal.ansiMagenta": "#ff7edb", + "terminal.ansiRed": "#fe4450", + "terminal.ansiYellow": "#f3e70f", + "terminal.selectionBackground": "#ffffff20", + "terminalCursor.background": "#ffffff", + "terminalCursor.foreground": "#03edf9", + "debugToolBar.background": "#463465", + "walkThrough.embeddedEditorBackground": "#232530", + "gitDecoration.modifiedResourceForeground": "#b893ceee", + "gitDecoration.deletedResourceForeground": "#fe4450", + "gitDecoration.addedResourceForeground": "#72f1b8cc", + "gitDecoration.untrackedResourceForeground": "#72f1b8", + "gitDecoration.ignoredResourceForeground": "#ffffff59", + "minimapGutter.addedBackground": "#09f7a099", + "minimapGutter.modifiedBackground": "#b893ce", + "minimapGutter.deletedBackground": "#fe4450", + "breadcrumbPicker.background": "#232530" + }, + "tokenColors": [ + { + "name": "Comment", + "scope": [ + "comment", + "string.quoted.docstring.multi.python", + "string.quoted.docstring.multi.python punctuation.definition.string.begin.python", + "string.quoted.docstring.multi.python punctuation.definition.string.end.python" + ], + "settings": { + "foreground": "#848bbd", + "fontStyle": "italic" + } + }, + { + "name": "String", + "scope": ["string.quoted", "string.template", "punctuation.definition.string"], + "settings": { + "foreground": "#ff8b39" + } + }, + { + "name": "Punctuation within templates", + "scope": "string.template meta.embedded.line", + "settings": { + "foreground": "#b6b1b1" + } + }, + { + "name": "Variable", + "scope": ["variable", "entity.name.variable"], + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "Language variable", + "scope": "variable.language", + "settings": { + "foreground": "#fe4450", + "fontStyle": "bold" + } + }, + { + "name": "Parameter", + "scope": "variable.parameter", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Storage (declaration or modifier keyword)", + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Constant", + "scope": "constant", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Regex", + "scope": "string.regexp", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Language constant (boolean, null)", + "scope": "constant.language", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Character escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Entity", + "scope": "entity.name", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "HTML or XML tag", + "scope": "entity.name.tag", + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "HTML or XML tag brackets", + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Tag attribute HTML", + "scope": "entity.other.attribute-name.html", + "settings": { + "foreground": "#fede5d", + "fontStyle": "italic" + } + }, + { + "name": "Class", + "scope": ["entity.name.type", "meta.attribute.class.html"], + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#D50" + } + }, + { + "name": "Function", + "scope": ["entity.name.function", "variable.function"], + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "JS Export", + "scope": ["keyword.control.export.js", "keyword.control.import.js"], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "JS Numerics", + "scope": ["constant.numeric.decimal.js"], + "settings": { + "foreground": "#2EE2FA" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Control keyword", + "scope": "keyword.control", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Special operator", + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.logical" + ], + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Unit", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Support", + "scope": "support", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "Support function", + "scope": "support.function", + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Support variable", + "scope": "support.variable", + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "Object literal key / property", + "scope": ["meta.object-literal.key", "support.type.property-name"], + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "Key-value separator", + "scope": "punctuation.separator.key-value", + "settings": { + "foreground": "#b6b1b1" + } + }, + { + "name": "Embedded punctuation", + "scope": "punctuation.section.embedded", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Template expression", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end" + ], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "CSS property", + "scope": ["support.type.property-name.css", "support.type.property-name.json"], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "JS Switch control", + "scope": "switch-block.expr.js", + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "JS object path", + "scope": "variable.other.constant.property.js, variable.other.property.js", + "settings": { + "foreground": "#2ee2fa" + } + }, + { + "name": "Color", + "scope": "constant.other.color", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Font names", + "scope": "support.constant.font-name", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "CSS #id", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Pseudo CSS", + "scope": [ + "entity.other.attribute-name.pseudo-element", + "entity.other.attribute-name.pseudo-class" + ], + "settings": { + "foreground": "#D50" + } + }, + { + "name": "CSS support functions (rgb)", + "scope": "support.function.misc.css", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "Markup heading", + "scope": ["markup.heading", "entity.name.section"], + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "Markup text", + "scope": ["text.html", "keyword.operator.assignment"], + "settings": { + "foreground": "#ffffffee" + } + }, + { + "name": "Markup quote", + "scope": "markup.quote", + "settings": { + "foreground": "#b6b1b1cc", + "fontStyle": "italic" + } + }, + { + "name": "Markup list", + "scope": "beginning.punctuation.definition.list", + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "Markup link", + "scope": "markup.underline.link", + "settings": { + "foreground": "#D50" + } + }, + { + "name": "Markup link description", + "scope": "string.other.link.description", + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Python function call", + "scope": "meta.function-call.generic.python", + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Python variable params", + "scope": "variable.parameter.function-call.python", + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "C# storage type", + "scope": "storage.type.cs", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "C# local variable", + "scope": "entity.name.variable.local.cs", + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "C# properties and fields", + "scope": ["entity.name.variable.field.cs", "entity.name.variable.property.cs"], + "settings": { + "foreground": "#ff7edb" + } + }, + { + "name": "C placeholder", + "scope": "constant.other.placeholder.c", + "settings": { + "foreground": "#72f1b8", + "fontStyle": "italic" + } + }, + { + "name": "C preprocessors", + "scope": ["keyword.control.directive.include.c", "keyword.control.directive.define.c"], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "C storage modifier", + "scope": "storage.modifier.c", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "C++ operators", + "scope": "source.cpp keyword.operator", + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "C++ placeholder", + "scope": "constant.other.placeholder.cpp", + "settings": { + "foreground": "#72f1b8", + "fontStyle": "italic" + } + }, + { + "name": "C++ include", + "scope": [ + "keyword.control.directive.include.cpp", + "keyword.control.directive.define.cpp" + ], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "C++ constant modifier", + "scope": "storage.modifier.specifier.const.cpp", + "settings": { + "foreground": "#fe4450" + } + }, + { + "name": "Elixir Classes", + "scope": [ + "source.elixir support.type.elixir", + "source.elixir meta.module.elixir entity.name.class.elixir" + ], + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Elixir Functions", + "scope": "source.elixir entity.name.function", + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Elixir Constants", + "scope": [ + "source.elixir constant.other.symbol.elixir", + "source.elixir constant.other.keywords.elixir" + ], + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Elixir String Punctuation", + "scope": "source.elixir punctuation.definition.string", + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Elixir", + "scope": [ + "source.elixir variable.other.readwrite.module.elixir", + "source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir" + ], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Elixir Binary Punctuation", + "scope": "source.elixir .punctuation.binary.elixir", + "settings": { + "foreground": "#ff7edb", + "fontStyle": "italic" + } + }, + { + "name": "Clojure Globals", + "scope": ["entity.global.clojure"], + "settings": { + "foreground": "#36f9f6", + "fontStyle": "bold" + } + }, + { + "name": "Clojure Storage", + "scope": ["storage.control.clojure"], + "settings": { + "foreground": "#36f9f6", + "fontStyle": "italic" + } + }, + { + "name": "Clojure Metadata", + "scope": ["meta.metadata.simple.clojure", "meta.metadata.map.clojure"], + "settings": { + "foreground": "#fe4450", + "fontStyle": "italic" + } + }, + { + "name": "Clojure Macros, Quoted", + "scope": ["meta.quoted-expression.clojure"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Clojure Symbols", + "scope": ["meta.symbol.clojure"], + "settings": { + "foreground": "#ff7edbff" + } + }, + { + "name": "Go basic", + "scope": "source.go", + "settings": { + "foreground": "#ff7edbff" + } + }, + { + "name": "Go Function Calls", + "scope": "source.go meta.function-call.go", + "settings": { + "foreground": "#36f9f6" + } + }, + { + "name": "Go Keywords", + "scope": [ + "source.go keyword.package.go", + "source.go keyword.import.go", + "source.go keyword.function.go", + "source.go keyword.type.go", + "source.go keyword.const.go", + "source.go keyword.var.go", + "source.go keyword.map.go", + "source.go keyword.channel.go", + "source.go keyword.control.go" + ], + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Go interfaces", + "scope": [ + "source.go storage.type", + "source.go keyword.struct.go", + "source.go keyword.interface.go" + ], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Go Constants e.g. nil, string format (%s, %d, etc.)", + "scope": [ + "source.go constant.language.go", + "source.go constant.other.placeholder.go", + "source.go variable" + ], + "settings": { + "foreground": "#2EE2FA" + } + }, + { + "name": "Markdown links and image paths", + "scope": ["markup.underline.link.markdown", "markup.inline.raw.string.markdown"], + "settings": { + "foreground": "#72f1b8", + "fontStyle": "italic" + } + }, + { + "name": "Markdown links and image paths", + "scope": ["string.other.link.title.markdown"], + "settings": { + "foreground": "#fede5d" + } + }, + { + "name": "Markdown headings", + "scope": ["markup.heading.markdown", "entity.name.section.markdown"], + "settings": { + "foreground": "#ff7edb", + "fontStyle": "bold" + } + }, + { + "name": "Markdown italic", + "scope": ["markup.italic.markdown"], + "settings": { + "foreground": "#2EE2FA", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": ["markup.bold.markdown"], + "settings": { + "foreground": "#2EE2FA", + "fontStyle": "bold" + } + }, + { + "name": "Markdown quotes", + "scope": ["punctuation.definition.quote.begin.markdown", "markup.quote.markdown"], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Basic source colours", + "scope": ["source.dart", "source.python", "source.scala"], + "settings": { + "foreground": "#ff7edbff" + } + }, + { + "name": "Dart strings", + "scope": ["string.interpolated.single.dart"], + "settings": { + "foreground": "#f97e72" + } + }, + { + "name": "Dart variable params", + "scope": ["variable.parameter.dart"], + "settings": { + "foreground": "#72f1b8" + } + }, + { + "name": "Dart numerics", + "scope": ["constant.numeric.dart"], + "settings": { + "foreground": "#2EE2FA" + } + }, + { + "name": "Scala variable params", + "scope": ["variable.parameter.scala"], + "settings": { + "foreground": "#2EE2FA" + } + }, + { + "name": "Scala", + "scope": ["meta.template.expression.scala"], + "settings": { + "foreground": "#72f1b8" + } + } + ] +} diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index e9bbbc48b422760636879aea7179821d187a5895..46e14a99ad2d0044467a434382b0ccd43881ff12 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -7,12 +7,12 @@ use crate::{ pub fn andromeda() -> ThemeFamily { ThemeFamily { - id: "0d2fdd0e-de6d-44b2-8f16-f4da10a78f2e".into(), + id: "192bb9a2-a028-4c9a-b713-4c92330b3fab".into(), name: "Andromeda".into(), author: "Eliver Lara (EliverLara)".into(), themes: vec![ ThemeVariant { - id: "8a4e3be2-0ea0-4a0c-9fee-bc63123205ba".into(), + id: "a3aaa73f-f225-41bd-8d52-77ca1df0b7f7".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -170,7 +170,7 @@ pub fn andromeda() -> ThemeFamily { }, }, ThemeVariant { - id: "812f0805-5f84-4f3f-97d3-b38b44307132".into(), + id: "91a17b19-1e74-487e-b0a0-56e2e5360ab8".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 14e316e400dd01c219c6bf53f9f81da67a7abbf6..40fdb7ac15ba69c7efb76857dfe8298691860ecd 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -7,12 +7,12 @@ use crate::{ pub fn ayu() -> ThemeFamily { ThemeFamily { - id: "769923cd-f2b6-4675-96b8-8a2953fc635b".into(), + id: "5ace5bd5-0231-4f26-a69f-40a96dd4163e".into(), name: "Ayu".into(), author: "dempfi (Ike Ku)".into(), themes: vec![ ThemeVariant { - id: "f6ae55e2-a844-47ba-a720-ca88dd7b2a12".into(), + id: "7781d65c-4575-421d-af3c-061ab0b0478a".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -170,7 +170,7 @@ pub fn ayu() -> ThemeFamily { }, }, ThemeVariant { - id: "440f604c-3a70-4bac-901a-2dc92c7a241a".into(), + id: "68066666-5e56-4937-9434-510ffd0fe05f".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -328,7 +328,7 @@ pub fn ayu() -> ThemeFamily { }, }, ThemeVariant { - id: "0135d1f0-1331-4e5a-9634-73e8f72356d0".into(), + id: "d4f949b8-e5b9-4337-a52e-2ed1752a6c4f".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index 0f8de4996fc202520a1de5f03160a7bbace93e3c..2fae1b04f6ba0ceaeae2819c730da928ac051a87 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -7,11 +7,11 @@ use crate::{ pub fn dracula() -> ThemeFamily { ThemeFamily { - id: "690e6a78-4aa6-471e-a342-4d0e0ee14952".into(), + id: "20b9a8c0-0b74-483b-bed2-be7a053e1321".into(), name: "Dracula".into(), author: "Zeno Rocha".into(), themes: vec![ThemeVariant { - id: "b4d04bac-514f-4a38-bf03-df54bb135d82".into(), + id: "02f5624f-9b0a-48e0-8897-4557adc8f104".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index baf0df33415169c3ca2af695a3e6ff66b2050a37..db5849718771d836cccd3f0230937b2e15176696 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -7,12 +7,12 @@ use crate::{ pub fn gruvbox() -> ThemeFamily { ThemeFamily { - id: "c3d8b05f-5538-4b73-9ce9-30a31f73f5f2".into(), + id: "c0b7f0e7-f261-4a33-a2bf-baf2e140aac4".into(), name: "Gruvbox".into(), author: "morhetz".into(), themes: vec![ ThemeVariant { - id: "014ce751-7184-44a0-b977-001d88e94d75".into(), + id: "fb9f8f64-372b-4fda-8dbd-d610c97a9691".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -170,7 +170,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "abf0dd62-cc6a-464b-bd63-75c28eabb1c0".into(), + id: "72f0ea45-33bc-49d8-9f52-87540f858fb4".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -328,7 +328,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "03a2ee16-8076-449b-9bb2-16fd02fbf21d".into(), + id: "5ea1cdf8-6ed0-4e54-b44a-14c6634701cf".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -486,7 +486,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "7bbc0a0b-5b57-4731-bfae-02b4ff7ee821".into(), + id: "b0c9082f-00c8-4a02-a4de-9fd7af97c7f2".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -644,7 +644,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "3319ee0f-2d7f-4efc-84ae-132b30126bb1".into(), + id: "172c281c-ff0a-496e-8794-880e2fc3aa49".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -802,7 +802,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "d455f416-a0a5-4ef6-a808-64aafeb7aaae".into(), + id: "b94f3305-b755-44f2-948c-cfd8c9d3158f".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index bb60ec829426630f691d9b8265205fcaff229375..2a00b497852e19da19d3fcadea1a1ab1dac2649e 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -2,18 +2,40 @@ mod andromeda; mod ayu; mod dracula; mod gruvbox; +mod night_owl; mod nord; mod notctis; +mod palenight; +mod rose_pine; +mod solarized; +mod synthwave_84; pub use andromeda::*; pub use ayu::*; pub use dracula::*; pub use gruvbox::*; +pub use night_owl::*; pub use nord::*; pub use notctis::*; +pub use palenight::*; +pub use rose_pine::*; +pub use solarized::*; +pub use synthwave_84::*; use crate::ThemeFamily; pub(crate) fn all_imported_themes() -> Vec { - vec![andromeda(), dracula(), nord(), notctis(), ayu(), gruvbox()] + vec![ + rose_pine(), + night_owl(), + andromeda(), + synthwave_84(), + palenight(), + dracula(), + solarized(), + nord(), + notctis(), + ayu(), + gruvbox(), + ] } diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rs new file mode 100644 index 0000000000000000000000000000000000000000..d4418ac3dc7d72fc6df6c494e822b3a2071245aa --- /dev/null +++ b/crates/theme2/src/themes/night_owl.rs @@ -0,0 +1,333 @@ +use gpui::rgba; + +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +pub fn night_owl() -> ThemeFamily { + ThemeFamily { + id: "b6469599-df68-4604-be9d-44f63d877d53".into(), + name: "Night Owl".into(), + author: "Sarah Drasner (sdras)".into(), + themes: vec![ + ThemeVariant { + id: "2a04e5fa-e266-475b-b965-3d92efe77ad9".into(), + name: "Night Owl".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x5f7e97ff).into(), + border_variant: rgba(0x5f7e97ff).into(), + border_focused: rgba(0x5f7e97ff).into(), + border_disabled: rgba(0x5f7e97ff).into(), + border_selected: rgba(0x5f7e97ff).into(), + border_transparent: rgba(0x5f7e97ff).into(), + elevated_surface_background: rgba(0x011526ff).into(), + surface_background: rgba(0x011526ff).into(), + background: rgba(0x011526ff).into(), + element_background: rgba(0x7d56c1cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xd6deebff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x01101cff).into(), + tab_active_background: rgba(0x0a2842ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x575656ff).into(), + terminal_ansi_bright_red: rgba(0xef524fff).into(), + terminal_ansi_bright_green: rgba(0x21da6eff).into(), + terminal_ansi_bright_yellow: rgba(0xffeb95ff).into(), + terminal_ansi_bright_blue: rgba(0x82aaffff).into(), + terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), + terminal_ansi_bright_cyan: rgba(0x7fdbcaff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x011526ff).into(), + terminal_ansi_red: rgba(0xef524fff).into(), + terminal_ansi_green: rgba(0x21da6eff).into(), + terminal_ansi_yellow: rgba(0xc5e478ff).into(), + terminal_ansi_blue: rgba(0x82aaffff).into(), + terminal_ansi_magenta: rgba(0xc792eaff).into(), + terminal_ansi_cyan: rgba(0x20c7a7ff).into(), + terminal_ansi_white: rgba(0xffffffff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "91901d29-1c1f-49ef-ac69-c25639425f7c".into(), + name: "Night Owl Light".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xd9d9d9ff).into(), + border_variant: rgba(0xd9d9d9ff).into(), + border_focused: rgba(0xd9d9d9ff).into(), + border_disabled: rgba(0xd9d9d9ff).into(), + border_selected: rgba(0xd9d9d9ff).into(), + border_transparent: rgba(0xd9d9d9ff).into(), + elevated_surface_background: rgba(0xf0f0f0ff).into(), + surface_background: rgba(0xf0f0f0ff).into(), + background: rgba(0xfbfbfbff).into(), + element_background: rgba(0x29a298ff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x403f53ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xf0f0f0ff).into(), + tab_active_background: rgba(0xf6f6f6ff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xf6f6f6ff).into(), + terminal_ansi_bright_black: rgba(0x403f53ff).into(), + terminal_ansi_bright_red: rgba(0xde3c3aff).into(), + terminal_ansi_bright_green: rgba(0x07916aff).into(), + terminal_ansi_bright_yellow: rgba(0xdaa900ff).into(), + terminal_ansi_bright_blue: rgba(0x278dd7ff).into(), + terminal_ansi_bright_magenta: rgba(0xd64289ff).into(), + terminal_ansi_bright_cyan: rgba(0x29a298ff).into(), + terminal_ansi_bright_white: rgba(0xf0f0f0ff).into(), + terminal_ansi_black: rgba(0x403f53ff).into(), + terminal_ansi_red: rgba(0xde3c3aff).into(), + terminal_ansi_green: rgba(0x07916aff).into(), + terminal_ansi_yellow: rgba(0xe0ae01ff).into(), + terminal_ansi_blue: rgba(0x278dd7ff).into(), + terminal_ansi_magenta: rgba(0xd64289ff).into(), + terminal_ansi_cyan: rgba(0x29a298ff).into(), + terminal_ansi_white: rgba(0xf0f0f0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } +} diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index f5db8a9be6eaa5aebe85a85fa9bfc27688b53f7e..953ee1d0da5617de5948e061bb316c34d47c8e0d 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -7,11 +7,11 @@ use crate::{ pub fn nord() -> ThemeFamily { ThemeFamily { - id: "63407887-c052-4dd4-b781-e6194ddcbead".into(), + id: "dcd03133-f540-47e7-9360-91bb1c94d16e".into(), name: "Nord".into(), author: "Sven Greb (svengreb)".into(), themes: vec![ThemeVariant { - id: "27d48816-e82b-4285-a615-7a970d51b4a0".into(), + id: "ed7e8c08-321a-41f0-bd22-ca92c0b42e0e".into(), name: "Nord".into(), appearance: Appearance::Dark, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index 7f68cf1da463af3bf679d645eda0d94707b5dce1..d11463ea42ea278efd446540bf438c55203a3791 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -7,12 +7,12 @@ use crate::{ pub fn notctis() -> ThemeFamily { ThemeFamily { - id: "7cd79bb0-ffd7-48b5-b104-a6c171161a1b".into(), + id: "077650e4-c11f-4cb5-96ec-73bc74923e95".into(), name: "Notctis".into(), author: "Liviu Schera (liviuschera)".into(), themes: vec![ ThemeVariant { - id: "66251405-0342-4f10-849c-b81fe33009aa".into(), + id: "47135df9-e9b5-480c-a71b-c85052b8ff93".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -170,7 +170,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "3717c8d5-deb9-4551-ac9b-12cf37c5af11".into(), + id: "5a3842b1-2273-47ce-ab82-4179842362b1".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -328,7 +328,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "9143cedc-71a4-4005-9b4d-ed23c4ac83fc".into(), + id: "a83c02b3-23f3-496b-8644-57df3314601e".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -486,7 +486,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "82f6e468-a5de-4e3a-ba13-4ced22ac819b".into(), + id: "bda85aea-2260-455a-959a-c03b0a62b8f4".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -644,7 +644,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "655fe060-e62c-4582-a9d2-87ab9f8f21b7".into(), + id: "7720f487-6b09-4bb6-9add-272b030c013f".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -802,7 +802,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "b8540210-1aff-4d72-bb65-040b2c575e35".into(), + id: "51dfe842-b4e2-4d95-a306-8e579a3bb51c".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -960,7 +960,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "70577f71-a351-43c6-9b64-7a5f95ef0ad2".into(), + id: "75a67a53-afbe-4073-a7c0-85a40b56c2cc".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1118,7 +1118,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "abcd25b0-8740-430f-a7e0-0b193ef1c271".into(), + id: "0202afff-5703-473b-b6b6-e86ac3a70718".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1276,7 +1276,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "86b6a2b4-69b9-40d5-b078-3feb93d0786d".into(), + id: "213fd750-27ad-4762-8891-08282ed316c7".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1434,7 +1434,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "aa50141c-1c64-4773-980f-e4bf062f893f".into(), + id: "0cc2c841-1c01-40a7-8396-1234dd077ede".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1592,7 +1592,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "ce4ba03d-5a76-4e6c-9b45-f7c2c2fa3b41".into(), + id: "090a97c7-ad25-4a35-96e6-2fce5e471e6b".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs new file mode 100644 index 0000000000000000000000000000000000000000..836ec680cdf349d563aa5745122947d6fab26b5a --- /dev/null +++ b/crates/theme2/src/themes/palenight.rs @@ -0,0 +1,491 @@ +use gpui::rgba; + +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +pub fn palenight() -> ThemeFamily { + ThemeFamily { + id: "3187cd2f-29da-4bde-9621-83016df3b393".into(), + name: "Palenight".into(), + author: "Olaolu Olawuyi (whizkydee)".into(), + themes: vec![ + ThemeVariant { + id: "0eaa3098-3aa2-4b8e-b1df-92d9ebd9a0b8".into(), + name: "Palenight".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x282b3bff).into(), + border_variant: rgba(0x282b3bff).into(), + border_focused: rgba(0x282b3bff).into(), + border_disabled: rgba(0x282b3bff).into(), + border_selected: rgba(0x282b3bff).into(), + border_transparent: rgba(0x282b3bff).into(), + elevated_surface_background: rgba(0x292c3eff).into(), + surface_background: rgba(0x292c3eff).into(), + background: rgba(0x292c3eff).into(), + element_background: rgba(0x7d56c1cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xffffffff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x31364aff).into(), + tab_active_background: rgba(0x292c3eff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x676e95ff).into(), + terminal_ansi_bright_red: rgba(0xff5571ff).into(), + terminal_ansi_bright_green: rgba(0xc3e88dff).into(), + terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_bright_blue: rgba(0x82aaffff).into(), + terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), + terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x676e95ff).into(), + terminal_ansi_red: rgba(0xff5571ff).into(), + terminal_ansi_green: rgba(0xa9c77dff).into(), + terminal_ansi_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_blue: rgba(0x82aaffff).into(), + terminal_ansi_magenta: rgba(0xc792eaff).into(), + terminal_ansi_cyan: rgba(0x89ddffff).into(), + terminal_ansi_white: rgba(0xffffffff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "b6a27c72-c5b1-431b-8bfe-29e33dbcb337".into(), + name: "Palenight Operator".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x282b3bff).into(), + border_variant: rgba(0x282b3bff).into(), + border_focused: rgba(0x282b3bff).into(), + border_disabled: rgba(0x282b3bff).into(), + border_selected: rgba(0x282b3bff).into(), + border_transparent: rgba(0x282b3bff).into(), + elevated_surface_background: rgba(0x292c3eff).into(), + surface_background: rgba(0x292c3eff).into(), + background: rgba(0x292c3eff).into(), + element_background: rgba(0x7d56c1cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xffffffff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x31364aff).into(), + tab_active_background: rgba(0x292c3eff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x676e95ff).into(), + terminal_ansi_bright_red: rgba(0xff5571ff).into(), + terminal_ansi_bright_green: rgba(0xc3e88dff).into(), + terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_bright_blue: rgba(0x82aaffff).into(), + terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), + terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x676e95ff).into(), + terminal_ansi_red: rgba(0xff5571ff).into(), + terminal_ansi_green: rgba(0xa9c77dff).into(), + terminal_ansi_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_blue: rgba(0x82aaffff).into(), + terminal_ansi_magenta: rgba(0xc792eaff).into(), + terminal_ansi_cyan: rgba(0x89ddffff).into(), + terminal_ansi_white: rgba(0xffffffff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "4015bf85-061c-45ff-81ba-a31f017aac83".into(), + name: "Palenight (Mild Contrast)".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x2c2f40ff).into(), + border_variant: rgba(0x2c2f40ff).into(), + border_focused: rgba(0x2c2f40ff).into(), + border_disabled: rgba(0x2c2f40ff).into(), + border_selected: rgba(0x2c2f40ff).into(), + border_transparent: rgba(0x2c2f40ff).into(), + elevated_surface_background: rgba(0x25283aff).into(), + surface_background: rgba(0x25283aff).into(), + background: rgba(0x292c3eff).into(), + element_background: rgba(0x7d56c1cc).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xffffffff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x31364aff).into(), + tab_active_background: rgba(0x25283aff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x676e95ff).into(), + terminal_ansi_bright_red: rgba(0xff5571ff).into(), + terminal_ansi_bright_green: rgba(0xc3e88dff).into(), + terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_bright_blue: rgba(0x82aaffff).into(), + terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), + terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), + terminal_ansi_bright_white: rgba(0xffffffff).into(), + terminal_ansi_black: rgba(0x676e95ff).into(), + terminal_ansi_red: rgba(0xff5571ff).into(), + terminal_ansi_green: rgba(0xa9c77dff).into(), + terminal_ansi_yellow: rgba(0xffcb6bff).into(), + terminal_ansi_blue: rgba(0x82aaffff).into(), + terminal_ansi_magenta: rgba(0xc792eaff).into(), + terminal_ansi_cyan: rgba(0x89ddffff).into(), + terminal_ansi_white: rgba(0xffffffff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } +} diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs new file mode 100644 index 0000000000000000000000000000000000000000..b367d6196b347c2e7dfe5a05e410262a4ae84310 --- /dev/null +++ b/crates/theme2/src/themes/rose_pine.rs @@ -0,0 +1,491 @@ +use gpui::rgba; + +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +pub fn rose_pine() -> ThemeFamily { + ThemeFamily { + id: "48c308b9-7dbe-4a52-b935-0b44d9dac00d".into(), + name: "Rose Pine".into(), + author: "Rosé Pine".into(), + themes: vec![ + ThemeVariant { + id: "c2832e85-20cb-4a13-924f-026e68123068".into(), + name: "Rose Pine".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x000000ff).into(), + border_variant: rgba(0x000000ff).into(), + border_focused: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), + border_selected: rgba(0x000000ff).into(), + border_transparent: rgba(0x000000ff).into(), + elevated_surface_background: rgba(0x1f1d2eff).into(), + surface_background: rgba(0x1f1d2eff).into(), + background: rgba(0x191724ff).into(), + element_background: rgba(0xebbcbaff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xe0def4ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x000000ff).into(), + tab_active_background: rgba(0x6e6a861a).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x908caaff).into(), + terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), + terminal_ansi_bright_green: rgba(0x30738fff).into(), + terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(), + terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(), + terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(), + terminal_ansi_bright_cyan: rgba(0xebbcbaff).into(), + terminal_ansi_bright_white: rgba(0xe0def4ff).into(), + terminal_ansi_black: rgba(0x26233aff).into(), + terminal_ansi_red: rgba(0xeb6f92ff).into(), + terminal_ansi_green: rgba(0x30738fff).into(), + terminal_ansi_yellow: rgba(0xf5c177ff).into(), + terminal_ansi_blue: rgba(0x9ccfd8ff).into(), + terminal_ansi_magenta: rgba(0xc4a7e7ff).into(), + terminal_ansi_cyan: rgba(0xebbcbaff).into(), + terminal_ansi_white: rgba(0xe0def4ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "3f6c3263-86f4-4a0e-92a6-144984aa2d38".into(), + name: "Rose Moon".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x000000ff).into(), + border_variant: rgba(0x000000ff).into(), + border_focused: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), + border_selected: rgba(0x000000ff).into(), + border_transparent: rgba(0x000000ff).into(), + elevated_surface_background: rgba(0x2a273eff).into(), + surface_background: rgba(0x2a273eff).into(), + background: rgba(0x232136ff).into(), + element_background: rgba(0xea9a97ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xe0def4ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x000000ff).into(), + tab_active_background: rgba(0x817c9c14).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x908caaff).into(), + terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), + terminal_ansi_bright_green: rgba(0x3d8fb0ff).into(), + terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(), + terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(), + terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(), + terminal_ansi_bright_cyan: rgba(0xea9a97ff).into(), + terminal_ansi_bright_white: rgba(0xe0def4ff).into(), + terminal_ansi_black: rgba(0x393552ff).into(), + terminal_ansi_red: rgba(0xeb6f92ff).into(), + terminal_ansi_green: rgba(0x3d8fb0ff).into(), + terminal_ansi_yellow: rgba(0xf5c177ff).into(), + terminal_ansi_blue: rgba(0x9ccfd8ff).into(), + terminal_ansi_magenta: rgba(0xc4a7e7ff).into(), + terminal_ansi_cyan: rgba(0xea9a97ff).into(), + terminal_ansi_white: rgba(0xe0def4ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "d171cda6-de3b-4528-8559-cd8fb71b2e7c".into(), + name: "Rose Pine Dawn".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x000000ff).into(), + border_variant: rgba(0x000000ff).into(), + border_focused: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), + border_selected: rgba(0x000000ff).into(), + border_transparent: rgba(0x000000ff).into(), + elevated_surface_background: rgba(0xfffaf3ff).into(), + surface_background: rgba(0xfffaf3ff).into(), + background: rgba(0xfaf4edff).into(), + element_background: rgba(0xd7827dff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x575279ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0x000000ff).into(), + tab_active_background: rgba(0x6e6a860d).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xfcfcfdff).into(), + terminal_ansi_bright_black: rgba(0x797593ff).into(), + terminal_ansi_bright_red: rgba(0xb3627aff).into(), + terminal_ansi_bright_green: rgba(0x276983ff).into(), + terminal_ansi_bright_yellow: rgba(0xea9d34ff).into(), + terminal_ansi_bright_blue: rgba(0x55949fff).into(), + terminal_ansi_bright_magenta: rgba(0x9079a9ff).into(), + terminal_ansi_bright_cyan: rgba(0xd7827dff).into(), + terminal_ansi_bright_white: rgba(0x575279ff).into(), + terminal_ansi_black: rgba(0xf2e9e1ff).into(), + terminal_ansi_red: rgba(0xb3627aff).into(), + terminal_ansi_green: rgba(0x276983ff).into(), + terminal_ansi_yellow: rgba(0xea9d34ff).into(), + terminal_ansi_blue: rgba(0x55949fff).into(), + terminal_ansi_magenta: rgba(0x9079a9ff).into(), + terminal_ansi_cyan: rgba(0xd7827dff).into(), + terminal_ansi_white: rgba(0x575279ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } +} diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs new file mode 100644 index 0000000000000000000000000000000000000000..d160cfa6524dda6a2deadce08f15032660f2ff0e --- /dev/null +++ b/crates/theme2/src/themes/solarized.rs @@ -0,0 +1,333 @@ +use gpui::rgba; + +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +pub fn solarized() -> ThemeFamily { + ThemeFamily { + id: "9a6f18c9-520f-46ec-9bfb-a7ee73508139".into(), + name: "Solarized".into(), + author: "Ethan Schoonover (altercation)".into(), + themes: vec![ + ThemeVariant { + id: "74003db2-7f9a-4d26-8815-020c796bb551".into(), + name: "Solarized Dark".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x003847ff).into(), + border_variant: rgba(0x003847ff).into(), + border_focused: rgba(0x003847ff).into(), + border_disabled: rgba(0x003847ff).into(), + border_selected: rgba(0x003847ff).into(), + border_transparent: rgba(0x003847ff).into(), + elevated_surface_background: rgba(0x18191bff).into(), + surface_background: rgba(0x18191bff).into(), + background: rgba(0x002a35ff).into(), + element_background: rgba(0x29a19899).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xedeef0ff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x003f51ff).into(), + tab_active_background: rgba(0x002a36ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x586e75ff).into(), + terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), + terminal_ansi_bright_green: rgba(0x859900ff).into(), + terminal_ansi_bright_yellow: rgba(0x657b83ff).into(), + terminal_ansi_bright_blue: rgba(0x839496ff).into(), + terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(), + terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(), + terminal_ansi_bright_white: rgba(0x839496ff).into(), + terminal_ansi_black: rgba(0x063642ff).into(), + terminal_ansi_red: rgba(0xdc312eff).into(), + terminal_ansi_green: rgba(0x859900ff).into(), + terminal_ansi_yellow: rgba(0xb58800ff).into(), + terminal_ansi_blue: rgba(0x258ad2ff).into(), + terminal_ansi_magenta: rgba(0xd33582ff).into(), + terminal_ansi_cyan: rgba(0x29a198ff).into(), + terminal_ansi_white: rgba(0x839496ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ThemeVariant { + id: "43be149b-2604-4eb2-a9ce-c8f902ab3bb3".into(), + name: "Solarized Light".into(), + appearance: Appearance::Light, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0xddd6c1ff).into(), + border_variant: rgba(0xddd6c1ff).into(), + border_focused: rgba(0xddd6c1ff).into(), + border_disabled: rgba(0xddd6c1ff).into(), + border_selected: rgba(0xddd6c1ff).into(), + border_transparent: rgba(0xddd6c1ff).into(), + elevated_surface_background: rgba(0xf9f9fbff).into(), + surface_background: rgba(0xf9f9fbff).into(), + background: rgba(0xfdf6e3ff).into(), + element_background: rgba(0xab9d56ff).into(), + element_hover: rgba(0xe8e8ecff).into(), + element_active: rgba(0xe0e1e6ff).into(), + element_selected: rgba(0xe0e1e6ff).into(), + element_disabled: rgba(0x0000320f).into(), + element_placeholder: rgba(0x60646cff).into(), + element_drop_target: rgba(0x008bff0b).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0xe8e8ecff).into(), + ghost_element_active: rgba(0xe0e1e6ff).into(), + ghost_element_selected: rgba(0xe0e1e6ff).into(), + ghost_element_disabled: rgba(0x0000320f).into(), + text: rgba(0x1c2024ff).into(), + text_muted: rgba(0x60646cff).into(), + text_placeholder: rgba(0x80838dff).into(), + text_disabled: rgba(0x8b8d98ff).into(), + text_accent: rgba(0x0c73ceff).into(), + icon: rgba(0x60646cff).into(), + icon_muted: rgba(0x80838dff).into(), + icon_disabled: rgba(0x8b8d98ff).into(), + icon_placeholder: rgba(0x80838dff).into(), + icon_accent: rgba(0x0c73ceff).into(), + status_bar_background: rgba(0xf9f9fbff).into(), + title_bar_background: rgba(0xf9f9fbff).into(), + toolbar_background: rgba(0xfcfcfdff).into(), + tab_bar_background: rgba(0xf9f9fbff).into(), + tab_inactive_background: rgba(0xd3cbb7ff).into(), + tab_active_background: rgba(0xfdf6e3ff).into(), + editor_background: rgba(0xfcfcfdff).into(), + editor_subheader_background: rgba(0xf9f9fbff).into(), + editor_active_line: rgba(0x0000320f).into(), + terminal_background: rgba(0xfcfcfdff).into(), + terminal_ansi_bright_black: rgba(0x657b83ff).into(), + terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), + terminal_ansi_bright_green: rgba(0x859900ff).into(), + terminal_ansi_bright_yellow: rgba(0x657b83ff).into(), + terminal_ansi_bright_blue: rgba(0x839496ff).into(), + terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(), + terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(), + terminal_ansi_bright_white: rgba(0xeee8d5ff).into(), + terminal_ansi_black: rgba(0x657b83ff).into(), + terminal_ansi_red: rgba(0xdc312eff).into(), + terminal_ansi_green: rgba(0x859900ff).into(), + terminal_ansi_yellow: rgba(0xb58800ff).into(), + terminal_ansi_blue: rgba(0x258ad2ff).into(), + terminal_ansi_magenta: rgba(0xd33582ff).into(), + terminal_ansi_cyan: rgba(0x29a198ff).into(), + terminal_ansi_white: rgba(0xeee8d5ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }, + ], + scales: default_color_scales(), + } +} diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs new file mode 100644 index 0000000000000000000000000000000000000000..cfe81bef424db8d1352d993c638c0002399767e0 --- /dev/null +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -0,0 +1,173 @@ +use gpui::rgba; + +use crate::{ + default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, + SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, +}; + +pub fn synthwave_84() -> ThemeFamily { + ThemeFamily { + id: "5e0f0cd5-5522-45cf-a652-caeb140eb3de".into(), + name: "Synthwave 84".into(), + author: "Robb Owen (robb0wen)".into(), + themes: vec![ThemeVariant { + id: "83110d9e-dbf0-4f36-9a4c-6b396ce9a5a4".into(), + name: "Synthwave 84".into(), + appearance: Appearance::Dark, + styles: ThemeStyles { + system: SystemColors { + transparent: rgba(0x00000000).into(), + mac_os_traffic_light_red: rgba(0xec6b5fff).into(), + mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), + mac_os_traffic_light_green: rgba(0x61c454ff).into(), + }, + colors: ThemeColors { + border: rgba(0x363a3fff).into(), + border_variant: rgba(0x2e3135ff).into(), + border_focused: rgba(0x004073ff).into(), + border_disabled: rgba(0x212225ff).into(), + border_selected: rgba(0x004073ff).into(), + border_transparent: rgba(0x00000000).into(), + elevated_surface_background: rgba(0x18191bff).into(), + surface_background: rgba(0x18191bff).into(), + background: rgba(0x252334ff).into(), + element_background: rgba(0x614d85ff).into(), + element_hover: rgba(0x272a2dff).into(), + element_active: rgba(0x2e3135ff).into(), + element_selected: rgba(0x2e3135ff).into(), + element_disabled: rgba(0xddeaf814).into(), + element_placeholder: rgba(0xb0b4baff).into(), + element_drop_target: rgba(0x1166fb18).into(), + ghost_element_background: rgba(0x00000000).into(), + ghost_element_hover: rgba(0x272a2dff).into(), + ghost_element_active: rgba(0x2e3135ff).into(), + ghost_element_selected: rgba(0x2e3135ff).into(), + ghost_element_disabled: rgba(0xddeaf814).into(), + text: rgba(0xffffffff).into(), + text_muted: rgba(0xb0b4baff).into(), + text_placeholder: rgba(0x767a83ff).into(), + text_disabled: rgba(0x696e77ff).into(), + text_accent: rgba(0x6fb8ffff).into(), + icon: rgba(0xb0b4baff).into(), + icon_muted: rgba(0x767a83ff).into(), + icon_disabled: rgba(0x696e77ff).into(), + icon_placeholder: rgba(0x767a83ff).into(), + icon_accent: rgba(0x6fb8ffff).into(), + status_bar_background: rgba(0x18191bff).into(), + title_bar_background: rgba(0x18191bff).into(), + toolbar_background: rgba(0x111113ff).into(), + tab_bar_background: rgba(0x18191bff).into(), + tab_inactive_background: rgba(0x252334ff).into(), + tab_active_background: rgba(0x111113ff).into(), + editor_background: rgba(0x111113ff).into(), + editor_subheader_background: rgba(0x18191bff).into(), + editor_active_line: rgba(0xddeaf814).into(), + terminal_background: rgba(0x111113ff).into(), + terminal_ansi_bright_black: rgba(0x000000e6).into(), + terminal_ansi_bright_red: rgba(0xfe444fff).into(), + terminal_ansi_bright_green: rgba(0x71f1b7ff).into(), + terminal_ansi_bright_yellow: rgba(0xfede5cff).into(), + terminal_ansi_bright_blue: rgba(0x02edf9ff).into(), + terminal_ansi_bright_magenta: rgba(0xff7ddaff).into(), + terminal_ansi_bright_cyan: rgba(0x02edf9ff).into(), + terminal_ansi_bright_white: rgba(0xb0b4baff).into(), + terminal_ansi_black: rgba(0x000000f2).into(), + terminal_ansi_red: rgba(0xfe444fff).into(), + terminal_ansi_green: rgba(0x71f1b7ff).into(), + terminal_ansi_yellow: rgba(0xf3e70fff).into(), + terminal_ansi_blue: rgba(0x02edf9ff).into(), + terminal_ansi_magenta: rgba(0xff7ddaff).into(), + terminal_ansi_cyan: rgba(0x02edf9ff).into(), + terminal_ansi_white: rgba(0xedeef0ff).into(), + }, + status: StatusColors { + conflict: rgba(0xff9592ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + error: rgba(0xff9592ff).into(), + hidden: rgba(0xb0b4baff).into(), + ignored: rgba(0xb0b4baff).into(), + info: rgba(0x6fb8ffff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + success: rgba(0x70cf82ff).into(), + warning: rgba(0xf5e147ff).into(), + }, + git: GitStatusColors { + conflict: rgba(0xffa057ff).into(), + created: rgba(0x70cf82ff).into(), + deleted: rgba(0xff9592ff).into(), + ignored: rgba(0xb0b4baff).into(), + modified: rgba(0xf5e147ff).into(), + renamed: rgba(0x6fb8ffff).into(), + }, + player: PlayerColors(vec![ + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + PlayerColor { + cursor: rgba(0x00000000).into(), + background: rgba(0x00000000).into(), + selection: rgba(0x00000000).into(), + }, + ]), + syntax: SyntaxTheme { + highlights: vec![ + ("attribute".into(), rgba(0x4ccce6ff).into()), + ("boolean".into(), rgba(0xff977dff).into()), + ("comment".into(), rgba(0xb0b4baff).into()), + ("comment.doc".into(), rgba(0xe0dffeff).into()), + ("constant".into(), rgba(0x8c323aff).into()), + ("constructor".into(), rgba(0x8c323aff).into()), + ("embedded".into(), rgba(0x8c323aff).into()), + ("emphasis".into(), rgba(0x8c323aff).into()), + ("emphasis.strong".into(), rgba(0x8c323aff).into()), + ("enum".into(), rgba(0x8c323aff).into()), + ("function".into(), rgba(0x8c323aff).into()), + ("hint".into(), rgba(0x8c323aff).into()), + ("keyword".into(), rgba(0xffa057ff).into()), + ("label".into(), rgba(0x8c323aff).into()), + ("link_text".into(), rgba(0x8c323aff).into()), + ("link_uri".into(), rgba(0x8c323aff).into()), + ("number".into(), rgba(0x8c323aff).into()), + ("operator".into(), rgba(0x8c323aff).into()), + ("predictive".into(), rgba(0x8c323aff).into()), + ("preproc".into(), rgba(0x8c323aff).into()), + ("primary".into(), rgba(0x8c323aff).into()), + ("property".into(), rgba(0x8c323aff).into()), + ("punctuation".into(), rgba(0xb0b4baff).into()), + ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), + ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), + ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), + ("punctuation.special".into(), rgba(0x8c323aff).into()), + ("string".into(), rgba(0x1ed8a3ff).into()), + ("string.escape".into(), rgba(0x8c323aff).into()), + ("string.regex".into(), rgba(0xff977dff).into()), + ("string.special".into(), rgba(0x8c323aff).into()), + ("string.special.symbol".into(), rgba(0x8c323aff).into()), + ("tag".into(), rgba(0x8c323aff).into()), + ("text.literal".into(), rgba(0x8c323aff).into()), + ("title".into(), rgba(0x8c323aff).into()), + ("type".into(), rgba(0x8c323aff).into()), + ("variable".into(), rgba(0x8c323aff).into()), + ("variable.special".into(), rgba(0x8c323aff).into()), + ("variant".into(), rgba(0x8c323aff).into()), + ], + }, + }, + }], + scales: default_color_scales(), + } +} diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index 3fd2b71ac0a3721e702d7f9b46be4f2e5215ea19..bd264bcb5521c840e65d0b833fcecd9f8b965238 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -55,22 +55,6 @@ fn main() -> Result<()> { SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); - let themes_output_path = PathBuf::from_str(OUT_PATH)?; - - if !themes_output_path.exists() { - println!("Creating directory: {:?}", themes_output_path); - fs::create_dir_all(&themes_output_path)?; - } - - // We create mod.rs at the beginning to prevent `mod themes;`/`pub use themes::*;` from being - // invalid in the theme crate root. - println!( - "Creating file: {:?}", - themes_output_path.join(format!("mod.rs")) - ); - - let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; - println!("Loading themes source..."); let vscode_themes_path = PathBuf::from_str(SOURCE_PATH)?; if !vscode_themes_path.exists() { @@ -147,6 +131,15 @@ fn main() -> Result<()> { theme_families.push(theme_family); } + let themes_output_path = PathBuf::from_str(OUT_PATH)?; + + if !themes_output_path.exists() { + println!("Creating directory: {:?}", themes_output_path); + fs::create_dir_all(&themes_output_path)?; + } + + let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?; + let mut theme_modules = Vec::new(); for theme_family in theme_families { From 3f7dc5951292d2fd717dde46891e7695a07324e5 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 6 Nov 2023 12:33:20 -0800 Subject: [PATCH 038/110] Snapshot for kirill --- Cargo.lock | 17 ++ Cargo.toml | 1 + crates/gpui2/src/elements.rs | 1 + crates/gpui2/src/elements/img.rs | 2 + crates/gpui2/src/elements/list.rs | 91 +++++++ crates/picker2/Cargo.toml | 28 +++ crates/picker2/src/picker2.rs | 400 ++++++++++++++++++++++++++++++ 7 files changed, 540 insertions(+) create mode 100644 crates/gpui2/src/elements/list.rs create mode 100644 crates/picker2/Cargo.toml create mode 100644 crates/picker2/src/picker2.rs diff --git a/Cargo.lock b/Cargo.lock index 6d5fdc67d74a9a23f28aadf0497e760ad143b38d..3a888cfd23b2a8220d5520ead920de9ccfaa94e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6006,6 +6006,23 @@ dependencies = [ "workspace", ] +[[package]] +name = "picker2" +version = "0.1.0" +dependencies = [ + "ctor", + "editor2", + "env_logger 0.9.3", + "gpui2", + "menu2", + "parking_lot 0.11.2", + "serde_json", + "settings2", + "theme2", + "util", + "workspace2", +] + [[package]] name = "pico-args" version = "0.4.2" diff --git a/Cargo.toml b/Cargo.toml index 6245889530bcefc9ea01a42efb49c1365859eb1c..853053f2c848a38ce3ef3957e31d7ba843d0d0df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,6 +67,7 @@ members = [ "crates/notifications", "crates/outline", "crates/picker", + "crates/picker2", "crates/plugin", "crates/plugin_macros", "crates/plugin_runtime", diff --git a/crates/gpui2/src/elements.rs b/crates/gpui2/src/elements.rs index 83c27b8a3b1a88e6dee517c485f5f99ea1df7a93..dc8baf4ca59f4cf7f3d28ade11490594038b8786 100644 --- a/crates/gpui2/src/elements.rs +++ b/crates/gpui2/src/elements.rs @@ -1,5 +1,6 @@ mod div; mod img; +mod list; mod svg; mod text; diff --git a/crates/gpui2/src/elements/img.rs b/crates/gpui2/src/elements/img.rs index a35436d74ec9f668e4081eb9a9c0f1ea4168a914..637bcd78e626140a17bd39766303eb97e0ff9d32 100644 --- a/crates/gpui2/src/elements/img.rs +++ b/crates/gpui2/src/elements/img.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use crate::{ div, AnyElement, BorrowWindow, Bounds, Component, Div, DivState, Element, ElementFocus, ElementId, ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable, diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/list.rs new file mode 100644 index 0000000000000000000000000000000000000000..647d59586e6f59187053b4f0306620769ee5774e --- /dev/null +++ b/crates/gpui2/src/elements/list.rs @@ -0,0 +1,91 @@ +use std::ops::Range; + +use smallvec::SmallVec; + +use crate::{AnyElement, Component, Element, ElementId, StyleRefinement, ViewContext}; + +// We want to support uniform and non-uniform height +// We need to make the ID mandatory, to replace the 'state' field +// Previous implementation measured the first element as early as possible + +fn list<'a, Id, V, Iter, C>( + id: Id, + f: impl 'static + FnOnce(&'a mut V, Range, &'a mut ViewContext) -> Iter, +) -> List +where + Id: Into, + V: 'static, + Iter: 'a + Iterator, + C: Component, +{ + List { + id: id.into(), + render_items: Box::new(|view, visible_range, cx| { + f(view, visible_range, cx) + .map(|element| element.render()) + .collect() + }), + } +} + +struct List { + id: ElementId, + render_items: Box< + dyn for<'a> FnOnce( + &'a mut V, + Range, + &'a mut ViewContext, + ) -> SmallVec<[AnyElement; 64]>, + >, +} + +impl List {} + +// #[derive(Debug)] +// pub enum ScrollTarget { +// Show(usize), +// Center(usize), +// } + +#[derive(Default)] +struct ListState { + scroll_top: f32, + style: StyleRefinement, + // todo + // scroll_to: Option, +} +impl Element for List { + type ElementState = ListState; + + fn id(&self) -> Option { + Some(self.id) + } + + fn initialize( + &mut self, + _: &mut V, + element_state: Option, + _: &mut crate::ViewContext, + ) -> Self::ElementState { + let element_state = element_state.unwrap_or_default(); + element_state + } + + fn layout( + &mut self, + view_state: &mut V, + element_state: &mut Self::ElementState, + cx: &mut crate::ViewContext, + ) -> crate::LayoutId { + todo!() + } + + fn paint( + &mut self, + bounds: crate::Bounds, + view_state: &mut V, + element_state: &mut Self::ElementState, + cx: &mut crate::ViewContext, + ) { + } +} diff --git a/crates/picker2/Cargo.toml b/crates/picker2/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..8d88c25366fa52bcaa20018503608d3dd86ebbf2 --- /dev/null +++ b/crates/picker2/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "picker2" +version = "0.1.0" +edition = "2021" +publish = false + +[lib] +path = "src/picker2.rs" +doctest = false + +[dependencies] +editor = { package = "editor2", path = "../editor2" } +gpui = { package = "gpui2", path = "../gpui2" } +menu = { package = "menu2", path = "../menu2" } +settings = { package = "settings2", path = "../settings2" } +util = { path = "../util" } +theme = { package = "theme2", path = "../theme2" } +workspace = { package = "workspace2", path = "../workspace2" } + +parking_lot.workspace = true + +[dev-dependencies] +editor = { package = "editor2", path = "../editor2", features = ["test-support"] } +gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] } +serde_json.workspace = true +workspace = { package = "workspace2", path = "../workspace2", features = ["test-support"] } +ctor.workspace = true +env_logger.workspace = true diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs new file mode 100644 index 0000000000000000000000000000000000000000..c6c5ee3e41e78b18fb84143d0ff448873d31cc5b --- /dev/null +++ b/crates/picker2/src/picker2.rs @@ -0,0 +1,400 @@ +// use editor::Editor; +// use gpui::{ +// elements::*, +// geometry::vector::{vec2f, Vector2F}, +// keymap_matcher::KeymapContext, +// platform::{CursorStyle, MouseButton}, +// AnyElement, AnyViewHandle, AppContext, Axis, Entity, MouseState, Task, View, ViewContext, +// ViewHandle, +// }; +// use menu::{Cancel, Confirm, SecondaryConfirm, SelectFirst, SelectLast, SelectNext, SelectPrev}; +// use parking_lot::Mutex; +// use std::{cmp, sync::Arc}; +// use util::ResultExt; +// use workspace::Modal; + +// #[derive(Clone, Copy)] +// pub enum PickerEvent { +// Dismiss, +// } + +use std::ops::Range; + +use gpui::{div, AppContext, Component, Div, Element, ParentElement, Render, ViewContext}; + +pub struct Picker { + delegate: D, + // query_editor: ViewHandle, + // list_state: UniformListState, + // max_size: Vector2F, + // theme: Arc theme::Picker>>>, + // confirmed: bool, + // pending_update_matches: Option>>, + // confirm_on_update: Option, + // has_focus: bool, +} + +pub trait PickerDelegate: Sized + 'static { + type ListItem: Element>; + // fn placeholder_text(&self) -> Arc; + // fn match_count(&self) -> usize; + // fn selected_index(&self) -> usize; + // fn set_selected_index(&mut self, ix: usize, cx: &mut ViewContext>); + // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; + // fn confirm(&mut self, secondary: bool, cx: &mut ViewContext>); + // fn dismissed(&mut self, cx: &mut ViewContext>); + + // todo!("rename to render_candidate?") + fn render_match( + &self, + ix: usize, + active: bool, + hovered: bool, + selected: bool, + cx: &mut ViewContext>, + ) -> Self::ListItem; + + // fn center_selection_after_match_updates(&self) -> bool { + // false + // } + // fn render_header( + // &self, + // _cx: &mut ViewContext>, + // ) -> Option>> { + // None + // } + // fn render_footer( + // &self, + // _cx: &mut ViewContext>, + // ) -> Option>> { + // None + // } +} + +// impl Entity for Picker { +// type Event = PickerEvent; +// } + +impl Render for Picker { + type Element = Div; + + fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { + div().child(list( + "candidates", + |this: &mut Picker, visible_range, cx| { + visible_range + .into_iter() + .map(|ix| this.delegate.render_match(ix, false, false, false, cx)) + }, + )) + } +} + +fn list<'a, D: PickerDelegate, F, I>(id: &'static str, f: F) -> Div> +where + F: FnOnce(&'a mut Picker, Range, &'a mut ViewContext>) -> I, + I: 'a + Iterator, +{ + todo!(); +} + +// impl View for Picker { +// fn ui_name() -> &'static str { +// "Picker" +// } + +// fn render(&mut self, cx: &mut ViewContext) -> AnyElement { +// let theme = (self.theme.lock())(theme::current(cx).as_ref()); +// let query = self.query(cx); +// let match_count = self.delegate.match_count(); + +// let container_style; +// let editor_style; +// if query.is_empty() && match_count == 0 { +// container_style = theme.empty_container; +// editor_style = theme.empty_input_editor.container; +// } else { +// container_style = theme.container; +// editor_style = theme.input_editor.container; +// }; + +// Flex::new(Axis::Vertical) +// .with_child( +// ChildView::new(&self.query_editor, cx) +// .contained() +// .with_style(editor_style), +// ) +// .with_children(self.delegate.render_header(cx)) +// .with_children(if match_count == 0 { +// if query.is_empty() { +// None +// } else { +// Some( +// Label::new("No matches", theme.no_matches.label.clone()) +// .contained() +// .with_style(theme.no_matches.container) +// .into_any(), +// ) +// } +// } else { +// Some( +// UniformList::new( +// self.list_state.clone(), +// match_count, +// cx, +// move |this, mut range, items, cx| { +// let selected_ix = this.delegate.selected_index(); +// range.end = cmp::min(range.end, this.delegate.match_count()); +// items.extend(range.map(move |ix| { +// MouseEventHandler::new::(ix, cx, |state, cx| { +// this.delegate.render_match(ix, state, ix == selected_ix, cx) +// }) +// // Capture mouse events +// .on_down(MouseButton::Left, |_, _, _| {}) +// .on_up(MouseButton::Left, |_, _, _| {}) +// .on_click(MouseButton::Left, move |click, picker, cx| { +// picker.select_index(ix, click.cmd, cx); +// }) +// .with_cursor_style(CursorStyle::PointingHand) +// .into_any() +// })); +// }, +// ) +// .contained() +// .with_margin_top(6.0) +// .flex(1., false) +// .into_any(), +// ) +// }) +// .with_children(self.delegate.render_footer(cx)) +// .contained() +// .with_style(container_style) +// .constrained() +// .with_max_width(self.max_size.x()) +// .with_max_height(self.max_size.y()) +// .into_any_named("picker") +// } + +// fn update_keymap_context(&self, keymap: &mut KeymapContext, _: &AppContext) { +// Self::reset_to_default_keymap_context(keymap); +// keymap.add_identifier("menu"); +// } + +// fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext) { +// self.has_focus = true; +// if cx.is_self_focused() { +// cx.focus(&self.query_editor); +// } +// } + +// fn focus_out(&mut self, _: AnyViewHandle, _: &mut ViewContext) { +// self.has_focus = false; +// } +// } + +// impl Modal for Picker { +// fn has_focus(&self) -> bool { +// self.has_focus +// } + +// fn dismiss_on_event(event: &Self::Event) -> bool { +// matches!(event, PickerEvent::Dismiss) +// } +// } + +// impl Picker { +// pub fn init(cx: &mut AppContext) { +// cx.add_action(Self::select_first); +// cx.add_action(Self::select_last); +// cx.add_action(Self::select_next); +// cx.add_action(Self::select_prev); +// cx.add_action(Self::confirm); +// cx.add_action(Self::secondary_confirm); +// cx.add_action(Self::cancel); +// } + +// pub fn new(delegate: D, cx: &mut ViewContext) -> Self { +// let theme = Arc::new(Mutex::new( +// Box::new(|theme: &theme::Theme| theme.picker.clone()) +// as Box theme::Picker>, +// )); +// let placeholder_text = delegate.placeholder_text(); +// let query_editor = cx.add_view({ +// let picker_theme = theme.clone(); +// |cx| { +// let mut editor = Editor::single_line( +// Some(Arc::new(move |theme| { +// (picker_theme.lock())(theme).input_editor.clone() +// })), +// cx, +// ); +// editor.set_placeholder_text(placeholder_text, cx); +// editor +// } +// }); +// cx.subscribe(&query_editor, Self::on_query_editor_event) +// .detach(); +// let mut this = Self { +// query_editor, +// list_state: Default::default(), +// delegate, +// max_size: vec2f(540., 420.), +// theme, +// confirmed: false, +// pending_update_matches: None, +// confirm_on_update: None, +// has_focus: false, +// }; +// this.update_matches(String::new(), cx); +// this +// } + +// pub fn with_max_size(mut self, width: f32, height: f32) -> Self { +// self.max_size = vec2f(width, height); +// self +// } + +// pub fn with_theme(self, theme: F) -> Self +// where +// F: 'static + Fn(&theme::Theme) -> theme::Picker, +// { +// *self.theme.lock() = Box::new(theme); +// self +// } + +// pub fn delegate(&self) -> &D { +// &self.delegate +// } + +// pub fn delegate_mut(&mut self) -> &mut D { +// &mut self.delegate +// } + +// pub fn query(&self, cx: &AppContext) -> String { +// self.query_editor.read(cx).text(cx) +// } + +// pub fn set_query(&self, query: impl Into>, cx: &mut ViewContext) { +// self.query_editor +// .update(cx, |editor, cx| editor.set_text(query, cx)); +// } + +// fn on_query_editor_event( +// &mut self, +// _: ViewHandle, +// event: &editor::Event, +// cx: &mut ViewContext, +// ) { +// match event { +// editor::Event::BufferEdited { .. } => self.update_matches(self.query(cx), cx), +// editor::Event::Blurred if !self.confirmed => { +// self.dismiss(cx); +// } +// _ => {} +// } +// } + +// pub fn update_matches(&mut self, query: String, cx: &mut ViewContext) { +// let update = self.delegate.update_matches(query, cx); +// self.matches_updated(cx); +// self.pending_update_matches = Some(cx.spawn(|this, mut cx| async move { +// update.await; +// this.update(&mut cx, |this, cx| { +// this.matches_updated(cx); +// }) +// .log_err() +// })); +// } + +// fn matches_updated(&mut self, cx: &mut ViewContext) { +// let index = self.delegate.selected_index(); +// let target = if self.delegate.center_selection_after_match_updates() { +// ScrollTarget::Center(index) +// } else { +// ScrollTarget::Show(index) +// }; +// self.list_state.scroll_to(target); +// self.pending_update_matches = None; +// if let Some(secondary) = self.confirm_on_update.take() { +// self.confirmed = true; +// self.delegate.confirm(secondary, cx) +// } +// cx.notify(); +// } + +// pub fn select_first(&mut self, _: &SelectFirst, cx: &mut ViewContext) { +// if self.delegate.match_count() > 0 { +// self.delegate.set_selected_index(0, cx); +// self.list_state.scroll_to(ScrollTarget::Show(0)); +// } + +// cx.notify(); +// } + +// pub fn select_index(&mut self, index: usize, cmd: bool, cx: &mut ViewContext) { +// if self.delegate.match_count() > 0 { +// self.confirmed = true; +// self.delegate.set_selected_index(index, cx); +// self.delegate.confirm(cmd, cx); +// } +// } + +// pub fn select_last(&mut self, _: &SelectLast, cx: &mut ViewContext) { +// let match_count = self.delegate.match_count(); +// if match_count > 0 { +// let index = match_count - 1; +// self.delegate.set_selected_index(index, cx); +// self.list_state.scroll_to(ScrollTarget::Show(index)); +// } +// cx.notify(); +// } + +// pub fn select_next(&mut self, _: &SelectNext, cx: &mut ViewContext) { +// let next_index = self.delegate.selected_index() + 1; +// if next_index < self.delegate.match_count() { +// self.delegate.set_selected_index(next_index, cx); +// self.list_state.scroll_to(ScrollTarget::Show(next_index)); +// } + +// cx.notify(); +// } + +// pub fn select_prev(&mut self, _: &SelectPrev, cx: &mut ViewContext) { +// let mut selected_index = self.delegate.selected_index(); +// if selected_index > 0 { +// selected_index -= 1; +// self.delegate.set_selected_index(selected_index, cx); +// self.list_state +// .scroll_to(ScrollTarget::Show(selected_index)); +// } + +// cx.notify(); +// } + +// pub fn confirm(&mut self, _: &Confirm, cx: &mut ViewContext) { +// if self.pending_update_matches.is_some() { +// self.confirm_on_update = Some(false) +// } else { +// self.confirmed = true; +// self.delegate.confirm(false, cx); +// } +// } + +// pub fn secondary_confirm(&mut self, _: &SecondaryConfirm, cx: &mut ViewContext) { +// if self.pending_update_matches.is_some() { +// self.confirm_on_update = Some(true) +// } else { +// self.confirmed = true; +// self.delegate.confirm(true, cx); +// } +// } + +// fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext) { +// self.dismiss(cx); +// } + +// fn dismiss(&mut self, cx: &mut ViewContext) { +// cx.emit(PickerEvent::Dismiss); +// self.delegate.dismissed(cx); +// } +// } From 2931d32499875a90c5de7bb59321adb19c98cd0c Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 16:00:57 -0500 Subject: [PATCH 039/110] Add a README for `theme_importer` --- crates/theme_importer/README.md | 124 ++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 crates/theme_importer/README.md diff --git a/crates/theme_importer/README.md b/crates/theme_importer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a610d694d707d355c223c79b9581c21ab13072ce --- /dev/null +++ b/crates/theme_importer/README.md @@ -0,0 +1,124 @@ +# Zed Theme Importer + +--- + +## Usage + +- `cargo run -p theme_importer` - Import the context of `assets/themes/src` + +--- + +## Troubleshooting + +As the importer generates rust files, you may need to manually do some cleanup in `registry.rs` and `themes/mod.rs` if you remove themes or delete the `themes` folder in the theme crate. + +--- + +## Required Structure + +To import a theme or series of themes 3 things are required: + +- `family.json`: A JSON file containing the theme family metadata and list of theme variants +- `{theme_name}.json`: One theme json for each theme variant +- `LICENSE`: A license file for the theme family + +### `family.json` + +#### `name` + +The name of the theme family. Avoid special characters. + +This will be used for the theme family directory name (lowercased) and the theme family name in the Zed UI. + +Good: + +- `Rose Pine` +- `Synthwave 84` +- `Monokai Solarized` + +Bad: + +- `Rosé Pine` +- `Synthwave '84` +- `Monokai (Solarized)` + +#### `author` + +The author of the theme family. This can be a name or a username. + +This will be used for the theme family author in the Zed UI. + +#### `themes` + +A list of theme variants. + +`appearance` can be either `light` or `dark`. This will impact which default fallback colors are used, and where the theme shows up in the Zed UI. + +### `{theme_name}.json` + +Each theme added to the family must have a corresponding JSON file. This JSON file can be obtained from the VSCode extensions folder (once you have installed it.) This is usually located at `~/.vscode/extensions` (on macOS). + +You can use `open ~/.vscode/extensions` to open the folder in Finder directly. + +Copy that json file into the theme family directory and tidy up the filenames as needed. + +### `LICENSE` + +A LICENSE file is required to import a theme family. Failing to provide a complete text license will cause it to be skipped when the import is run. + +If the theme only provices a license code (e.g. MIT, Apache 2.0, etc.) then put that code into the LICENSE file. + +If no license is provided, either contact the theme creator or don't add the theme. + +--- + +### Complete Example: + +An example family with multiple variants: + +```json +{ + "name": "Ayu", + // When both name and username are available + // prefer the `username (name)` format + "author": "dempfi (Ike Ku)", + "themes": [ + { + "name": "Ayu Light", + "file_name": "ayu-light.json", + "appearance": "light" + }, + { + "name": "Ayu Mirage", + "file_name": "ayu-mirage.json", + "appearance": "dark" + }, + { + "name": "Ayu Dark", + "file_name": "ayu-dark.json", + "appearance": "dark" + } + ] +} +``` + +An example single variant family: + +```json +{ + "name": "Andromeda", + "author": "Eliver Lara (EliverLara)", + "themes": [ + { + "name": "Andromeda", + "file_name": "andromeda.json", + "appearance": "dark" + }, + { + "name": "Andromeda Bordered", + "file_name": "andromeda-bordered.json", + "appearance": "dark" + } + ] +} +``` From eac7c3cea91fef3c0811751ba019ad89dc3b5474 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 6 Nov 2023 16:02:21 -0500 Subject: [PATCH 040/110] Update Cargo.toml --- crates/theme_importer/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/theme_importer/Cargo.toml b/crates/theme_importer/Cargo.toml index 443cc2e50bdd5ab5a78e4b3b47f04c807793936f..1c86349e968bad43da86d286cd30cf58e3cd743b 100644 --- a/crates/theme_importer/Cargo.toml +++ b/crates/theme_importer/Cargo.toml @@ -2,6 +2,7 @@ name = "theme_importer" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From ea6755b1cabd70098b308d632ba7a64a630f84fb Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 6 Nov 2023 14:26:10 -0800 Subject: [PATCH 041/110] Checkpoint --- Cargo.lock | 1 + crates/editor2/src/element.rs | 2 +- crates/gpui2/src/app/entity_map.rs | 6 +- crates/gpui2/src/elements.rs | 1 + crates/gpui2/src/elements/list.rs | 107 +++++++++++++++++++----- crates/gpui2/src/geometry.rs | 41 ++++++--- crates/gpui2/src/styled.rs | 7 +- crates/gpui2/src/window.rs | 6 ++ crates/picker2/src/picker2.rs | 78 +++++++++-------- crates/storybook2/Cargo.toml | 1 + crates/storybook2/src/stories.rs | 2 + crates/storybook2/src/stories/picker.rs | 40 +++++++++ crates/storybook2/src/story_selector.rs | 2 + crates/terminal2/src/mappings/mouse.rs | 4 +- crates/terminal2/src/terminal2.rs | 11 ++- 15 files changed, 232 insertions(+), 77 deletions(-) create mode 100644 crates/storybook2/src/stories/picker.rs diff --git a/Cargo.lock b/Cargo.lock index 3a888cfd23b2a8220d5520ead920de9ccfaa94e4..98feaf9f61053e7d7ae701c3b72f7e3411b45111 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8542,6 +8542,7 @@ dependencies = [ "gpui2", "itertools 0.11.0", "log", + "picker2", "rust-embed", "serde", "settings2", diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 6420d1e6cd6482ac99e79f3de0dfbd3c2963359c..4e42124c02dbfbd07e5c7a8d6792e0d2e91e5c80 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2834,7 +2834,7 @@ impl PositionMap { let previous_valid = self.snapshot.clip_point(exact_unclipped, Bias::Left); let next_valid = self.snapshot.clip_point(exact_unclipped, Bias::Right); - let column_overshoot_after_line_end = (x_overshoot_after_line_end / self.em_advance).into(); + let column_overshoot_after_line_end = (x_overshoot_after_line_end / self.em_advance) as u32; *exact_unclipped.column_mut() += column_overshoot_after_line_end; PointForPosition { previous_valid, diff --git a/crates/gpui2/src/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rs index e626f8c409d2a80ac9f7ac2116741855f7e5beb3..588091c7a0bb1e3027b3a81cc0be2fa55f98e0f3 100644 --- a/crates/gpui2/src/app/entity_map.rs +++ b/crates/gpui2/src/app/entity_map.rs @@ -13,6 +13,7 @@ use std::{ atomic::{AtomicUsize, Ordering::SeqCst}, Arc, Weak, }, + thread::panicking, }; slotmap::new_key_type! { pub struct EntityId; } @@ -140,9 +141,8 @@ impl<'a, T: 'static> core::ops::DerefMut for Lease<'a, T> { impl<'a, T> Drop for Lease<'a, T> { fn drop(&mut self) { - if self.entity.is_some() { - // We don't panic here, because other panics can cause us to drop the lease without ending it cleanly. - log::error!("Leases must be ended with EntityMap::end_lease") + if self.entity.is_some() && !panicking() { + panic!("Leases must be ended with EntityMap::end_lease") } } } diff --git a/crates/gpui2/src/elements.rs b/crates/gpui2/src/elements.rs index dc8baf4ca59f4cf7f3d28ade11490594038b8786..3ebe5bf5d1fbb4196c91885c230d23fd0d5aa170 100644 --- a/crates/gpui2/src/elements.rs +++ b/crates/gpui2/src/elements.rs @@ -6,5 +6,6 @@ mod text; pub use div::*; pub use img::*; +pub use list::*; pub use svg::*; pub use text::*; diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/list.rs index 647d59586e6f59187053b4f0306620769ee5774e..01a64f7bd12f8559d30e00a0d51736b00e3982a3 100644 --- a/crates/gpui2/src/elements/list.rs +++ b/crates/gpui2/src/elements/list.rs @@ -2,36 +2,44 @@ use std::ops::Range; use smallvec::SmallVec; -use crate::{AnyElement, Component, Element, ElementId, StyleRefinement, ViewContext}; +use crate::{ + point, px, AnyElement, AvailableSpace, BorrowWindow, Bounds, Component, Element, ElementId, + LayoutId, Pixels, Size, StyleRefinement, Styled, ViewContext, +}; // We want to support uniform and non-uniform height // We need to make the ID mandatory, to replace the 'state' field // Previous implementation measured the first element as early as possible -fn list<'a, Id, V, Iter, C>( +pub fn list( id: Id, - f: impl 'static + FnOnce(&'a mut V, Range, &'a mut ViewContext) -> Iter, + item_count: usize, + f: impl 'static + Fn(&mut V, Range, &mut ViewContext) -> SmallVec<[C; 64]>, ) -> List where Id: Into, V: 'static, - Iter: 'a + Iterator, C: Component, { List { id: id.into(), - render_items: Box::new(|view, visible_range, cx| { + style: Default::default(), + item_count, + render_items: Box::new(move |view, visible_range, cx| { f(view, visible_range, cx) - .map(|element| element.render()) + .into_iter() + .map(|component| component.render()) .collect() }), } } -struct List { +pub struct List { id: ElementId, + style: StyleRefinement, + item_count: usize, render_items: Box< - dyn for<'a> FnOnce( + dyn for<'a> Fn( &'a mut V, Range, &'a mut ViewContext, @@ -39,8 +47,6 @@ struct List { >, } -impl List {} - // #[derive(Debug)] // pub enum ScrollTarget { // Show(usize), @@ -48,24 +54,30 @@ impl List {} // } #[derive(Default)] -struct ListState { +pub struct ListState { scroll_top: f32, - style: StyleRefinement, // todo // scroll_to: Option, } + +impl Styled for List { + fn style(&mut self) -> &mut StyleRefinement { + &mut self.style + } +} + impl Element for List { type ElementState = ListState; fn id(&self) -> Option { - Some(self.id) + Some(self.id.clone()) } fn initialize( &mut self, _: &mut V, element_state: Option, - _: &mut crate::ViewContext, + _: &mut ViewContext, ) -> Self::ElementState { let element_state = element_state.unwrap_or_default(); element_state @@ -73,11 +85,11 @@ impl Element for List { fn layout( &mut self, - view_state: &mut V, - element_state: &mut Self::ElementState, - cx: &mut crate::ViewContext, - ) -> crate::LayoutId { - todo!() + _view_state: &mut V, + _element_state: &mut Self::ElementState, + cx: &mut ViewContext, + ) -> LayoutId { + cx.request_layout(&self.computed_style(), None) } fn paint( @@ -85,7 +97,62 @@ impl Element for List { bounds: crate::Bounds, view_state: &mut V, element_state: &mut Self::ElementState, - cx: &mut crate::ViewContext, + cx: &mut ViewContext, ) { + let style = self.computed_style(); + style.paint(bounds, cx); + + let border = style.border_widths.to_pixels(cx.rem_size()); + let padding = style.padding.to_pixels(bounds.size.into(), cx.rem_size()); + + let padded_bounds = Bounds::from_corners( + bounds.origin + point(border.left + padding.left, border.top + padding.top), + bounds.lower_right() + - point(border.right + padding.right, border.bottom + padding.bottom), + ); + + if self.item_count > 0 { + let item_height = self.measure_item_height(view_state, padded_bounds, cx); + let visible_item_count = (padded_bounds.size.height / item_height) as usize; + let visible_range = 0..visible_item_count; + + let mut items = (self.render_items)(view_state, visible_range, cx); + + for (ix, item) in items.iter_mut().enumerate() { + item.initialize(view_state, cx); + item.layout(view_state, cx); + let offset = padded_bounds.origin + point(px(0.), item_height * ix); + cx.with_element_offset(Some(offset), |cx| item.paint(view_state, cx)) + } + } + } +} + +impl List { + fn measure_item_height( + &self, + view_state: &mut V, + list_bounds: Bounds, + cx: &mut ViewContext, + ) -> Pixels { + let mut items = (self.render_items)(view_state, 0..1, cx); + debug_assert!(items.len() == 1); + let mut item_to_measure = items.pop().unwrap(); + item_to_measure.initialize(view_state, cx); + let layout_id = item_to_measure.layout(view_state, cx); + cx.compute_layout( + layout_id, + Size { + width: AvailableSpace::Definite(list_bounds.size.width), + height: AvailableSpace::MinContent, + }, + ); + cx.layout_bounds(layout_id).size.height + } +} + +impl Component for List { + fn render(self) -> AnyElement { + AnyElement::new(self) } } diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index d6755a53973f00d5fee4fd11912f6e73da26cf71..a9df7569325e92d941d8d496fceb018efae7c2b7 100644 --- a/crates/gpui2/src/geometry.rs +++ b/crates/gpui2/src/geometry.rs @@ -259,6 +259,24 @@ impl From> for Size { } } +impl From> for Size { + fn from(size: Size) -> Self { + Size { + width: size.width.into(), + height: size.height.into(), + } + } +} + +impl From> for Size { + fn from(size: Size) -> Self { + Size { + width: size.width.into(), + height: size.height.into(), + } + } +} + impl Size { pub fn full() -> Self { Self { @@ -541,6 +559,15 @@ impl Edges { left: px(0.).into(), } } + + pub fn to_pixels(&self, parent_size: Size, rem_size: Pixels) -> Edges { + Edges { + top: self.top.to_pixels(parent_size.height, rem_size), + right: self.right.to_pixels(parent_size.width, rem_size), + bottom: self.bottom.to_pixels(parent_size.height, rem_size), + left: self.left.to_pixels(parent_size.width, rem_size), + } + } } impl Edges { @@ -672,16 +699,16 @@ impl Copy for Corners where T: Copy + Clone + Default + Debug {} pub struct Pixels(pub(crate) f32); impl std::ops::Div for Pixels { - type Output = Self; + type Output = f32; fn div(self, rhs: Self) -> Self::Output { - Self(self.0 / rhs.0) + self.0 / rhs.0 } } impl std::ops::DivAssign for Pixels { fn div_assign(&mut self, rhs: Self) { - self.0 /= rhs.0; + *self = Self(self.0 / rhs.0); } } @@ -732,14 +759,6 @@ impl MulAssign for Pixels { impl Pixels { pub const MAX: Pixels = Pixels(f32::MAX); - pub fn as_usize(&self) -> usize { - self.0 as usize - } - - pub fn as_isize(&self) -> isize { - self.0 as isize - } - pub fn floor(&self) -> Self { Self(self.0.floor()) } diff --git a/crates/gpui2/src/styled.rs b/crates/gpui2/src/styled.rs index a272ab95b14d7416e91d0bf166f2683e7941f02e..f45e6a219e1a9206a94415a25cf073d329839801 100644 --- a/crates/gpui2/src/styled.rs +++ b/crates/gpui2/src/styled.rs @@ -1,14 +1,19 @@ use crate::{ self as gpui, hsla, point, px, relative, rems, AlignItems, CursorStyle, DefiniteLength, Display, Fill, FlexDirection, Hsla, JustifyContent, Length, Position, Rems, SharedString, - StyleRefinement, Visibility, + Style, StyleRefinement, Visibility, }; use crate::{BoxShadow, TextStyleRefinement}; +use refineable::Refineable; use smallvec::smallvec; pub trait Styled { fn style(&mut self) -> &mut StyleRefinement; + fn computed_style(&mut self) -> Style { + Style::default().refined(self.style().clone()) + } + gpui2_macros::style_helpers!(); /// Sets the size of the element to the full width and height. diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 9cab40082b02912eced41363a2afa6506fb3d9c0..880fc6c6cb22f423363940053b38fe198f31e612 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -559,6 +559,12 @@ impl<'a> WindowContext<'a> { .request_measured_layout(style, rem_size, measure) } + pub fn compute_layout(&mut self, layout_id: LayoutId, available_space: Size) { + self.window + .layout_engine + .compute_layout(layout_id, available_space) + } + /// Obtain the bounds computed for the given LayoutId relative to the window. This method should not /// be invoked until the paint phase begins, and will usually be invoked by GPUI itself automatically /// in order to pass your element its `Bounds` automatically. diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index c6c5ee3e41e78b18fb84143d0ff448873d31cc5b..9b4f8778e2a5aca7befa4a2becdd6665edbf2f18 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -20,24 +20,28 @@ use std::ops::Range; -use gpui::{div, AppContext, Component, Div, Element, ParentElement, Render, ViewContext}; - -pub struct Picker { - delegate: D, - // query_editor: ViewHandle, - // list_state: UniformListState, - // max_size: Vector2F, - // theme: Arc theme::Picker>>>, - // confirmed: bool, - // pending_update_matches: Option>>, - // confirm_on_update: Option, - // has_focus: bool, -} +use gpui::{ + div, list, AppContext, Component, Div, Element, ElementId, ParentElement, Render, ViewContext, +}; + +// pub struct Picker { +// delegate: D, +// query_editor: ViewHandle, +// list_state: UniformListState, +// max_size: Vector2F, +// theme: Arc theme::Picker>>>, +// confirmed: bool, +// pending_update_matches: Option>>, +// confirm_on_update: Option, +// has_focus: bool, +// } pub trait PickerDelegate: Sized + 'static { - type ListItem: Element>; + type ListItem: Component; // fn placeholder_text(&self) -> Arc; - // fn match_count(&self) -> usize; + + fn match_count(&self, picker_id: ElementId) -> usize; + // fn selected_index(&self) -> usize; // fn set_selected_index(&mut self, ix: usize, cx: &mut ViewContext>); // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; @@ -51,7 +55,8 @@ pub trait PickerDelegate: Sized + 'static { active: bool, hovered: bool, selected: bool, - cx: &mut ViewContext>, + picker_id: ElementId, + cx: &mut ViewContext, ) -> Self::ListItem; // fn center_selection_after_match_updates(&self) -> bool { @@ -75,29 +80,35 @@ pub trait PickerDelegate: Sized + 'static { // type Event = PickerEvent; // } -impl Render for Picker { - type Element = Div; +#[derive(Component)] +pub struct Picker { + id: ElementId, + phantom: std::marker::PhantomData, +} + +impl Picker { + pub fn new(id: impl Into) -> Self { + Self { + id: id.into(), + phantom: std::marker::PhantomData, + } + } +} - fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { - div().child(list( +impl Picker { + pub fn render(self, view: &mut V, cx: &mut ViewContext) -> impl Component { + div().id(self.id.clone()).child(list( "candidates", - |this: &mut Picker, visible_range, cx| { + view.match_count(self.id.clone()), + move |this: &mut V, visible_range, cx| { visible_range - .into_iter() - .map(|ix| this.delegate.render_match(ix, false, false, false, cx)) + .map(|ix| this.render_match(ix, false, false, false, self.id.clone(), cx)) + .collect() }, )) } } -fn list<'a, D: PickerDelegate, F, I>(id: &'static str, f: F) -> Div> -where - F: FnOnce(&'a mut Picker, Range, &'a mut ViewContext>) -> I, - I: 'a + Iterator, -{ - todo!(); -} - // impl View for Picker { // fn ui_name() -> &'static str { // "Picker" @@ -213,7 +224,7 @@ where // cx.add_action(Self::cancel); // } -// pub fn new(delegate: D, cx: &mut ViewContext) -> Self { +// pub fn new(delegate: D, cx: &mut ViewContext) -> Self { // let theme = Arc::new(Mutex::new( // Box::new(|theme: &theme::Theme| theme.picker.clone()) // as Box theme::Picker>, @@ -247,7 +258,8 @@ where // }; // this.update_matches(String::new(), cx); // this -// } +// Self { delegate } +// } // pub fn with_max_size(mut self, width: f32, height: f32) -> Self { // self.max_size = vec2f(width, height); diff --git a/crates/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index 1f3a0b33cc2254671069d8e8c1f0fb0e453db9ae..0e35a7a66f3f892aec1df787456ce9e9d00acfb1 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -27,6 +27,7 @@ theme = { path = "../theme" } theme2 = { path = "../theme2" } ui = { package = "ui2", path = "../ui2", features = ["stories"] } util = { path = "../util" } +picker = { package = "picker2", path = "../picker2" } [dev-dependencies] gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] } diff --git a/crates/storybook2/src/stories.rs b/crates/storybook2/src/stories.rs index 3d8a332fb93b16ae8480acd32e97bbd4a0c5ab25..2620e68d6c102600637f41551e5d6f65b96451e1 100644 --- a/crates/storybook2/src/stories.rs +++ b/crates/storybook2/src/stories.rs @@ -1,6 +1,7 @@ mod colors; mod focus; mod kitchen_sink; +mod picker; mod scroll; mod text; mod z_index; @@ -8,6 +9,7 @@ mod z_index; pub use colors::*; pub use focus::*; pub use kitchen_sink::*; +pub use picker::*; pub use scroll::*; pub use text::*; pub use z_index::*; diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs new file mode 100644 index 0000000000000000000000000000000000000000..de983e0326890aeff3a4f9ec8126648adaf164a2 --- /dev/null +++ b/crates/storybook2/src/stories/picker.rs @@ -0,0 +1,40 @@ +use gpui::{div, Div, ParentElement, Render, View, VisualContext, WindowContext}; +use picker::{Picker, PickerDelegate}; + +pub struct PickerStory { + // picker: View>, +} + +impl PickerDelegate for PickerStory { + type ListItem = Div; + + fn match_count(&self, picker_id: gpui::ElementId) -> usize { + 0 + } + + fn render_match( + &self, + ix: usize, + active: bool, + hovered: bool, + selected: bool, + picker_id: gpui::ElementId, + cx: &mut gpui::ViewContext, + ) -> Self::ListItem { + todo!() + } +} + +impl PickerStory { + pub fn new(cx: &mut WindowContext) -> View { + cx.build_view(|cx| PickerStory {}) + } +} + +impl Render for PickerStory { + type Element = Div; + + fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { + div().child(Picker::new("picker_story")) + } +} diff --git a/crates/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rs index f59208ccb8794948dd93afa99155d707ea91ad0d..766c0dd51a3d60809161d16bfd64780adad98026 100644 --- a/crates/storybook2/src/story_selector.rs +++ b/crates/storybook2/src/story_selector.rs @@ -51,6 +51,7 @@ pub enum ComponentStory { TrafficLights, Workspace, ZIndex, + Picker, } impl ComponentStory { @@ -94,6 +95,7 @@ impl ComponentStory { Self::TrafficLights => cx.build_view(|_| ui::TrafficLightsStory).into(), Self::Workspace => ui::WorkspaceStory::view(cx).into(), Self::ZIndex => cx.build_view(|_| ZIndexStory).into(), + Self::Picker => PickerStory::new(cx).into(), } } } diff --git a/crates/terminal2/src/mappings/mouse.rs b/crates/terminal2/src/mappings/mouse.rs index eac6ad17ff257384396c4c639dd6f7ea39acea5f..edced3156faf90cdf9dc227ee646f0e4cccb68e3 100644 --- a/crates/terminal2/src/mappings/mouse.rs +++ b/crates/terminal2/src/mappings/mouse.rs @@ -186,9 +186,9 @@ pub fn mouse_side( } pub fn grid_point(pos: Point, cur_size: TerminalSize, display_offset: usize) -> AlacPoint { - let col = GridCol((pos.x / cur_size.cell_width).as_usize()); + let col = GridCol((cur_size.cell_width / pos.x) as usize); let col = min(col, cur_size.last_column()); - let line = (pos.y / cur_size.line_height).as_isize() as i32; + let line = (cur_size.line_height / pos.y) as i32; let line = min(line, cur_size.bottommost_line().0); AlacPoint::new(GridLine(line - display_offset as i32), col) } diff --git a/crates/terminal2/src/terminal2.rs b/crates/terminal2/src/terminal2.rs index ba5c4815f29253152c355c1ba4d998e54c2fc9e5..3d06b488123016c19102e8d911d6b24568124ab1 100644 --- a/crates/terminal2/src/terminal2.rs +++ b/crates/terminal2/src/terminal2.rs @@ -1121,8 +1121,7 @@ impl Terminal { None => return, }; - let scroll_lines = - (scroll_delta / self.last_content.size.line_height).as_isize() as i32; + let scroll_lines = (scroll_delta / self.last_content.size.line_height) as i32; self.events .push_back(InternalEvent::Scroll(AlacScroll::Delta(scroll_lines))); @@ -1280,11 +1279,11 @@ impl Terminal { } /* Calculate the appropriate scroll lines */ TouchPhase::Moved => { - let old_offset = (self.scroll_px / line_height).as_isize() as i32; + let old_offset = (self.scroll_px / line_height) as i32; self.scroll_px += e.delta.pixel_delta(line_height).y * scroll_multiplier; - let new_offset = (self.scroll_px / line_height).as_isize() as i32; + let new_offset = (self.scroll_px / line_height) as i32; // Whenever we hit the edges, reset our stored scroll to 0 // so we can respond to changes in direction quickly @@ -1396,9 +1395,9 @@ fn all_search_matches<'a, T>( } fn content_index_for_mouse(pos: Point, size: &TerminalSize) -> usize { - let col = (pos.x / size.cell_width()).round().as_usize(); + let col = (pos.x / size.cell_width()).round() as usize; let clamped_col = min(col, size.columns() - 1); - let row = (pos.y / size.line_height()).round().as_usize(); + let row = (pos.y / size.line_height()).round() as usize; let clamped_row = min(row, size.screen_lines() - 1); clamped_row * size.columns() + clamped_col } From 3c93b585ab183153f6f3c1dd96ecf4ce9e00d90d Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 6 Nov 2023 15:11:22 -0800 Subject: [PATCH 042/110] Checkpoint --- crates/gpui2/src/app.rs | 8 ++-- crates/gpui2/src/elements/list.rs | 18 ++++++-- crates/gpui2/src/elements/text.rs | 1 + crates/gpui2/src/text_system/line.rs | 7 +-- crates/gpui2/src/window.rs | 2 + crates/picker2/src/picker2.rs | 24 +++++----- crates/storybook2/src/stories/picker.rs | 58 ++++++++++++++++++++----- 7 files changed, 85 insertions(+), 33 deletions(-) diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs index 9afffeb685a8c38ecd8a0aaf075ce6a2c4fbdf5e..801047de5fc857fd3a1bab0a89535febc5126c25 100644 --- a/crates/gpui2/src/app.rs +++ b/crates/gpui2/src/app.rs @@ -48,15 +48,15 @@ pub struct AppCell { impl AppCell { #[track_caller] pub fn borrow(&self) -> AppRef { - let thread_id = std::thread::current().id(); - eprintln!("borrowed {thread_id:?}"); + // let thread_id = std::thread::current().id(); + // eprintln!("borrowed {thread_id:?}"); AppRef(self.app.borrow()) } #[track_caller] pub fn borrow_mut(&self) -> AppRefMut { - let thread_id = std::thread::current().id(); - eprintln!("borrowed {thread_id:?}"); + // let thread_id = std::thread::current().id(); + // eprintln!("borrowed {thread_id:?}"); AppRefMut(self.app.borrow_mut()) } } diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/list.rs index 01a64f7bd12f8559d30e00a0d51736b00e3982a3..7f15af66c4289afa197911e8730016b851465ee9 100644 --- a/crates/gpui2/src/elements/list.rs +++ b/crates/gpui2/src/elements/list.rs @@ -1,4 +1,4 @@ -use std::ops::Range; +use std::{cmp, ops::Range}; use smallvec::SmallVec; @@ -113,14 +113,24 @@ impl Element for List { if self.item_count > 0 { let item_height = self.measure_item_height(view_state, padded_bounds, cx); - let visible_item_count = (padded_bounds.size.height / item_height) as usize; - let visible_range = 0..visible_item_count; + let visible_item_count = (padded_bounds.size.height / item_height).ceil() as usize; + let visible_range = 0..cmp::min(visible_item_count, self.item_count); let mut items = (self.render_items)(view_state, visible_range, cx); + dbg!(items.len(), self.item_count, visible_item_count); + for (ix, item) in items.iter_mut().enumerate() { item.initialize(view_state, cx); - item.layout(view_state, cx); + + let layout_id = item.layout(view_state, cx); + cx.compute_layout( + layout_id, + Size { + width: AvailableSpace::Definite(bounds.size.width), + height: AvailableSpace::Definite(item_height), + }, + ); let offset = padded_bounds.origin + point(px(0.), item_height * ix); cx.with_element_offset(Some(offset), |cx| item.paint(view_state, cx)) } diff --git a/crates/gpui2/src/elements/text.rs b/crates/gpui2/src/elements/text.rs index 4bc37054902653a85f931d82354183edc9142fe3..7e771962cd5619db7c5e724b7cf703860287115b 100644 --- a/crates/gpui2/src/elements/text.rs +++ b/crates/gpui2/src/elements/text.rs @@ -127,6 +127,7 @@ impl Element for Text { let element_state = element_state .as_ref() .expect("measurement has not been performed"); + let line_height = element_state.line_height; let mut line_origin = bounds.origin; for line in &element_state.lines { diff --git a/crates/gpui2/src/text_system/line.rs b/crates/gpui2/src/text_system/line.rs index 63aac96faff9be6f3a452ecf034f501952a4285f..21a7dcea6fcc9ec1f20f1b6d066bb24ecf9ae8da 100644 --- a/crates/gpui2/src/text_system/line.rs +++ b/crates/gpui2/src/text_system/line.rs @@ -78,7 +78,6 @@ impl Line { glyph_origin.y += line_height; } prev_glyph_position = glyph.position; - let glyph_origin = glyph_origin + baseline_offset; let mut finished_underline: Option<(Point, UnderlineStyle)> = None; if glyph.index >= run_end { @@ -129,20 +128,22 @@ impl Line { if max_glyph_bounds.intersects(&content_mask.bounds) { if glyph.is_emoji { cx.paint_emoji( - glyph_origin, + glyph_origin + baseline_offset, run.font_id, glyph.id, self.layout.layout.font_size, )?; } else { cx.paint_glyph( - glyph_origin, + glyph_origin + baseline_offset, run.font_id, glyph.id, self.layout.layout.font_size, color, )?; } + } else { + dbg!(content_mask.bounds, max_glyph_bounds); } } } diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 880fc6c6cb22f423363940053b38fe198f31e612..7c05018aa1aaca1fb64461cab20989827ac81161 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -792,6 +792,7 @@ impl<'a> WindowContext<'a> { } /// Paint a monochrome (non-emoji) glyph into the scene for the current frame at the current z-index. + /// The y component of the origin is the baseline of the glyph. pub fn paint_glyph( &mut self, origin: Point, @@ -845,6 +846,7 @@ impl<'a> WindowContext<'a> { } /// Paint an emoji glyph into the scene for the current frame at the current z-index. + /// The y component of the origin is the baseline of the glyph. pub fn paint_emoji( &mut self, origin: Point, diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 9b4f8778e2a5aca7befa4a2becdd6665edbf2f18..3bcf5b92037a48e3e99fa372c442820bf084d000 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -21,7 +21,8 @@ use std::ops::Range; use gpui::{ - div, list, AppContext, Component, Div, Element, ElementId, ParentElement, Render, ViewContext, + div, list, red, AppContext, Component, Div, Element, ElementId, ParentElement, Render, Styled, + ViewContext, }; // pub struct Picker { @@ -97,15 +98,18 @@ impl Picker { impl Picker { pub fn render(self, view: &mut V, cx: &mut ViewContext) -> impl Component { - div().id(self.id.clone()).child(list( - "candidates", - view.match_count(self.id.clone()), - move |this: &mut V, visible_range, cx| { - visible_range - .map(|ix| this.render_match(ix, false, false, false, self.id.clone(), cx)) - .collect() - }, - )) + div().size_full().id(self.id.clone()).child( + list( + "candidates", + view.match_count(self.id.clone()), + move |this: &mut V, visible_range, cx| { + visible_range + .map(|ix| this.render_match(ix, false, false, false, self.id.clone(), cx)) + .collect() + }, + ) + .size_full(), + ) } } diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index de983e0326890aeff3a4f9ec8126648adaf164a2..23d13b83fc80a53b8789bfd0fe73dd3af9d9e07f 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -1,33 +1,64 @@ -use gpui::{div, Div, ParentElement, Render, View, VisualContext, WindowContext}; +use gpui::{ + black, div, red, Div, Fill, ParentElement, Render, SharedString, Styled, View, VisualContext, + WindowContext, +}; use picker::{Picker, PickerDelegate}; pub struct PickerStory { - // picker: View>, + candidates: Vec, } impl PickerDelegate for PickerStory { - type ListItem = Div; + type ListItem = SharedString; - fn match_count(&self, picker_id: gpui::ElementId) -> usize { - 0 + fn match_count(&self, _picker_id: gpui::ElementId) -> usize { + self.candidates.len() } fn render_match( &self, ix: usize, - active: bool, - hovered: bool, - selected: bool, - picker_id: gpui::ElementId, + _active: bool, + _hovered: bool, + _selected: bool, + _picker_id: gpui::ElementId, cx: &mut gpui::ViewContext, ) -> Self::ListItem { - todo!() + self.candidates[ix].clone() } } impl PickerStory { pub fn new(cx: &mut WindowContext) -> View { - cx.build_view(|cx| PickerStory {}) + cx.build_view(|cx| PickerStory { + candidates: vec![ + "Pizza (Italy)".into(), + "Sushi (Japan)".into(), + "Paella (Spain)".into(), + "Tacos (Mexico)".into(), + "Peking Duck (China)".into(), + "Fish and Chips (UK)".into(), + "Croissant (France)".into(), + "Bratwurst (Germany)".into(), + "Poutine (Canada)".into(), + "Chicken Tikka Masala (India)".into(), + "Feijoada (Brazil)".into(), + "Kimchi (Korea)".into(), + "Borscht (Ukraine)".into(), + "Falafel (Middle East)".into(), + "Baklava (Turkey)".into(), + "Shepherd's Pie (Ireland)".into(), + "Rendang (Indonesia)".into(), + "Kebab (Middle East)".into(), + "Ceviche (Peru)".into(), + "Pierogi (Poland)".into(), + "Churrasco (Brazil)".into(), + "Moussaka (Greece)".into(), + "Lasagna (Italy)".into(), + "Pad Thai (Thailand)".into(), + "Pho (Vietnam)".into(), + ], + }) } } @@ -35,6 +66,9 @@ impl Render for PickerStory { type Element = Div; fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { - div().child(Picker::new("picker_story")) + div() + .text_color(red()) + .size_full() + .child(Picker::new("picker_story")) } } From 85000eba819e0fd375fed0e7cf6dfcd3c2ba888a Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 6 Nov 2023 17:09:38 -0800 Subject: [PATCH 043/110] wip: picker co-authored-by: nathan co-authored-by: max --- Cargo.lock | 4 +- crates/gpui2/src/color.rs | 9 ++ crates/gpui2/src/elements/div.rs | 80 +++++----- crates/gpui2/src/elements/img.rs | 42 +++-- crates/gpui2/src/elements/list.rs | 122 +++++++++----- crates/gpui2/src/elements/svg.rs | 36 ++--- crates/gpui2/src/interactive.rs | 129 +++++++++------ crates/gpui2/src/style.rs | 4 +- crates/gpui2/src/text_system/line.rs | 2 - crates/gpui2/src/window.rs | 4 +- crates/menu2/Cargo.toml | 3 +- crates/menu2/src/menu2.rs | 18 +-- crates/picker2/src/picker2.rs | 79 ++++++--- crates/storybook2/Cargo.toml | 1 + crates/storybook2/src/stories/focus.rs | 42 ++--- crates/storybook2/src/stories/kitchen_sink.rs | 4 +- crates/storybook2/src/stories/picker.rs | 151 +++++++++++++----- crates/storybook2/src/stories/scroll.rs | 4 +- crates/ui2/src/components/checkbox.rs | 4 +- .../zed/src/languages/racket/highlights.scm | 1 - .../zed2/src/languages/racket/highlights.scm | 1 - 21 files changed, 461 insertions(+), 279 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 98feaf9f61053e7d7ae701c3b72f7e3411b45111..50475da14372794944c77f4eabaae154d6596ddb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4970,7 +4970,8 @@ dependencies = [ name = "menu2" version = "0.1.0" dependencies = [ - "gpui2", + "serde", + "serde_derive", ] [[package]] @@ -8542,6 +8543,7 @@ dependencies = [ "gpui2", "itertools 0.11.0", "log", + "menu2", "picker2", "rust-embed", "serde", diff --git a/crates/gpui2/src/color.rs b/crates/gpui2/src/color.rs index db072594760f160a303020af20021e05d74db300..d5ff1603214af5007a11dbf05e6e3c49d68f5880 100644 --- a/crates/gpui2/src/color.rs +++ b/crates/gpui2/src/color.rs @@ -194,6 +194,15 @@ pub fn red() -> Hsla { } } +pub fn blue() -> Hsla { + Hsla { + h: 0.6, + s: 1., + l: 0.5, + a: 1., + } +} + impl Hsla { /// Returns true if the HSLA color is fully transparent, false otherwise. pub fn is_transparent(&self) -> bool { diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rs index e011041bae2259f8a290ef098b061740721f4307..77d066729e59fed3930f759e502a2bb2d42a4021 100644 --- a/crates/gpui2/src/elements/div.rs +++ b/crates/gpui2/src/elements/div.rs @@ -1,28 +1,28 @@ use crate::{ point, AnyElement, BorrowWindow, Bounds, Component, Element, ElementFocus, ElementId, - ElementInteraction, FocusDisabled, FocusEnabled, FocusHandle, FocusListeners, Focusable, + ElementInteractivity, FocusDisabled, FocusEnabled, FocusHandle, FocusListeners, Focusable, GlobalElementId, GroupBounds, InteractiveElementState, LayoutId, Overflow, ParentElement, - Pixels, Point, SharedString, StatefulInteraction, StatefulInteractive, StatelessInteraction, - StatelessInteractive, Style, StyleRefinement, Styled, ViewContext, Visibility, + Pixels, Point, SharedString, StatefulInteractive, StatefulInteractivity, StatelessInteractive, + StatelessInteractivity, Style, StyleRefinement, Styled, ViewContext, Visibility, }; use refineable::Refineable; use smallvec::SmallVec; pub struct Div< V: 'static, - I: ElementInteraction = StatelessInteraction, + I: ElementInteractivity = StatelessInteractivity, F: ElementFocus = FocusDisabled, > { - interaction: I, + interactivity: I, focus: F, children: SmallVec<[AnyElement; 2]>, group: Option, base_style: StyleRefinement, } -pub fn div() -> Div, FocusDisabled> { +pub fn div() -> Div, FocusDisabled> { Div { - interaction: StatelessInteraction::default(), + interactivity: StatelessInteractivity::default(), focus: FocusDisabled, children: SmallVec::new(), group: None, @@ -30,14 +30,14 @@ pub fn div() -> Div, FocusDisabled> { } } -impl Div, F> +impl Div, F> where V: 'static, F: ElementFocus, { - pub fn id(self, id: impl Into) -> Div, F> { + pub fn id(self, id: impl Into) -> Div, F> { Div { - interaction: id.into().into(), + interactivity: id.into().into(), focus: self.focus, children: self.children, group: self.group, @@ -48,7 +48,7 @@ where impl Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { pub fn group(mut self, group: impl Into) -> Self { @@ -98,16 +98,20 @@ where let mut computed_style = Style::default(); computed_style.refine(&self.base_style); self.focus.refine_style(&mut computed_style, cx); - self.interaction - .refine_style(&mut computed_style, bounds, &element_state.interactive, cx); + self.interactivity.refine_style( + &mut computed_style, + bounds, + &element_state.interactive, + cx, + ); computed_style } } -impl Div, FocusDisabled> { - pub fn focusable(self) -> Div, FocusEnabled> { +impl Div, FocusDisabled> { + pub fn focusable(self) -> Div, FocusEnabled> { Div { - interaction: self.interaction, + interactivity: self.interactivity, focus: FocusEnabled::new(), children: self.children, group: self.group, @@ -118,9 +122,9 @@ impl Div, FocusDisabled> { pub fn track_focus( self, handle: &FocusHandle, - ) -> Div, FocusEnabled> { + ) -> Div, FocusEnabled> { Div { - interaction: self.interaction, + interactivity: self.interactivity, focus: FocusEnabled::tracked(handle), children: self.children, group: self.group, @@ -145,13 +149,13 @@ impl Div, FocusDisabled> { } } -impl Div, FocusDisabled> { +impl Div, FocusDisabled> { pub fn track_focus( self, handle: &FocusHandle, - ) -> Div, FocusEnabled> { + ) -> Div, FocusEnabled> { Div { - interaction: self.interaction.into_stateful(handle), + interactivity: self.interactivity.into_stateful(handle), focus: handle.clone().into(), children: self.children, group: self.group, @@ -163,7 +167,7 @@ impl Div, FocusDisabled> { impl Focusable for Div> where V: 'static, - I: ElementInteraction, + I: ElementInteractivity, { fn focus_listeners(&mut self) -> &mut FocusListeners { &mut self.focus.focus_listeners @@ -191,13 +195,13 @@ pub struct DivState { impl Element for Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { type ElementState = DivState; fn id(&self) -> Option { - self.interaction + self.interactivity .as_stateful() .map(|identified| identified.id.clone()) } @@ -212,7 +216,7 @@ where self.focus .initialize(element_state.focus_handle.take(), cx, |focus_handle, cx| { element_state.focus_handle = focus_handle; - self.interaction.initialize(cx, |cx| { + self.interactivity.initialize(cx, |cx| { for child in &mut self.children { child.initialize(view_state, cx); } @@ -281,11 +285,11 @@ where (child_max - child_min).into() }; - cx.stack(z_index, |cx| { - cx.stack(0, |cx| { + cx.with_z_index(z_index, |cx| { + cx.with_z_index(0, |cx| { style.paint(bounds, cx); this.focus.paint(bounds, cx); - this.interaction.paint( + this.interactivity.paint( bounds, content_size, style.overflow, @@ -293,7 +297,7 @@ where cx, ); }); - cx.stack(1, |cx| { + cx.with_z_index(1, |cx| { style.apply_text_style(cx, |cx| { style.apply_overflow(bounds, cx, |cx| { let scroll_offset = element_state.interactive.scroll_offset(); @@ -316,7 +320,7 @@ where impl Component for Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn render(self) -> AnyElement { @@ -326,7 +330,7 @@ where impl ParentElement for Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]> { @@ -336,7 +340,7 @@ where impl Styled for Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn style(&mut self) -> &mut StyleRefinement { @@ -346,19 +350,19 @@ where impl StatelessInteractive for Div where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { - fn stateless_interaction(&mut self) -> &mut StatelessInteraction { - self.interaction.as_stateless_mut() + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { + self.interactivity.as_stateless_mut() } } -impl StatefulInteractive for Div, F> +impl StatefulInteractive for Div, F> where F: ElementFocus, { - fn stateful_interaction(&mut self) -> &mut StatefulInteraction { - &mut self.interaction + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { + &mut self.interactivity } } diff --git a/crates/gpui2/src/elements/img.rs b/crates/gpui2/src/elements/img.rs index 637bcd78e626140a17bd39766303eb97e0ff9d32..638665d4141d4a19362b2812932048a8ad46c348 100644 --- a/crates/gpui2/src/elements/img.rs +++ b/crates/gpui2/src/elements/img.rs @@ -1,17 +1,15 @@ -use std::sync::Arc; - use crate::{ div, AnyElement, BorrowWindow, Bounds, Component, Div, DivState, Element, ElementFocus, - ElementId, ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable, - LayoutId, Pixels, SharedString, StatefulInteraction, StatefulInteractive, StatelessInteraction, - StatelessInteractive, StyleRefinement, Styled, ViewContext, + ElementId, ElementInteractivity, FocusDisabled, FocusEnabled, FocusListeners, Focusable, + LayoutId, Pixels, SharedString, StatefulInteractive, StatefulInteractivity, + StatelessInteractive, StatelessInteractivity, StyleRefinement, Styled, ViewContext, }; use futures::FutureExt; use util::ResultExt; pub struct Img< V: 'static, - I: ElementInteraction = StatelessInteraction, + I: ElementInteractivity = StatelessInteractivity, F: ElementFocus = FocusDisabled, > { base: Div, @@ -19,7 +17,7 @@ pub struct Img< grayscale: bool, } -pub fn img() -> Img, FocusDisabled> { +pub fn img() -> Img, FocusDisabled> { Img { base: div(), uri: None, @@ -30,7 +28,7 @@ pub fn img() -> Img, FocusDisabled> { impl Img where V: 'static, - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { pub fn uri(mut self, uri: impl Into) -> Self { @@ -44,11 +42,11 @@ where } } -impl Img, F> +impl Img, F> where F: ElementFocus, { - pub fn id(self, id: impl Into) -> Img, F> { + pub fn id(self, id: impl Into) -> Img, F> { Img { base: self.base.id(id), uri: self.uri, @@ -59,7 +57,7 @@ where impl Component for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn render(self) -> AnyElement { @@ -69,7 +67,7 @@ where impl Element for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { type ElementState = DivState; @@ -103,7 +101,7 @@ where element_state: &mut Self::ElementState, cx: &mut ViewContext, ) { - cx.stack(0, |cx| { + cx.with_z_index(0, |cx| { self.base.paint(bounds, view, element_state, cx); }); @@ -120,7 +118,7 @@ where .and_then(ResultExt::log_err) { let corner_radii = corner_radii.to_pixels(bounds.size, cx.rem_size()); - cx.stack(1, |cx| { + cx.with_z_index(1, |cx| { cx.paint_image(bounds, corner_radii, data, self.grayscale) .log_err() }); @@ -138,7 +136,7 @@ where impl Styled for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn style(&mut self) -> &mut StyleRefinement { @@ -148,27 +146,27 @@ where impl StatelessInteractive for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { - fn stateless_interaction(&mut self) -> &mut StatelessInteraction { - self.base.stateless_interaction() + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { + self.base.stateless_interactivity() } } -impl StatefulInteractive for Img, F> +impl StatefulInteractive for Img, F> where F: ElementFocus, { - fn stateful_interaction(&mut self) -> &mut StatefulInteraction { - self.base.stateful_interaction() + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { + self.base.stateful_interactivity() } } impl Focusable for Img> where V: 'static, - I: ElementInteraction, + I: ElementInteractivity, { fn focus_listeners(&mut self) -> &mut FocusListeners { self.base.focus_listeners() diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/list.rs index 7f15af66c4289afa197911e8730016b851465ee9..0719f2a92ee318f74ee25748e793c18aa2d6b5f2 100644 --- a/crates/gpui2/src/elements/list.rs +++ b/crates/gpui2/src/elements/list.rs @@ -1,15 +1,12 @@ -use std::{cmp, ops::Range}; - -use smallvec::SmallVec; - use crate::{ point, px, AnyElement, AvailableSpace, BorrowWindow, Bounds, Component, Element, ElementId, - LayoutId, Pixels, Size, StyleRefinement, Styled, ViewContext, + ElementInteractivity, InteractiveElementState, LayoutId, Pixels, Size, StatefulInteractive, + StatefulInteractivity, StatelessInteractive, StatelessInteractivity, StyleRefinement, Styled, + ViewContext, }; - -// We want to support uniform and non-uniform height -// We need to make the ID mandatory, to replace the 'state' field -// Previous implementation measured the first element as early as possible +use smallvec::SmallVec; +use std::{cmp, ops::Range}; +use taffy::style::Overflow; pub fn list( id: Id, @@ -21,8 +18,9 @@ where V: 'static, C: Component, { + let id = id.into(); List { - id: id.into(), + id: id.clone(), style: Default::default(), item_count, render_items: Box::new(move |view, visible_range, cx| { @@ -31,10 +29,11 @@ where .map(|component| component.render()) .collect() }), + interactivity: id.into(), } } -pub struct List { +pub struct List { id: ElementId, style: StyleRefinement, item_count: usize, @@ -45,19 +44,12 @@ pub struct List { &'a mut ViewContext, ) -> SmallVec<[AnyElement; 64]>, >, + interactivity: StatefulInteractivity, } -// #[derive(Debug)] -// pub enum ScrollTarget { -// Show(usize), -// Center(usize), -// } - #[derive(Default)] pub struct ListState { - scroll_top: f32, - // todo - // scroll_to: Option, + interactive: InteractiveElementState, } impl Styled for List { @@ -111,30 +103,66 @@ impl Element for List { - point(border.right + padding.right, border.bottom + padding.bottom), ); - if self.item_count > 0 { - let item_height = self.measure_item_height(view_state, padded_bounds, cx); - let visible_item_count = (padded_bounds.size.height / item_height).ceil() as usize; - let visible_range = 0..cmp::min(visible_item_count, self.item_count); - - let mut items = (self.render_items)(view_state, visible_range, cx); - - dbg!(items.len(), self.item_count, visible_item_count); + cx.with_z_index(style.z_index.unwrap_or(0), |cx| { + let content_size; + if self.item_count > 0 { + let item_height = self.measure_item_height(view_state, padded_bounds, cx); + let visible_item_count = + (padded_bounds.size.height / item_height).ceil() as usize + 1; + let scroll_offset = element_state + .interactive + .scroll_offset() + .map_or((0.0).into(), |offset| offset.y); + let first_visible_element_ix = (-scroll_offset / item_height).floor() as usize; + let visible_range = first_visible_element_ix + ..cmp::min( + first_visible_element_ix + visible_item_count, + self.item_count, + ); + + let mut items = (self.render_items)(view_state, visible_range.clone(), cx); + + content_size = Size { + width: padded_bounds.size.width, + height: item_height * self.item_count, + }; + + cx.with_z_index(1, |cx| { + for (item, ix) in items.iter_mut().zip(visible_range) { + item.initialize(view_state, cx); + + let layout_id = item.layout(view_state, cx); + cx.compute_layout( + layout_id, + Size { + width: AvailableSpace::Definite(bounds.size.width), + height: AvailableSpace::Definite(item_height), + }, + ); + let offset = + padded_bounds.origin + point(px(0.), item_height * ix + scroll_offset); + cx.with_element_offset(Some(offset), |cx| item.paint(view_state, cx)) + } + }); + } else { + content_size = Size { + width: bounds.size.width, + height: px(0.), + }; + } - for (ix, item) in items.iter_mut().enumerate() { - item.initialize(view_state, cx); + let overflow = point(style.overflow.x, Overflow::Scroll); - let layout_id = item.layout(view_state, cx); - cx.compute_layout( - layout_id, - Size { - width: AvailableSpace::Definite(bounds.size.width), - height: AvailableSpace::Definite(item_height), - }, + cx.with_z_index(0, |cx| { + self.interactivity.paint( + bounds, + content_size, + overflow, + &mut element_state.interactive, + cx, ); - let offset = padded_bounds.origin + point(px(0.), item_height * ix); - cx.with_element_offset(Some(offset), |cx| item.paint(view_state, cx)) - } - } + }); + }) } } @@ -161,6 +189,18 @@ impl List { } } +impl StatelessInteractive for List { + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { + self.interactivity.as_stateless_mut() + } +} + +impl StatefulInteractive for List { + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { + &mut self.interactivity + } +} + impl Component for List { fn render(self) -> AnyElement { AnyElement::new(self) diff --git a/crates/gpui2/src/elements/svg.rs b/crates/gpui2/src/elements/svg.rs index 7db4c5cf6db86d96bf154c9a4f243c630b0a3fe5..8e2ba9d8a1ba944f7cd82ca583e30e53de147c23 100644 --- a/crates/gpui2/src/elements/svg.rs +++ b/crates/gpui2/src/elements/svg.rs @@ -1,21 +1,21 @@ use crate::{ div, AnyElement, Bounds, Component, Div, DivState, Element, ElementFocus, ElementId, - ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable, LayoutId, Pixels, - SharedString, StatefulInteraction, StatefulInteractive, StatelessInteraction, - StatelessInteractive, StyleRefinement, Styled, ViewContext, + ElementInteractivity, FocusDisabled, FocusEnabled, FocusListeners, Focusable, LayoutId, Pixels, + SharedString, StatefulInteractive, StatefulInteractivity, StatelessInteractive, + StatelessInteractivity, StyleRefinement, Styled, ViewContext, }; use util::ResultExt; pub struct Svg< V: 'static, - I: ElementInteraction = StatelessInteraction, + I: ElementInteractivity = StatelessInteractivity, F: ElementFocus = FocusDisabled, > { base: Div, path: Option, } -pub fn svg() -> Svg, FocusDisabled> { +pub fn svg() -> Svg, FocusDisabled> { Svg { base: div(), path: None, @@ -24,7 +24,7 @@ pub fn svg() -> Svg, FocusDisabled> { impl Svg where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { pub fn path(mut self, path: impl Into) -> Self { @@ -33,11 +33,11 @@ where } } -impl Svg, F> +impl Svg, F> where F: ElementFocus, { - pub fn id(self, id: impl Into) -> Svg, F> { + pub fn id(self, id: impl Into) -> Svg, F> { Svg { base: self.base.id(id), path: self.path, @@ -47,7 +47,7 @@ where impl Component for Svg where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn render(self) -> AnyElement { @@ -57,7 +57,7 @@ where impl Element for Svg where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { type ElementState = DivState; @@ -107,7 +107,7 @@ where impl Styled for Svg where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn style(&mut self) -> &mut StyleRefinement { @@ -117,27 +117,27 @@ where impl StatelessInteractive for Svg where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { - fn stateless_interaction(&mut self) -> &mut StatelessInteraction { - self.base.stateless_interaction() + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { + self.base.stateless_interactivity() } } -impl StatefulInteractive for Svg, F> +impl StatefulInteractive for Svg, F> where V: 'static, F: ElementFocus, { - fn stateful_interaction(&mut self) -> &mut StatefulInteraction { - self.base.stateful_interaction() + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { + self.base.stateful_interactivity() } } impl Focusable for Svg> where - I: ElementInteraction, + I: ElementInteractivity, { fn focus_listeners(&mut self) -> &mut FocusListeners { self.base.focus_listeners() diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rs index da208b38131f8ddd0e297c47bc504065af232d15..9d0b896673f27a07531121ca029fdc9a451bc14d 100644 --- a/crates/gpui2/src/interactive.rs +++ b/crates/gpui2/src/interactive.rs @@ -25,13 +25,13 @@ const TOOLTIP_DELAY: Duration = Duration::from_millis(500); const TOOLTIP_OFFSET: Point = Point::new(px(10.0), px(8.0)); pub trait StatelessInteractive: Element { - fn stateless_interaction(&mut self) -> &mut StatelessInteraction; + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity; fn hover(mut self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self where Self: Sized, { - self.stateless_interaction().hover_style = f(StyleRefinement::default()); + self.stateless_interactivity().hover_style = f(StyleRefinement::default()); self } @@ -43,7 +43,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction().group_hover_style = Some(GroupStyle { + self.stateless_interactivity().group_hover_style = Some(GroupStyle { group: group_name.into(), style: f(StyleRefinement::default()), }); @@ -58,7 +58,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .mouse_down_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Bubble @@ -79,7 +79,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .mouse_up_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Bubble @@ -100,7 +100,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .mouse_down_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Capture @@ -121,7 +121,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .mouse_up_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Capture @@ -141,7 +141,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .mouse_move_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Bubble && bounds.contains_point(&event.position) { @@ -158,7 +158,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .scroll_wheel_listeners .push(Box::new(move |view, event, bounds, phase, cx| { if phase == DispatchPhase::Bubble && bounds.contains_point(&event.position) { @@ -174,23 +174,48 @@ pub trait StatelessInteractive: Element { C: TryInto, C::Error: Debug, { - self.stateless_interaction().dispatch_context = + self.stateless_interactivity().dispatch_context = context.try_into().expect("invalid dispatch context"); self } + /// Capture the given action, fires during the capture phase + fn capture_action( + mut self, + listener: impl Fn(&mut V, &A, &mut ViewContext) + 'static, + ) -> Self + where + Self: Sized, + { + self.stateless_interactivity().key_listeners.push(( + TypeId::of::(), + Box::new(move |view, event, _, phase, cx| { + let event = event.downcast_ref().unwrap(); + if phase == DispatchPhase::Capture { + listener(view, event, cx) + } + None + }), + )); + self + } + + /// Add a listener for the given action, fires during the bubble event phase fn on_action( mut self, - listener: impl Fn(&mut V, &A, DispatchPhase, &mut ViewContext) + 'static, + listener: impl Fn(&mut V, &A, &mut ViewContext) + 'static, ) -> Self where Self: Sized, { - self.stateless_interaction().key_listeners.push(( + self.stateless_interactivity().key_listeners.push(( TypeId::of::(), Box::new(move |view, event, _, phase, cx| { let event = event.downcast_ref().unwrap(); - listener(view, event, phase, cx); + if phase == DispatchPhase::Bubble { + listener(view, event, cx) + } + None }), )); @@ -204,7 +229,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction().key_listeners.push(( + self.stateless_interactivity().key_listeners.push(( TypeId::of::(), Box::new(move |view, event, _, phase, cx| { let event = event.downcast_ref().unwrap(); @@ -222,7 +247,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction().key_listeners.push(( + self.stateless_interactivity().key_listeners.push(( TypeId::of::(), Box::new(move |view, event, _, phase, cx| { let event = event.downcast_ref().unwrap(); @@ -237,7 +262,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction() + self.stateless_interactivity() .drag_over_styles .push((TypeId::of::(), f(StyleRefinement::default()))); self @@ -251,7 +276,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction().group_drag_over_styles.push(( + self.stateless_interactivity().group_drag_over_styles.push(( TypeId::of::(), GroupStyle { group: group_name.into(), @@ -268,7 +293,7 @@ pub trait StatelessInteractive: Element { where Self: Sized, { - self.stateless_interaction().drop_listeners.push(( + self.stateless_interactivity().drop_listeners.push(( TypeId::of::(), Box::new(move |view, dragged_view, cx| { listener(view, dragged_view.downcast().unwrap(), cx); @@ -279,13 +304,13 @@ pub trait StatelessInteractive: Element { } pub trait StatefulInteractive: StatelessInteractive { - fn stateful_interaction(&mut self) -> &mut StatefulInteraction; + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity; fn active(mut self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self where Self: Sized, { - self.stateful_interaction().active_style = f(StyleRefinement::default()); + self.stateful_interactivity().active_style = f(StyleRefinement::default()); self } @@ -297,7 +322,7 @@ pub trait StatefulInteractive: StatelessInteractive { where Self: Sized, { - self.stateful_interaction().group_active_style = Some(GroupStyle { + self.stateful_interactivity().group_active_style = Some(GroupStyle { group: group_name.into(), style: f(StyleRefinement::default()), }); @@ -311,7 +336,7 @@ pub trait StatefulInteractive: StatelessInteractive { where Self: Sized, { - self.stateful_interaction() + self.stateful_interactivity() .click_listeners .push(Box::new(move |view, event, cx| listener(view, event, cx))); self @@ -326,10 +351,10 @@ pub trait StatefulInteractive: StatelessInteractive { W: 'static + Render, { debug_assert!( - self.stateful_interaction().drag_listener.is_none(), + self.stateful_interactivity().drag_listener.is_none(), "calling on_drag more than once on the same element is not supported" ); - self.stateful_interaction().drag_listener = + self.stateful_interactivity().drag_listener = Some(Box::new(move |view_state, cursor_offset, cx| AnyDrag { view: listener(view_state, cx).into(), cursor_offset, @@ -342,10 +367,10 @@ pub trait StatefulInteractive: StatelessInteractive { Self: Sized, { debug_assert!( - self.stateful_interaction().hover_listener.is_none(), + self.stateful_interactivity().hover_listener.is_none(), "calling on_hover more than once on the same element is not supported" ); - self.stateful_interaction().hover_listener = Some(Box::new(listener)); + self.stateful_interactivity().hover_listener = Some(Box::new(listener)); self } @@ -358,10 +383,10 @@ pub trait StatefulInteractive: StatelessInteractive { W: 'static + Render, { debug_assert!( - self.stateful_interaction().tooltip_builder.is_none(), + self.stateful_interactivity().tooltip_builder.is_none(), "calling tooltip more than once on the same element is not supported" ); - self.stateful_interaction().tooltip_builder = Some(Arc::new(move |view_state, cx| { + self.stateful_interactivity().tooltip_builder = Some(Arc::new(move |view_state, cx| { build_tooltip(view_state, cx).into() })); @@ -369,11 +394,11 @@ pub trait StatefulInteractive: StatelessInteractive { } } -pub trait ElementInteraction: 'static { - fn as_stateless(&self) -> &StatelessInteraction; - fn as_stateless_mut(&mut self) -> &mut StatelessInteraction; - fn as_stateful(&self) -> Option<&StatefulInteraction>; - fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteraction>; +pub trait ElementInteractivity: 'static { + fn as_stateless(&self) -> &StatelessInteractivity; + fn as_stateless_mut(&mut self) -> &mut StatelessInteractivity; + fn as_stateful(&self) -> Option<&StatefulInteractivity>; + fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteractivity>; fn initialize( &mut self, @@ -735,11 +760,11 @@ pub trait ElementInteraction: 'static { } #[derive(Deref, DerefMut)] -pub struct StatefulInteraction { +pub struct StatefulInteractivity { pub id: ElementId, #[deref] #[deref_mut] - stateless: StatelessInteraction, + stateless: StatelessInteractivity, click_listeners: SmallVec<[ClickListener; 2]>, active_style: StyleRefinement, group_active_style: Option, @@ -748,29 +773,29 @@ pub struct StatefulInteraction { tooltip_builder: Option>, } -impl ElementInteraction for StatefulInteraction { - fn as_stateful(&self) -> Option<&StatefulInteraction> { +impl ElementInteractivity for StatefulInteractivity { + fn as_stateful(&self) -> Option<&StatefulInteractivity> { Some(self) } - fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteraction> { + fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteractivity> { Some(self) } - fn as_stateless(&self) -> &StatelessInteraction { + fn as_stateless(&self) -> &StatelessInteractivity { &self.stateless } - fn as_stateless_mut(&mut self) -> &mut StatelessInteraction { + fn as_stateless_mut(&mut self) -> &mut StatelessInteractivity { &mut self.stateless } } -impl From for StatefulInteraction { +impl From for StatefulInteractivity { fn from(id: ElementId) -> Self { Self { id, - stateless: StatelessInteraction::default(), + stateless: StatelessInteractivity::default(), click_listeners: SmallVec::new(), drag_listener: None, hover_listener: None, @@ -783,7 +808,7 @@ impl From for StatefulInteraction { type DropListener = dyn Fn(&mut V, AnyView, &mut ViewContext) + 'static; -pub struct StatelessInteraction { +pub struct StatelessInteractivity { pub dispatch_context: DispatchContext, pub mouse_down_listeners: SmallVec<[MouseDownListener; 2]>, pub mouse_up_listeners: SmallVec<[MouseUpListener; 2]>, @@ -797,9 +822,9 @@ pub struct StatelessInteraction { drop_listeners: SmallVec<[(TypeId, Box>); 2]>, } -impl StatelessInteraction { - pub fn into_stateful(self, id: impl Into) -> StatefulInteraction { - StatefulInteraction { +impl StatelessInteractivity { + pub fn into_stateful(self, id: impl Into) -> StatefulInteractivity { + StatefulInteractivity { id: id.into(), stateless: self, click_listeners: SmallVec::new(), @@ -877,7 +902,7 @@ impl InteractiveElementState { } } -impl Default for StatelessInteraction { +impl Default for StatelessInteractivity { fn default() -> Self { Self { dispatch_context: DispatchContext::default(), @@ -895,20 +920,20 @@ impl Default for StatelessInteraction { } } -impl ElementInteraction for StatelessInteraction { - fn as_stateful(&self) -> Option<&StatefulInteraction> { +impl ElementInteractivity for StatelessInteractivity { + fn as_stateful(&self) -> Option<&StatefulInteractivity> { None } - fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteraction> { + fn as_stateful_mut(&mut self) -> Option<&mut StatefulInteractivity> { None } - fn as_stateless(&self) -> &StatelessInteraction { + fn as_stateless(&self) -> &StatelessInteractivity { self } - fn as_stateless_mut(&mut self) -> &mut StatelessInteraction { + fn as_stateless_mut(&mut self) -> &mut StatelessInteractivity { self } } diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs index d2571a3253522cbfed12ffce1d130d762ac59a5a..0fe3660d7c560c85c5fdecc5d49eef467c916047 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -277,7 +277,7 @@ impl Style { pub fn paint(&self, bounds: Bounds, cx: &mut ViewContext) { let rem_size = cx.rem_size(); - cx.stack(0, |cx| { + cx.with_z_index(0, |cx| { cx.paint_shadows( bounds, self.corner_radii.to_pixels(bounds.size, rem_size), @@ -287,7 +287,7 @@ impl Style { let background_color = self.background.as_ref().and_then(Fill::color); if background_color.is_some() || self.is_border_visible() { - cx.stack(1, |cx| { + cx.with_z_index(1, |cx| { cx.paint_quad( bounds, self.corner_radii.to_pixels(bounds.size, rem_size), diff --git a/crates/gpui2/src/text_system/line.rs b/crates/gpui2/src/text_system/line.rs index 21a7dcea6fcc9ec1f20f1b6d066bb24ecf9ae8da..29956b70f26c14b7888d323daa30189ab00621f5 100644 --- a/crates/gpui2/src/text_system/line.rs +++ b/crates/gpui2/src/text_system/line.rs @@ -142,8 +142,6 @@ impl Line { color, )?; } - } else { - dbg!(content_mask.bounds, max_glyph_bounds); } } } diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 7c05018aa1aaca1fb64461cab20989827ac81161..8811c845a6c94eddd3596d25cef1f7a27d9b6385 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -1698,8 +1698,8 @@ impl<'a, V: 'static> ViewContext<'a, V> { &mut self.window_cx } - pub fn stack(&mut self, order: u32, f: impl FnOnce(&mut Self) -> R) -> R { - self.window.z_index_stack.push(order); + pub fn with_z_index(&mut self, z_index: u32, f: impl FnOnce(&mut Self) -> R) -> R { + self.window.z_index_stack.push(z_index); let result = f(self); self.window.z_index_stack.pop(); result diff --git a/crates/menu2/Cargo.toml b/crates/menu2/Cargo.toml index 9bf61db82c6c01d30c12e9c01844c3db464df40f..5fc33ddb11d41416c4b64aa15d7e3d1564952f94 100644 --- a/crates/menu2/Cargo.toml +++ b/crates/menu2/Cargo.toml @@ -9,4 +9,5 @@ path = "src/menu2.rs" doctest = false [dependencies] -gpui = { package = "gpui2", path = "../gpui2" } +serde.workspace = true +serde_derive.workspace = true diff --git a/crates/menu2/src/menu2.rs b/crates/menu2/src/menu2.rs index decd4aca22be0bda9c9c5ceae87346213e9d4392..da21bdcd2282cd4834f42eb67839553ea5c6ae91 100644 --- a/crates/menu2/src/menu2.rs +++ b/crates/menu2/src/menu2.rs @@ -1,25 +1,25 @@ -// todo!(use actions! macro) +use serde_derive::Deserialize; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct Cancel; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct Confirm; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct SecondaryConfirm; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct SelectPrev; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct SelectNext; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct SelectFirst; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct SelectLast; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct ShowContextMenu; diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 3bcf5b92037a48e3e99fa372c442820bf084d000..26ca810b0c9b6fa7d8b2f966bd842f7131592ccb 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -18,11 +18,11 @@ // Dismiss, // } -use std::ops::Range; +use std::cmp; use gpui::{ - div, list, red, AppContext, Component, Div, Element, ElementId, ParentElement, Render, Styled, - ViewContext, + div, list, Component, ElementId, FocusHandle, Focusable, ParentElement, StatelessInteractive, + Styled, ViewContext, }; // pub struct Picker { @@ -43,8 +43,9 @@ pub trait PickerDelegate: Sized + 'static { fn match_count(&self, picker_id: ElementId) -> usize; - // fn selected_index(&self) -> usize; - // fn set_selected_index(&mut self, ix: usize, cx: &mut ViewContext>); + fn selected_index(&self, picker_id: ElementId) -> usize; + fn set_selected_index(&mut self, ix: usize, picker_id: ElementId, cx: &mut ViewContext); + // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; // fn confirm(&mut self, secondary: bool, cx: &mut ViewContext>); // fn dismissed(&mut self, cx: &mut ViewContext>); @@ -53,8 +54,6 @@ pub trait PickerDelegate: Sized + 'static { fn render_match( &self, ix: usize, - active: bool, - hovered: bool, selected: bool, picker_id: ElementId, cx: &mut ViewContext, @@ -84,32 +83,72 @@ pub trait PickerDelegate: Sized + 'static { #[derive(Component)] pub struct Picker { id: ElementId, + focus_handle: FocusHandle, phantom: std::marker::PhantomData, } impl Picker { - pub fn new(id: impl Into) -> Self { + pub fn new(id: impl Into, focus_handle: FocusHandle) -> Self { Self { id: id.into(), + focus_handle, phantom: std::marker::PhantomData, } } } impl Picker { - pub fn render(self, view: &mut V, cx: &mut ViewContext) -> impl Component { - div().size_full().id(self.id.clone()).child( - list( - "candidates", - view.match_count(self.id.clone()), - move |this: &mut V, visible_range, cx| { - visible_range - .map(|ix| this.render_match(ix, false, false, false, self.id.clone(), cx)) - .collect() - }, + pub fn render(self, view: &mut V, _cx: &mut ViewContext) -> impl Component { + let id = self.id.clone(); + div() + .size_full() + .id(self.id.clone()) + .track_focus(&self.focus_handle) + .context("picker") + .on_focus(|v, e, cx| { + dbg!("FOCUSED!"); + }) + .on_blur(|v, e, cx| { + dbg!("BLURRED!"); + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::SelectNext, cx| { + let index = view.selected_index(id.clone()); + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index(cmp::min(index + 1, count - 1), id.clone(), cx); + } + } + }) + .on_action({ + let id = id.clone(); + move |view, _: &menu::SelectPrev, cx| { + let index = view.selected_index(id.clone()); + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index((index + 1) % count, id.clone(), cx); + } + } + }) + .on_action(|view, _: &menu::SelectFirst, cx| {}) + .on_action(|view, _: &menu::SelectLast, cx| {}) + .on_action(|view, _: &menu::Cancel, cx| {}) + .on_action(|view, _: &menu::Confirm, cx| {}) + .on_action(|view, _: &menu::SecondaryConfirm, cx| {}) + .child( + list( + "candidates", + view.match_count(self.id.clone()), + move |view: &mut V, visible_range, cx| { + let selected_ix = view.selected_index(self.id.clone()); + visible_range + .map(|ix| view.render_match(ix, ix == selected_ix, self.id.clone(), cx)) + .collect() + }, + ) + .size_full(), ) - .size_full(), - ) } } diff --git a/crates/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index 0e35a7a66f3f892aec1df787456ce9e9d00acfb1..7a59dda6dfe5d351b89981560c4cc4781be4ae7e 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -25,6 +25,7 @@ smallvec.workspace = true strum = { version = "0.25.0", features = ["derive"] } theme = { path = "../theme" } theme2 = { path = "../theme2" } +menu = { package = "menu2", path = "../menu2" } ui = { package = "ui2", path = "../ui2", features = ["stories"] } util = { path = "../util" } picker = { package = "picker2", path = "../picker2" } diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index 16c03f87d5421af9d9336e462692102c4cb632bb..bfd7d5fa1c25496f402c9fcc1b1e7e46ce1a3f56 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -1,5 +1,5 @@ use gpui::{ - div, Div, FocusEnabled, Focusable, KeyBinding, ParentElement, Render, StatefulInteraction, + div, Div, FocusEnabled, Focusable, KeyBinding, ParentElement, Render, StatefulInteractivity, StatelessInteractive, Styled, View, VisualContext, WindowContext, }; use serde::Deserialize; @@ -31,7 +31,7 @@ impl FocusStory { } impl Render for FocusStory { - type Element = Div, FocusEnabled>; + type Element = Div, FocusEnabled>; fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { let theme = cx.theme(); @@ -48,20 +48,18 @@ impl Render for FocusStory { .id("parent") .focusable() .context("parent") - .on_action(|_, action: &ActionA, phase, cx| { - println!("Action A dispatched on parent during {:?}", phase); + .on_action(|_, action: &ActionA, cx| { + println!("Action A dispatched on parent during"); }) - .on_action(|_, action: &ActionB, phase, cx| { - println!("Action B dispatched on parent during {:?}", phase); + .on_action(|_, action: &ActionB, cx| { + println!("Action B dispatched on parent during"); }) .on_focus(|_, _, _| println!("Parent focused")) .on_blur(|_, _, _| println!("Parent blurred")) .on_focus_in(|_, _, _| println!("Parent focus_in")) .on_focus_out(|_, _, _| println!("Parent focus_out")) - .on_key_down(|_, event, phase, _| { - println!("Key down on parent {:?} {:?}", phase, event) - }) - .on_key_up(|_, event, phase, _| println!("Key up on parent {:?} {:?}", phase, event)) + .on_key_down(|_, event, phase, _| println!("Key down on parent {:?}", event)) + .on_key_up(|_, event, phase, _| println!("Key up on parent {:?}", event)) .size_full() .bg(color_1) .focus(|style| style.bg(color_2)) @@ -70,8 +68,8 @@ impl Render for FocusStory { div() .track_focus(&child_1) .context("child-1") - .on_action(|_, action: &ActionB, phase, cx| { - println!("Action B dispatched on child 1 during {:?}", phase); + .on_action(|_, action: &ActionB, cx| { + println!("Action B dispatched on child 1 during"); }) .w_full() .h_6() @@ -82,20 +80,16 @@ impl Render for FocusStory { .on_blur(|_, _, _| println!("Child 1 blurred")) .on_focus_in(|_, _, _| println!("Child 1 focus_in")) .on_focus_out(|_, _, _| println!("Child 1 focus_out")) - .on_key_down(|_, event, phase, _| { - println!("Key down on child 1 {:?} {:?}", phase, event) - }) - .on_key_up(|_, event, phase, _| { - println!("Key up on child 1 {:?} {:?}", phase, event) - }) + .on_key_down(|_, event, phase, _| println!("Key down on child 1 {:?}", event)) + .on_key_up(|_, event, phase, _| println!("Key up on child 1 {:?}", event)) .child("Child 1"), ) .child( div() .track_focus(&child_2) .context("child-2") - .on_action(|_, action: &ActionC, phase, cx| { - println!("Action C dispatched on child 2 during {:?}", phase); + .on_action(|_, action: &ActionC, cx| { + println!("Action C dispatched on child 2 during"); }) .w_full() .h_6() @@ -104,12 +98,8 @@ impl Render for FocusStory { .on_blur(|_, _, _| println!("Child 2 blurred")) .on_focus_in(|_, _, _| println!("Child 2 focus_in")) .on_focus_out(|_, _, _| println!("Child 2 focus_out")) - .on_key_down(|_, event, phase, _| { - println!("Key down on child 2 {:?} {:?}", phase, event) - }) - .on_key_up(|_, event, phase, _| { - println!("Key up on child 2 {:?} {:?}", phase, event) - }) + .on_key_down(|_, event, phase, _| println!("Key down on child 2 {:?}", event)) + .on_key_up(|_, event, phase, _| println!("Key up on child 2 {:?}", event)) .child("Child 2"), ) } diff --git a/crates/storybook2/src/stories/kitchen_sink.rs b/crates/storybook2/src/stories/kitchen_sink.rs index 54d6f2a3a967cc3f6e5a29be97e36291c45bdeff..6831ae27220ca4691f5f8ac371c0f43e6dd7b013 100644 --- a/crates/storybook2/src/stories/kitchen_sink.rs +++ b/crates/storybook2/src/stories/kitchen_sink.rs @@ -1,5 +1,5 @@ use crate::{story::Story, story_selector::ComponentStory}; -use gpui::{Div, Render, StatefulInteraction, View, VisualContext}; +use gpui::{Div, Render, StatefulInteractivity, View, VisualContext}; use strum::IntoEnumIterator; use ui::prelude::*; @@ -12,7 +12,7 @@ impl KitchenSinkStory { } impl Render for KitchenSinkStory { - type Element = Div>; + type Element = Div>; fn render(&mut self, cx: &mut ViewContext) -> Self::Element { let component_stories = ComponentStory::iter() diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index 23d13b83fc80a53b8789bfd0fe73dd3af9d9e07f..13c3957979737f27c0eacfda71e5ecd41ae681e6 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -1,15 +1,18 @@ use gpui::{ - black, div, red, Div, Fill, ParentElement, Render, SharedString, Styled, View, VisualContext, - WindowContext, + div, Component, Div, FocusHandle, KeyBinding, ParentElement, Render, SharedString, + StatelessInteractive, Styled, View, VisualContext, WindowContext, }; use picker::{Picker, PickerDelegate}; +use theme2::ActiveTheme; pub struct PickerStory { + selected_ix: usize, candidates: Vec, + focus_handle: FocusHandle, } impl PickerDelegate for PickerStory { - type ListItem = SharedString; + type ListItem = Div; fn match_count(&self, _picker_id: gpui::ElementId) -> usize { self.candidates.len() @@ -18,46 +21,118 @@ impl PickerDelegate for PickerStory { fn render_match( &self, ix: usize, - _active: bool, - _hovered: bool, - _selected: bool, + selected: bool, _picker_id: gpui::ElementId, cx: &mut gpui::ViewContext, ) -> Self::ListItem { - self.candidates[ix].clone() + let colors = cx.theme().colors(); + + div() + .text_color(colors.text) + .when(selected, |s| { + s.border_l_10().border_color(colors.terminal_ansi_yellow) + }) + .hover(|style| { + style + .bg(colors.element_active) + .text_color(colors.text_accent) + }) + .child(self.candidates[ix].clone()) + } + + fn selected_index(&self, picker_id: gpui::ElementId) -> usize { + self.selected_ix + } + + fn set_selected_index( + &mut self, + ix: usize, + _picker_id: gpui::ElementId, + _cx: &mut gpui::ViewContext, + ) { + self.selected_ix = ix; } } impl PickerStory { pub fn new(cx: &mut WindowContext) -> View { - cx.build_view(|cx| PickerStory { - candidates: vec![ - "Pizza (Italy)".into(), - "Sushi (Japan)".into(), - "Paella (Spain)".into(), - "Tacos (Mexico)".into(), - "Peking Duck (China)".into(), - "Fish and Chips (UK)".into(), - "Croissant (France)".into(), - "Bratwurst (Germany)".into(), - "Poutine (Canada)".into(), - "Chicken Tikka Masala (India)".into(), - "Feijoada (Brazil)".into(), - "Kimchi (Korea)".into(), - "Borscht (Ukraine)".into(), - "Falafel (Middle East)".into(), - "Baklava (Turkey)".into(), - "Shepherd's Pie (Ireland)".into(), - "Rendang (Indonesia)".into(), - "Kebab (Middle East)".into(), - "Ceviche (Peru)".into(), - "Pierogi (Poland)".into(), - "Churrasco (Brazil)".into(), - "Moussaka (Greece)".into(), - "Lasagna (Italy)".into(), - "Pad Thai (Thailand)".into(), - "Pho (Vietnam)".into(), - ], + cx.build_view(|cx| { + cx.bind_keys([ + KeyBinding::new("up", menu::SelectPrev, Some("picker")), + KeyBinding::new("pageup", menu::SelectFirst, Some("picker")), + KeyBinding::new("shift-pageup", menu::SelectFirst, Some("picker")), + KeyBinding::new("ctrl-p", menu::SelectPrev, Some("picker")), + KeyBinding::new("down", menu::SelectNext, Some("picker")), + KeyBinding::new("pagedown", menu::SelectLast, Some("picker")), + KeyBinding::new("shift-pagedown", menu::SelectFirst, Some("picker")), + KeyBinding::new("ctrl-n", menu::SelectNext, Some("picker")), + KeyBinding::new("cmd-up", menu::SelectFirst, Some("picker")), + KeyBinding::new("cmd-down", menu::SelectLast, Some("picker")), + KeyBinding::new("enter", menu::Confirm, Some("picker")), + KeyBinding::new("ctrl-enter", menu::ShowContextMenu, Some("picker")), + KeyBinding::new("cmd-enter", menu::SecondaryConfirm, Some("picker")), + KeyBinding::new("escape", menu::Cancel, Some("picker")), + KeyBinding::new("ctrl-c", menu::Cancel, Some("picker")), + ]); + + let fh = cx.focus_handle(); + cx.focus(&fh); + + PickerStory { + focus_handle: fh, + candidates: vec![ + "Baguette (France)".into(), + "Baklava (Turkey)".into(), + "Beef Wellington (UK)".into(), + "Biryani (India)".into(), + "Borscht (Ukraine)".into(), + "Bratwurst (Germany)".into(), + "Bulgogi (Korea)".into(), + "Burrito (USA)".into(), + "Ceviche (Peru)".into(), + "Chicken Tikka Masala (India)".into(), + "Churrasco (Brazil)".into(), + "Couscous (North Africa)".into(), + "Croissant (France)".into(), + "Dim Sum (China)".into(), + "Empanada (Argentina)".into(), + "Fajitas (Mexico)".into(), + "Falafel (Middle East)".into(), + "Feijoada (Brazil)".into(), + "Fish and Chips (UK)".into(), + "Fondue (Switzerland)".into(), + "Goulash (Hungary)".into(), + "Haggis (Scotland)".into(), + "Kebab (Middle East)".into(), + "Kimchi (Korea)".into(), + "Lasagna (Italy)".into(), + "Maple Syrup Pancakes (Canada)".into(), + "Moussaka (Greece)".into(), + "Pad Thai (Thailand)".into(), + "Paella (Spain)".into(), + "Pancakes (USA)".into(), + "Pasta Carbonara (Italy)".into(), + "Pavlova (Australia)".into(), + "Peking Duck (China)".into(), + "Pho (Vietnam)".into(), + "Pierogi (Poland)".into(), + "Pizza (Italy)".into(), + "Poutine (Canada)".into(), + "Pretzel (Germany)".into(), + "Ramen (Japan)".into(), + "Rendang (Indonesia)".into(), + "Sashimi (Japan)".into(), + "Satay (Indonesia)".into(), + "Shepherd's Pie (Ireland)".into(), + "Sushi (Japan)".into(), + "Tacos (Mexico)".into(), + "Tandoori Chicken (India)".into(), + "Tortilla (Spain)".into(), + "Tzatziki (Greece)".into(), + "Wiener Schnitzel (Austria)".into(), + ], + selected_ix: 0, + } }) } } @@ -66,9 +141,11 @@ impl Render for PickerStory { type Element = Div; fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { + let theme = cx.theme(); + div() - .text_color(red()) + .bg(theme.styles.colors.background) .size_full() - .child(Picker::new("picker_story")) + .child(Picker::new("picker_story", self.focus_handle.clone())) } } diff --git a/crates/storybook2/src/stories/scroll.rs b/crates/storybook2/src/stories/scroll.rs index cdb48603e093f62e4ef5ee5968af068798e3bce9..31928bb9e40343d61c1bba0e9d34259f7853cc8f 100644 --- a/crates/storybook2/src/stories/scroll.rs +++ b/crates/storybook2/src/stories/scroll.rs @@ -1,5 +1,5 @@ use gpui::{ - div, px, Component, Div, ParentElement, Render, SharedString, StatefulInteraction, Styled, + div, px, Component, Div, ParentElement, Render, SharedString, StatefulInteractivity, Styled, View, VisualContext, WindowContext, }; use theme2::ActiveTheme; @@ -13,7 +13,7 @@ impl ScrollStory { } impl Render for ScrollStory { - type Element = Div>; + type Element = Div>; fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { let theme = cx.theme(); diff --git a/crates/ui2/src/components/checkbox.rs b/crates/ui2/src/components/checkbox.rs index 9f7c10a10433eef59249e3ab0df408b94a8a2aff..20dad747124ca2a652679324f04590dbf9d3f05d 100644 --- a/crates/ui2/src/components/checkbox.rs +++ b/crates/ui2/src/components/checkbox.rs @@ -128,7 +128,7 @@ impl Checkbox { // click area for the checkbox. .size_5() // Because we've enlarged the click area, we need to create a - // `group` to pass down interaction events to the checkbox. + // `group` to pass down interactivity events to the checkbox. .group(group_id.clone()) .child( div() @@ -148,7 +148,7 @@ impl Checkbox { .bg(bg_color) .border() .border_color(border_color) - // We only want the interaction states to fire when we + // We only want the interactivity states to fire when we // are in a checkbox that isn't disabled. .when(!self.disabled, |this| { // Here instead of `hover()` we use `group_hover()` diff --git a/crates/zed/src/languages/racket/highlights.scm b/crates/zed/src/languages/racket/highlights.scm index 2c0caf89357cfbe8f966bffbbc712272b3c1e59d..3caf1d88e97dd0fcdc2e08d6ef866ad74c436a31 100644 --- a/crates/zed/src/languages/racket/highlights.scm +++ b/crates/zed/src/languages/racket/highlights.scm @@ -37,4 +37,3 @@ ((symbol) @comment (#match? @comment "^#[cC][iIsS]$")) - diff --git a/crates/zed2/src/languages/racket/highlights.scm b/crates/zed2/src/languages/racket/highlights.scm index 2c0caf89357cfbe8f966bffbbc712272b3c1e59d..3caf1d88e97dd0fcdc2e08d6ef866ad74c436a31 100644 --- a/crates/zed2/src/languages/racket/highlights.scm +++ b/crates/zed2/src/languages/racket/highlights.scm @@ -37,4 +37,3 @@ ((symbol) @comment (#match? @comment "^#[cC][iIsS]$")) - From 8e799b6e2241a6620499d731c751fdd73133e889 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 6 Nov 2023 20:44:03 -0700 Subject: [PATCH 044/110] Flesh out gpui2 test support --- crates/gpui2/src/app/test_context.rs | 21 ++- crates/gpui2/src/geometry.rs | 4 + crates/gpui2/src/platform/test.rs | 4 + crates/gpui2/src/platform/test/display.rs | 41 +++++ crates/gpui2/src/platform/test/platform.rs | 33 ++-- crates/gpui2/src/platform/test/window.rs | 179 +++++++++++++++++++++ crates/gpui2/src/window.rs | 2 +- 7 files changed, 271 insertions(+), 13 deletions(-) create mode 100644 crates/gpui2/src/platform/test/display.rs create mode 100644 crates/gpui2/src/platform/test/window.rs diff --git a/crates/gpui2/src/app/test_context.rs b/crates/gpui2/src/app/test_context.rs index 856fce75b44541eb690f9cf1bad603ca7fe678c7..530138e21e042f22422749058bd255fc93d5e37d 100644 --- a/crates/gpui2/src/app/test_context.rs +++ b/crates/gpui2/src/app/test_context.rs @@ -1,7 +1,7 @@ use crate::{ AnyView, AnyWindowHandle, AppCell, AppContext, AsyncAppContext, BackgroundExecutor, Context, - EventEmitter, ForegroundExecutor, Model, ModelContext, Result, Task, TestDispatcher, - TestPlatform, WindowContext, + EventEmitter, ForegroundExecutor, InputEvent, KeyDownEvent, Keystroke, Model, ModelContext, + Result, Task, TestDispatcher, TestPlatform, WindowContext, }; use anyhow::{anyhow, bail}; use futures::{Stream, StreamExt}; @@ -129,6 +129,23 @@ impl TestAppContext { } } + pub fn dispatch_keystroke( + &mut self, + window: AnyWindowHandle, + keystroke: Keystroke, + is_held: bool, + ) { + let handled = window + .update(self, |_, cx| { + cx.dispatch_event(InputEvent::KeyDown(KeyDownEvent { keystroke, is_held })) + }) + .is_ok_and(|handled| handled); + + if !handled { + // todo!() simluate input here + } + } + pub fn notifications(&mut self, entity: &Model) -> impl Stream { let (tx, rx) = futures::channel::mpsc::unbounded(); diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index d6755a53973f00d5fee4fd11912f6e73da26cf71..08a661630e707c14791d96bbd6531b0cd42b3c9d 100644 --- a/crates/gpui2/src/geometry.rs +++ b/crates/gpui2/src/geometry.rs @@ -25,6 +25,10 @@ impl Point { Self { x, y } } + pub fn zero() -> Self { + Self::new(T::default(), T::default()) + } + pub fn map(&self, f: impl Fn(T) -> U) -> Point { Point { x: f(self.x.clone()), diff --git a/crates/gpui2/src/platform/test.rs b/crates/gpui2/src/platform/test.rs index 7e59ced7301d75b7784c67bb5de0fe8893074b3f..acc8ffe41ce423e7b16fd9e17e86ef3b5f71dfd4 100644 --- a/crates/gpui2/src/platform/test.rs +++ b/crates/gpui2/src/platform/test.rs @@ -1,5 +1,9 @@ mod dispatcher; +mod display; mod platform; +mod window; pub use dispatcher::*; +pub use display::*; pub use platform::*; +pub use window::*; diff --git a/crates/gpui2/src/platform/test/display.rs b/crates/gpui2/src/platform/test/display.rs new file mode 100644 index 0000000000000000000000000000000000000000..78d75296e66d3fa18f1c7ba6403537369ff013a7 --- /dev/null +++ b/crates/gpui2/src/platform/test/display.rs @@ -0,0 +1,41 @@ +use anyhow::{Ok, Result}; + +use crate::{Bounds, DisplayId, GlobalPixels, PlatformDisplay, Point}; + +#[derive(Debug)] +pub struct TestDisplay { + id: DisplayId, + uuid: uuid::Uuid, + bounds: Bounds, +} + +impl TestDisplay { + pub fn new() -> Self { + TestDisplay { + id: DisplayId(1), + uuid: uuid::Uuid::new_v4(), + bounds: Bounds::from_corners( + Point::zero(), + Point::new(GlobalPixels(1920.), GlobalPixels(1080.)), + ), + } + } +} + +impl PlatformDisplay for TestDisplay { + fn id(&self) -> crate::DisplayId { + self.id + } + + fn uuid(&self) -> Result { + Ok(self.uuid) + } + + fn as_any(&self) -> &dyn std::any::Any { + todo!() + } + + fn bounds(&self) -> crate::Bounds { + self.bounds + } +} diff --git a/crates/gpui2/src/platform/test/platform.rs b/crates/gpui2/src/platform/test/platform.rs index b4f3c739e60921a880827422023f8ff7d3c9e3df..37978e7ad7fe7e4b4df812cf3116f15239d6d2a8 100644 --- a/crates/gpui2/src/platform/test/platform.rs +++ b/crates/gpui2/src/platform/test/platform.rs @@ -1,10 +1,18 @@ -use crate::{BackgroundExecutor, DisplayId, ForegroundExecutor, Platform, PlatformTextSystem}; +use crate::{ + AnyWindowHandle, BackgroundExecutor, CursorStyle, DisplayId, ForegroundExecutor, Platform, + PlatformDisplay, PlatformTextSystem, TestDisplay, TestWindow, WindowOptions, +}; use anyhow::{anyhow, Result}; -use std::sync::Arc; +use parking_lot::Mutex; +use std::{rc::Rc, sync::Arc}; pub struct TestPlatform { background_executor: BackgroundExecutor, foreground_executor: ForegroundExecutor, + + active_window: Arc>>, + active_display: Rc, + active_cursor: Mutex, } impl TestPlatform { @@ -12,6 +20,10 @@ impl TestPlatform { TestPlatform { background_executor: executor, foreground_executor, + + active_cursor: Default::default(), + active_display: Rc::new(TestDisplay::new()), + active_window: Default::default(), } } } @@ -59,11 +71,11 @@ impl Platform for TestPlatform { } fn displays(&self) -> Vec> { - unimplemented!() + vec![self.active_display.clone()] } - fn display(&self, _id: DisplayId) -> Option> { - unimplemented!() + fn display(&self, id: DisplayId) -> Option> { + self.displays().iter().find(|d| d.id() == id).cloned() } fn main_window(&self) -> Option { @@ -72,10 +84,11 @@ impl Platform for TestPlatform { fn open_window( &self, - _handle: crate::AnyWindowHandle, - _options: crate::WindowOptions, + handle: AnyWindowHandle, + options: WindowOptions, ) -> Box { - unimplemented!() + *self.active_window.lock() = Some(handle); + Box::new(TestWindow::new(options, self.active_display.clone())) } fn set_display_link_output_callback( @@ -164,8 +177,8 @@ impl Platform for TestPlatform { unimplemented!() } - fn set_cursor_style(&self, _style: crate::CursorStyle) { - unimplemented!() + fn set_cursor_style(&self, style: crate::CursorStyle) { + *self.active_cursor.lock() = style; } fn should_auto_hide_scrollbars(&self) -> bool { diff --git a/crates/gpui2/src/platform/test/window.rs b/crates/gpui2/src/platform/test/window.rs new file mode 100644 index 0000000000000000000000000000000000000000..f1327196556dbf93871ec86da50f4108d9a32846 --- /dev/null +++ b/crates/gpui2/src/platform/test/window.rs @@ -0,0 +1,179 @@ +use std::{rc::Rc, sync::Arc}; + +use parking_lot::Mutex; + +use crate::{ + px, Pixels, PlatformAtlas, PlatformDisplay, PlatformWindow, Point, Scene, Size, + WindowAppearance, WindowBounds, WindowOptions, +}; + +#[derive(Default)] +struct Handlers { + active_status_change: Vec>, + input: Vec bool>>, + moved: Vec>, + resize: Vec, f32)>>, +} + +pub struct TestWindow { + bounds: WindowBounds, + current_scene: Mutex>, + display: Rc, + + handlers: Mutex, + sprite_atlas: Arc, +} +impl TestWindow { + pub fn new(options: WindowOptions, display: Rc) -> Self { + Self { + bounds: options.bounds, + current_scene: Default::default(), + display, + + sprite_atlas: Arc::new(TestAtlas), + handlers: Default::default(), + } + } +} + +impl PlatformWindow for TestWindow { + fn bounds(&self) -> WindowBounds { + self.bounds + } + + fn content_size(&self) -> Size { + let bounds = match self.bounds { + WindowBounds::Fixed(bounds) => bounds, + WindowBounds::Maximized | WindowBounds::Fullscreen => self.display().bounds(), + }; + bounds.size.map(|p| px(p.0)) + } + + fn scale_factor(&self) -> f32 { + 2.0 + } + + fn titlebar_height(&self) -> Pixels { + todo!() + } + + fn appearance(&self) -> WindowAppearance { + todo!() + } + + fn display(&self) -> std::rc::Rc { + self.display.clone() + } + + fn mouse_position(&self) -> Point { + Point::zero() + } + + fn as_any_mut(&mut self) -> &mut dyn std::any::Any { + todo!() + } + + fn set_input_handler(&mut self, _input_handler: Box) { + todo!() + } + + fn prompt( + &self, + _level: crate::PromptLevel, + _msg: &str, + _answers: &[&str], + ) -> futures::channel::oneshot::Receiver { + todo!() + } + + fn activate(&self) { + todo!() + } + + fn set_title(&mut self, _title: &str) { + todo!() + } + + fn set_edited(&mut self, _edited: bool) { + todo!() + } + + fn show_character_palette(&self) { + todo!() + } + + fn minimize(&self) { + todo!() + } + + fn zoom(&self) { + todo!() + } + + fn toggle_full_screen(&self) { + todo!() + } + + fn on_input(&self, callback: Box bool>) { + self.handlers.lock().input.push(callback) + } + + fn on_active_status_change(&self, callback: Box) { + self.handlers.lock().active_status_change.push(callback) + } + + fn on_resize(&self, callback: Box, f32)>) { + self.handlers.lock().resize.push(callback) + } + + fn on_fullscreen(&self, _callback: Box) { + todo!() + } + + fn on_moved(&self, callback: Box) { + self.handlers.lock().moved.push(callback) + } + + fn on_should_close(&self, _callback: Box bool>) { + todo!() + } + + fn on_close(&self, _callback: Box) { + todo!() + } + + fn on_appearance_changed(&self, _callback: Box) { + todo!() + } + + fn is_topmost_for_position(&self, _position: crate::Point) -> bool { + todo!() + } + + fn draw(&self, scene: crate::Scene) { + self.current_scene.lock().replace(scene); + } + + fn sprite_atlas(&self) -> std::sync::Arc { + self.sprite_atlas.clone() + } +} + +pub struct TestAtlas; + +impl PlatformAtlas for TestAtlas { + fn get_or_insert_with<'a>( + &self, + _key: &crate::AtlasKey, + _build: &mut dyn FnMut() -> anyhow::Result<( + Size, + std::borrow::Cow<'a, [u8]>, + )>, + ) -> anyhow::Result { + todo!() + } + + fn clear(&self) { + todo!() + } +} diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 9cab40082b02912eced41363a2afa6506fb3d9c0..d7ee86e1c15951c5fb4daaf27cea5ca42a4f55d2 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -1047,7 +1047,7 @@ impl<'a> WindowContext<'a> { } /// Dispatch a mouse or keyboard event on the window. - fn dispatch_event(&mut self, event: InputEvent) -> bool { + pub fn dispatch_event(&mut self, event: InputEvent) -> bool { let event = match event { // Track the mouse position with our own state, since accessing the platform // API for the mouse position can only occur on the main thread. From a7d52ee86fd9435ce4b405c5269f084c23ed99fd Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 6 Nov 2023 21:05:22 -0700 Subject: [PATCH 045/110] Smoke test for event handling --- crates/gpui2/src/interactive.rs | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rs index da208b38131f8ddd0e297c47bc504065af232d15..c6506f388e560d6ab4cdc2c473f67b7b2b53b2a1 100644 --- a/crates/gpui2/src/interactive.rs +++ b/crates/gpui2/src/interactive.rs @@ -1230,3 +1230,73 @@ pub type KeyListener = Box< ) -> Option> + 'static, >; + +#[cfg(test)] +mod test { + use serde_derive::Deserialize; + + use crate::{ + self as gpui, div, Div, FocusHandle, KeyBinding, Keystroke, ParentElement, Render, + StatefulInteraction, StatelessInteractive, TestAppContext, VisualContext, + }; + + struct TestView { + saw_key_down: bool, + saw_action: bool, + focus_handle: FocusHandle, + } + + #[derive(PartialEq, Clone, Default, Deserialize)] + struct TestAction; + + impl Render for TestView { + type Element = Div>; + + fn render(&mut self, _: &mut gpui::ViewContext) -> Self::Element { + div().id("testview").child( + div() + .on_key_down(|this: &mut TestView, _, _, _| { + dbg!("ola!"); + this.saw_key_down = true + }) + .on_action(|this: &mut TestView, _: &TestAction, _, _| { + dbg!("ola!"); + this.saw_action = true + }) + .track_focus(&self.focus_handle), + ) + } + } + + #[gpui::test] + fn test_on_events(cx: &mut TestAppContext) { + let window = cx.update(|cx| { + cx.open_window(Default::default(), |cx| { + cx.build_view(|cx| TestView { + saw_key_down: false, + saw_action: false, + focus_handle: cx.focus_handle(), + }) + }) + }); + + cx.update(|cx| { + cx.bind_keys(vec![KeyBinding::new("ctrl-g", TestAction, None)]); + }); + + window + .update(cx, |test_view, cx| cx.focus(&test_view.focus_handle)) + .unwrap(); + + cx.dispatch_keystroke(*window, Keystroke::parse("space").unwrap(), false); + cx.dispatch_keystroke(*window, Keystroke::parse("ctrl-g").unwrap(), false); + + window + .update(cx, |test_view, _| { + assert!(test_view.saw_key_down || test_view.saw_action); + assert!(test_view.saw_key_down); + assert!(test_view.saw_action); + }) + .unwrap(); + } +} From a866370dc1f9ea51a8ee485adbe5038712372417 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 12:25:33 +0100 Subject: [PATCH 046/110] Paint lines --- crates/editor2/src/editor.rs | 23 +- crates/editor2/src/element.rs | 293 +++++++++----------- crates/gpui2/src/elements/text.rs | 2 +- crates/gpui2/src/style.rs | 6 +- crates/gpui2/src/styled.rs | 21 +- crates/gpui2/src/text_system/line_layout.rs | 12 - crates/theme2/src/theme2.rs | 6 +- crates/zed2/src/main.rs | 3 +- 8 files changed, 176 insertions(+), 190 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 4e15519b62f2362898758f3e3cbdfb083ebd9fbd..0db0d5dcd5b8f7410907ced0980dfc3e876c627e 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -37,8 +37,8 @@ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ div, px, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, EventEmitter, - FocusHandle, Hsla, Model, Pixels, Render, Styled, Subscription, Task, TextStyle, View, - ViewContext, VisualContext, WeakView, WindowContext, + FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, Subscription, Task, + TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -81,7 +81,7 @@ use std::{ pub use sum_tree::Bias; use sum_tree::TreeMap; use text::Rope; -use theme::{ActiveTheme, PlayerColor, ThemeColors, ThemeVariant}; +use theme::{ActiveTheme, PlayerColor, ThemeColors, ThemeSettings, ThemeVariant}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -1882,7 +1882,7 @@ impl Editor { ) -> Self { // let editor_view_id = cx.view_id(); let style = cx.text_style(); - let font_size = style.font_size * cx.rem_size(); + let font_size = style.font_size.to_pixels(cx.rem_size()); let display_map = cx.build_model(|cx| { // todo!() // let settings = settings::get::(cx); @@ -9325,11 +9325,22 @@ impl Render for Editor { type Element = EditorElement; fn render(&mut self, cx: &mut ViewContext) -> Self::Element { + let settings = ThemeSettings::get_global(cx); + let text_style = TextStyle { + color: cx.theme().colors().text, + font_family: settings.buffer_font.family.clone(), + font_features: settings.buffer_font.features, + font_size: settings.buffer_font_size.into(), + font_weight: FontWeight::NORMAL, + font_style: FontStyle::Normal, + line_height: Default::default(), + underline: None, + }; EditorElement::new(EditorStyle { background: cx.theme().colors().editor, local_player: cx.theme().players().local(), - text: cx.text_style(), - line_height_scalar: 1., + text: text_style, + line_height_scalar: settings.buffer_line_height.value(), scrollbar_width: px(12.), }) } diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 071c103de0e2c0db6123f1b7206252b148a7a599..4ad22599d23d8b83307c3b4da541ee214e98ff9d 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -612,7 +612,7 @@ impl EditorElement { fn paint_gutter( &mut self, bounds: Bounds, - layout: &mut LayoutState, + layout: &LayoutState, editor: &mut Editor, cx: &mut ViewContext, ) { @@ -672,7 +672,7 @@ impl EditorElement { fn paint_diff_hunks( bounds: Bounds, - layout: &mut LayoutState, + layout: &LayoutState, cx: &mut ViewContext, ) { // todo!() @@ -761,11 +761,10 @@ impl EditorElement { fn paint_text( &mut self, bounds: Bounds, - layout: &mut LayoutState, + layout: &LayoutState, editor: &mut Editor, cx: &mut ViewContext, ) { - let style = &self.style; let scroll_position = layout.position_map.snapshot.scroll_position(); let start_row = layout.visible_display_row_range.start; let scroll_top = scroll_position.y * layout.position_map.line_height; @@ -896,33 +895,21 @@ impl EditorElement { .chars_at(cursor_position) .next() .and_then(|(character, _)| { - let font_id = - cursor_row_layout.font_for_index(cursor_column)?; let text = character.to_string(); - - cx.text_system().layout_text( - &text, - cursor_row_layout.font_size, - &[TextRun { - len: text.len(), - font: todo!(), - color: todo!(), - underline: todo!(), - }], - None, - ); - Some(cx.text_layout_cache().layout_str( - &text, - cursor_row_layout.font_size, - &[( - text.chars().count(), - RunStyle { - font_id, - color: style.background, - underline: Default::default(), - }, - )], - )) + cx.text_system() + .layout_text( + &text, + cursor_row_layout.font_size, + &[TextRun { + len: text.len(), + font: self.style.text.font(), + color: self.style.background, + underline: None, + }], + None, + ) + .unwrap() + .pop() }) } else { None @@ -958,125 +945,123 @@ impl EditorElement { scroll_top, content_origin, scroll_left, - visible_text_bounds, whitespace_setting, &invisible_display_ranges, - visible_bounds, cx, ) } - cx.scene().push_layer(Some(bounds)); + // cx.scene().push_layer(Some(bounds)); for cursor in cursors { cursor.paint(content_origin, cx); } - cx.scene().pop_layer(); - - if let Some((position, context_menu)) = layout.context_menu.as_mut() { - cx.scene().push_stacking_context(None, None); - let cursor_row_layout = - &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; - let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; - let mut list_origin = content_origin + point(x, y); - let list_width = context_menu.size().x; - let list_height = context_menu.size().y; - - // Snap the right edge of the list to the right edge of the window if - // its horizontal bounds overflow. - if list_origin.x + list_width > cx.window_size().x { - list_origin.set_x((cx.window_size().x - list_width).max(0.)); - } - - if list_origin.y + list_height > bounds.max_y { - list_origin - .set_y(list_origin.y - layout.position_map.line_height - list_height); - } - - context_menu.paint( - list_origin, - Bounds::::from_points( - gpui::Point::::zero(), - point(f32::MAX, f32::MAX), - ), // Let content bleed outside of editor - editor, - cx, - ); + // cx.scene().pop_layer(); + + // if let Some((position, context_menu)) = layout.context_menu.as_mut() { + // cx.scene().push_stacking_context(None, None); + // let cursor_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; + // let mut list_origin = content_origin + point(x, y); + // let list_width = context_menu.size().x; + // let list_height = context_menu.size().y; + + // // Snap the right edge of the list to the right edge of the window if + // // its horizontal bounds overflow. + // if list_origin.x + list_width > cx.window_size().x { + // list_origin.set_x((cx.window_size().x - list_width).max(0.)); + // } - cx.scene().pop_stacking_context(); - } + // if list_origin.y + list_height > bounds.max_y { + // list_origin + // .set_y(list_origin.y - layout.position_map.line_height - list_height); + // } - if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { - cx.scene().push_stacking_context(None, None); - - // This is safe because we check on layout whether the required row is available - let hovered_row_layout = - &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - - // Minimum required size: Take the first popover, and add 1.5 times the minimum popover - // height. This is the size we will use to decide whether to render popovers above or below - // the hovered line. - let first_size = hover_popovers[0].size(); - let height_to_reserve = first_size.y - + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; - - // Compute Hovered Point - let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; - let y = position.row() as f32 * layout.position_map.line_height - scroll_top; - let hovered_point = content_origin + point(x, y); - - if hovered_point.y - height_to_reserve > 0.0 { - // There is enough space above. Render popovers above the hovered point - let mut current_y = hovered_point.y; - for hover_popover in hover_popovers { - let size = hover_popover.size(); - let mut popover_origin = point(hovered_point.x, current_y - size.y); - - let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - if x_out_of_bounds < 0.0 { - popover_origin.set_x(popover_origin.x + x_out_of_bounds); - } + // context_menu.paint( + // list_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); - hover_popover.paint( - popover_origin, - Bounds::::from_points( - gpui::Point::::zero(), - point(f32::MAX, f32::MAX), - ), // Let content bleed outside of editor - editor, - cx, - ); - - current_y = popover_origin.y - HOVER_POPOVER_GAP; - } - } else { - // There is not enough space above. Render popovers below the hovered point - let mut current_y = hovered_point.y + layout.position_map.line_height; - for hover_popover in hover_popovers { - let size = hover_popover.size(); - let mut popover_origin = point(hovered_point.x, current_y); - - let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - if x_out_of_bounds < 0.0 { - popover_origin.set_x(popover_origin.x + x_out_of_bounds); - } + // cx.scene().pop_stacking_context(); + // } - hover_popover.paint( - popover_origin, - Bounds::::from_points( - gpui::Point::::zero(), - point(f32::MAX, f32::MAX), - ), // Let content bleed outside of editor - editor, - cx, - ); - - current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; - } - } + // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { + // cx.scene().push_stacking_context(None, None); + + // // This is safe because we check on layout whether the required row is available + // let hovered_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + + // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover + // // height. This is the size we will use to decide whether to render popovers above or below + // // the hovered line. + // let first_size = hover_popovers[0].size(); + // let height_to_reserve = first_size.y + // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; + + // // Compute Hovered Point + // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; + // let hovered_point = content_origin + point(x, y); + + // if hovered_point.y - height_to_reserve > 0.0 { + // // There is enough space above. Render popovers above the hovered point + // let mut current_y = hovered_point.y; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y - size.y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y - HOVER_POPOVER_GAP; + // } + // } else { + // // There is not enough space above. Render popovers below the hovered point + // let mut current_y = hovered_point.y + layout.position_map.line_height; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; + // } + // } - cx.scene().pop_stacking_context(); - } + // cx.scene().pop_stacking_context(); + // } }) } @@ -1369,7 +1354,7 @@ impl EditorElement { fn column_pixels(&self, column: usize, cx: &ViewContext) -> Pixels { let style = &self.style; - let font_size = style.text.font_size * cx.rem_size(); + let font_size = style.text.font_size.to_pixels(cx.rem_size()); let layout = cx .text_system() .layout_text( @@ -1478,7 +1463,7 @@ impl EditorElement { Vec>, Vec>, ) { - let font_size = self.style.text.font_size * cx.rem_size(); + let font_size = self.style.text.font_size.to_pixels(cx.rem_size()); let include_line_numbers = snapshot.mode == EditorMode::Full; let mut line_number_layouts = Vec::with_capacity(rows.len()); let mut fold_statuses = Vec::with_capacity(rows.len()); @@ -1555,8 +1540,8 @@ impl EditorElement { } // When the editor is empty and unfocused, then show the placeholder. - if snapshot.is_empty { - let font_size = self.style.text.font_size * cx.rem_size(); + if snapshot.is_empty() { + let font_size = self.style.text.font_size.to_pixels(cx.rem_size()); let placeholder_color = cx.theme().styles.colors.text_placeholder; let placeholder_text = snapshot.placeholder_text(); let placeholder_lines = placeholder_text @@ -1615,7 +1600,7 @@ impl EditorElement { let snapshot = editor.snapshot(cx); let style = self.style.clone(); let font_id = cx.text_system().font_id(&style.text.font()).unwrap(); - let font_size = style.text.font_size * cx.rem_size(); + let font_size = style.text.font_size.to_pixels(cx.rem_size()); let line_height = (font_size * style.line_height_scalar).round(); let em_width = cx .text_system() @@ -1716,7 +1701,7 @@ impl EditorElement { .anchor_before(DisplayPoint::new(start_row, 0).to_offset(&snapshot, Bias::Left)) }; let end_anchor = if end_row > max_row { - Anchor::max + Anchor::max() } else { snapshot .buffer_snapshot @@ -1847,7 +1832,7 @@ impl EditorElement { (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) || // Selections - (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty) + (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) // Scrollmanager || editor.scroll_manager.scrollbars_visible() } @@ -1902,14 +1887,14 @@ impl EditorElement { let line_layouts = self.layout_lines(start_row..end_row, &line_number_layouts, &snapshot, cx); for line_with_invisibles in &line_layouts { - if line_with_invisibles.line.width() > max_visible_line_width { - max_visible_line_width = line_with_invisibles.line.width(); + if line_with_invisibles.line.width > max_visible_line_width { + max_visible_line_width = line_with_invisibles.line.width; } } let longest_line_width = layout_line(snapshot.longest_row(), &snapshot, &style, cx) .unwrap() - .width(); + .width; let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.width; // todo!("blocks") // let (scroll_width, blocks) = self.layout_blocks( @@ -2373,7 +2358,7 @@ impl LineWithInvisibles { let mut non_whitespace_added = false; let mut row = 0; let mut line_exceeded_max_len = false; - let font_size = text_style.font_size * cx.rem_size(); + let font_size = text_style.font_size.to_pixels(cx.rem_size()); for highlighted_chunk in chunks.chain([HighlightedChunk { chunk: "\n", @@ -2400,7 +2385,7 @@ impl LineWithInvisibles { } } - if !line_chunk.is_empty && !line_exceeded_max_len { + if !line_chunk.is_empty() && !line_exceeded_max_len { let text_style = if let Some(style) = highlighted_chunk.style { text_style .clone() @@ -2473,7 +2458,6 @@ impl LineWithInvisibles { scroll_top: Pixels, content_origin: gpui::Point, scroll_left: Pixels, - visible_text_bounds: Bounds, whitespace_setting: ShowWhitespaceSetting, selection_ranges: &[Range], cx: &mut ViewContext, @@ -2525,9 +2509,8 @@ impl LineWithInvisibles { }; let x_offset = self.line.x_for_index(token_offset); - let invisible_offset = (layout.position_map.em_width - invisible_symbol.width()) - .max(Pixels::from(0.0)) - / 2.0; + let invisible_offset = + (layout.position_map.em_width - invisible_symbol.width).max(Pixels::ZERO) / 2.0; let origin = content_origin + gpui::point(-scroll_left + x_offset + invisible_offset, line_y); @@ -2600,9 +2583,9 @@ impl Element for EditorElement { self.paint_background(gutter_bounds, text_bounds, &layout, cx); if layout.gutter_size.width > Pixels::ZERO { - self.paint_gutter(gutter_bounds, layout, editor, cx); + self.paint_gutter(gutter_bounds, &layout, editor, cx); } - self.paint_text(text_bounds, layout, editor, cx); + self.paint_text(text_bounds, &layout, editor, cx); }); } } @@ -3342,7 +3325,7 @@ fn layout_line( .text_system() .layout_text( &line, - style.text.font_size * cx.rem_size(), + style.text.font_size.to_pixels(cx.rem_size()), &[TextRun { len: snapshot.line_len(row) as usize, font: style.text.font(), @@ -3475,7 +3458,7 @@ impl HighlightedRange { bounds: Bounds, cx: &mut WindowContext, ) { - if lines.is_empty { + if lines.is_empty() { return; } diff --git a/crates/gpui2/src/elements/text.rs b/crates/gpui2/src/elements/text.rs index 4bc37054902653a85f931d82354183edc9142fe3..76c587d22f3e641c248f38e79a96b2651aa7ab43 100644 --- a/crates/gpui2/src/elements/text.rs +++ b/crates/gpui2/src/elements/text.rs @@ -74,7 +74,7 @@ impl Element for Text { ) -> LayoutId { let text_system = cx.text_system().clone(); let text_style = cx.text_style(); - let font_size = text_style.font_size * cx.rem_size(); + let font_size = text_style.font_size.to_pixels(cx.rem_size()); let line_height = text_style .line_height .to_pixels(font_size.into(), cx.rem_size()); diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs index b30d4aa00250f981f48301f6e3c8007b55b1bb36..d6aad7e68e69c82d94fad4d176b9f4fb7f4757fd 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -1,7 +1,7 @@ use crate::{ black, phi, point, rems, AbsoluteLength, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, CornersRefinement, DefiniteLength, Edges, EdgesRefinement, Font, FontFeatures, - FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Rems, Result, Rgba, + FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Result, Rgba, SharedString, Size, SizeRefinement, Styled, TextRun, ViewContext, WindowContext, }; use refineable::{Cascade, Refineable}; @@ -121,7 +121,7 @@ pub struct TextStyle { pub color: Hsla, pub font_family: SharedString, pub font_features: FontFeatures, - pub font_size: Rems, + pub font_size: AbsoluteLength, pub line_height: DefiniteLength, pub font_weight: FontWeight, pub font_style: FontStyle, @@ -134,7 +134,7 @@ impl Default for TextStyle { color: black(), font_family: "Helvetica".into(), // todo!("Get a font we know exists on the system") font_features: FontFeatures::default(), - font_size: rems(1.), + font_size: rems(1.).into(), line_height: phi(), font_weight: FontWeight::default(), font_style: FontStyle::default(), diff --git a/crates/gpui2/src/styled.rs b/crates/gpui2/src/styled.rs index 1eed74f0969a437ae3827815345b10962091f6fb..746211325acbc8e2e332d318638615cca141ce4d 100644 --- a/crates/gpui2/src/styled.rs +++ b/crates/gpui2/src/styled.rs @@ -1,6 +1,7 @@ use crate::{ - self as gpui2, hsla, point, px, relative, rems, AlignItems, DefiniteLength, Display, Fill, - FlexDirection, Hsla, JustifyContent, Length, Position, Rems, SharedString, StyleRefinement, + self as gpui2, hsla, point, px, relative, rems, AbsoluteLength, AlignItems, DefiniteLength, + Display, Fill, FlexDirection, Hsla, JustifyContent, Length, Position, SharedString, + StyleRefinement, }; use crate::{BoxShadow, TextStyleRefinement}; use smallvec::smallvec; @@ -384,7 +385,7 @@ pub trait Styled { self } - fn text_size(mut self, size: impl Into) -> Self + fn text_size(mut self, size: impl Into) -> Self where Self: Sized, { @@ -400,7 +401,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(0.75)); + .font_size = Some(rems(0.75).into()); self } @@ -410,7 +411,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(0.875)); + .font_size = Some(rems(0.875).into()); self } @@ -420,7 +421,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(1.0)); + .font_size = Some(rems(1.0).into()); self } @@ -430,7 +431,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(1.125)); + .font_size = Some(rems(1.125).into()); self } @@ -440,7 +441,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(1.25)); + .font_size = Some(rems(1.25).into()); self } @@ -450,7 +451,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(1.5)); + .font_size = Some(rems(1.5).into()); self } @@ -460,7 +461,7 @@ pub trait Styled { { self.text_style() .get_or_insert_with(Default::default) - .font_size = Some(rems(1.875)); + .font_size = Some(rems(1.875).into()); self } diff --git a/crates/gpui2/src/text_system/line_layout.rs b/crates/gpui2/src/text_system/line_layout.rs index a310c32cd1f369ed5d6ef3e579ef45c1fdd0d4be..1b5e28c95836518da5ddbb16262a295ae698a2ff 100644 --- a/crates/gpui2/src/text_system/line_layout.rs +++ b/crates/gpui2/src/text_system/line_layout.rs @@ -82,18 +82,6 @@ impl LineLayout { self.width } - pub fn font_for_index(&self, index: usize) -> Option { - for run in &self.runs { - for glyph in &run.glyphs { - if glyph.index >= index { - return Some(run.font_id); - } - } - } - - None - } - fn compute_wrap_boundaries( &self, text: &str, diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index dfd0e4b3c8de78d5cd646f8578fbbbba277a2a49..e2a3885e215b44811288d15ab82d6eb3d5e05f5c 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -6,6 +6,8 @@ mod scale; mod settings; mod syntax; +use std::sync::Arc; + use ::settings::Settings; pub use colors::*; pub use default_colors::*; @@ -29,11 +31,11 @@ pub fn init(cx: &mut AppContext) { } pub trait ActiveTheme { - fn theme(&self) -> &ThemeVariant; + fn theme(&self) -> &Arc; } impl ActiveTheme for AppContext { - fn theme(&self) -> &ThemeVariant { + fn theme(&self) -> &Arc { &ThemeSettings::get_global(self).active_theme } } diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 79ba132e4ffedaa275d1c3cbdb64cf3692970b13..2b44c9ddc467df2400561c0230c69a9eb96a5c02 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -38,6 +38,7 @@ use std::{ thread, time::{SystemTime, UNIX_EPOCH}, }; +use theme::ActiveTheme; use util::{ async_maybe, channel::{parse_zed_link, ReleaseChannel, RELEASE_CHANNEL}, @@ -164,7 +165,7 @@ fn main() { // .detach(); // watch_file_types(fs.clone(), cx); - // languages.set_theme(theme::current(cx).clone()); + languages.set_theme(cx.theme().clone()); // cx.observe_global::({ // let languages = languages.clone(); // move |cx| languages.set_theme(theme::current(cx).clone()) From 6ae09634ce61db530dcb0bd5c22945a3a81860d8 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 12:46:31 +0100 Subject: [PATCH 047/110] Remove `focused` field and use `FocusHandle` instead in `Editor` --- crates/editor2/src/editor.rs | 14 +- crates/editor2/src/element.rs | 546 ++++++++++---------- crates/editor2/src/items.rs | 16 +- crates/editor2/src/link_go_to_definition.rs | 2 +- crates/theme2/src/default_colors.rs | 24 +- 5 files changed, 300 insertions(+), 302 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 0db0d5dcd5b8f7410907ced0980dfc3e876c627e..0790641b496676a027dca9cb1947c70cde8d0215 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -634,7 +634,6 @@ pub struct Editor { // override_text_style: Option>, project: Option>, collaboration_hub: Option>, - focused: bool, blink_manager: Model, pub show_local_selections: bool, mode: EditorMode, @@ -1940,7 +1939,6 @@ impl Editor { // get_field_editor_theme, collaboration_hub: project.clone().map(|project| Box::new(project) as _), project, - focused: false, blink_manager: blink_manager.clone(), show_local_selections: true, mode, @@ -2211,7 +2209,7 @@ impl Editor { old_cursor_position: &Anchor, cx: &mut ViewContext, ) { - if self.focused && self.leader_peer_id.is_none() { + if self.focus_handle.is_focused(cx) && self.leader_peer_id.is_none() { self.buffer.update(cx, |buffer, cx| { buffer.set_active_selections( &self.selections.disjoint_anchors(), @@ -2458,7 +2456,7 @@ impl Editor { click_count: usize, cx: &mut ViewContext, ) { - if !self.focused { + if !self.focus_handle.is_focused(cx) { cx.focus(&self.focus_handle); } @@ -2524,7 +2522,7 @@ impl Editor { goal_column: u32, cx: &mut ViewContext, ) { - if !self.focused { + if !self.focus_handle.is_focused(cx) { cx.focus(&self.focus_handle); } @@ -3631,7 +3629,7 @@ impl Editor { _ => return, } - if this.focused && menu.is_some() { + if this.focus_handle.is_focused(cx) && menu.is_some() { let menu = menu.unwrap(); *context_menu = Some(ContextMenu::Completions(menu)); drop(context_menu); @@ -8693,8 +8691,8 @@ impl Editor { } } - pub fn show_local_cursors(&self, cx: &AppContext) -> bool { - self.blink_manager.read(cx).visible() && self.focused + pub fn show_local_cursors(&self, cx: &WindowContext) -> bool { + self.blink_manager.read(cx).visible() && self.focus_handle.is_focused(cx) } fn on_buffer_changed(&mut self, _: Model, cx: &mut ViewContext) { diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 4ad22599d23d8b83307c3b4da541ee214e98ff9d..e1fea4a8e5b3a054c9bb7e9b2655b7a864f3d045 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -774,72 +774,91 @@ impl EditorElement { let line_end_overshoot = 0.15 * layout.position_map.line_height; let whitespace_setting = editor.buffer.read(cx).settings_at(0, cx).show_whitespaces; - cx.with_content_mask(ContentMask { bounds }, |cx| { - // todo!("cursor region") - // cx.scene().push_cursor_region(CursorRegion { - // bounds, - // style: if !editor.link_go_to_definition_state.definitions.is_empty { - // CursorStyle::PointingHand - // } else { - // CursorStyle::IBeam - // }, - // }); - - // todo!("fold ranges") - // let fold_corner_radius = - // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; - // for (id, range, color) in layout.fold_ranges.iter() { - // self.paint_highlighted_range( - // range.clone(), - // *color, - // fold_corner_radius, - // fold_corner_radius * 2., - // layout, - // content_origin, - // scroll_top, - // scroll_left, - // bounds, - // cx, - // ); - - // for bound in range_to_bounds( - // &range, - // content_origin, - // scroll_left, - // scroll_top, - // &layout.visible_display_row_range, - // line_end_overshoot, - // &layout.position_map, - // ) { - // cx.scene().push_cursor_region(CursorRegion { - // bounds: bound, - // style: CursorStyle::PointingHand, - // }); - - // let display_row = range.start.row(); - - // let buffer_row = DisplayPoint::new(display_row, 0) - // .to_point(&layout.position_map.snapshot.display_snapshot) - // .row; - - // let view_id = cx.view_id(); - // cx.scene().push_mouse_region( - // MouseRegion::new::(view_id, *id as usize, bound) - // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { - // editor.unfold_at(&UnfoldAt { buffer_row }, cx) - // }) - // .with_notify_on_hover(true) - // .with_notify_on_click(true), - // ) - // } - // } - - for (range, color) in &layout.highlighted_ranges { + // todo!("cursor region") + // cx.scene().push_cursor_region(CursorRegion { + // bounds, + // style: if !editor.link_go_to_definition_state.definitions.is_empty { + // CursorStyle::PointingHand + // } else { + // CursorStyle::IBeam + // }, + // }); + + // todo!("fold ranges") + // let fold_corner_radius = + // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; + // for (id, range, color) in layout.fold_ranges.iter() { + // self.paint_highlighted_range( + // range.clone(), + // *color, + // fold_corner_radius, + // fold_corner_radius * 2., + // layout, + // content_origin, + // scroll_top, + // scroll_left, + // bounds, + // cx, + // ); + + // for bound in range_to_bounds( + // &range, + // content_origin, + // scroll_left, + // scroll_top, + // &layout.visible_display_row_range, + // line_end_overshoot, + // &layout.position_map, + // ) { + // cx.scene().push_cursor_region(CursorRegion { + // bounds: bound, + // style: CursorStyle::PointingHand, + // }); + + // let display_row = range.start.row(); + + // let buffer_row = DisplayPoint::new(display_row, 0) + // .to_point(&layout.position_map.snapshot.display_snapshot) + // .row; + + // let view_id = cx.view_id(); + // cx.scene().push_mouse_region( + // MouseRegion::new::(view_id, *id as usize, bound) + // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { + // editor.unfold_at(&UnfoldAt { buffer_row }, cx) + // }) + // .with_notify_on_hover(true) + // .with_notify_on_click(true), + // ) + // } + // } + + for (range, color) in &layout.highlighted_ranges { + self.paint_highlighted_range( + range.clone(), + *color, + Pixels::ZERO, + line_end_overshoot, + layout, + content_origin, + scroll_top, + scroll_left, + bounds, + cx, + ); + } + + let mut cursors = SmallVec::<[Cursor; 32]>::new(); + let corner_radius = 0.15 * layout.position_map.line_height; + let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); + + for (selection_style, selections) in &layout.selections { + for selection in selections { self.paint_highlighted_range( - range.clone(), - *color, - Pixels::ZERO, - line_end_overshoot, + selection.range.clone(), + selection_style.selection, + corner_radius, + corner_radius * 2., layout, content_origin, scroll_top, @@ -847,222 +866,205 @@ impl EditorElement { bounds, cx, ); - } - let mut cursors = SmallVec::<[Cursor; 32]>::new(); - let corner_radius = 0.15 * layout.position_map.line_height; - let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); - - for (selection_style, selections) in &layout.selections { - for selection in selections { - self.paint_highlighted_range( - selection.range.clone(), - selection_style.selection, - corner_radius, - corner_radius * 2., - layout, - content_origin, - scroll_top, - scroll_left, - bounds, - cx, - ); + if selection.is_local && !selection.range.is_empty() { + invisible_display_ranges.push(selection.range.clone()); + } - if selection.is_local && !selection.range.is_empty() { - invisible_display_ranges.push(selection.range.clone()); - } - if !selection.is_local || editor.show_local_cursors(cx) { - let cursor_position = selection.head; - if layout - .visible_display_row_range - .contains(&cursor_position.row()) - { - let cursor_row_layout = &layout.position_map.line_layouts - [(cursor_position.row() - start_row) as usize] - .line; - let cursor_column = cursor_position.column() as usize; - - let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); - let mut block_width = cursor_row_layout.x_for_index(cursor_column + 1) - - cursor_character_x; - if block_width == Pixels::ZERO { - block_width = layout.position_map.em_width; - } - let block_text = if let CursorShape::Block = selection.cursor_shape { - layout - .position_map - .snapshot - .chars_at(cursor_position) - .next() - .and_then(|(character, _)| { - let text = character.to_string(); - cx.text_system() - .layout_text( - &text, - cursor_row_layout.font_size, - &[TextRun { - len: text.len(), - font: self.style.text.font(), - color: self.style.background, - underline: None, - }], - None, - ) - .unwrap() - .pop() - }) - } else { - None - }; - - let x = cursor_character_x - scroll_left; - let y = cursor_position.row() as f32 * layout.position_map.line_height - - scroll_top; - if selection.is_newest { - editor.pixel_position_of_newest_cursor = Some(point( - bounds.origin.x + x + block_width / 2., - bounds.origin.y + y + layout.position_map.line_height / 2., - )); - } - cursors.push(Cursor { - color: selection_style.cursor, - block_width, - origin: point(x, y), - line_height: layout.position_map.line_height, - shape: selection.cursor_shape, - block_text, - }); + if !selection.is_local || editor.show_local_cursors(cx) { + let cursor_position = selection.head; + if layout + .visible_display_row_range + .contains(&cursor_position.row()) + { + let cursor_row_layout = &layout.position_map.line_layouts + [(cursor_position.row() - start_row) as usize] + .line; + let cursor_column = cursor_position.column() as usize; + + let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); + let mut block_width = + cursor_row_layout.x_for_index(cursor_column + 1) - cursor_character_x; + if block_width == Pixels::ZERO { + block_width = layout.position_map.em_width; + } + let block_text = if let CursorShape::Block = selection.cursor_shape { + layout + .position_map + .snapshot + .chars_at(cursor_position) + .next() + .and_then(|(character, _)| { + let text = character.to_string(); + cx.text_system() + .layout_text( + &text, + cursor_row_layout.font_size, + &[TextRun { + len: text.len(), + font: self.style.text.font(), + color: self.style.background, + underline: None, + }], + None, + ) + .unwrap() + .pop() + }) + } else { + None + }; + + let x = cursor_character_x - scroll_left; + let y = cursor_position.row() as f32 * layout.position_map.line_height + - scroll_top; + if selection.is_newest { + editor.pixel_position_of_newest_cursor = Some(point( + bounds.origin.x + x + block_width / 2., + bounds.origin.y + y + layout.position_map.line_height / 2., + )); } + cursors.push(Cursor { + color: selection_style.cursor, + block_width, + origin: point(x, y), + line_height: layout.position_map.line_height, + shape: selection.cursor_shape, + block_text, + }); } } } + } - for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { - let row = start_row + ix as u32; - line_with_invisibles.draw( - layout, - row, - scroll_top, - content_origin, - scroll_left, - whitespace_setting, - &invisible_display_ranges, - cx, - ) - } + for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { + let row = start_row + ix as u32; + line_with_invisibles.draw( + layout, + row, + scroll_top, + content_origin, + scroll_left, + whitespace_setting, + &invisible_display_ranges, + cx, + ) + } - // cx.scene().push_layer(Some(bounds)); + cx.stack(9999, |cx| { for cursor in cursors { cursor.paint(content_origin, cx); } - // cx.scene().pop_layer(); - - // if let Some((position, context_menu)) = layout.context_menu.as_mut() { - // cx.scene().push_stacking_context(None, None); - // let cursor_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; - // let mut list_origin = content_origin + point(x, y); - // let list_width = context_menu.size().x; - // let list_height = context_menu.size().y; - - // // Snap the right edge of the list to the right edge of the window if - // // its horizontal bounds overflow. - // if list_origin.x + list_width > cx.window_size().x { - // list_origin.set_x((cx.window_size().x - list_width).max(0.)); - // } - - // if list_origin.y + list_height > bounds.max_y { - // list_origin - // .set_y(list_origin.y - layout.position_map.line_height - list_height); - // } - - // context_menu.paint( - // list_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // cx.scene().pop_stacking_context(); - // } - - // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { - // cx.scene().push_stacking_context(None, None); - - // // This is safe because we check on layout whether the required row is available - // let hovered_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - - // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover - // // height. This is the size we will use to decide whether to render popovers above or below - // // the hovered line. - // let first_size = hover_popovers[0].size(); - // let height_to_reserve = first_size.y - // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; - - // // Compute Hovered Point - // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; - // let hovered_point = content_origin + point(x, y); - - // if hovered_point.y - height_to_reserve > 0.0 { - // // There is enough space above. Render popovers above the hovered point - // let mut current_y = hovered_point.y; - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x, current_y - size.y); - - // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x + x_out_of_bounds); - // } - - // hover_popover.paint( - // popover_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // current_y = popover_origin.y - HOVER_POPOVER_GAP; - // } - // } else { - // // There is not enough space above. Render popovers below the hovered point - // let mut current_y = hovered_point.y + layout.position_map.line_height; - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x, current_y); - - // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x + x_out_of_bounds); - // } - - // hover_popover.paint( - // popover_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; - // } - // } - - // cx.scene().pop_stacking_context(); - // } - }) + }); + // cx.scene().push_layer(Some(bounds)); + + // cx.scene().pop_layer(); + + // if let Some((position, context_menu)) = layout.context_menu.as_mut() { + // cx.scene().push_stacking_context(None, None); + // let cursor_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; + // let mut list_origin = content_origin + point(x, y); + // let list_width = context_menu.size().x; + // let list_height = context_menu.size().y; + + // // Snap the right edge of the list to the right edge of the window if + // // its horizontal bounds overflow. + // if list_origin.x + list_width > cx.window_size().x { + // list_origin.set_x((cx.window_size().x - list_width).max(0.)); + // } + + // if list_origin.y + list_height > bounds.max_y { + // list_origin + // .set_y(list_origin.y - layout.position_map.line_height - list_height); + // } + + // context_menu.paint( + // list_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // cx.scene().pop_stacking_context(); + // } + + // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { + // cx.scene().push_stacking_context(None, None); + + // // This is safe because we check on layout whether the required row is available + // let hovered_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + + // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover + // // height. This is the size we will use to decide whether to render popovers above or below + // // the hovered line. + // let first_size = hover_popovers[0].size(); + // let height_to_reserve = first_size.y + // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; + + // // Compute Hovered Point + // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; + // let hovered_point = content_origin + point(x, y); + + // if hovered_point.y - height_to_reserve > 0.0 { + // // There is enough space above. Render popovers above the hovered point + // let mut current_y = hovered_point.y; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y - size.y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y - HOVER_POPOVER_GAP; + // } + // } else { + // // There is not enough space above. Render popovers below the hovered point + // let mut current_y = hovered_point.y + layout.position_map.line_height; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; + // } + // } + + // cx.scene().pop_stacking_context(); + // } } fn scrollbar_left(&self, bounds: &Bounds) -> Pixels { @@ -2543,7 +2545,7 @@ impl Element for EditorElement { fn initialize( &mut self, - view_state: &mut Editor, + editor: &mut Editor, element_state: Option, cx: &mut gpui::ViewContext, ) -> Self::ElementState { @@ -2552,7 +2554,7 @@ impl Element for EditorElement { fn layout( &mut self, - view_state: &mut Editor, + editor: &mut Editor, element_state: &mut Self::ElementState, cx: &mut gpui::ViewContext, ) -> gpui::LayoutId { diff --git a/crates/editor2/src/items.rs b/crates/editor2/src/items.rs index a4d34ad36f218af6440ac8183d47c4afca1547df..e0b4423f82dec1cc3f732d40743f2e534a3f3477 100644 --- a/crates/editor2/src/items.rs +++ b/crates/editor2/src/items.rs @@ -159,16 +159,14 @@ impl FollowableItem for Editor { self.buffer.update(cx, |buffer, cx| { buffer.remove_active_selections(cx); }); - } else { + } else if self.focus_handle.is_focused(cx) { self.buffer.update(cx, |buffer, cx| { - if self.focused { - buffer.set_active_selections( - &self.selections.disjoint_anchors(), - self.selections.line_mode, - self.cursor_shape, - cx, - ); - } + buffer.set_active_selections( + &self.selections.disjoint_anchors(), + self.selections.line_mode, + self.cursor_shape, + cx, + ); }); } cx.notify(); diff --git a/crates/editor2/src/link_go_to_definition.rs b/crates/editor2/src/link_go_to_definition.rs index 8c285c8214c1948435daf7f81e1b38c073be4baa..9db4061e5096ac3f4b3a221a3bc22f45114b26d2 100644 --- a/crates/editor2/src/link_go_to_definition.rs +++ b/crates/editor2/src/link_go_to_definition.rs @@ -581,7 +581,7 @@ fn go_to_fetched_definition_of_kind( let is_correct_kind = cached_definitions_kind == Some(kind); if !cached_definitions.is_empty() && is_correct_kind { - if !editor.focused { + if !editor.focus_handle.is_focused(cx) { cx.focus(&editor.focus_handle); } diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index da2608da62f04b37e07773660912a7608d8d7a6c..0df1988ead70d321c9b25b05e80e47538cbae8f6 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -59,24 +59,24 @@ impl Default for PlayerColors { fn default() -> Self { Self(vec![ PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 0.0), - background: hsla(0.0, 0.0, 0.0, 0.0), - selection: hsla(0.0, 0.0, 0.0, 0.0), + cursor: hsla(0.0, 0.0, 0.0, 1.0), + background: hsla(0.0, 0.0, 0.0, 1.0), + selection: hsla(0.0, 0.0, 0.0, 1.0), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 0.0), - background: hsla(0.0, 0.0, 0.0, 0.0), - selection: hsla(0.0, 0.0, 0.0, 0.0), + cursor: hsla(0.0, 0.0, 0.0, 1.0), + background: hsla(0.0, 0.0, 0.0, 1.0), + selection: hsla(0.0, 0.0, 0.0, 1.0), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 0.0), - background: hsla(0.0, 0.0, 0.0, 0.0), - selection: hsla(0.0, 0.0, 0.0, 0.0), + cursor: hsla(0.0, 0.0, 0.0, 1.0), + background: hsla(0.0, 0.0, 0.0, 1.0), + selection: hsla(0.0, 0.0, 0.0, 1.0), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 0.0), - background: hsla(0.0, 0.0, 0.0, 0.0), - selection: hsla(0.0, 0.0, 0.0, 0.0), + cursor: hsla(0.0, 0.0, 0.0, 1.0), + background: hsla(0.0, 0.0, 0.0, 1.0), + selection: hsla(0.0, 0.0, 0.0, 1.0), }, ]) } From 268be71d8e8700e3ee349387102c806b71c0a664 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 13:15:08 +0100 Subject: [PATCH 048/110] Add colors for document highlights --- crates/editor2/src/editor.rs | 4 ++-- crates/gpui2/src/app.rs | 8 ++++---- crates/theme2/src/colors.rs | 2 ++ crates/theme2/src/default_colors.rs | 4 ++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 88df58c50f704b7fd6663e9888a75312017e57e6..be8375336c604f9ca87f390128ab01c3991b37f1 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -4057,12 +4057,12 @@ impl Editor { this.highlight_background::( read_ranges, - |theme| todo!("theme.editor.document_highlight_read_background"), + |theme| theme.editor_document_highlight_read_background, cx, ); this.highlight_background::( write_ranges, - |theme| todo!("theme.editor.document_highlight_write_background"), + |theme| theme.editor_document_highlight_write_background, cx, ); cx.notify(); diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs index 9afffeb685a8c38ecd8a0aaf075ce6a2c4fbdf5e..801047de5fc857fd3a1bab0a89535febc5126c25 100644 --- a/crates/gpui2/src/app.rs +++ b/crates/gpui2/src/app.rs @@ -48,15 +48,15 @@ pub struct AppCell { impl AppCell { #[track_caller] pub fn borrow(&self) -> AppRef { - let thread_id = std::thread::current().id(); - eprintln!("borrowed {thread_id:?}"); + // let thread_id = std::thread::current().id(); + // eprintln!("borrowed {thread_id:?}"); AppRef(self.app.borrow()) } #[track_caller] pub fn borrow_mut(&self) -> AppRefMut { - let thread_id = std::thread::current().id(); - eprintln!("borrowed {thread_id:?}"); + // let thread_id = std::thread::current().id(); + // eprintln!("borrowed {thread_id:?}"); AppRefMut(self.app.borrow_mut()) } } diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 441f22be81593926f51d808cf1d80778854887b4..8e0e48b95c277a3e053ab937abe072a8eb6ecd2e 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -114,6 +114,8 @@ pub struct ThemeColors { pub editor_invisible: Hsla, pub editor_wrap_guide: Hsla, pub editor_active_wrap_guide: Hsla, + pub editor_document_highlight_read_background: Hsla, + pub editor_document_highlight_write_background: Hsla, pub terminal_background: Hsla, pub terminal_ansi_bright_black: Hsla, pub terminal_ansi_bright_red: Hsla, diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index ce6fe25907d547352ef4c2fe7b1635f70fdd79aa..f79518e7696894bc31f9149201446d4c64d53c08 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -249,6 +249,8 @@ impl ThemeColors { editor_invisible: neutral().light_alpha().step_4(), // todo!("pick the right colors") editor_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors") editor_active_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors") + editor_document_highlight_read_background: neutral().light_alpha().step_4(), // todo!("pick the right colors") + editor_document_highlight_write_background: neutral().light_alpha().step_4(), // todo!("pick the right colors") terminal_background: neutral().light().step_1(), terminal_ansi_black: black().light().step_12(), terminal_ansi_red: red().light().step_11(), @@ -320,6 +322,8 @@ impl ThemeColors { editor_invisible: neutral().dark_alpha().step_4(), // todo!("pick the right colors") editor_wrap_guide: neutral().dark_alpha().step_4(), // todo!("pick the right colors") editor_active_wrap_guide: neutral().dark_alpha().step_4(), // todo!("pick the right colors") + editor_document_highlight_read_background: neutral().dark_alpha().step_4(), // todo!("pick the right colors") + editor_document_highlight_write_background: neutral().dark_alpha().step_4(), // todo!("pick the right colors") terminal_background: neutral().dark().step_1(), terminal_ansi_black: black().dark().step_12(), terminal_ansi_red: red().dark().step_11(), From 9f2e6be1b30e81a5d30453207f2525da8cdca247 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 14:31:17 +0100 Subject: [PATCH 049/110] Fix warning --- crates/theme2/src/colors.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 8e0e48b95c277a3e053ab937abe072a8eb6ecd2e..e1df841c24b8cce7c43296dbb569d82b9fb5277f 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -23,11 +23,12 @@ pub struct PlayerColors(pub Vec); impl PlayerColors { pub fn local(&self) -> PlayerColor { + // todo!("use a valid color"); *self.0.first().unwrap() } pub fn absent(&self) -> PlayerColor { - todo!("use a valid color"); + // todo!("use a valid color"); *self.0.last().unwrap() } From 01eac50fc8c88effe1ca647811fad5db2da95655 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 7 Nov 2023 08:59:37 -0500 Subject: [PATCH 050/110] Add new `ThemeColors` values to the theme printer --- crates/theme2/src/registry.rs | 8 ++--- crates/theme_importer/src/theme_printer.rs | 34 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index bc6f8dbe945a2c137409b5bfddd1d796a65b3616..98797e2cad573d1c11ae4d2e0c8a6baadcf475fb 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -1,4 +1,4 @@ -use crate::{all_imported_themes, zed_pro_family, ThemeFamily, ThemeVariant}; +use crate::{zed_pro_family, ThemeFamily, ThemeVariant}; use anyhow::{anyhow, Result}; use gpui::SharedString; use std::{collections::HashMap, sync::Arc}; @@ -42,10 +42,8 @@ impl Default for ThemeRegistry { themes: HashMap::default(), }; - let mut all_themes = vec![zed_pro_family()]; - all_themes.extend(all_imported_themes()); - - this.insert_theme_families(all_themes); + this.insert_theme_families([zed_pro_family()]); + this.insert_theme_families(crate::all_imported_themes()); this } diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 16812625318ed5149ed95e58e44c89e6bdf5d4bf..f638694be8dea07a76ee797a672244d62fd427f0 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -134,12 +134,12 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { .field("border", &HslaPrinter(self.0.border)) .field("border_variant", &HslaPrinter(self.0.border_variant)) .field("border_focused", &HslaPrinter(self.0.border_focused)) - .field("border_disabled", &HslaPrinter(self.0.border_disabled)) .field("border_selected", &HslaPrinter(self.0.border_selected)) .field( "border_transparent", &HslaPrinter(self.0.border_transparent), ) + .field("border_disabled", &HslaPrinter(self.0.border_disabled)) .field( "elevated_surface_background", &HslaPrinter(self.0.elevated_surface_background), @@ -220,14 +220,44 @@ impl<'a> Debug for ThemeColorsPrinter<'a> { &HslaPrinter(self.0.tab_active_background), ) .field("editor_background", &HslaPrinter(self.0.editor_background)) + .field( + "editor_gutter_background", + &HslaPrinter(self.0.editor_gutter_background), + ) .field( "editor_subheader_background", &HslaPrinter(self.0.editor_subheader_background), ) .field( - "editor_active_line", + "editor_active_line_background", &HslaPrinter(self.0.editor_active_line_background), ) + .field( + "editor_highlighted_line_background", + &HslaPrinter(self.0.editor_highlighted_line_background), + ) + .field( + "editor_line_number", + &HslaPrinter(self.0.editor_line_number), + ) + .field( + "editor_active_line_number", + &HslaPrinter(self.0.editor_active_line_number), + ) + .field("editor_invisible", &HslaPrinter(self.0.editor_invisible)) + .field("editor_wrap_guide", &HslaPrinter(self.0.editor_wrap_guide)) + .field( + "editor_active_wrap_guide", + &HslaPrinter(self.0.editor_active_wrap_guide), + ) + .field( + "editor_document_highlight_read_background", + &HslaPrinter(self.0.editor_document_highlight_read_background), + ) + .field( + "editor_document_highlight_write_background", + &HslaPrinter(self.0.editor_document_highlight_write_background), + ) .field( "terminal_background", &HslaPrinter(self.0.terminal_background), From 7078c5fbb9e1a59a3331ef63e8addcc62a7d5a47 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 7 Nov 2023 08:59:50 -0500 Subject: [PATCH 051/110] Regenerate all themes --- crates/theme2/src/themes/andromeda.rs | 80 +++-- crates/theme2/src/themes/ayu.rs | 119 ++++--- crates/theme2/src/themes/dracula.rs | 41 ++- crates/theme2/src/themes/gruvbox.rs | 236 ++++++++----- crates/theme2/src/themes/mod.rs | 68 ++-- crates/theme2/src/themes/night_owl.rs | 80 +++-- crates/theme2/src/themes/nord.rs | 41 ++- crates/theme2/src/themes/notctis.rs | 431 ++++++++++++++--------- crates/theme2/src/themes/palenight.rs | 119 ++++--- crates/theme2/src/themes/rose_pine.rs | 119 ++++--- crates/theme2/src/themes/solarized.rs | 80 +++-- crates/theme2/src/themes/synthwave_84.rs | 41 ++- 12 files changed, 885 insertions(+), 570 deletions(-) diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 46e14a99ad2d0044467a434382b0ccd43881ff12..b0400a8c4b584999b07ce6965c0f1fa5b5c1b395 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -7,12 +7,12 @@ use crate::{ pub fn andromeda() -> ThemeFamily { ThemeFamily { - id: "192bb9a2-a028-4c9a-b713-4c92330b3fab".into(), + id: "ecd46547-a042-424d-99ca-5f56c060f798".into(), name: "Andromeda".into(), author: "Eliver Lara (EliverLara)".into(), themes: vec![ ThemeVariant { - id: "a3aaa73f-f225-41bd-8d52-77ca1df0b7f7".into(), + id: "3bfb3b6e-365a-4cd2-9a80-2d2c81434729".into(), name: "Andromeda".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn andromeda() -> ThemeFamily { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), - border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), + border_disabled: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x23262eff).into(), @@ -61,8 +61,17 @@ pub fn andromeda() -> ThemeFamily { tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x23262eff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), @@ -104,24 +113,24 @@ pub fn andromeda() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn andromeda() -> ThemeFamily { }, }, ThemeVariant { - id: "91a17b19-1e74-487e-b0a0-56e2e5360ab8".into(), + id: "7bc92ac8-152c-46d5-b346-df68e4db2e7c".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn andromeda() -> ThemeFamily { border: rgba(0x1b1d23ff).into(), border_variant: rgba(0x1b1d23ff).into(), border_focused: rgba(0x1b1d23ff).into(), - border_disabled: rgba(0x1b1d23ff).into(), border_selected: rgba(0x1b1d23ff).into(), border_transparent: rgba(0x1b1d23ff).into(), + border_disabled: rgba(0x1b1d23ff).into(), elevated_surface_background: rgba(0x23262eff).into(), surface_background: rgba(0x23262eff).into(), background: rgba(0x262933ff).into(), @@ -219,8 +228,17 @@ pub fn andromeda() -> ThemeFamily { tab_inactive_background: rgba(0x23262eff).into(), tab_active_background: rgba(0x262933ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xee5d42ff).into(), @@ -262,24 +280,24 @@ pub fn andromeda() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 40fdb7ac15ba69c7efb76857dfe8298691860ecd..a2c054ac28db9f717b6ebba9df8518560d1b28fc 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -7,12 +7,12 @@ use crate::{ pub fn ayu() -> ThemeFamily { ThemeFamily { - id: "5ace5bd5-0231-4f26-a69f-40a96dd4163e".into(), + id: "4faecf44-837e-4034-9197-7da909668498".into(), name: "Ayu".into(), author: "dempfi (Ike Ku)".into(), themes: vec![ ThemeVariant { - id: "7781d65c-4575-421d-af3c-061ab0b0478a".into(), + id: "733aeb9b-98fd-4492-984e-d71540daf72e".into(), name: "Ayu Light".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn ayu() -> ThemeFamily { border: rgba(0x6b7d8f1f).into(), border_variant: rgba(0x6b7d8f1f).into(), border_focused: rgba(0x6b7d8f1f).into(), - border_disabled: rgba(0x6b7d8f1f).into(), border_selected: rgba(0x6b7d8f1f).into(), border_transparent: rgba(0x6b7d8f1f).into(), + border_disabled: rgba(0x6b7d8f1f).into(), elevated_surface_background: rgba(0xf8f9faff).into(), surface_background: rgba(0xf8f9faff).into(), background: rgba(0xf8f9faff).into(), @@ -61,8 +61,17 @@ pub fn ayu() -> ThemeFamily { tab_inactive_background: rgba(0xf8f9faff).into(), tab_active_background: rgba(0xf8f9faff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xf8f9faff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7070ff).into(), @@ -104,24 +113,24 @@ pub fn ayu() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn ayu() -> ThemeFamily { }, }, ThemeVariant { - id: "68066666-5e56-4937-9434-510ffd0fe05f".into(), + id: "50f68427-2e1d-4bf1-981a-d08c6b38e846".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn ayu() -> ThemeFamily { border: rgba(0x171a24ff).into(), border_variant: rgba(0x171a24ff).into(), border_focused: rgba(0x171a24ff).into(), - border_disabled: rgba(0x171a24ff).into(), border_selected: rgba(0x171a24ff).into(), border_transparent: rgba(0x171a24ff).into(), + border_disabled: rgba(0x171a24ff).into(), elevated_surface_background: rgba(0x1f2430ff).into(), surface_background: rgba(0x1f2430ff).into(), background: rgba(0x1f2430ff).into(), @@ -219,8 +228,17 @@ pub fn ayu() -> ThemeFamily { tab_inactive_background: rgba(0x1f2430ff).into(), tab_active_background: rgba(0x1f2430ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x1f2430ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xf18678ff).into(), @@ -262,24 +280,24 @@ pub fn ayu() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -328,7 +346,7 @@ pub fn ayu() -> ThemeFamily { }, }, ThemeVariant { - id: "d4f949b8-e5b9-4337-a52e-2ed1752a6c4f".into(), + id: "22d8dede-57da-46e1-946a-16876679b4d2".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -342,9 +360,9 @@ pub fn ayu() -> ThemeFamily { border: rgba(0x1e232bff).into(), border_variant: rgba(0x1e232bff).into(), border_focused: rgba(0x1e232bff).into(), - border_disabled: rgba(0x1e232bff).into(), border_selected: rgba(0x1e232bff).into(), border_transparent: rgba(0x1e232bff).into(), + border_disabled: rgba(0x1e232bff).into(), elevated_surface_background: rgba(0x0b0e14ff).into(), surface_background: rgba(0x0b0e14ff).into(), background: rgba(0x0b0e14ff).into(), @@ -377,8 +395,17 @@ pub fn ayu() -> ThemeFamily { tab_inactive_background: rgba(0x0b0e14ff).into(), tab_active_background: rgba(0x0b0e14ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x0b0e14ff).into(), terminal_ansi_bright_black: rgba(0x686868ff).into(), terminal_ansi_bright_red: rgba(0xef7077ff).into(), @@ -420,24 +447,24 @@ pub fn ayu() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index 2fae1b04f6ba0ceaeae2819c730da928ac051a87..7318057c53aef8d098621f7520ee0e8e2e4cf578 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -7,11 +7,11 @@ use crate::{ pub fn dracula() -> ThemeFamily { ThemeFamily { - id: "20b9a8c0-0b74-483b-bed2-be7a053e1321".into(), + id: "0abb0e55-f034-45d9-a84d-e880dfd65711".into(), name: "Dracula".into(), author: "Zeno Rocha".into(), themes: vec![ThemeVariant { - id: "02f5624f-9b0a-48e0-8897-4557adc8f104".into(), + id: "d20497ef-85be-4ea2-9070-a182d03aac73".into(), name: "Dracula".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -25,9 +25,9 @@ pub fn dracula() -> ThemeFamily { border: rgba(0xbd93f9ff).into(), border_variant: rgba(0xbd93f9ff).into(), border_focused: rgba(0xbd93f9ff).into(), - border_disabled: rgba(0xbd93f9ff).into(), border_selected: rgba(0xbd93f9ff).into(), border_transparent: rgba(0xbd93f9ff).into(), + border_disabled: rgba(0xbd93f9ff).into(), elevated_surface_background: rgba(0x282a35ff).into(), surface_background: rgba(0x282a35ff).into(), background: rgba(0x282a35ff).into(), @@ -60,8 +60,17 @@ pub fn dracula() -> ThemeFamily { tab_inactive_background: rgba(0x21222cff).into(), tab_active_background: rgba(0x282a35ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x282a35ff).into(), terminal_ansi_bright_black: rgba(0x6272a4ff).into(), terminal_ansi_bright_red: rgba(0xff6d6dff).into(), @@ -103,24 +112,24 @@ pub fn dracula() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index db5849718771d836cccd3f0230937b2e15176696..756a0b658be61dfaec2241dc3ce103f5a1d27082 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -7,12 +7,12 @@ use crate::{ pub fn gruvbox() -> ThemeFamily { ThemeFamily { - id: "c0b7f0e7-f261-4a33-a2bf-baf2e140aac4".into(), + id: "000a3e50-ccf1-430d-84e4-910583bd1064".into(), name: "Gruvbox".into(), author: "morhetz".into(), themes: vec![ ThemeVariant { - id: "fb9f8f64-372b-4fda-8dbd-d610c97a9691".into(), + id: "0db938b2-2267-453b-af84-f82c5f3400e7".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x1d2021ff).into(), @@ -61,8 +61,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0x1d2021ff).into(), tab_active_background: rgba(0x32302fff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x1d2021ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), @@ -104,24 +113,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "72f0ea45-33bc-49d8-9f52-87540f858fb4".into(), + id: "8e1a1896-ed0f-40be-b127-6c389eacc9f1".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x282828ff).into(), @@ -219,8 +228,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0x282828ff).into(), tab_active_background: rgba(0x3c3836ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x282828ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), @@ -262,24 +280,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -328,7 +346,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "5ea1cdf8-6ed0-4e54-b44a-14c6634701cf".into(), + id: "94410e6f-f4c4-4669-bb4d-5a20b4e4b1f3".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -342,9 +360,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0x3c3836ff).into(), border_variant: rgba(0x3c3836ff).into(), border_focused: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), border_selected: rgba(0x3c3836ff).into(), border_transparent: rgba(0x3c3836ff).into(), + border_disabled: rgba(0x3c3836ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x32302fff).into(), @@ -377,8 +395,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0x32302fff).into(), tab_active_background: rgba(0x504945ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x32302fff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0xfb4833ff).into(), @@ -420,24 +447,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -486,7 +513,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "b0c9082f-00c8-4a02-a4de-9fd7af97c7f2".into(), + id: "e4a58582-478a-4934-ad73-135e23a0d66e".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -500,9 +527,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf9f5d7ff).into(), @@ -535,8 +562,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0xf9f5d7ff).into(), tab_active_background: rgba(0xf2e5bcff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xf9f5d7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), @@ -578,24 +614,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -644,7 +680,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "172c281c-ff0a-496e-8794-880e2fc3aa49".into(), + id: "0e875280-93fa-4c76-8874-f858c7d985c1".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -658,9 +694,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfbf1c7ff).into(), @@ -693,8 +729,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0xfbf1c7ff).into(), tab_active_background: rgba(0xebdbb2ff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xfbf1c7ff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), @@ -736,24 +781,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -802,7 +847,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, ThemeVariant { - id: "b94f3305-b755-44f2-948c-cfd8c9d3158f".into(), + id: "914dbe6f-bc0f-4e6f-8d8c-5f4cabc1ca2d".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -816,9 +861,9 @@ pub fn gruvbox() -> ThemeFamily { border: rgba(0xebdbb2ff).into(), border_variant: rgba(0xebdbb2ff).into(), border_focused: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), border_selected: rgba(0xebdbb2ff).into(), border_transparent: rgba(0xebdbb2ff).into(), + border_disabled: rgba(0xebdbb2ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xf2e5bcff).into(), @@ -851,8 +896,17 @@ pub fn gruvbox() -> ThemeFamily { tab_inactive_background: rgba(0xf2e5bcff).into(), tab_active_background: rgba(0xd5c4a1ff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xf2e5bcff).into(), terminal_ansi_bright_black: rgba(0x928374ff).into(), terminal_ansi_bright_red: rgba(0x9d0006ff).into(), @@ -894,24 +948,24 @@ pub fn gruvbox() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index 86fe9f9bb3e2a7f60bf1c3ea330a9c1cd226a067..2a00b497852e19da19d3fcadea1a1ab1dac2649e 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -1,41 +1,41 @@ -// mod andromeda; -// mod ayu; -// mod dracula; -// mod gruvbox; -// mod night_owl; -// mod nord; -// mod notctis; -// mod palenight; -// mod rose_pine; -// mod solarized; -// mod synthwave_84; +mod andromeda; +mod ayu; +mod dracula; +mod gruvbox; +mod night_owl; +mod nord; +mod notctis; +mod palenight; +mod rose_pine; +mod solarized; +mod synthwave_84; -// pub use andromeda::*; -// pub use ayu::*; -// pub use dracula::*; -// pub use gruvbox::*; -// pub use night_owl::*; -// pub use nord::*; -// pub use notctis::*; -// pub use palenight::*; -// pub use rose_pine::*; -// pub use solarized::*; -// pub use synthwave_84::*; +pub use andromeda::*; +pub use ayu::*; +pub use dracula::*; +pub use gruvbox::*; +pub use night_owl::*; +pub use nord::*; +pub use notctis::*; +pub use palenight::*; +pub use rose_pine::*; +pub use solarized::*; +pub use synthwave_84::*; use crate::ThemeFamily; -pub fn all_imported_themes() -> Vec { +pub(crate) fn all_imported_themes() -> Vec { vec![ - // rose_pine(), - // night_owl(), - // andromeda(), - // synthwave_84(), - // palenight(), - // dracula(), - // solarized(), - // nord(), - // notctis(), - // ayu(), - // gruvbox(), + rose_pine(), + night_owl(), + andromeda(), + synthwave_84(), + palenight(), + dracula(), + solarized(), + nord(), + notctis(), + ayu(), + gruvbox(), ] } diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rs index d4418ac3dc7d72fc6df6c494e822b3a2071245aa..ed727127bdee22a1d3cd6162f0bbcfe58e331bb5 100644 --- a/crates/theme2/src/themes/night_owl.rs +++ b/crates/theme2/src/themes/night_owl.rs @@ -7,12 +7,12 @@ use crate::{ pub fn night_owl() -> ThemeFamily { ThemeFamily { - id: "b6469599-df68-4604-be9d-44f63d877d53".into(), + id: "19498197-1091-409d-b37a-a282998e5c31".into(), name: "Night Owl".into(), author: "Sarah Drasner (sdras)".into(), themes: vec![ ThemeVariant { - id: "2a04e5fa-e266-475b-b965-3d92efe77ad9".into(), + id: "e5de91ed-fc95-46fb-a60b-ebd0602d04c7".into(), name: "Night Owl".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn night_owl() -> ThemeFamily { border: rgba(0x5f7e97ff).into(), border_variant: rgba(0x5f7e97ff).into(), border_focused: rgba(0x5f7e97ff).into(), - border_disabled: rgba(0x5f7e97ff).into(), border_selected: rgba(0x5f7e97ff).into(), border_transparent: rgba(0x5f7e97ff).into(), + border_disabled: rgba(0x5f7e97ff).into(), elevated_surface_background: rgba(0x011526ff).into(), surface_background: rgba(0x011526ff).into(), background: rgba(0x011526ff).into(), @@ -61,8 +61,17 @@ pub fn night_owl() -> ThemeFamily { tab_inactive_background: rgba(0x01101cff).into(), tab_active_background: rgba(0x0a2842ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x575656ff).into(), terminal_ansi_bright_red: rgba(0xef524fff).into(), @@ -104,24 +113,24 @@ pub fn night_owl() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn night_owl() -> ThemeFamily { }, }, ThemeVariant { - id: "91901d29-1c1f-49ef-ac69-c25639425f7c".into(), + id: "998fc053-40c1-4a32-a31f-a17c9c07949a".into(), name: "Night Owl Light".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn night_owl() -> ThemeFamily { border: rgba(0xd9d9d9ff).into(), border_variant: rgba(0xd9d9d9ff).into(), border_focused: rgba(0xd9d9d9ff).into(), - border_disabled: rgba(0xd9d9d9ff).into(), border_selected: rgba(0xd9d9d9ff).into(), border_transparent: rgba(0xd9d9d9ff).into(), + border_disabled: rgba(0xd9d9d9ff).into(), elevated_surface_background: rgba(0xf0f0f0ff).into(), surface_background: rgba(0xf0f0f0ff).into(), background: rgba(0xfbfbfbff).into(), @@ -219,8 +228,17 @@ pub fn night_owl() -> ThemeFamily { tab_inactive_background: rgba(0xf0f0f0ff).into(), tab_active_background: rgba(0xf6f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xf6f6f6ff).into(), terminal_ansi_bright_black: rgba(0x403f53ff).into(), terminal_ansi_bright_red: rgba(0xde3c3aff).into(), @@ -262,24 +280,24 @@ pub fn night_owl() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index 953ee1d0da5617de5948e061bb316c34d47c8e0d..25e6da2c5e8440b9cbc5a3b4ce8d5d32f1184f3c 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -7,11 +7,11 @@ use crate::{ pub fn nord() -> ThemeFamily { ThemeFamily { - id: "dcd03133-f540-47e7-9360-91bb1c94d16e".into(), + id: "3295b94b-731f-41a8-8d5e-ad02638f8e0d".into(), name: "Nord".into(), author: "Sven Greb (svengreb)".into(), themes: vec![ThemeVariant { - id: "ed7e8c08-321a-41f0-bd22-ca92c0b42e0e".into(), + id: "dfdfd9f6-bc57-46dd-b919-42b18df35bdd".into(), name: "Nord".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -25,9 +25,9 @@ pub fn nord() -> ThemeFamily { border: rgba(0x3b4252ff).into(), border_variant: rgba(0x3b4252ff).into(), border_focused: rgba(0x3b4252ff).into(), - border_disabled: rgba(0x3b4252ff).into(), border_selected: rgba(0x3b4252ff).into(), border_transparent: rgba(0x3b4252ff).into(), + border_disabled: rgba(0x3b4252ff).into(), elevated_surface_background: rgba(0x2e3440ff).into(), surface_background: rgba(0x2e3440ff).into(), background: rgba(0x2e3440ff).into(), @@ -60,8 +60,17 @@ pub fn nord() -> ThemeFamily { tab_inactive_background: rgba(0x2e3440ff).into(), tab_active_background: rgba(0x3b4252ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x2e3440ff).into(), terminal_ansi_bright_black: rgba(0x4c566aff).into(), terminal_ansi_bright_red: rgba(0xbf616aff).into(), @@ -103,24 +112,24 @@ pub fn nord() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index d11463ea42ea278efd446540bf438c55203a3791..70c57bac57bd2cb9144bf33c32f07ba8a1cf2ac6 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -7,12 +7,12 @@ use crate::{ pub fn notctis() -> ThemeFamily { ThemeFamily { - id: "077650e4-c11f-4cb5-96ec-73bc74923e95".into(), + id: "7fbf6904-517c-42e1-8eb3-a64b1e9218b9".into(), name: "Notctis".into(), author: "Liviu Schera (liviuschera)".into(), themes: vec![ ThemeVariant { - id: "47135df9-e9b5-480c-a71b-c85052b8ff93".into(), + id: "2dc5fee8-30ff-4a50-bfae-c13bd19c9f89".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x1579b6ff).into(), border_variant: rgba(0x1579b6ff).into(), border_focused: rgba(0x1579b6ff).into(), - border_disabled: rgba(0x1579b6ff).into(), border_selected: rgba(0x1579b6ff).into(), border_transparent: rgba(0x1579b6ff).into(), + border_disabled: rgba(0x1579b6ff).into(), elevated_surface_background: rgba(0x051b28ff).into(), surface_background: rgba(0x051b28ff).into(), background: rgba(0x07263aff).into(), @@ -61,8 +61,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x08324eff).into(), tab_active_background: rgba(0x07263aff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x051b28ff).into(), terminal_ansi_bright_black: rgba(0x475e6cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -104,24 +113,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "5a3842b1-2273-47ce-ab82-4179842362b1".into(), + id: "ba4f5a34-987a-4e2c-939c-7f1b02d0e432".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x997582ff).into(), border_variant: rgba(0x997582ff).into(), border_focused: rgba(0x997582ff).into(), - border_disabled: rgba(0x997582ff).into(), border_selected: rgba(0x997582ff).into(), border_transparent: rgba(0x997582ff).into(), + border_disabled: rgba(0x997582ff).into(), elevated_surface_background: rgba(0x272022ff).into(), surface_background: rgba(0x272022ff).into(), background: rgba(0x322a2dff).into(), @@ -219,8 +228,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x413036ff).into(), tab_active_background: rgba(0x322a2dff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x272022ff).into(), terminal_ansi_bright_black: rgba(0x69545bff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -262,24 +280,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -328,7 +346,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "a83c02b3-23f3-496b-8644-57df3314601e".into(), + id: "a2e4f327-82e8-41c1-a66f-bc7f27419c2e".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -342,9 +360,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), - border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), + border_disabled: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xe1eeefff).into(), surface_background: rgba(0xe1eeefff).into(), background: rgba(0xf4f6f6ff).into(), @@ -377,8 +395,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0xcaedf2ff).into(), tab_active_background: rgba(0xf4f6f6ff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xe1eeefff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), @@ -420,24 +447,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -486,7 +513,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "bda85aea-2260-455a-959a-c03b0a62b8f4".into(), + id: "2fde44fb-e5b2-4cc2-962f-f1c77a4eb12a".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -500,9 +527,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0xaea4f4ff).into(), border_variant: rgba(0xaea4f4ff).into(), border_focused: rgba(0xaea4f4ff).into(), - border_disabled: rgba(0xaea4f4ff).into(), border_selected: rgba(0xaea4f4ff).into(), border_transparent: rgba(0xaea4f4ff).into(), + border_disabled: rgba(0xaea4f4ff).into(), elevated_surface_background: rgba(0xe9e7f3ff).into(), surface_background: rgba(0xe9e7f3ff).into(), background: rgba(0xf2f1f8ff).into(), @@ -535,8 +562,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0xe2dff6ff).into(), tab_active_background: rgba(0xf2f1f8ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0xe9e7f3ff).into(), terminal_ansi_bright_black: rgba(0x0f0080ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), @@ -578,24 +614,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -644,7 +680,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "7720f487-6b09-4bb6-9add-272b030c013f".into(), + id: "2b89f218-c238-4905-9578-674d6995d2e0".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -658,9 +694,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x00c6e0ff).into(), border_variant: rgba(0x00c6e0ff).into(), border_focused: rgba(0x00c6e0ff).into(), - border_disabled: rgba(0x00c6e0ff).into(), border_selected: rgba(0x00c6e0ff).into(), border_transparent: rgba(0x00c6e0ff).into(), + border_disabled: rgba(0x00c6e0ff).into(), elevated_surface_background: rgba(0xf6eddaff).into(), surface_background: rgba(0xf6eddaff).into(), background: rgba(0xfef8ecff).into(), @@ -693,8 +729,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0xf0e9d6ff).into(), tab_active_background: rgba(0xfef8ecff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xf6eddaff).into(), terminal_ansi_bright_black: rgba(0x004d57ff).into(), terminal_ansi_bright_red: rgba(0xff3f00ff).into(), @@ -736,24 +781,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -802,7 +847,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "51dfe842-b4e2-4d95-a306-8e579a3bb51c".into(), + id: "f88e2cd7-2415-4118-a638-5cfd3132ecf8".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -816,9 +861,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x496c83ff).into(), border_variant: rgba(0x496c83ff).into(), border_focused: rgba(0x496c83ff).into(), - border_disabled: rgba(0x496c83ff).into(), border_selected: rgba(0x496c83ff).into(), border_transparent: rgba(0x496c83ff).into(), + border_disabled: rgba(0x496c83ff).into(), elevated_surface_background: rgba(0x0e1920ff).into(), surface_background: rgba(0x0e1920ff).into(), background: rgba(0x1b2932ff).into(), @@ -851,8 +896,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x202d37ff).into(), tab_active_background: rgba(0x1b2932ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x0e1920ff).into(), terminal_ansi_bright_black: rgba(0x425866ff).into(), terminal_ansi_bright_red: rgba(0xca8468ff).into(), @@ -894,24 +948,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -960,7 +1014,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "75a67a53-afbe-4073-a7c0-85a40b56c2cc".into(), + id: "c4d43fc2-6166-47b7-8c5c-dd24afd4b735".into(), name: "Noctis".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -974,9 +1028,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x03181aff).into(), surface_background: rgba(0x03181aff).into(), background: rgba(0x052428ff).into(), @@ -1009,8 +1063,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x052428ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x03181aff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -1052,24 +1115,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -1118,7 +1181,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "0202afff-5703-473b-b6b6-e86ac3a70718".into(), + id: "7253a515-c612-403c-89de-5b62dc5cbac7".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1132,9 +1195,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), @@ -1167,8 +1230,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -1210,24 +1282,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -1276,7 +1348,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "213fd750-27ad-4762-8891-08282ed316c7".into(), + id: "b0f2d7b8-ac5f-466f-9bbf-e7cac242149c".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1290,9 +1362,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x0d6571ff).into(), border_variant: rgba(0x0d6571ff).into(), border_focused: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), border_selected: rgba(0x0d6571ff).into(), border_transparent: rgba(0x0d6571ff).into(), + border_disabled: rgba(0x0d6571ff).into(), elevated_surface_background: rgba(0x020c0eff).into(), surface_background: rgba(0x020c0eff).into(), background: rgba(0x031316ff).into(), @@ -1325,8 +1397,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x052e32ff).into(), tab_active_background: rgba(0x031316ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x020c0eff).into(), terminal_ansi_bright_black: rgba(0x47686cff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -1368,24 +1449,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -1434,7 +1515,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "0cc2c841-1c01-40a7-8396-1234dd077ede".into(), + id: "331ce3fd-8faf-4a46-ad89-2c678abc4cd3".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1448,9 +1529,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x6d66a7ff).into(), border_variant: rgba(0x6d66a7ff).into(), border_focused: rgba(0x6d66a7ff).into(), - border_disabled: rgba(0x6d66a7ff).into(), border_selected: rgba(0x6d66a7ff).into(), border_transparent: rgba(0x6d66a7ff).into(), + border_disabled: rgba(0x6d66a7ff).into(), elevated_surface_background: rgba(0x1f1d30ff).into(), surface_background: rgba(0x1f1d30ff).into(), background: rgba(0x292640ff).into(), @@ -1483,8 +1564,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x2f2c49ff).into(), tab_active_background: rgba(0x292640ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x1f1d30ff).into(), terminal_ansi_bright_black: rgba(0x504e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -1526,24 +1616,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -1592,7 +1682,7 @@ pub fn notctis() -> ThemeFamily { }, }, ThemeVariant { - id: "090a97c7-ad25-4a35-96e6-2fce5e471e6b".into(), + id: "209964f1-6a61-4e40-a605-be245555c493".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -1606,9 +1696,9 @@ pub fn notctis() -> ThemeFamily { border: rgba(0x8666a7ff).into(), border_variant: rgba(0x8666a7ff).into(), border_focused: rgba(0x8666a7ff).into(), - border_disabled: rgba(0x8666a7ff).into(), border_selected: rgba(0x8666a7ff).into(), border_transparent: rgba(0x8666a7ff).into(), + border_disabled: rgba(0x8666a7ff).into(), elevated_surface_background: rgba(0x291d35ff).into(), surface_background: rgba(0x291d35ff).into(), background: rgba(0x30243dff).into(), @@ -1641,8 +1731,17 @@ pub fn notctis() -> ThemeFamily { tab_inactive_background: rgba(0x3d2e4dff).into(), tab_active_background: rgba(0x30243dff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x291d35ff).into(), terminal_ansi_bright_black: rgba(0x594e65ff).into(), terminal_ansi_bright_red: rgba(0xe97749ff).into(), @@ -1684,24 +1783,24 @@ pub fn notctis() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs index 836ec680cdf349d563aa5745122947d6fab26b5a..8ad0a86eb86dd156d40fdeab8f114ee523d89917 100644 --- a/crates/theme2/src/themes/palenight.rs +++ b/crates/theme2/src/themes/palenight.rs @@ -7,12 +7,12 @@ use crate::{ pub fn palenight() -> ThemeFamily { ThemeFamily { - id: "3187cd2f-29da-4bde-9621-83016df3b393".into(), + id: "16313d66-dab6-468a-82f6-e69759fdd8cf".into(), name: "Palenight".into(), author: "Olaolu Olawuyi (whizkydee)".into(), themes: vec![ ThemeVariant { - id: "0eaa3098-3aa2-4b8e-b1df-92d9ebd9a0b8".into(), + id: "39fdf216-2c76-4b3d-b368-7c31f479d524".into(), name: "Palenight".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn palenight() -> ThemeFamily { border: rgba(0x282b3bff).into(), border_variant: rgba(0x282b3bff).into(), border_focused: rgba(0x282b3bff).into(), - border_disabled: rgba(0x282b3bff).into(), border_selected: rgba(0x282b3bff).into(), border_transparent: rgba(0x282b3bff).into(), + border_disabled: rgba(0x282b3bff).into(), elevated_surface_background: rgba(0x292c3eff).into(), surface_background: rgba(0x292c3eff).into(), background: rgba(0x292c3eff).into(), @@ -61,8 +61,17 @@ pub fn palenight() -> ThemeFamily { tab_inactive_background: rgba(0x31364aff).into(), tab_active_background: rgba(0x292c3eff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x676e95ff).into(), terminal_ansi_bright_red: rgba(0xff5571ff).into(), @@ -104,24 +113,24 @@ pub fn palenight() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn palenight() -> ThemeFamily { }, }, ThemeVariant { - id: "b6a27c72-c5b1-431b-8bfe-29e33dbcb337".into(), + id: "5ff8120f-37e9-4ad3-8bd0-c3e449ff1aa1".into(), name: "Palenight Operator".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn palenight() -> ThemeFamily { border: rgba(0x282b3bff).into(), border_variant: rgba(0x282b3bff).into(), border_focused: rgba(0x282b3bff).into(), - border_disabled: rgba(0x282b3bff).into(), border_selected: rgba(0x282b3bff).into(), border_transparent: rgba(0x282b3bff).into(), + border_disabled: rgba(0x282b3bff).into(), elevated_surface_background: rgba(0x292c3eff).into(), surface_background: rgba(0x292c3eff).into(), background: rgba(0x292c3eff).into(), @@ -219,8 +228,17 @@ pub fn palenight() -> ThemeFamily { tab_inactive_background: rgba(0x31364aff).into(), tab_active_background: rgba(0x292c3eff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x676e95ff).into(), terminal_ansi_bright_red: rgba(0xff5571ff).into(), @@ -262,24 +280,24 @@ pub fn palenight() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -328,7 +346,7 @@ pub fn palenight() -> ThemeFamily { }, }, ThemeVariant { - id: "4015bf85-061c-45ff-81ba-a31f017aac83".into(), + id: "cff26efb-72f8-4496-b33b-991080a47f1c".into(), name: "Palenight (Mild Contrast)".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -342,9 +360,9 @@ pub fn palenight() -> ThemeFamily { border: rgba(0x2c2f40ff).into(), border_variant: rgba(0x2c2f40ff).into(), border_focused: rgba(0x2c2f40ff).into(), - border_disabled: rgba(0x2c2f40ff).into(), border_selected: rgba(0x2c2f40ff).into(), border_transparent: rgba(0x2c2f40ff).into(), + border_disabled: rgba(0x2c2f40ff).into(), elevated_surface_background: rgba(0x25283aff).into(), surface_background: rgba(0x25283aff).into(), background: rgba(0x292c3eff).into(), @@ -377,8 +395,17 @@ pub fn palenight() -> ThemeFamily { tab_inactive_background: rgba(0x31364aff).into(), tab_active_background: rgba(0x25283aff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x676e95ff).into(), terminal_ansi_bright_red: rgba(0xff5571ff).into(), @@ -420,24 +447,24 @@ pub fn palenight() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index b367d6196b347c2e7dfe5a05e410262a4ae84310..d022d645cf3798259877d648021446bc3cdb9d9c 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -7,12 +7,12 @@ use crate::{ pub fn rose_pine() -> ThemeFamily { ThemeFamily { - id: "48c308b9-7dbe-4a52-b935-0b44d9dac00d".into(), + id: "9cf70eba-1185-4f3e-adb7-74f61c45c9dc".into(), name: "Rose Pine".into(), author: "Rosé Pine".into(), themes: vec![ ThemeVariant { - id: "c2832e85-20cb-4a13-924f-026e68123068".into(), + id: "80a8f5dd-2ab5-4ee7-9b25-a60c8513234e".into(), name: "Rose Pine".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn rose_pine() -> ThemeFamily { border: rgba(0x000000ff).into(), border_variant: rgba(0x000000ff).into(), border_focused: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), border_selected: rgba(0x000000ff).into(), border_transparent: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), elevated_surface_background: rgba(0x1f1d2eff).into(), surface_background: rgba(0x1f1d2eff).into(), background: rgba(0x191724ff).into(), @@ -61,8 +61,17 @@ pub fn rose_pine() -> ThemeFamily { tab_inactive_background: rgba(0x000000ff).into(), tab_active_background: rgba(0x6e6a861a).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x908caaff).into(), terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), @@ -104,24 +113,24 @@ pub fn rose_pine() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn rose_pine() -> ThemeFamily { }, }, ThemeVariant { - id: "3f6c3263-86f4-4a0e-92a6-144984aa2d38".into(), + id: "fe9e3c9e-954e-4f8e-849e-451ba5f6ceca".into(), name: "Rose Moon".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn rose_pine() -> ThemeFamily { border: rgba(0x000000ff).into(), border_variant: rgba(0x000000ff).into(), border_focused: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), border_selected: rgba(0x000000ff).into(), border_transparent: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), elevated_surface_background: rgba(0x2a273eff).into(), surface_background: rgba(0x2a273eff).into(), background: rgba(0x232136ff).into(), @@ -219,8 +228,17 @@ pub fn rose_pine() -> ThemeFamily { tab_inactive_background: rgba(0x000000ff).into(), tab_active_background: rgba(0x817c9c14).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x908caaff).into(), terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), @@ -262,24 +280,24 @@ pub fn rose_pine() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -328,7 +346,7 @@ pub fn rose_pine() -> ThemeFamily { }, }, ThemeVariant { - id: "d171cda6-de3b-4528-8559-cd8fb71b2e7c".into(), + id: "00cc7f69-9658-443e-b643-1c8dbffa047d".into(), name: "Rose Pine Dawn".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -342,9 +360,9 @@ pub fn rose_pine() -> ThemeFamily { border: rgba(0x000000ff).into(), border_variant: rgba(0x000000ff).into(), border_focused: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), border_selected: rgba(0x000000ff).into(), border_transparent: rgba(0x000000ff).into(), + border_disabled: rgba(0x000000ff).into(), elevated_surface_background: rgba(0xfffaf3ff).into(), surface_background: rgba(0xfffaf3ff).into(), background: rgba(0xfaf4edff).into(), @@ -377,8 +395,17 @@ pub fn rose_pine() -> ThemeFamily { tab_inactive_background: rgba(0x000000ff).into(), tab_active_background: rgba(0x6e6a860d).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xfcfcfdff).into(), terminal_ansi_bright_black: rgba(0x797593ff).into(), terminal_ansi_bright_red: rgba(0xb3627aff).into(), @@ -420,24 +447,24 @@ pub fn rose_pine() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index d160cfa6524dda6a2deadce08f15032660f2ff0e..cca669479a406c02ceefeedd187e0416e7290fae 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -7,12 +7,12 @@ use crate::{ pub fn solarized() -> ThemeFamily { ThemeFamily { - id: "9a6f18c9-520f-46ec-9bfb-a7ee73508139".into(), + id: "96299b3e-c749-478c-bfc9-c96cdaea8630".into(), name: "Solarized".into(), author: "Ethan Schoonover (altercation)".into(), themes: vec![ ThemeVariant { - id: "74003db2-7f9a-4d26-8815-020c796bb551".into(), + id: "265f93c5-c8e7-4962-b083-8550f4b5c2ff".into(), name: "Solarized Dark".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -26,9 +26,9 @@ pub fn solarized() -> ThemeFamily { border: rgba(0x003847ff).into(), border_variant: rgba(0x003847ff).into(), border_focused: rgba(0x003847ff).into(), - border_disabled: rgba(0x003847ff).into(), border_selected: rgba(0x003847ff).into(), border_transparent: rgba(0x003847ff).into(), + border_disabled: rgba(0x003847ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x002a35ff).into(), @@ -61,8 +61,17 @@ pub fn solarized() -> ThemeFamily { tab_inactive_background: rgba(0x003f51ff).into(), tab_active_background: rgba(0x002a36ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x586e75ff).into(), terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), @@ -104,24 +113,24 @@ pub fn solarized() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { @@ -170,7 +179,7 @@ pub fn solarized() -> ThemeFamily { }, }, ThemeVariant { - id: "43be149b-2604-4eb2-a9ce-c8f902ab3bb3".into(), + id: "40e2070d-5846-4182-9dc9-bf56badf019f".into(), name: "Solarized Light".into(), appearance: Appearance::Light, styles: ThemeStyles { @@ -184,9 +193,9 @@ pub fn solarized() -> ThemeFamily { border: rgba(0xddd6c1ff).into(), border_variant: rgba(0xddd6c1ff).into(), border_focused: rgba(0xddd6c1ff).into(), - border_disabled: rgba(0xddd6c1ff).into(), border_selected: rgba(0xddd6c1ff).into(), border_transparent: rgba(0xddd6c1ff).into(), + border_disabled: rgba(0xddd6c1ff).into(), elevated_surface_background: rgba(0xf9f9fbff).into(), surface_background: rgba(0xf9f9fbff).into(), background: rgba(0xfdf6e3ff).into(), @@ -219,8 +228,17 @@ pub fn solarized() -> ThemeFamily { tab_inactive_background: rgba(0xd3cbb7ff).into(), tab_active_background: rgba(0xfdf6e3ff).into(), editor_background: rgba(0xfcfcfdff).into(), + editor_gutter_background: rgba(0xfcfcfdff).into(), editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line: rgba(0x0000320f).into(), + editor_active_line_background: rgba(0x0000320f).into(), + editor_highlighted_line_background: rgba(0x00002c17).into(), + editor_line_number: rgba(0x0000320f).into(), + editor_active_line_number: rgba(0x0000320f).into(), + editor_invisible: rgba(0x00002c17).into(), + editor_wrap_guide: rgba(0x00002c17).into(), + editor_active_wrap_guide: rgba(0x00002c17).into(), + editor_document_highlight_read_background: rgba(0x00002c17).into(), + editor_document_highlight_write_background: rgba(0x00002c17).into(), terminal_background: rgba(0xfcfcfdff).into(), terminal_ansi_bright_black: rgba(0x657b83ff).into(), terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), @@ -262,24 +280,24 @@ pub fn solarized() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs index cfe81bef424db8d1352d993c638c0002399767e0..8920037253c510a526c12b278b0f54de5b35fe6f 100644 --- a/crates/theme2/src/themes/synthwave_84.rs +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -7,11 +7,11 @@ use crate::{ pub fn synthwave_84() -> ThemeFamily { ThemeFamily { - id: "5e0f0cd5-5522-45cf-a652-caeb140eb3de".into(), + id: "161a14a0-533c-4df1-b909-2bac37ac807d".into(), name: "Synthwave 84".into(), author: "Robb Owen (robb0wen)".into(), themes: vec![ThemeVariant { - id: "83110d9e-dbf0-4f36-9a4c-6b396ce9a5a4".into(), + id: "7a7102b7-8778-4c24-ba79-7407857b4f8c".into(), name: "Synthwave 84".into(), appearance: Appearance::Dark, styles: ThemeStyles { @@ -25,9 +25,9 @@ pub fn synthwave_84() -> ThemeFamily { border: rgba(0x363a3fff).into(), border_variant: rgba(0x2e3135ff).into(), border_focused: rgba(0x004073ff).into(), - border_disabled: rgba(0x212225ff).into(), border_selected: rgba(0x004073ff).into(), border_transparent: rgba(0x00000000).into(), + border_disabled: rgba(0x212225ff).into(), elevated_surface_background: rgba(0x18191bff).into(), surface_background: rgba(0x18191bff).into(), background: rgba(0x252334ff).into(), @@ -60,8 +60,17 @@ pub fn synthwave_84() -> ThemeFamily { tab_inactive_background: rgba(0x252334ff).into(), tab_active_background: rgba(0x111113ff).into(), editor_background: rgba(0x111113ff).into(), + editor_gutter_background: rgba(0x111113ff).into(), editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line: rgba(0xddeaf814).into(), + editor_active_line_background: rgba(0xddeaf814).into(), + editor_highlighted_line_background: rgba(0xd3edf81d).into(), + editor_line_number: rgba(0xddeaf814).into(), + editor_active_line_number: rgba(0xddeaf814).into(), + editor_invisible: rgba(0xd3edf81d).into(), + editor_wrap_guide: rgba(0xd3edf81d).into(), + editor_active_wrap_guide: rgba(0xd3edf81d).into(), + editor_document_highlight_read_background: rgba(0xd3edf81d).into(), + editor_document_highlight_write_background: rgba(0xd3edf81d).into(), terminal_background: rgba(0x111113ff).into(), terminal_ansi_bright_black: rgba(0x000000e6).into(), terminal_ansi_bright_red: rgba(0xfe444fff).into(), @@ -103,24 +112,24 @@ pub fn synthwave_84() -> ThemeFamily { }, player: PlayerColors(vec![ PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, PlayerColor { - cursor: rgba(0x00000000).into(), - background: rgba(0x00000000).into(), - selection: rgba(0x00000000).into(), + cursor: rgba(0x000000ff).into(), + background: rgba(0x000000ff).into(), + selection: rgba(0x000000ff).into(), }, ]), syntax: SyntaxTheme { From b9e98c112fe4423bc950832092fec63d0f3d3658 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 15:48:08 +0100 Subject: [PATCH 052/110] Re-enable scrolling for `EditorElement` Co-Authored-By: Julia Co-Authored-By: Piotr --- crates/editor2/src/editor.rs | 6 +- crates/editor2/src/element.rs | 81 +++++++----- crates/editor2/src/scroll/actions.rs | 188 ++++++++++++++------------- crates/gpui2/src/geometry.rs | 4 + 4 files changed, 151 insertions(+), 128 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index be8375336c604f9ca87f390128ab01c3991b37f1..7a2511fa6dc1d6144a43618fe1dbd6bc7b01b394 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -36,9 +36,9 @@ pub use element::{ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ - div, px, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, EventEmitter, - FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, Subscription, Task, - TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, + div, px, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, Entity, + EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, + Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index b84aedd76a1d8d68f7431304d17444b68b935f77..3561aca657e60cdd2391cfa8f1d1208ee5d0a1c9 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -9,8 +9,9 @@ use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ black, hsla, point, px, relative, size, transparent_black, AnyElement, BorrowWindow, Bounds, - ContentMask, Corners, Edges, Element, Hsla, Line, Pixels, ShapedGlyph, Size, Style, TextRun, - TextStyle, TextSystem, ViewContext, WindowContext, + ContentMask, Corners, DispatchPhase, Edges, Element, ElementId, Hsla, Line, Pixels, + ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, + TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -464,39 +465,41 @@ impl EditorElement { // true // } - // fn scroll( - // editor: &mut Editor, - // position: gpui::Point, - // mut delta: gpui::Point, - // precise: bool, - // position_map: &PositionMap, - // bounds: Bounds, - // cx: &mut ViewContext, - // ) -> bool { - // if !bounds.contains_point(position) { - // return false; - // } + fn scroll( + editor: &mut Editor, + event: &ScrollWheelEvent, + position_map: &PositionMap, + bounds: Bounds, + cx: &mut ViewContext, + ) -> bool { + if !bounds.contains_point(&event.position) { + return false; + } - // let line_height = position_map.line_height; - // let max_glyph_width = position_map.em_width; + let line_height = position_map.line_height; + let max_glyph_width = position_map.em_width; + let (delta, axis) = match event.delta { + gpui::ScrollDelta::Pixels(mut pixels) => { + //Trackpad + let axis = position_map.snapshot.ongoing_scroll.filter(&mut pixels); + (pixels, axis) + } - // let axis = if precise { - // //Trackpad - // position_map.snapshot.ongoing_scroll.filter(&mut delta) - // } else { - // //Not trackpad - // delta *= point(max_glyph_width, line_height); - // None //Resets ongoing scroll - // }; + gpui::ScrollDelta::Lines(lines) => { + //Not trackpad + let pixels = point(lines.x * max_glyph_width, lines.y * line_height); + (pixels, None) + } + }; - // let scroll_position = position_map.snapshot.scroll_position(); - // let x = (scroll_position.x * max_glyph_width - delta.x) / max_glyph_width; - // let y = (scroll_position.y * line_height - delta.y) / line_height; - // let scroll_position = point(x, y).clamp(gpui::Point::::zero(), position_map.scroll_max); - // editor.scroll(scroll_position, axis, cx); + let scroll_position = position_map.snapshot.scroll_position(); + let x = f32::from((scroll_position.x * max_glyph_width - delta.x) / max_glyph_width); + let y = f32::from((scroll_position.y * line_height - delta.y) / line_height); + let scroll_position = point(x, y).clamp(&point(0., 0.), &position_map.scroll_max); + editor.scroll(scroll_position, axis, cx); - // true - // } + true + } fn paint_background( &self, @@ -951,7 +954,7 @@ impl EditorElement { ) } - cx.stack(9999, |cx| { + cx.stack(0, |cx| { for cursor in cursors { cursor.paint(content_origin, cx); } @@ -2573,6 +2576,20 @@ impl Element for EditorElement { cx: &mut gpui::ViewContext, ) { let layout = self.compute_layout(editor, cx, bounds); + + cx.on_mouse_event({ + let position_map = layout.position_map.clone(); + move |editor, event: &ScrollWheelEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::scroll(editor, event, &position_map, bounds, cx) { + cx.stop_propagation(); + } + } + }); + cx.with_content_mask(ContentMask { bounds }, |cx| { let gutter_bounds = Bounds { origin: bounds.origin, diff --git a/crates/editor2/src/scroll/actions.rs b/crates/editor2/src/scroll/actions.rs index ba39d3849bab612489d40c53a4dca0a346eefb29..5ea502c456b0c2f73f24dc05833f9864ee97f90d 100644 --- a/crates/editor2/src/scroll/actions.rs +++ b/crates/editor2/src/scroll/actions.rs @@ -1,4 +1,6 @@ -use gpui::AppContext; +use super::Axis; +use crate::Editor; +use gpui::{AppContext, Point, ViewContext}; // actions!( // editor, @@ -42,107 +44,107 @@ pub fn init(cx: &mut AppContext) { // }); } -// impl Editor { -// pub fn next_screen(&mut self, _: &NextScreen, cx: &mut ViewContext) -> Option<()> { -// if self.take_rename(true, cx).is_some() { -// return None; -// } +impl Editor { + // pub fn next_screen(&mut self, _: &NextScreen, cx: &mut ViewContext) -> Option<()> { + // if self.take_rename(true, cx).is_some() { + // return None; + // } -// if self.mouse_context_menu.read(cx).visible() { -// return None; -// } + // if self.mouse_context_menu.read(cx).visible() { + // return None; + // } -// if matches!(self.mode, EditorMode::SingleLine) { -// cx.propagate_action(); -// return None; -// } -// self.request_autoscroll(Autoscroll::Next, cx); -// Some(()) -// } + // if matches!(self.mode, EditorMode::SingleLine) { + // cx.propagate_action(); + // return None; + // } + // self.request_autoscroll(Autoscroll::Next, cx); + // Some(()) + // } -// pub fn scroll( -// &mut self, -// scroll_position: Vector2F, -// axis: Option, -// cx: &mut ViewContext, -// ) { -// self.scroll_manager.update_ongoing_scroll(axis); -// self.set_scroll_position(scroll_position, cx); -// } + pub fn scroll( + &mut self, + scroll_position: Point, + axis: Option, + cx: &mut ViewContext, + ) { + self.scroll_manager.update_ongoing_scroll(axis); + self.set_scroll_position(scroll_position, cx); + } -// fn scroll_cursor_top(editor: &mut Editor, _: &ScrollCursorTop, cx: &mut ViewContext) { -// let snapshot = editor.snapshot(cx).display_snapshot; -// let scroll_margin_rows = editor.vertical_scroll_margin() as u32; + // fn scroll_cursor_top(editor: &mut Editor, _: &ScrollCursorTop, cx: &mut ViewContext) { + // let snapshot = editor.snapshot(cx).display_snapshot; + // let scroll_margin_rows = editor.vertical_scroll_margin() as u32; -// let mut new_screen_top = editor.selections.newest_display(cx).head(); -// *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(scroll_margin_rows); -// *new_screen_top.column_mut() = 0; -// let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); -// let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + // let mut new_screen_top = editor.selections.newest_display(cx).head(); + // *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(scroll_margin_rows); + // *new_screen_top.column_mut() = 0; + // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); -// editor.set_scroll_anchor( -// ScrollAnchor { -// anchor: new_anchor, -// offset: Default::default(), -// }, -// cx, -// ) -// } + // editor.set_scroll_anchor( + // ScrollAnchor { + // anchor: new_anchor, + // offset: Default::default(), + // }, + // cx, + // ) + // } -// fn scroll_cursor_center( -// editor: &mut Editor, -// _: &ScrollCursorCenter, -// cx: &mut ViewContext, -// ) { -// let snapshot = editor.snapshot(cx).display_snapshot; -// let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { -// visible_rows as u32 -// } else { -// return; -// }; + // fn scroll_cursor_center( + // editor: &mut Editor, + // _: &ScrollCursorCenter, + // cx: &mut ViewContext, + // ) { + // let snapshot = editor.snapshot(cx).display_snapshot; + // let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { + // visible_rows as u32 + // } else { + // return; + // }; -// let mut new_screen_top = editor.selections.newest_display(cx).head(); -// *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(visible_rows / 2); -// *new_screen_top.column_mut() = 0; -// let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); -// let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + // let mut new_screen_top = editor.selections.newest_display(cx).head(); + // *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(visible_rows / 2); + // *new_screen_top.column_mut() = 0; + // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); -// editor.set_scroll_anchor( -// ScrollAnchor { -// anchor: new_anchor, -// offset: Default::default(), -// }, -// cx, -// ) -// } + // editor.set_scroll_anchor( + // ScrollAnchor { + // anchor: new_anchor, + // offset: Default::default(), + // }, + // cx, + // ) + // } -// fn scroll_cursor_bottom( -// editor: &mut Editor, -// _: &ScrollCursorBottom, -// cx: &mut ViewContext, -// ) { -// let snapshot = editor.snapshot(cx).display_snapshot; -// let scroll_margin_rows = editor.vertical_scroll_margin() as u32; -// let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { -// visible_rows as u32 -// } else { -// return; -// }; + // fn scroll_cursor_bottom( + // editor: &mut Editor, + // _: &ScrollCursorBottom, + // cx: &mut ViewContext, + // ) { + // let snapshot = editor.snapshot(cx).display_snapshot; + // let scroll_margin_rows = editor.vertical_scroll_margin() as u32; + // let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { + // visible_rows as u32 + // } else { + // return; + // }; -// let mut new_screen_top = editor.selections.newest_display(cx).head(); -// *new_screen_top.row_mut() = new_screen_top -// .row() -// .saturating_sub(visible_rows.saturating_sub(scroll_margin_rows)); -// *new_screen_top.column_mut() = 0; -// let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); -// let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + // let mut new_screen_top = editor.selections.newest_display(cx).head(); + // *new_screen_top.row_mut() = new_screen_top + // .row() + // .saturating_sub(visible_rows.saturating_sub(scroll_margin_rows)); + // *new_screen_top.column_mut() = 0; + // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); -// editor.set_scroll_anchor( -// ScrollAnchor { -// anchor: new_anchor, -// offset: Default::default(), -// }, -// cx, -// ) -// } -// } + // editor.set_scroll_anchor( + // ScrollAnchor { + // anchor: new_anchor, + // offset: Default::default(), + // }, + // cx, + // ) + // } +} diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index e26e6e2eccf0bbecc3813977cdc60dea35d5a20f..41f594ade2cdebcede44eef44f51ef108d4b9f14 100644 --- a/crates/gpui2/src/geometry.rs +++ b/crates/gpui2/src/geometry.rs @@ -120,6 +120,10 @@ where }, } } + + pub fn clamp(&self, min: &Self, max: &Self) -> Self { + self.max(min).min(max) + } } impl Clone for Point { From b0650517ad4655e657d2d3f4831ec2ec1718f3c0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 15:50:18 +0100 Subject: [PATCH 053/110] Clip text when scrolling horizontally Co-Authored-By: Julia Co-Authored-By: Piotr --- crates/editor2/src/element.rs | 550 +++++++++++++++++----------------- 1 file changed, 276 insertions(+), 274 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 3561aca657e60cdd2391cfa8f1d1208ee5d0a1c9..4d8cd57abcf8033b2eb4cb8b02d05af7593d06d8 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -777,91 +777,72 @@ impl EditorElement { let line_end_overshoot = 0.15 * layout.position_map.line_height; let whitespace_setting = editor.buffer.read(cx).settings_at(0, cx).show_whitespaces; - // todo!("cursor region") - // cx.scene().push_cursor_region(CursorRegion { - // bounds, - // style: if !editor.link_go_to_definition_state.definitions.is_empty { - // CursorStyle::PointingHand - // } else { - // CursorStyle::IBeam - // }, - // }); - - // todo!("fold ranges") - // let fold_corner_radius = - // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; - // for (id, range, color) in layout.fold_ranges.iter() { - // self.paint_highlighted_range( - // range.clone(), - // *color, - // fold_corner_radius, - // fold_corner_radius * 2., - // layout, - // content_origin, - // scroll_top, - // scroll_left, - // bounds, - // cx, - // ); - - // for bound in range_to_bounds( - // &range, - // content_origin, - // scroll_left, - // scroll_top, - // &layout.visible_display_row_range, - // line_end_overshoot, - // &layout.position_map, - // ) { - // cx.scene().push_cursor_region(CursorRegion { - // bounds: bound, - // style: CursorStyle::PointingHand, - // }); - - // let display_row = range.start.row(); - - // let buffer_row = DisplayPoint::new(display_row, 0) - // .to_point(&layout.position_map.snapshot.display_snapshot) - // .row; - - // let view_id = cx.view_id(); - // cx.scene().push_mouse_region( - // MouseRegion::new::(view_id, *id as usize, bound) - // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { - // editor.unfold_at(&UnfoldAt { buffer_row }, cx) - // }) - // .with_notify_on_hover(true) - // .with_notify_on_click(true), - // ) - // } - // } - - for (range, color) in &layout.highlighted_ranges { - self.paint_highlighted_range( - range.clone(), - *color, - Pixels::ZERO, - line_end_overshoot, - layout, - content_origin, - scroll_top, - scroll_left, - bounds, - cx, - ); - } - - let mut cursors = SmallVec::<[Cursor; 32]>::new(); - let corner_radius = 0.15 * layout.position_map.line_height; - let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); - - for (selection_style, selections) in &layout.selections { - for selection in selections { + cx.with_content_mask(ContentMask { bounds }, |cx| { + // todo!("cursor region") + // cx.scene().push_cursor_region(CursorRegion { + // bounds, + // style: if !editor.link_go_to_definition_state.definitions.is_empty { + // CursorStyle::PointingHand + // } else { + // CursorStyle::IBeam + // }, + // }); + + // todo!("fold ranges") + // let fold_corner_radius = + // self.style.folds.ellipses.corner_radius_factor * layout.position_map.line_height; + // for (id, range, color) in layout.fold_ranges.iter() { + // self.paint_highlighted_range( + // range.clone(), + // *color, + // fold_corner_radius, + // fold_corner_radius * 2., + // layout, + // content_origin, + // scroll_top, + // scroll_left, + // bounds, + // cx, + // ); + + // for bound in range_to_bounds( + // &range, + // content_origin, + // scroll_left, + // scroll_top, + // &layout.visible_display_row_range, + // line_end_overshoot, + // &layout.position_map, + // ) { + // cx.scene().push_cursor_region(CursorRegion { + // bounds: bound, + // style: CursorStyle::PointingHand, + // }); + + // let display_row = range.start.row(); + + // let buffer_row = DisplayPoint::new(display_row, 0) + // .to_point(&layout.position_map.snapshot.display_snapshot) + // .row; + + // let view_id = cx.view_id(); + // cx.scene().push_mouse_region( + // MouseRegion::new::(view_id, *id as usize, bound) + // .on_click(MouseButton::Left, move |_, editor: &mut Editor, cx| { + // editor.unfold_at(&UnfoldAt { buffer_row }, cx) + // }) + // .with_notify_on_hover(true) + // .with_notify_on_click(true), + // ) + // } + // } + + for (range, color) in &layout.highlighted_ranges { self.paint_highlighted_range( - selection.range.clone(), - selection_style.selection, - corner_radius, - corner_radius * 2., + range.clone(), + *color, + Pixels::ZERO, + line_end_overshoot, layout, content_origin, scroll_top, @@ -869,205 +850,226 @@ impl EditorElement { bounds, cx, ); + } - if selection.is_local && !selection.range.is_empty() { - invisible_display_ranges.push(selection.range.clone()); - } + let mut cursors = SmallVec::<[Cursor; 32]>::new(); + let corner_radius = 0.15 * layout.position_map.line_height; + let mut invisible_display_ranges = SmallVec::<[Range; 32]>::new(); + + for (selection_style, selections) in &layout.selections { + for selection in selections { + self.paint_highlighted_range( + selection.range.clone(), + selection_style.selection, + corner_radius, + corner_radius * 2., + layout, + content_origin, + scroll_top, + scroll_left, + bounds, + cx, + ); - if !selection.is_local || editor.show_local_cursors(cx) { - let cursor_position = selection.head; - if layout - .visible_display_row_range - .contains(&cursor_position.row()) - { - let cursor_row_layout = &layout.position_map.line_layouts - [(cursor_position.row() - start_row) as usize] - .line; - let cursor_column = cursor_position.column() as usize; - - let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); - let mut block_width = - cursor_row_layout.x_for_index(cursor_column + 1) - cursor_character_x; - if block_width == Pixels::ZERO { - block_width = layout.position_map.em_width; - } - let block_text = if let CursorShape::Block = selection.cursor_shape { - layout - .position_map - .snapshot - .chars_at(cursor_position) - .next() - .and_then(|(character, _)| { - let text = character.to_string(); - cx.text_system() - .layout_text( - &text, - cursor_row_layout.font_size, - &[TextRun { - len: text.len(), - font: self.style.text.font(), - color: self.style.background, - underline: None, - }], - None, - ) - .unwrap() - .pop() - }) - } else { - None - }; - - let x = cursor_character_x - scroll_left; - let y = cursor_position.row() as f32 * layout.position_map.line_height - - scroll_top; - if selection.is_newest { - editor.pixel_position_of_newest_cursor = Some(point( - bounds.origin.x + x + block_width / 2., - bounds.origin.y + y + layout.position_map.line_height / 2., - )); + if selection.is_local && !selection.range.is_empty() { + invisible_display_ranges.push(selection.range.clone()); + } + + if !selection.is_local || editor.show_local_cursors(cx) { + let cursor_position = selection.head; + if layout + .visible_display_row_range + .contains(&cursor_position.row()) + { + let cursor_row_layout = &layout.position_map.line_layouts + [(cursor_position.row() - start_row) as usize] + .line; + let cursor_column = cursor_position.column() as usize; + + let cursor_character_x = cursor_row_layout.x_for_index(cursor_column); + let mut block_width = cursor_row_layout.x_for_index(cursor_column + 1) + - cursor_character_x; + if block_width == Pixels::ZERO { + block_width = layout.position_map.em_width; + } + let block_text = if let CursorShape::Block = selection.cursor_shape { + layout + .position_map + .snapshot + .chars_at(cursor_position) + .next() + .and_then(|(character, _)| { + let text = character.to_string(); + cx.text_system() + .layout_text( + &text, + cursor_row_layout.font_size, + &[TextRun { + len: text.len(), + font: self.style.text.font(), + color: self.style.background, + underline: None, + }], + None, + ) + .unwrap() + .pop() + }) + } else { + None + }; + + let x = cursor_character_x - scroll_left; + let y = cursor_position.row() as f32 * layout.position_map.line_height + - scroll_top; + if selection.is_newest { + editor.pixel_position_of_newest_cursor = Some(point( + bounds.origin.x + x + block_width / 2., + bounds.origin.y + y + layout.position_map.line_height / 2., + )); + } + cursors.push(Cursor { + color: selection_style.cursor, + block_width, + origin: point(x, y), + line_height: layout.position_map.line_height, + shape: selection.cursor_shape, + block_text, + }); } - cursors.push(Cursor { - color: selection_style.cursor, - block_width, - origin: point(x, y), - line_height: layout.position_map.line_height, - shape: selection.cursor_shape, - block_text, - }); } } } - } - for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { - let row = start_row + ix as u32; - line_with_invisibles.draw( - layout, - row, - scroll_top, - content_origin, - scroll_left, - whitespace_setting, - &invisible_display_ranges, - cx, - ) - } - - cx.stack(0, |cx| { - for cursor in cursors { - cursor.paint(content_origin, cx); + for (ix, line_with_invisibles) in layout.position_map.line_layouts.iter().enumerate() { + let row = start_row + ix as u32; + line_with_invisibles.draw( + layout, + row, + scroll_top, + content_origin, + scroll_left, + whitespace_setting, + &invisible_display_ranges, + cx, + ) } - }); - // cx.scene().push_layer(Some(bounds)); - - // cx.scene().pop_layer(); - - // if let Some((position, context_menu)) = layout.context_menu.as_mut() { - // cx.scene().push_stacking_context(None, None); - // let cursor_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; - // let mut list_origin = content_origin + point(x, y); - // let list_width = context_menu.size().x; - // let list_height = context_menu.size().y; - - // // Snap the right edge of the list to the right edge of the window if - // // its horizontal bounds overflow. - // if list_origin.x + list_width > cx.window_size().x { - // list_origin.set_x((cx.window_size().x - list_width).max(0.)); - // } - - // if list_origin.y + list_height > bounds.max_y { - // list_origin - // .set_y(list_origin.y - layout.position_map.line_height - list_height); - // } - // context_menu.paint( - // list_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // cx.scene().pop_stacking_context(); - // } - - // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { - // cx.scene().push_stacking_context(None, None); - - // // This is safe because we check on layout whether the required row is available - // let hovered_row_layout = - // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; - - // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover - // // height. This is the size we will use to decide whether to render popovers above or below - // // the hovered line. - // let first_size = hover_popovers[0].size(); - // let height_to_reserve = first_size.y - // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; - - // // Compute Hovered Point - // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; - // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; - // let hovered_point = content_origin + point(x, y); - - // if hovered_point.y - height_to_reserve > 0.0 { - // // There is enough space above. Render popovers above the hovered point - // let mut current_y = hovered_point.y; - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x, current_y - size.y); - - // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x + x_out_of_bounds); - // } - - // hover_popover.paint( - // popover_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // current_y = popover_origin.y - HOVER_POPOVER_GAP; - // } - // } else { - // // There is not enough space above. Render popovers below the hovered point - // let mut current_y = hovered_point.y + layout.position_map.line_height; - // for hover_popover in hover_popovers { - // let size = hover_popover.size(); - // let mut popover_origin = point(hovered_point.x, current_y); - - // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); - // if x_out_of_bounds < 0.0 { - // popover_origin.set_x(popover_origin.x + x_out_of_bounds); - // } - - // hover_popover.paint( - // popover_origin, - // Bounds::::from_points( - // gpui::Point::::zero(), - // point(f32::MAX, f32::MAX), - // ), // Let content bleed outside of editor - // editor, - // cx, - // ); - - // current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; - // } - // } - - // cx.scene().pop_stacking_context(); - // } + cx.stack(0, |cx| { + for cursor in cursors { + cursor.paint(content_origin, cx); + } + }); + // cx.scene().push_layer(Some(bounds)); + + // cx.scene().pop_layer(); + + // if let Some((position, context_menu)) = layout.context_menu.as_mut() { + // cx.scene().push_stacking_context(None, None); + // let cursor_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + // let x = cursor_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = (position.row() + 1) as f32 * layout.position_map.line_height - scroll_top; + // let mut list_origin = content_origin + point(x, y); + // let list_width = context_menu.size().x; + // let list_height = context_menu.size().y; + + // // Snap the right edge of the list to the right edge of the window if + // // its horizontal bounds overflow. + // if list_origin.x + list_width > cx.window_size().x { + // list_origin.set_x((cx.window_size().x - list_width).max(0.)); + // } + + // if list_origin.y + list_height > bounds.max_y { + // list_origin + // .set_y(list_origin.y - layout.position_map.line_height - list_height); + // } + + // context_menu.paint( + // list_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // cx.scene().pop_stacking_context(); + // } + + // if let Some((position, hover_popovers)) = layout.hover_popovers.as_mut() { + // cx.scene().push_stacking_context(None, None); + + // // This is safe because we check on layout whether the required row is available + // let hovered_row_layout = + // &layout.position_map.line_layouts[(position.row() - start_row) as usize].line; + + // // Minimum required size: Take the first popover, and add 1.5 times the minimum popover + // // height. This is the size we will use to decide whether to render popovers above or below + // // the hovered line. + // let first_size = hover_popovers[0].size(); + // let height_to_reserve = first_size.y + // + 1.5 * MIN_POPOVER_LINE_HEIGHT as f32 * layout.position_map.line_height; + + // // Compute Hovered Point + // let x = hovered_row_layout.x_for_index(position.column() as usize) - scroll_left; + // let y = position.row() as f32 * layout.position_map.line_height - scroll_top; + // let hovered_point = content_origin + point(x, y); + + // if hovered_point.y - height_to_reserve > 0.0 { + // // There is enough space above. Render popovers above the hovered point + // let mut current_y = hovered_point.y; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y - size.y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y - HOVER_POPOVER_GAP; + // } + // } else { + // // There is not enough space above. Render popovers below the hovered point + // let mut current_y = hovered_point.y + layout.position_map.line_height; + // for hover_popover in hover_popovers { + // let size = hover_popover.size(); + // let mut popover_origin = point(hovered_point.x, current_y); + + // let x_out_of_bounds = bounds.max_x - (popover_origin.x + size.x); + // if x_out_of_bounds < 0.0 { + // popover_origin.set_x(popover_origin.x + x_out_of_bounds); + // } + + // hover_popover.paint( + // popover_origin, + // Bounds::::from_points( + // gpui::Point::::zero(), + // point(f32::MAX, f32::MAX), + // ), // Let content bleed outside of editor + // editor, + // cx, + // ); + + // current_y = popover_origin.y + size.y + HOVER_POPOVER_GAP; + // } + // } + + // cx.scene().pop_stacking_context(); + // } + }) } fn scrollbar_left(&self, bounds: &Bounds) -> Pixels { From 6f74854525db69e5ff2aaf870a9203227de76b8a Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 08:29:55 -0700 Subject: [PATCH 054/110] Fix event ordering issues --- crates/gpui2/src/elements/div.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rs index e011041bae2259f8a290ef098b061740721f4307..061ec095f8917517c38c7c4ce71d3e95ff03d7f6 100644 --- a/crates/gpui2/src/elements/div.rs +++ b/crates/gpui2/src/elements/div.rs @@ -209,15 +209,15 @@ where cx: &mut ViewContext, ) -> Self::ElementState { let mut element_state = element_state.unwrap_or_default(); - self.focus - .initialize(element_state.focus_handle.take(), cx, |focus_handle, cx| { - element_state.focus_handle = focus_handle; - self.interaction.initialize(cx, |cx| { + self.interaction.initialize(cx, |cx| { + self.focus + .initialize(element_state.focus_handle.take(), cx, |focus_handle, cx| { + element_state.focus_handle = focus_handle; for child in &mut self.children { child.initialize(view_state, cx); } }) - }); + }); element_state } From 74853ea55f8993c1dd2ed494f267d852d3b12906 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 7 Nov 2023 16:41:36 +0100 Subject: [PATCH 055/110] Rename `ThemeVariant` to `Theme` (#3252) This PR renames the `ThemeVariant` type to `Theme`. This better reflects its purpose, as well as matches the same name as we had before, which should make porting crates slightly easier. Release Notes: - N/A --- crates/editor2/src/display_map.rs | 4 ++-- crates/editor2/src/editor.rs | 4 ++-- crates/editor2/src/items.rs | 4 ++-- crates/language2/src/language2.rs | 6 +++--- crates/theme2/src/default_theme.rs | 12 +++++------ crates/theme2/src/registry.rs | 8 ++++---- crates/theme2/src/settings.rs | 4 ++-- crates/theme2/src/theme2.rs | 10 ++++----- crates/theme2/src/themes/andromeda.rs | 6 +++--- crates/theme2/src/themes/ayu.rs | 8 ++++---- crates/theme2/src/themes/dracula.rs | 4 ++-- crates/theme2/src/themes/gruvbox.rs | 14 ++++++------- crates/theme2/src/themes/night_owl.rs | 6 +++--- crates/theme2/src/themes/nord.rs | 4 ++-- crates/theme2/src/themes/notctis.rs | 24 +++++++++++----------- crates/theme2/src/themes/palenight.rs | 8 ++++---- crates/theme2/src/themes/rose_pine.rs | 8 ++++---- crates/theme2/src/themes/solarized.rs | 6 +++--- crates/theme2/src/themes/synthwave_84.rs | 4 ++-- crates/theme_importer/src/theme_printer.rs | 4 ++-- crates/theme_importer/src/vscode.rs | 8 ++++---- crates/workspace2/src/item.rs | 8 ++++---- 22 files changed, 82 insertions(+), 82 deletions(-) diff --git a/crates/editor2/src/display_map.rs b/crates/editor2/src/display_map.rs index 51f5b0a192b6a2bd96468bd496db93efbe0cfe3b..93ceb4f9df95d609953579fdac2d42332ec1aeee 100644 --- a/crates/editor2/src/display_map.rs +++ b/crates/editor2/src/display_map.rs @@ -21,7 +21,7 @@ use lsp::DiagnosticSeverity; use std::{any::TypeId, borrow::Cow, fmt::Debug, num::NonZeroU32, ops::Range, sync::Arc}; use sum_tree::{Bias, TreeMap}; use tab_map::TabMap; -use theme::ThemeVariant; +use theme::Theme; use wrap_map::WrapMap; pub use block_map::{ @@ -505,7 +505,7 @@ impl DisplaySnapshot { &'a self, display_rows: Range, language_aware: bool, - theme: &'a ThemeVariant, + theme: &'a Theme, ) -> impl Iterator> { self.chunks( display_rows, diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index be8375336c604f9ca87f390128ab01c3991b37f1..6a73b5cf3a9311a666fdd3911a66395107ca584a 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -81,7 +81,7 @@ use std::{ pub use sum_tree::Bias; use sum_tree::TreeMap; use text::Rope; -use theme::{ActiveTheme, PlayerColor, ThemeColors, ThemeSettings, ThemeVariant}; +use theme::{ActiveTheme, PlayerColor, Theme, ThemeColors, ThemeSettings}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -9962,7 +9962,7 @@ pub fn highlight_diagnostic_message( (message_without_backticks, highlights) } -pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &ThemeVariant) -> Hsla { +pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &Theme) -> Hsla { match (severity, valid) { (DiagnosticSeverity::ERROR, true) => theme.status().error, (DiagnosticSeverity::ERROR, false) => theme.status().error, diff --git a/crates/editor2/src/items.rs b/crates/editor2/src/items.rs index e0b4423f82dec1cc3f732d40743f2e534a3f3477..9c49e5f14317579eb1ca6e103c5058de97e76d40 100644 --- a/crates/editor2/src/items.rs +++ b/crates/editor2/src/items.rs @@ -27,7 +27,7 @@ use std::{ sync::Arc, }; use text::Selection; -use theme::{ActiveTheme, ThemeVariant}; +use theme::{ActiveTheme, Theme}; use util::{paths::PathExt, ResultExt, TryFutureExt}; use workspace::item::{BreadcrumbText, FollowableItemHandle}; use workspace::{ @@ -777,7 +777,7 @@ impl Item for Editor { ToolbarItemLocation::PrimaryLeft { flex: None } } - fn breadcrumbs(&self, variant: &ThemeVariant, cx: &AppContext) -> Option> { + fn breadcrumbs(&self, variant: &Theme, cx: &AppContext) -> Option> { todo!(); // let cursor = self.selections.newest_anchor().head(); // let multibuffer = &self.buffer().read(cx); diff --git a/crates/language2/src/language2.rs b/crates/language2/src/language2.rs index 826817c99a54f2034ca7867565d80c36eae2edc5..bdea440c08d3c209dfb363ec33c1ae725ffb742e 100644 --- a/crates/language2/src/language2.rs +++ b/crates/language2/src/language2.rs @@ -43,7 +43,7 @@ use std::{ }, }; use syntax_map::SyntaxSnapshot; -use theme::{SyntaxTheme, ThemeVariant}; +use theme::{SyntaxTheme, Theme}; use tree_sitter::{self, Query}; use unicase::UniCase; use util::{http::HttpClient, paths::PathExt}; @@ -643,7 +643,7 @@ struct LanguageRegistryState { next_available_language_id: AvailableLanguageId, loading_languages: HashMap>>>>, subscription: (watch::Sender<()>, watch::Receiver<()>), - theme: Option>, + theme: Option>, version: usize, reload_count: usize, } @@ -744,7 +744,7 @@ impl LanguageRegistry { self.state.read().reload_count } - pub fn set_theme(&self, theme: Arc) { + pub fn set_theme(&self, theme: Arc) { let mut state = self.state.write(); state.theme = Some(theme.clone()); for language in &state.languages { diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index d7360b6f71ecb3167d08907d87d91aff4cee3724..dacd26be3e2eb7a5c376985327d96aa7ba94f92b 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -1,10 +1,10 @@ use crate::{ colors::{GitStatusColors, PlayerColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, - default_color_scales, Appearance, SyntaxTheme, ThemeFamily, ThemeVariant, + default_color_scales, Appearance, SyntaxTheme, Theme, ThemeFamily, }; -fn zed_pro_daylight() -> ThemeVariant { - ThemeVariant { +fn zed_pro_daylight() -> Theme { + Theme { id: "zed_pro_daylight".to_string(), name: "Zed Pro Daylight".into(), appearance: Appearance::Light, @@ -19,8 +19,8 @@ fn zed_pro_daylight() -> ThemeVariant { } } -pub(crate) fn zed_pro_moonlight() -> ThemeVariant { - ThemeVariant { +pub(crate) fn zed_pro_moonlight() -> Theme { + Theme { id: "zed_pro_moonlight".to_string(), name: "Zed Pro Moonlight".into(), appearance: Appearance::Dark, @@ -51,7 +51,7 @@ impl Default for ThemeFamily { } } -impl Default for ThemeVariant { +impl Default for Theme { fn default() -> Self { zed_pro_daylight() } diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index 98797e2cad573d1c11ae4d2e0c8a6baadcf475fb..45ba75941c47b5ae8c21c913c21d4bb77493e3b1 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -1,10 +1,10 @@ -use crate::{zed_pro_family, ThemeFamily, ThemeVariant}; +use crate::{zed_pro_family, Theme, ThemeFamily}; use anyhow::{anyhow, Result}; use gpui::SharedString; use std::{collections::HashMap, sync::Arc}; pub struct ThemeRegistry { - themes: HashMap>, + themes: HashMap>, } impl ThemeRegistry { @@ -14,7 +14,7 @@ impl ThemeRegistry { } } - fn insert_themes(&mut self, themes: impl IntoIterator) { + fn insert_themes(&mut self, themes: impl IntoIterator) { for theme in themes.into_iter() { self.themes.insert(theme.name.clone(), Arc::new(theme)); } @@ -28,7 +28,7 @@ impl ThemeRegistry { self.themes.values().map(|theme| theme.name.clone()) } - pub fn get(&self, name: &str) -> Result> { + pub fn get(&self, name: &str) -> Result> { self.themes .get(name) .ok_or_else(|| anyhow!("theme not found: {}", name)) diff --git a/crates/theme2/src/settings.rs b/crates/theme2/src/settings.rs index 5e8f9de873a09ea3d2681f3ff7e787f45be6f6be..c57576840119e42e42e3f305cd0dd4fc5463cf81 100644 --- a/crates/theme2/src/settings.rs +++ b/crates/theme2/src/settings.rs @@ -1,4 +1,4 @@ -use crate::{ThemeRegistry, ThemeVariant}; +use crate::{Theme, ThemeRegistry}; use anyhow::Result; use gpui::{px, AppContext, Font, FontFeatures, FontStyle, FontWeight, Pixels}; use schemars::{ @@ -21,7 +21,7 @@ pub struct ThemeSettings { pub buffer_font: Font, pub buffer_font_size: Pixels, pub buffer_line_height: BufferLineHeight, - pub active_theme: Arc, + pub active_theme: Arc, } #[derive(Default)] diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 40e782c61790ba90c9b4d12ae731e3a0de570dbd..99ac40a9665206022ea14d14819adafa4c710b1b 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -33,11 +33,11 @@ pub fn init(cx: &mut AppContext) { } pub trait ActiveTheme { - fn theme(&self) -> &Arc; + fn theme(&self) -> &Arc; } impl ActiveTheme for AppContext { - fn theme(&self) -> &Arc { + fn theme(&self) -> &Arc { &ThemeSettings::get_global(self).active_theme } } @@ -46,20 +46,20 @@ pub struct ThemeFamily { pub id: String, pub name: SharedString, pub author: SharedString, - pub themes: Vec, + pub themes: Vec, pub scales: ColorScales, } impl ThemeFamily {} -pub struct ThemeVariant { +pub struct Theme { pub id: String, pub name: SharedString, pub appearance: Appearance, pub styles: ThemeStyles, } -impl ThemeVariant { +impl Theme { /// Returns the [`ThemeColors`] for the theme. #[inline(always)] pub fn players(&self) -> &PlayerColors { diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index b0400a8c4b584999b07ce6965c0f1fa5b5c1b395..10e546aea8b333cb48e31891e5c58044938a477b 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn andromeda() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn andromeda() -> ThemeFamily { name: "Andromeda".into(), author: "Eliver Lara (EliverLara)".into(), themes: vec![ - ThemeVariant { + Theme { id: "3bfb3b6e-365a-4cd2-9a80-2d2c81434729".into(), name: "Andromeda".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn andromeda() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "7bc92ac8-152c-46d5-b346-df68e4db2e7c".into(), name: "Andromeda Bordered".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index a2c054ac28db9f717b6ebba9df8518560d1b28fc..c3503e23c73ca376dbe4f8b99c065517291aba2e 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn ayu() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn ayu() -> ThemeFamily { name: "Ayu".into(), author: "dempfi (Ike Ku)".into(), themes: vec![ - ThemeVariant { + Theme { id: "733aeb9b-98fd-4492-984e-d71540daf72e".into(), name: "Ayu Light".into(), appearance: Appearance::Light, @@ -178,7 +178,7 @@ pub fn ayu() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "50f68427-2e1d-4bf1-981a-d08c6b38e846".into(), name: "Ayu Mirage".into(), appearance: Appearance::Dark, @@ -345,7 +345,7 @@ pub fn ayu() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "22d8dede-57da-46e1-946a-16876679b4d2".into(), name: "Ayu Dark".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index 7318057c53aef8d098621f7520ee0e8e2e4cf578..d7648c8ffe6cfaa4435129d161ca60fdfbb68799 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn dracula() -> ThemeFamily { @@ -10,7 +10,7 @@ pub fn dracula() -> ThemeFamily { id: "0abb0e55-f034-45d9-a84d-e880dfd65711".into(), name: "Dracula".into(), author: "Zeno Rocha".into(), - themes: vec![ThemeVariant { + themes: vec![Theme { id: "d20497ef-85be-4ea2-9070-a182d03aac73".into(), name: "Dracula".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index 756a0b658be61dfaec2241dc3ce103f5a1d27082..dc276f88f2b5f5e0ff28f84ecada5025887bbe19 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn gruvbox() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn gruvbox() -> ThemeFamily { name: "Gruvbox".into(), author: "morhetz".into(), themes: vec![ - ThemeVariant { + Theme { id: "0db938b2-2267-453b-af84-f82c5f3400e7".into(), name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "8e1a1896-ed0f-40be-b127-6c389eacc9f1".into(), name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, @@ -345,7 +345,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "94410e6f-f4c4-4669-bb4d-5a20b4e4b1f3".into(), name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, @@ -512,7 +512,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "e4a58582-478a-4934-ad73-135e23a0d66e".into(), name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, @@ -679,7 +679,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "0e875280-93fa-4c76-8874-f858c7d985c1".into(), name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, @@ -846,7 +846,7 @@ pub fn gruvbox() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "914dbe6f-bc0f-4e6f-8d8c-5f4cabc1ca2d".into(), name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rs index ed727127bdee22a1d3cd6162f0bbcfe58e331bb5..7fab35f1c16cb5818f4cc5de25e5cb7540d89907 100644 --- a/crates/theme2/src/themes/night_owl.rs +++ b/crates/theme2/src/themes/night_owl.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn night_owl() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn night_owl() -> ThemeFamily { name: "Night Owl".into(), author: "Sarah Drasner (sdras)".into(), themes: vec![ - ThemeVariant { + Theme { id: "e5de91ed-fc95-46fb-a60b-ebd0602d04c7".into(), name: "Night Owl".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn night_owl() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "998fc053-40c1-4a32-a31f-a17c9c07949a".into(), name: "Night Owl Light".into(), appearance: Appearance::Light, diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index 25e6da2c5e8440b9cbc5a3b4ce8d5d32f1184f3c..4b1e30870c205848d93d0cc31a7f09d51c7a2835 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn nord() -> ThemeFamily { @@ -10,7 +10,7 @@ pub fn nord() -> ThemeFamily { id: "3295b94b-731f-41a8-8d5e-ad02638f8e0d".into(), name: "Nord".into(), author: "Sven Greb (svengreb)".into(), - themes: vec![ThemeVariant { + themes: vec![Theme { id: "dfdfd9f6-bc57-46dd-b919-42b18df35bdd".into(), name: "Nord".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index 70c57bac57bd2cb9144bf33c32f07ba8a1cf2ac6..4ec66ec09437ca82b9b08556dfad2bb7f4101e57 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn notctis() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn notctis() -> ThemeFamily { name: "Notctis".into(), author: "Liviu Schera (liviuschera)".into(), themes: vec![ - ThemeVariant { + Theme { id: "2dc5fee8-30ff-4a50-bfae-c13bd19c9f89".into(), name: "Noctis Azureus".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "ba4f5a34-987a-4e2c-939c-7f1b02d0e432".into(), name: "Noctis Bordo".into(), appearance: Appearance::Dark, @@ -345,7 +345,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "a2e4f327-82e8-41c1-a66f-bc7f27419c2e".into(), name: "Noctus Hibernus".into(), appearance: Appearance::Light, @@ -512,7 +512,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "2fde44fb-e5b2-4cc2-962f-f1c77a4eb12a".into(), name: "Noctis Lilac".into(), appearance: Appearance::Dark, @@ -679,7 +679,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "2b89f218-c238-4905-9578-674d6995d2e0".into(), name: "Noctis Lux".into(), appearance: Appearance::Light, @@ -846,7 +846,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "f88e2cd7-2415-4118-a638-5cfd3132ecf8".into(), name: "Noctis Minimus".into(), appearance: Appearance::Dark, @@ -1013,7 +1013,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "c4d43fc2-6166-47b7-8c5c-dd24afd4b735".into(), name: "Noctis".into(), appearance: Appearance::Dark, @@ -1180,7 +1180,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "7253a515-c612-403c-89de-5b62dc5cbac7".into(), name: "Noctis Obscuro".into(), appearance: Appearance::Dark, @@ -1347,7 +1347,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "b0f2d7b8-ac5f-466f-9bbf-e7cac242149c".into(), name: "Noctis Sereno".into(), appearance: Appearance::Dark, @@ -1514,7 +1514,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "331ce3fd-8faf-4a46-ad89-2c678abc4cd3".into(), name: "Noctis Uva".into(), appearance: Appearance::Dark, @@ -1681,7 +1681,7 @@ pub fn notctis() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "209964f1-6a61-4e40-a605-be245555c493".into(), name: "Noctis Viola".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs index 8ad0a86eb86dd156d40fdeab8f114ee523d89917..bd8f9bb560a41738ab3cbf8a87e1435ac6fa24a2 100644 --- a/crates/theme2/src/themes/palenight.rs +++ b/crates/theme2/src/themes/palenight.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn palenight() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn palenight() -> ThemeFamily { name: "Palenight".into(), author: "Olaolu Olawuyi (whizkydee)".into(), themes: vec![ - ThemeVariant { + Theme { id: "39fdf216-2c76-4b3d-b368-7c31f479d524".into(), name: "Palenight".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn palenight() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "5ff8120f-37e9-4ad3-8bd0-c3e449ff1aa1".into(), name: "Palenight Operator".into(), appearance: Appearance::Dark, @@ -345,7 +345,7 @@ pub fn palenight() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "cff26efb-72f8-4496-b33b-991080a47f1c".into(), name: "Palenight (Mild Contrast)".into(), appearance: Appearance::Dark, diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index d022d645cf3798259877d648021446bc3cdb9d9c..4c551e4ad7765c6b301da5066e4e07d290856821 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn rose_pine() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn rose_pine() -> ThemeFamily { name: "Rose Pine".into(), author: "Rosé Pine".into(), themes: vec![ - ThemeVariant { + Theme { id: "80a8f5dd-2ab5-4ee7-9b25-a60c8513234e".into(), name: "Rose Pine".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn rose_pine() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "fe9e3c9e-954e-4f8e-849e-451ba5f6ceca".into(), name: "Rose Moon".into(), appearance: Appearance::Dark, @@ -345,7 +345,7 @@ pub fn rose_pine() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "00cc7f69-9658-443e-b643-1c8dbffa047d".into(), name: "Rose Pine Dawn".into(), appearance: Appearance::Light, diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index cca669479a406c02ceefeedd187e0416e7290fae..4198553337753179c7f42fec6e248b14fb4f18c6 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn solarized() -> ThemeFamily { @@ -11,7 +11,7 @@ pub fn solarized() -> ThemeFamily { name: "Solarized".into(), author: "Ethan Schoonover (altercation)".into(), themes: vec![ - ThemeVariant { + Theme { id: "265f93c5-c8e7-4962-b083-8550f4b5c2ff".into(), name: "Solarized Dark".into(), appearance: Appearance::Dark, @@ -178,7 +178,7 @@ pub fn solarized() -> ThemeFamily { }, }, }, - ThemeVariant { + Theme { id: "40e2070d-5846-4182-9dc9-bf56badf019f".into(), name: "Solarized Light".into(), appearance: Appearance::Light, diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs index 8920037253c510a526c12b278b0f54de5b35fe6f..78e71133658bc7e35821856b6385badaf478130a 100644 --- a/crates/theme2/src/themes/synthwave_84.rs +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -2,7 +2,7 @@ use gpui::rgba; use crate::{ default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; pub fn synthwave_84() -> ThemeFamily { @@ -10,7 +10,7 @@ pub fn synthwave_84() -> ThemeFamily { id: "161a14a0-533c-4df1-b909-2bac37ac807d".into(), name: "Synthwave 84".into(), author: "Robb Owen (robb0wen)".into(), - themes: vec![ThemeVariant { + themes: vec![Theme { id: "7a7102b7-8778-4c24-ba79-7407857b4f8c".into(), name: "Synthwave 84".into(), appearance: Appearance::Dark, diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index f638694be8dea07a76ee797a672244d62fd427f0..017893f400698cc5e3b6f2f05a9dbd5a1e112dac 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -3,7 +3,7 @@ use std::fmt::{self, Debug}; use gpui::{Hsla, Rgba}; use theme::{ Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, }; struct RawSyntaxPrinter<'a>(&'a str); @@ -68,7 +68,7 @@ impl Debug for ThemeFamilyPrinter { } } -pub struct ThemeVariantPrinter<'a>(&'a ThemeVariant); +pub struct ThemeVariantPrinter<'a>(&'a Theme); impl<'a> Debug for ThemeVariantPrinter<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index f63766b6a50c8e8db957e0e4b0a833c5f7e9c1e6..436c73b3d4053158c678883bfa3a4dc914016e16 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -2,8 +2,8 @@ use anyhow::Result; use gpui::{Hsla, Refineable, Rgba}; use serde::Deserialize; use theme::{ - Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, - ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant, + Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme, + ThemeColors, ThemeColorsRefinement, ThemeStyles, }; use crate::util::Traverse; @@ -433,7 +433,7 @@ impl VsCodeThemeConverter { } } - pub fn convert(self) -> Result { + pub fn convert(self) -> Result { let appearance = self.theme_metadata.appearance.into(); let mut theme_colors = match appearance { @@ -569,7 +569,7 @@ impl VsCodeThemeConverter { theme_colors.refine(&theme_colors_refinements); - Ok(ThemeVariant { + Ok(Theme { id: uuid::Uuid::new_v4().to_string(), name: self.theme_metadata.name.into(), appearance, diff --git a/crates/workspace2/src/item.rs b/crates/workspace2/src/item.rs index e933f373d4a06987ac788c47c0d5120f80b88629..1a7f30646d7ca3bc49520c65e284eaafbe6a92ef 100644 --- a/crates/workspace2/src/item.rs +++ b/crates/workspace2/src/item.rs @@ -32,7 +32,7 @@ use std::{ }, time::Duration, }; -use theme2::ThemeVariant; +use theme2::Theme; #[derive(Deserialize)] pub struct ItemSettings { @@ -184,7 +184,7 @@ pub trait Item: Render + EventEmitter { ToolbarItemLocation::Hidden } - fn breadcrumbs(&self, _theme: &ThemeVariant, _cx: &AppContext) -> Option> { + fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option> { None } @@ -270,7 +270,7 @@ pub trait ItemHandle: 'static + Send { ) -> gpui::Subscription; fn to_searchable_item_handle(&self, cx: &AppContext) -> Option>; fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation; - fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option>; + fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option>; fn serialized_item_kind(&self) -> Option<&'static str>; fn show_toolbar(&self, cx: &AppContext) -> bool; fn pixel_position_of_cursor(&self, cx: &AppContext) -> Option>; @@ -603,7 +603,7 @@ impl ItemHandle for View { self.read(cx).breadcrumb_location() } - fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option> { + fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option> { self.read(cx).breadcrumbs(theme, cx) } From a2a28af052a566090acc861caf0fa0bc93e138cf Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 6 Nov 2023 15:35:49 -0700 Subject: [PATCH 056/110] Add Modals P.S. this is all completely different now Co-Authored-By: Marshall Co-Authored-By: Julia --- Cargo.lock | 18 +++ Cargo.toml | 1 + crates/editor2/src/scroll.rs | 10 +- crates/go_to_line2/Cargo.toml | 25 +++ crates/go_to_line2/src/go_to_line.rs | 224 +++++++++++++++++++++++++++ crates/gpui2/src/window.rs | 4 +- crates/workspace2/src/modal_layer.rs | 121 +++++++++++++++ crates/workspace2/src/workspace2.rs | 94 ++--------- crates/zed2/Cargo.toml | 2 +- crates/zed2/src/main.rs | 23 +-- 10 files changed, 420 insertions(+), 102 deletions(-) create mode 100644 crates/go_to_line2/Cargo.toml create mode 100644 crates/go_to_line2/src/go_to_line.rs create mode 100644 crates/workspace2/src/modal_layer.rs diff --git a/Cargo.lock b/Cargo.lock index a110aef25cb8bb2cee03ac0922bc6e699ae3d400..aefa1d1260c0a67ed1eb910d1c693c282cbfeee9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3529,6 +3529,23 @@ dependencies = [ "workspace", ] +[[package]] +name = "go_to_line2" +version = "0.1.0" +dependencies = [ + "editor2", + "gpui2", + "menu2", + "postage", + "serde", + "settings2", + "text2", + "theme2", + "ui2", + "util", + "workspace2", +] + [[package]] name = "gpui" version = "0.1.0" @@ -11223,6 +11240,7 @@ dependencies = [ "fsevent", "futures 0.3.28", "fuzzy", + "go_to_line2", "gpui2", "ignore", "image", diff --git a/Cargo.toml b/Cargo.toml index 268399ad3f116282bf567b48f2bda5fffa512df5..01d6c50643642cd49e702b3c7b5237323e31b37f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ members = [ "crates/fuzzy2", "crates/git", "crates/go_to_line", + "crates/go_to_line2", "crates/gpui", "crates/gpui_macros", "crates/gpui2", diff --git a/crates/editor2/src/scroll.rs b/crates/editor2/src/scroll.rs index 1876952ae2fa773dcd03277cfdff85d3ffd0d9e9..d5aeb853bbf7a1210387b8c7c9184d4a2f43192c 100644 --- a/crates/editor2/src/scroll.rs +++ b/crates/editor2/src/scroll.rs @@ -349,10 +349,12 @@ impl Editor { self.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx); } - // pub fn scroll_position(&self, cx: &mut ViewContext) -> gpui::Point { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // self.scroll_manager.anchor.scroll_position(&display_map) - // } + pub fn scroll_position(&self, cx: &mut ViewContext) -> gpui::Point { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + // todo!() Should `self.scroll_manager.anchor.scroll_position()` return `Pixels`? + // self.scroll_manager.anchor.scroll_position(&display_map) + todo!() + } pub fn set_scroll_anchor(&mut self, scroll_anchor: ScrollAnchor, cx: &mut ViewContext) { hide_hover(self, cx); diff --git a/crates/go_to_line2/Cargo.toml b/crates/go_to_line2/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..66fb3b68ff2b6c6bcb6bbb231717ae5b208ccc44 --- /dev/null +++ b/crates/go_to_line2/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "go_to_line2" +version = "0.1.0" +edition = "2021" +publish = false + +[lib] +path = "src/go_to_line.rs" +doctest = false + +[dependencies] +editor = { package = "editor2", path = "../editor2" } +gpui = { package = "gpui2", path = "../gpui2" } +menu = { package = "menu2", path = "../menu2" } +serde.workspace = true +settings = { package = "settings2", path = "../settings2" } +text = { package = "text2", path = "../text2" } +workspace = { package = "workspace2", path = "../workspace2" } +postage.workspace = true +theme = { package = "theme2", path = "../theme2" } +ui = { package = "ui2", path = "../ui2" } +util = { path = "../util" } + +[dev-dependencies] +editor = { package = "editor2", path = "../editor2", features = ["test-support"] } diff --git a/crates/go_to_line2/src/go_to_line.rs b/crates/go_to_line2/src/go_to_line.rs new file mode 100644 index 0000000000000000000000000000000000000000..764602c98603595a350826325efe8a05bd3817f5 --- /dev/null +++ b/crates/go_to_line2/src/go_to_line.rs @@ -0,0 +1,224 @@ +use gpui::{div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext}; +use serde::Deserialize; +use workspace::ModalRegistry; + +// actions!(go_to_line, [Toggle]); +#[derive(Clone, Default, PartialEq, Deserialize)] +struct Toggle; + +pub fn init(cx: &mut AppContext) { + cx.global_mut::() + .register_modal(Toggle, |_, cx| { + // if let Some(editor) = workspace + // .active_item(cx) + // .and_then(|active_item| active_item.downcast::()) + // { + // cx.build_view(|cx| GoToLine::new(editor, cx)) + // } + let view = cx.build_view(|_| GoToLine); + view + }); + + // cx.add_action(GoToLine::toggle); + // cx.add_action(GoToLine::confirm); + // cx.add_action(GoToLine::cancel); +} + +pub struct GoToLine; + +impl Render for GoToLine { + type Element = Div; + + fn render(&mut self, _cx: &mut ViewContext) -> Self::Element { + dbg!("rendering GoToLine"); + div().bg(red()).w(px(100.0)).h(px(100.0)) + } +} + +// pub struct GoToLine { +// //line_editor: View, +// active_editor: View, +// prev_scroll_position: Option>, +// cursor_point: Point, +// max_point: Point, +// has_focus: bool, +// } + +// pub enum Event { +// Dismissed, +// } + +// impl GoToLine { +// pub fn new(active_editor: View, cx: &mut ViewContext) -> Self { +// // let line_editor = cx.build_view(|cx| { +// // Editor::single_line( +// // Some(Arc::new(|theme| theme.picker.input_editor.clone())), +// // cx, +// // ) +// // }); +// // cx.subscribe(&line_editor, Self::on_line_editor_event) +// // .detach(); + +// let (scroll_position, cursor_point, max_point) = active_editor.update(cx, |editor, cx| { +// let scroll_position = editor.scroll_position(cx); +// let buffer = editor.buffer().read(cx).snapshot(cx); +// ( +// Some(scroll_position), +// editor.selections.newest(cx).head(), +// buffer.max_point(), +// ) +// }); + +// cx.on_release(|_, on_release| {}).detach(); + +// Self { +// //line_editor, +// active_editor, +// prev_scroll_position: scroll_position, +// cursor_point, +// max_point, +// has_focus: false, +// } +// } + +// fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext) { +// cx.emit(Event::Dismissed); +// } + +// fn confirm(&mut self, _: &Confirm, cx: &mut ViewContext) { +// self.prev_scroll_position.take(); +// if let Some(point) = self.point_from_query(cx) { +// self.active_editor.update(cx, |active_editor, cx| { +// let snapshot = active_editor.snapshot(cx).display_snapshot; +// let point = snapshot.buffer_snapshot.clip_point(point, Bias::Left); +// active_editor.change_selections(Some(Autoscroll::center()), cx, |s| { +// s.select_ranges([point..point]) +// }); +// }); +// } + +// cx.emit(Event::Dismissed); +// } + +// fn on_line_editor_event( +// &mut self, +// _: View, +// event: &editor::Event, +// cx: &mut ViewContext, +// ) { +// match event { +// editor::Event::Blurred => cx.emit(Event::Dismissed), +// editor::Event::BufferEdited { .. } => { +// if let Some(point) = self.point_from_query(cx) { +// // todo!() +// // self.active_editor.update(cx, |active_editor, cx| { +// // let snapshot = active_editor.snapshot(cx).display_snapshot; +// // let point = snapshot.buffer_snapshot.clip_point(point, Bias::Left); +// // let display_point = point.to_display_point(&snapshot); +// // let row = display_point.row(); +// // active_editor.highlight_rows(Some(row..row + 1)); +// // active_editor.request_autoscroll(Autoscroll::center(), cx); +// // }); +// cx.notify(); +// } +// } +// _ => {} +// } +// } + +// fn point_from_query(&self, cx: &ViewContext) -> Option { +// return None; +// // todo!() +// // let line_editor = self.line_editor.read(cx).text(cx); +// // let mut components = line_editor +// // .splitn(2, FILE_ROW_COLUMN_DELIMITER) +// // .map(str::trim) +// // .fuse(); +// // let row = components.next().and_then(|row| row.parse::().ok())?; +// // let column = components.next().and_then(|col| col.parse::().ok()); +// // Some(Point::new( +// // row.saturating_sub(1), +// // column.unwrap_or(0).saturating_sub(1), +// // )) +// } +// } + +// impl EventEmitter for GoToLine { +// type Event = Event; +// } + +// impl Entity for GoToLine { +// fn release(&mut self, cx: &mut AppContext) { +// let scroll_position = self.prev_scroll_position.take(); +// self.active_editor.window().update(cx, |cx| { +// self.active_editor.update(cx, |editor, cx| { +// editor.highlight_rows(None); +// if let Some(scroll_position) = scroll_position { +// editor.set_scroll_position(scroll_position, cx); +// } +// }) +// }); +// } +// } + +// impl Render for GoToLine { +// type Element = Div; + +// fn render(&mut self, cx: &mut ViewContext) -> Self::Element { +// // todo!() +// div() +// } +// } + +// impl View for GoToLine { +// fn ui_name() -> &'static str { +// "GoToLine" +// } + +// fn render(&mut self, cx: &mut ViewContext) -> AnyElement { +// let theme = &theme::current(cx).picker; + +// let label = format!( +// "{}{FILE_ROW_COLUMN_DELIMITER}{} of {} lines", +// self.cursor_point.row + 1, +// self.cursor_point.column + 1, +// self.max_point.row + 1 +// ); + +// Flex::new(Axis::Vertical) +// .with_child( +// ChildView::new(&self.line_editor, cx) +// .contained() +// .with_style(theme.input_editor.container), +// ) +// .with_child( +// Label::new(label, theme.no_matches.label.clone()) +// .contained() +// .with_style(theme.no_matches.container), +// ) +// .contained() +// .with_style(theme.container) +// .constrained() +// .with_max_width(500.0) +// .into_any_named("go to line") +// } + +// fn focus_in(&mut self, _: AnyView, cx: &mut ViewContext) { +// self.has_focus = true; +// cx.focus(&self.line_editor); +// } + +// fn focus_out(&mut self, _: AnyView, _: &mut ViewContext) { +// self.has_focus = false; +// } +// } + +// impl Modal for GoToLine { +// fn has_focus(&self) -> bool { +// self.has_focus +// } + +// fn dismiss_on_event(event: &Self::Event) -> bool { +// matches!(event, Event::Dismissed) +// } +// } diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index d7ee86e1c15951c5fb4daaf27cea5ca42a4f55d2..a98948fc966f1416becb8a239a382219bb5508b8 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -2035,9 +2035,9 @@ impl Context for ViewContext<'_, V> { impl VisualContext for ViewContext<'_, V> { fn build_view( &mut self, - build_view: impl FnOnce(&mut ViewContext<'_, W>) -> W, + build_view_state: impl FnOnce(&mut ViewContext<'_, W>) -> W, ) -> Self::Result> { - self.window_cx.build_view(build_view) + self.window_cx.build_view(build_view_state) } fn update_view( diff --git a/crates/workspace2/src/modal_layer.rs b/crates/workspace2/src/modal_layer.rs new file mode 100644 index 0000000000000000000000000000000000000000..e7cee53b2b368ab9cc1e9218b26d378913b7ac4e --- /dev/null +++ b/crates/workspace2/src/modal_layer.rs @@ -0,0 +1,121 @@ +use std::{any::TypeId, sync::Arc}; + +use gpui::{ + div, AnyView, AppContext, Component, DispatchPhase, Div, ParentElement, Render, + StatelessInteractive, View, ViewContext, +}; + +use crate::Workspace; + +pub struct ModalRegistry { + registered_modals: Vec<(TypeId, Box) -> Div>)>, +} + +pub trait Modal {} + +#[derive(Clone)] +pub struct ModalLayer { + open_modal: Option, +} + +pub fn init_modal_registry(cx: &mut AppContext) { + cx.set_global(ModalRegistry { + registered_modals: Vec::new(), + }); +} + +struct ToggleModal { + name: String, +} + +// complete change of plan? +// on_action(ToggleModal{ name}) +// register_modal(name, |workspace, cx| { ... }) + +impl ModalRegistry { + pub fn register_modal(&mut self, action: A, build_view: B) + where + V: Render, + B: Fn(&Workspace, &mut ViewContext) -> View + 'static, + { + let build_view = Arc::new(build_view); + + dbg!("yonder"); + self.registered_modals.push(( + TypeId::of::(), + Box::new(move |mut div| { + let build_view = build_view.clone(); + dbg!("this point"); + + div.on_action( + move |workspace: &mut Workspace, + event: &A, + phase: DispatchPhase, + cx: &mut ViewContext| { + dbg!("GOT HERE"); + if phase == DispatchPhase::Capture { + return; + } + + let new_modal = (build_view)(workspace, cx); + workspace.modal_layer.update(cx, |modal_layer, _| { + modal_layer.open_modal = Some(new_modal.into()); + }); + + cx.notify(); + }, + ) + }), + )); + } +} + +impl ModalLayer { + pub fn new() -> Self { + Self { open_modal: None } + } + + pub fn render(&self, cx: &ViewContext) -> impl Component { + dbg!("rendering ModalLayer"); + + let mut div = div(); + + // div, c workspace.toggle_modal()div.on_action()) { + // + // } + + // for (type_id, action) in cx.global::().registered_modals.iter() { + // div = div.useful_on_action(*type_id, action) + // } + + for (_, action) in cx.global::().registered_modals.iter() { + div = (action)(div); + } + + div.children(self.open_modal.clone()) + } +} + +// impl Render for ModalLayer { +// type Element = Div; + +// fn render(&mut self, cx: &mut ViewContext) -> Self::Element { +// let mut div = div(); +// for (type_id, build_view) in cx.global::().registered_modals { +// div = div.useful_on_action( +// type_id, +// Box::new(|this, _: dyn Any, phase, cx: &mut ViewContext| { +// if phase == DispatchPhase::Capture { +// return; +// } +// self.workspace.update(cx, |workspace, cx| { +// self.open_modal = Some(build_view(workspace, cx)); +// }); +// cx.notify(); +// }), +// ) +// } + +// div +// } +// } diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index 7561c903d3bf05c5664632015c80350a8f897626..6b8077cd38d88e5bb464535d5b138147422225ab 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -10,6 +10,7 @@ mod persistence; pub mod searchable; // todo!() // pub mod shared_screen; +mod modal_layer; mod status_bar; mod toolbar; mod workspace_settings; @@ -45,6 +46,8 @@ use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ItemSettings, use itertools::Itertools; use language2::LanguageRegistry; use lazy_static::lazy_static; +pub use modal_layer::ModalRegistry; +use modal_layer::{init_modal_registry, ModalLayer}; use node_runtime::NodeRuntime; use notifications::{simple_message_notification::MessageNotification, NotificationHandle}; pub use pane::*; @@ -81,26 +84,6 @@ lazy_static! { .and_then(parse_pixel_position_env_var); } -// pub trait Modal: View { -// fn has_focus(&self) -> bool; -// fn dismiss_on_event(event: &Self::Event) -> bool; -// } - -// trait ModalHandle { -// fn as_any(&self) -> &AnyViewHandle; -// fn has_focus(&self, cx: &WindowContext) -> bool; -// } - -// impl ModalHandle for View { -// fn as_any(&self) -> &AnyViewHandle { -// self -// } - -// fn has_focus(&self, cx: &WindowContext) -> bool { -// self.read(cx).has_focus() -// } -// } - // #[derive(Clone, PartialEq)] // pub struct RemoveWorktreeFromProject(pub WorktreeId); @@ -243,6 +226,7 @@ pub fn init_settings(cx: &mut AppContext) { pub fn init(app_state: Arc, cx: &mut AppContext) { init_settings(cx); + init_modal_registry(cx); pane::init(cx); notifications::init(cx); @@ -550,7 +534,6 @@ pub enum Event { pub struct Workspace { weak_self: WeakView, focus_handle: FocusHandle, - // modal: Option, zoomed: Option, zoomed_position: Option, center: PaneGroup, @@ -563,6 +546,7 @@ pub struct Workspace { last_active_center_pane: Option>, last_active_view_id: Option, status_bar: View, + modal_layer: View, // titlebar_item: Option, notifications: Vec<(TypeId, usize, Box)>, project: Model, @@ -580,11 +564,6 @@ pub struct Workspace { pane_history_timestamp: Arc, } -// struct ActiveModal { -// view: Box, -// previously_focused_view_id: Option, -// } - #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub struct ViewId { pub creator: PeerId, @@ -718,6 +697,8 @@ impl Workspace { status_bar }); + let modal_layer = cx.build_view(|cx| ModalLayer::new()); + // todo!() // cx.update_default_global::, _, _>(|drag_and_drop, _| { // drag_and_drop.register_container(weak_handle.clone()); @@ -769,7 +750,6 @@ impl Workspace { Workspace { weak_self: weak_handle.clone(), focus_handle: cx.focus_handle(), - // modal: None, zoomed: None, zoomed_position: None, center: PaneGroup::new(center_pane.clone()), @@ -779,6 +759,7 @@ impl Workspace { last_active_center_pane: Some(center_pane.downgrade()), last_active_view_id: None, status_bar, + modal_layer, // titlebar_item: None, notifications: Default::default(), left_dock, @@ -1620,63 +1601,6 @@ impl Workspace { }) } - // /// Returns the modal that was toggled closed if it was open. - // pub fn toggle_modal( - // &mut self, - // cx: &mut ViewContext, - // build_view: F, - // ) -> Option> - // where - // V: 'static + Modal, - // F: FnOnce(&mut Self, &mut ViewContext) -> View, - // { - // cx.notify(); - // // Whatever modal was visible is getting clobbered. If its the same type as V, then return - // // it. Otherwise, create a new modal and set it as active. - // if let Some(already_open_modal) = self - // .dismiss_modal(cx) - // .and_then(|modal| modal.downcast::()) - // { - // cx.focus_self(); - // Some(already_open_modal) - // } else { - // let modal = build_view(self, cx); - // cx.subscribe(&modal, |this, _, event, cx| { - // if V::dismiss_on_event(event) { - // this.dismiss_modal(cx); - // } - // }) - // .detach(); - // let previously_focused_view_id = cx.focused_view_id(); - // cx.focus(&modal); - // self.modal = Some(ActiveModal { - // view: Box::new(modal), - // previously_focused_view_id, - // }); - // None - // } - // } - - // pub fn modal(&self) -> Option> { - // self.modal - // .as_ref() - // .and_then(|modal| modal.view.as_any().clone().downcast::()) - // } - - // pub fn dismiss_modal(&mut self, cx: &mut ViewContext) -> Option { - // if let Some(modal) = self.modal.take() { - // if let Some(previously_focused_view_id) = modal.previously_focused_view_id { - // if modal.view.has_focus(cx) { - // cx.window_context().focus(Some(previously_focused_view_id)); - // } - // } - // cx.notify(); - // Some(modal.view.as_any().clone()) - // } else { - // None - // } - // } - pub fn items<'a>( &'a self, cx: &'a AppContext, @@ -3916,6 +3840,8 @@ impl Render for Workspace { // .on_click(Arc::new(|workspace, cx| workspace.toggle_debug(cx))), // ), ) + // .child(self.modal_layer.clone()) + .child(self.modal_layer.read(cx).render(cx)) } } diff --git a/crates/zed2/Cargo.toml b/crates/zed2/Cargo.toml index d510de24ee5a1e71a2fe75fddac1d790f8fbab8d..2c93de734e9864973763d48ab46930c37d1628b0 100644 --- a/crates/zed2/Cargo.toml +++ b/crates/zed2/Cargo.toml @@ -41,7 +41,7 @@ editor = { package="editor2", path = "../editor2" } fs = { package = "fs2", path = "../fs2" } fsevent = { path = "../fsevent" } fuzzy = { path = "../fuzzy" } -# go_to_line = { path = "../go_to_line" } +go_to_line = { package = "go_to_line2", path = "../go_to_line2" } gpui = { package = "gpui2", path = "../gpui2" } install_cli = { path = "../install_cli" } journal = { package = "journal2", path = "../journal2" } diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 580afd265370c1052554b85affb600b98046e913..a93426eb043273a13cfb09cec9bc48ffac8bd9d2 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -140,17 +140,6 @@ fn main() { // command_palette::init(cx); language::init(cx); editor::init(cx); - // go_to_line::init(cx); - // file_finder::init(cx); - // outline::init(cx); - // project_symbols::init(cx); - // project_panel::init(Assets, cx); - // channel::init(&client, user_store.clone(), cx); - // diagnostics::init(cx); - // search::init(cx); - // semantic_index::init(fs.clone(), http.clone(), languages.clone(), cx); - // vim::init(cx); - // terminal_view::init(cx); copilot::init( copilot_language_server_id, http.clone(), @@ -193,6 +182,18 @@ fn main() { workspace::init(app_state.clone(), cx); // recent_projects::init(cx); + go_to_line::init(cx); + // file_finder::init(cx); + // outline::init(cx); + // project_symbols::init(cx); + // project_panel::init(Assets, cx); + // channel::init(&client, user_store.clone(), cx); + // diagnostics::init(cx); + // search::init(cx); + // semantic_index::init(fs.clone(), http.clone(), languages.clone(), cx); + // vim::init(cx); + // terminal_view::init(cx); + // journal2::init(app_state.clone(), cx); // language_selector::init(cx); // theme_selector::init(cx); From 643146d768304f0625cce667d8a4ca48527832f3 Mon Sep 17 00:00:00 2001 From: Julia Date: Tue, 7 Nov 2023 11:00:30 -0500 Subject: [PATCH 057/110] Re-introduce a macro for defining actions for ease of use Co-Authored-By: Piotr Osiewicz Co-Authored-By: Conrad Irwin --- crates/client2/src/client2.rs | 13 ++----- crates/gpui2/src/action.rs | 52 ++++++++++++++++++++++++-- crates/gpui2/src/gpui2.rs | 1 + crates/gpui2/src/interactive.rs | 5 +-- crates/storybook2/src/stories/focus.rs | 14 ++----- 5 files changed, 57 insertions(+), 28 deletions(-) diff --git a/crates/client2/src/client2.rs b/crates/client2/src/client2.rs index 6494e0350bb3fe48e0fc5a477537bec058ee95ed..4a1c5f321c375a097a89252830bd17c572d0c648 100644 --- a/crates/client2/src/client2.rs +++ b/crates/client2/src/client2.rs @@ -15,8 +15,8 @@ use futures::{ TryStreamExt, }; use gpui::{ - serde_json, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Model, SemanticVersion, Task, - WeakModel, + actions, serde_json, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Model, + SemanticVersion, Task, WeakModel, }; use lazy_static::lazy_static; use parking_lot::RwLock; @@ -70,14 +70,7 @@ pub const ZED_SECRET_CLIENT_TOKEN: &str = "618033988749894"; pub const INITIAL_RECONNECTION_DELAY: Duration = Duration::from_millis(100); pub const CONNECTION_TIMEOUT: Duration = Duration::from_secs(5); -#[derive(Clone, Default, PartialEq, Deserialize)] -pub struct SignIn; - -#[derive(Clone, Default, PartialEq, Deserialize)] -pub struct SignOut; - -#[derive(Clone, Default, PartialEq, Deserialize)] -pub struct Reconnect; +actions!(SignIn, SignOut, Reconnect); pub fn init_settings(cx: &mut AppContext) { TelemetrySettings::register(cx); diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 84843c98762572e591d76c774360fe48b21ee148..393a3feda6ba8a2a3ef1317f715ee08c8e12227e 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -4,7 +4,7 @@ use collections::{HashMap, HashSet}; use serde::Deserialize; use std::any::{type_name, Any}; -pub trait Action: 'static { +pub trait Action: std::fmt::Debug + 'static { fn qualified_name() -> SharedString where Self: Sized; @@ -17,12 +17,39 @@ pub trait Action: 'static { fn as_any(&self) -> &dyn Any; } +// actions defines structs that can be used as actions. +#[macro_export] +macro_rules! actions { + () => {}; + + ( $name:ident ) => { + #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] + struct $name; + }; + + ( $name:ident { $($token:tt)* } ) => { + #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] + struct $name { $($token)* } + }; + + ( $name:ident, $($rest:tt)* ) => { + actions!($name); + actions!($($rest)*); + }; + + ( $name:ident { $($token:tt)* }, $($rest:tt)* ) => { + actions!($name { $($token)* }); + actions!($($rest)*); + }; +} + impl Action for A where - A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + 'static, + A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + std::fmt::Debug + 'static, { fn qualified_name() -> SharedString { - type_name::().into() + // todo!() remove the 2 replacement when migration is done + type_name::().replace("2::", "::").into() } fn build(params: Option) -> Result> @@ -292,6 +319,25 @@ mod tests { use super::*; use DispatchContextPredicate::*; + #[test] + fn test_actions_definition() { + { + actions!(A, B { field: i32 }, C, D, E, F {}, G); + } + + { + actions!( + A, + B { field: i32 }, + C, + D, + E, + F {}, + G, // Don't wrap, test the trailing comma + ); + } + } + #[test] fn test_parse_context() { let mut expected = DispatchContext::default(); diff --git a/crates/gpui2/src/gpui2.rs b/crates/gpui2/src/gpui2.rs index 49cc3cebc23bf2d61f7615a02e48a77b7d11ba2a..348da17356dd3f48d1a507cfcb0c8d19a4413d2b 100644 --- a/crates/gpui2/src/gpui2.rs +++ b/crates/gpui2/src/gpui2.rs @@ -1,3 +1,4 @@ +#[macro_use] mod action; mod app; mod assets; diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rs index c6506f388e560d6ab4cdc2c473f67b7b2b53b2a1..0725a10aca05ef01a39144982146d36167bc366c 100644 --- a/crates/gpui2/src/interactive.rs +++ b/crates/gpui2/src/interactive.rs @@ -1233,8 +1233,6 @@ pub type KeyListener = Box< #[cfg(test)] mod test { - use serde_derive::Deserialize; - use crate::{ self as gpui, div, Div, FocusHandle, KeyBinding, Keystroke, ParentElement, Render, StatefulInteraction, StatelessInteractive, TestAppContext, VisualContext, @@ -1246,8 +1244,7 @@ mod test { focus_handle: FocusHandle, } - #[derive(PartialEq, Clone, Default, Deserialize)] - struct TestAction; + actions!(TestAction); impl Render for TestView { type Element = Div>; diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index 16c03f87d5421af9d9336e462692102c4cb632bb..0f580d0cbf171ef32b2c83465ad8601785304227 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -1,18 +1,10 @@ use gpui::{ - div, Div, FocusEnabled, Focusable, KeyBinding, ParentElement, Render, StatefulInteraction, - StatelessInteractive, Styled, View, VisualContext, WindowContext, + actions, div, Div, FocusEnabled, Focusable, KeyBinding, ParentElement, Render, + StatefulInteraction, StatelessInteractive, Styled, View, VisualContext, WindowContext, }; -use serde::Deserialize; use theme2::ActiveTheme; -#[derive(Clone, Default, PartialEq, Deserialize)] -struct ActionA; - -#[derive(Clone, Default, PartialEq, Deserialize)] -struct ActionB; - -#[derive(Clone, Default, PartialEq, Deserialize)] -struct ActionC; +actions!(ActionA, ActionB, ActionC); pub struct FocusStory {} From 0d95410634b044262462500cc76b393750b8ac80 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 7 Nov 2023 17:40:07 +0100 Subject: [PATCH 058/110] Rework third-party themes (#3254) This PR reworks the way we define our third-party themes to make them work as overlays on top of a base theme. We introduce the concept of a `UserThemeFamily` that contains `UserTheme`s. Rather than being an entire theme definition on their own, a `UserTheme` just contains optional overrides for the values in a `Theme`. When resolving a `UserTheme`, we apply it on top of the base theme. Any values not overridden in the `UserTheme` will fall back to the `Theme` defaults. Right now we are just using `UserTheme` to model third-party themes that we distribute with the Zed binary. However, this same structure can also be used to import arbitrary user themes (such as from a theme registry, or even a theme blob from the settings file). Release Notes: - N/A --- Cargo.lock | 1 + crates/theme2/Cargo.toml | 1 + crates/theme2/src/registry.rs | 44 +- crates/theme2/src/theme2.rs | 5 +- crates/theme2/src/themes/andromeda.rs | 391 +--- crates/theme2/src/themes/ayu.rs | 597 +----- crates/theme2/src/themes/dracula.rs | 205 +- crates/theme2/src/themes/gruvbox.rs | 1173 ++--------- crates/theme2/src/themes/mod.rs | 4 +- crates/theme2/src/themes/night_owl.rs | 400 +--- crates/theme2/src/themes/nord.rs | 205 +- crates/theme2/src/themes/notctis.rs | 2165 ++++---------------- crates/theme2/src/themes/palenight.rs | 594 +----- crates/theme2/src/themes/rose_pine.rs | 594 +----- crates/theme2/src/themes/solarized.rs | 393 +--- crates/theme2/src/themes/synthwave_84.rs | 191 +- crates/theme2/src/user_theme.rs | 25 + crates/theme_importer/src/main.rs | 19 +- crates/theme_importer/src/theme_printer.rs | 334 ++- crates/theme_importer/src/vscode.rs | 48 +- 20 files changed, 1389 insertions(+), 6000 deletions(-) create mode 100644 crates/theme2/src/user_theme.rs diff --git a/Cargo.lock b/Cargo.lock index a110aef25cb8bb2cee03ac0922bc6e699ae3d400..e39df9966888cb2649a3728eed85dc2e58c043d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8997,6 +8997,7 @@ dependencies = [ "settings2", "toml 0.5.11", "util", + "uuid 1.4.1", ] [[package]] diff --git a/crates/theme2/Cargo.toml b/crates/theme2/Cargo.toml index 5a8448372c4fd152d4130624c88075eedc8a65c3..d57c22ede7830fccdce6ce26cd1bcc10fb88923c 100644 --- a/crates/theme2/Cargo.toml +++ b/crates/theme2/Cargo.toml @@ -28,6 +28,7 @@ serde_derive.workspace = true serde_json.workspace = true settings = { package = "settings2", path = "../settings2" } toml.workspace = true +uuid.workspace = true util = { path = "../util" } [dev-dependencies] diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index 45ba75941c47b5ae8c21c913c21d4bb77493e3b1..37055da361869d403546bed4221578c64108a61c 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -1,7 +1,14 @@ -use crate::{zed_pro_family, Theme, ThemeFamily}; +use std::collections::HashMap; +use std::sync::Arc; + use anyhow::{anyhow, Result}; use gpui::SharedString; -use std::{collections::HashMap, sync::Arc}; +use refineable::Refineable; + +use crate::{ + zed_pro_family, Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, + SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily, +}; pub struct ThemeRegistry { themes: HashMap>, @@ -20,6 +27,37 @@ impl ThemeRegistry { } } + fn insert_user_theme_familes(&mut self, families: impl IntoIterator) { + for family in families.into_iter() { + self.insert_user_themes(family.themes); + } + } + + fn insert_user_themes(&mut self, themes: impl IntoIterator) { + self.insert_themes(themes.into_iter().map(|user_theme| { + let mut theme_colors = match user_theme.appearance { + Appearance::Light => ThemeColors::default_light(), + Appearance::Dark => ThemeColors::default_dark(), + }; + + theme_colors.refine(&user_theme.styles.colors); + + Theme { + id: uuid::Uuid::new_v4().to_string(), + name: user_theme.name.into(), + appearance: user_theme.appearance, + styles: ThemeStyles { + system: SystemColors::default(), + colors: theme_colors, + status: StatusColors::default(), + git: GitStatusColors::default(), + player: PlayerColors::default(), + syntax: SyntaxTheme::default_dark(), + }, + } + })); + } + pub fn list_names(&self, _staff: bool) -> impl Iterator + '_ { self.themes.keys().cloned() } @@ -43,7 +81,7 @@ impl Default for ThemeRegistry { }; this.insert_theme_families([zed_pro_family()]); - this.insert_theme_families(crate::all_imported_themes()); + this.insert_user_theme_familes(crate::all_imported_themes()); this } diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 99ac40a9665206022ea14d14819adafa4c710b1b..0a9b9821f628f99640915cc23617210a9162f3f9 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -6,6 +6,7 @@ mod scale; mod settings; mod syntax; mod themes; +mod user_theme; use std::sync::Arc; @@ -18,10 +19,12 @@ pub use scale::*; pub use settings::*; pub use syntax::*; pub use themes::*; +pub use user_theme::*; use gpui::{AppContext, Hsla, SharedString}; +use serde::Deserialize; -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, PartialEq, Clone, Copy, Deserialize)] pub enum Appearance { Light, Dark, diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 10e546aea8b333cb48e31891e5c58044938a477b..0d58dc9d56eda3ae0530c5daf5a685161e6e30a1 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -1,351 +1,82 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn andromeda() -> ThemeFamily { - ThemeFamily { - id: "ecd46547-a042-424d-99ca-5f56c060f798".into(), +pub fn andromeda() -> UserThemeFamily { + UserThemeFamily { name: "Andromeda".into(), author: "Eliver Lara (EliverLara)".into(), themes: vec![ - Theme { - id: "3bfb3b6e-365a-4cd2-9a80-2d2c81434729".into(), + UserTheme { name: "Andromeda".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x1b1d23ff).into(), - border_variant: rgba(0x1b1d23ff).into(), - border_focused: rgba(0x1b1d23ff).into(), - border_selected: rgba(0x1b1d23ff).into(), - border_transparent: rgba(0x1b1d23ff).into(), - border_disabled: rgba(0x1b1d23ff).into(), - elevated_surface_background: rgba(0x23262eff).into(), - surface_background: rgba(0x23262eff).into(), - background: rgba(0x23262eff).into(), - element_background: rgba(0x00e8c5cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xd4cdd8ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x23262eff).into(), - tab_active_background: rgba(0x23262eff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x000000e6).into(), - terminal_ansi_bright_red: rgba(0xee5d42ff).into(), - terminal_ansi_bright_green: rgba(0x95e072ff).into(), - terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), - terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), - terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), - terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), - terminal_ansi_bright_white: rgba(0xb0b4baff).into(), - terminal_ansi_black: rgba(0x000000f2).into(), - terminal_ansi_red: rgba(0xee5d42ff).into(), - terminal_ansi_green: rgba(0x95e072ff).into(), - terminal_ansi_yellow: rgba(0xffe66dff).into(), - terminal_ansi_blue: rgba(0x7bb7ffff).into(), - terminal_ansi_magenta: rgba(0xff00a9ff).into(), - terminal_ansi_cyan: rgba(0x00e8c6ff).into(), - terminal_ansi_white: rgba(0xedeef0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x1b1d23ff).into()), + border_variant: Some(rgba(0x1b1d23ff).into()), + border_focused: Some(rgba(0x1b1d23ff).into()), + border_selected: Some(rgba(0x1b1d23ff).into()), + border_transparent: Some(rgba(0x1b1d23ff).into()), + border_disabled: Some(rgba(0x1b1d23ff).into()), + elevated_surface_background: Some(rgba(0x23262eff).into()), + surface_background: Some(rgba(0x23262eff).into()), + background: Some(rgba(0x23262eff).into()), + element_background: Some(rgba(0x00e8c5cc).into()), + text: Some(rgba(0xd4cdd8ff).into()), + tab_inactive_background: Some(rgba(0x23262eff).into()), + tab_active_background: Some(rgba(0x23262eff).into()), + terminal_ansi_bright_red: Some(rgba(0xee5d42ff).into()), + terminal_ansi_bright_green: Some(rgba(0x95e072ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffe66dff).into()), + terminal_ansi_bright_blue: Some(rgba(0x7bb7ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff00a9ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x00e8c6ff).into()), + terminal_ansi_red: Some(rgba(0xee5d42ff).into()), + terminal_ansi_green: Some(rgba(0x95e072ff).into()), + terminal_ansi_yellow: Some(rgba(0xffe66dff).into()), + terminal_ansi_blue: Some(rgba(0x7bb7ffff).into()), + terminal_ansi_magenta: Some(rgba(0xff00a9ff).into()), + terminal_ansi_cyan: Some(rgba(0x00e8c6ff).into()), + ..Default::default() }, }, }, - Theme { - id: "7bc92ac8-152c-46d5-b346-df68e4db2e7c".into(), + UserTheme { name: "Andromeda Bordered".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x1b1d23ff).into(), - border_variant: rgba(0x1b1d23ff).into(), - border_focused: rgba(0x1b1d23ff).into(), - border_selected: rgba(0x1b1d23ff).into(), - border_transparent: rgba(0x1b1d23ff).into(), - border_disabled: rgba(0x1b1d23ff).into(), - elevated_surface_background: rgba(0x23262eff).into(), - surface_background: rgba(0x23262eff).into(), - background: rgba(0x262933ff).into(), - element_background: rgba(0x00e8c5cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xd4cdd8ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x23262eff).into(), - tab_active_background: rgba(0x262933ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x000000e6).into(), - terminal_ansi_bright_red: rgba(0xee5d42ff).into(), - terminal_ansi_bright_green: rgba(0x95e072ff).into(), - terminal_ansi_bright_yellow: rgba(0xffe66dff).into(), - terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(), - terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(), - terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(), - terminal_ansi_bright_white: rgba(0xb0b4baff).into(), - terminal_ansi_black: rgba(0x000000f2).into(), - terminal_ansi_red: rgba(0xee5d42ff).into(), - terminal_ansi_green: rgba(0x95e072ff).into(), - terminal_ansi_yellow: rgba(0xffe66dff).into(), - terminal_ansi_blue: rgba(0x7bb7ffff).into(), - terminal_ansi_magenta: rgba(0xff00a9ff).into(), - terminal_ansi_cyan: rgba(0x00e8c6ff).into(), - terminal_ansi_white: rgba(0xedeef0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x1b1d23ff).into()), + border_variant: Some(rgba(0x1b1d23ff).into()), + border_focused: Some(rgba(0x1b1d23ff).into()), + border_selected: Some(rgba(0x1b1d23ff).into()), + border_transparent: Some(rgba(0x1b1d23ff).into()), + border_disabled: Some(rgba(0x1b1d23ff).into()), + elevated_surface_background: Some(rgba(0x23262eff).into()), + surface_background: Some(rgba(0x23262eff).into()), + background: Some(rgba(0x262933ff).into()), + element_background: Some(rgba(0x00e8c5cc).into()), + text: Some(rgba(0xd4cdd8ff).into()), + tab_inactive_background: Some(rgba(0x23262eff).into()), + tab_active_background: Some(rgba(0x262933ff).into()), + terminal_ansi_bright_red: Some(rgba(0xee5d42ff).into()), + terminal_ansi_bright_green: Some(rgba(0x95e072ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffe66dff).into()), + terminal_ansi_bright_blue: Some(rgba(0x7bb7ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff00a9ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x00e8c6ff).into()), + terminal_ansi_red: Some(rgba(0xee5d42ff).into()), + terminal_ansi_green: Some(rgba(0x95e072ff).into()), + terminal_ansi_yellow: Some(rgba(0xffe66dff).into()), + terminal_ansi_blue: Some(rgba(0x7bb7ffff).into()), + terminal_ansi_magenta: Some(rgba(0xff00a9ff).into()), + terminal_ansi_cyan: Some(rgba(0x00e8c6ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index c3503e23c73ca376dbe4f8b99c065517291aba2e..6298de40eec342320c52303576b0c475113bf5e4 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -1,518 +1,131 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn ayu() -> ThemeFamily { - ThemeFamily { - id: "4faecf44-837e-4034-9197-7da909668498".into(), +pub fn ayu() -> UserThemeFamily { + UserThemeFamily { name: "Ayu".into(), author: "dempfi (Ike Ku)".into(), themes: vec![ - Theme { - id: "733aeb9b-98fd-4492-984e-d71540daf72e".into(), + UserTheme { name: "Ayu Light".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x6b7d8f1f).into(), - border_variant: rgba(0x6b7d8f1f).into(), - border_focused: rgba(0x6b7d8f1f).into(), - border_selected: rgba(0x6b7d8f1f).into(), - border_transparent: rgba(0x6b7d8f1f).into(), - border_disabled: rgba(0x6b7d8f1f).into(), - elevated_surface_background: rgba(0xf8f9faff).into(), - surface_background: rgba(0xf8f9faff).into(), - background: rgba(0xf8f9faff).into(), - element_background: rgba(0xffaa32ff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x8a9199ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xf8f9faff).into(), - tab_active_background: rgba(0xf8f9faff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xf8f9faff).into(), - terminal_ansi_bright_black: rgba(0x686868ff).into(), - terminal_ansi_bright_red: rgba(0xef7070ff).into(), - terminal_ansi_bright_green: rgba(0x86b300ff).into(), - terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(), - terminal_ansi_bright_blue: rgba(0x389ee6ff).into(), - terminal_ansi_bright_magenta: rgba(0xa37accff).into(), - terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(), - terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(), - terminal_ansi_black: rgba(0x000000ff).into(), - terminal_ansi_red: rgba(0xea6c6dff).into(), - terminal_ansi_green: rgba(0x6cbf43ff).into(), - terminal_ansi_yellow: rgba(0xeca944ff).into(), - terminal_ansi_blue: rgba(0x3198e1ff).into(), - terminal_ansi_magenta: rgba(0x9e75c7ff).into(), - terminal_ansi_cyan: rgba(0x46ba94ff).into(), - terminal_ansi_white: rgba(0xc7c7c7ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x6b7d8f1f).into()), + border_variant: Some(rgba(0x6b7d8f1f).into()), + border_focused: Some(rgba(0x6b7d8f1f).into()), + border_selected: Some(rgba(0x6b7d8f1f).into()), + border_transparent: Some(rgba(0x6b7d8f1f).into()), + border_disabled: Some(rgba(0x6b7d8f1f).into()), + elevated_surface_background: Some(rgba(0xf8f9faff).into()), + surface_background: Some(rgba(0xf8f9faff).into()), + background: Some(rgba(0xf8f9faff).into()), + element_background: Some(rgba(0xffaa32ff).into()), + text: Some(rgba(0x8a9199ff).into()), + tab_inactive_background: Some(rgba(0xf8f9faff).into()), + tab_active_background: Some(rgba(0xf8f9faff).into()), + terminal_background: Some(rgba(0xf8f9faff).into()), + terminal_ansi_bright_black: Some(rgba(0x686868ff).into()), + terminal_ansi_bright_red: Some(rgba(0xef7070ff).into()), + terminal_ansi_bright_green: Some(rgba(0x86b300ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xf2ad48ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x389ee6ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xa37accff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x4bbf98ff).into()), + terminal_ansi_bright_white: Some(rgba(0xd1d1d1ff).into()), + terminal_ansi_black: Some(rgba(0x000000ff).into()), + terminal_ansi_red: Some(rgba(0xea6c6dff).into()), + terminal_ansi_green: Some(rgba(0x6cbf43ff).into()), + terminal_ansi_yellow: Some(rgba(0xeca944ff).into()), + terminal_ansi_blue: Some(rgba(0x3198e1ff).into()), + terminal_ansi_magenta: Some(rgba(0x9e75c7ff).into()), + terminal_ansi_cyan: Some(rgba(0x46ba94ff).into()), + terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()), + ..Default::default() }, }, }, - Theme { - id: "50f68427-2e1d-4bf1-981a-d08c6b38e846".into(), + UserTheme { name: "Ayu Mirage".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x171a24ff).into(), - border_variant: rgba(0x171a24ff).into(), - border_focused: rgba(0x171a24ff).into(), - border_selected: rgba(0x171a24ff).into(), - border_transparent: rgba(0x171a24ff).into(), - border_disabled: rgba(0x171a24ff).into(), - elevated_surface_background: rgba(0x1f2430ff).into(), - surface_background: rgba(0x1f2430ff).into(), - background: rgba(0x1f2430ff).into(), - element_background: rgba(0xffcb65ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0x707a8cff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x1f2430ff).into(), - tab_active_background: rgba(0x1f2430ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x1f2430ff).into(), - terminal_ansi_bright_black: rgba(0x686868ff).into(), - terminal_ansi_bright_red: rgba(0xf18678ff).into(), - terminal_ansi_bright_green: rgba(0xd4fe7fff).into(), - terminal_ansi_bright_yellow: rgba(0xffd173ff).into(), - terminal_ansi_bright_blue: rgba(0x73cfffff).into(), - terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(), - terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x171a24ff).into(), - terminal_ansi_red: rgba(0xed8173ff).into(), - terminal_ansi_green: rgba(0x86d96bff).into(), - terminal_ansi_yellow: rgba(0xfacc6eff).into(), - terminal_ansi_blue: rgba(0x6ccafaff).into(), - terminal_ansi_magenta: rgba(0xdabafaff).into(), - terminal_ansi_cyan: rgba(0x90e1c6ff).into(), - terminal_ansi_white: rgba(0xc7c7c7ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x171a24ff).into()), + border_variant: Some(rgba(0x171a24ff).into()), + border_focused: Some(rgba(0x171a24ff).into()), + border_selected: Some(rgba(0x171a24ff).into()), + border_transparent: Some(rgba(0x171a24ff).into()), + border_disabled: Some(rgba(0x171a24ff).into()), + elevated_surface_background: Some(rgba(0x1f2430ff).into()), + surface_background: Some(rgba(0x1f2430ff).into()), + background: Some(rgba(0x1f2430ff).into()), + element_background: Some(rgba(0xffcb65ff).into()), + text: Some(rgba(0x707a8cff).into()), + tab_inactive_background: Some(rgba(0x1f2430ff).into()), + tab_active_background: Some(rgba(0x1f2430ff).into()), + terminal_background: Some(rgba(0x1f2430ff).into()), + terminal_ansi_bright_black: Some(rgba(0x686868ff).into()), + terminal_ansi_bright_red: Some(rgba(0xf18678ff).into()), + terminal_ansi_bright_green: Some(rgba(0xd4fe7fff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffd173ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x73cfffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xdfbfffff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x95e6cbff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x171a24ff).into()), + terminal_ansi_red: Some(rgba(0xed8173ff).into()), + terminal_ansi_green: Some(rgba(0x86d96bff).into()), + terminal_ansi_yellow: Some(rgba(0xfacc6eff).into()), + terminal_ansi_blue: Some(rgba(0x6ccafaff).into()), + terminal_ansi_magenta: Some(rgba(0xdabafaff).into()), + terminal_ansi_cyan: Some(rgba(0x90e1c6ff).into()), + terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()), + ..Default::default() }, }, }, - Theme { - id: "22d8dede-57da-46e1-946a-16876679b4d2".into(), + UserTheme { name: "Ayu Dark".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x1e232bff).into(), - border_variant: rgba(0x1e232bff).into(), - border_focused: rgba(0x1e232bff).into(), - border_selected: rgba(0x1e232bff).into(), - border_transparent: rgba(0x1e232bff).into(), - border_disabled: rgba(0x1e232bff).into(), - elevated_surface_background: rgba(0x0b0e14ff).into(), - surface_background: rgba(0x0b0e14ff).into(), - background: rgba(0x0b0e14ff).into(), - element_background: rgba(0xe6b450ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0x565b66ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x0b0e14ff).into(), - tab_active_background: rgba(0x0b0e14ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x0b0e14ff).into(), - terminal_ansi_bright_black: rgba(0x686868ff).into(), - terminal_ansi_bright_red: rgba(0xef7077ff).into(), - terminal_ansi_bright_green: rgba(0xa9d94bff).into(), - terminal_ansi_bright_yellow: rgba(0xffb353ff).into(), - terminal_ansi_bright_blue: rgba(0x59c2ffff).into(), - terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(), - terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x1e232bff).into(), - terminal_ansi_red: rgba(0xea6c72ff).into(), - terminal_ansi_green: rgba(0x7ed962ff).into(), - terminal_ansi_yellow: rgba(0xf9af4fff).into(), - terminal_ansi_blue: rgba(0x52bdfaff).into(), - terminal_ansi_magenta: rgba(0xcca1faff).into(), - terminal_ansi_cyan: rgba(0x90e1c6ff).into(), - terminal_ansi_white: rgba(0xc7c7c7ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x1e232bff).into()), + border_variant: Some(rgba(0x1e232bff).into()), + border_focused: Some(rgba(0x1e232bff).into()), + border_selected: Some(rgba(0x1e232bff).into()), + border_transparent: Some(rgba(0x1e232bff).into()), + border_disabled: Some(rgba(0x1e232bff).into()), + elevated_surface_background: Some(rgba(0x0b0e14ff).into()), + surface_background: Some(rgba(0x0b0e14ff).into()), + background: Some(rgba(0x0b0e14ff).into()), + element_background: Some(rgba(0xe6b450ff).into()), + text: Some(rgba(0x565b66ff).into()), + tab_inactive_background: Some(rgba(0x0b0e14ff).into()), + tab_active_background: Some(rgba(0x0b0e14ff).into()), + terminal_background: Some(rgba(0x0b0e14ff).into()), + terminal_ansi_bright_black: Some(rgba(0x686868ff).into()), + terminal_ansi_bright_red: Some(rgba(0xef7077ff).into()), + terminal_ansi_bright_green: Some(rgba(0xa9d94bff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffb353ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x59c2ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xd2a6ffff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x95e6cbff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x1e232bff).into()), + terminal_ansi_red: Some(rgba(0xea6c72ff).into()), + terminal_ansi_green: Some(rgba(0x7ed962ff).into()), + terminal_ansi_yellow: Some(rgba(0xf9af4fff).into()), + terminal_ansi_blue: Some(rgba(0x52bdfaff).into()), + terminal_ansi_magenta: Some(rgba(0xcca1faff).into()), + terminal_ansi_cyan: Some(rgba(0x90e1c6ff).into()), + terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index d7648c8ffe6cfaa4435129d161ca60fdfbb68799..ea0e185e0553b130a4b0883db837e371fcb0a498 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -1,182 +1,51 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn dracula() -> ThemeFamily { - ThemeFamily { - id: "0abb0e55-f034-45d9-a84d-e880dfd65711".into(), +pub fn dracula() -> UserThemeFamily { + UserThemeFamily { name: "Dracula".into(), author: "Zeno Rocha".into(), - themes: vec![Theme { - id: "d20497ef-85be-4ea2-9070-a182d03aac73".into(), + themes: vec![UserTheme { name: "Dracula".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xbd93f9ff).into(), - border_variant: rgba(0xbd93f9ff).into(), - border_focused: rgba(0xbd93f9ff).into(), - border_selected: rgba(0xbd93f9ff).into(), - border_transparent: rgba(0xbd93f9ff).into(), - border_disabled: rgba(0xbd93f9ff).into(), - elevated_surface_background: rgba(0x282a35ff).into(), - surface_background: rgba(0x282a35ff).into(), - background: rgba(0x282a35ff).into(), - element_background: rgba(0x44475aff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xf8f8f2ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x21222cff).into(), - tab_active_background: rgba(0x282a35ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x282a35ff).into(), - terminal_ansi_bright_black: rgba(0x6272a4ff).into(), - terminal_ansi_bright_red: rgba(0xff6d6dff).into(), - terminal_ansi_bright_green: rgba(0x69ff94ff).into(), - terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(), - terminal_ansi_bright_blue: rgba(0xd6abfeff).into(), - terminal_ansi_bright_magenta: rgba(0xff92dfff).into(), - terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x21222cff).into(), - terminal_ansi_red: rgba(0xff5555ff).into(), - terminal_ansi_green: rgba(0x50fa7bff).into(), - terminal_ansi_yellow: rgba(0xf1fa8cff).into(), - terminal_ansi_blue: rgba(0xbd93f9ff).into(), - terminal_ansi_magenta: rgba(0xff79c6ff).into(), - terminal_ansi_cyan: rgba(0x8be9fdff).into(), - terminal_ansi_white: rgba(0xf8f8f2ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xbd93f9ff).into()), + border_variant: Some(rgba(0xbd93f9ff).into()), + border_focused: Some(rgba(0xbd93f9ff).into()), + border_selected: Some(rgba(0xbd93f9ff).into()), + border_transparent: Some(rgba(0xbd93f9ff).into()), + border_disabled: Some(rgba(0xbd93f9ff).into()), + elevated_surface_background: Some(rgba(0x282a35ff).into()), + surface_background: Some(rgba(0x282a35ff).into()), + background: Some(rgba(0x282a35ff).into()), + element_background: Some(rgba(0x44475aff).into()), + text: Some(rgba(0xf8f8f2ff).into()), + tab_inactive_background: Some(rgba(0x21222cff).into()), + tab_active_background: Some(rgba(0x282a35ff).into()), + terminal_background: Some(rgba(0x282a35ff).into()), + terminal_ansi_bright_black: Some(rgba(0x6272a4ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff6d6dff).into()), + terminal_ansi_bright_green: Some(rgba(0x69ff94ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffffa5ff).into()), + terminal_ansi_bright_blue: Some(rgba(0xd6abfeff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff92dfff).into()), + terminal_ansi_bright_cyan: Some(rgba(0xa3fefeff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x21222cff).into()), + terminal_ansi_red: Some(rgba(0xff5555ff).into()), + terminal_ansi_green: Some(rgba(0x50fa7bff).into()), + terminal_ansi_yellow: Some(rgba(0xf1fa8cff).into()), + terminal_ansi_blue: Some(rgba(0xbd93f9ff).into()), + terminal_ansi_magenta: Some(rgba(0xff79c6ff).into()), + terminal_ansi_cyan: Some(rgba(0x8be9fdff).into()), + terminal_ansi_white: Some(rgba(0xf8f8f2ff).into()), + ..Default::default() }, }, }], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index dc276f88f2b5f5e0ff28f84ecada5025887bbe19..d06f53da67574337e76abc72ad0fad51feb4287d 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -1,1019 +1,236 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn gruvbox() -> ThemeFamily { - ThemeFamily { - id: "000a3e50-ccf1-430d-84e4-910583bd1064".into(), +pub fn gruvbox() -> UserThemeFamily { + UserThemeFamily { name: "Gruvbox".into(), author: "morhetz".into(), themes: vec![ - Theme { - id: "0db938b2-2267-453b-af84-f82c5f3400e7".into(), + UserTheme { name: "Gruvbox Dark Hard".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x3c3836ff).into(), - border_variant: rgba(0x3c3836ff).into(), - border_focused: rgba(0x3c3836ff).into(), - border_selected: rgba(0x3c3836ff).into(), - border_transparent: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), - elevated_surface_background: rgba(0x18191bff).into(), - surface_background: rgba(0x18191bff).into(), - background: rgba(0x1d2021ff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xebdbb2ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x1d2021ff).into(), - tab_active_background: rgba(0x32302fff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x1d2021ff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0xfb4833ff).into(), - terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), - terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), - terminal_ansi_bright_blue: rgba(0x83a598ff).into(), - terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), - terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), - terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), - terminal_ansi_black: rgba(0x3c3836ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0xa89984ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x3c3836ff).into()), + border_variant: Some(rgba(0x3c3836ff).into()), + border_focused: Some(rgba(0x3c3836ff).into()), + border_selected: Some(rgba(0x3c3836ff).into()), + border_transparent: Some(rgba(0x3c3836ff).into()), + border_disabled: Some(rgba(0x3c3836ff).into()), + background: Some(rgba(0x1d2021ff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0xebdbb2ff).into()), + tab_inactive_background: Some(rgba(0x1d2021ff).into()), + tab_active_background: Some(rgba(0x32302fff).into()), + terminal_background: Some(rgba(0x1d2021ff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0xfb4833ff).into()), + terminal_ansi_bright_green: Some(rgba(0xb8bb25ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xfabd2eff).into()), + terminal_ansi_bright_blue: Some(rgba(0x83a598ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xd3869bff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x8ec07cff).into()), + terminal_ansi_bright_white: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_black: Some(rgba(0x3c3836ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0xa89984ff).into()), + ..Default::default() }, }, }, - Theme { - id: "8e1a1896-ed0f-40be-b127-6c389eacc9f1".into(), + UserTheme { name: "Gruvbox Dark Medium".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x3c3836ff).into(), - border_variant: rgba(0x3c3836ff).into(), - border_focused: rgba(0x3c3836ff).into(), - border_selected: rgba(0x3c3836ff).into(), - border_transparent: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), - elevated_surface_background: rgba(0x18191bff).into(), - surface_background: rgba(0x18191bff).into(), - background: rgba(0x282828ff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xebdbb2ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x282828ff).into(), - tab_active_background: rgba(0x3c3836ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x282828ff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0xfb4833ff).into(), - terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), - terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), - terminal_ansi_bright_blue: rgba(0x83a598ff).into(), - terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), - terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), - terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), - terminal_ansi_black: rgba(0x3c3836ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0xa89984ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x3c3836ff).into()), + border_variant: Some(rgba(0x3c3836ff).into()), + border_focused: Some(rgba(0x3c3836ff).into()), + border_selected: Some(rgba(0x3c3836ff).into()), + border_transparent: Some(rgba(0x3c3836ff).into()), + border_disabled: Some(rgba(0x3c3836ff).into()), + background: Some(rgba(0x282828ff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0xebdbb2ff).into()), + tab_inactive_background: Some(rgba(0x282828ff).into()), + tab_active_background: Some(rgba(0x3c3836ff).into()), + terminal_background: Some(rgba(0x282828ff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0xfb4833ff).into()), + terminal_ansi_bright_green: Some(rgba(0xb8bb25ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xfabd2eff).into()), + terminal_ansi_bright_blue: Some(rgba(0x83a598ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xd3869bff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x8ec07cff).into()), + terminal_ansi_bright_white: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_black: Some(rgba(0x3c3836ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0xa89984ff).into()), + ..Default::default() }, }, }, - Theme { - id: "94410e6f-f4c4-4669-bb4d-5a20b4e4b1f3".into(), + UserTheme { name: "Gruvbox Dark Soft".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x3c3836ff).into(), - border_variant: rgba(0x3c3836ff).into(), - border_focused: rgba(0x3c3836ff).into(), - border_selected: rgba(0x3c3836ff).into(), - border_transparent: rgba(0x3c3836ff).into(), - border_disabled: rgba(0x3c3836ff).into(), - elevated_surface_background: rgba(0x18191bff).into(), - surface_background: rgba(0x18191bff).into(), - background: rgba(0x32302fff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xebdbb2ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x32302fff).into(), - tab_active_background: rgba(0x504945ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x32302fff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0xfb4833ff).into(), - terminal_ansi_bright_green: rgba(0xb8bb25ff).into(), - terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(), - terminal_ansi_bright_blue: rgba(0x83a598ff).into(), - terminal_ansi_bright_magenta: rgba(0xd3869bff).into(), - terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(), - terminal_ansi_bright_white: rgba(0xebdbb2ff).into(), - terminal_ansi_black: rgba(0x3c3836ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0xa89984ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x3c3836ff).into()), + border_variant: Some(rgba(0x3c3836ff).into()), + border_focused: Some(rgba(0x3c3836ff).into()), + border_selected: Some(rgba(0x3c3836ff).into()), + border_transparent: Some(rgba(0x3c3836ff).into()), + border_disabled: Some(rgba(0x3c3836ff).into()), + background: Some(rgba(0x32302fff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0xebdbb2ff).into()), + tab_inactive_background: Some(rgba(0x32302fff).into()), + tab_active_background: Some(rgba(0x504945ff).into()), + terminal_background: Some(rgba(0x32302fff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0xfb4833ff).into()), + terminal_ansi_bright_green: Some(rgba(0xb8bb25ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xfabd2eff).into()), + terminal_ansi_bright_blue: Some(rgba(0x83a598ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xd3869bff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x8ec07cff).into()), + terminal_ansi_bright_white: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_black: Some(rgba(0x3c3836ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0xa89984ff).into()), + ..Default::default() }, }, }, - Theme { - id: "e4a58582-478a-4934-ad73-135e23a0d66e".into(), + UserTheme { name: "Gruvbox Light Hard".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xebdbb2ff).into(), - border_variant: rgba(0xebdbb2ff).into(), - border_focused: rgba(0xebdbb2ff).into(), - border_selected: rgba(0xebdbb2ff).into(), - border_transparent: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), - elevated_surface_background: rgba(0xf9f9fbff).into(), - surface_background: rgba(0xf9f9fbff).into(), - background: rgba(0xf9f5d7ff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x3c3836ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xf9f5d7ff).into(), - tab_active_background: rgba(0xf2e5bcff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xf9f5d7ff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0x9d0006ff).into(), - terminal_ansi_bright_green: rgba(0x79740eff).into(), - terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), - terminal_ansi_bright_blue: rgba(0x066578ff).into(), - terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), - terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), - terminal_ansi_bright_white: rgba(0x3c3836ff).into(), - terminal_ansi_black: rgba(0xebdbb2ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0x7c6f64ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xebdbb2ff).into()), + border_variant: Some(rgba(0xebdbb2ff).into()), + border_focused: Some(rgba(0xebdbb2ff).into()), + border_selected: Some(rgba(0xebdbb2ff).into()), + border_transparent: Some(rgba(0xebdbb2ff).into()), + border_disabled: Some(rgba(0xebdbb2ff).into()), + background: Some(rgba(0xf9f5d7ff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0x3c3836ff).into()), + tab_inactive_background: Some(rgba(0xf9f5d7ff).into()), + tab_active_background: Some(rgba(0xf2e5bcff).into()), + terminal_background: Some(rgba(0xf9f5d7ff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0x9d0006ff).into()), + terminal_ansi_bright_green: Some(rgba(0x79740eff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xb57613ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x066578ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x8f3e71ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x427b58ff).into()), + terminal_ansi_bright_white: Some(rgba(0x3c3836ff).into()), + terminal_ansi_black: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0x7c6f64ff).into()), + ..Default::default() }, }, }, - Theme { - id: "0e875280-93fa-4c76-8874-f858c7d985c1".into(), + UserTheme { name: "Gruvbox Light Medium".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xebdbb2ff).into(), - border_variant: rgba(0xebdbb2ff).into(), - border_focused: rgba(0xebdbb2ff).into(), - border_selected: rgba(0xebdbb2ff).into(), - border_transparent: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), - elevated_surface_background: rgba(0xf9f9fbff).into(), - surface_background: rgba(0xf9f9fbff).into(), - background: rgba(0xfbf1c7ff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x3c3836ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xfbf1c7ff).into(), - tab_active_background: rgba(0xebdbb2ff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xfbf1c7ff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0x9d0006ff).into(), - terminal_ansi_bright_green: rgba(0x79740eff).into(), - terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), - terminal_ansi_bright_blue: rgba(0x066578ff).into(), - terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), - terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), - terminal_ansi_bright_white: rgba(0x3c3836ff).into(), - terminal_ansi_black: rgba(0xebdbb2ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0x7c6f64ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xebdbb2ff).into()), + border_variant: Some(rgba(0xebdbb2ff).into()), + border_focused: Some(rgba(0xebdbb2ff).into()), + border_selected: Some(rgba(0xebdbb2ff).into()), + border_transparent: Some(rgba(0xebdbb2ff).into()), + border_disabled: Some(rgba(0xebdbb2ff).into()), + background: Some(rgba(0xfbf1c7ff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0x3c3836ff).into()), + tab_inactive_background: Some(rgba(0xfbf1c7ff).into()), + tab_active_background: Some(rgba(0xebdbb2ff).into()), + terminal_background: Some(rgba(0xfbf1c7ff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0x9d0006ff).into()), + terminal_ansi_bright_green: Some(rgba(0x79740eff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xb57613ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x066578ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x8f3e71ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x427b58ff).into()), + terminal_ansi_bright_white: Some(rgba(0x3c3836ff).into()), + terminal_ansi_black: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0x7c6f64ff).into()), + ..Default::default() }, }, }, - Theme { - id: "914dbe6f-bc0f-4e6f-8d8c-5f4cabc1ca2d".into(), + UserTheme { name: "Gruvbox Light Soft".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xebdbb2ff).into(), - border_variant: rgba(0xebdbb2ff).into(), - border_focused: rgba(0xebdbb2ff).into(), - border_selected: rgba(0xebdbb2ff).into(), - border_transparent: rgba(0xebdbb2ff).into(), - border_disabled: rgba(0xebdbb2ff).into(), - elevated_surface_background: rgba(0xf9f9fbff).into(), - surface_background: rgba(0xf9f9fbff).into(), - background: rgba(0xf2e5bcff).into(), - element_background: rgba(0x44858780).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x3c3836ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xf2e5bcff).into(), - tab_active_background: rgba(0xd5c4a1ff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xf2e5bcff).into(), - terminal_ansi_bright_black: rgba(0x928374ff).into(), - terminal_ansi_bright_red: rgba(0x9d0006ff).into(), - terminal_ansi_bright_green: rgba(0x79740eff).into(), - terminal_ansi_bright_yellow: rgba(0xb57613ff).into(), - terminal_ansi_bright_blue: rgba(0x066578ff).into(), - terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(), - terminal_ansi_bright_cyan: rgba(0x427b58ff).into(), - terminal_ansi_bright_white: rgba(0x3c3836ff).into(), - terminal_ansi_black: rgba(0xebdbb2ff).into(), - terminal_ansi_red: rgba(0xcc241cff).into(), - terminal_ansi_green: rgba(0x989719ff).into(), - terminal_ansi_yellow: rgba(0xd79920ff).into(), - terminal_ansi_blue: rgba(0x448587ff).into(), - terminal_ansi_magenta: rgba(0xb16185ff).into(), - terminal_ansi_cyan: rgba(0x679d6aff).into(), - terminal_ansi_white: rgba(0x7c6f64ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xebdbb2ff).into()), + border_variant: Some(rgba(0xebdbb2ff).into()), + border_focused: Some(rgba(0xebdbb2ff).into()), + border_selected: Some(rgba(0xebdbb2ff).into()), + border_transparent: Some(rgba(0xebdbb2ff).into()), + border_disabled: Some(rgba(0xebdbb2ff).into()), + background: Some(rgba(0xf2e5bcff).into()), + element_background: Some(rgba(0x44858780).into()), + text: Some(rgba(0x3c3836ff).into()), + tab_inactive_background: Some(rgba(0xf2e5bcff).into()), + tab_active_background: Some(rgba(0xd5c4a1ff).into()), + terminal_background: Some(rgba(0xf2e5bcff).into()), + terminal_ansi_bright_black: Some(rgba(0x928374ff).into()), + terminal_ansi_bright_red: Some(rgba(0x9d0006ff).into()), + terminal_ansi_bright_green: Some(rgba(0x79740eff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xb57613ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x066578ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x8f3e71ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x427b58ff).into()), + terminal_ansi_bright_white: Some(rgba(0x3c3836ff).into()), + terminal_ansi_black: Some(rgba(0xebdbb2ff).into()), + terminal_ansi_red: Some(rgba(0xcc241cff).into()), + terminal_ansi_green: Some(rgba(0x989719ff).into()), + terminal_ansi_yellow: Some(rgba(0xd79920ff).into()), + terminal_ansi_blue: Some(rgba(0x448587ff).into()), + terminal_ansi_magenta: Some(rgba(0xb16185ff).into()), + terminal_ansi_cyan: Some(rgba(0x679d6aff).into()), + terminal_ansi_white: Some(rgba(0x7c6f64ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index 2a00b497852e19da19d3fcadea1a1ab1dac2649e..b013a86989cdad96ca83dd7a619f9fb8af947694 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -22,9 +22,9 @@ pub use rose_pine::*; pub use solarized::*; pub use synthwave_84::*; -use crate::ThemeFamily; +use crate::UserThemeFamily; -pub(crate) fn all_imported_themes() -> Vec { +pub(crate) fn all_imported_themes() -> Vec { vec![ rose_pine(), night_owl(), diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rs index 7fab35f1c16cb5818f4cc5de25e5cb7540d89907..4227c53b7a0fc2d36f55eddec8722c9ace03003d 100644 --- a/crates/theme2/src/themes/night_owl.rs +++ b/crates/theme2/src/themes/night_owl.rs @@ -1,351 +1,91 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn night_owl() -> ThemeFamily { - ThemeFamily { - id: "19498197-1091-409d-b37a-a282998e5c31".into(), +pub fn night_owl() -> UserThemeFamily { + UserThemeFamily { name: "Night Owl".into(), author: "Sarah Drasner (sdras)".into(), themes: vec![ - Theme { - id: "e5de91ed-fc95-46fb-a60b-ebd0602d04c7".into(), + UserTheme { name: "Night Owl".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x5f7e97ff).into(), - border_variant: rgba(0x5f7e97ff).into(), - border_focused: rgba(0x5f7e97ff).into(), - border_selected: rgba(0x5f7e97ff).into(), - border_transparent: rgba(0x5f7e97ff).into(), - border_disabled: rgba(0x5f7e97ff).into(), - elevated_surface_background: rgba(0x011526ff).into(), - surface_background: rgba(0x011526ff).into(), - background: rgba(0x011526ff).into(), - element_background: rgba(0x7d56c1cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xd6deebff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x01101cff).into(), - tab_active_background: rgba(0x0a2842ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x575656ff).into(), - terminal_ansi_bright_red: rgba(0xef524fff).into(), - terminal_ansi_bright_green: rgba(0x21da6eff).into(), - terminal_ansi_bright_yellow: rgba(0xffeb95ff).into(), - terminal_ansi_bright_blue: rgba(0x82aaffff).into(), - terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), - terminal_ansi_bright_cyan: rgba(0x7fdbcaff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x011526ff).into(), - terminal_ansi_red: rgba(0xef524fff).into(), - terminal_ansi_green: rgba(0x21da6eff).into(), - terminal_ansi_yellow: rgba(0xc5e478ff).into(), - terminal_ansi_blue: rgba(0x82aaffff).into(), - terminal_ansi_magenta: rgba(0xc792eaff).into(), - terminal_ansi_cyan: rgba(0x20c7a7ff).into(), - terminal_ansi_white: rgba(0xffffffff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x5f7e97ff).into()), + border_variant: Some(rgba(0x5f7e97ff).into()), + border_focused: Some(rgba(0x5f7e97ff).into()), + border_selected: Some(rgba(0x5f7e97ff).into()), + border_transparent: Some(rgba(0x5f7e97ff).into()), + border_disabled: Some(rgba(0x5f7e97ff).into()), + elevated_surface_background: Some(rgba(0x011526ff).into()), + surface_background: Some(rgba(0x011526ff).into()), + background: Some(rgba(0x011526ff).into()), + element_background: Some(rgba(0x7d56c1cc).into()), + text: Some(rgba(0xd6deebff).into()), + tab_inactive_background: Some(rgba(0x01101cff).into()), + tab_active_background: Some(rgba(0x0a2842ff).into()), + terminal_ansi_bright_black: Some(rgba(0x575656ff).into()), + terminal_ansi_bright_red: Some(rgba(0xef524fff).into()), + terminal_ansi_bright_green: Some(rgba(0x21da6eff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffeb95ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x7fdbcaff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x011526ff).into()), + terminal_ansi_red: Some(rgba(0xef524fff).into()), + terminal_ansi_green: Some(rgba(0x21da6eff).into()), + terminal_ansi_yellow: Some(rgba(0xc5e478ff).into()), + terminal_ansi_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_cyan: Some(rgba(0x20c7a7ff).into()), + terminal_ansi_white: Some(rgba(0xffffffff).into()), + ..Default::default() }, }, }, - Theme { - id: "998fc053-40c1-4a32-a31f-a17c9c07949a".into(), + UserTheme { name: "Night Owl Light".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xd9d9d9ff).into(), - border_variant: rgba(0xd9d9d9ff).into(), - border_focused: rgba(0xd9d9d9ff).into(), - border_selected: rgba(0xd9d9d9ff).into(), - border_transparent: rgba(0xd9d9d9ff).into(), - border_disabled: rgba(0xd9d9d9ff).into(), - elevated_surface_background: rgba(0xf0f0f0ff).into(), - surface_background: rgba(0xf0f0f0ff).into(), - background: rgba(0xfbfbfbff).into(), - element_background: rgba(0x29a298ff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x403f53ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xf0f0f0ff).into(), - tab_active_background: rgba(0xf6f6f6ff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xf6f6f6ff).into(), - terminal_ansi_bright_black: rgba(0x403f53ff).into(), - terminal_ansi_bright_red: rgba(0xde3c3aff).into(), - terminal_ansi_bright_green: rgba(0x07916aff).into(), - terminal_ansi_bright_yellow: rgba(0xdaa900ff).into(), - terminal_ansi_bright_blue: rgba(0x278dd7ff).into(), - terminal_ansi_bright_magenta: rgba(0xd64289ff).into(), - terminal_ansi_bright_cyan: rgba(0x29a298ff).into(), - terminal_ansi_bright_white: rgba(0xf0f0f0ff).into(), - terminal_ansi_black: rgba(0x403f53ff).into(), - terminal_ansi_red: rgba(0xde3c3aff).into(), - terminal_ansi_green: rgba(0x07916aff).into(), - terminal_ansi_yellow: rgba(0xe0ae01ff).into(), - terminal_ansi_blue: rgba(0x278dd7ff).into(), - terminal_ansi_magenta: rgba(0xd64289ff).into(), - terminal_ansi_cyan: rgba(0x29a298ff).into(), - terminal_ansi_white: rgba(0xf0f0f0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xd9d9d9ff).into()), + border_variant: Some(rgba(0xd9d9d9ff).into()), + border_focused: Some(rgba(0xd9d9d9ff).into()), + border_selected: Some(rgba(0xd9d9d9ff).into()), + border_transparent: Some(rgba(0xd9d9d9ff).into()), + border_disabled: Some(rgba(0xd9d9d9ff).into()), + elevated_surface_background: Some(rgba(0xf0f0f0ff).into()), + surface_background: Some(rgba(0xf0f0f0ff).into()), + background: Some(rgba(0xfbfbfbff).into()), + element_background: Some(rgba(0x29a298ff).into()), + text: Some(rgba(0x403f53ff).into()), + tab_inactive_background: Some(rgba(0xf0f0f0ff).into()), + tab_active_background: Some(rgba(0xf6f6f6ff).into()), + terminal_background: Some(rgba(0xf6f6f6ff).into()), + terminal_ansi_bright_black: Some(rgba(0x403f53ff).into()), + terminal_ansi_bright_red: Some(rgba(0xde3c3aff).into()), + terminal_ansi_bright_green: Some(rgba(0x07916aff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xdaa900ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x278dd7ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xd64289ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x29a298ff).into()), + terminal_ansi_bright_white: Some(rgba(0xf0f0f0ff).into()), + terminal_ansi_black: Some(rgba(0x403f53ff).into()), + terminal_ansi_red: Some(rgba(0xde3c3aff).into()), + terminal_ansi_green: Some(rgba(0x07916aff).into()), + terminal_ansi_yellow: Some(rgba(0xe0ae01ff).into()), + terminal_ansi_blue: Some(rgba(0x278dd7ff).into()), + terminal_ansi_magenta: Some(rgba(0xd64289ff).into()), + terminal_ansi_cyan: Some(rgba(0x29a298ff).into()), + terminal_ansi_white: Some(rgba(0xf0f0f0ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index 4b1e30870c205848d93d0cc31a7f09d51c7a2835..981b460d10e232f89834c6936ab2b9fe54c891ad 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -1,182 +1,51 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn nord() -> ThemeFamily { - ThemeFamily { - id: "3295b94b-731f-41a8-8d5e-ad02638f8e0d".into(), +pub fn nord() -> UserThemeFamily { + UserThemeFamily { name: "Nord".into(), author: "Sven Greb (svengreb)".into(), - themes: vec![Theme { - id: "dfdfd9f6-bc57-46dd-b919-42b18df35bdd".into(), + themes: vec![UserTheme { name: "Nord".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x3b4252ff).into(), - border_variant: rgba(0x3b4252ff).into(), - border_focused: rgba(0x3b4252ff).into(), - border_selected: rgba(0x3b4252ff).into(), - border_transparent: rgba(0x3b4252ff).into(), - border_disabled: rgba(0x3b4252ff).into(), - elevated_surface_background: rgba(0x2e3440ff).into(), - surface_background: rgba(0x2e3440ff).into(), - background: rgba(0x2e3440ff).into(), - element_background: rgba(0x88bfd0ee).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xd8dee9ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x2e3440ff).into(), - tab_active_background: rgba(0x3b4252ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x2e3440ff).into(), - terminal_ansi_bright_black: rgba(0x4c566aff).into(), - terminal_ansi_bright_red: rgba(0xbf616aff).into(), - terminal_ansi_bright_green: rgba(0xa3be8cff).into(), - terminal_ansi_bright_yellow: rgba(0xebcb8bff).into(), - terminal_ansi_bright_blue: rgba(0x81a1c1ff).into(), - terminal_ansi_bright_magenta: rgba(0xb48eacff).into(), - terminal_ansi_bright_cyan: rgba(0x8fbcbbff).into(), - terminal_ansi_bright_white: rgba(0xeceff4ff).into(), - terminal_ansi_black: rgba(0x3b4252ff).into(), - terminal_ansi_red: rgba(0xbf616aff).into(), - terminal_ansi_green: rgba(0xa3be8cff).into(), - terminal_ansi_yellow: rgba(0xebcb8bff).into(), - terminal_ansi_blue: rgba(0x81a1c1ff).into(), - terminal_ansi_magenta: rgba(0xb48eacff).into(), - terminal_ansi_cyan: rgba(0x88bfd0ff).into(), - terminal_ansi_white: rgba(0xe5e9f0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x3b4252ff).into()), + border_variant: Some(rgba(0x3b4252ff).into()), + border_focused: Some(rgba(0x3b4252ff).into()), + border_selected: Some(rgba(0x3b4252ff).into()), + border_transparent: Some(rgba(0x3b4252ff).into()), + border_disabled: Some(rgba(0x3b4252ff).into()), + elevated_surface_background: Some(rgba(0x2e3440ff).into()), + surface_background: Some(rgba(0x2e3440ff).into()), + background: Some(rgba(0x2e3440ff).into()), + element_background: Some(rgba(0x88bfd0ee).into()), + text: Some(rgba(0xd8dee9ff).into()), + tab_inactive_background: Some(rgba(0x2e3440ff).into()), + tab_active_background: Some(rgba(0x3b4252ff).into()), + terminal_background: Some(rgba(0x2e3440ff).into()), + terminal_ansi_bright_black: Some(rgba(0x4c566aff).into()), + terminal_ansi_bright_red: Some(rgba(0xbf616aff).into()), + terminal_ansi_bright_green: Some(rgba(0xa3be8cff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xebcb8bff).into()), + terminal_ansi_bright_blue: Some(rgba(0x81a1c1ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xb48eacff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x8fbcbbff).into()), + terminal_ansi_bright_white: Some(rgba(0xeceff4ff).into()), + terminal_ansi_black: Some(rgba(0x3b4252ff).into()), + terminal_ansi_red: Some(rgba(0xbf616aff).into()), + terminal_ansi_green: Some(rgba(0xa3be8cff).into()), + terminal_ansi_yellow: Some(rgba(0xebcb8bff).into()), + terminal_ansi_blue: Some(rgba(0x81a1c1ff).into()), + terminal_ansi_magenta: Some(rgba(0xb48eacff).into()), + terminal_ansi_cyan: Some(rgba(0x88bfd0ff).into()), + terminal_ansi_white: Some(rgba(0xe5e9f0ff).into()), + ..Default::default() }, }, }], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index 4ec66ec09437ca82b9b08556dfad2bb7f4101e57..d8673824db638a891cd08f1b0346c5cc4b9d1783 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -1,1854 +1,443 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn notctis() -> ThemeFamily { - ThemeFamily { - id: "7fbf6904-517c-42e1-8eb3-a64b1e9218b9".into(), +pub fn notctis() -> UserThemeFamily { + UserThemeFamily { name: "Notctis".into(), author: "Liviu Schera (liviuschera)".into(), themes: vec![ - Theme { - id: "2dc5fee8-30ff-4a50-bfae-c13bd19c9f89".into(), + UserTheme { name: "Noctis Azureus".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x1579b6ff).into(), - border_variant: rgba(0x1579b6ff).into(), - border_focused: rgba(0x1579b6ff).into(), - border_selected: rgba(0x1579b6ff).into(), - border_transparent: rgba(0x1579b6ff).into(), - border_disabled: rgba(0x1579b6ff).into(), - elevated_surface_background: rgba(0x051b28ff).into(), - surface_background: rgba(0x051b28ff).into(), - background: rgba(0x07263aff).into(), - element_background: rgba(0x007e99ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xbecfdaff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x08324eff).into(), - tab_active_background: rgba(0x07263aff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x051b28ff).into(), - terminal_ansi_bright_black: rgba(0x475e6cff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xbecfdaff).into(), - terminal_ansi_black: rgba(0x28343dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xaec3d0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x1579b6ff).into()), + border_variant: Some(rgba(0x1579b6ff).into()), + border_focused: Some(rgba(0x1579b6ff).into()), + border_selected: Some(rgba(0x1579b6ff).into()), + border_transparent: Some(rgba(0x1579b6ff).into()), + border_disabled: Some(rgba(0x1579b6ff).into()), + elevated_surface_background: Some(rgba(0x051b28ff).into()), + surface_background: Some(rgba(0x051b28ff).into()), + background: Some(rgba(0x07263aff).into()), + element_background: Some(rgba(0x007e99ff).into()), + text: Some(rgba(0xbecfdaff).into()), + tab_inactive_background: Some(rgba(0x08324eff).into()), + tab_active_background: Some(rgba(0x07263aff).into()), + terminal_background: Some(rgba(0x051b28ff).into()), + terminal_ansi_bright_black: Some(rgba(0x475e6cff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xbecfdaff).into()), + terminal_ansi_black: Some(rgba(0x28343dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xaec3d0ff).into()), + ..Default::default() }, }, }, - Theme { - id: "ba4f5a34-987a-4e2c-939c-7f1b02d0e432".into(), + UserTheme { name: "Noctis Bordo".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x997582ff).into(), - border_variant: rgba(0x997582ff).into(), - border_focused: rgba(0x997582ff).into(), - border_selected: rgba(0x997582ff).into(), - border_transparent: rgba(0x997582ff).into(), - border_disabled: rgba(0x997582ff).into(), - elevated_surface_background: rgba(0x272022ff).into(), - surface_background: rgba(0x272022ff).into(), - background: rgba(0x322a2dff).into(), - element_background: rgba(0x007e99ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xcbbec2ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x413036ff).into(), - tab_active_background: rgba(0x322a2dff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x272022ff).into(), - terminal_ansi_bright_black: rgba(0x69545bff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xcbbec2ff).into(), - terminal_ansi_black: rgba(0x47393eff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xb9acb0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x997582ff).into()), + border_variant: Some(rgba(0x997582ff).into()), + border_focused: Some(rgba(0x997582ff).into()), + border_selected: Some(rgba(0x997582ff).into()), + border_transparent: Some(rgba(0x997582ff).into()), + border_disabled: Some(rgba(0x997582ff).into()), + elevated_surface_background: Some(rgba(0x272022ff).into()), + surface_background: Some(rgba(0x272022ff).into()), + background: Some(rgba(0x322a2dff).into()), + element_background: Some(rgba(0x007e99ff).into()), + text: Some(rgba(0xcbbec2ff).into()), + tab_inactive_background: Some(rgba(0x413036ff).into()), + tab_active_background: Some(rgba(0x322a2dff).into()), + terminal_background: Some(rgba(0x272022ff).into()), + terminal_ansi_bright_black: Some(rgba(0x69545bff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xcbbec2ff).into()), + terminal_ansi_black: Some(rgba(0x47393eff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xb9acb0ff).into()), + ..Default::default() }, }, }, - Theme { - id: "a2e4f327-82e8-41c1-a66f-bc7f27419c2e".into(), + UserTheme { name: "Noctus Hibernus".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x00c6e0ff).into(), - border_variant: rgba(0x00c6e0ff).into(), - border_focused: rgba(0x00c6e0ff).into(), - border_selected: rgba(0x00c6e0ff).into(), - border_transparent: rgba(0x00c6e0ff).into(), - border_disabled: rgba(0x00c6e0ff).into(), - elevated_surface_background: rgba(0xe1eeefff).into(), - surface_background: rgba(0xe1eeefff).into(), - background: rgba(0xf4f6f6ff).into(), - element_background: rgba(0x089099ff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x005661ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xcaedf2ff).into(), - tab_active_background: rgba(0xf4f6f6ff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xe1eeefff).into(), - terminal_ansi_bright_black: rgba(0x004d57ff).into(), - terminal_ansi_bright_red: rgba(0xff3f00ff).into(), - terminal_ansi_bright_green: rgba(0x00d17aff).into(), - terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), - terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), - terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), - terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), - terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), - terminal_ansi_black: rgba(0x003b41ff).into(), - terminal_ansi_red: rgba(0xe34d1bff).into(), - terminal_ansi_green: rgba(0x00b368ff).into(), - terminal_ansi_yellow: rgba(0xf49724ff).into(), - terminal_ansi_blue: rgba(0x0094f0ff).into(), - terminal_ansi_magenta: rgba(0xff5792ff).into(), - terminal_ansi_cyan: rgba(0x00bdd6ff).into(), - terminal_ansi_white: rgba(0x8ca6a6ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x00c6e0ff).into()), + border_variant: Some(rgba(0x00c6e0ff).into()), + border_focused: Some(rgba(0x00c6e0ff).into()), + border_selected: Some(rgba(0x00c6e0ff).into()), + border_transparent: Some(rgba(0x00c6e0ff).into()), + border_disabled: Some(rgba(0x00c6e0ff).into()), + elevated_surface_background: Some(rgba(0xe1eeefff).into()), + surface_background: Some(rgba(0xe1eeefff).into()), + background: Some(rgba(0xf4f6f6ff).into()), + element_background: Some(rgba(0x089099ff).into()), + text: Some(rgba(0x005661ff).into()), + tab_inactive_background: Some(rgba(0xcaedf2ff).into()), + tab_active_background: Some(rgba(0xf4f6f6ff).into()), + terminal_background: Some(rgba(0xe1eeefff).into()), + terminal_ansi_bright_black: Some(rgba(0x004d57ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff3f00ff).into()), + terminal_ansi_bright_green: Some(rgba(0x00d17aff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xff8c00ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x0ea3ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff6b9eff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x00cae6ff).into()), + terminal_ansi_bright_white: Some(rgba(0xbbc3c4ff).into()), + terminal_ansi_black: Some(rgba(0x003b41ff).into()), + terminal_ansi_red: Some(rgba(0xe34d1bff).into()), + terminal_ansi_green: Some(rgba(0x00b368ff).into()), + terminal_ansi_yellow: Some(rgba(0xf49724ff).into()), + terminal_ansi_blue: Some(rgba(0x0094f0ff).into()), + terminal_ansi_magenta: Some(rgba(0xff5792ff).into()), + terminal_ansi_cyan: Some(rgba(0x00bdd6ff).into()), + terminal_ansi_white: Some(rgba(0x8ca6a6ff).into()), + ..Default::default() }, }, }, - Theme { - id: "2fde44fb-e5b2-4cc2-962f-f1c77a4eb12a".into(), + UserTheme { name: "Noctis Lilac".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xaea4f4ff).into(), - border_variant: rgba(0xaea4f4ff).into(), - border_focused: rgba(0xaea4f4ff).into(), - border_selected: rgba(0xaea4f4ff).into(), - border_transparent: rgba(0xaea4f4ff).into(), - border_disabled: rgba(0xaea4f4ff).into(), - elevated_surface_background: rgba(0xe9e7f3ff).into(), - surface_background: rgba(0xe9e7f3ff).into(), - background: rgba(0xf2f1f8ff).into(), - element_background: rgba(0x8d7ffeff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0x0c006bff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0xe2dff6ff).into(), - tab_active_background: rgba(0xf2f1f8ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0xe9e7f3ff).into(), - terminal_ansi_bright_black: rgba(0x0f0080ff).into(), - terminal_ansi_bright_red: rgba(0xff3f00ff).into(), - terminal_ansi_bright_green: rgba(0x00d17aff).into(), - terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), - terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), - terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), - terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), - terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), - terminal_ansi_black: rgba(0x0c006bff).into(), - terminal_ansi_red: rgba(0xe34d1bff).into(), - terminal_ansi_green: rgba(0x00b368ff).into(), - terminal_ansi_yellow: rgba(0xf49724ff).into(), - terminal_ansi_blue: rgba(0x0094f0ff).into(), - terminal_ansi_magenta: rgba(0xff5792ff).into(), - terminal_ansi_cyan: rgba(0x00bdd6ff).into(), - terminal_ansi_white: rgba(0x8ca6a6ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xaea4f4ff).into()), + border_variant: Some(rgba(0xaea4f4ff).into()), + border_focused: Some(rgba(0xaea4f4ff).into()), + border_selected: Some(rgba(0xaea4f4ff).into()), + border_transparent: Some(rgba(0xaea4f4ff).into()), + border_disabled: Some(rgba(0xaea4f4ff).into()), + elevated_surface_background: Some(rgba(0xe9e7f3ff).into()), + surface_background: Some(rgba(0xe9e7f3ff).into()), + background: Some(rgba(0xf2f1f8ff).into()), + element_background: Some(rgba(0x8d7ffeff).into()), + text: Some(rgba(0x0c006bff).into()), + tab_inactive_background: Some(rgba(0xe2dff6ff).into()), + tab_active_background: Some(rgba(0xf2f1f8ff).into()), + terminal_background: Some(rgba(0xe9e7f3ff).into()), + terminal_ansi_bright_black: Some(rgba(0x0f0080ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff3f00ff).into()), + terminal_ansi_bright_green: Some(rgba(0x00d17aff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xff8c00ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x0ea3ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff6b9eff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x00cae6ff).into()), + terminal_ansi_bright_white: Some(rgba(0xbbc3c4ff).into()), + terminal_ansi_black: Some(rgba(0x0c006bff).into()), + terminal_ansi_red: Some(rgba(0xe34d1bff).into()), + terminal_ansi_green: Some(rgba(0x00b368ff).into()), + terminal_ansi_yellow: Some(rgba(0xf49724ff).into()), + terminal_ansi_blue: Some(rgba(0x0094f0ff).into()), + terminal_ansi_magenta: Some(rgba(0xff5792ff).into()), + terminal_ansi_cyan: Some(rgba(0x00bdd6ff).into()), + terminal_ansi_white: Some(rgba(0x8ca6a6ff).into()), + ..Default::default() }, }, }, - Theme { - id: "2b89f218-c238-4905-9578-674d6995d2e0".into(), + UserTheme { name: "Noctis Lux".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x00c6e0ff).into(), - border_variant: rgba(0x00c6e0ff).into(), - border_focused: rgba(0x00c6e0ff).into(), - border_selected: rgba(0x00c6e0ff).into(), - border_transparent: rgba(0x00c6e0ff).into(), - border_disabled: rgba(0x00c6e0ff).into(), - elevated_surface_background: rgba(0xf6eddaff).into(), - surface_background: rgba(0xf6eddaff).into(), - background: rgba(0xfef8ecff).into(), - element_background: rgba(0x089099ff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x005661ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xf0e9d6ff).into(), - tab_active_background: rgba(0xfef8ecff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xf6eddaff).into(), - terminal_ansi_bright_black: rgba(0x004d57ff).into(), - terminal_ansi_bright_red: rgba(0xff3f00ff).into(), - terminal_ansi_bright_green: rgba(0x00d17aff).into(), - terminal_ansi_bright_yellow: rgba(0xff8c00ff).into(), - terminal_ansi_bright_blue: rgba(0x0ea3ffff).into(), - terminal_ansi_bright_magenta: rgba(0xff6b9eff).into(), - terminal_ansi_bright_cyan: rgba(0x00cae6ff).into(), - terminal_ansi_bright_white: rgba(0xbbc3c4ff).into(), - terminal_ansi_black: rgba(0x003b41ff).into(), - terminal_ansi_red: rgba(0xe34d1bff).into(), - terminal_ansi_green: rgba(0x00b368ff).into(), - terminal_ansi_yellow: rgba(0xf49724ff).into(), - terminal_ansi_blue: rgba(0x0094f0ff).into(), - terminal_ansi_magenta: rgba(0xff5792ff).into(), - terminal_ansi_cyan: rgba(0x00bdd6ff).into(), - terminal_ansi_white: rgba(0x8ca6a6ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x00c6e0ff).into()), + border_variant: Some(rgba(0x00c6e0ff).into()), + border_focused: Some(rgba(0x00c6e0ff).into()), + border_selected: Some(rgba(0x00c6e0ff).into()), + border_transparent: Some(rgba(0x00c6e0ff).into()), + border_disabled: Some(rgba(0x00c6e0ff).into()), + elevated_surface_background: Some(rgba(0xf6eddaff).into()), + surface_background: Some(rgba(0xf6eddaff).into()), + background: Some(rgba(0xfef8ecff).into()), + element_background: Some(rgba(0x089099ff).into()), + text: Some(rgba(0x005661ff).into()), + tab_inactive_background: Some(rgba(0xf0e9d6ff).into()), + tab_active_background: Some(rgba(0xfef8ecff).into()), + terminal_background: Some(rgba(0xf6eddaff).into()), + terminal_ansi_bright_black: Some(rgba(0x004d57ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff3f00ff).into()), + terminal_ansi_bright_green: Some(rgba(0x00d17aff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xff8c00ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x0ea3ffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff6b9eff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x00cae6ff).into()), + terminal_ansi_bright_white: Some(rgba(0xbbc3c4ff).into()), + terminal_ansi_black: Some(rgba(0x003b41ff).into()), + terminal_ansi_red: Some(rgba(0xe34d1bff).into()), + terminal_ansi_green: Some(rgba(0x00b368ff).into()), + terminal_ansi_yellow: Some(rgba(0xf49724ff).into()), + terminal_ansi_blue: Some(rgba(0x0094f0ff).into()), + terminal_ansi_magenta: Some(rgba(0xff5792ff).into()), + terminal_ansi_cyan: Some(rgba(0x00bdd6ff).into()), + terminal_ansi_white: Some(rgba(0x8ca6a6ff).into()), + ..Default::default() }, }, }, - Theme { - id: "f88e2cd7-2415-4118-a638-5cfd3132ecf8".into(), + UserTheme { name: "Noctis Minimus".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x496c83ff).into(), - border_variant: rgba(0x496c83ff).into(), - border_focused: rgba(0x496c83ff).into(), - border_selected: rgba(0x496c83ff).into(), - border_transparent: rgba(0x496c83ff).into(), - border_disabled: rgba(0x496c83ff).into(), - elevated_surface_background: rgba(0x0e1920ff).into(), - surface_background: rgba(0x0e1920ff).into(), - background: rgba(0x1b2932ff).into(), - element_background: rgba(0x2e616bff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xc5cdd3ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x202d37ff).into(), - tab_active_background: rgba(0x1b2932ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x0e1920ff).into(), - terminal_ansi_bright_black: rgba(0x425866ff).into(), - terminal_ansi_bright_red: rgba(0xca8468ff).into(), - terminal_ansi_bright_green: rgba(0x84c8abff).into(), - terminal_ansi_bright_yellow: rgba(0xd1aa7bff).into(), - terminal_ansi_bright_blue: rgba(0x68a4caff).into(), - terminal_ansi_bright_magenta: rgba(0xc88da2ff).into(), - terminal_ansi_bright_cyan: rgba(0x84bfc8ff).into(), - terminal_ansi_bright_white: rgba(0xc5d1d3ff).into(), - terminal_ansi_black: rgba(0x182935ff).into(), - terminal_ansi_red: rgba(0xc08872ff).into(), - terminal_ansi_green: rgba(0x72c09fff).into(), - terminal_ansi_yellow: rgba(0xc8a984ff).into(), - terminal_ansi_blue: rgba(0x6095b7ff).into(), - terminal_ansi_magenta: rgba(0xc28097ff).into(), - terminal_ansi_cyan: rgba(0x72b7c0ff).into(), - terminal_ansi_white: rgba(0xc5cdd3ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x496c83ff).into()), + border_variant: Some(rgba(0x496c83ff).into()), + border_focused: Some(rgba(0x496c83ff).into()), + border_selected: Some(rgba(0x496c83ff).into()), + border_transparent: Some(rgba(0x496c83ff).into()), + border_disabled: Some(rgba(0x496c83ff).into()), + elevated_surface_background: Some(rgba(0x0e1920ff).into()), + surface_background: Some(rgba(0x0e1920ff).into()), + background: Some(rgba(0x1b2932ff).into()), + element_background: Some(rgba(0x2e616bff).into()), + text: Some(rgba(0xc5cdd3ff).into()), + tab_inactive_background: Some(rgba(0x202d37ff).into()), + tab_active_background: Some(rgba(0x1b2932ff).into()), + terminal_background: Some(rgba(0x0e1920ff).into()), + terminal_ansi_bright_black: Some(rgba(0x425866ff).into()), + terminal_ansi_bright_red: Some(rgba(0xca8468ff).into()), + terminal_ansi_bright_green: Some(rgba(0x84c8abff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xd1aa7bff).into()), + terminal_ansi_bright_blue: Some(rgba(0x68a4caff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc88da2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x84bfc8ff).into()), + terminal_ansi_bright_white: Some(rgba(0xc5d1d3ff).into()), + terminal_ansi_black: Some(rgba(0x182935ff).into()), + terminal_ansi_red: Some(rgba(0xc08872ff).into()), + terminal_ansi_green: Some(rgba(0x72c09fff).into()), + terminal_ansi_yellow: Some(rgba(0xc8a984ff).into()), + terminal_ansi_blue: Some(rgba(0x6095b7ff).into()), + terminal_ansi_magenta: Some(rgba(0xc28097ff).into()), + terminal_ansi_cyan: Some(rgba(0x72b7c0ff).into()), + terminal_ansi_white: Some(rgba(0xc5cdd3ff).into()), + ..Default::default() }, }, }, - Theme { - id: "c4d43fc2-6166-47b7-8c5c-dd24afd4b735".into(), + UserTheme { name: "Noctis".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x0d6571ff).into(), - border_variant: rgba(0x0d6571ff).into(), - border_focused: rgba(0x0d6571ff).into(), - border_selected: rgba(0x0d6571ff).into(), - border_transparent: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), - elevated_surface_background: rgba(0x03181aff).into(), - surface_background: rgba(0x03181aff).into(), - background: rgba(0x052428ff).into(), - element_background: rgba(0x089099ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xb1c9ccff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x052e32ff).into(), - tab_active_background: rgba(0x052428ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x03181aff).into(), - terminal_ansi_bright_black: rgba(0x47686cff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), - terminal_ansi_black: rgba(0x324a4dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xb1c9ccff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x0d6571ff).into()), + border_variant: Some(rgba(0x0d6571ff).into()), + border_focused: Some(rgba(0x0d6571ff).into()), + border_selected: Some(rgba(0x0d6571ff).into()), + border_transparent: Some(rgba(0x0d6571ff).into()), + border_disabled: Some(rgba(0x0d6571ff).into()), + elevated_surface_background: Some(rgba(0x03181aff).into()), + surface_background: Some(rgba(0x03181aff).into()), + background: Some(rgba(0x052428ff).into()), + element_background: Some(rgba(0x089099ff).into()), + text: Some(rgba(0xb1c9ccff).into()), + tab_inactive_background: Some(rgba(0x052e32ff).into()), + tab_active_background: Some(rgba(0x052428ff).into()), + terminal_background: Some(rgba(0x03181aff).into()), + terminal_ansi_bright_black: Some(rgba(0x47686cff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xc1d4d7ff).into()), + terminal_ansi_black: Some(rgba(0x324a4dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xb1c9ccff).into()), + ..Default::default() }, }, }, - Theme { - id: "7253a515-c612-403c-89de-5b62dc5cbac7".into(), + UserTheme { name: "Noctis Obscuro".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x0d6571ff).into(), - border_variant: rgba(0x0d6571ff).into(), - border_focused: rgba(0x0d6571ff).into(), - border_selected: rgba(0x0d6571ff).into(), - border_transparent: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), - elevated_surface_background: rgba(0x020c0eff).into(), - surface_background: rgba(0x020c0eff).into(), - background: rgba(0x031316ff).into(), - element_background: rgba(0x089099ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xb1c9ccff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x052e32ff).into(), - tab_active_background: rgba(0x031316ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x020c0eff).into(), - terminal_ansi_bright_black: rgba(0x47686cff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), - terminal_ansi_black: rgba(0x324a4dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xb1c9ccff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x0d6571ff).into()), + border_variant: Some(rgba(0x0d6571ff).into()), + border_focused: Some(rgba(0x0d6571ff).into()), + border_selected: Some(rgba(0x0d6571ff).into()), + border_transparent: Some(rgba(0x0d6571ff).into()), + border_disabled: Some(rgba(0x0d6571ff).into()), + elevated_surface_background: Some(rgba(0x020c0eff).into()), + surface_background: Some(rgba(0x020c0eff).into()), + background: Some(rgba(0x031316ff).into()), + element_background: Some(rgba(0x089099ff).into()), + text: Some(rgba(0xb1c9ccff).into()), + tab_inactive_background: Some(rgba(0x052e32ff).into()), + tab_active_background: Some(rgba(0x031316ff).into()), + terminal_background: Some(rgba(0x020c0eff).into()), + terminal_ansi_bright_black: Some(rgba(0x47686cff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xc1d4d7ff).into()), + terminal_ansi_black: Some(rgba(0x324a4dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xb1c9ccff).into()), + ..Default::default() }, }, }, - Theme { - id: "b0f2d7b8-ac5f-466f-9bbf-e7cac242149c".into(), + UserTheme { name: "Noctis Sereno".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x0d6571ff).into(), - border_variant: rgba(0x0d6571ff).into(), - border_focused: rgba(0x0d6571ff).into(), - border_selected: rgba(0x0d6571ff).into(), - border_transparent: rgba(0x0d6571ff).into(), - border_disabled: rgba(0x0d6571ff).into(), - elevated_surface_background: rgba(0x020c0eff).into(), - surface_background: rgba(0x020c0eff).into(), - background: rgba(0x031316ff).into(), - element_background: rgba(0x089099ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xb1c9ccff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x052e32ff).into(), - tab_active_background: rgba(0x031316ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x020c0eff).into(), - terminal_ansi_bright_black: rgba(0x47686cff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xc1d4d7ff).into(), - terminal_ansi_black: rgba(0x324a4dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xb1c9ccff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x0d6571ff).into()), + border_variant: Some(rgba(0x0d6571ff).into()), + border_focused: Some(rgba(0x0d6571ff).into()), + border_selected: Some(rgba(0x0d6571ff).into()), + border_transparent: Some(rgba(0x0d6571ff).into()), + border_disabled: Some(rgba(0x0d6571ff).into()), + elevated_surface_background: Some(rgba(0x020c0eff).into()), + surface_background: Some(rgba(0x020c0eff).into()), + background: Some(rgba(0x031316ff).into()), + element_background: Some(rgba(0x089099ff).into()), + text: Some(rgba(0xb1c9ccff).into()), + tab_inactive_background: Some(rgba(0x052e32ff).into()), + tab_active_background: Some(rgba(0x031316ff).into()), + terminal_background: Some(rgba(0x020c0eff).into()), + terminal_ansi_bright_black: Some(rgba(0x47686cff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xc1d4d7ff).into()), + terminal_ansi_black: Some(rgba(0x324a4dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xb1c9ccff).into()), + ..Default::default() }, }, }, - Theme { - id: "331ce3fd-8faf-4a46-ad89-2c678abc4cd3".into(), + UserTheme { name: "Noctis Uva".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x6d66a7ff).into(), - border_variant: rgba(0x6d66a7ff).into(), - border_focused: rgba(0x6d66a7ff).into(), - border_selected: rgba(0x6d66a7ff).into(), - border_transparent: rgba(0x6d66a7ff).into(), - border_disabled: rgba(0x6d66a7ff).into(), - elevated_surface_background: rgba(0x1f1d30ff).into(), - surface_background: rgba(0x1f1d30ff).into(), - background: rgba(0x292640ff).into(), - element_background: rgba(0x007e99ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xc5c2d6ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x2f2c49ff).into(), - tab_active_background: rgba(0x292640ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x1f1d30ff).into(), - terminal_ansi_bright_black: rgba(0x504e65ff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xc5c2d6ff).into(), - terminal_ansi_black: rgba(0x302f3dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xb6b3ccff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x6d66a7ff).into()), + border_variant: Some(rgba(0x6d66a7ff).into()), + border_focused: Some(rgba(0x6d66a7ff).into()), + border_selected: Some(rgba(0x6d66a7ff).into()), + border_transparent: Some(rgba(0x6d66a7ff).into()), + border_disabled: Some(rgba(0x6d66a7ff).into()), + elevated_surface_background: Some(rgba(0x1f1d30ff).into()), + surface_background: Some(rgba(0x1f1d30ff).into()), + background: Some(rgba(0x292640ff).into()), + element_background: Some(rgba(0x007e99ff).into()), + text: Some(rgba(0xc5c2d6ff).into()), + tab_inactive_background: Some(rgba(0x2f2c49ff).into()), + tab_active_background: Some(rgba(0x292640ff).into()), + terminal_background: Some(rgba(0x1f1d30ff).into()), + terminal_ansi_bright_black: Some(rgba(0x504e65ff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xc5c2d6ff).into()), + terminal_ansi_black: Some(rgba(0x302f3dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xb6b3ccff).into()), + ..Default::default() }, }, }, - Theme { - id: "209964f1-6a61-4e40-a605-be245555c493".into(), + UserTheme { name: "Noctis Viola".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x8666a7ff).into(), - border_variant: rgba(0x8666a7ff).into(), - border_focused: rgba(0x8666a7ff).into(), - border_selected: rgba(0x8666a7ff).into(), - border_transparent: rgba(0x8666a7ff).into(), - border_disabled: rgba(0x8666a7ff).into(), - elevated_surface_background: rgba(0x291d35ff).into(), - surface_background: rgba(0x291d35ff).into(), - background: rgba(0x30243dff).into(), - element_background: rgba(0x007e99ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xccbfd9ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x3d2e4dff).into(), - tab_active_background: rgba(0x30243dff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x291d35ff).into(), - terminal_ansi_bright_black: rgba(0x594e65ff).into(), - terminal_ansi_bright_red: rgba(0xe97749ff).into(), - terminal_ansi_bright_green: rgba(0x5febb1ff).into(), - terminal_ansi_bright_yellow: rgba(0xe69532ff).into(), - terminal_ansi_bright_blue: rgba(0x5fb5ebff).into(), - terminal_ansi_bright_magenta: rgba(0xe697b2ff).into(), - terminal_ansi_bright_cyan: rgba(0x5fdaebff).into(), - terminal_ansi_bright_white: rgba(0xccbfd9ff).into(), - terminal_ansi_black: rgba(0x362f3dff).into(), - terminal_ansi_red: rgba(0xe66432ff).into(), - terminal_ansi_green: rgba(0x49e9a6ff).into(), - terminal_ansi_yellow: rgba(0xe4b781ff).into(), - terminal_ansi_blue: rgba(0x49ace9ff).into(), - terminal_ansi_magenta: rgba(0xdf759aff).into(), - terminal_ansi_cyan: rgba(0x49d5e9ff).into(), - terminal_ansi_white: rgba(0xbfafcfff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x8666a7ff).into()), + border_variant: Some(rgba(0x8666a7ff).into()), + border_focused: Some(rgba(0x8666a7ff).into()), + border_selected: Some(rgba(0x8666a7ff).into()), + border_transparent: Some(rgba(0x8666a7ff).into()), + border_disabled: Some(rgba(0x8666a7ff).into()), + elevated_surface_background: Some(rgba(0x291d35ff).into()), + surface_background: Some(rgba(0x291d35ff).into()), + background: Some(rgba(0x30243dff).into()), + element_background: Some(rgba(0x007e99ff).into()), + text: Some(rgba(0xccbfd9ff).into()), + tab_inactive_background: Some(rgba(0x3d2e4dff).into()), + tab_active_background: Some(rgba(0x30243dff).into()), + terminal_background: Some(rgba(0x291d35ff).into()), + terminal_ansi_bright_black: Some(rgba(0x594e65ff).into()), + terminal_ansi_bright_red: Some(rgba(0xe97749ff).into()), + terminal_ansi_bright_green: Some(rgba(0x5febb1ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xe69532ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x5fb5ebff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xe697b2ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x5fdaebff).into()), + terminal_ansi_bright_white: Some(rgba(0xccbfd9ff).into()), + terminal_ansi_black: Some(rgba(0x362f3dff).into()), + terminal_ansi_red: Some(rgba(0xe66432ff).into()), + terminal_ansi_green: Some(rgba(0x49e9a6ff).into()), + terminal_ansi_yellow: Some(rgba(0xe4b781ff).into()), + terminal_ansi_blue: Some(rgba(0x49ace9ff).into()), + terminal_ansi_magenta: Some(rgba(0xdf759aff).into()), + terminal_ansi_cyan: Some(rgba(0x49d5e9ff).into()), + terminal_ansi_white: Some(rgba(0xbfafcfff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs index bd8f9bb560a41738ab3cbf8a87e1435ac6fa24a2..64df5d7ecbf35c5e61a1555299bdb48bd9aab3b0 100644 --- a/crates/theme2/src/themes/palenight.rs +++ b/crates/theme2/src/themes/palenight.rs @@ -1,518 +1,128 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn palenight() -> ThemeFamily { - ThemeFamily { - id: "16313d66-dab6-468a-82f6-e69759fdd8cf".into(), +pub fn palenight() -> UserThemeFamily { + UserThemeFamily { name: "Palenight".into(), author: "Olaolu Olawuyi (whizkydee)".into(), themes: vec![ - Theme { - id: "39fdf216-2c76-4b3d-b368-7c31f479d524".into(), + UserTheme { name: "Palenight".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x282b3bff).into(), - border_variant: rgba(0x282b3bff).into(), - border_focused: rgba(0x282b3bff).into(), - border_selected: rgba(0x282b3bff).into(), - border_transparent: rgba(0x282b3bff).into(), - border_disabled: rgba(0x282b3bff).into(), - elevated_surface_background: rgba(0x292c3eff).into(), - surface_background: rgba(0x292c3eff).into(), - background: rgba(0x292c3eff).into(), - element_background: rgba(0x7d56c1cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xffffffff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x31364aff).into(), - tab_active_background: rgba(0x292c3eff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x676e95ff).into(), - terminal_ansi_bright_red: rgba(0xff5571ff).into(), - terminal_ansi_bright_green: rgba(0xc3e88dff).into(), - terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_bright_blue: rgba(0x82aaffff).into(), - terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), - terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x676e95ff).into(), - terminal_ansi_red: rgba(0xff5571ff).into(), - terminal_ansi_green: rgba(0xa9c77dff).into(), - terminal_ansi_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_blue: rgba(0x82aaffff).into(), - terminal_ansi_magenta: rgba(0xc792eaff).into(), - terminal_ansi_cyan: rgba(0x89ddffff).into(), - terminal_ansi_white: rgba(0xffffffff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x282b3bff).into()), + border_variant: Some(rgba(0x282b3bff).into()), + border_focused: Some(rgba(0x282b3bff).into()), + border_selected: Some(rgba(0x282b3bff).into()), + border_transparent: Some(rgba(0x282b3bff).into()), + border_disabled: Some(rgba(0x282b3bff).into()), + elevated_surface_background: Some(rgba(0x292c3eff).into()), + surface_background: Some(rgba(0x292c3eff).into()), + background: Some(rgba(0x292c3eff).into()), + element_background: Some(rgba(0x7d56c1cc).into()), + text: Some(rgba(0xffffffff).into()), + tab_inactive_background: Some(rgba(0x31364aff).into()), + tab_active_background: Some(rgba(0x292c3eff).into()), + terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_green: Some(rgba(0xa9c77dff).into()), + terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_white: Some(rgba(0xffffffff).into()), + ..Default::default() }, }, }, - Theme { - id: "5ff8120f-37e9-4ad3-8bd0-c3e449ff1aa1".into(), + UserTheme { name: "Palenight Operator".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x282b3bff).into(), - border_variant: rgba(0x282b3bff).into(), - border_focused: rgba(0x282b3bff).into(), - border_selected: rgba(0x282b3bff).into(), - border_transparent: rgba(0x282b3bff).into(), - border_disabled: rgba(0x282b3bff).into(), - elevated_surface_background: rgba(0x292c3eff).into(), - surface_background: rgba(0x292c3eff).into(), - background: rgba(0x292c3eff).into(), - element_background: rgba(0x7d56c1cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xffffffff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x31364aff).into(), - tab_active_background: rgba(0x292c3eff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x676e95ff).into(), - terminal_ansi_bright_red: rgba(0xff5571ff).into(), - terminal_ansi_bright_green: rgba(0xc3e88dff).into(), - terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_bright_blue: rgba(0x82aaffff).into(), - terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), - terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x676e95ff).into(), - terminal_ansi_red: rgba(0xff5571ff).into(), - terminal_ansi_green: rgba(0xa9c77dff).into(), - terminal_ansi_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_blue: rgba(0x82aaffff).into(), - terminal_ansi_magenta: rgba(0xc792eaff).into(), - terminal_ansi_cyan: rgba(0x89ddffff).into(), - terminal_ansi_white: rgba(0xffffffff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x282b3bff).into()), + border_variant: Some(rgba(0x282b3bff).into()), + border_focused: Some(rgba(0x282b3bff).into()), + border_selected: Some(rgba(0x282b3bff).into()), + border_transparent: Some(rgba(0x282b3bff).into()), + border_disabled: Some(rgba(0x282b3bff).into()), + elevated_surface_background: Some(rgba(0x292c3eff).into()), + surface_background: Some(rgba(0x292c3eff).into()), + background: Some(rgba(0x292c3eff).into()), + element_background: Some(rgba(0x7d56c1cc).into()), + text: Some(rgba(0xffffffff).into()), + tab_inactive_background: Some(rgba(0x31364aff).into()), + tab_active_background: Some(rgba(0x292c3eff).into()), + terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_green: Some(rgba(0xa9c77dff).into()), + terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_white: Some(rgba(0xffffffff).into()), + ..Default::default() }, }, }, - Theme { - id: "cff26efb-72f8-4496-b33b-991080a47f1c".into(), + UserTheme { name: "Palenight (Mild Contrast)".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x2c2f40ff).into(), - border_variant: rgba(0x2c2f40ff).into(), - border_focused: rgba(0x2c2f40ff).into(), - border_selected: rgba(0x2c2f40ff).into(), - border_transparent: rgba(0x2c2f40ff).into(), - border_disabled: rgba(0x2c2f40ff).into(), - elevated_surface_background: rgba(0x25283aff).into(), - surface_background: rgba(0x25283aff).into(), - background: rgba(0x292c3eff).into(), - element_background: rgba(0x7d56c1cc).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xffffffff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x31364aff).into(), - tab_active_background: rgba(0x25283aff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x676e95ff).into(), - terminal_ansi_bright_red: rgba(0xff5571ff).into(), - terminal_ansi_bright_green: rgba(0xc3e88dff).into(), - terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_bright_blue: rgba(0x82aaffff).into(), - terminal_ansi_bright_magenta: rgba(0xc792eaff).into(), - terminal_ansi_bright_cyan: rgba(0x89ddffff).into(), - terminal_ansi_bright_white: rgba(0xffffffff).into(), - terminal_ansi_black: rgba(0x676e95ff).into(), - terminal_ansi_red: rgba(0xff5571ff).into(), - terminal_ansi_green: rgba(0xa9c77dff).into(), - terminal_ansi_yellow: rgba(0xffcb6bff).into(), - terminal_ansi_blue: rgba(0x82aaffff).into(), - terminal_ansi_magenta: rgba(0xc792eaff).into(), - terminal_ansi_cyan: rgba(0x89ddffff).into(), - terminal_ansi_white: rgba(0xffffffff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x2c2f40ff).into()), + border_variant: Some(rgba(0x2c2f40ff).into()), + border_focused: Some(rgba(0x2c2f40ff).into()), + border_selected: Some(rgba(0x2c2f40ff).into()), + border_transparent: Some(rgba(0x2c2f40ff).into()), + border_disabled: Some(rgba(0x2c2f40ff).into()), + elevated_surface_background: Some(rgba(0x25283aff).into()), + surface_background: Some(rgba(0x25283aff).into()), + background: Some(rgba(0x292c3eff).into()), + element_background: Some(rgba(0x7d56c1cc).into()), + text: Some(rgba(0xffffffff).into()), + tab_inactive_background: Some(rgba(0x31364aff).into()), + tab_active_background: Some(rgba(0x25283aff).into()), + terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_bright_white: Some(rgba(0xffffffff).into()), + terminal_ansi_black: Some(rgba(0x676e95ff).into()), + terminal_ansi_red: Some(rgba(0xff5571ff).into()), + terminal_ansi_green: Some(rgba(0xa9c77dff).into()), + terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()), + terminal_ansi_blue: Some(rgba(0x82aaffff).into()), + terminal_ansi_magenta: Some(rgba(0xc792eaff).into()), + terminal_ansi_cyan: Some(rgba(0x89ddffff).into()), + terminal_ansi_white: Some(rgba(0xffffffff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index 4c551e4ad7765c6b301da5066e4e07d290856821..6fd641861a23042b5320f98a0ac0cab972a6542e 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -1,518 +1,128 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn rose_pine() -> ThemeFamily { - ThemeFamily { - id: "9cf70eba-1185-4f3e-adb7-74f61c45c9dc".into(), +pub fn rose_pine() -> UserThemeFamily { + UserThemeFamily { name: "Rose Pine".into(), author: "Rosé Pine".into(), themes: vec![ - Theme { - id: "80a8f5dd-2ab5-4ee7-9b25-a60c8513234e".into(), + UserTheme { name: "Rose Pine".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x000000ff).into(), - border_variant: rgba(0x000000ff).into(), - border_focused: rgba(0x000000ff).into(), - border_selected: rgba(0x000000ff).into(), - border_transparent: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), - elevated_surface_background: rgba(0x1f1d2eff).into(), - surface_background: rgba(0x1f1d2eff).into(), - background: rgba(0x191724ff).into(), - element_background: rgba(0xebbcbaff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xe0def4ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x000000ff).into(), - tab_active_background: rgba(0x6e6a861a).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x908caaff).into(), - terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), - terminal_ansi_bright_green: rgba(0x30738fff).into(), - terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(), - terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(), - terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(), - terminal_ansi_bright_cyan: rgba(0xebbcbaff).into(), - terminal_ansi_bright_white: rgba(0xe0def4ff).into(), - terminal_ansi_black: rgba(0x26233aff).into(), - terminal_ansi_red: rgba(0xeb6f92ff).into(), - terminal_ansi_green: rgba(0x30738fff).into(), - terminal_ansi_yellow: rgba(0xf5c177ff).into(), - terminal_ansi_blue: rgba(0x9ccfd8ff).into(), - terminal_ansi_magenta: rgba(0xc4a7e7ff).into(), - terminal_ansi_cyan: rgba(0xebbcbaff).into(), - terminal_ansi_white: rgba(0xe0def4ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x000000ff).into()), + border_variant: Some(rgba(0x000000ff).into()), + border_focused: Some(rgba(0x000000ff).into()), + border_selected: Some(rgba(0x000000ff).into()), + border_transparent: Some(rgba(0x000000ff).into()), + border_disabled: Some(rgba(0x000000ff).into()), + elevated_surface_background: Some(rgba(0x1f1d2eff).into()), + surface_background: Some(rgba(0x1f1d2eff).into()), + background: Some(rgba(0x191724ff).into()), + element_background: Some(rgba(0xebbcbaff).into()), + text: Some(rgba(0xe0def4ff).into()), + tab_inactive_background: Some(rgba(0x000000ff).into()), + tab_active_background: Some(rgba(0x6e6a861a).into()), + terminal_ansi_bright_black: Some(rgba(0x908caaff).into()), + terminal_ansi_bright_red: Some(rgba(0xeb6f92ff).into()), + terminal_ansi_bright_green: Some(rgba(0x30738fff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xf5c177ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x9ccfd8ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc4a7e7ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0xebbcbaff).into()), + terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()), + terminal_ansi_black: Some(rgba(0x26233aff).into()), + terminal_ansi_red: Some(rgba(0xeb6f92ff).into()), + terminal_ansi_green: Some(rgba(0x30738fff).into()), + terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()), + terminal_ansi_blue: Some(rgba(0x9ccfd8ff).into()), + terminal_ansi_magenta: Some(rgba(0xc4a7e7ff).into()), + terminal_ansi_cyan: Some(rgba(0xebbcbaff).into()), + terminal_ansi_white: Some(rgba(0xe0def4ff).into()), + ..Default::default() }, }, }, - Theme { - id: "fe9e3c9e-954e-4f8e-849e-451ba5f6ceca".into(), + UserTheme { name: "Rose Moon".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x000000ff).into(), - border_variant: rgba(0x000000ff).into(), - border_focused: rgba(0x000000ff).into(), - border_selected: rgba(0x000000ff).into(), - border_transparent: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), - elevated_surface_background: rgba(0x2a273eff).into(), - surface_background: rgba(0x2a273eff).into(), - background: rgba(0x232136ff).into(), - element_background: rgba(0xea9a97ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xe0def4ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x000000ff).into(), - tab_active_background: rgba(0x817c9c14).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x908caaff).into(), - terminal_ansi_bright_red: rgba(0xeb6f92ff).into(), - terminal_ansi_bright_green: rgba(0x3d8fb0ff).into(), - terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(), - terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(), - terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(), - terminal_ansi_bright_cyan: rgba(0xea9a97ff).into(), - terminal_ansi_bright_white: rgba(0xe0def4ff).into(), - terminal_ansi_black: rgba(0x393552ff).into(), - terminal_ansi_red: rgba(0xeb6f92ff).into(), - terminal_ansi_green: rgba(0x3d8fb0ff).into(), - terminal_ansi_yellow: rgba(0xf5c177ff).into(), - terminal_ansi_blue: rgba(0x9ccfd8ff).into(), - terminal_ansi_magenta: rgba(0xc4a7e7ff).into(), - terminal_ansi_cyan: rgba(0xea9a97ff).into(), - terminal_ansi_white: rgba(0xe0def4ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x000000ff).into()), + border_variant: Some(rgba(0x000000ff).into()), + border_focused: Some(rgba(0x000000ff).into()), + border_selected: Some(rgba(0x000000ff).into()), + border_transparent: Some(rgba(0x000000ff).into()), + border_disabled: Some(rgba(0x000000ff).into()), + elevated_surface_background: Some(rgba(0x2a273eff).into()), + surface_background: Some(rgba(0x2a273eff).into()), + background: Some(rgba(0x232136ff).into()), + element_background: Some(rgba(0xea9a97ff).into()), + text: Some(rgba(0xe0def4ff).into()), + tab_inactive_background: Some(rgba(0x000000ff).into()), + tab_active_background: Some(rgba(0x817c9c14).into()), + terminal_ansi_bright_black: Some(rgba(0x908caaff).into()), + terminal_ansi_bright_red: Some(rgba(0xeb6f92ff).into()), + terminal_ansi_bright_green: Some(rgba(0x3d8fb0ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xf5c177ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x9ccfd8ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xc4a7e7ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0xea9a97ff).into()), + terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()), + terminal_ansi_black: Some(rgba(0x393552ff).into()), + terminal_ansi_red: Some(rgba(0xeb6f92ff).into()), + terminal_ansi_green: Some(rgba(0x3d8fb0ff).into()), + terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()), + terminal_ansi_blue: Some(rgba(0x9ccfd8ff).into()), + terminal_ansi_magenta: Some(rgba(0xc4a7e7ff).into()), + terminal_ansi_cyan: Some(rgba(0xea9a97ff).into()), + terminal_ansi_white: Some(rgba(0xe0def4ff).into()), + ..Default::default() }, }, }, - Theme { - id: "00cc7f69-9658-443e-b643-1c8dbffa047d".into(), + UserTheme { name: "Rose Pine Dawn".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x000000ff).into(), - border_variant: rgba(0x000000ff).into(), - border_focused: rgba(0x000000ff).into(), - border_selected: rgba(0x000000ff).into(), - border_transparent: rgba(0x000000ff).into(), - border_disabled: rgba(0x000000ff).into(), - elevated_surface_background: rgba(0xfffaf3ff).into(), - surface_background: rgba(0xfffaf3ff).into(), - background: rgba(0xfaf4edff).into(), - element_background: rgba(0xd7827dff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x575279ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0x000000ff).into(), - tab_active_background: rgba(0x6e6a860d).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xfcfcfdff).into(), - terminal_ansi_bright_black: rgba(0x797593ff).into(), - terminal_ansi_bright_red: rgba(0xb3627aff).into(), - terminal_ansi_bright_green: rgba(0x276983ff).into(), - terminal_ansi_bright_yellow: rgba(0xea9d34ff).into(), - terminal_ansi_bright_blue: rgba(0x55949fff).into(), - terminal_ansi_bright_magenta: rgba(0x9079a9ff).into(), - terminal_ansi_bright_cyan: rgba(0xd7827dff).into(), - terminal_ansi_bright_white: rgba(0x575279ff).into(), - terminal_ansi_black: rgba(0xf2e9e1ff).into(), - terminal_ansi_red: rgba(0xb3627aff).into(), - terminal_ansi_green: rgba(0x276983ff).into(), - terminal_ansi_yellow: rgba(0xea9d34ff).into(), - terminal_ansi_blue: rgba(0x55949fff).into(), - terminal_ansi_magenta: rgba(0x9079a9ff).into(), - terminal_ansi_cyan: rgba(0xd7827dff).into(), - terminal_ansi_white: rgba(0x575279ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x000000ff).into()), + border_variant: Some(rgba(0x000000ff).into()), + border_focused: Some(rgba(0x000000ff).into()), + border_selected: Some(rgba(0x000000ff).into()), + border_transparent: Some(rgba(0x000000ff).into()), + border_disabled: Some(rgba(0x000000ff).into()), + elevated_surface_background: Some(rgba(0xfffaf3ff).into()), + surface_background: Some(rgba(0xfffaf3ff).into()), + background: Some(rgba(0xfaf4edff).into()), + element_background: Some(rgba(0xd7827dff).into()), + text: Some(rgba(0x575279ff).into()), + tab_inactive_background: Some(rgba(0x000000ff).into()), + tab_active_background: Some(rgba(0x6e6a860d).into()), + terminal_ansi_bright_black: Some(rgba(0x797593ff).into()), + terminal_ansi_bright_red: Some(rgba(0xb3627aff).into()), + terminal_ansi_bright_green: Some(rgba(0x276983ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xea9d34ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x55949fff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x9079a9ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0xd7827dff).into()), + terminal_ansi_bright_white: Some(rgba(0x575279ff).into()), + terminal_ansi_black: Some(rgba(0xf2e9e1ff).into()), + terminal_ansi_red: Some(rgba(0xb3627aff).into()), + terminal_ansi_green: Some(rgba(0x276983ff).into()), + terminal_ansi_yellow: Some(rgba(0xea9d34ff).into()), + terminal_ansi_blue: Some(rgba(0x55949fff).into()), + terminal_ansi_magenta: Some(rgba(0x9079a9ff).into()), + terminal_ansi_cyan: Some(rgba(0xd7827dff).into()), + terminal_ansi_white: Some(rgba(0x575279ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index 4198553337753179c7f42fec6e248b14fb4f18c6..1f1c55f0817f26554953a332b7cd74d3320bbae4 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -1,351 +1,84 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn solarized() -> ThemeFamily { - ThemeFamily { - id: "96299b3e-c749-478c-bfc9-c96cdaea8630".into(), +pub fn solarized() -> UserThemeFamily { + UserThemeFamily { name: "Solarized".into(), author: "Ethan Schoonover (altercation)".into(), themes: vec![ - Theme { - id: "265f93c5-c8e7-4962-b083-8550f4b5c2ff".into(), + UserTheme { name: "Solarized Dark".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x003847ff).into(), - border_variant: rgba(0x003847ff).into(), - border_focused: rgba(0x003847ff).into(), - border_selected: rgba(0x003847ff).into(), - border_transparent: rgba(0x003847ff).into(), - border_disabled: rgba(0x003847ff).into(), - elevated_surface_background: rgba(0x18191bff).into(), - surface_background: rgba(0x18191bff).into(), - background: rgba(0x002a35ff).into(), - element_background: rgba(0x29a19899).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xedeef0ff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x003f51ff).into(), - tab_active_background: rgba(0x002a36ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x586e75ff).into(), - terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), - terminal_ansi_bright_green: rgba(0x859900ff).into(), - terminal_ansi_bright_yellow: rgba(0x657b83ff).into(), - terminal_ansi_bright_blue: rgba(0x839496ff).into(), - terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(), - terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(), - terminal_ansi_bright_white: rgba(0x839496ff).into(), - terminal_ansi_black: rgba(0x063642ff).into(), - terminal_ansi_red: rgba(0xdc312eff).into(), - terminal_ansi_green: rgba(0x859900ff).into(), - terminal_ansi_yellow: rgba(0xb58800ff).into(), - terminal_ansi_blue: rgba(0x258ad2ff).into(), - terminal_ansi_magenta: rgba(0xd33582ff).into(), - terminal_ansi_cyan: rgba(0x29a198ff).into(), - terminal_ansi_white: rgba(0x839496ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0x003847ff).into()), + border_variant: Some(rgba(0x003847ff).into()), + border_focused: Some(rgba(0x003847ff).into()), + border_selected: Some(rgba(0x003847ff).into()), + border_transparent: Some(rgba(0x003847ff).into()), + border_disabled: Some(rgba(0x003847ff).into()), + background: Some(rgba(0x002a35ff).into()), + element_background: Some(rgba(0x29a19899).into()), + tab_inactive_background: Some(rgba(0x003f51ff).into()), + tab_active_background: Some(rgba(0x002a36ff).into()), + terminal_ansi_bright_black: Some(rgba(0x586e75ff).into()), + terminal_ansi_bright_red: Some(rgba(0xcb4b15ff).into()), + terminal_ansi_bright_green: Some(rgba(0x859900ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0x657b83ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x839496ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x6c71c4ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x93a1a1ff).into()), + terminal_ansi_bright_white: Some(rgba(0x839496ff).into()), + terminal_ansi_black: Some(rgba(0x063642ff).into()), + terminal_ansi_red: Some(rgba(0xdc312eff).into()), + terminal_ansi_green: Some(rgba(0x859900ff).into()), + terminal_ansi_yellow: Some(rgba(0xb58800ff).into()), + terminal_ansi_blue: Some(rgba(0x258ad2ff).into()), + terminal_ansi_magenta: Some(rgba(0xd33582ff).into()), + terminal_ansi_cyan: Some(rgba(0x29a198ff).into()), + terminal_ansi_white: Some(rgba(0x839496ff).into()), + ..Default::default() }, }, }, - Theme { - id: "40e2070d-5846-4182-9dc9-bf56badf019f".into(), + UserTheme { name: "Solarized Light".into(), appearance: Appearance::Light, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0xddd6c1ff).into(), - border_variant: rgba(0xddd6c1ff).into(), - border_focused: rgba(0xddd6c1ff).into(), - border_selected: rgba(0xddd6c1ff).into(), - border_transparent: rgba(0xddd6c1ff).into(), - border_disabled: rgba(0xddd6c1ff).into(), - elevated_surface_background: rgba(0xf9f9fbff).into(), - surface_background: rgba(0xf9f9fbff).into(), - background: rgba(0xfdf6e3ff).into(), - element_background: rgba(0xab9d56ff).into(), - element_hover: rgba(0xe8e8ecff).into(), - element_active: rgba(0xe0e1e6ff).into(), - element_selected: rgba(0xe0e1e6ff).into(), - element_disabled: rgba(0x0000320f).into(), - element_placeholder: rgba(0x60646cff).into(), - element_drop_target: rgba(0x008bff0b).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0xe8e8ecff).into(), - ghost_element_active: rgba(0xe0e1e6ff).into(), - ghost_element_selected: rgba(0xe0e1e6ff).into(), - ghost_element_disabled: rgba(0x0000320f).into(), - text: rgba(0x1c2024ff).into(), - text_muted: rgba(0x60646cff).into(), - text_placeholder: rgba(0x80838dff).into(), - text_disabled: rgba(0x8b8d98ff).into(), - text_accent: rgba(0x0c73ceff).into(), - icon: rgba(0x60646cff).into(), - icon_muted: rgba(0x80838dff).into(), - icon_disabled: rgba(0x8b8d98ff).into(), - icon_placeholder: rgba(0x80838dff).into(), - icon_accent: rgba(0x0c73ceff).into(), - status_bar_background: rgba(0xf9f9fbff).into(), - title_bar_background: rgba(0xf9f9fbff).into(), - toolbar_background: rgba(0xfcfcfdff).into(), - tab_bar_background: rgba(0xf9f9fbff).into(), - tab_inactive_background: rgba(0xd3cbb7ff).into(), - tab_active_background: rgba(0xfdf6e3ff).into(), - editor_background: rgba(0xfcfcfdff).into(), - editor_gutter_background: rgba(0xfcfcfdff).into(), - editor_subheader_background: rgba(0xf9f9fbff).into(), - editor_active_line_background: rgba(0x0000320f).into(), - editor_highlighted_line_background: rgba(0x00002c17).into(), - editor_line_number: rgba(0x0000320f).into(), - editor_active_line_number: rgba(0x0000320f).into(), - editor_invisible: rgba(0x00002c17).into(), - editor_wrap_guide: rgba(0x00002c17).into(), - editor_active_wrap_guide: rgba(0x00002c17).into(), - editor_document_highlight_read_background: rgba(0x00002c17).into(), - editor_document_highlight_write_background: rgba(0x00002c17).into(), - terminal_background: rgba(0xfcfcfdff).into(), - terminal_ansi_bright_black: rgba(0x657b83ff).into(), - terminal_ansi_bright_red: rgba(0xcb4b15ff).into(), - terminal_ansi_bright_green: rgba(0x859900ff).into(), - terminal_ansi_bright_yellow: rgba(0x657b83ff).into(), - terminal_ansi_bright_blue: rgba(0x839496ff).into(), - terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(), - terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(), - terminal_ansi_bright_white: rgba(0xeee8d5ff).into(), - terminal_ansi_black: rgba(0x657b83ff).into(), - terminal_ansi_red: rgba(0xdc312eff).into(), - terminal_ansi_green: rgba(0x859900ff).into(), - terminal_ansi_yellow: rgba(0xb58800ff).into(), - terminal_ansi_blue: rgba(0x258ad2ff).into(), - terminal_ansi_magenta: rgba(0xd33582ff).into(), - terminal_ansi_cyan: rgba(0x29a198ff).into(), - terminal_ansi_white: rgba(0xeee8d5ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + border: Some(rgba(0xddd6c1ff).into()), + border_variant: Some(rgba(0xddd6c1ff).into()), + border_focused: Some(rgba(0xddd6c1ff).into()), + border_selected: Some(rgba(0xddd6c1ff).into()), + border_transparent: Some(rgba(0xddd6c1ff).into()), + border_disabled: Some(rgba(0xddd6c1ff).into()), + background: Some(rgba(0xfdf6e3ff).into()), + element_background: Some(rgba(0xab9d56ff).into()), + tab_inactive_background: Some(rgba(0xd3cbb7ff).into()), + tab_active_background: Some(rgba(0xfdf6e3ff).into()), + terminal_ansi_bright_black: Some(rgba(0x657b83ff).into()), + terminal_ansi_bright_red: Some(rgba(0xcb4b15ff).into()), + terminal_ansi_bright_green: Some(rgba(0x859900ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0x657b83ff).into()), + terminal_ansi_bright_blue: Some(rgba(0x839496ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0x6c71c4ff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x93a1a1ff).into()), + terminal_ansi_bright_white: Some(rgba(0xeee8d5ff).into()), + terminal_ansi_black: Some(rgba(0x657b83ff).into()), + terminal_ansi_red: Some(rgba(0xdc312eff).into()), + terminal_ansi_green: Some(rgba(0x859900ff).into()), + terminal_ansi_yellow: Some(rgba(0xb58800ff).into()), + terminal_ansi_blue: Some(rgba(0x258ad2ff).into()), + terminal_ansi_magenta: Some(rgba(0xd33582ff).into()), + terminal_ansi_cyan: Some(rgba(0x29a198ff).into()), + terminal_ansi_white: Some(rgba(0xeee8d5ff).into()), + ..Default::default() }, }, }, ], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs index 78e71133658bc7e35821856b6385badaf478130a..a512c087ff842edc55172b240d5a58a3da8da524 100644 --- a/crates/theme2/src/themes/synthwave_84.rs +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -1,182 +1,37 @@ use gpui::rgba; use crate::{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; -pub fn synthwave_84() -> ThemeFamily { - ThemeFamily { - id: "161a14a0-533c-4df1-b909-2bac37ac807d".into(), +pub fn synthwave_84() -> UserThemeFamily { + UserThemeFamily { name: "Synthwave 84".into(), author: "Robb Owen (robb0wen)".into(), - themes: vec![Theme { - id: "7a7102b7-8778-4c24-ba79-7407857b4f8c".into(), + themes: vec![UserTheme { name: "Synthwave 84".into(), appearance: Appearance::Dark, - styles: ThemeStyles { - system: SystemColors { - transparent: rgba(0x00000000).into(), - mac_os_traffic_light_red: rgba(0xec6b5fff).into(), - mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(), - mac_os_traffic_light_green: rgba(0x61c454ff).into(), - }, - colors: ThemeColors { - border: rgba(0x363a3fff).into(), - border_variant: rgba(0x2e3135ff).into(), - border_focused: rgba(0x004073ff).into(), - border_selected: rgba(0x004073ff).into(), - border_transparent: rgba(0x00000000).into(), - border_disabled: rgba(0x212225ff).into(), - elevated_surface_background: rgba(0x18191bff).into(), - surface_background: rgba(0x18191bff).into(), - background: rgba(0x252334ff).into(), - element_background: rgba(0x614d85ff).into(), - element_hover: rgba(0x272a2dff).into(), - element_active: rgba(0x2e3135ff).into(), - element_selected: rgba(0x2e3135ff).into(), - element_disabled: rgba(0xddeaf814).into(), - element_placeholder: rgba(0xb0b4baff).into(), - element_drop_target: rgba(0x1166fb18).into(), - ghost_element_background: rgba(0x00000000).into(), - ghost_element_hover: rgba(0x272a2dff).into(), - ghost_element_active: rgba(0x2e3135ff).into(), - ghost_element_selected: rgba(0x2e3135ff).into(), - ghost_element_disabled: rgba(0xddeaf814).into(), - text: rgba(0xffffffff).into(), - text_muted: rgba(0xb0b4baff).into(), - text_placeholder: rgba(0x767a83ff).into(), - text_disabled: rgba(0x696e77ff).into(), - text_accent: rgba(0x6fb8ffff).into(), - icon: rgba(0xb0b4baff).into(), - icon_muted: rgba(0x767a83ff).into(), - icon_disabled: rgba(0x696e77ff).into(), - icon_placeholder: rgba(0x767a83ff).into(), - icon_accent: rgba(0x6fb8ffff).into(), - status_bar_background: rgba(0x18191bff).into(), - title_bar_background: rgba(0x18191bff).into(), - toolbar_background: rgba(0x111113ff).into(), - tab_bar_background: rgba(0x18191bff).into(), - tab_inactive_background: rgba(0x252334ff).into(), - tab_active_background: rgba(0x111113ff).into(), - editor_background: rgba(0x111113ff).into(), - editor_gutter_background: rgba(0x111113ff).into(), - editor_subheader_background: rgba(0x18191bff).into(), - editor_active_line_background: rgba(0xddeaf814).into(), - editor_highlighted_line_background: rgba(0xd3edf81d).into(), - editor_line_number: rgba(0xddeaf814).into(), - editor_active_line_number: rgba(0xddeaf814).into(), - editor_invisible: rgba(0xd3edf81d).into(), - editor_wrap_guide: rgba(0xd3edf81d).into(), - editor_active_wrap_guide: rgba(0xd3edf81d).into(), - editor_document_highlight_read_background: rgba(0xd3edf81d).into(), - editor_document_highlight_write_background: rgba(0xd3edf81d).into(), - terminal_background: rgba(0x111113ff).into(), - terminal_ansi_bright_black: rgba(0x000000e6).into(), - terminal_ansi_bright_red: rgba(0xfe444fff).into(), - terminal_ansi_bright_green: rgba(0x71f1b7ff).into(), - terminal_ansi_bright_yellow: rgba(0xfede5cff).into(), - terminal_ansi_bright_blue: rgba(0x02edf9ff).into(), - terminal_ansi_bright_magenta: rgba(0xff7ddaff).into(), - terminal_ansi_bright_cyan: rgba(0x02edf9ff).into(), - terminal_ansi_bright_white: rgba(0xb0b4baff).into(), - terminal_ansi_black: rgba(0x000000f2).into(), - terminal_ansi_red: rgba(0xfe444fff).into(), - terminal_ansi_green: rgba(0x71f1b7ff).into(), - terminal_ansi_yellow: rgba(0xf3e70fff).into(), - terminal_ansi_blue: rgba(0x02edf9ff).into(), - terminal_ansi_magenta: rgba(0xff7ddaff).into(), - terminal_ansi_cyan: rgba(0x02edf9ff).into(), - terminal_ansi_white: rgba(0xedeef0ff).into(), - }, - status: StatusColors { - conflict: rgba(0xff9592ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - error: rgba(0xff9592ff).into(), - hidden: rgba(0xb0b4baff).into(), - ignored: rgba(0xb0b4baff).into(), - info: rgba(0x6fb8ffff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - success: rgba(0x70cf82ff).into(), - warning: rgba(0xf5e147ff).into(), - }, - git: GitStatusColors { - conflict: rgba(0xffa057ff).into(), - created: rgba(0x70cf82ff).into(), - deleted: rgba(0xff9592ff).into(), - ignored: rgba(0xb0b4baff).into(), - modified: rgba(0xf5e147ff).into(), - renamed: rgba(0x6fb8ffff).into(), - }, - player: PlayerColors(vec![ - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - PlayerColor { - cursor: rgba(0x000000ff).into(), - background: rgba(0x000000ff).into(), - selection: rgba(0x000000ff).into(), - }, - ]), - syntax: SyntaxTheme { - highlights: vec![ - ("attribute".into(), rgba(0x4ccce6ff).into()), - ("boolean".into(), rgba(0xff977dff).into()), - ("comment".into(), rgba(0xb0b4baff).into()), - ("comment.doc".into(), rgba(0xe0dffeff).into()), - ("constant".into(), rgba(0x8c323aff).into()), - ("constructor".into(), rgba(0x8c323aff).into()), - ("embedded".into(), rgba(0x8c323aff).into()), - ("emphasis".into(), rgba(0x8c323aff).into()), - ("emphasis.strong".into(), rgba(0x8c323aff).into()), - ("enum".into(), rgba(0x8c323aff).into()), - ("function".into(), rgba(0x8c323aff).into()), - ("hint".into(), rgba(0x8c323aff).into()), - ("keyword".into(), rgba(0xffa057ff).into()), - ("label".into(), rgba(0x8c323aff).into()), - ("link_text".into(), rgba(0x8c323aff).into()), - ("link_uri".into(), rgba(0x8c323aff).into()), - ("number".into(), rgba(0x8c323aff).into()), - ("operator".into(), rgba(0x8c323aff).into()), - ("predictive".into(), rgba(0x8c323aff).into()), - ("preproc".into(), rgba(0x8c323aff).into()), - ("primary".into(), rgba(0x8c323aff).into()), - ("property".into(), rgba(0x8c323aff).into()), - ("punctuation".into(), rgba(0xb0b4baff).into()), - ("punctuation.bracket".into(), rgba(0xb0b4baff).into()), - ("punctuation.delimiter".into(), rgba(0xb0b4baff).into()), - ("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()), - ("punctuation.special".into(), rgba(0x8c323aff).into()), - ("string".into(), rgba(0x1ed8a3ff).into()), - ("string.escape".into(), rgba(0x8c323aff).into()), - ("string.regex".into(), rgba(0xff977dff).into()), - ("string.special".into(), rgba(0x8c323aff).into()), - ("string.special.symbol".into(), rgba(0x8c323aff).into()), - ("tag".into(), rgba(0x8c323aff).into()), - ("text.literal".into(), rgba(0x8c323aff).into()), - ("title".into(), rgba(0x8c323aff).into()), - ("type".into(), rgba(0x8c323aff).into()), - ("variable".into(), rgba(0x8c323aff).into()), - ("variable.special".into(), rgba(0x8c323aff).into()), - ("variant".into(), rgba(0x8c323aff).into()), - ], + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + background: Some(rgba(0x252334ff).into()), + element_background: Some(rgba(0x614d85ff).into()), + text: Some(rgba(0xffffffff).into()), + tab_inactive_background: Some(rgba(0x252334ff).into()), + terminal_ansi_bright_red: Some(rgba(0xfe444fff).into()), + terminal_ansi_bright_green: Some(rgba(0x71f1b7ff).into()), + terminal_ansi_bright_yellow: Some(rgba(0xfede5cff).into()), + terminal_ansi_bright_blue: Some(rgba(0x02edf9ff).into()), + terminal_ansi_bright_magenta: Some(rgba(0xff7ddaff).into()), + terminal_ansi_bright_cyan: Some(rgba(0x02edf9ff).into()), + terminal_ansi_red: Some(rgba(0xfe444fff).into()), + terminal_ansi_green: Some(rgba(0x71f1b7ff).into()), + terminal_ansi_yellow: Some(rgba(0xf3e70fff).into()), + terminal_ansi_blue: Some(rgba(0x02edf9ff).into()), + terminal_ansi_magenta: Some(rgba(0xff7ddaff).into()), + terminal_ansi_cyan: Some(rgba(0x02edf9ff).into()), + ..Default::default() }, }, }], - scales: default_color_scales(), } } diff --git a/crates/theme2/src/user_theme.rs b/crates/theme2/src/user_theme.rs new file mode 100644 index 0000000000000000000000000000000000000000..87ba9a76d1f51629d096e721a27a936ec612f678 --- /dev/null +++ b/crates/theme2/src/user_theme.rs @@ -0,0 +1,25 @@ +use refineable::Refineable; +use serde::Deserialize; + +use crate::{Appearance, ThemeColors, ThemeColorsRefinement}; + +#[derive(Deserialize)] +pub struct UserThemeFamily { + pub name: String, + pub author: String, + pub themes: Vec, +} + +#[derive(Deserialize)] +pub struct UserTheme { + pub name: String, + pub appearance: Appearance, + pub styles: UserThemeStylesRefinement, +} + +#[derive(Refineable, Clone)] +#[refineable(deserialize)] +pub struct UserThemeStyles { + #[refineable] + pub colors: ThemeColors, +} diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index bd264bcb5521c840e65d0b833fcecd9f8b965238..e2ece76b128d52b3fd42005f5a4afe60c66ce7ac 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -13,10 +13,10 @@ use gpui::serde_json; use log::LevelFilter; use serde::Deserialize; use simplelog::SimpleLogger; -use theme::{default_color_scales, Appearance, ThemeFamily}; +use theme::{Appearance, UserThemeFamily}; use vscode::VsCodeThemeConverter; -use crate::theme_printer::ThemeFamilyPrinter; +use crate::theme_printer::UserThemeFamilyPrinter; use crate::vscode::VsCodeTheme; #[derive(Debug, Deserialize)] @@ -120,12 +120,10 @@ fn main() -> Result<()> { themes.push(theme); } - let theme_family = ThemeFamily { - id: uuid::Uuid::new_v4().to_string(), + let theme_family = UserThemeFamily { name: family_metadata.name.into(), author: family_metadata.author.into(), themes, - scales: default_color_scales(), }; theme_families.push(theme_family); @@ -157,15 +155,14 @@ fn main() -> Result<()> { use gpui::rgba; use crate::{{ - default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant, + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }}; - pub fn {theme_family_slug}() -> ThemeFamily {{ + pub fn {theme_family_slug}() -> UserThemeFamily {{ {theme_family_definition} }} "#, - theme_family_definition = format!("{:#?}", ThemeFamilyPrinter::new(theme_family)) + theme_family_definition = format!("{:#?}", UserThemeFamilyPrinter::new(theme_family)) ); output_file.write_all(theme_module.as_bytes())?; @@ -175,9 +172,9 @@ fn main() -> Result<()> { let themes_vector_contents = format!( r#" - use crate::ThemeFamily; + use crate::UserThemeFamily; - pub(crate) fn all_imported_themes() -> Vec {{ + pub(crate) fn all_imported_themes() -> Vec {{ vec![{all_themes}] }} "#, diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 017893f400698cc5e3b6f2f05a9dbd5a1e112dac..aa74692164d016f6247a41a41dd354b256d70332 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -3,7 +3,7 @@ use std::fmt::{self, Debug}; use gpui::{Hsla, Rgba}; use theme::{ Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, + SystemColors, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; struct RawSyntaxPrinter<'a>(&'a str); @@ -38,18 +38,17 @@ impl<'a, T: Debug> Debug for VecPrinter<'a, T> { } } -pub struct ThemeFamilyPrinter(ThemeFamily); +pub struct UserThemeFamilyPrinter(UserThemeFamily); -impl ThemeFamilyPrinter { - pub fn new(theme_family: ThemeFamily) -> Self { +impl UserThemeFamilyPrinter { + pub fn new(theme_family: UserThemeFamily) -> Self { Self(theme_family) } } -impl Debug for ThemeFamilyPrinter { +impl Debug for UserThemeFamilyPrinter { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ThemeFamily") - .field("id", &IntoPrinter(&self.0.id)) + f.debug_struct("UserThemeFamily") .field("name", &IntoPrinter(&self.0.name)) .field("author", &IntoPrinter(&self.0.author)) .field( @@ -59,24 +58,22 @@ impl Debug for ThemeFamilyPrinter { .0 .themes .iter() - .map(|theme| ThemeVariantPrinter(theme)) + .map(|theme| UserThemePrinter(theme)) .collect(), ), ) - .field("scales", &RawSyntaxPrinter("default_color_scales()")) .finish() } } -pub struct ThemeVariantPrinter<'a>(&'a Theme); +pub struct UserThemePrinter<'a>(&'a UserTheme); -impl<'a> Debug for ThemeVariantPrinter<'a> { +impl<'a> Debug for UserThemePrinter<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ThemeVariant") - .field("id", &IntoPrinter(&self.0.id)) + f.debug_struct("UserTheme") .field("name", &IntoPrinter(&self.0.name)) .field("appearance", &AppearancePrinter(self.0.appearance)) - .field("styles", &ThemeStylesPrinter(&self.0.styles)) + .field("styles", &UserThemeStylesRefinementPrinter(&self.0.styles)) .finish() } } @@ -89,17 +86,12 @@ impl Debug for AppearancePrinter { } } -pub struct ThemeStylesPrinter<'a>(&'a ThemeStyles); +pub struct UserThemeStylesRefinementPrinter<'a>(&'a UserThemeStylesRefinement); -impl<'a> Debug for ThemeStylesPrinter<'a> { +impl<'a> Debug for UserThemeStylesRefinementPrinter<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ThemeStyles") - .field("system", &SystemColorsPrinter(&self.0.system)) - .field("colors", &ThemeColorsPrinter(&self.0.colors)) - .field("status", &StatusColorsPrinter(&self.0.status)) - .field("git", &GitStatusColorsPrinter(&self.0.git)) - .field("player", &PlayerColorsPrinter(&self.0.player)) - .field("syntax", &SyntaxThemePrinter(&self.0.syntax)) + f.debug_struct("UserThemeStylesRefinement") + .field("colors", &ThemeColorsRefinementPrinter(&self.0.colors)) .finish() } } @@ -126,204 +118,136 @@ impl<'a> Debug for SystemColorsPrinter<'a> { } } -pub struct ThemeColorsPrinter<'a>(&'a ThemeColors); +pub struct ThemeColorsRefinementPrinter<'a>(&'a ThemeColorsRefinement); -impl<'a> Debug for ThemeColorsPrinter<'a> { +impl<'a> Debug for ThemeColorsRefinementPrinter<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ThemeColors") - .field("border", &HslaPrinter(self.0.border)) - .field("border_variant", &HslaPrinter(self.0.border_variant)) - .field("border_focused", &HslaPrinter(self.0.border_focused)) - .field("border_selected", &HslaPrinter(self.0.border_selected)) - .field( - "border_transparent", - &HslaPrinter(self.0.border_transparent), - ) - .field("border_disabled", &HslaPrinter(self.0.border_disabled)) - .field( + let theme_colors = vec![ + ("border", self.0.border), + ("border_variant", self.0.border_variant), + ("border_focused", self.0.border_focused), + ("border_selected", self.0.border_selected), + ("border_transparent", self.0.border_transparent), + ("border_disabled", self.0.border_disabled), + ( "elevated_surface_background", - &HslaPrinter(self.0.elevated_surface_background), - ) - .field( - "surface_background", - &HslaPrinter(self.0.surface_background), - ) - .field("background", &HslaPrinter(self.0.background)) - .field( - "element_background", - &HslaPrinter(self.0.element_background), - ) - .field("element_hover", &HslaPrinter(self.0.element_hover)) - .field("element_active", &HslaPrinter(self.0.element_active)) - .field("element_selected", &HslaPrinter(self.0.element_selected)) - .field("element_disabled", &HslaPrinter(self.0.element_disabled)) - .field( - "element_placeholder", - &HslaPrinter(self.0.element_placeholder), - ) - .field( - "element_drop_target", - &HslaPrinter(self.0.element_drop_target), - ) - .field( - "ghost_element_background", - &HslaPrinter(self.0.ghost_element_background), - ) - .field( - "ghost_element_hover", - &HslaPrinter(self.0.ghost_element_hover), - ) - .field( - "ghost_element_active", - &HslaPrinter(self.0.ghost_element_active), - ) - .field( - "ghost_element_selected", - &HslaPrinter(self.0.ghost_element_selected), - ) - .field( - "ghost_element_disabled", - &HslaPrinter(self.0.ghost_element_disabled), - ) - .field("text", &HslaPrinter(self.0.text)) - .field("text_muted", &HslaPrinter(self.0.text_muted)) - .field("text_placeholder", &HslaPrinter(self.0.text_placeholder)) - .field("text_disabled", &HslaPrinter(self.0.text_disabled)) - .field("text_accent", &HslaPrinter(self.0.text_accent)) - .field("icon", &HslaPrinter(self.0.icon)) - .field("icon_muted", &HslaPrinter(self.0.icon_muted)) - .field("icon_disabled", &HslaPrinter(self.0.icon_disabled)) - .field("icon_placeholder", &HslaPrinter(self.0.icon_placeholder)) - .field("icon_accent", &HslaPrinter(self.0.icon_accent)) - .field( - "status_bar_background", - &HslaPrinter(self.0.status_bar_background), - ) - .field( - "title_bar_background", - &HslaPrinter(self.0.title_bar_background), - ) - .field( - "toolbar_background", - &HslaPrinter(self.0.toolbar_background), - ) - .field( - "tab_bar_background", - &HslaPrinter(self.0.tab_bar_background), - ) - .field( - "tab_inactive_background", - &HslaPrinter(self.0.tab_inactive_background), - ) - .field( - "tab_active_background", - &HslaPrinter(self.0.tab_active_background), - ) - .field("editor_background", &HslaPrinter(self.0.editor_background)) - .field( - "editor_gutter_background", - &HslaPrinter(self.0.editor_gutter_background), - ) - .field( + self.0.elevated_surface_background, + ), + ("surface_background", self.0.surface_background), + ("background", self.0.background), + ("element_background", self.0.element_background), + ("element_hover", self.0.element_hover), + ("element_active", self.0.element_active), + ("element_selected", self.0.element_selected), + ("element_disabled", self.0.element_disabled), + ("element_placeholder", self.0.element_placeholder), + ("element_drop_target", self.0.element_drop_target), + ("ghost_element_background", self.0.ghost_element_background), + ("ghost_element_hover", self.0.ghost_element_hover), + ("ghost_element_active", self.0.ghost_element_active), + ("ghost_element_selected", self.0.ghost_element_selected), + ("ghost_element_disabled", self.0.ghost_element_disabled), + ("text", self.0.text), + ("text_muted", self.0.text_muted), + ("text_placeholder", self.0.text_placeholder), + ("text_disabled", self.0.text_disabled), + ("text_accent", self.0.text_accent), + ("icon", self.0.icon), + ("icon_muted", self.0.icon_muted), + ("icon_disabled", self.0.icon_disabled), + ("icon_placeholder", self.0.icon_placeholder), + ("icon_accent", self.0.icon_accent), + ("status_bar_background", self.0.status_bar_background), + ("title_bar_background", self.0.title_bar_background), + ("toolbar_background", self.0.toolbar_background), + ("tab_bar_background", self.0.tab_bar_background), + ("tab_inactive_background", self.0.tab_inactive_background), + ("tab_active_background", self.0.tab_active_background), + ("editor_background", self.0.editor_background), + ("editor_gutter_background", self.0.editor_gutter_background), + ( "editor_subheader_background", - &HslaPrinter(self.0.editor_subheader_background), - ) - .field( + self.0.editor_subheader_background, + ), + ( "editor_active_line_background", - &HslaPrinter(self.0.editor_active_line_background), - ) - .field( + self.0.editor_active_line_background, + ), + ( "editor_highlighted_line_background", - &HslaPrinter(self.0.editor_highlighted_line_background), - ) - .field( - "editor_line_number", - &HslaPrinter(self.0.editor_line_number), - ) - .field( + self.0.editor_highlighted_line_background, + ), + ("editor_line_number", self.0.editor_line_number), + ( "editor_active_line_number", - &HslaPrinter(self.0.editor_active_line_number), - ) - .field("editor_invisible", &HslaPrinter(self.0.editor_invisible)) - .field("editor_wrap_guide", &HslaPrinter(self.0.editor_wrap_guide)) - .field( - "editor_active_wrap_guide", - &HslaPrinter(self.0.editor_active_wrap_guide), - ) - .field( + self.0.editor_active_line_number, + ), + ("editor_invisible", self.0.editor_invisible), + ("editor_wrap_guide", self.0.editor_wrap_guide), + ("editor_active_wrap_guide", self.0.editor_active_wrap_guide), + ( "editor_document_highlight_read_background", - &HslaPrinter(self.0.editor_document_highlight_read_background), - ) - .field( + self.0.editor_document_highlight_read_background, + ), + ( "editor_document_highlight_write_background", - &HslaPrinter(self.0.editor_document_highlight_write_background), - ) - .field( - "terminal_background", - &HslaPrinter(self.0.terminal_background), - ) - .field( + self.0.editor_document_highlight_write_background, + ), + ("terminal_background", self.0.terminal_background), + ( "terminal_ansi_bright_black", - &HslaPrinter(self.0.terminal_ansi_bright_black), - ) - .field( - "terminal_ansi_bright_red", - &HslaPrinter(self.0.terminal_ansi_bright_red), - ) - .field( + self.0.terminal_ansi_bright_black, + ), + ("terminal_ansi_bright_red", self.0.terminal_ansi_bright_red), + ( "terminal_ansi_bright_green", - &HslaPrinter(self.0.terminal_ansi_bright_green), - ) - .field( + self.0.terminal_ansi_bright_green, + ), + ( "terminal_ansi_bright_yellow", - &HslaPrinter(self.0.terminal_ansi_bright_yellow), - ) - .field( + self.0.terminal_ansi_bright_yellow, + ), + ( "terminal_ansi_bright_blue", - &HslaPrinter(self.0.terminal_ansi_bright_blue), - ) - .field( + self.0.terminal_ansi_bright_blue, + ), + ( "terminal_ansi_bright_magenta", - &HslaPrinter(self.0.terminal_ansi_bright_magenta), - ) - .field( + self.0.terminal_ansi_bright_magenta, + ), + ( "terminal_ansi_bright_cyan", - &HslaPrinter(self.0.terminal_ansi_bright_cyan), - ) - .field( + self.0.terminal_ansi_bright_cyan, + ), + ( "terminal_ansi_bright_white", - &HslaPrinter(self.0.terminal_ansi_bright_white), - ) - .field( - "terminal_ansi_black", - &HslaPrinter(self.0.terminal_ansi_black), - ) - .field("terminal_ansi_red", &HslaPrinter(self.0.terminal_ansi_red)) - .field( - "terminal_ansi_green", - &HslaPrinter(self.0.terminal_ansi_green), - ) - .field( - "terminal_ansi_yellow", - &HslaPrinter(self.0.terminal_ansi_yellow), - ) - .field( - "terminal_ansi_blue", - &HslaPrinter(self.0.terminal_ansi_blue), - ) - .field( - "terminal_ansi_magenta", - &HslaPrinter(self.0.terminal_ansi_magenta), - ) - .field( - "terminal_ansi_cyan", - &HslaPrinter(self.0.terminal_ansi_cyan), - ) - .field( - "terminal_ansi_white", - &HslaPrinter(self.0.terminal_ansi_white), - ) - .finish() + self.0.terminal_ansi_bright_white, + ), + ("terminal_ansi_black", self.0.terminal_ansi_black), + ("terminal_ansi_red", self.0.terminal_ansi_red), + ("terminal_ansi_green", self.0.terminal_ansi_green), + ("terminal_ansi_yellow", self.0.terminal_ansi_yellow), + ("terminal_ansi_blue", self.0.terminal_ansi_blue), + ("terminal_ansi_magenta", self.0.terminal_ansi_magenta), + ("terminal_ansi_cyan", self.0.terminal_ansi_cyan), + ("terminal_ansi_white", self.0.terminal_ansi_white), + ]; + + f.write_str("ThemeColorsRefinement {")?; + + for (color_name, color) in theme_colors { + if let Some(color) = color { + f.write_str(color_name)?; + f.write_str(": ")?; + f.write_str("Some(")?; + HslaPrinter(color).fmt(f)?; + f.write_str(")")?; + f.write_str(",")?; + } + } + + f.write_str("..Default::default()")?; + f.write_str("}") } } diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index 436c73b3d4053158c678883bfa3a4dc914016e16..5a09870dc8251e9e5d0b93e386f4b246b14503e5 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -1,10 +1,7 @@ use anyhow::Result; -use gpui::{Hsla, Refineable, Rgba}; +use gpui::{Hsla, Rgba}; use serde::Deserialize; -use theme::{ - Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme, - ThemeColors, ThemeColorsRefinement, ThemeStyles, -}; +use theme::{ThemeColorsRefinement, UserTheme, UserThemeStylesRefinement}; use crate::util::Traverse; use crate::ThemeMetadata; @@ -433,14 +430,9 @@ impl VsCodeThemeConverter { } } - pub fn convert(self) -> Result { + pub fn convert(self) -> Result { let appearance = self.theme_metadata.appearance.into(); - let mut theme_colors = match appearance { - Appearance::Light => ThemeColors::default_light(), - Appearance::Dark => ThemeColors::default_dark(), - }; - let vscode_colors = &self.theme.colors; let theme_colors_refinements = ThemeColorsRefinement { @@ -567,40 +559,12 @@ impl VsCodeThemeConverter { ..Default::default() }; - theme_colors.refine(&theme_colors_refinements); - - Ok(Theme { - id: uuid::Uuid::new_v4().to_string(), + Ok(UserTheme { name: self.theme_metadata.name.into(), appearance, - styles: ThemeStyles { - system: SystemColors::default(), - colors: theme_colors, - status: StatusColors::default(), - git: GitStatusColors::default(), - player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), + styles: UserThemeStylesRefinement { + colors: theme_colors_refinements, }, }) } } - -// #[cfg(test)] -// mod tests { -// use super::*; -// use std::path::PathBuf; - -// #[test] -// fn test_deserialize_theme() { -// let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); -// let root_dir = manifest_dir.parent().unwrap().parent().unwrap(); - -// let mut d = root_dir.to_path_buf(); -// d.push("assets/themes/src/vsc/dracula/dracula.json"); - -// let data = std::fs::read_to_string(d).expect("Unable to read file"); - -// let result: Theme = serde_json::from_str(&data).unwrap(); -// println!("{:#?}", result); -// } -// } From 82a018996bdd197b18d2e0c0ba80ea0c49353149 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 17:54:14 +0100 Subject: [PATCH 059/110] WIP --- crates/editor2/src/editor.rs | 550 +++++++++++++------------- crates/editor2/src/element.rs | 80 +++- crates/editor2/src/movement.rs | 4 +- crates/gpui2/src/action.rs | 3 +- crates/gpui2/src/app.rs | 14 +- crates/gpui2/src/window.rs | 2 + crates/settings2/src/settings_file.rs | 49 ++- crates/zed2/src/main.rs | 7 +- 8 files changed, 425 insertions(+), 284 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 7a2511fa6dc1d6144a43618fe1dbd6bc7b01b394..78cbbd910141d3c658239dcc0fd3eba248a84f9d 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -36,8 +36,8 @@ pub use element::{ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ - div, px, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, Entity, - EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, + div, px, AnyElement, AppContext, BackgroundExecutor, Context, DispatchContext, Div, Element, + Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; @@ -54,6 +54,7 @@ use language::{ }; use link_go_to_definition::{GoToDefinitionLink, InlayHighlight, LinkGoToDefinitionState}; use lsp::{DiagnosticSeverity, Documentation, LanguageServerId}; +use movement::TextLayoutDetails; pub use multi_buffer::{ Anchor, AnchorRangeExt, ExcerptId, ExcerptRange, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -397,6 +398,18 @@ pub struct GoToTypeDefinition; pub struct GoToDefinitionSplit; pub struct GoToTypeDefinitionSplit; +#[derive(PartialEq, Clone, Default, Deserialize)] +pub struct MoveLeft; + +#[derive(PartialEq, Clone, Default, Deserialize)] +pub struct MoveRight; + +#[derive(PartialEq, Clone, Default, Deserialize)] +pub struct MoveDown; + +#[derive(PartialEq, Clone, Default, Deserialize)] +pub struct MoveUp; + enum DocumentHighlightRead {} enum DocumentHighlightWrite {} enum InputComposition {} @@ -413,130 +426,130 @@ pub fn init_settings(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) { init_settings(cx); - // cx.add_action(Editor::new_file); - // cx.add_action(Editor::new_file_in_direction); - // cx.add_action(Editor::cancel); - // cx.add_action(Editor::newline); - // cx.add_action(Editor::newline_above); - // cx.add_action(Editor::newline_below); - // cx.add_action(Editor::backspace); - // cx.add_action(Editor::delete); - // cx.add_action(Editor::tab); - // cx.add_action(Editor::tab_prev); - // cx.add_action(Editor::indent); - // cx.add_action(Editor::outdent); - // cx.add_action(Editor::delete_line); - // cx.add_action(Editor::join_lines); - // cx.add_action(Editor::sort_lines_case_sensitive); - // cx.add_action(Editor::sort_lines_case_insensitive); - // cx.add_action(Editor::reverse_lines); - // cx.add_action(Editor::shuffle_lines); - // cx.add_action(Editor::convert_to_upper_case); - // cx.add_action(Editor::convert_to_lower_case); - // cx.add_action(Editor::convert_to_title_case); - // cx.add_action(Editor::convert_to_snake_case); - // cx.add_action(Editor::convert_to_kebab_case); - // cx.add_action(Editor::convert_to_upper_camel_case); - // cx.add_action(Editor::convert_to_lower_camel_case); - // cx.add_action(Editor::delete_to_previous_word_start); - // cx.add_action(Editor::delete_to_previous_subword_start); - // cx.add_action(Editor::delete_to_next_word_end); - // cx.add_action(Editor::delete_to_next_subword_end); - // cx.add_action(Editor::delete_to_beginning_of_line); - // cx.add_action(Editor::delete_to_end_of_line); - // cx.add_action(Editor::cut_to_end_of_line); - // cx.add_action(Editor::duplicate_line); - // cx.add_action(Editor::move_line_up); - // cx.add_action(Editor::move_line_down); - // cx.add_action(Editor::transpose); - // cx.add_action(Editor::cut); - // cx.add_action(Editor::copy); - // cx.add_action(Editor::paste); - // cx.add_action(Editor::undo); - // cx.add_action(Editor::redo); - // cx.add_action(Editor::move_up); - // cx.add_action(Editor::move_page_up); - // cx.add_action(Editor::move_down); - // cx.add_action(Editor::move_page_down); - // cx.add_action(Editor::next_screen); - // cx.add_action(Editor::move_left); - // cx.add_action(Editor::move_right); - // cx.add_action(Editor::move_to_previous_word_start); - // cx.add_action(Editor::move_to_previous_subword_start); - // cx.add_action(Editor::move_to_next_word_end); - // cx.add_action(Editor::move_to_next_subword_end); - // cx.add_action(Editor::move_to_beginning_of_line); - // cx.add_action(Editor::move_to_end_of_line); - // cx.add_action(Editor::move_to_start_of_paragraph); - // cx.add_action(Editor::move_to_end_of_paragraph); - // cx.add_action(Editor::move_to_beginning); - // cx.add_action(Editor::move_to_end); - // cx.add_action(Editor::select_up); - // cx.add_action(Editor::select_down); - // cx.add_action(Editor::select_left); - // cx.add_action(Editor::select_right); - // cx.add_action(Editor::select_to_previous_word_start); - // cx.add_action(Editor::select_to_previous_subword_start); - // cx.add_action(Editor::select_to_next_word_end); - // cx.add_action(Editor::select_to_next_subword_end); - // cx.add_action(Editor::select_to_beginning_of_line); - // cx.add_action(Editor::select_to_end_of_line); - // cx.add_action(Editor::select_to_start_of_paragraph); - // cx.add_action(Editor::select_to_end_of_paragraph); - // cx.add_action(Editor::select_to_beginning); - // cx.add_action(Editor::select_to_end); - // cx.add_action(Editor::select_all); - // cx.add_action(Editor::select_all_matches); - // cx.add_action(Editor::select_line); - // cx.add_action(Editor::split_selection_into_lines); - // cx.add_action(Editor::add_selection_above); - // cx.add_action(Editor::add_selection_below); - // cx.add_action(Editor::select_next); - // cx.add_action(Editor::select_previous); - // cx.add_action(Editor::toggle_comments); - // cx.add_action(Editor::select_larger_syntax_node); - // cx.add_action(Editor::select_smaller_syntax_node); - // cx.add_action(Editor::move_to_enclosing_bracket); - // cx.add_action(Editor::undo_selection); - // cx.add_action(Editor::redo_selection); - // cx.add_action(Editor::go_to_diagnostic); - // cx.add_action(Editor::go_to_prev_diagnostic); - // cx.add_action(Editor::go_to_hunk); - // cx.add_action(Editor::go_to_prev_hunk); - // cx.add_action(Editor::go_to_definition); - // cx.add_action(Editor::go_to_definition_split); - // cx.add_action(Editor::go_to_type_definition); - // cx.add_action(Editor::go_to_type_definition_split); - // cx.add_action(Editor::fold); - // cx.add_action(Editor::fold_at); - // cx.add_action(Editor::unfold_lines); - // cx.add_action(Editor::unfold_at); - // cx.add_action(Editor::gutter_hover); - // cx.add_action(Editor::fold_selected_ranges); - // cx.add_action(Editor::show_completions); - // cx.add_action(Editor::toggle_code_actions); - // cx.add_action(Editor::open_excerpts); - // cx.add_action(Editor::toggle_soft_wrap); - // cx.add_action(Editor::toggle_inlay_hints); - // cx.add_action(Editor::reveal_in_finder); - // cx.add_action(Editor::copy_path); - // cx.add_action(Editor::copy_relative_path); - // cx.add_action(Editor::copy_highlight_json); + // cx.register_action_type(Editor::new_file); + // cx.register_action_type(Editor::new_file_in_direction); + // cx.register_action_type(Editor::cancel); + // cx.register_action_type(Editor::newline); + // cx.register_action_type(Editor::newline_above); + // cx.register_action_type(Editor::newline_below); + // cx.register_action_type(Editor::backspace); + // cx.register_action_type(Editor::delete); + // cx.register_action_type(Editor::tab); + // cx.register_action_type(Editor::tab_prev); + // cx.register_action_type(Editor::indent); + // cx.register_action_type(Editor::outdent); + // cx.register_action_type(Editor::delete_line); + // cx.register_action_type(Editor::join_lines); + // cx.register_action_type(Editor::sort_lines_case_sensitive); + // cx.register_action_type(Editor::sort_lines_case_insensitive); + // cx.register_action_type(Editor::reverse_lines); + // cx.register_action_type(Editor::shuffle_lines); + // cx.register_action_type(Editor::convert_to_upper_case); + // cx.register_action_type(Editor::convert_to_lower_case); + // cx.register_action_type(Editor::convert_to_title_case); + // cx.register_action_type(Editor::convert_to_snake_case); + // cx.register_action_type(Editor::convert_to_kebab_case); + // cx.register_action_type(Editor::convert_to_upper_camel_case); + // cx.register_action_type(Editor::convert_to_lower_camel_case); + // cx.register_action_type(Editor::delete_to_previous_word_start); + // cx.register_action_type(Editor::delete_to_previous_subword_start); + // cx.register_action_type(Editor::delete_to_next_word_end); + // cx.register_action_type(Editor::delete_to_next_subword_end); + // cx.register_action_type(Editor::delete_to_beginning_of_line); + // cx.register_action_type(Editor::delete_to_end_of_line); + // cx.register_action_type(Editor::cut_to_end_of_line); + // cx.register_action_type(Editor::duplicate_line); + // cx.register_action_type(Editor::move_line_up); + // cx.register_action_type(Editor::move_line_down); + // cx.register_action_type(Editor::transpose); + // cx.register_action_type(Editor::cut); + // cx.register_action_type(Editor::copy); + // cx.register_action_type(Editor::paste); + // cx.register_action_type(Editor::undo); + // cx.register_action_type(Editor::redo); + cx.register_action_type::(); + // cx.register_action_type(Editor::move_page_up); + cx.register_action_type::(); + // cx.register_action_type(Editor::move_page_down); + // cx.register_action_type(Editor::next_screen); + cx.register_action_type::(); + cx.register_action_type::(); + // cx.register_action_type(Editor::move_to_previous_word_start); + // cx.register_action_type(Editor::move_to_previous_subword_start); + // cx.register_action_type(Editor::move_to_next_word_end); + // cx.register_action_type(Editor::move_to_next_subword_end); + // cx.register_action_type(Editor::move_to_beginning_of_line); + // cx.register_action_type(Editor::move_to_end_of_line); + // cx.register_action_type(Editor::move_to_start_of_paragraph); + // cx.register_action_type(Editor::move_to_end_of_paragraph); + // cx.register_action_type(Editor::move_to_beginning); + // cx.register_action_type(Editor::move_to_end); + // cx.register_action_type(Editor::select_up); + // cx.register_action_type(Editor::select_down); + // cx.register_action_type(Editor::select_left); + // cx.register_action_type(Editor::select_right); + // cx.register_action_type(Editor::select_to_previous_word_start); + // cx.register_action_type(Editor::select_to_previous_subword_start); + // cx.register_action_type(Editor::select_to_next_word_end); + // cx.register_action_type(Editor::select_to_next_subword_end); + // cx.register_action_type(Editor::select_to_beginning_of_line); + // cx.register_action_type(Editor::select_to_end_of_line); + // cx.register_action_type(Editor::select_to_start_of_paragraph); + // cx.register_action_type(Editor::select_to_end_of_paragraph); + // cx.register_action_type(Editor::select_to_beginning); + // cx.register_action_type(Editor::select_to_end); + // cx.register_action_type(Editor::select_all); + // cx.register_action_type(Editor::select_all_matches); + // cx.register_action_type(Editor::select_line); + // cx.register_action_type(Editor::split_selection_into_lines); + // cx.register_action_type(Editor::add_selection_above); + // cx.register_action_type(Editor::add_selection_below); + // cx.register_action_type(Editor::select_next); + // cx.register_action_type(Editor::select_previous); + // cx.register_action_type(Editor::toggle_comments); + // cx.register_action_type(Editor::select_larger_syntax_node); + // cx.register_action_type(Editor::select_smaller_syntax_node); + // cx.register_action_type(Editor::move_to_enclosing_bracket); + // cx.register_action_type(Editor::undo_selection); + // cx.register_action_type(Editor::redo_selection); + // cx.register_action_type(Editor::go_to_diagnostic); + // cx.register_action_type(Editor::go_to_prev_diagnostic); + // cx.register_action_type(Editor::go_to_hunk); + // cx.register_action_type(Editor::go_to_prev_hunk); + // cx.register_action_type(Editor::go_to_definition); + // cx.register_action_type(Editor::go_to_definition_split); + // cx.register_action_type(Editor::go_to_type_definition); + // cx.register_action_type(Editor::go_to_type_definition_split); + // cx.register_action_type(Editor::fold); + // cx.register_action_type(Editor::fold_at); + // cx.register_action_type(Editor::unfold_lines); + // cx.register_action_type(Editor::unfold_at); + // cx.register_action_type(Editor::gutter_hover); + // cx.register_action_type(Editor::fold_selected_ranges); + // cx.register_action_type(Editor::show_completions); + // cx.register_action_type(Editor::toggle_code_actions); + // cx.register_action_type(Editor::open_excerpts); + // cx.register_action_type(Editor::toggle_soft_wrap); + // cx.register_action_type(Editor::toggle_inlay_hints); + // cx.register_action_type(Editor::reveal_in_finder); + // cx.register_action_type(Editor::copy_path); + // cx.register_action_type(Editor::copy_relative_path); + // cx.register_action_type(Editor::copy_highlight_json); // cx.add_async_action(Editor::format); - // cx.add_action(Editor::restart_language_server); - // cx.add_action(Editor::show_character_palette); + // cx.register_action_type(Editor::restart_language_server); + // cx.register_action_type(Editor::show_character_palette); // cx.add_async_action(Editor::confirm_completion); // cx.add_async_action(Editor::confirm_code_action); // cx.add_async_action(Editor::rename); // cx.add_async_action(Editor::confirm_rename); // cx.add_async_action(Editor::find_all_references); - // cx.add_action(Editor::next_copilot_suggestion); - // cx.add_action(Editor::previous_copilot_suggestion); - // cx.add_action(Editor::copilot_suggest); - // cx.add_action(Editor::context_menu_first); - // cx.add_action(Editor::context_menu_prev); - // cx.add_action(Editor::context_menu_next); - // cx.add_action(Editor::context_menu_last); + // cx.register_action_type(Editor::next_copilot_suggestion); + // cx.register_action_type(Editor::previous_copilot_suggestion); + // cx.register_action_type(Editor::copilot_suggest); + // cx.register_action_type(Editor::context_menu_first); + // cx.register_action_type(Editor::context_menu_prev); + // cx.register_action_type(Editor::context_menu_next); + // cx.register_action_type(Editor::context_menu_last); hover_popover::init(cx); scroll::actions::init(cx); @@ -657,7 +670,7 @@ pub struct Editor { collapse_matches: bool, autoindent_mode: Option, workspace: Option<(WeakView, i64)>, - // keymap_context_layers: BTreeMap, + keymap_context_layers: BTreeMap, input_enabled: bool, read_only: bool, leader_peer_id: Option, @@ -670,6 +683,7 @@ pub struct Editor { next_inlay_id: usize, _subscriptions: Vec, pixel_position_of_newest_cursor: Option>, + style: Option, } pub struct EditorSnapshot { @@ -1965,7 +1979,7 @@ impl Editor { autoindent_mode: Some(AutoindentMode::EachLine), collapse_matches: false, workspace: None, - // keymap_context_layers: Default::default(), + keymap_context_layers: Default::default(), input_enabled: true, read_only: false, leader_peer_id: None, @@ -1976,6 +1990,7 @@ impl Editor { inlay_hint_cache: InlayHintCache::new(inlay_hint_settings), gutter_hovered: false, pixel_position_of_newest_cursor: None, + style: None, _subscriptions: vec![ cx.observe(&buffer, Self::on_buffer_changed), cx.subscribe(&buffer, Self::on_buffer_event), @@ -2014,6 +2029,48 @@ impl Editor { this } + fn dispatch_context(&self, cx: &AppContext) -> DispatchContext { + let mut dispatch_context = DispatchContext::default(); + dispatch_context.insert("Editor"); + let mode = match self.mode { + EditorMode::SingleLine => "single_line", + EditorMode::AutoHeight { .. } => "auto_height", + EditorMode::Full => "full", + }; + dispatch_context.set("mode", mode); + if self.pending_rename.is_some() { + dispatch_context.insert("renaming"); + } + if self.context_menu_visible() { + match self.context_menu.read().as_ref() { + Some(ContextMenu::Completions(_)) => { + dispatch_context.insert("menu"); + dispatch_context.insert("showing_completions") + } + Some(ContextMenu::CodeActions(_)) => { + dispatch_context.insert("menu"); + dispatch_context.insert("showing_code_actions") + } + None => {} + } + } + + for layer in self.keymap_context_layers.values() { + dispatch_context.extend(layer); + } + + if let Some(extension) = self + .buffer + .read(cx) + .as_singleton() + .and_then(|buffer| buffer.read(cx).file()?.path().extension()?.to_str()) + { + dispatch_context.set("extension", extension.to_string()); + } + + dispatch_context + } + // pub fn new_file( // workspace: &mut Workspace, // _: &workspace::NewFile, @@ -2021,7 +2078,7 @@ impl Editor { // ) { // let project = workspace.project().clone(); // if project.read(cx).is_remote() { - // cx.propagate_action(); + // cx.propagate(); // } else if let Some(buffer) = project // .update(cx, |project, cx| project.create_buffer("", None, cx)) // .log_err() @@ -2040,7 +2097,7 @@ impl Editor { // ) { // let project = workspace.project().clone(); // if project.read(cx).is_remote() { - // cx.propagate_action(); + // cx.propagate(); // } else if let Some(buffer) = project // .update(cx, |project, cx| project.create_buffer("", None, cx)) // .log_err() @@ -2731,7 +2788,7 @@ impl Editor { // } // } - // cx.propagate_action(); + // cx.propagate(); // } // pub fn handle_input(&mut self, text: &str, cx: &mut ViewContext) { @@ -3482,13 +3539,12 @@ impl Editor { .collect() } - // pub fn text_layout_details(&self, cx: &WindowContext) -> TextLayoutDetails { - // TextLayoutDetails { - // font_cache: cx.font_cache().clone(), - // text_layout_cache: cx.text_layout_cache().clone(), - // editor_style: self.style(cx), - // } - // } + pub fn text_layout_details(&self, cx: &WindowContext) -> TextLayoutDetails { + TextLayoutDetails { + text_system: cx.text_system().clone(), + editor_style: self.style.clone().unwrap(), + } + } fn splice_inlay_hints( &self, @@ -4207,7 +4263,7 @@ impl Editor { let is_copilot_disabled = self.refresh_copilot_suggestions(false, cx).is_none(); if is_copilot_disabled { todo!(); - // cx.propagate_action(); + // cx.propagate(); } } } @@ -4429,12 +4485,14 @@ impl Editor { // .collect() // } - // pub fn context_menu_visible(&self) -> bool { - // self.context_menu - // .read() - // .as_ref() - // .map_or(false, |menu| menu.visible()) - // } + pub fn context_menu_visible(&self) -> bool { + false + // todo!("context menu") + // self.context_menu + // .read() + // .as_ref() + // .map_or(false, |menu| menu.visible()) + } // pub fn render_context_menu( // &self, @@ -5681,19 +5739,19 @@ impl Editor { // .update(cx, |buffer, cx| buffer.finalize_last_transaction(cx)); // } - // pub fn move_left(&mut self, _: &MoveLeft, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // let cursor = if selection.is_empty() && !line_mode { - // movement::left(map, selection.start) - // } else { - // selection.start - // }; - // selection.collapse_to(cursor, SelectionGoal::None); - // }); - // }) - // } + pub fn move_left(&mut self, _: &MoveLeft, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + let cursor = if selection.is_empty() && !line_mode { + movement::left(map, selection.start) + } else { + selection.start + }; + selection.collapse_to(cursor, SelectionGoal::None); + }); + }) + } // pub fn select_left(&mut self, _: &SelectLeft, cx: &mut ViewContext) { // self.change_selections(Some(Autoscroll::fit()), cx, |s| { @@ -5701,19 +5759,19 @@ impl Editor { // }) // } - // pub fn move_right(&mut self, _: &MoveRight, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // let cursor = if selection.is_empty() && !line_mode { - // movement::right(map, selection.end) - // } else { - // selection.end - // }; - // selection.collapse_to(cursor, SelectionGoal::None) - // }); - // }) - // } + pub fn move_right(&mut self, _: &MoveRight, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + let cursor = if selection.is_empty() && !line_mode { + movement::right(map, selection.end) + } else { + selection.end + }; + selection.collapse_to(cursor, SelectionGoal::None) + }); + }) + } // pub fn select_right(&mut self, _: &SelectRight, cx: &mut ViewContext) { // self.change_selections(Some(Autoscroll::fit()), cx, |s| { @@ -5721,35 +5779,35 @@ impl Editor { // }) // } - // pub fn move_up(&mut self, _: &MoveUp, cx: &mut ViewContext) { - // if self.take_rename(true, cx).is_some() { - // return; - // } + pub fn move_up(&mut self, _: &MoveUp, cx: &mut ViewContext) { + if self.take_rename(true, cx).is_some() { + return; + } - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // return; - // } + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // let text_layout_details = &self.text_layout_details(cx); + let text_layout_details = &self.text_layout_details(cx); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if !selection.is_empty() && !line_mode { - // selection.goal = SelectionGoal::None; - // } - // let (cursor, goal) = movement::up( - // map, - // selection.start, - // selection.goal, - // false, - // &text_layout_details, - // ); - // selection.collapse_to(cursor, goal); - // }); - // }) - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if !selection.is_empty() && !line_mode { + selection.goal = SelectionGoal::None; + } + let (cursor, goal) = movement::up( + map, + selection.start, + selection.goal, + false, + &text_layout_details, + ); + selection.collapse_to(cursor, goal); + }); + }) + } // pub fn move_page_up(&mut self, action: &MovePageUp, cx: &mut ViewContext) { // if self.take_rename(true, cx).is_some() { @@ -5757,7 +5815,7 @@ impl Editor { // } // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -5803,32 +5861,33 @@ impl Editor { // }) // } - // pub fn move_down(&mut self, _: &MoveDown, cx: &mut ViewContext) { - // self.take_rename(true, cx); + pub fn move_down(&mut self, _: &MoveDown, cx: &mut ViewContext) { + dbg!("move_down"); + self.take_rename(true, cx); - // if self.mode == EditorMode::SingleLine { - // cx.propagate_action(); - // return; - // } + if self.mode == EditorMode::SingleLine { + cx.propagate(); + return; + } - // let text_layout_details = &self.text_layout_details(cx); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if !selection.is_empty() && !line_mode { - // selection.goal = SelectionGoal::None; - // } - // let (cursor, goal) = movement::down( - // map, - // selection.end, - // selection.goal, - // false, - // &text_layout_details, - // ); - // selection.collapse_to(cursor, goal); - // }); - // }); - // } + let text_layout_details = &self.text_layout_details(cx); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if !selection.is_empty() && !line_mode { + selection.goal = SelectionGoal::None; + } + let (cursor, goal) = movement::down( + map, + selection.end, + selection.goal, + false, + &text_layout_details, + ); + selection.collapse_to(cursor, goal); + }); + }); + } // pub fn move_page_down(&mut self, action: &MovePageDown, cx: &mut ViewContext) { // if self.take_rename(true, cx).is_some() { @@ -5846,7 +5905,7 @@ impl Editor { // } // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6193,7 +6252,7 @@ impl Editor { // cx: &mut ViewContext, // ) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6213,7 +6272,7 @@ impl Editor { // cx: &mut ViewContext, // ) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6233,7 +6292,7 @@ impl Editor { // cx: &mut ViewContext, // ) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6253,7 +6312,7 @@ impl Editor { // cx: &mut ViewContext, // ) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6269,7 +6328,7 @@ impl Editor { // pub fn move_to_beginning(&mut self, _: &MoveToBeginning, cx: &mut ViewContext) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -6289,7 +6348,7 @@ impl Editor { // pub fn move_to_end(&mut self, _: &MoveToEnd, cx: &mut ViewContext) { // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -8807,14 +8866,14 @@ impl Editor { // { // editor // } else { - // cx.propagate_action(); + // cx.propagate(); // return; // }; // let editor = editor_handle.read(cx); // let buffer = editor.buffer.read(cx); // if buffer.is_singleton() { - // cx.propagate_action(); + // cx.propagate(); // return; // } @@ -9443,46 +9502,7 @@ impl Render for Editor { // false // } - -// fn update_keymap_context(&self, keymap: &mut KeymapContext, cx: &AppContext) { -// Self::reset_to_default_keymap_context(keymap); -// let mode = match self.mode { -// EditorMode::SingleLine => "single_line", -// EditorMode::AutoHeight { .. } => "auto_height", -// EditorMode::Full => "full", -// }; -// keymap.add_key("mode", mode); -// if self.pending_rename.is_some() { -// keymap.add_identifier("renaming"); -// } -// if self.context_menu_visible() { -// match self.context_menu.read().as_ref() { -// Some(ContextMenu::Completions(_)) => { -// keymap.add_identifier("menu"); -// keymap.add_identifier("showing_completions") -// } -// Some(ContextMenu::CodeActions(_)) => { -// keymap.add_identifier("menu"); -// keymap.add_identifier("showing_code_actions") -// } -// None => {} -// } -// } - -// for layer in self.keymap_context_layers.values() { -// keymap.extend(layer); -// } - -// if let Some(extension) = self -// .buffer -// .read(cx) -// .as_singleton() -// .and_then(|buffer| buffer.read(cx).file()?.path().extension()?.to_str()) -// { -// keymap.add_key("extension", extension.to_string()); -// } -// } - +// // fn text_for_range(&self, range_utf16: Range, cx: &AppContext) -> Option { // Some( // self.buffer diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 4d8cd57abcf8033b2eb4cb8b02d05af7593d06d8..918cfce43f1afaa2bc2d66282531338e70d4e9db 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -3,15 +3,15 @@ use crate::{ editor_settings::ShowScrollbar, git::{diff_hunk_to_display, DisplayDiffHunk}, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, - Point, Selection, SoftWrap, ToPoint, MAX_LINE_LEN, + MoveDown, Point, Selection, SoftWrap, ToPoint, MAX_LINE_LEN, }; use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ - black, hsla, point, px, relative, size, transparent_black, AnyElement, BorrowWindow, Bounds, - ContentMask, Corners, DispatchPhase, Edges, Element, ElementId, Hsla, Line, Pixels, - ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, - TextSystem, ViewContext, WindowContext, + black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowWindow, + Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, Edges, Element, ElementId, + Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Pixels, ScrollWheelEvent, ShapedGlyph, + Size, StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -20,6 +20,7 @@ use project::project_settings::{GitGutterSetting, ProjectSettings}; use settings::Settings; use smallvec::SmallVec; use std::{ + any::TypeId, borrow::Cow, cmp::{self, Ordering}, fmt::Write, @@ -94,14 +95,12 @@ impl SelectionLayout { } pub struct EditorElement { - style: Arc, + style: EditorStyle, } impl EditorElement { pub fn new(style: EditorStyle) -> Self { - Self { - style: Arc::new(style), - } + Self { style } } // fn attach_mouse_handlers( @@ -2554,7 +2553,38 @@ impl Element for EditorElement { element_state: Option, cx: &mut gpui::ViewContext, ) -> Self::ElementState { - () + editor.style = Some(self.style.clone()); // Long-term, we'd like to eliminate this. + + let dispatch_context = editor.dispatch_context(cx); + cx.with_element_id(cx.view().entity_id(), |global_id, cx| { + cx.with_key_dispatch_context(dispatch_context, |cx| { + cx.with_key_listeners( + [ + build_key_listener( + move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| { + if phase == DispatchPhase::Bubble { + if let KeyMatch::Some(action) = cx.match_keystroke( + &global_id, + &key_down.keystroke, + dispatch_context, + ) { + dbg!(action.as_any()); + return Some(action); + } + } + + None + }, + ), + build_action_listener(Editor::move_left), + build_action_listener(Editor::move_right), + build_action_listener(Editor::move_down), + build_action_listener(Editor::move_up), + ], + |cx| cx.with_focus(editor.focus_handle.clone(), |_| {}), + ); + }) + }); } fn layout( @@ -4080,3 +4110,33 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // .collect() // } // } + +fn build_key_listener( + listener: impl Fn( + &mut Editor, + &T, + &[&DispatchContext], + DispatchPhase, + &mut ViewContext, + ) -> Option> + + 'static, +) -> (TypeId, KeyListener) { + ( + TypeId::of::(), + Box::new(move |editor, event, dispatch_context, phase, cx| { + let key_event = event.downcast_ref::()?; + listener(editor, key_event, dispatch_context, phase, cx) + }), + ) +} + +fn build_action_listener( + listener: impl Fn(&mut Editor, &T, &mut ViewContext) + 'static, +) -> (TypeId, KeyListener) { + build_key_listener(move |editor, action: &T, dispatch_context, phase, cx| { + if phase == DispatchPhase::Bubble { + listener(editor, action, cx); + } + None + }) +} diff --git a/crates/editor2/src/movement.rs b/crates/editor2/src/movement.rs index 962f4f60e643bbc1646c76e0a71bf27223b27b66..b15c484a0312ae6e47858f7362a8e4309f0142a8 100644 --- a/crates/editor2/src/movement.rs +++ b/crates/editor2/src/movement.rs @@ -3,7 +3,7 @@ use crate::{char_kind, CharKind, EditorStyle, ToOffset, ToPoint}; use gpui::{px, TextSystem}; use language::Point; use serde::de::IntoDeserializer; -use std::ops::Range; +use std::{ops::Range, sync::Arc}; #[derive(Debug, PartialEq)] pub enum FindRange { @@ -14,7 +14,7 @@ pub enum FindRange { /// TextLayoutDetails encompasses everything we need to move vertically /// taking into account variable width characters. pub struct TextLayoutDetails { - pub text_system: TextSystem, + pub text_system: Arc, pub editor_style: EditorStyle, } diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 84843c98762572e591d76c774360fe48b21ee148..2139fdedcbe0fb4176dec76608d5f0c42fa7d871 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -22,7 +22,8 @@ where A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + 'static, { fn qualified_name() -> SharedString { - type_name::().into() + // todo!() remove this + type_name::().replace("2::", "::").into() } fn build(params: Option) -> Result> diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs index 801047de5fc857fd3a1bab0a89535febc5126c25..63d2143a6726773be7508c77c72bdd6b1052fe3d 100644 --- a/crates/gpui2/src/app.rs +++ b/crates/gpui2/src/app.rs @@ -779,11 +779,21 @@ impl AppContext { (build)(params) } - /// Halt propagation of a mouse event, keyboard event, or action. This prevents listeners - /// that have not yet been invoked from receiving the event. + /// Event handlers propagate events by default. Call this method to stop dispatching to + /// event handlers with a lower z-index (mouse) or higher in the tree (keyboard). This is + /// the opposite of [propagate]. It's also possible to cancel a call to [propagate] by + /// calling this method before effects are flushed. pub fn stop_propagation(&mut self) { self.propagate_event = false; } + + /// Action handlers stop propagation by default during the bubble phase of action dispatch + /// dispatching to action handlers higher in the element tree. This is the opposite of + /// [stop_propagation]. It's also possible to cancel a call to [stop_propagate] by calling + /// this method before effects are flushed. + pub fn propagate(&mut self) { + self.propagate_event = true; + } } impl Context for AppContext { diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 9cab40082b02912eced41363a2afa6506fb3d9c0..0b3bcd1d76c652242726dccc545a2e05c758f0b8 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -1314,6 +1314,7 @@ impl<'a> WindowContext<'a> { } = stack_frame { if action_type == *event_type { + self.app.propagate_event = false; listener(action.as_any(), &[], DispatchPhase::Bubble, self); if !self.app.propagate_event { break; @@ -1328,6 +1329,7 @@ impl<'a> WindowContext<'a> { self.app.global_action_listeners.remove(&action_type) { for listener in global_listeners.iter().rev() { + self.app.propagate_event = false; listener(action.as_ref(), DispatchPhase::Bubble, self); if !self.app.propagate_event { break; diff --git a/crates/settings2/src/settings_file.rs b/crates/settings2/src/settings_file.rs index c623ae9caf3fe4fe2e814686687bfab511ffc921..6f2c8d374f1aa52c1285e96fb87f1765f171b4ce 100644 --- a/crates/settings2/src/settings_file.rs +++ b/crates/settings2/src/settings_file.rs @@ -1,4 +1,4 @@ -use crate::{settings_store::SettingsStore, Settings}; +use crate::{settings_store::SettingsStore, KeymapFile, Settings}; use anyhow::Result; use fs::Fs; use futures::{channel::mpsc, StreamExt}; @@ -117,3 +117,50 @@ pub fn update_settings_file( }) .detach_and_log_err(cx); } + +pub fn load_default_keymap(cx: &mut AppContext) { + for path in ["keymaps/default.json", "keymaps/vim.json"] { + KeymapFile::load_asset(path, cx).unwrap(); + } + + // todo!() + // if let Some(asset_path) = settings::get::(cx).asset_path() { + // KeymapFile::load_asset(asset_path, cx).unwrap(); + // } +} + +pub fn handle_keymap_file_changes( + mut user_keymap_file_rx: mpsc::UnboundedReceiver, + cx: &mut AppContext, +) { + cx.spawn(move |cx| async move { + // let mut settings_subscription = None; + while let Some(user_keymap_content) = user_keymap_file_rx.next().await { + if let Some(keymap_content) = KeymapFile::parse(&user_keymap_content).log_err() { + cx.update(|cx| reload_keymaps(cx, &keymap_content)).ok(); + + // todo!() + // let mut old_base_keymap = cx.read(|cx| *settings::get::(cx)); + // drop(settings_subscription); + // settings_subscription = Some(cx.update(|cx| { + // cx.observe_global::(move |cx| { + // let new_base_keymap = *settings::get::(cx); + // if new_base_keymap != old_base_keymap { + // old_base_keymap = new_base_keymap.clone(); + // reload_keymaps(cx, &keymap_content); + // } + // }) + // })); + } + } + }) + .detach(); +} + +fn reload_keymaps(cx: &mut AppContext, keymap_content: &KeymapFile) { + // todo!() + // cx.clear_bindings(); + load_default_keymap(cx); + keymap_content.clone().add_to_cx(cx).log_err(); + // cx.set_menus(menus::menus()); +} diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 580afd265370c1052554b85affb600b98046e913..8dad94847e6d3366e37d5a0f17f9f3deba7dbde3 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -20,7 +20,8 @@ use node_runtime::RealNodeRuntime; use parking_lot::Mutex; use serde::{Deserialize, Serialize}; use settings::{ - default_settings, handle_settings_file_changes, watch_config_file, Settings, SettingsStore, + default_settings, handle_keymap_file_changes, handle_settings_file_changes, watch_config_file, + Settings, SettingsStore, }; use simplelog::ConfigBuilder; use smol::process::Command; @@ -76,7 +77,7 @@ fn main() { fs.clone(), paths::SETTINGS.clone(), ); - let _user_keymap_file_rx = watch_config_file( + let user_keymap_file_rx = watch_config_file( &app.background_executor(), fs.clone(), paths::KEYMAP.clone(), @@ -116,7 +117,7 @@ fn main() { .unwrap(); cx.set_global(store); handle_settings_file_changes(user_settings_file_rx, cx); - // handle_keymap_file_changes(user_keymap_file_rx, cx); + handle_keymap_file_changes(user_keymap_file_rx, cx); let client = client::Client::new(http.clone(), cx); let mut languages = LanguageRegistry::new(login_shell_env_loaded); From 25876161f86604b83a85a7ba5813d07d73c8d1c4 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 7 Nov 2023 18:45:09 +0100 Subject: [PATCH 060/110] theme_importer: Format generated themes (#3255) This PR makes the `theme_importer` format the themes that it generates automatically. Release Notes: - N/A --- crates/theme2/src/registry.rs | 7 ++++-- crates/theme2/src/themes/andromeda.rs | 3 +++ crates/theme2/src/themes/ayu.rs | 3 +++ crates/theme2/src/themes/dracula.rs | 3 +++ crates/theme2/src/themes/gruvbox.rs | 3 +++ crates/theme2/src/themes/mod.rs | 5 ++++- crates/theme2/src/themes/night_owl.rs | 3 +++ crates/theme2/src/themes/nord.rs | 3 +++ crates/theme2/src/themes/notctis.rs | 3 +++ crates/theme2/src/themes/palenight.rs | 3 +++ crates/theme2/src/themes/rose_pine.rs | 3 +++ crates/theme2/src/themes/solarized.rs | 3 +++ crates/theme2/src/themes/synthwave_84.rs | 3 +++ crates/theme_importer/src/main.rs | 27 +++++++++++++++++++++++- 14 files changed, 68 insertions(+), 4 deletions(-) diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index 37055da361869d403546bed4221578c64108a61c..c9ff549c1561f39fda8400e3429c2ba89160a501 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -52,7 +52,10 @@ impl ThemeRegistry { status: StatusColors::default(), git: GitStatusColors::default(), player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), + syntax: match user_theme.appearance { + Appearance::Light => SyntaxTheme::default_light(), + Appearance::Dark => SyntaxTheme::default_dark(), + }, }, } })); @@ -81,7 +84,7 @@ impl Default for ThemeRegistry { }; this.insert_theme_families([zed_pro_family()]); - this.insert_user_theme_familes(crate::all_imported_themes()); + this.insert_user_theme_familes(crate::all_user_themes()); this } diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 0d58dc9d56eda3ae0530c5daf5a685161e6e30a1..22a0a8741c43f52a2f437dfa4a8bffb3b51f103b 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 6298de40eec342320c52303576b0c475113bf5e4..8d79289046b94389bffb0759d2210d76c440c4c0 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs index ea0e185e0553b130a4b0883db837e371fcb0a498..57c04851a5a45d821060d20d65b9b36f0d25e455 100644 --- a/crates/theme2/src/themes/dracula.rs +++ b/crates/theme2/src/themes/dracula.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index d06f53da67574337e76abc72ad0fad51feb4287d..2e79b250dac13232ffa0bef549b34fe9eb6e7924 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs index b013a86989cdad96ca83dd7a619f9fb8af947694..c48338b184ac8678f8af3f13a274757435cdbca9 100644 --- a/crates/theme2/src/themes/mod.rs +++ b/crates/theme2/src/themes/mod.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + mod andromeda; mod ayu; mod dracula; @@ -24,7 +27,7 @@ pub use synthwave_84::*; use crate::UserThemeFamily; -pub(crate) fn all_imported_themes() -> Vec { +pub(crate) fn all_user_themes() -> Vec { vec![ rose_pine(), night_owl(), diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rs index 4227c53b7a0fc2d36f55eddec8722c9ace03003d..90ae45f8797c522258840c4d2efd28586be74c47 100644 --- a/crates/theme2/src/themes/night_owl.rs +++ b/crates/theme2/src/themes/night_owl.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs index 981b460d10e232f89834c6936ab2b9fe54c891ad..b1dedd6b16eb2cdc991aca441938cfa17a75e888 100644 --- a/crates/theme2/src/themes/nord.rs +++ b/crates/theme2/src/themes/nord.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs index d8673824db638a891cd08f1b0346c5cc4b9d1783..f5b8f1207d45ce5de6664b1bc7ffe9f8c3237172 100644 --- a/crates/theme2/src/themes/notctis.rs +++ b/crates/theme2/src/themes/notctis.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs index 64df5d7ecbf35c5e61a1555299bdb48bd9aab3b0..7ed27d3b7576601c4bcc573e2d43bbc818152f50 100644 --- a/crates/theme2/src/themes/palenight.rs +++ b/crates/theme2/src/themes/palenight.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index 6fd641861a23042b5320f98a0ac0cab972a6542e..913af127fbbab692ccb1f0261c71ec10b1da1ac4 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index 1f1c55f0817f26554953a332b7cd74d3320bbae4..0a78328e2e80f5895a2bd29a5c84d18f2777b042 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs index a512c087ff842edc55172b240d5a58a3da8da524..8c0520ee11d13fc2d72939e3639cb0746fe5ae7b 100644 --- a/crates/theme2/src/themes/synthwave_84.rs +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -1,3 +1,6 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + use gpui::rgba; use crate::{ diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index e2ece76b128d52b3fd42005f5a4afe60c66ce7ac..b41994a0be0c10d0a1ed9d18e2ef03c4deecf9f1 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -5,6 +5,7 @@ mod vscode; use std::fs::{self, File}; use std::io::Write; use std::path::PathBuf; +use std::process::Command; use std::str::FromStr; use anyhow::{anyhow, Context, Result}; @@ -152,6 +153,9 @@ fn main() -> Result<()> { let theme_module = format!( r#" + // This file was generated by the `theme_importer`. + // Be careful when modifying it by hand. + use gpui::rgba; use crate::{{ @@ -174,7 +178,7 @@ fn main() -> Result<()> { r#" use crate::UserThemeFamily; - pub(crate) fn all_imported_themes() -> Vec {{ + pub(crate) fn all_user_themes() -> Vec {{ vec![{all_themes}] }} "#, @@ -187,6 +191,9 @@ fn main() -> Result<()> { let mod_rs_contents = format!( r#" + // This file was generated by the `theme_importer`. + // Be careful when modifying it by hand. + {mod_statements} {use_statements} @@ -208,5 +215,23 @@ fn main() -> Result<()> { mod_rs_file.write_all(mod_rs_contents.as_bytes())?; + println!("Formatting themes..."); + + let format_result = format_themes_crate() + // We need to format a second time to catch all of the formatting issues. + .and_then(|_| format_themes_crate()); + + if let Err(err) = format_result { + eprintln!("Failed to format themes: {}", err); + } + + println!("Done!"); + Ok(()) } + +fn format_themes_crate() -> std::io::Result { + Command::new("cargo") + .args(["fmt", "--package", "theme2"]) + .output() +} From 1d34b7b9fe45624dc1416ab65420b75562292db8 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 09:46:41 -0800 Subject: [PATCH 061/110] Implement picker actions Co-authored-by: Mikayla --- crates/picker2/src/picker2.rs | 57 ++++++++++++++++++------- crates/storybook2/src/stories/picker.rs | 20 ++++++++- 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 26ca810b0c9b6fa7d8b2f966bd842f7131592ccb..982d8360fb8f5300df57c7c50ad3fc8e4ffab5c8 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -42,13 +42,12 @@ pub trait PickerDelegate: Sized + 'static { // fn placeholder_text(&self) -> Arc; fn match_count(&self, picker_id: ElementId) -> usize; - fn selected_index(&self, picker_id: ElementId) -> usize; fn set_selected_index(&mut self, ix: usize, picker_id: ElementId, cx: &mut ViewContext); // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; - // fn confirm(&mut self, secondary: bool, cx: &mut ViewContext>); - // fn dismissed(&mut self, cx: &mut ViewContext>); + fn confirm(&mut self, secondary: bool, picker_id: ElementId, cx: &mut ViewContext); + fn dismissed(&mut self, picker_id: ElementId, cx: &mut ViewContext); // todo!("rename to render_candidate?") fn render_match( @@ -105,18 +104,18 @@ impl Picker { .id(self.id.clone()) .track_focus(&self.focus_handle) .context("picker") - .on_focus(|v, e, cx| { - dbg!("FOCUSED!"); + .on_focus(|_, _, _cx| { + eprintln!("picker focused"); }) - .on_blur(|v, e, cx| { - dbg!("BLURRED!"); + .on_blur(|_, _, _cx| { + eprintln!("picker blurred"); }) .on_action({ let id = id.clone(); move |view: &mut V, _: &menu::SelectNext, cx| { - let index = view.selected_index(id.clone()); let count = view.match_count(id.clone()); if count > 0 { + let index = view.selected_index(id.clone()); view.set_selected_index(cmp::min(index + 1, count - 1), id.clone(), cx); } } @@ -124,18 +123,46 @@ impl Picker { .on_action({ let id = id.clone(); move |view, _: &menu::SelectPrev, cx| { - let index = view.selected_index(id.clone()); let count = view.match_count(id.clone()); if count > 0 { - view.set_selected_index((index + 1) % count, id.clone(), cx); + let index = view.selected_index(id.clone()); + view.set_selected_index(index.saturating_sub(1), id.clone(), cx); + } + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::SelectFirst, cx| { + view.set_selected_index(0, id.clone(), cx); + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::SelectLast, cx| { + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index(count - 1, id.clone(), cx); } } }) - .on_action(|view, _: &menu::SelectFirst, cx| {}) - .on_action(|view, _: &menu::SelectLast, cx| {}) - .on_action(|view, _: &menu::Cancel, cx| {}) - .on_action(|view, _: &menu::Confirm, cx| {}) - .on_action(|view, _: &menu::SecondaryConfirm, cx| {}) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::Cancel, cx| { + view.dismissed(id.clone(), cx); + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::Confirm, cx| { + view.confirm(false, id.clone(), cx); + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::SecondaryConfirm, cx| { + view.confirm(true, id.clone(), cx); + } + }) .child( list( "candidates", diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index 13c3957979737f27c0eacfda71e5ecd41ae681e6..f5f2456d42bd2137081a6c6f8df262dee5e6f22a 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -48,9 +48,27 @@ impl PickerDelegate for PickerStory { &mut self, ix: usize, _picker_id: gpui::ElementId, - _cx: &mut gpui::ViewContext, + cx: &mut gpui::ViewContext, ) { self.selected_ix = ix; + cx.notify(); + } + + fn confirm( + &mut self, + secondary: bool, + picker_id: gpui::ElementId, + cx: &mut gpui::ViewContext, + ) { + if secondary { + eprintln!("Secondary confirmed {}", self.candidates[self.selected_ix]) + } else { + eprintln!("Confirmed {}", self.candidates[self.selected_ix]) + } + } + + fn dismissed(&mut self, picker_id: gpui::ElementId, cx: &mut gpui::ViewContext) { + cx.quit(); } } From d7e86eb1c1b0dd9de671f74a68d34f0804d931b2 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Nov 2023 18:48:08 +0100 Subject: [PATCH 062/110] Merge remote-tracking branch 'origin/main' into editor-movement --- crates/editor2/src/display_map.rs | 100 +++---- crates/editor2/src/editor.rs | 282 +++++++++--------- crates/editor2/src/element.rs | 15 +- .../editor2/src/highlight_matching_bracket.rs | 2 +- crates/editor2/src/movement.rs | 3 +- crates/gpui2/src/action.rs | 4 +- crates/gpui2/src/window.rs | 11 +- crates/language2/src/highlight_map.rs | 2 + crates/theme2/src/colors.rs | 4 +- crates/theme2/src/default_colors.rs | 4 + crates/theme2/src/default_theme.rs | 6 +- crates/theme2/src/registry.rs | 2 +- crates/theme2/src/syntax.rs | 4 + crates/theme2/src/theme2.rs | 23 +- 14 files changed, 240 insertions(+), 222 deletions(-) diff --git a/crates/editor2/src/display_map.rs b/crates/editor2/src/display_map.rs index 93ceb4f9df95d609953579fdac2d42332ec1aeee..808f0d340a4807b64732c85ef6eb258def3c7f12 100644 --- a/crates/editor2/src/display_map.rs +++ b/crates/editor2/src/display_map.rs @@ -12,7 +12,9 @@ use crate::{ pub use block_map::{BlockMap, BlockPoint}; use collections::{BTreeMap, HashMap, HashSet}; use fold_map::FoldMap; -use gpui::{Font, FontId, HighlightStyle, Hsla, Line, Model, ModelContext, Pixels, UnderlineStyle}; +use gpui::{ + Font, FontId, HighlightStyle, Hsla, Line, Model, ModelContext, Pixels, TextRun, UnderlineStyle, +}; use inlay_map::InlayMap; use language::{ language_settings::language_settings, OffsetUtf16, Point, Subscription as BufferSubscription, @@ -21,7 +23,7 @@ use lsp::DiagnosticSeverity; use std::{any::TypeId, borrow::Cow, fmt::Debug, num::NonZeroU32, ops::Range, sync::Arc}; use sum_tree::{Bias, TreeMap}; use tab_map::TabMap; -use theme::Theme; +use theme::{SyntaxTheme, Theme}; use wrap_map::WrapMap; pub use block_map::{ @@ -505,18 +507,18 @@ impl DisplaySnapshot { &'a self, display_rows: Range, language_aware: bool, - theme: &'a Theme, + editor_style: &'a EditorStyle, ) -> impl Iterator> { self.chunks( display_rows, language_aware, - None, // todo!("add inlay highlight style") - None, // todo!("add suggestion highlight style") + Some(editor_style.syntax.inlay_style), + Some(editor_style.syntax.suggestion_style), ) .map(|chunk| { let mut highlight_style = chunk .syntax_highlight_id - .and_then(|id| id.style(&theme.styles.syntax)); + .and_then(|id| id.style(&editor_style.syntax)); if let Some(chunk_highlight) = chunk.highlight_style { if let Some(highlight_style) = highlight_style.as_mut() { @@ -535,7 +537,8 @@ impl DisplaySnapshot { if let Some(severity) = chunk.diagnostic_severity { // Omit underlines for HINT/INFO diagnostics on 'unnecessary' code. if severity <= DiagnosticSeverity::WARNING || !chunk.is_unnecessary { - let diagnostic_color = super::diagnostic_style(severity, true, theme); + let diagnostic_color = + super::diagnostic_style(severity, true, &editor_style.diagnostic_style); diagnostic_highlight.underline = Some(UnderlineStyle { color: Some(diagnostic_color), thickness: 1.0.into(), @@ -564,53 +567,46 @@ impl DisplaySnapshot { TextLayoutDetails { text_system, editor_style, + rem_size, }: &TextLayoutDetails, ) -> Line { - todo!() - // let mut styles = Vec::new(); - // let mut line = String::new(); - // let mut ended_in_newline = false; - - // let range = display_row..display_row + 1; - // for chunk in self.highlighted_chunks(range, false, editor_style) { - // line.push_str(chunk.chunk); - - // let text_style = if let Some(style) = chunk.style { - // editor_style - // .text - // .clone() - // .highlight(style, text_system) - // .map(Cow::Owned) - // .unwrap_or_else(|_| Cow::Borrowed(&editor_style.text)) - // } else { - // Cow::Borrowed(&editor_style.text) - // }; - // ended_in_newline = chunk.chunk.ends_with("\n"); - - // styles.push( - // todo!(), // len: chunk.chunk.len(), - // // font_id: text_style.font_id, - // // color: text_style.color, - // // underline: text_style.underline, - // ); - // } - - // // our pixel positioning logic assumes each line ends in \n, - // // this is almost always true except for the last line which - // // may have no trailing newline. - // if !ended_in_newline && display_row == self.max_point().row() { - // line.push_str("\n"); - - // todo!(); - // // styles.push(RunStyle { - // // len: "\n".len(), - // // font_id: editor_style.text.font_id, - // // color: editor_style.text_color, - // // underline: editor_style.text.underline, - // // }); - // } - - // text_system.layout_text(&line, editor_style.text.font_size, &styles, None) + let mut runs = Vec::new(); + let mut line = String::new(); + let mut ended_in_newline = false; + + let range = display_row..display_row + 1; + for chunk in self.highlighted_chunks(range, false, &editor_style) { + line.push_str(chunk.chunk); + + let text_style = if let Some(style) = chunk.style { + editor_style + .text + .clone() + .highlight(style) + .map(Cow::Owned) + .unwrap_or_else(|_| Cow::Borrowed(&editor_style.text)) + } else { + Cow::Borrowed(&editor_style.text) + }; + ended_in_newline = chunk.chunk.ends_with("\n"); + + runs.push(text_style.to_run(chunk.chunk.len())) + } + + // our pixel positioning logic assumes each line ends in \n, + // this is almost always true except for the last line which + // may have no trailing newline. + if !ended_in_newline && display_row == self.max_point().row() { + line.push_str("\n"); + runs.push(editor_style.text.to_run("\n".len())); + } + + let font_size = editor_style.text.font_size.to_pixels(*rem_size); + text_system + .layout_text(&line, font_size, &runs, None) + .unwrap() + .pop() + .unwrap() } pub fn x_for_point( diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 716fdcd488373af676be668631e54a786f0d2039..13afe8aebac141f9d202ab363cdae0ed0cb62f79 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -36,9 +36,10 @@ pub use element::{ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ - div, px, AnyElement, AppContext, BackgroundExecutor, Context, DispatchContext, Div, Element, - Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, Styled, - Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, + actions, div, px, AnyElement, AppContext, BackgroundExecutor, Context, DispatchContext, Div, + Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, + Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, + WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -82,7 +83,9 @@ use std::{ pub use sum_tree::Bias; use sum_tree::TreeMap; use text::Rope; -use theme::{ActiveTheme, PlayerColor, Theme, ThemeColors, ThemeSettings}; +use theme::{ + ActiveTheme, DiagnosticStyle, PlayerColor, SyntaxTheme, Theme, ThemeColors, ThemeSettings, +}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -257,118 +260,115 @@ impl InlayId { } } -// actions!( -// editor, -// [ -// Cancel, -// Backspace, -// Delete, -// Newline, -// NewlineAbove, -// NewlineBelow, -// GoToDiagnostic, -// GoToPrevDiagnostic, -// GoToHunk, -// GoToPrevHunk, -// Indent, -// Outdent, -// DeleteLine, -// DeleteToPreviousWordStart, -// DeleteToPreviousSubwordStart, -// DeleteToNextWordEnd, -// DeleteToNextSubwordEnd, -// DeleteToBeginningOfLine, -// DeleteToEndOfLine, -// CutToEndOfLine, -// DuplicateLine, -// MoveLineUp, -// MoveLineDown, -// JoinLines, -// SortLinesCaseSensitive, -// SortLinesCaseInsensitive, -// ReverseLines, -// ShuffleLines, -// ConvertToUpperCase, -// ConvertToLowerCase, -// ConvertToTitleCase, -// ConvertToSnakeCase, -// ConvertToKebabCase, -// ConvertToUpperCamelCase, -// ConvertToLowerCamelCase, -// Transpose, -// Cut, -// Copy, -// Paste, -// Undo, -// Redo, -// MoveUp, -// PageUp, -// MoveDown, -// PageDown, -// MoveLeft, -// MoveRight, -// MoveToPreviousWordStart, -// MoveToPreviousSubwordStart, -// MoveToNextWordEnd, -// MoveToNextSubwordEnd, -// MoveToBeginningOfLine, -// MoveToEndOfLine, -// MoveToStartOfParagraph, -// MoveToEndOfParagraph, -// MoveToBeginning, -// MoveToEnd, -// SelectUp, -// SelectDown, -// SelectLeft, -// SelectRight, -// SelectToPreviousWordStart, -// SelectToPreviousSubwordStart, -// SelectToNextWordEnd, -// SelectToNextSubwordEnd, -// SelectToStartOfParagraph, -// SelectToEndOfParagraph, -// SelectToBeginning, -// SelectToEnd, -// SelectAll, -// SelectLine, -// SplitSelectionIntoLines, -// AddSelectionAbove, -// AddSelectionBelow, -// Tab, -// TabPrev, -// ShowCharacterPalette, -// SelectLargerSyntaxNode, -// SelectSmallerSyntaxNode, -// GoToDefinition, -// GoToDefinitionSplit, -// GoToTypeDefinition, -// GoToTypeDefinitionSplit, -// MoveToEnclosingBracket, -// UndoSelection, -// RedoSelection, -// FindAllReferences, -// Rename, -// ConfirmRename, -// Fold, -// UnfoldLines, -// FoldSelectedRanges, -// ShowCompletions, -// OpenExcerpts, -// RestartLanguageServer, -// Hover, -// Format, -// ToggleSoftWrap, -// ToggleInlayHints, -// RevealInFinder, -// CopyPath, -// CopyRelativePath, -// CopyHighlightJson, -// ContextMenuFirst, -// ContextMenuPrev, -// ContextMenuNext, -// ContextMenuLast, -// ] -// ); +actions!( + Cancel, + Backspace, + Delete, + Newline, + NewlineAbove, + NewlineBelow, + GoToDiagnostic, + GoToPrevDiagnostic, + GoToHunk, + GoToPrevHunk, + Indent, + Outdent, + DeleteLine, + DeleteToPreviousWordStart, + DeleteToPreviousSubwordStart, + DeleteToNextWordEnd, + DeleteToNextSubwordEnd, + DeleteToBeginningOfLine, + DeleteToEndOfLine, + CutToEndOfLine, + DuplicateLine, + MoveLineUp, + MoveLineDown, + JoinLines, + SortLinesCaseSensitive, + SortLinesCaseInsensitive, + ReverseLines, + ShuffleLines, + ConvertToUpperCase, + ConvertToLowerCase, + ConvertToTitleCase, + ConvertToSnakeCase, + ConvertToKebabCase, + ConvertToUpperCamelCase, + ConvertToLowerCamelCase, + Transpose, + Cut, + Copy, + Paste, + Undo, + Redo, + MoveUp, + PageUp, + MoveDown, + PageDown, + MoveLeft, + MoveRight, + MoveToPreviousWordStart, + MoveToPreviousSubwordStart, + MoveToNextWordEnd, + MoveToNextSubwordEnd, + MoveToBeginningOfLine, + MoveToEndOfLine, + MoveToStartOfParagraph, + MoveToEndOfParagraph, + MoveToBeginning, + MoveToEnd, + SelectUp, + SelectDown, + SelectLeft, + SelectRight, + SelectToPreviousWordStart, + SelectToPreviousSubwordStart, + SelectToNextWordEnd, + SelectToNextSubwordEnd, + SelectToStartOfParagraph, + SelectToEndOfParagraph, + SelectToBeginning, + SelectToEnd, + SelectAll, + SelectLine, + SplitSelectionIntoLines, + AddSelectionAbove, + AddSelectionBelow, + Tab, + TabPrev, + ShowCharacterPalette, + SelectLargerSyntaxNode, + SelectSmallerSyntaxNode, + GoToDefinition, + GoToDefinitionSplit, + GoToTypeDefinition, + GoToTypeDefinitionSplit, + MoveToEnclosingBracket, + UndoSelection, + RedoSelection, + FindAllReferences, + Rename, + ConfirmRename, + Fold, + UnfoldLines, + FoldSelectedRanges, + ShowCompletions, + OpenExcerpts, + RestartLanguageServer, + Hover, + Format, + ToggleSoftWrap, + ToggleInlayHints, + RevealInFinder, + CopyPath, + CopyRelativePath, + CopyHighlightJson, + ContextMenuFirst, + ContextMenuPrev, + ContextMenuNext, + ContextMenuLast, +); // impl_actions!( // editor, @@ -390,26 +390,6 @@ impl InlayId { // ] // ); -// todo!(revisit these actions) -pub struct ShowCompletions; -pub struct Rename; -pub struct GoToDefinition; -pub struct GoToTypeDefinition; -pub struct GoToDefinitionSplit; -pub struct GoToTypeDefinitionSplit; - -#[derive(PartialEq, Clone, Default, Deserialize)] -pub struct MoveLeft; - -#[derive(PartialEq, Clone, Default, Deserialize)] -pub struct MoveRight; - -#[derive(PartialEq, Clone, Default, Deserialize)] -pub struct MoveDown; - -#[derive(PartialEq, Clone, Default, Deserialize)] -pub struct MoveUp; - enum DocumentHighlightRead {} enum DocumentHighlightWrite {} enum InputComposition {} @@ -615,6 +595,8 @@ pub struct EditorStyle { pub text: TextStyle, pub line_height_scalar: f32, pub scrollbar_width: Pixels, + pub syntax: Arc, + pub diagnostic_style: DiagnosticStyle, } type CompletionId = usize; @@ -3543,6 +3525,7 @@ impl Editor { TextLayoutDetails { text_system: cx.text_system().clone(), editor_style: self.style.clone().unwrap(), + rem_size: cx.rem_size(), } } @@ -5862,7 +5845,6 @@ impl Editor { // } pub fn move_down(&mut self, _: &MoveDown, cx: &mut ViewContext) { - dbg!("move_down"); self.take_rename(true, cx); if self.mode == EditorMode::SingleLine { @@ -9399,6 +9381,8 @@ impl Render for Editor { text: text_style, line_height_scalar: settings.buffer_line_height.value(), scrollbar_width: px(12.), + syntax: cx.theme().syntax().clone(), + diagnostic_style: cx.theme().diagnostic_style(), }) } } @@ -9982,17 +9966,21 @@ pub fn highlight_diagnostic_message( (message_without_backticks, highlights) } -pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &Theme) -> Hsla { +pub fn diagnostic_style( + severity: DiagnosticSeverity, + valid: bool, + style: &DiagnosticStyle, +) -> Hsla { match (severity, valid) { - (DiagnosticSeverity::ERROR, true) => theme.status().error, - (DiagnosticSeverity::ERROR, false) => theme.status().error, - (DiagnosticSeverity::WARNING, true) => theme.status().warning, - (DiagnosticSeverity::WARNING, false) => theme.status().warning, - (DiagnosticSeverity::INFORMATION, true) => theme.status().info, - (DiagnosticSeverity::INFORMATION, false) => theme.status().info, - (DiagnosticSeverity::HINT, true) => theme.status().info, - (DiagnosticSeverity::HINT, false) => theme.status().info, - _ => theme.status().ignored, + (DiagnosticSeverity::ERROR, true) => style.error, + (DiagnosticSeverity::ERROR, false) => style.error, + (DiagnosticSeverity::WARNING, true) => style.warning, + (DiagnosticSeverity::WARNING, false) => style.warning, + (DiagnosticSeverity::INFORMATION, true) => style.info, + (DiagnosticSeverity::INFORMATION, false) => style.info, + (DiagnosticSeverity::HINT, true) => style.info, + (DiagnosticSeverity::HINT, false) => style.info, + _ => style.ignored, } } diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 918cfce43f1afaa2bc2d66282531338e70d4e9db..09f9ef1a59972e78d3a9977d46bba6d2717f1c59 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1577,12 +1577,10 @@ impl EditorElement { }) .collect() } else { - let style = &self.style; - let chunks = snapshot.highlighted_chunks(rows.clone(), true, cx.theme()); - + let chunks = snapshot.highlighted_chunks(rows.clone(), true, &self.style); LineWithInvisibles::from_chunks( chunks, - &style.text, + &self.style.text, MAX_LINE_LEN, rows.len() as usize, line_number_layouts, @@ -2560,6 +2558,10 @@ impl Element for EditorElement { cx.with_key_dispatch_context(dispatch_context, |cx| { cx.with_key_listeners( [ + build_action_listener(Editor::move_left), + build_action_listener(Editor::move_right), + build_action_listener(Editor::move_down), + build_action_listener(Editor::move_up), build_key_listener( move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| { if phase == DispatchPhase::Bubble { @@ -2568,7 +2570,6 @@ impl Element for EditorElement { &key_down.keystroke, dispatch_context, ) { - dbg!(action.as_any()); return Some(action); } } @@ -2576,10 +2577,6 @@ impl Element for EditorElement { None }, ), - build_action_listener(Editor::move_left), - build_action_listener(Editor::move_right), - build_action_listener(Editor::move_down), - build_action_listener(Editor::move_up), ], |cx| cx.with_focus(editor.focus_handle.clone(), |_| {}), ); diff --git a/crates/editor2/src/highlight_matching_bracket.rs b/crates/editor2/src/highlight_matching_bracket.rs index fd8fb6b097099e6a9d47cbfd81f1b2e278e7f405..d7fd37745f0e1465ba5fec5f018834dec68df52f 100644 --- a/crates/editor2/src/highlight_matching_bracket.rs +++ b/crates/editor2/src/highlight_matching_bracket.rs @@ -24,7 +24,7 @@ pub fn refresh_matching_bracket_highlights(editor: &mut Editor, cx: &mut ViewCon opening_range.to_anchors(&snapshot.buffer_snapshot), closing_range.to_anchors(&snapshot.buffer_snapshot), ], - |theme| todo!("theme.editor.document_highlight_read_background"), + |theme| theme.editor_document_highlight_read_background, cx, ) } diff --git a/crates/editor2/src/movement.rs b/crates/editor2/src/movement.rs index b15c484a0312ae6e47858f7362a8e4309f0142a8..b28af681e0f2eaf2f5f838be838ff696f1ab3b9b 100644 --- a/crates/editor2/src/movement.rs +++ b/crates/editor2/src/movement.rs @@ -1,6 +1,6 @@ use super::{Bias, DisplayPoint, DisplaySnapshot, SelectionGoal, ToDisplayPoint}; use crate::{char_kind, CharKind, EditorStyle, ToOffset, ToPoint}; -use gpui::{px, TextSystem}; +use gpui::{px, Pixels, TextSystem}; use language::Point; use serde::de::IntoDeserializer; use std::{ops::Range, sync::Arc}; @@ -16,6 +16,7 @@ pub enum FindRange { pub struct TextLayoutDetails { pub text_system: Arc, pub editor_style: EditorStyle, + pub rem_size: Pixels, } pub fn left(map: &DisplaySnapshot, mut point: DisplayPoint) -> DisplayPoint { diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 393a3feda6ba8a2a3ef1317f715ee08c8e12227e..90f312f502ca60d011c7c40c1dac60a1a5427bef 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -24,12 +24,12 @@ macro_rules! actions { ( $name:ident ) => { #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] - struct $name; + pub struct $name; }; ( $name:ident { $($token:tt)* } ) => { #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] - struct $name { $($token)* } + pub struct $name { $($token)* } }; ( $name:ident, $($rest:tt)* ) => { diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index cc5d25627ee4d9d51a62c6c351b9ab2ce16cc13b..cd82eee72fb1a43b740d4910f7f24552b7b0895a 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -300,7 +300,8 @@ impl Window { /// When constructing the element tree, we maintain a stack of key dispatch frames until we /// find the focused element. We interleave key listeners with dispatch contexts so we can use the -/// contexts when matching key events against the keymap. +/// contexts when matching key events against the keymap. A key listener can be either an action +/// handler or a [KeyDown] / [KeyUp] event listener. enum KeyDispatchStackFrame { Listener { event_type: TypeId, @@ -1048,6 +1049,10 @@ impl<'a> WindowContext<'a> { /// Dispatch a mouse or keyboard event on the window. pub fn dispatch_event(&mut self, event: InputEvent) -> bool { + // Handlers may set this to false by calling `stop_propagation` + self.app.propagate_event = true; + self.window.default_prevented = false; + let event = match event { // Track the mouse position with our own state, since accessing the platform // API for the mouse position can only occur on the main thread. @@ -1101,10 +1106,6 @@ impl<'a> WindowContext<'a> { }; if let Some(any_mouse_event) = event.mouse_event() { - // Handlers may set this to false by calling `stop_propagation` - self.app.propagate_event = true; - self.window.default_prevented = false; - if let Some(mut handlers) = self .window .mouse_listeners diff --git a/crates/language2/src/highlight_map.rs b/crates/language2/src/highlight_map.rs index aeeda546bf1337ce0f3c9f9e5ff4f5d2fd9d1dae..1421ef672da935a7d2ff540e85591e4ff7d41be1 100644 --- a/crates/language2/src/highlight_map.rs +++ b/crates/language2/src/highlight_map.rs @@ -95,6 +95,8 @@ mod tests { .iter() .map(|(name, color)| (name.to_string(), (*color).into())) .collect(), + inlay_style: HighlightStyle::default(), + suggestion_style: HighlightStyle::default(), }; let capture_names = &[ diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index e1df841c24b8cce7c43296dbb569d82b9fb5277f..bb7d44e5d2816c81f78d37f47c6f9efa918b25c6 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use gpui::Hsla; use refineable::Refineable; @@ -145,7 +147,7 @@ pub struct ThemeStyles { pub status: StatusColors, pub git: GitStatusColors, pub player: PlayerColors, - pub syntax: SyntaxTheme, + pub syntax: Arc, } #[cfg(test)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index f79518e7696894bc31f9149201446d4c64d53c08..c540fb40a9382f127e9ba57d1fcf5d83f3dd364a 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -138,6 +138,8 @@ impl SyntaxTheme { ("variable.special".into(), red().light().step_7().into()), ("variant".into(), red().light().step_7().into()), ], + inlay_style: tomato().light().step_1().into(), // todo!("nate: use a proper style") + suggestion_style: orange().light().step_1().into(), // todo!("nate: use proper style") } } @@ -193,6 +195,8 @@ impl SyntaxTheme { ("variable.special".into(), red().dark().step_7().into()), ("variant".into(), red().dark().step_7().into()), ], + inlay_style: tomato().dark().step_1().into(), // todo!("nate: use a proper style") + suggestion_style: orange().dark().step_1().into(), // todo!("nate: use a proper style") } } } diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index dacd26be3e2eb7a5c376985327d96aa7ba94f92b..3c9634c9898062db06b3431e6d495df7cb8ae682 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use crate::{ colors::{GitStatusColors, PlayerColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, default_color_scales, Appearance, SyntaxTheme, Theme, ThemeFamily, @@ -14,7 +16,7 @@ fn zed_pro_daylight() -> Theme { status: StatusColors::default(), git: GitStatusColors::default(), player: PlayerColors::default(), - syntax: SyntaxTheme::default_light(), + syntax: Arc::new(SyntaxTheme::default_light()), }, } } @@ -30,7 +32,7 @@ pub(crate) fn zed_pro_moonlight() -> Theme { status: StatusColors::default(), git: GitStatusColors::default(), player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), + syntax: Arc::new(SyntaxTheme::default_dark()), }, } } diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index 37055da361869d403546bed4221578c64108a61c..17f154f06ef2c2850a9544e6c81827fc9a23ec9a 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -52,7 +52,7 @@ impl ThemeRegistry { status: StatusColors::default(), git: GitStatusColors::default(), player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), + syntax: Arc::new(SyntaxTheme::default_dark()), }, } })); diff --git a/crates/theme2/src/syntax.rs b/crates/theme2/src/syntax.rs index 3a068349fbe1e8377f4c229ddd9f6e5892e1a994..8aac238555f1190272a8f959da142901fb70d326 100644 --- a/crates/theme2/src/syntax.rs +++ b/crates/theme2/src/syntax.rs @@ -3,6 +3,8 @@ use gpui::{HighlightStyle, Hsla}; #[derive(Clone, Default)] pub struct SyntaxTheme { pub highlights: Vec<(String, HighlightStyle)>, + pub inlay_style: HighlightStyle, + pub suggestion_style: HighlightStyle, } impl SyntaxTheme { @@ -21,6 +23,8 @@ impl SyntaxTheme { ) }) .collect(), + inlay_style: HighlightStyle::default(), + suggestion_style: HighlightStyle::default(), } } diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 0a9b9821f628f99640915cc23617210a9162f3f9..88db3c55f47cf859fa5475745c270064d09d120a 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -77,7 +77,7 @@ impl Theme { /// Returns the [`SyntaxTheme`] for the theme. #[inline(always)] - pub fn syntax(&self) -> &SyntaxTheme { + pub fn syntax(&self) -> &Arc { &self.styles.syntax } @@ -98,4 +98,25 @@ impl Theme { pub fn syntax_color(&self, name: &str) -> Hsla { self.syntax().color(name) } + + /// Returns the [`StatusColors`] for the theme. + #[inline(always)] + pub fn diagnostic_style(&self) -> DiagnosticStyle { + DiagnosticStyle { + error: self.status().error, + warning: self.status().warning, + info: self.status().info, + hint: self.status().info, + ignored: self.status().ignored, + } + } +} + +#[derive(Clone, Debug)] +pub struct DiagnosticStyle { + pub error: Hsla, + pub warning: Hsla, + pub info: Hsla, + pub hint: Hsla, + pub ignored: Hsla, } From 3a72f2122a221348a7796dda1c982a4ea7f50c0d Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 11:12:16 -0700 Subject: [PATCH 063/110] Implement Editor::single_line --- crates/editor2/src/editor.rs | 25 ++++++++++--------------- crates/editor2/src/element.rs | 17 +++++++++++------ crates/gpui2/src/style.rs | 4 ++++ 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 13afe8aebac141f9d202ab363cdae0ed0cb62f79..99de3733a16f96fbbad5510c181071b5753c4c7c 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -36,10 +36,10 @@ pub use element::{ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ - actions, div, px, AnyElement, AppContext, BackgroundExecutor, Context, DispatchContext, Div, - Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, Model, Pixels, Render, - Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, - WindowContext, + actions, div, px, relative, AnyElement, AppContext, BackgroundExecutor, Context, + DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, + Model, Pixels, Render, Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, + WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -593,7 +593,6 @@ pub struct EditorStyle { pub background: Hsla, pub local_player: PlayerColor, pub text: TextStyle, - pub line_height_scalar: f32, pub scrollbar_width: Pixels, pub syntax: Arc, pub diagnostic_style: DiagnosticStyle, @@ -1795,14 +1794,11 @@ impl InlayHintRefreshReason { } impl Editor { - // pub fn single_line( - // field_editor_style: Option>, - // cx: &mut ViewContext, - // ) -> Self { - // let buffer = cx.build_model(|cx| Buffer::new(0, cx.model_id() as u64, String::new())); - // let buffer = cx.build_model(|cx| MultiBuffer::singleton(buffer, cx)); - // Self::new(EditorMode::SingleLine, buffer, None, field_editor_style, cx) - // } + pub fn single_line(cx: &mut ViewContext) -> Self { + let buffer = cx.build_model(|cx| Buffer::new(0, cx.entity_id().as_u64(), String::new())); + let buffer = cx.build_model(|cx| MultiBuffer::singleton(buffer, cx)); + Self::new(EditorMode::SingleLine, buffer, None, cx) + } // pub fn multi_line( // field_editor_style: Option>, @@ -9372,14 +9368,13 @@ impl Render for Editor { font_size: settings.buffer_font_size.into(), font_weight: FontWeight::NORMAL, font_style: FontStyle::Normal, - line_height: Default::default(), + line_height: relative(settings.buffer_line_height.value()), underline: None, }; EditorElement::new(EditorStyle { background: cx.theme().colors().editor_background, local_player: cx.theme().players().local(), text: text_style, - line_height_scalar: settings.buffer_line_height.value(), scrollbar_width: px(12.), syntax: cx.theme().syntax().clone(), diagnostic_style: cx.theme().diagnostic_style(), diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 09f9ef1a59972e78d3a9977d46bba6d2717f1c59..2236f8aeaf596caf87678e1962d460ea773ebf35 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -8,10 +8,11 @@ use crate::{ use anyhow::Result; use collections::{BTreeMap, HashMap}; use gpui::{ - black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowWindow, - Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, Edges, Element, ElementId, - Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Pixels, ScrollWheelEvent, ShapedGlyph, - Size, StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, WindowContext, + black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, + BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, + Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Pixels, + ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, + TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -1605,7 +1606,7 @@ impl EditorElement { let style = self.style.clone(); let font_id = cx.text_system().font_id(&style.text.font()).unwrap(); let font_size = style.text.font_size.to_pixels(cx.rem_size()); - let line_height = (font_size * style.line_height_scalar).round(); + let line_height = style.text.line_height_in_pixels(cx.rem_size()); let em_width = cx .text_system() .typographic_bounds(font_id, font_size, 'm') @@ -2593,7 +2594,11 @@ impl Element for EditorElement { let rem_size = cx.rem_size(); let mut style = Style::default(); style.size.width = relative(1.).into(); - style.size.height = relative(1.).into(); + style.size.height = match editor.mode { + EditorMode::SingleLine => self.style.text.line_height_in_pixels(cx.rem_size()).into(), + EditorMode::AutoHeight { .. } => todo!(), + EditorMode::Full => relative(1.).into(), + }; cx.request_layout(&style, None) } diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs index 551a87624cad716e1073f3bf16366d5a6c705027..5de173c2d4f729e90f9ba691bccb02bab664214a 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -189,6 +189,10 @@ impl TextStyle { } } + pub fn line_height_in_pixels(&self, rem_size: Pixels) -> Pixels { + self.line_height.to_pixels(self.font_size, rem_size) + } + pub fn to_run(&self, len: usize) -> TextRun { TextRun { len, From 91f356a2f163adbc4781e864751477ac0cb629f3 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 7 Nov 2023 13:36:01 -0500 Subject: [PATCH 064/110] Begin documenting theme colors --- crates/theme2/src/colors.rs | 96 +++++++++++++++++++++- crates/theme2/src/default_colors.rs | 8 +- crates/theme_importer/src/theme_printer.rs | 4 +- crates/ui2/src/components/tab.rs | 2 +- 4 files changed, 101 insertions(+), 9 deletions(-) diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index e1df841c24b8cce7c43296dbb569d82b9fb5277f..86373eb27a651669f02bfa133ea2120612a24969 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -69,25 +69,77 @@ pub struct GitStatusColors { #[refineable(debug, deserialize)] pub struct ThemeColors { pub border: Hsla, + /// Border color used for deemphasized borders, like a visual divider between two sections pub border_variant: Hsla, + /// Border color used for focused elements, like keyboard focused list item. pub border_focused: Hsla, + /// Border color used for selected elements, like an active search filter or selected checkbox. pub border_selected: Hsla, + /// Border color used for transparent borders. Used for placeholder borders when an element gains a border on state change. pub border_transparent: Hsla, + /// Border color used for disabled elements, like a disabled input or button. pub border_disabled: Hsla, + /// Used for elevated surfaces, like a context menu, popup, or dialog. pub elevated_surface_background: Hsla, + /// Used for grounded surfaces like a panel or tab. pub surface_background: Hsla, + /// Used the app background and blank panels or windows. pub background: Hsla, + /// Used for the background of an element that should have a different background than the surface it's on. + /// + /// Elements might include: Buttons, Inputs, Checkboxes, Radio Buttons... + /// + /// For an element that should have the same background as the surface it's on, use `ghost_element_background`. pub element_background: Hsla, + /// Used for the hover state of an element that should have a different background than the surface it's on. + /// + /// Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen. pub element_hover: Hsla, + /// Used for the active state of an element that should have a different background than the surface it's on. + /// + /// Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd. pub element_active: Hsla, + /// Used for the selected state of an element that should have a different background than the surface it's on. + /// + /// Selected states are triggered by the element being selected (or "activated") by the user. + /// + /// This could include a selected checkbox, a toggleable button that is toggled on, etc. pub element_selected: Hsla, + /// Used for the disabled state of an element that should have a different background than the surface it's on. + /// + /// Disabled states are shown when a user cannot interact with an element, like a disabled button or input. pub element_disabled: Hsla, - pub element_placeholder: Hsla, - pub element_drop_target: Hsla, + /// Used for the text color of an element that should have a different background than the surface it's on. + /// + /// Example: A input with some default placeholder text. + pub element_placeholder_text: Hsla, + /// Background color of the area that shows where a dragged element will be dropped. + pub drop_target_background: Hsla, + /// Border color of the area that shows where a dragged element will be dropped. + // pub drop_target_border: Hsla, + /// Used for the background of a ghost element that should have the same background as the surface it's on. + /// + /// Elements might include: Buttons, Inputs, Checkboxes, Radio Buttons... + /// + /// For an element that should have a different background than the surface it's on, use `element_background`. pub ghost_element_background: Hsla, + /// Used for the hover state of a ghost element that should have the same background as the surface it's on. + /// + /// Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen. pub ghost_element_hover: Hsla, + /// Used for the active state of a ghost element that should have the same background as the surface it's on. + /// + /// Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd. pub ghost_element_active: Hsla, + /// Used for the selected state of a ghost element that should have the same background as the surface it's on. + /// + /// Selected states are triggered by the element being selected (or "activated") by the user. + /// + /// This could include a selected checkbox, a toggleable button that is toggled on, etc. pub ghost_element_selected: Hsla, + /// Used for the disabled state of a ghost element that should have the same background as the surface it's on. + /// + /// Disabled states are shown when a user cannot interact with an element, like a disabled button or input. pub ghost_element_disabled: Hsla, pub text: Hsla, pub text_muted: Hsla, @@ -134,6 +186,46 @@ pub struct ThemeColors { pub terminal_ansi_magenta: Hsla, pub terminal_ansi_cyan: Hsla, pub terminal_ansi_white: Hsla, + // new colors + + // == elevation == + // elevatation_0_shadow + // elevatation_0_shadow_color + // elevatation_1_shadow + // elevatation_1_shadow_color + // elevatation_2_shadow + // elevatation_2_shadow_color + // elevatation_3_shadow + // elevatation_3_shadow_color + // elevatation_4_shadow + // elevatation_4_shadow_color + // elevatation_5_shadow + // elevatation_5_shadow_color + + // == rich text == + // headline + // paragraph + // link + // link_hover + // code_block_background + // code_block_border + + // == misc == + // inverted_element_* + // foreground: Overall foreground color. This color is only used if not overridden by a component. + // disabledForeground: Overall foreground for disabled elements. This color is only used if not overridden by a component. + // widget.border: Border color of widgets such as Find/Replace inside the editor. + // widget.shadow: Shadow color of widgets such as Find/Replace inside the editor. + // selection - foreground, background + // active_element_border + // inactive_element_border + // element_seperator + // scrollbar_thumb_background + // scrollbar_thumb_hover_background + // scrollbar_thumb_border + // scrollbar_track_background + // scrollbar_track_border + // scrollbar_status_opacity } #[derive(Refineable, Clone)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index f79518e7696894bc31f9149201446d4c64d53c08..93773ffab1e3c814c6922bd9deec0707fb6a3af0 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -216,8 +216,8 @@ impl ThemeColors { element_active: neutral().light().step_5(), element_selected: neutral().light().step_5(), element_disabled: neutral().light_alpha().step_3(), - element_placeholder: neutral().light().step_11(), - element_drop_target: blue().light_alpha().step_2(), + element_placeholder_text: neutral().light().step_11(), + drop_target_background: blue().light_alpha().step_2(), ghost_element_background: system.transparent, ghost_element_hover: neutral().light().step_4(), ghost_element_active: neutral().light().step_5(), @@ -289,8 +289,8 @@ impl ThemeColors { element_active: neutral().dark().step_5(), element_selected: neutral().dark().step_5(), element_disabled: neutral().dark_alpha().step_3(), - element_placeholder: neutral().dark().step_11(), - element_drop_target: blue().dark_alpha().step_2(), + element_placeholder_text: neutral().dark().step_11(), + drop_target_background: blue().dark_alpha().step_2(), ghost_element_background: system.transparent, ghost_element_hover: neutral().dark().step_4(), ghost_element_active: neutral().dark().step_5(), diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index aa74692164d016f6247a41a41dd354b256d70332..1857567604db27de95a6ff2267ca8b71857a7f97 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -140,8 +140,8 @@ impl<'a> Debug for ThemeColorsRefinementPrinter<'a> { ("element_active", self.0.element_active), ("element_selected", self.0.element_selected), ("element_disabled", self.0.element_disabled), - ("element_placeholder", self.0.element_placeholder), - ("element_drop_target", self.0.element_drop_target), + ("element_placeholder_text", self.0.element_placeholder_text), + ("drop_target_background", self.0.drop_target_background), ("ghost_element_background", self.0.ghost_element_background), ("ghost_element_hover", self.0.ghost_element_hover), ("ghost_element_active", self.0.ghost_element_active), diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rs index 416db2d17294d5c62e654f136b3f82c714f43b85..e936dc924a5fcba43e7d0905d5fac455d9ebd5c8 100644 --- a/crates/ui2/src/components/tab.rs +++ b/crates/ui2/src/components/tab.rs @@ -127,7 +127,7 @@ impl Tab { div() .id(self.id.clone()) .on_drag(move |_view, cx| cx.build_view(|cx| drag_state.clone())) - .drag_over::(|d| d.bg(cx.theme().colors().element_drop_target)) + .drag_over::(|d| d.bg(cx.theme().colors().drop_target_background)) .on_drop(|_view, state: View, cx| { eprintln!("{:?}", state.read(cx)); }) From 742180a3a8963635e396410e7282ad710ddae016 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 10:45:38 -0800 Subject: [PATCH 065/110] Implement list scroll tracking Co-authored-by: Mikayla --- crates/gpui2/src/elements/list.rs | 53 ++++++++++++++++++++++++++++--- crates/gpui2/src/interactive.rs | 6 ++++ crates/picker2/src/picker2.rs | 45 ++++++++++++-------------- 3 files changed, 75 insertions(+), 29 deletions(-) diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/list.rs index 0719f2a92ee318f74ee25748e793c18aa2d6b5f2..acd1a524f32f0c0e174d0f07640a99ce025cbc22 100644 --- a/crates/gpui2/src/elements/list.rs +++ b/crates/gpui2/src/elements/list.rs @@ -1,11 +1,12 @@ use crate::{ point, px, AnyElement, AvailableSpace, BorrowWindow, Bounds, Component, Element, ElementId, - ElementInteractivity, InteractiveElementState, LayoutId, Pixels, Size, StatefulInteractive, - StatefulInteractivity, StatelessInteractive, StatelessInteractivity, StyleRefinement, Styled, - ViewContext, + ElementInteractivity, InteractiveElementState, LayoutId, Pixels, Point, Size, + StatefulInteractive, StatefulInteractivity, StatelessInteractive, StatelessInteractivity, + StyleRefinement, Styled, ViewContext, }; +use parking_lot::Mutex; use smallvec::SmallVec; -use std::{cmp, ops::Range}; +use std::{cmp, ops::Range, sync::Arc}; use taffy::style::Overflow; pub fn list( @@ -30,6 +31,7 @@ where .collect() }), interactivity: id.into(), + scroll_handle: None, } } @@ -45,6 +47,37 @@ pub struct List { ) -> SmallVec<[AnyElement; 64]>, >, interactivity: StatefulInteractivity, + scroll_handle: Option, +} + +#[derive(Clone)] +pub struct ListScrollHandle(Arc>>); + +#[derive(Clone, Debug)] +struct ListScrollHandleState { + item_height: Pixels, + list_height: Pixels, + scroll_offset: Arc>>, +} + +impl ListScrollHandle { + pub fn new() -> Self { + Self(Arc::new(Mutex::new(None))) + } + + pub fn scroll_to_item(&self, ix: usize) { + if let Some(state) = &*self.0.lock() { + let mut scroll_offset = state.scroll_offset.lock(); + let item_top = state.item_height * ix; + let item_bottom = item_top + state.item_height; + let scroll_top = -scroll_offset.y; + if item_top < scroll_top { + scroll_offset.y = -item_top; + } else if item_bottom > scroll_top + state.list_height { + scroll_offset.y = -(item_bottom - state.list_height); + } + } + } } #[derive(Default)] @@ -107,6 +140,13 @@ impl Element for List { let content_size; if self.item_count > 0 { let item_height = self.measure_item_height(view_state, padded_bounds, cx); + if let Some(scroll_handle) = self.scroll_handle.clone() { + scroll_handle.0.lock().replace(ListScrollHandleState { + item_height, + list_height: padded_bounds.size.height, + scroll_offset: element_state.interactive.track_scroll_offset(), + }); + } let visible_item_count = (padded_bounds.size.height / item_height).ceil() as usize + 1; let scroll_offset = element_state @@ -187,6 +227,11 @@ impl List { ); cx.layout_bounds(layout_id).size.height } + + pub fn track_scroll(mut self, handle: ListScrollHandle) -> Self { + self.scroll_handle = Some(handle); + self + } } impl StatelessInteractive for List { diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rs index 2fa3ceeac2ed916ae5d8da99a086a7a3a829d449..e38a158eef2af4ca385d1c9ba8f23d6ae156b857 100644 --- a/crates/gpui2/src/interactive.rs +++ b/crates/gpui2/src/interactive.rs @@ -900,6 +900,12 @@ impl InteractiveElementState { .as_ref() .map(|offset| offset.lock().clone()) } + + pub fn track_scroll_offset(&mut self) -> Arc>> { + self.scroll_offset + .get_or_insert_with(|| Arc::new(Mutex::new(Default::default()))) + .clone() + } } impl Default for StatelessInteractivity { diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 982d8360fb8f5300df57c7c50ad3fc8e4ffab5c8..dafe45e4e973e05d074a6970ffadfc210f1d16e2 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,28 +1,8 @@ -// use editor::Editor; -// use gpui::{ -// elements::*, -// geometry::vector::{vec2f, Vector2F}, -// keymap_matcher::KeymapContext, -// platform::{CursorStyle, MouseButton}, -// AnyElement, AnyViewHandle, AppContext, Axis, Entity, MouseState, Task, View, ViewContext, -// ViewHandle, -// }; -// use menu::{Cancel, Confirm, SecondaryConfirm, SelectFirst, SelectLast, SelectNext, SelectPrev}; -// use parking_lot::Mutex; -// use std::{cmp, sync::Arc}; -// use util::ResultExt; -// use workspace::Modal; - -// #[derive(Clone, Copy)] -// pub enum PickerEvent { -// Dismiss, -// } - use std::cmp; use gpui::{ - div, list, Component, ElementId, FocusHandle, Focusable, ParentElement, StatelessInteractive, - Styled, ViewContext, + div, list, Component, ElementId, FocusHandle, Focusable, ListScrollHandle, ParentElement, + StatelessInteractive, Styled, ViewContext, }; // pub struct Picker { @@ -99,6 +79,7 @@ impl Picker { impl Picker { pub fn render(self, view: &mut V, _cx: &mut ViewContext) -> impl Component { let id = self.id.clone(); + let scroll_handle = ListScrollHandle::new(); div() .size_full() .id(self.id.clone()) @@ -112,36 +93,49 @@ impl Picker { }) .on_action({ let id = id.clone(); + let scroll_handle = scroll_handle.clone(); move |view: &mut V, _: &menu::SelectNext, cx| { let count = view.match_count(id.clone()); if count > 0 { let index = view.selected_index(id.clone()); - view.set_selected_index(cmp::min(index + 1, count - 1), id.clone(), cx); + let ix = cmp::min(index + 1, count - 1); + view.set_selected_index(ix, id.clone(), cx); + scroll_handle.scroll_to_item(ix); } } }) .on_action({ let id = id.clone(); + let scroll_handle = scroll_handle.clone(); move |view, _: &menu::SelectPrev, cx| { let count = view.match_count(id.clone()); if count > 0 { let index = view.selected_index(id.clone()); - view.set_selected_index(index.saturating_sub(1), id.clone(), cx); + let ix = index.saturating_sub(1); + view.set_selected_index(ix, id.clone(), cx); + scroll_handle.scroll_to_item(ix); } } }) .on_action({ let id = id.clone(); + let scroll_handle = scroll_handle.clone(); move |view: &mut V, _: &menu::SelectFirst, cx| { - view.set_selected_index(0, id.clone(), cx); + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index(0, id.clone(), cx); + scroll_handle.scroll_to_item(0); + } } }) .on_action({ let id = id.clone(); + let scroll_handle = scroll_handle.clone(); move |view: &mut V, _: &menu::SelectLast, cx| { let count = view.match_count(id.clone()); if count > 0 { view.set_selected_index(count - 1, id.clone(), cx); + scroll_handle.scroll_to_item(count - 1); } } }) @@ -174,6 +168,7 @@ impl Picker { .collect() }, ) + .track_scroll(scroll_handle.clone()) .size_full(), ) } From 24128737191495d2f3c22aed132d1eb9fdf0bb4c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 10:53:59 -0800 Subject: [PATCH 066/110] Remove commented-out code in picker2 Co-authored-by: Mikayla --- crates/picker2/src/picker2.rs | 362 +----------------------- crates/storybook2/src/stories/picker.rs | 6 +- 2 files changed, 14 insertions(+), 354 deletions(-) diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index dafe45e4e973e05d074a6970ffadfc210f1d16e2..8161c0d0a2546d94b82ac6f640e3185074744df6 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,31 +1,26 @@ -use std::cmp; - use gpui::{ - div, list, Component, ElementId, FocusHandle, Focusable, ListScrollHandle, ParentElement, + div, list, Component, ElementId, FocusHandle, ListScrollHandle, ParentElement, StatelessInteractive, Styled, ViewContext, }; +use std::cmp; -// pub struct Picker { -// delegate: D, -// query_editor: ViewHandle, -// list_state: UniformListState, -// max_size: Vector2F, -// theme: Arc theme::Picker>>>, -// confirmed: bool, -// pending_update_matches: Option>>, -// confirm_on_update: Option, -// has_focus: bool, -// } +#[derive(Component)] +pub struct Picker { + id: ElementId, + focus_handle: FocusHandle, + phantom: std::marker::PhantomData, +} pub trait PickerDelegate: Sized + 'static { type ListItem: Component; - // fn placeholder_text(&self) -> Arc; fn match_count(&self, picker_id: ElementId) -> usize; fn selected_index(&self, picker_id: ElementId) -> usize; fn set_selected_index(&mut self, ix: usize, picker_id: ElementId, cx: &mut ViewContext); - // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; + // fn placeholder_text(&self) -> Arc; + // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; + fn confirm(&mut self, secondary: bool, picker_id: ElementId, cx: &mut ViewContext); fn dismissed(&mut self, picker_id: ElementId, cx: &mut ViewContext); @@ -37,33 +32,6 @@ pub trait PickerDelegate: Sized + 'static { picker_id: ElementId, cx: &mut ViewContext, ) -> Self::ListItem; - - // fn center_selection_after_match_updates(&self) -> bool { - // false - // } - // fn render_header( - // &self, - // _cx: &mut ViewContext>, - // ) -> Option>> { - // None - // } - // fn render_footer( - // &self, - // _cx: &mut ViewContext>, - // ) -> Option>> { - // None - // } -} - -// impl Entity for Picker { -// type Event = PickerEvent; -// } - -#[derive(Component)] -pub struct Picker { - id: ElementId, - focus_handle: FocusHandle, - phantom: std::marker::PhantomData, } impl Picker { @@ -85,12 +53,6 @@ impl Picker { .id(self.id.clone()) .track_focus(&self.focus_handle) .context("picker") - .on_focus(|_, _, _cx| { - eprintln!("picker focused"); - }) - .on_blur(|_, _, _cx| { - eprintln!("picker blurred"); - }) .on_action({ let id = id.clone(); let scroll_handle = scroll_handle.clone(); @@ -173,305 +135,3 @@ impl Picker { ) } } - -// impl View for Picker { -// fn ui_name() -> &'static str { -// "Picker" -// } - -// fn render(&mut self, cx: &mut ViewContext) -> AnyElement { -// let theme = (self.theme.lock())(theme::current(cx).as_ref()); -// let query = self.query(cx); -// let match_count = self.delegate.match_count(); - -// let container_style; -// let editor_style; -// if query.is_empty() && match_count == 0 { -// container_style = theme.empty_container; -// editor_style = theme.empty_input_editor.container; -// } else { -// container_style = theme.container; -// editor_style = theme.input_editor.container; -// }; - -// Flex::new(Axis::Vertical) -// .with_child( -// ChildView::new(&self.query_editor, cx) -// .contained() -// .with_style(editor_style), -// ) -// .with_children(self.delegate.render_header(cx)) -// .with_children(if match_count == 0 { -// if query.is_empty() { -// None -// } else { -// Some( -// Label::new("No matches", theme.no_matches.label.clone()) -// .contained() -// .with_style(theme.no_matches.container) -// .into_any(), -// ) -// } -// } else { -// Some( -// UniformList::new( -// self.list_state.clone(), -// match_count, -// cx, -// move |this, mut range, items, cx| { -// let selected_ix = this.delegate.selected_index(); -// range.end = cmp::min(range.end, this.delegate.match_count()); -// items.extend(range.map(move |ix| { -// MouseEventHandler::new::(ix, cx, |state, cx| { -// this.delegate.render_match(ix, state, ix == selected_ix, cx) -// }) -// // Capture mouse events -// .on_down(MouseButton::Left, |_, _, _| {}) -// .on_up(MouseButton::Left, |_, _, _| {}) -// .on_click(MouseButton::Left, move |click, picker, cx| { -// picker.select_index(ix, click.cmd, cx); -// }) -// .with_cursor_style(CursorStyle::PointingHand) -// .into_any() -// })); -// }, -// ) -// .contained() -// .with_margin_top(6.0) -// .flex(1., false) -// .into_any(), -// ) -// }) -// .with_children(self.delegate.render_footer(cx)) -// .contained() -// .with_style(container_style) -// .constrained() -// .with_max_width(self.max_size.x()) -// .with_max_height(self.max_size.y()) -// .into_any_named("picker") -// } - -// fn update_keymap_context(&self, keymap: &mut KeymapContext, _: &AppContext) { -// Self::reset_to_default_keymap_context(keymap); -// keymap.add_identifier("menu"); -// } - -// fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext) { -// self.has_focus = true; -// if cx.is_self_focused() { -// cx.focus(&self.query_editor); -// } -// } - -// fn focus_out(&mut self, _: AnyViewHandle, _: &mut ViewContext) { -// self.has_focus = false; -// } -// } - -// impl Modal for Picker { -// fn has_focus(&self) -> bool { -// self.has_focus -// } - -// fn dismiss_on_event(event: &Self::Event) -> bool { -// matches!(event, PickerEvent::Dismiss) -// } -// } - -// impl Picker { -// pub fn init(cx: &mut AppContext) { -// cx.add_action(Self::select_first); -// cx.add_action(Self::select_last); -// cx.add_action(Self::select_next); -// cx.add_action(Self::select_prev); -// cx.add_action(Self::confirm); -// cx.add_action(Self::secondary_confirm); -// cx.add_action(Self::cancel); -// } - -// pub fn new(delegate: D, cx: &mut ViewContext) -> Self { -// let theme = Arc::new(Mutex::new( -// Box::new(|theme: &theme::Theme| theme.picker.clone()) -// as Box theme::Picker>, -// )); -// let placeholder_text = delegate.placeholder_text(); -// let query_editor = cx.add_view({ -// let picker_theme = theme.clone(); -// |cx| { -// let mut editor = Editor::single_line( -// Some(Arc::new(move |theme| { -// (picker_theme.lock())(theme).input_editor.clone() -// })), -// cx, -// ); -// editor.set_placeholder_text(placeholder_text, cx); -// editor -// } -// }); -// cx.subscribe(&query_editor, Self::on_query_editor_event) -// .detach(); -// let mut this = Self { -// query_editor, -// list_state: Default::default(), -// delegate, -// max_size: vec2f(540., 420.), -// theme, -// confirmed: false, -// pending_update_matches: None, -// confirm_on_update: None, -// has_focus: false, -// }; -// this.update_matches(String::new(), cx); -// this -// Self { delegate } -// } - -// pub fn with_max_size(mut self, width: f32, height: f32) -> Self { -// self.max_size = vec2f(width, height); -// self -// } - -// pub fn with_theme(self, theme: F) -> Self -// where -// F: 'static + Fn(&theme::Theme) -> theme::Picker, -// { -// *self.theme.lock() = Box::new(theme); -// self -// } - -// pub fn delegate(&self) -> &D { -// &self.delegate -// } - -// pub fn delegate_mut(&mut self) -> &mut D { -// &mut self.delegate -// } - -// pub fn query(&self, cx: &AppContext) -> String { -// self.query_editor.read(cx).text(cx) -// } - -// pub fn set_query(&self, query: impl Into>, cx: &mut ViewContext) { -// self.query_editor -// .update(cx, |editor, cx| editor.set_text(query, cx)); -// } - -// fn on_query_editor_event( -// &mut self, -// _: ViewHandle, -// event: &editor::Event, -// cx: &mut ViewContext, -// ) { -// match event { -// editor::Event::BufferEdited { .. } => self.update_matches(self.query(cx), cx), -// editor::Event::Blurred if !self.confirmed => { -// self.dismiss(cx); -// } -// _ => {} -// } -// } - -// pub fn update_matches(&mut self, query: String, cx: &mut ViewContext) { -// let update = self.delegate.update_matches(query, cx); -// self.matches_updated(cx); -// self.pending_update_matches = Some(cx.spawn(|this, mut cx| async move { -// update.await; -// this.update(&mut cx, |this, cx| { -// this.matches_updated(cx); -// }) -// .log_err() -// })); -// } - -// fn matches_updated(&mut self, cx: &mut ViewContext) { -// let index = self.delegate.selected_index(); -// let target = if self.delegate.center_selection_after_match_updates() { -// ScrollTarget::Center(index) -// } else { -// ScrollTarget::Show(index) -// }; -// self.list_state.scroll_to(target); -// self.pending_update_matches = None; -// if let Some(secondary) = self.confirm_on_update.take() { -// self.confirmed = true; -// self.delegate.confirm(secondary, cx) -// } -// cx.notify(); -// } - -// pub fn select_first(&mut self, _: &SelectFirst, cx: &mut ViewContext) { -// if self.delegate.match_count() > 0 { -// self.delegate.set_selected_index(0, cx); -// self.list_state.scroll_to(ScrollTarget::Show(0)); -// } - -// cx.notify(); -// } - -// pub fn select_index(&mut self, index: usize, cmd: bool, cx: &mut ViewContext) { -// if self.delegate.match_count() > 0 { -// self.confirmed = true; -// self.delegate.set_selected_index(index, cx); -// self.delegate.confirm(cmd, cx); -// } -// } - -// pub fn select_last(&mut self, _: &SelectLast, cx: &mut ViewContext) { -// let match_count = self.delegate.match_count(); -// if match_count > 0 { -// let index = match_count - 1; -// self.delegate.set_selected_index(index, cx); -// self.list_state.scroll_to(ScrollTarget::Show(index)); -// } -// cx.notify(); -// } - -// pub fn select_next(&mut self, _: &SelectNext, cx: &mut ViewContext) { -// let next_index = self.delegate.selected_index() + 1; -// if next_index < self.delegate.match_count() { -// self.delegate.set_selected_index(next_index, cx); -// self.list_state.scroll_to(ScrollTarget::Show(next_index)); -// } - -// cx.notify(); -// } - -// pub fn select_prev(&mut self, _: &SelectPrev, cx: &mut ViewContext) { -// let mut selected_index = self.delegate.selected_index(); -// if selected_index > 0 { -// selected_index -= 1; -// self.delegate.set_selected_index(selected_index, cx); -// self.list_state -// .scroll_to(ScrollTarget::Show(selected_index)); -// } - -// cx.notify(); -// } - -// pub fn confirm(&mut self, _: &Confirm, cx: &mut ViewContext) { -// if self.pending_update_matches.is_some() { -// self.confirm_on_update = Some(false) -// } else { -// self.confirmed = true; -// self.delegate.confirm(false, cx); -// } -// } - -// pub fn secondary_confirm(&mut self, _: &SecondaryConfirm, cx: &mut ViewContext) { -// if self.pending_update_matches.is_some() { -// self.confirm_on_update = Some(true) -// } else { -// self.confirmed = true; -// self.delegate.confirm(true, cx); -// } -// } - -// fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext) { -// self.dismiss(cx); -// } - -// fn dismiss(&mut self, cx: &mut ViewContext) { -// cx.emit(PickerEvent::Dismiss); -// self.delegate.dismissed(cx); -// } -// } diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index f5f2456d42bd2137081a6c6f8df262dee5e6f22a..061490779bb2fbb3b8c5a50d14efd532f2009c7c 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -93,11 +93,11 @@ impl PickerStory { KeyBinding::new("ctrl-c", menu::Cancel, Some("picker")), ]); - let fh = cx.focus_handle(); - cx.focus(&fh); + let focus_handle = cx.focus_handle(); + cx.focus(&focus_handle); PickerStory { - focus_handle: fh, + focus_handle, candidates: vec![ "Baguette (France)".into(), "Baklava (Turkey)".into(), From 6928ad13352348851a486a7b636858c3dfd25efc Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 11:00:53 -0800 Subject: [PATCH 067/110] Rename List -> UniformList Co-authored-by: Mikayla --- crates/gpui2/src/elements.rs | 4 +- .../src/elements/{list.rs => uniform_list.rs} | 54 ++++++++----------- crates/picker2/src/picker2.rs | 9 ++-- 3 files changed, 27 insertions(+), 40 deletions(-) rename crates/gpui2/src/elements/{list.rs => uniform_list.rs} (85%) diff --git a/crates/gpui2/src/elements.rs b/crates/gpui2/src/elements.rs index 3ebe5bf5d1fbb4196c91885c230d23fd0d5aa170..eb061f7d34c8e77c1a366123818b253d33620c7a 100644 --- a/crates/gpui2/src/elements.rs +++ b/crates/gpui2/src/elements.rs @@ -1,11 +1,11 @@ mod div; mod img; -mod list; mod svg; mod text; +mod uniform_list; pub use div::*; pub use img::*; -pub use list::*; pub use svg::*; pub use text::*; +pub use uniform_list::*; diff --git a/crates/gpui2/src/elements/list.rs b/crates/gpui2/src/elements/uniform_list.rs similarity index 85% rename from crates/gpui2/src/elements/list.rs rename to crates/gpui2/src/elements/uniform_list.rs index acd1a524f32f0c0e174d0f07640a99ce025cbc22..64933951f5ea36e2a8e19ddf3e8256a0e318c34e 100644 --- a/crates/gpui2/src/elements/list.rs +++ b/crates/gpui2/src/elements/uniform_list.rs @@ -9,18 +9,18 @@ use smallvec::SmallVec; use std::{cmp, ops::Range, sync::Arc}; use taffy::style::Overflow; -pub fn list( +pub fn uniform_list( id: Id, item_count: usize, f: impl 'static + Fn(&mut V, Range, &mut ViewContext) -> SmallVec<[C; 64]>, -) -> List +) -> UniformList where Id: Into, V: 'static, C: Component, { let id = id.into(); - List { + UniformList { id: id.clone(), style: Default::default(), item_count, @@ -35,7 +35,7 @@ where } } -pub struct List { +pub struct UniformList { id: ElementId, style: StyleRefinement, item_count: usize, @@ -47,20 +47,20 @@ pub struct List { ) -> SmallVec<[AnyElement; 64]>, >, interactivity: StatefulInteractivity, - scroll_handle: Option, + scroll_handle: Option, } #[derive(Clone)] -pub struct ListScrollHandle(Arc>>); +pub struct UniformListScrollHandle(Arc>>); #[derive(Clone, Debug)] -struct ListScrollHandleState { +struct ScrollHandleState { item_height: Pixels, list_height: Pixels, scroll_offset: Arc>>, } -impl ListScrollHandle { +impl UniformListScrollHandle { pub fn new() -> Self { Self(Arc::new(Mutex::new(None))) } @@ -80,19 +80,14 @@ impl ListScrollHandle { } } -#[derive(Default)] -pub struct ListState { - interactive: InteractiveElementState, -} - -impl Styled for List { +impl Styled for UniformList { fn style(&mut self) -> &mut StyleRefinement { &mut self.style } } -impl Element for List { - type ElementState = ListState; +impl Element for UniformList { + type ElementState = InteractiveElementState; fn id(&self) -> Option { Some(self.id.clone()) @@ -104,8 +99,7 @@ impl Element for List { element_state: Option, _: &mut ViewContext, ) -> Self::ElementState { - let element_state = element_state.unwrap_or_default(); - element_state + element_state.unwrap_or_default() } fn layout( @@ -141,16 +135,15 @@ impl Element for List { if self.item_count > 0 { let item_height = self.measure_item_height(view_state, padded_bounds, cx); if let Some(scroll_handle) = self.scroll_handle.clone() { - scroll_handle.0.lock().replace(ListScrollHandleState { + scroll_handle.0.lock().replace(ScrollHandleState { item_height, list_height: padded_bounds.size.height, - scroll_offset: element_state.interactive.track_scroll_offset(), + scroll_offset: element_state.track_scroll_offset(), }); } let visible_item_count = (padded_bounds.size.height / item_height).ceil() as usize + 1; let scroll_offset = element_state - .interactive .scroll_offset() .map_or((0.0).into(), |offset| offset.y); let first_visible_element_ix = (-scroll_offset / item_height).floor() as usize; @@ -194,19 +187,14 @@ impl Element for List { let overflow = point(style.overflow.x, Overflow::Scroll); cx.with_z_index(0, |cx| { - self.interactivity.paint( - bounds, - content_size, - overflow, - &mut element_state.interactive, - cx, - ); + self.interactivity + .paint(bounds, content_size, overflow, element_state, cx); }); }) } } -impl List { +impl UniformList { fn measure_item_height( &self, view_state: &mut V, @@ -228,25 +216,25 @@ impl List { cx.layout_bounds(layout_id).size.height } - pub fn track_scroll(mut self, handle: ListScrollHandle) -> Self { + pub fn track_scroll(mut self, handle: UniformListScrollHandle) -> Self { self.scroll_handle = Some(handle); self } } -impl StatelessInteractive for List { +impl StatelessInteractive for UniformList { fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { self.interactivity.as_stateless_mut() } } -impl StatefulInteractive for List { +impl StatefulInteractive for UniformList { fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { &mut self.interactivity } } -impl Component for List { +impl Component for UniformList { fn render(self) -> AnyElement { AnyElement::new(self) } diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 8161c0d0a2546d94b82ac6f640e3185074744df6..74bdcd19bd8bf28deec46d4000bf2de8d91a1301 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,6 +1,6 @@ use gpui::{ - div, list, Component, ElementId, FocusHandle, ListScrollHandle, ParentElement, - StatelessInteractive, Styled, ViewContext, + div, uniform_list, Component, ElementId, FocusHandle, ParentElement, StatelessInteractive, + Styled, UniformListScrollHandle, ViewContext, }; use std::cmp; @@ -24,7 +24,6 @@ pub trait PickerDelegate: Sized + 'static { fn confirm(&mut self, secondary: bool, picker_id: ElementId, cx: &mut ViewContext); fn dismissed(&mut self, picker_id: ElementId, cx: &mut ViewContext); - // todo!("rename to render_candidate?") fn render_match( &self, ix: usize, @@ -47,7 +46,7 @@ impl Picker { impl Picker { pub fn render(self, view: &mut V, _cx: &mut ViewContext) -> impl Component { let id = self.id.clone(); - let scroll_handle = ListScrollHandle::new(); + let scroll_handle = UniformListScrollHandle::new(); div() .size_full() .id(self.id.clone()) @@ -120,7 +119,7 @@ impl Picker { } }) .child( - list( + uniform_list( "candidates", view.match_count(self.id.clone()), move |view: &mut V, visible_range, cx| { From df84ba422273c0cccda1118bb0cca9c01d325a3c Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 7 Nov 2023 14:04:09 -0500 Subject: [PATCH 068/110] Continue documenting theme colors --- crates/theme2/src/colors.rs | 172 +++++++++++++-------- crates/theme2/src/default_colors.rs | 2 - crates/theme_importer/src/theme_printer.rs | 1 - 3 files changed, 111 insertions(+), 64 deletions(-) diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 72eba6b76d4065241c71ec8600fa9a3a7d6dd3dc..8ee4b5fd47830d062105c85959827cb37c2d7bc1 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -71,53 +71,49 @@ pub struct GitStatusColors { #[refineable(debug, deserialize)] pub struct ThemeColors { pub border: Hsla, - /// Border color used for deemphasized borders, like a visual divider between two sections + /// Border color. Used for deemphasized borders, like a visual divider between two sections pub border_variant: Hsla, - /// Border color used for focused elements, like keyboard focused list item. + /// Border color. Used for focused elements, like keyboard focused list item. pub border_focused: Hsla, - /// Border color used for selected elements, like an active search filter or selected checkbox. + /// Border color. Used for selected elements, like an active search filter or selected checkbox. pub border_selected: Hsla, - /// Border color used for transparent borders. Used for placeholder borders when an element gains a border on state change. + /// Border color. Used for transparent borders. Used for placeholder borders when an element gains a border on state change. pub border_transparent: Hsla, - /// Border color used for disabled elements, like a disabled input or button. + /// Border color. Used for disabled elements, like a disabled input or button. pub border_disabled: Hsla, - /// Used for elevated surfaces, like a context menu, popup, or dialog. + /// Border color. Used for elevated surfaces, like a context menu, popup, or dialog. pub elevated_surface_background: Hsla, - /// Used for grounded surfaces like a panel or tab. + /// Background Color. Used for grounded surfaces like a panel or tab. pub surface_background: Hsla, - /// Used the app background and blank panels or windows. + /// Background Color. Used for the app background and blank panels or windows. pub background: Hsla, - /// Used for the background of an element that should have a different background than the surface it's on. + /// Background Color. Used for the background of an element that should have a different background than the surface it's on. /// /// Elements might include: Buttons, Inputs, Checkboxes, Radio Buttons... /// /// For an element that should have the same background as the surface it's on, use `ghost_element_background`. pub element_background: Hsla, - /// Used for the hover state of an element that should have a different background than the surface it's on. + /// Background Color. Used for the hover state of an element that should have a different background than the surface it's on. /// /// Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen. pub element_hover: Hsla, - /// Used for the active state of an element that should have a different background than the surface it's on. + /// Background Color. Used for the active state of an element that should have a different background than the surface it's on. /// /// Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd. pub element_active: Hsla, - /// Used for the selected state of an element that should have a different background than the surface it's on. + /// Background Color. Used for the selected state of an element that should have a different background than the surface it's on. /// /// Selected states are triggered by the element being selected (or "activated") by the user. /// /// This could include a selected checkbox, a toggleable button that is toggled on, etc. pub element_selected: Hsla, - /// Used for the disabled state of an element that should have a different background than the surface it's on. + /// Background Color. Used for the disabled state of an element that should have a different background than the surface it's on. /// /// Disabled states are shown when a user cannot interact with an element, like a disabled button or input. pub element_disabled: Hsla, - /// Used for the text color of an element that should have a different background than the surface it's on. - /// - /// Example: A input with some default placeholder text. - pub element_placeholder_text: Hsla, - /// Background color of the area that shows where a dragged element will be dropped. + /// Background Color. Used for the area that shows where a dragged element will be dropped. pub drop_target_background: Hsla, - /// Border color of the area that shows where a dragged element will be dropped. + /// Border Color. Used to show the area that shows where a dragged element will be dropped. // pub drop_target_border: Hsla, /// Used for the background of a ghost element that should have the same background as the surface it's on. /// @@ -125,109 +121,163 @@ pub struct ThemeColors { /// /// For an element that should have a different background than the surface it's on, use `element_background`. pub ghost_element_background: Hsla, - /// Used for the hover state of a ghost element that should have the same background as the surface it's on. + /// Background Color. Used for the hover state of a ghost element that should have the same background as the surface it's on. /// /// Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen. pub ghost_element_hover: Hsla, - /// Used for the active state of a ghost element that should have the same background as the surface it's on. + /// Background Color. Used for the active state of a ghost element that should have the same background as the surface it's on. /// /// Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd. pub ghost_element_active: Hsla, - /// Used for the selected state of a ghost element that should have the same background as the surface it's on. + /// Background Color. Used for the selected state of a ghost element that should have the same background as the surface it's on. /// /// Selected states are triggered by the element being selected (or "activated") by the user. /// /// This could include a selected checkbox, a toggleable button that is toggled on, etc. pub ghost_element_selected: Hsla, - /// Used for the disabled state of a ghost element that should have the same background as the surface it's on. + /// Background Color. Used for the disabled state of a ghost element that should have the same background as the surface it's on. /// /// Disabled states are shown when a user cannot interact with an element, like a disabled button or input. pub ghost_element_disabled: Hsla, + /// Text Color. Default text color used for most text. pub text: Hsla, + /// Text Color. Color of muted or deemphasized text. It is a subdued version of the standard text color. pub text_muted: Hsla, + /// Text Color. Color of the placeholder text typically shown in input fields to guide the user to enter valid data. pub text_placeholder: Hsla, + /// Text Color. Color used for text denoting disabled elements. Typically, the color is faded or grayed out to emphasize the disabled state. pub text_disabled: Hsla, + /// Text Color. Color used for emphasis or highlighting certain text, like an active filter or a matched character in a search. pub text_accent: Hsla, + /// Fill Color. Used for the default fill color of an icon. pub icon: Hsla, + /// Fill Color. Used for the muted or deemphasized fill color of an icon. + /// + /// This might be used to show an icon in an inactive pane, or to demphasize a series of icons to give them less visual weight. pub icon_muted: Hsla, + /// Fill Color. Used for the disabled fill color of an icon. + /// + /// Disabled states are shown when a user cannot interact with an element, like a icon button. pub icon_disabled: Hsla, + /// Fill Color. Used for the placeholder fill color of an icon. + /// + /// This might be used to show an icon in an input that disappears when the user enters text. pub icon_placeholder: Hsla, + /// Fill Color. Used for the accent fill color of an icon. + /// + /// This might be used to show when a toggleable icon button is selected. pub icon_accent: Hsla, + + // === + // UI Elements + // === pub status_bar_background: Hsla, pub title_bar_background: Hsla, pub toolbar_background: Hsla, pub tab_bar_background: Hsla, pub tab_inactive_background: Hsla, pub tab_active_background: Hsla, + // pub panel_background: Hsla, + // pub pane_focused_border: Hsla, + // /// The color of the scrollbar thumb. + // pub scrollbar_thumb_background: Hsla, + // /// The color of the scrollbar thumb when hovered over. + // pub scrollbar_thumb_hover_background: Hsla, + // /// The border color of the scrollbar thumb. + // pub scrollbar_thumb_border: Hsla, + // /// The background color of the scrollbar track. + // pub scrollbar_track_background: Hsla, + // /// The border color of the scrollbar track. + // pub scrollbar_track_border: Hsla, + // /// The opacity of the scrollbar status marks, like diagnostic states and git status.. + // pub scrollbar_status_opacity: Hsla, + + // === + // Editor + // === pub editor_background: Hsla, + // pub editor_inactive_background: Hsla, pub editor_gutter_background: Hsla, pub editor_subheader_background: Hsla, pub editor_active_line_background: Hsla, pub editor_highlighted_line_background: Hsla, + /// Text Color. Used for the text of the line number in the editor gutter. pub editor_line_number: Hsla, + /// Text Color. Used for the text of the line number in the editor gutter when the line is highlighted. pub editor_active_line_number: Hsla, + /// Text Color. Used to mark invisible characters in the editor. + /// + /// Example: spaces, tabs, carriage returns, etc. pub editor_invisible: Hsla, pub editor_wrap_guide: Hsla, pub editor_active_wrap_guide: Hsla, pub editor_document_highlight_read_background: Hsla, pub editor_document_highlight_write_background: Hsla, + + // === + // Terminal + // === + /// Terminal Background Color pub terminal_background: Hsla, + /// Bright Black Color for ANSI Terminal pub terminal_ansi_bright_black: Hsla, + /// Bright Red Color for ANSI Terminal pub terminal_ansi_bright_red: Hsla, + /// Bright Green Color for ANSI Terminal pub terminal_ansi_bright_green: Hsla, + /// Bright Yellow Color for ANSI Terminal pub terminal_ansi_bright_yellow: Hsla, + /// Bright Blue Color for ANSI Terminal pub terminal_ansi_bright_blue: Hsla, + /// Bright Magenta Color for ANSI Terminal pub terminal_ansi_bright_magenta: Hsla, + /// Bright Cyan Color for ANSI Terminal pub terminal_ansi_bright_cyan: Hsla, + /// Bright White Color for ANSI Terminal pub terminal_ansi_bright_white: Hsla, + /// Black Color for ANSI Terminal pub terminal_ansi_black: Hsla, + /// Red Color for ANSI Terminal pub terminal_ansi_red: Hsla, + /// Green Color for ANSI Terminal pub terminal_ansi_green: Hsla, + /// Yellow Color for ANSI Terminal pub terminal_ansi_yellow: Hsla, + /// Blue Color for ANSI Terminal pub terminal_ansi_blue: Hsla, + /// Magenta Color for ANSI Terminal pub terminal_ansi_magenta: Hsla, + /// Cyan Color for ANSI Terminal pub terminal_ansi_cyan: Hsla, + /// White Color for ANSI Terminal pub terminal_ansi_white: Hsla, // new colors - // == elevation == - // elevatation_0_shadow - // elevatation_0_shadow_color - // elevatation_1_shadow - // elevatation_1_shadow_color - // elevatation_2_shadow - // elevatation_2_shadow_color - // elevatation_3_shadow - // elevatation_3_shadow_color - // elevatation_4_shadow - // elevatation_4_shadow_color - // elevatation_5_shadow - // elevatation_5_shadow_color - - // == rich text == - // headline - // paragraph - // link - // link_hover - // code_block_background - // code_block_border - - // == misc == - // inverted_element_* - // foreground: Overall foreground color. This color is only used if not overridden by a component. - // disabledForeground: Overall foreground for disabled elements. This color is only used if not overridden by a component. - // widget.border: Border color of widgets such as Find/Replace inside the editor. - // widget.shadow: Shadow color of widgets such as Find/Replace inside the editor. - // selection - foreground, background - // active_element_border - // inactive_element_border - // element_seperator - // scrollbar_thumb_background - // scrollbar_thumb_hover_background - // scrollbar_thumb_border - // scrollbar_track_background - // scrollbar_track_border - // scrollbar_status_opacity + // === + // Elevation + // === + // elevation_0_shadow + // elevation_0_shadow_color + // elevation_1_shadow + // elevation_1_shadow_color + // elevation_2_shadow + // elevation_2_shadow_color + // elevation_3_shadow + // elevation_3_shadow_color + // elevation_4_shadow + // elevation_4_shadow_color + // elevation_5_shadow + // elevation_5_shadow_color + + // === + // UI Text + // === + // pub headline: Hsla, + // pub paragraph: Hsla, + // pub link: Hsla, + // pub link_hover: Hsla, + // pub code_block_background: Hsla, + // pub code_block_border: Hsla, } #[derive(Refineable, Clone)] diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 9804af234a5bd68fb56a960278f3d0506106a598..7252e829723d7dce36bceff4ecd882a46bff97e4 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -220,7 +220,6 @@ impl ThemeColors { element_active: neutral().light().step_5(), element_selected: neutral().light().step_5(), element_disabled: neutral().light_alpha().step_3(), - element_placeholder_text: neutral().light().step_11(), drop_target_background: blue().light_alpha().step_2(), ghost_element_background: system.transparent, ghost_element_hover: neutral().light().step_4(), @@ -293,7 +292,6 @@ impl ThemeColors { element_active: neutral().dark().step_5(), element_selected: neutral().dark().step_5(), element_disabled: neutral().dark_alpha().step_3(), - element_placeholder_text: neutral().dark().step_11(), drop_target_background: blue().dark_alpha().step_2(), ghost_element_background: system.transparent, ghost_element_hover: neutral().dark().step_4(), diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 1857567604db27de95a6ff2267ca8b71857a7f97..0f20a8d60f93620fc990f815d3248b36452df641 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -140,7 +140,6 @@ impl<'a> Debug for ThemeColorsRefinementPrinter<'a> { ("element_active", self.0.element_active), ("element_selected", self.0.element_selected), ("element_disabled", self.0.element_disabled), - ("element_placeholder_text", self.0.element_placeholder_text), ("drop_target_background", self.0.drop_target_background), ("ghost_element_background", self.0.ghost_element_background), ("ghost_element_hover", self.0.ghost_element_hover), From b804b25c214547328f091a01e8b8c05b5f403433 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 12:00:05 -0700 Subject: [PATCH 069/110] Fix confusing error message --- crates/gpui2/src/element.rs | 5 ++++- crates/gpui2/src/interactive.rs | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/gpui2/src/element.rs b/crates/gpui2/src/element.rs index 2a0f557272f4899eb21f2bbb3123a08045a56158..8fdc17de07296d95def915f3a605f3988913eb2a 100644 --- a/crates/gpui2/src/element.rs +++ b/crates/gpui2/src/element.rs @@ -134,7 +134,10 @@ where .layout(state, frame_state.as_mut().unwrap(), cx); } } - _ => panic!("must call initialize before layout"), + ElementRenderPhase::Start => panic!("must call initialize before layout"), + ElementRenderPhase::LayoutRequested { .. } | ElementRenderPhase::Painted => { + panic!("element rendered twice") + } }; self.phase = ElementRenderPhase::LayoutRequested { diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rs index 0725a10aca05ef01a39144982146d36167bc366c..84beb56ef8c68c44824e7d00a2a7b218ae689722 100644 --- a/crates/gpui2/src/interactive.rs +++ b/crates/gpui2/src/interactive.rs @@ -397,9 +397,10 @@ pub trait ElementInteraction: 'static { None }), )); - let result = stateful.stateless.initialize(cx, f); - stateful.key_listeners.pop(); - result + + cx.with_key_dispatch_context(stateful.dispatch_context.clone(), |cx| { + cx.with_key_listeners(mem::take(&mut stateful.key_listeners), f) + }) }) } else { let stateless = self.as_stateless_mut(); From 0233864e92cf263bcd868e1402395fbed18e8078 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 12:04:37 -0700 Subject: [PATCH 070/110] Fix loading keyfiles --- crates/settings2/src/keymap_file.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/settings2/src/keymap_file.rs b/crates/settings2/src/keymap_file.rs index e51bd76e5e0c9e0d86241a9c3bb816c90d0e1063..93635935cbd746b7e6fc3d96294e5895ee5c01e4 100644 --- a/crates/settings2/src/keymap_file.rs +++ b/crates/settings2/src/keymap_file.rs @@ -1,7 +1,7 @@ use crate::{settings_store::parse_json_with_comments, SettingsAssets}; use anyhow::{anyhow, Context, Result}; use collections::BTreeMap; -use gpui::{AppContext, KeyBinding, SharedString}; +use gpui::{actions, Action, AppContext, KeyBinding, SharedString}; use schemars::{ gen::{SchemaGenerator, SchemaSettings}, schema::{InstanceType, Schema, SchemaObject, SingleOrVec, SubschemaValidation}, @@ -137,8 +137,10 @@ impl KeymapFile { } } +actions!(NoAction); + fn no_action() -> Box { - todo!() + NoAction.boxed_clone() } #[cfg(test)] From 1e6a0f1c7bbcb25389def8232aaef3769246a8de Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 12:07:04 -0700 Subject: [PATCH 071/110] Wire up GoToLine modal --- crates/go_to_line2/src/go_to_line.rs | 8 +++----- crates/workspace2/src/modal_layer.rs | 14 +++----------- crates/workspace2/src/workspace2.rs | 6 +++--- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/crates/go_to_line2/src/go_to_line.rs b/crates/go_to_line2/src/go_to_line.rs index 764602c98603595a350826325efe8a05bd3817f5..13d283ecff245abb11bafd75cabca94ac79e80dc 100644 --- a/crates/go_to_line2/src/go_to_line.rs +++ b/crates/go_to_line2/src/go_to_line.rs @@ -1,12 +1,10 @@ -use gpui::{div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext}; -use serde::Deserialize; +use gpui::{actions, div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext}; use workspace::ModalRegistry; -// actions!(go_to_line, [Toggle]); -#[derive(Clone, Default, PartialEq, Deserialize)] -struct Toggle; +actions!(Toggle); pub fn init(cx: &mut AppContext) { + cx.register_action_type::(); cx.global_mut::() .register_modal(Toggle, |_, cx| { // if let Some(editor) = workspace diff --git a/crates/workspace2/src/modal_layer.rs b/crates/workspace2/src/modal_layer.rs index e7cee53b2b368ab9cc1e9218b26d378913b7ac4e..01f940273a6cb7f92505b2438f1a7dad2dcc9b43 100644 --- a/crates/workspace2/src/modal_layer.rs +++ b/crates/workspace2/src/modal_layer.rs @@ -1,8 +1,8 @@ use std::{any::TypeId, sync::Arc}; use gpui::{ - div, AnyView, AppContext, Component, DispatchPhase, Div, ParentElement, Render, - StatelessInteractive, View, ViewContext, + div, AnyView, AppContext, DispatchPhase, Div, ParentElement, Render, StatelessInteractive, + View, ViewContext, }; use crate::Workspace; @@ -28,10 +28,6 @@ struct ToggleModal { name: String, } -// complete change of plan? -// on_action(ToggleModal{ name}) -// register_modal(name, |workspace, cx| { ... }) - impl ModalRegistry { pub fn register_modal(&mut self, action: A, build_view: B) where @@ -40,12 +36,10 @@ impl ModalRegistry { { let build_view = Arc::new(build_view); - dbg!("yonder"); self.registered_modals.push(( TypeId::of::(), Box::new(move |mut div| { let build_view = build_view.clone(); - dbg!("this point"); div.on_action( move |workspace: &mut Workspace, @@ -75,9 +69,7 @@ impl ModalLayer { Self { open_modal: None } } - pub fn render(&self, cx: &ViewContext) -> impl Component { - dbg!("rendering ModalLayer"); - + pub fn render(&self, workspace: &Workspace, cx: &ViewContext) -> Div { let mut div = div(); // div, c workspace.toggle_modal()div.on_action()) { diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index 6b8077cd38d88e5bb464535d5b138147422225ab..90204f60386e02cb08eb171d381b9e97b6fbea7f 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -3707,7 +3707,9 @@ impl Render for Workspace { .bg(cx.theme().colors().background) .child(self.render_titlebar(cx)) .child( - div() + self.modal_layer + .read(cx) + .render(self, cx) .flex_1() .w_full() .flex() @@ -3840,8 +3842,6 @@ impl Render for Workspace { // .on_click(Arc::new(|workspace, cx| workspace.toggle_debug(cx))), // ), ) - // .child(self.modal_layer.clone()) - .child(self.modal_layer.read(cx).render(cx)) } } From 10c94cc8b77c14ca61b60538169093844ceb601c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 11:47:49 -0800 Subject: [PATCH 072/110] Remove unused import --- crates/workspace2/src/modal_layer.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/workspace2/src/modal_layer.rs b/crates/workspace2/src/modal_layer.rs index a0b759b1d92f67a987963dcfc0b1a91052007fc2..4121574b6a490867ec1dd612aca0b417cd138b6f 100644 --- a/crates/workspace2/src/modal_layer.rs +++ b/crates/workspace2/src/modal_layer.rs @@ -1,11 +1,8 @@ -use std::{any::TypeId, sync::Arc}; - +use crate::Workspace; use gpui::{ - div, AnyView, AppContext, Component, Div, ParentElement, Render, StatelessInteractive, View, - ViewContext, + div, AnyView, AppContext, Div, ParentElement, Render, StatelessInteractive, View, ViewContext, }; - -use crate::Workspace; +use std::{any::TypeId, sync::Arc}; pub struct ModalRegistry { registered_modals: Vec<(TypeId, Box) -> Div>)>, From 80e6427eec13a7483523cceac097d98385be48b7 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 13:03:36 -0800 Subject: [PATCH 073/110] :art: Co-authored-by: Mikayla --- crates/picker2/src/picker2.rs | 183 ++++++++++++++++++---------------- 1 file changed, 98 insertions(+), 85 deletions(-) diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 74bdcd19bd8bf28deec46d4000bf2de8d91a1301..2040ff484f5bd933d9a5f799e48284c7bd381aab 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -41,96 +41,109 @@ impl Picker { phantom: std::marker::PhantomData, } } + + fn bind_actions>( + div: T, + id: ElementId, + scroll_handle: &UniformListScrollHandle, + ) -> T { + div.on_action({ + let id = id.clone(); + let scroll_handle = scroll_handle.clone(); + move |view: &mut V, _: &menu::SelectNext, cx| { + let count = view.match_count(id.clone()); + if count > 0 { + let index = view.selected_index(id.clone()); + let ix = cmp::min(index + 1, count - 1); + view.set_selected_index(ix, id.clone(), cx); + scroll_handle.scroll_to_item(ix); + } + } + }) + .on_action({ + let id = id.clone(); + let scroll_handle = scroll_handle.clone(); + move |view, _: &menu::SelectPrev, cx| { + let count = view.match_count(id.clone()); + if count > 0 { + let index = view.selected_index(id.clone()); + let ix = index.saturating_sub(1); + view.set_selected_index(ix, id.clone(), cx); + scroll_handle.scroll_to_item(ix); + } + } + }) + .on_action({ + let id = id.clone(); + let scroll_handle = scroll_handle.clone(); + move |view: &mut V, _: &menu::SelectFirst, cx| { + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index(0, id.clone(), cx); + scroll_handle.scroll_to_item(0); + } + } + }) + .on_action({ + let id = id.clone(); + let scroll_handle = scroll_handle.clone(); + move |view: &mut V, _: &menu::SelectLast, cx| { + let count = view.match_count(id.clone()); + if count > 0 { + view.set_selected_index(count - 1, id.clone(), cx); + scroll_handle.scroll_to_item(count - 1); + } + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::Cancel, cx| { + view.dismissed(id.clone(), cx); + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::Confirm, cx| { + view.confirm(false, id.clone(), cx); + } + }) + .on_action({ + let id = id.clone(); + move |view: &mut V, _: &menu::SecondaryConfirm, cx| { + view.confirm(true, id.clone(), cx); + } + }) + } } impl Picker { pub fn render(self, view: &mut V, _cx: &mut ViewContext) -> impl Component { let id = self.id.clone(); let scroll_handle = UniformListScrollHandle::new(); - div() - .size_full() - .id(self.id.clone()) - .track_focus(&self.focus_handle) - .context("picker") - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectNext, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - let index = view.selected_index(id.clone()); - let ix = cmp::min(index + 1, count - 1); - view.set_selected_index(ix, id.clone(), cx); - scroll_handle.scroll_to_item(ix); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view, _: &menu::SelectPrev, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - let index = view.selected_index(id.clone()); - let ix = index.saturating_sub(1); - view.set_selected_index(ix, id.clone(), cx); - scroll_handle.scroll_to_item(ix); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectFirst, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - view.set_selected_index(0, id.clone(), cx); - scroll_handle.scroll_to_item(0); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectLast, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - view.set_selected_index(count - 1, id.clone(), cx); - scroll_handle.scroll_to_item(count - 1); - } - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::Cancel, cx| { - view.dismissed(id.clone(), cx); - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::Confirm, cx| { - view.confirm(false, id.clone(), cx); - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::SecondaryConfirm, cx| { - view.confirm(true, id.clone(), cx); - } - }) - .child( - uniform_list( - "candidates", - view.match_count(self.id.clone()), - move |view: &mut V, visible_range, cx| { - let selected_ix = view.selected_index(self.id.clone()); - visible_range - .map(|ix| view.render_match(ix, ix == selected_ix, self.id.clone(), cx)) - .collect() - }, - ) - .track_scroll(scroll_handle.clone()) - .size_full(), - ) + Self::bind_actions( + div() + .id(self.id.clone()) + .size_full() + .track_focus(&self.focus_handle) + .context("picker") + .child( + uniform_list( + "candidates", + view.match_count(self.id.clone()), + move |view: &mut V, visible_range, cx| { + let selected_ix = view.selected_index(self.id.clone()); + visible_range + .map(|ix| { + view.render_match(ix, ix == selected_ix, self.id.clone(), cx) + }) + .collect() + }, + ) + .track_scroll(scroll_handle.clone()) + .size_full(), + ), + id, + &scroll_handle, + ) } } From a21c49c015ca05e76e6ed688e9256d9d860a108c Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 14:05:23 -0700 Subject: [PATCH 074/110] Make it possible to render a single line editor --- crates/editor2/src/element.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 2236f8aeaf596caf87678e1962d460ea773ebf35..5af5d97e03ceed35569acbb950e0f75d3fceb7c6 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1595,7 +1595,7 @@ impl EditorElement { &mut self, editor: &mut Editor, cx: &mut ViewContext<'_, Editor>, - bounds: Bounds, + mut bounds: Bounds, ) -> LayoutState { // let mut size = constraint.max; // if size.x.is_infinite() { @@ -1673,8 +1673,7 @@ impl EditorElement { // .min(line_height * max_lines as f32), // ) } else if let EditorMode::SingleLine = editor_mode { - todo!() - // size.set_y(line_height.max(constraint.min_along(Axis::Vertical))) + bounds.size.height = line_height.min(bounds.size.height); } // todo!() // else if size.y.is_infinite() { From 5c450843a53a3b27688138a58b2befacba363e6d Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 14:19:15 -0700 Subject: [PATCH 075/110] Add text and focus to editor --- crates/editor2/src/editor.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 99de3733a16f96fbbad5510c181071b5753c4c7c..c63c531cebddcfa1f807ee5460a54b1976d9c175 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -8363,9 +8363,9 @@ impl Editor { // .max_point() // } - // pub fn text(&self, cx: &AppContext) -> String { - // self.buffer.read(cx).read(cx).text() - // } + pub fn text(&self, cx: &AppContext) -> String { + self.buffer.read(cx).read(cx).text() + } // pub fn set_text(&mut self, text: impl Into>, cx: &mut ViewContext) { // self.transact(cx, |this, cx| { @@ -9185,6 +9185,10 @@ impl Editor { // }); // supports // } + + fn focus(&self, cx: &mut WindowContext) { + cx.focus(&self.focus_handle) + } } pub trait CollaborationHub { From b9d051eae758dc42125b85d8c30bdee1380ada16 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 13:37:10 -0800 Subject: [PATCH 076/110] Start work on adding a filter editor to the picker Implement picker as a view instead of as a component Co-authored-by: Mikayla Co-authored-by: Marshall --- Cargo.lock | 2 + crates/picker2/src/picker2.rs | 212 ++++++++++-------------- crates/storybook2/Cargo.toml | 2 + crates/storybook2/src/stories/picker.rs | 152 +++++++++-------- crates/storybook2/src/storybook2.rs | 2 + 5 files changed, 173 insertions(+), 197 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9443c71b20deccacf6d67ae33d00d5ae7846d85c..e52a8444e4f55bf06d615543ab43e34995e7c617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8557,8 +8557,10 @@ dependencies = [ "backtrace-on-stack-overflow", "chrono", "clap 4.4.4", + "editor2", "gpui2", "itertools 0.11.0", + "language2", "log", "menu2", "picker2", diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 2040ff484f5bd933d9a5f799e48284c7bd381aab..5b454d6edd2fbb39657547a1e047e16132d4ee3f 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,149 +1,121 @@ +use editor::Editor; use gpui::{ - div, uniform_list, Component, ElementId, FocusHandle, ParentElement, StatelessInteractive, - Styled, UniformListScrollHandle, ViewContext, + div, uniform_list, Component, Div, ParentElement, Render, StatelessInteractive, Styled, + UniformListScrollHandle, View, ViewContext, VisualContext, }; use std::cmp; -#[derive(Component)] -pub struct Picker { - id: ElementId, - focus_handle: FocusHandle, - phantom: std::marker::PhantomData, +pub struct Picker { + pub delegate: D, + scroll_handle: UniformListScrollHandle, + editor: View, } pub trait PickerDelegate: Sized + 'static { - type ListItem: Component; + type ListItem: Component>; - fn match_count(&self, picker_id: ElementId) -> usize; - fn selected_index(&self, picker_id: ElementId) -> usize; - fn set_selected_index(&mut self, ix: usize, picker_id: ElementId, cx: &mut ViewContext); + fn match_count(&self) -> usize; + fn selected_index(&self) -> usize; + fn set_selected_index(&mut self, ix: usize, cx: &mut ViewContext>); // fn placeholder_text(&self) -> Arc; // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; - fn confirm(&mut self, secondary: bool, picker_id: ElementId, cx: &mut ViewContext); - fn dismissed(&mut self, picker_id: ElementId, cx: &mut ViewContext); + fn confirm(&mut self, secondary: bool, cx: &mut ViewContext>); + fn dismissed(&mut self, cx: &mut ViewContext>); fn render_match( &self, ix: usize, selected: bool, - picker_id: ElementId, - cx: &mut ViewContext, + cx: &mut ViewContext>, ) -> Self::ListItem; } -impl Picker { - pub fn new(id: impl Into, focus_handle: FocusHandle) -> Self { +impl Picker { + pub fn new(delegate: D, cx: &mut ViewContext) -> Self { Self { - id: id.into(), - focus_handle, - phantom: std::marker::PhantomData, + delegate, + scroll_handle: UniformListScrollHandle::new(), + editor: cx.build_view(|cx| Editor::single_line(cx)), } } - fn bind_actions>( - div: T, - id: ElementId, - scroll_handle: &UniformListScrollHandle, - ) -> T { - div.on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectNext, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - let index = view.selected_index(id.clone()); - let ix = cmp::min(index + 1, count - 1); - view.set_selected_index(ix, id.clone(), cx); - scroll_handle.scroll_to_item(ix); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view, _: &menu::SelectPrev, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - let index = view.selected_index(id.clone()); - let ix = index.saturating_sub(1); - view.set_selected_index(ix, id.clone(), cx); - scroll_handle.scroll_to_item(ix); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectFirst, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - view.set_selected_index(0, id.clone(), cx); - scroll_handle.scroll_to_item(0); - } - } - }) - .on_action({ - let id = id.clone(); - let scroll_handle = scroll_handle.clone(); - move |view: &mut V, _: &menu::SelectLast, cx| { - let count = view.match_count(id.clone()); - if count > 0 { - view.set_selected_index(count - 1, id.clone(), cx); - scroll_handle.scroll_to_item(count - 1); - } - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::Cancel, cx| { - view.dismissed(id.clone(), cx); - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::Confirm, cx| { - view.confirm(false, id.clone(), cx); - } - }) - .on_action({ - let id = id.clone(); - move |view: &mut V, _: &menu::SecondaryConfirm, cx| { - view.confirm(true, id.clone(), cx); - } - }) + fn select_next(&mut self, _: &menu::SelectNext, cx: &mut ViewContext) { + let count = self.delegate.match_count(); + if count > 0 { + let index = self.delegate.selected_index(); + let ix = cmp::min(index + 1, count - 1); + self.delegate.set_selected_index(ix, cx); + self.scroll_handle.scroll_to_item(ix); + } + } + + fn select_prev(&mut self, _: &menu::SelectPrev, cx: &mut ViewContext) { + let count = self.delegate.match_count(); + if count > 0 { + let index = self.delegate.selected_index(); + let ix = index.saturating_sub(1); + self.delegate.set_selected_index(ix, cx); + self.scroll_handle.scroll_to_item(ix); + } + } + + fn select_first(&mut self, _: &menu::SelectFirst, cx: &mut ViewContext) { + let count = self.delegate.match_count(); + if count > 0 { + self.delegate.set_selected_index(0, cx); + self.scroll_handle.scroll_to_item(0); + } + } + + fn select_last(&mut self, _: &menu::SelectLast, cx: &mut ViewContext) { + let count = self.delegate.match_count(); + if count > 0 { + self.delegate.set_selected_index(count - 1, cx); + self.scroll_handle.scroll_to_item(count - 1); + } + } + + fn cancel(&mut self, _: &menu::Cancel, cx: &mut ViewContext) { + self.delegate.dismissed(cx); + } + + fn confirm(&mut self, _: &menu::Confirm, cx: &mut ViewContext) { + self.delegate.confirm(false, cx); + } + + fn secondary_confirm(&mut self, _: &menu::SecondaryConfirm, cx: &mut ViewContext) { + self.delegate.confirm(true, cx); } } -impl Picker { - pub fn render(self, view: &mut V, _cx: &mut ViewContext) -> impl Component { - let id = self.id.clone(); - let scroll_handle = UniformListScrollHandle::new(); - Self::bind_actions( - div() - .id(self.id.clone()) - .size_full() - .track_focus(&self.focus_handle) - .context("picker") - .child( - uniform_list( - "candidates", - view.match_count(self.id.clone()), - move |view: &mut V, visible_range, cx| { - let selected_ix = view.selected_index(self.id.clone()); - visible_range - .map(|ix| { - view.render_match(ix, ix == selected_ix, self.id.clone(), cx) - }) - .collect() - }, - ) - .track_scroll(scroll_handle.clone()) - .size_full(), - ), - id, - &scroll_handle, - ) +impl Render for Picker { + type Element = Div; + + fn render(&mut self, _cx: &mut ViewContext) -> Self::Element { + div() + .size_full() + .context("picker") + .on_action(Self::select_next) + .on_action(Self::select_prev) + .on_action(Self::select_first) + .on_action(Self::select_last) + .on_action(Self::cancel) + .on_action(Self::confirm) + .on_action(Self::secondary_confirm) + .child(self.editor.clone()) + .child( + uniform_list("candidates", self.delegate.match_count(), { + move |this: &mut Self, visible_range, cx| { + let selected_ix = this.delegate.selected_index(); + visible_range + .map(|ix| this.delegate.render_match(ix, ix == selected_ix, cx)) + .collect() + } + }) + .track_scroll(self.scroll_handle.clone()) + .size_full(), + ) } } diff --git a/crates/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index 7a59dda6dfe5d351b89981560c4cc4781be4ae7e..3bf06a97780b8c24c1086d009eec2c76ae34d65e 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -13,9 +13,11 @@ anyhow.workspace = true # TODO: Remove after diagnosing stack overflow. backtrace-on-stack-overflow = "0.3.0" clap = { version = "4.4", features = ["derive", "string"] } +editor = { package = "editor2", path = "../editor2" } chrono = "0.4" gpui = { package = "gpui2", path = "../gpui2" } itertools = "0.11.0" +language = { package = "language2", path = "../language2" } log.workspace = true rust-embed.workspace = true serde.workspace = true diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index 061490779bb2fbb3b8c5a50d14efd532f2009c7c..e256d0f53c11f3136adc2ba14b1c00416ddf424a 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -6,15 +6,19 @@ use picker::{Picker, PickerDelegate}; use theme2::ActiveTheme; pub struct PickerStory { - selected_ix: usize, - candidates: Vec, + picker: View>, focus_handle: FocusHandle, } -impl PickerDelegate for PickerStory { - type ListItem = Div; +struct Delegate { + candidates: Vec, + selected_ix: usize, +} + +impl PickerDelegate for Delegate { + type ListItem = Div>; - fn match_count(&self, _picker_id: gpui::ElementId) -> usize { + fn match_count(&self) -> usize { self.candidates.len() } @@ -22,8 +26,7 @@ impl PickerDelegate for PickerStory { &self, ix: usize, selected: bool, - _picker_id: gpui::ElementId, - cx: &mut gpui::ViewContext, + cx: &mut gpui::ViewContext>, ) -> Self::ListItem { let colors = cx.theme().colors(); @@ -40,26 +43,16 @@ impl PickerDelegate for PickerStory { .child(self.candidates[ix].clone()) } - fn selected_index(&self, picker_id: gpui::ElementId) -> usize { + fn selected_index(&self) -> usize { self.selected_ix } - fn set_selected_index( - &mut self, - ix: usize, - _picker_id: gpui::ElementId, - cx: &mut gpui::ViewContext, - ) { + fn set_selected_index(&mut self, ix: usize, cx: &mut gpui::ViewContext>) { self.selected_ix = ix; cx.notify(); } - fn confirm( - &mut self, - secondary: bool, - picker_id: gpui::ElementId, - cx: &mut gpui::ViewContext, - ) { + fn confirm(&mut self, secondary: bool, cx: &mut gpui::ViewContext>) { if secondary { eprintln!("Secondary confirmed {}", self.candidates[self.selected_ix]) } else { @@ -67,7 +60,7 @@ impl PickerDelegate for PickerStory { } } - fn dismissed(&mut self, picker_id: gpui::ElementId, cx: &mut gpui::ViewContext) { + fn dismissed(&mut self, cx: &mut gpui::ViewContext>) { cx.quit(); } } @@ -98,58 +91,65 @@ impl PickerStory { PickerStory { focus_handle, - candidates: vec![ - "Baguette (France)".into(), - "Baklava (Turkey)".into(), - "Beef Wellington (UK)".into(), - "Biryani (India)".into(), - "Borscht (Ukraine)".into(), - "Bratwurst (Germany)".into(), - "Bulgogi (Korea)".into(), - "Burrito (USA)".into(), - "Ceviche (Peru)".into(), - "Chicken Tikka Masala (India)".into(), - "Churrasco (Brazil)".into(), - "Couscous (North Africa)".into(), - "Croissant (France)".into(), - "Dim Sum (China)".into(), - "Empanada (Argentina)".into(), - "Fajitas (Mexico)".into(), - "Falafel (Middle East)".into(), - "Feijoada (Brazil)".into(), - "Fish and Chips (UK)".into(), - "Fondue (Switzerland)".into(), - "Goulash (Hungary)".into(), - "Haggis (Scotland)".into(), - "Kebab (Middle East)".into(), - "Kimchi (Korea)".into(), - "Lasagna (Italy)".into(), - "Maple Syrup Pancakes (Canada)".into(), - "Moussaka (Greece)".into(), - "Pad Thai (Thailand)".into(), - "Paella (Spain)".into(), - "Pancakes (USA)".into(), - "Pasta Carbonara (Italy)".into(), - "Pavlova (Australia)".into(), - "Peking Duck (China)".into(), - "Pho (Vietnam)".into(), - "Pierogi (Poland)".into(), - "Pizza (Italy)".into(), - "Poutine (Canada)".into(), - "Pretzel (Germany)".into(), - "Ramen (Japan)".into(), - "Rendang (Indonesia)".into(), - "Sashimi (Japan)".into(), - "Satay (Indonesia)".into(), - "Shepherd's Pie (Ireland)".into(), - "Sushi (Japan)".into(), - "Tacos (Mexico)".into(), - "Tandoori Chicken (India)".into(), - "Tortilla (Spain)".into(), - "Tzatziki (Greece)".into(), - "Wiener Schnitzel (Austria)".into(), - ], - selected_ix: 0, + picker: cx.build_view(|cx| { + Picker::new( + Delegate { + candidates: vec![ + "Baguette (France)".into(), + "Baklava (Turkey)".into(), + "Beef Wellington (UK)".into(), + "Biryani (India)".into(), + "Borscht (Ukraine)".into(), + "Bratwurst (Germany)".into(), + "Bulgogi (Korea)".into(), + "Burrito (USA)".into(), + "Ceviche (Peru)".into(), + "Chicken Tikka Masala (India)".into(), + "Churrasco (Brazil)".into(), + "Couscous (North Africa)".into(), + "Croissant (France)".into(), + "Dim Sum (China)".into(), + "Empanada (Argentina)".into(), + "Fajitas (Mexico)".into(), + "Falafel (Middle East)".into(), + "Feijoada (Brazil)".into(), + "Fish and Chips (UK)".into(), + "Fondue (Switzerland)".into(), + "Goulash (Hungary)".into(), + "Haggis (Scotland)".into(), + "Kebab (Middle East)".into(), + "Kimchi (Korea)".into(), + "Lasagna (Italy)".into(), + "Maple Syrup Pancakes (Canada)".into(), + "Moussaka (Greece)".into(), + "Pad Thai (Thailand)".into(), + "Paella (Spain)".into(), + "Pancakes (USA)".into(), + "Pasta Carbonara (Italy)".into(), + "Pavlova (Australia)".into(), + "Peking Duck (China)".into(), + "Pho (Vietnam)".into(), + "Pierogi (Poland)".into(), + "Pizza (Italy)".into(), + "Poutine (Canada)".into(), + "Pretzel (Germany)".into(), + "Ramen (Japan)".into(), + "Rendang (Indonesia)".into(), + "Sashimi (Japan)".into(), + "Satay (Indonesia)".into(), + "Shepherd's Pie (Ireland)".into(), + "Sushi (Japan)".into(), + "Tacos (Mexico)".into(), + "Tandoori Chicken (India)".into(), + "Tortilla (Spain)".into(), + "Tzatziki (Greece)".into(), + "Wiener Schnitzel (Austria)".into(), + ], + selected_ix: 0, + }, + cx, + ) + }), } }) } @@ -159,11 +159,9 @@ impl Render for PickerStory { type Element = Div; fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { - let theme = cx.theme(); - div() - .bg(theme.styles.colors.background) + .bg(cx.theme().styles.colors.background) .size_full() - .child(Picker::new("picker_story", self.focus_handle.clone())) + .child(self.picker.clone()) } } diff --git a/crates/storybook2/src/storybook2.rs b/crates/storybook2/src/storybook2.rs index c8849c134278ebe36d583c34a14b6e8961f4885b..f0ba124162d546bcdbdc1fce12e986364f950dad 100644 --- a/crates/storybook2/src/storybook2.rs +++ b/crates/storybook2/src/storybook2.rs @@ -72,6 +72,8 @@ fn main() { ThemeSettings::override_global(theme_settings, cx); ui::settings::init(cx); + language::init(cx); + editor::init(cx); let window = cx.open_window( WindowOptions { From ea603401e2cbd074aba4dc0d457ba381a0f66957 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 13:48:32 -0800 Subject: [PATCH 077/110] Get actions + focus working on picker, now that it's a view Co-authored-by: Marshall --- crates/editor2/src/editor.rs | 2 +- crates/picker2/src/picker2.rs | 15 +++++++++++---- crates/storybook2/src/stories/picker.rs | 15 ++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index c63c531cebddcfa1f807ee5460a54b1976d9c175..52ded35d57473192a22828a4e3344ab273530c6c 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -9186,7 +9186,7 @@ impl Editor { // supports // } - fn focus(&self, cx: &mut WindowContext) { + pub fn focus(&self, cx: &mut WindowContext) { cx.focus(&self.focus_handle) } } diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index 5b454d6edd2fbb39657547a1e047e16132d4ee3f..e80801229d06101d17fcfb5c8fe2008e7c080b13 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,7 +1,8 @@ use editor::Editor; use gpui::{ - div, uniform_list, Component, Div, ParentElement, Render, StatelessInteractive, Styled, - UniformListScrollHandle, View, ViewContext, VisualContext, + div, uniform_list, Component, Div, FocusEnabled, ParentElement, Render, StatefulInteractivity, + StatelessInteractive, Styled, UniformListScrollHandle, View, ViewContext, VisualContext, + WindowContext, }; use std::cmp; @@ -41,6 +42,10 @@ impl Picker { } } + pub fn focus(&self, cx: &mut WindowContext) { + self.editor.update(cx, |editor, cx| editor.focus(cx)); + } + fn select_next(&mut self, _: &menu::SelectNext, cx: &mut ViewContext) { let count = self.delegate.match_count(); if count > 0 { @@ -91,12 +96,14 @@ impl Picker { } impl Render for Picker { - type Element = Div; + type Element = Div, FocusEnabled>; fn render(&mut self, _cx: &mut ViewContext) -> Self::Element { div() - .size_full() .context("picker") + .id("picker-container") + .focusable() + .size_full() .on_action(Self::select_next) .on_action(Self::select_prev) .on_action(Self::select_first) diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index e256d0f53c11f3136adc2ba14b1c00416ddf424a..0a0ee0c1d4513df617c55b16561352d1e90948e8 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -1,13 +1,12 @@ use gpui::{ - div, Component, Div, FocusHandle, KeyBinding, ParentElement, Render, SharedString, - StatelessInteractive, Styled, View, VisualContext, WindowContext, + div, Component, Div, KeyBinding, ParentElement, Render, SharedString, StatelessInteractive, + Styled, View, VisualContext, WindowContext, }; use picker::{Picker, PickerDelegate}; use theme2::ActiveTheme; pub struct PickerStory { picker: View>, - focus_handle: FocusHandle, } struct Delegate { @@ -86,13 +85,9 @@ impl PickerStory { KeyBinding::new("ctrl-c", menu::Cancel, Some("picker")), ]); - let focus_handle = cx.focus_handle(); - cx.focus(&focus_handle); - PickerStory { - focus_handle, picker: cx.build_view(|cx| { - Picker::new( + let picker = Picker::new( Delegate { candidates: vec![ "Baguette (France)".into(), @@ -148,7 +143,9 @@ impl PickerStory { selected_ix: 0, }, cx, - ) + ); + picker.focus(cx); + picker }), } }) From b2ae08b1598649ae60aa6c8bd7edd09c8180fc98 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 7 Nov 2023 16:30:04 -0700 Subject: [PATCH 078/110] Implement an InputHandler trait for gpui2 Co-Authored-By: Marshall Co-Authored-By: Max Co-Authored-By: Julia --- crates/editor2/src/editor.rs | 399 ++++++++++++----------- crates/editor2/src/element.rs | 4 + crates/gpui2/src/app.rs | 2 +- crates/gpui2/src/gpui2.rs | 2 + crates/gpui2/src/window.rs | 28 +- crates/gpui2/src/window_input_handler.rs | 89 +++++ 6 files changed, 322 insertions(+), 202 deletions(-) create mode 100644 crates/gpui2/src/window_input_handler.rs diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index c63c531cebddcfa1f807ee5460a54b1976d9c175..61db3fb49253d1a5ceeb06f7fe45900f841cb8ab 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -38,8 +38,8 @@ use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ actions, div, px, relative, AnyElement, AppContext, BackgroundExecutor, Context, DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, - Model, Pixels, Render, Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, - WeakView, WindowContext, + Model, Pixels, PlatformInputHandler, Render, Styled, Subscription, Task, TextStyle, View, + ViewContext, VisualContext, WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -82,7 +82,7 @@ use std::{ }; pub use sum_tree::Bias; use sum_tree::TreeMap; -use text::Rope; +use text::{OffsetUtf16, Rope}; use theme::{ ActiveTheme, DiagnosticStyle, PlayerColor, SyntaxTheme, Theme, ThemeColors, ThemeSettings, }; @@ -9485,214 +9485,225 @@ impl Render for Editor { // false // } -// -// fn text_for_range(&self, range_utf16: Range, cx: &AppContext) -> Option { -// Some( -// self.buffer -// .read(cx) -// .read(cx) -// .text_for_range(OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end)) -// .collect(), -// ) -// } - -// fn selected_text_range(&self, cx: &AppContext) -> Option> { -// // Prevent the IME menu from appearing when holding down an alphabetic key -// // while input is disabled. -// if !self.input_enabled { -// return None; -// } - -// let range = self.selections.newest::(cx).range(); -// Some(range.start.0..range.end.0) -// } -// fn marked_text_range(&self, cx: &AppContext) -> Option> { -// let snapshot = self.buffer.read(cx).read(cx); -// let range = self.text_highlights::(cx)?.1.get(0)?; -// Some(range.start.to_offset_utf16(&snapshot).0..range.end.to_offset_utf16(&snapshot).0) -// } - -// fn unmark_text(&mut self, cx: &mut ViewContext) { -// self.clear_highlights::(cx); -// self.ime_transaction.take(); -// } - -// fn replace_text_in_range( -// &mut self, -// range_utf16: Option>, -// text: &str, -// cx: &mut ViewContext, -// ) { -// if !self.input_enabled { -// cx.emit(Event::InputIgnored { text: text.into() }); -// return; -// } - -// self.transact(cx, |this, cx| { -// let new_selected_ranges = if let Some(range_utf16) = range_utf16 { -// let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); -// Some(this.selection_replacement_ranges(range_utf16, cx)) -// } else { -// this.marked_text_ranges(cx) -// }; +impl PlatformInputHandler for Editor { + fn text_for_range(&self, range_utf16: Range) -> Option { + // Some( + // self.buffer + // .read(cx) + // .read(cx) + // .text_for_range(OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end)) + // .collect(), + // ) + todo!() + } -// let range_to_replace = new_selected_ranges.as_ref().and_then(|ranges_to_replace| { -// let newest_selection_id = this.selections.newest_anchor().id; -// this.selections -// .all::(cx) -// .iter() -// .zip(ranges_to_replace.iter()) -// .find_map(|(selection, range)| { -// if selection.id == newest_selection_id { -// Some( -// (range.start.0 as isize - selection.head().0 as isize) -// ..(range.end.0 as isize - selection.head().0 as isize), -// ) -// } else { -// None -// } -// }) -// }); + fn selected_text_range(&self) -> Option> { + // Prevent the IME menu from appearing when holding down an alphabetic key + // while input is disabled. + // if !self.input_enabled { + // return None; + // } -// cx.emit(Event::InputHandled { -// utf16_range_to_replace: range_to_replace, -// text: text.into(), -// }); + // let range = self.selections.newest::(cx).range(); + // Some(range.start.0..range.end.0) + todo!() + } -// if let Some(new_selected_ranges) = new_selected_ranges { -// this.change_selections(None, cx, |selections| { -// selections.select_ranges(new_selected_ranges) -// }); -// } + fn marked_text_range(&self, cx: &AppContext) -> Option> { + // let snapshot = self.buffer.read(cx).read(cx); + // let range = self.text_highlights::(cx)?.1.get(0)?; + // Some(range.start.to_offset_utf16(&snapshot).0..range.end.to_offset_utf16(&snapshot).0) + todo!() + } -// this.handle_input(text, cx); -// }); + fn unmark_text(&mut self, cx: &mut ViewContext) { + // self.clear_highlights::(cx); + // self.ime_transaction.take(); + todo!() + } -// if let Some(transaction) = self.ime_transaction { -// self.buffer.update(cx, |buffer, cx| { -// buffer.group_until_transaction(transaction, cx); -// }); -// } + fn replace_text_in_range( + &mut self, + //range_utf16: Option>, + // text: &str, + cx: &mut ViewContext, + ) { + // if !self.input_enabled { + // cx.emit(Event::InputIgnored { text: text.into() }); + // return; + // } -// self.unmark_text(cx); -// } + // self.transact(cx, |this, cx| { + // let new_selected_ranges = if let Some(range_utf16) = range_utf16 { + // let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); + // Some(this.selection_replacement_ranges(range_utf16, cx)) + // } else { + // this.marked_text_ranges(cx) + // }; + + // let range_to_replace = new_selected_ranges.as_ref().and_then(|ranges_to_replace| { + // let newest_selection_id = this.selections.newest_anchor().id; + // this.selections + // .all::(cx) + // .iter() + // .zip(ranges_to_replace.iter()) + // .find_map(|(selection, range)| { + // if selection.id == newest_selection_id { + // Some( + // (range.start.0 as isize - selection.head().0 as isize) + // ..(range.end.0 as isize - selection.head().0 as isize), + // ) + // } else { + // None + // } + // }) + // }); + + // cx.emit(Event::InputHandled { + // utf16_range_to_replace: range_to_replace, + // text: text.into(), + // }); + + // if let Some(new_selected_ranges) = new_selected_ranges { + // this.change_selections(None, cx, |selections| { + // selections.select_ranges(new_selected_ranges) + // }); + // } -// fn replace_and_mark_text_in_range( -// &mut self, -// range_utf16: Option>, -// text: &str, -// new_selected_range_utf16: Option>, -// cx: &mut ViewContext, -// ) { -// if !self.input_enabled { -// cx.emit(Event::InputIgnored { text: text.into() }); -// return; -// } + // this.handle_input(text, cx); + // }); -// let transaction = self.transact(cx, |this, cx| { -// let ranges_to_replace = if let Some(mut marked_ranges) = this.marked_text_ranges(cx) { -// let snapshot = this.buffer.read(cx).read(cx); -// if let Some(relative_range_utf16) = range_utf16.as_ref() { -// for marked_range in &mut marked_ranges { -// marked_range.end.0 = marked_range.start.0 + relative_range_utf16.end; -// marked_range.start.0 += relative_range_utf16.start; -// marked_range.start = -// snapshot.clip_offset_utf16(marked_range.start, Bias::Left); -// marked_range.end = -// snapshot.clip_offset_utf16(marked_range.end, Bias::Right); -// } -// } -// Some(marked_ranges) -// } else if let Some(range_utf16) = range_utf16 { -// let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); -// Some(this.selection_replacement_ranges(range_utf16, cx)) -// } else { -// None -// }; + // if let Some(transaction) = self.ime_transaction { + // self.buffer.update(cx, |buffer, cx| { + // buffer.group_until_transaction(transaction, cx); + // }); + // } -// let range_to_replace = ranges_to_replace.as_ref().and_then(|ranges_to_replace| { -// let newest_selection_id = this.selections.newest_anchor().id; -// this.selections -// .all::(cx) -// .iter() -// .zip(ranges_to_replace.iter()) -// .find_map(|(selection, range)| { -// if selection.id == newest_selection_id { -// Some( -// (range.start.0 as isize - selection.head().0 as isize) -// ..(range.end.0 as isize - selection.head().0 as isize), -// ) -// } else { -// None -// } -// }) -// }); + // self.unmark_text(cx); + todo!() + } -// cx.emit(Event::InputHandled { -// utf16_range_to_replace: range_to_replace, -// text: text.into(), -// }); + fn replace_and_mark_text_in_range( + &mut self, + range_utf16: Option>, + text: &str, + new_selected_range_utf16: Option>, + cx: &mut ViewContext, + ) { + // if !self.input_enabled { + // cx.emit(Event::InputIgnored { text: text.into() }); + // return; + // } -// if let Some(ranges) = ranges_to_replace { -// this.change_selections(None, cx, |s| s.select_ranges(ranges)); -// } + // let transaction = self.transact(cx, |this, cx| { + // let ranges_to_replace = if let Some(mut marked_ranges) = this.marked_text_ranges(cx) { + // let snapshot = this.buffer.read(cx).read(cx); + // if let Some(relative_range_utf16) = range_utf16.as_ref() { + // for marked_range in &mut marked_ranges { + // marked_range.end.0 = marked_range.start.0 + relative_range_utf16.end; + // marked_range.start.0 += relative_range_utf16.start; + // marked_range.start = + // snapshot.clip_offset_utf16(marked_range.start, Bias::Left); + // marked_range.end = + // snapshot.clip_offset_utf16(marked_range.end, Bias::Right); + // } + // } + // Some(marked_ranges) + // } else if let Some(range_utf16) = range_utf16 { + // let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); + // Some(this.selection_replacement_ranges(range_utf16, cx)) + // } else { + // None + // }; + + // let range_to_replace = ranges_to_replace.as_ref().and_then(|ranges_to_replace| { + // let newest_selection_id = this.selections.newest_anchor().id; + // this.selections + // .all::(cx) + // .iter() + // .zip(ranges_to_replace.iter()) + // .find_map(|(selection, range)| { + // if selection.id == newest_selection_id { + // Some( + // (range.start.0 as isize - selection.head().0 as isize) + // ..(range.end.0 as isize - selection.head().0 as isize), + // ) + // } else { + // None + // } + // }) + // }); + + // cx.emit(Event::InputHandled { + // utf16_range_to_replace: range_to_replace, + // text: text.into(), + // }); + + // if let Some(ranges) = ranges_to_replace { + // this.change_selections(None, cx, |s| s.select_ranges(ranges)); + // } -// let marked_ranges = { -// let snapshot = this.buffer.read(cx).read(cx); -// this.selections -// .disjoint_anchors() -// .iter() -// .map(|selection| { -// selection.start.bias_left(&*snapshot)..selection.end.bias_right(&*snapshot) -// }) -// .collect::>() -// }; + // let marked_ranges = { + // let snapshot = this.buffer.read(cx).read(cx); + // this.selections + // .disjoint_anchors() + // .iter() + // .map(|selection| { + // selection.start.bias_left(&*snapshot)..selection.end.bias_right(&*snapshot) + // }) + // .collect::>() + // }; + + // if text.is_empty() { + // this.unmark_text(cx); + // } else { + // this.highlight_text::( + // marked_ranges.clone(), + // this.style(cx).composition_mark, + // cx, + // ); + // } -// if text.is_empty() { -// this.unmark_text(cx); -// } else { -// this.highlight_text::( -// marked_ranges.clone(), -// this.style(cx).composition_mark, -// cx, -// ); -// } + // this.handle_input(text, cx); + + // if let Some(new_selected_range) = new_selected_range_utf16 { + // let snapshot = this.buffer.read(cx).read(cx); + // let new_selected_ranges = marked_ranges + // .into_iter() + // .map(|marked_range| { + // let insertion_start = marked_range.start.to_offset_utf16(&snapshot).0; + // let new_start = OffsetUtf16(new_selected_range.start + insertion_start); + // let new_end = OffsetUtf16(new_selected_range.end + insertion_start); + // snapshot.clip_offset_utf16(new_start, Bias::Left) + // ..snapshot.clip_offset_utf16(new_end, Bias::Right) + // }) + // .collect::>(); + + // drop(snapshot); + // this.change_selections(None, cx, |selections| { + // selections.select_ranges(new_selected_ranges) + // }); + // } + // }); -// this.handle_input(text, cx); - -// if let Some(new_selected_range) = new_selected_range_utf16 { -// let snapshot = this.buffer.read(cx).read(cx); -// let new_selected_ranges = marked_ranges -// .into_iter() -// .map(|marked_range| { -// let insertion_start = marked_range.start.to_offset_utf16(&snapshot).0; -// let new_start = OffsetUtf16(new_selected_range.start + insertion_start); -// let new_end = OffsetUtf16(new_selected_range.end + insertion_start); -// snapshot.clip_offset_utf16(new_start, Bias::Left) -// ..snapshot.clip_offset_utf16(new_end, Bias::Right) -// }) -// .collect::>(); - -// drop(snapshot); -// this.change_selections(None, cx, |selections| { -// selections.select_ranges(new_selected_ranges) -// }); -// } -// }); + // self.ime_transaction = self.ime_transaction.or(transaction); + // if let Some(transaction) = self.ime_transaction { + // self.buffer.update(cx, |buffer, cx| { + // buffer.group_until_transaction(transaction, cx); + // }); + // } -// self.ime_transaction = self.ime_transaction.or(transaction); -// if let Some(transaction) = self.ime_transaction { -// self.buffer.update(cx, |buffer, cx| { -// buffer.group_until_transaction(transaction, cx); -// }); -// } + // if self.text_highlights::(cx).is_none() { + // self.ime_transaction.take(); + // } + todo!() + } -// if self.text_highlights::(cx).is_none() { -// self.ime_transaction.take(); -// } -// } -// } + fn bounds_for_range(&self, range_utf16: Range) -> Option> { + todo!() + } +} // fn build_style( // settings: &ThemeSettings, diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 5af5d97e03ceed35569acbb950e0f75d3fceb7c6..3ff68e18978161185f55dffa3eb0eab55a49ed3e 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2623,6 +2623,10 @@ impl Element for EditorElement { } }); + if editor.focus_handle.is_focused(cx) { + cx.set_input_handler(editor.handle); + } + cx.with_content_mask(ContentMask { bounds }, |cx| { let gutter_bounds = Bounds { origin: bounds.origin, diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs index 63d2143a6726773be7508c77c72bdd6b1052fe3d..42d34e0c202e9ceaddbabeb85e6f6fac23502d39 100644 --- a/crates/gpui2/src/app.rs +++ b/crates/gpui2/src/app.rs @@ -154,7 +154,7 @@ type ReleaseListener = Box; // } pub struct AppContext { - this: Weak, + pub(crate) this: Weak, pub(crate) platform: Rc, app_metadata: AppMetadata, text_system: Arc, diff --git a/crates/gpui2/src/gpui2.rs b/crates/gpui2/src/gpui2.rs index 348da17356dd3f48d1a507cfcb0c8d19a4413d2b..e59b196a91ff252da9a41179912b1e7e718ba0c1 100644 --- a/crates/gpui2/src/gpui2.rs +++ b/crates/gpui2/src/gpui2.rs @@ -24,6 +24,7 @@ mod text_system; mod util; mod view; mod window; +mod window_input_handler; mod private { /// A mechanism for restricting implementations of a trait to only those in GPUI. @@ -64,6 +65,7 @@ pub use text_system::*; pub use util::arc_cow::ArcCow; pub use view::*; pub use window::*; +pub use window_input_handler::*; use derive_more::{Deref, DerefMut}; use std::{ diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 5b0349c7d48ff9a84478b624205b65c9c1be2c75..4fc940069cafce0b63cc1e2605e22dfeb25ba685 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -2,13 +2,14 @@ use crate::{ px, size, Action, AnyBox, AnyDrag, AnyView, AppContext, AsyncWindowContext, AvailableSpace, Bounds, BoxShadow, Context, Corners, CursorStyle, DevicePixels, DispatchContext, DisplayId, Edges, Effect, Entity, EntityId, EventEmitter, FileDropEvent, FocusEvent, FontId, - GlobalElementId, GlyphId, Hsla, ImageData, InputEvent, IsZero, KeyListener, KeyMatch, - KeyMatcher, Keystroke, LayoutId, Model, ModelContext, Modifiers, MonochromeSprite, MouseButton, - MouseDownEvent, MouseMoveEvent, MouseUpEvent, Path, Pixels, PlatformAtlas, PlatformDisplay, - PlatformWindow, Point, PolychromeSprite, PromptLevel, Quad, Render, RenderGlyphParams, - RenderImageParams, RenderSvgParams, ScaledPixels, SceneBuilder, Shadow, SharedString, Size, - Style, SubscriberSet, Subscription, TaffyLayoutEngine, Task, Underline, UnderlineStyle, View, - VisualContext, WeakView, WindowBounds, WindowOptions, SUBPIXEL_VARIANTS, + GlobalElementId, GlyphId, Hsla, ImageData, InputEvent, InputHandler, IsZero, KeyListener, + KeyMatch, KeyMatcher, Keystroke, LayoutId, Model, ModelContext, Modifiers, MonochromeSprite, + MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent, Path, Pixels, PlatformAtlas, + PlatformDisplay, PlatformInputHandler, PlatformWindow, Point, PolychromeSprite, PromptLevel, + Quad, Render, RenderGlyphParams, RenderImageParams, RenderSvgParams, ScaledPixels, + SceneBuilder, Shadow, SharedString, Size, Style, SubscriberSet, Subscription, + TaffyLayoutEngine, Task, Underline, UnderlineStyle, View, VisualContext, WeakView, + WindowBounds, WindowInputHandler, WindowOptions, SUBPIXEL_VARIANTS, }; use anyhow::{anyhow, Result}; use collections::HashMap; @@ -191,6 +192,7 @@ pub struct Window { default_prevented: bool, mouse_position: Point, requested_cursor_style: Option, + requested_input_handler: Option>, scale_factor: f32, bounds: WindowBounds, bounds_observers: SubscriberSet<(), AnyObserver>, @@ -285,6 +287,7 @@ impl Window { default_prevented: true, mouse_position, requested_cursor_style: None, + requested_input_handler: None, scale_factor, bounds, bounds_observers: SubscriberSet::new(), @@ -676,6 +679,17 @@ impl<'a> WindowContext<'a> { self.window.requested_cursor_style = Some(style) } + pub fn set_input_handler(&mut self, handler: WeakView, cx: ViewContext) + where + V: InputHandler + 'static, + { + self.window.requested_input_handler = Some(Box::new(WindowInputHandler { + cx: cx.app.this.clone(), + window: cx.window_handle(), + handler, + })) + } + /// Called during painting to invoke the given closure in a new stacking context. The given /// z-index is interpreted relative to the previous call to `stack`. pub fn stack(&mut self, z_index: u32, f: impl FnOnce(&mut Self) -> R) -> R { diff --git a/crates/gpui2/src/window_input_handler.rs b/crates/gpui2/src/window_input_handler.rs new file mode 100644 index 0000000000000000000000000000000000000000..caae5838ce46171a1584b272d7e916d100e13881 --- /dev/null +++ b/crates/gpui2/src/window_input_handler.rs @@ -0,0 +1,89 @@ +use crate::{AnyWindowHandle, AppCell, Context, PlatformInputHandler, ViewContext, WeakView}; +use std::{ops::Range, rc::Weak}; + +pub struct WindowInputHandler +where + V: InputHandler, +{ + pub cx: Weak, + pub window: AnyWindowHandle, + pub handler: WeakView, +} + +impl PlatformInputHandler for WindowInputHandler { + fn selected_text_range(&self) -> Option> { + self.update(|view, cx| view.selected_text_range(cx)) + .flatten() + } + + fn marked_text_range(&self) -> Option> { + self.update(|view, cx| view.marked_text_range(cx)).flatten() + } + + fn text_for_range(&self, range_utf16: std::ops::Range) -> Option { + self.update(|view, cx| view.text_for_range(range_utf16, cx)) + .flatten() + } + + fn replace_text_in_range( + &mut self, + replacement_range: Option>, + text: &str, + ) { + self.update(|view, cx| view.replace_text_in_range(replacement_range, text, cx)); + } + + fn replace_and_mark_text_in_range( + &mut self, + range_utf16: Option>, + new_text: &str, + new_selected_range: Option>, + ) { + self.update(|view, cx| { + view.replace_and_mark_text_in_range(range_utf16, new_text, new_selected_range, cx) + }); + } + + fn unmark_text(&mut self) { + self.update(|view, cx| view.unmark_text(cx)); + } + + fn bounds_for_range(&self, range_utf16: std::ops::Range) -> Option> { + self.update(|view, cx| view.bounds_for_range(range_utf16, cx)) + .flatten() + } +} + +impl WindowInputHandler { + fn update(&self, f: impl FnOnce(&mut V, &mut ViewContext) -> T) -> Option { + let cx = self.cx.upgrade()?; + let mut cx = cx.borrow_mut(); + cx.update_window(self.window, |_, cx| self.handler.update(cx, f).ok()) + .ok()? + } +} + +pub trait InputHandler: Sized { + fn text_for_range(&self, range: Range, cx: &mut ViewContext) -> Option; + fn selected_text_range(&self, cx: &mut ViewContext) -> Option>; + fn marked_text_range(&self, cx: &mut ViewContext) -> Option>; + fn unmark_text(&mut self, cx: &mut ViewContext); + fn replace_text_in_range( + &mut self, + range: Option>, + text: &str, + cx: &mut ViewContext, + ); + fn replace_and_mark_text_in_range( + &mut self, + range: Option>, + new_text: &str, + new_selected_range: Option>, + cx: &mut ViewContext, + ); + fn bounds_for_range( + &self, + range_utf16: std::ops::Range, + cx: &mut ViewContext, + ) -> Option>; +} From bd12e3edb637eb9a081bf96e9dd03ef4f653184c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 15:44:00 -0800 Subject: [PATCH 079/110] Assign editors as text input handlers Co-authored-by: Marshall --- crates/editor2/src/editor.rs | 780 +++++++++++++++++----------------- crates/editor2/src/element.rs | 2 +- crates/gpui2/src/window.rs | 24 +- 3 files changed, 406 insertions(+), 400 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 61db3fb49253d1a5ceeb06f7fe45900f841cb8ab..ccab3ee1caaa9168e73b17be235c138861ca6c90 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -37,9 +37,9 @@ use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ actions, div, px, relative, AnyElement, AppContext, BackgroundExecutor, Context, - DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, Hsla, - Model, Pixels, PlatformInputHandler, Render, Styled, Subscription, Task, TextStyle, View, - ViewContext, VisualContext, WeakView, WindowContext, + DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, + HighlightStyle, Hsla, InputHandler, Model, Pixels, PlatformInputHandler, Render, Styled, + Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -56,6 +56,7 @@ use language::{ use link_go_to_definition::{GoToDefinitionLink, InlayHighlight, LinkGoToDefinitionState}; use lsp::{DiagnosticSeverity, Documentation, LanguageServerId}; use movement::TextLayoutDetails; +use multi_buffer::ToOffsetUtf16; pub use multi_buffer::{ Anchor, AnchorRangeExt, ExcerptId, ExcerptRange, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -67,7 +68,7 @@ use rpc::proto::*; use scroll::{ autoscroll::Autoscroll, OngoingScroll, ScrollAnchor, ScrollManager, ScrollbarAutoHide, }; -use selections_collection::{MutableSelectionsCollection, SelectionsCollection}; +use selections_collection::{resolve_multiple, MutableSelectionsCollection, SelectionsCollection}; use serde::{Deserialize, Serialize}; use settings::{Settings, SettingsStore}; use smallvec::SmallVec; @@ -2769,197 +2770,197 @@ impl Editor { // cx.propagate(); // } - // pub fn handle_input(&mut self, text: &str, cx: &mut ViewContext) { - // let text: Arc = text.into(); + pub fn handle_input(&mut self, text: &str, cx: &mut ViewContext) { + let text: Arc = text.into(); - // if self.read_only { - // return; - // } + if self.read_only { + return; + } - // let selections = self.selections.all_adjusted(cx); - // let mut brace_inserted = false; - // let mut edits = Vec::new(); - // let mut new_selections = Vec::with_capacity(selections.len()); - // let mut new_autoclose_regions = Vec::new(); - // let snapshot = self.buffer.read(cx).read(cx); + let selections = self.selections.all_adjusted(cx); + let mut brace_inserted = false; + let mut edits = Vec::new(); + let mut new_selections = Vec::with_capacity(selections.len()); + let mut new_autoclose_regions = Vec::new(); + let snapshot = self.buffer.read(cx).read(cx); - // for (selection, autoclose_region) in - // self.selections_with_autoclose_regions(selections, &snapshot) - // { - // if let Some(scope) = snapshot.language_scope_at(selection.head()) { - // // Determine if the inserted text matches the opening or closing - // // bracket of any of this language's bracket pairs. - // let mut bracket_pair = None; - // let mut is_bracket_pair_start = false; - // if !text.is_empty() { - // // `text` can be empty when an user is using IME (e.g. Chinese Wubi Simplified) - // // and they are removing the character that triggered IME popup. - // for (pair, enabled) in scope.brackets() { - // if enabled && pair.close && pair.start.ends_with(text.as_ref()) { - // bracket_pair = Some(pair.clone()); - // is_bracket_pair_start = true; - // break; - // } else if pair.end.as_str() == text.as_ref() { - // bracket_pair = Some(pair.clone()); - // break; - // } - // } - // } + for (selection, autoclose_region) in + self.selections_with_autoclose_regions(selections, &snapshot) + { + if let Some(scope) = snapshot.language_scope_at(selection.head()) { + // Determine if the inserted text matches the opening or closing + // bracket of any of this language's bracket pairs. + let mut bracket_pair = None; + let mut is_bracket_pair_start = false; + if !text.is_empty() { + // `text` can be empty when an user is using IME (e.g. Chinese Wubi Simplified) + // and they are removing the character that triggered IME popup. + for (pair, enabled) in scope.brackets() { + if enabled && pair.close && pair.start.ends_with(text.as_ref()) { + bracket_pair = Some(pair.clone()); + is_bracket_pair_start = true; + break; + } else if pair.end.as_str() == text.as_ref() { + bracket_pair = Some(pair.clone()); + break; + } + } + } - // if let Some(bracket_pair) = bracket_pair { - // if selection.is_empty() { - // if is_bracket_pair_start { - // let prefix_len = bracket_pair.start.len() - text.len(); - - // // If the inserted text is a suffix of an opening bracket and the - // // selection is preceded by the rest of the opening bracket, then - // // insert the closing bracket. - // let following_text_allows_autoclose = snapshot - // .chars_at(selection.start) - // .next() - // .map_or(true, |c| scope.should_autoclose_before(c)); - // let preceding_text_matches_prefix = prefix_len == 0 - // || (selection.start.column >= (prefix_len as u32) - // && snapshot.contains_str_at( - // Point::new( - // selection.start.row, - // selection.start.column - (prefix_len as u32), - // ), - // &bracket_pair.start[..prefix_len], - // )); - // if following_text_allows_autoclose && preceding_text_matches_prefix { - // let anchor = snapshot.anchor_before(selection.end); - // new_selections.push((selection.map(|_| anchor), text.len())); - // new_autoclose_regions.push(( - // anchor, - // text.len(), - // selection.id, - // bracket_pair.clone(), - // )); - // edits.push(( - // selection.range(), - // format!("{}{}", text, bracket_pair.end).into(), - // )); - // brace_inserted = true; - // continue; - // } - // } + if let Some(bracket_pair) = bracket_pair { + if selection.is_empty() { + if is_bracket_pair_start { + let prefix_len = bracket_pair.start.len() - text.len(); + + // If the inserted text is a suffix of an opening bracket and the + // selection is preceded by the rest of the opening bracket, then + // insert the closing bracket. + let following_text_allows_autoclose = snapshot + .chars_at(selection.start) + .next() + .map_or(true, |c| scope.should_autoclose_before(c)); + let preceding_text_matches_prefix = prefix_len == 0 + || (selection.start.column >= (prefix_len as u32) + && snapshot.contains_str_at( + Point::new( + selection.start.row, + selection.start.column - (prefix_len as u32), + ), + &bracket_pair.start[..prefix_len], + )); + if following_text_allows_autoclose && preceding_text_matches_prefix { + let anchor = snapshot.anchor_before(selection.end); + new_selections.push((selection.map(|_| anchor), text.len())); + new_autoclose_regions.push(( + anchor, + text.len(), + selection.id, + bracket_pair.clone(), + )); + edits.push(( + selection.range(), + format!("{}{}", text, bracket_pair.end).into(), + )); + brace_inserted = true; + continue; + } + } - // if let Some(region) = autoclose_region { - // // If the selection is followed by an auto-inserted closing bracket, - // // then don't insert that closing bracket again; just move the selection - // // past the closing bracket. - // let should_skip = selection.end == region.range.end.to_point(&snapshot) - // && text.as_ref() == region.pair.end.as_str(); - // if should_skip { - // let anchor = snapshot.anchor_after(selection.end); - // new_selections - // .push((selection.map(|_| anchor), region.pair.end.len())); - // continue; - // } - // } - // } - // // If an opening bracket is 1 character long and is typed while - // // text is selected, then surround that text with the bracket pair. - // else if is_bracket_pair_start && bracket_pair.start.chars().count() == 1 { - // edits.push((selection.start..selection.start, text.clone())); - // edits.push(( - // selection.end..selection.end, - // bracket_pair.end.as_str().into(), - // )); - // brace_inserted = true; - // new_selections.push(( - // Selection { - // id: selection.id, - // start: snapshot.anchor_after(selection.start), - // end: snapshot.anchor_before(selection.end), - // reversed: selection.reversed, - // goal: selection.goal, - // }, - // 0, - // )); - // continue; - // } - // } - // } + if let Some(region) = autoclose_region { + // If the selection is followed by an auto-inserted closing bracket, + // then don't insert that closing bracket again; just move the selection + // past the closing bracket. + let should_skip = selection.end == region.range.end.to_point(&snapshot) + && text.as_ref() == region.pair.end.as_str(); + if should_skip { + let anchor = snapshot.anchor_after(selection.end); + new_selections + .push((selection.map(|_| anchor), region.pair.end.len())); + continue; + } + } + } + // If an opening bracket is 1 character long and is typed while + // text is selected, then surround that text with the bracket pair. + else if is_bracket_pair_start && bracket_pair.start.chars().count() == 1 { + edits.push((selection.start..selection.start, text.clone())); + edits.push(( + selection.end..selection.end, + bracket_pair.end.as_str().into(), + )); + brace_inserted = true; + new_selections.push(( + Selection { + id: selection.id, + start: snapshot.anchor_after(selection.start), + end: snapshot.anchor_before(selection.end), + reversed: selection.reversed, + goal: selection.goal, + }, + 0, + )); + continue; + } + } + } - // // If not handling any auto-close operation, then just replace the selected - // // text with the given input and move the selection to the end of the - // // newly inserted text. - // let anchor = snapshot.anchor_after(selection.end); - // new_selections.push((selection.map(|_| anchor), 0)); - // edits.push((selection.start..selection.end, text.clone())); - // } + // If not handling any auto-close operation, then just replace the selected + // text with the given input and move the selection to the end of the + // newly inserted text. + let anchor = snapshot.anchor_after(selection.end); + new_selections.push((selection.map(|_| anchor), 0)); + edits.push((selection.start..selection.end, text.clone())); + } - // drop(snapshot); - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, this.autoindent_mode.clone(), cx); - // }); + drop(snapshot); + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, this.autoindent_mode.clone(), cx); + }); - // let new_anchor_selections = new_selections.iter().map(|e| &e.0); - // let new_selection_deltas = new_selections.iter().map(|e| e.1); - // let snapshot = this.buffer.read(cx).read(cx); - // let new_selections = resolve_multiple::(new_anchor_selections, &snapshot) - // .zip(new_selection_deltas) - // .map(|(selection, delta)| Selection { - // id: selection.id, - // start: selection.start + delta, - // end: selection.end + delta, - // reversed: selection.reversed, - // goal: SelectionGoal::None, - // }) - // .collect::>(); + let new_anchor_selections = new_selections.iter().map(|e| &e.0); + let new_selection_deltas = new_selections.iter().map(|e| e.1); + let snapshot = this.buffer.read(cx).read(cx); + let new_selections = resolve_multiple::(new_anchor_selections, &snapshot) + .zip(new_selection_deltas) + .map(|(selection, delta)| Selection { + id: selection.id, + start: selection.start + delta, + end: selection.end + delta, + reversed: selection.reversed, + goal: SelectionGoal::None, + }) + .collect::>(); - // let mut i = 0; - // for (position, delta, selection_id, pair) in new_autoclose_regions { - // let position = position.to_offset(&snapshot) + delta; - // let start = snapshot.anchor_before(position); - // let end = snapshot.anchor_after(position); - // while let Some(existing_state) = this.autoclose_regions.get(i) { - // match existing_state.range.start.cmp(&start, &snapshot) { - // Ordering::Less => i += 1, - // Ordering::Greater => break, - // Ordering::Equal => match end.cmp(&existing_state.range.end, &snapshot) { - // Ordering::Less => i += 1, - // Ordering::Equal => break, - // Ordering::Greater => break, - // }, - // } - // } - // this.autoclose_regions.insert( - // i, - // AutocloseRegion { - // selection_id, - // range: start..end, - // pair, - // }, - // ); - // } + let mut i = 0; + for (position, delta, selection_id, pair) in new_autoclose_regions { + let position = position.to_offset(&snapshot) + delta; + let start = snapshot.anchor_before(position); + let end = snapshot.anchor_after(position); + while let Some(existing_state) = this.autoclose_regions.get(i) { + match existing_state.range.start.cmp(&start, &snapshot) { + Ordering::Less => i += 1, + Ordering::Greater => break, + Ordering::Equal => match end.cmp(&existing_state.range.end, &snapshot) { + Ordering::Less => i += 1, + Ordering::Equal => break, + Ordering::Greater => break, + }, + } + } + this.autoclose_regions.insert( + i, + AutocloseRegion { + selection_id, + range: start..end, + pair, + }, + ); + } - // drop(snapshot); - // let had_active_copilot_suggestion = this.has_active_copilot_suggestion(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); + drop(snapshot); + let had_active_copilot_suggestion = this.has_active_copilot_suggestion(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); - // if !brace_inserted && EditorSettings>(cx).use_on_type_format { - // if let Some(on_type_format_task) = - // this.trigger_on_type_formatting(text.to_string(), cx) - // { - // on_type_format_task.detach_and_log_err(cx); - // } - // } + if !brace_inserted && EditorSettings::get_global(cx).use_on_type_format { + if let Some(on_type_format_task) = + this.trigger_on_type_formatting(text.to_string(), cx) + { + on_type_format_task.detach_and_log_err(cx); + } + } - // if had_active_copilot_suggestion { - // this.refresh_copilot_suggestions(true, cx); - // if !this.has_active_copilot_suggestion(cx) { - // this.trigger_completion_on_input(&text, cx); - // } - // } else { - // this.trigger_completion_on_input(&text, cx); - // this.refresh_copilot_suggestions(true, cx); - // } - // }); - // } + if had_active_copilot_suggestion { + this.refresh_copilot_suggestions(true, cx); + if !this.has_active_copilot_suggestion(cx) { + this.trigger_completion_on_input(&text, cx); + } + } else { + this.trigger_completion_on_input(&text, cx); + this.refresh_copilot_suggestions(true, cx); + } + }); + } // pub fn newline(&mut self, _: &Newline, cx: &mut ViewContext) { // self.transact(cx, |this, cx| { @@ -3259,22 +3260,22 @@ impl Editor { }); } - // fn trigger_completion_on_input(&mut self, text: &str, cx: &mut ViewContext) { - // if !EditorSettings>(cx).show_completions_on_input { - // return; - // } + fn trigger_completion_on_input(&mut self, text: &str, cx: &mut ViewContext) { + if !EditorSettings::get_global(cx).show_completions_on_input { + return; + } - // let selection = self.selections.newest_anchor(); - // if self - // .buffer - // .read(cx) - // .is_completion_trigger(selection.head(), text, cx) - // { - // self.show_completions(&ShowCompletions, cx); - // } else { - // self.hide_context_menu(cx); - // } - // } + let selection = self.selections.newest_anchor(); + if self + .buffer + .read(cx) + .is_completion_trigger(selection.head(), text, cx) + { + self.show_completions(&ShowCompletions, cx); + } else { + self.hide_context_menu(cx); + } + } // /// If any empty selections is touching the start of its innermost containing autoclose // /// region, expand it to select the brackets. @@ -3305,37 +3306,37 @@ impl Editor { // self.change_selections(None, cx, |selections| selections.select(new_selections)); // } - // /// Iterate the given selections, and for each one, find the smallest surrounding - // /// autoclose region. This uses the ordering of the selections and the autoclose - // /// regions to avoid repeated comparisons. - // fn selections_with_autoclose_regions<'a, D: ToOffset + Clone>( - // &'a self, - // selections: impl IntoIterator>, - // buffer: &'a MultiBufferSnapshot, - // ) -> impl Iterator, Option<&'a AutocloseRegion>)> { - // let mut i = 0; - // let mut regions = self.autoclose_regions.as_slice(); - // selections.into_iter().map(move |selection| { - // let range = selection.start.to_offset(buffer)..selection.end.to_offset(buffer); - - // let mut enclosing = None; - // while let Some(pair_state) = regions.get(i) { - // if pair_state.range.end.to_offset(buffer) < range.start { - // regions = ®ions[i + 1..]; - // i = 0; - // } else if pair_state.range.start.to_offset(buffer) > range.end { - // break; - // } else { - // if pair_state.selection_id == selection.id { - // enclosing = Some(pair_state); - // } - // i += 1; - // } - // } + /// Iterate the given selections, and for each one, find the smallest surrounding + /// autoclose region. This uses the ordering of the selections and the autoclose + /// regions to avoid repeated comparisons. + fn selections_with_autoclose_regions<'a, D: ToOffset + Clone>( + &'a self, + selections: impl IntoIterator>, + buffer: &'a MultiBufferSnapshot, + ) -> impl Iterator, Option<&'a AutocloseRegion>)> { + let mut i = 0; + let mut regions = self.autoclose_regions.as_slice(); + selections.into_iter().map(move |selection| { + let range = selection.start.to_offset(buffer)..selection.end.to_offset(buffer); + + let mut enclosing = None; + while let Some(pair_state) = regions.get(i) { + if pair_state.range.end.to_offset(buffer) < range.start { + regions = ®ions[i + 1..]; + i = 0; + } else if pair_state.range.start.to_offset(buffer) > range.end { + break; + } else { + if pair_state.selection_id == selection.id { + enclosing = Some(pair_state); + } + i += 1; + } + } - // (selection.clone(), enclosing) - // }) - // } + (selection.clone(), enclosing) + }) + } /// Remove any autoclose regions that no longer contain their selection. fn invalidate_autoclose_regions( @@ -3537,51 +3538,51 @@ impl Editor { cx.notify(); } - // fn trigger_on_type_formatting( - // &self, - // input: String, - // cx: &mut ViewContext, - // ) -> Option>> { - // if input.len() != 1 { - // return None; - // } + fn trigger_on_type_formatting( + &self, + input: String, + cx: &mut ViewContext, + ) -> Option>> { + if input.len() != 1 { + return None; + } - // let project = self.project.as_ref()?; - // let position = self.selections.newest_anchor().head(); - // let (buffer, buffer_position) = self - // .buffer - // .read(cx) - // .text_anchor_for_position(position.clone(), cx)?; - - // // OnTypeFormatting returns a list of edits, no need to pass them between Zed instances, - // // hence we do LSP request & edit on host side only — add formats to host's history. - // let push_to_lsp_host_history = true; - // // If this is not the host, append its history with new edits. - // let push_to_client_history = project.read(cx).is_remote(); - - // let on_type_formatting = project.update(cx, |project, cx| { - // project.on_type_format( - // buffer.clone(), - // buffer_position, - // input, - // push_to_lsp_host_history, - // cx, - // ) - // }); - // Some(cx.spawn(|editor, mut cx| async move { - // if let Some(transaction) = on_type_formatting.await? { - // if push_to_client_history { - // buffer.update(&mut cx, |buffer, _| { - // buffer.push_transaction(transaction, Instant::now()); - // }); - // } - // editor.update(&mut cx, |editor, cx| { - // editor.refresh_document_highlights(cx); - // })?; - // } - // Ok(()) - // })) - // } + let project = self.project.as_ref()?; + let position = self.selections.newest_anchor().head(); + let (buffer, buffer_position) = self + .buffer + .read(cx) + .text_anchor_for_position(position.clone(), cx)?; + + // OnTypeFormatting returns a list of edits, no need to pass them between Zed instances, + // hence we do LSP request & edit on host side only — add formats to host's history. + let push_to_lsp_host_history = true; + // If this is not the host, append its history with new edits. + let push_to_client_history = project.read(cx).is_remote(); + + let on_type_formatting = project.update(cx, |project, cx| { + project.on_type_format( + buffer.clone(), + buffer_position, + input, + push_to_lsp_host_history, + cx, + ) + }); + Some(cx.spawn(|editor, mut cx| async move { + if let Some(transaction) = on_type_formatting.await? { + if push_to_client_history { + buffer.update(&mut cx, |buffer, _| { + buffer.push_transaction(transaction, Instant::now()); + }); + } + editor.update(&mut cx, |editor, cx| { + editor.refresh_document_highlights(cx); + })?; + } + Ok(()) + })) + } fn show_completions(&mut self, _: &ShowCompletions, cx: &mut ViewContext) { if self.pending_rename.is_some() { @@ -8712,12 +8713,12 @@ impl Editor { // cx.notify(); // } - // pub fn text_highlights<'a, T: 'static>( - // &'a self, - // cx: &'a AppContext, - // ) -> Option<(HighlightStyle, &'a [Range])> { - // self.display_map.read(cx).text_highlights(TypeId::of::()) - // } + pub fn text_highlights<'a, T: 'static>( + &'a self, + cx: &'a AppContext, + ) -> Option<(HighlightStyle, &'a [Range])> { + self.display_map.read(cx).text_highlights(TypeId::of::()) + } pub fn clear_highlights(&mut self, cx: &mut ViewContext) { let cleared = self @@ -8934,43 +8935,43 @@ impl Editor { // .detach_and_log_err(cx); // } - // fn marked_text_ranges(&self, cx: &AppContext) -> Option>> { - // let snapshot = self.buffer.read(cx).read(cx); - // let (_, ranges) = self.text_highlights::(cx)?; - // Some( - // ranges - // .iter() - // .map(move |range| { - // range.start.to_offset_utf16(&snapshot)..range.end.to_offset_utf16(&snapshot) - // }) - // .collect(), - // ) - // } + fn marked_text_ranges(&self, cx: &AppContext) -> Option>> { + let snapshot = self.buffer.read(cx).read(cx); + let (_, ranges) = self.text_highlights::(cx)?; + Some( + ranges + .iter() + .map(move |range| { + range.start.to_offset_utf16(&snapshot)..range.end.to_offset_utf16(&snapshot) + }) + .collect(), + ) + } - // fn selection_replacement_ranges( - // &self, - // range: Range, - // cx: &AppContext, - // ) -> Vec> { - // let selections = self.selections.all::(cx); - // let newest_selection = selections - // .iter() - // .max_by_key(|selection| selection.id) - // .unwrap(); - // let start_delta = range.start.0 as isize - newest_selection.start.0 as isize; - // let end_delta = range.end.0 as isize - newest_selection.end.0 as isize; - // let snapshot = self.buffer.read(cx).read(cx); - // selections - // .into_iter() - // .map(|mut selection| { - // selection.start.0 = - // (selection.start.0 as isize).saturating_add(start_delta) as usize; - // selection.end.0 = (selection.end.0 as isize).saturating_add(end_delta) as usize; - // snapshot.clip_offset_utf16(selection.start, Bias::Left) - // ..snapshot.clip_offset_utf16(selection.end, Bias::Right) - // }) - // .collect() - // } + fn selection_replacement_ranges( + &self, + range: Range, + cx: &AppContext, + ) -> Vec> { + let selections = self.selections.all::(cx); + let newest_selection = selections + .iter() + .max_by_key(|selection| selection.id) + .unwrap(); + let start_delta = range.start.0 as isize - newest_selection.start.0 as isize; + let end_delta = range.end.0 as isize - newest_selection.end.0 as isize; + let snapshot = self.buffer.read(cx).read(cx); + selections + .into_iter() + .map(|mut selection| { + selection.start.0 = + (selection.start.0 as isize).saturating_add(start_delta) as usize; + selection.end.0 = (selection.end.0 as isize).saturating_add(end_delta) as usize; + snapshot.clip_offset_utf16(selection.start, Bias::Left) + ..snapshot.clip_offset_utf16(selection.end, Bias::Right) + }) + .collect() + } fn report_copilot_event( &self, @@ -9486,102 +9487,101 @@ impl Render for Editor { // false // } -impl PlatformInputHandler for Editor { - fn text_for_range(&self, range_utf16: Range) -> Option { - // Some( - // self.buffer - // .read(cx) - // .read(cx) - // .text_for_range(OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end)) - // .collect(), - // ) - todo!() +impl InputHandler for Editor { + fn text_for_range( + &self, + range_utf16: Range, + cx: &mut ViewContext, + ) -> Option { + Some( + self.buffer + .read(cx) + .read(cx) + .text_for_range(OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end)) + .collect(), + ) } - fn selected_text_range(&self) -> Option> { + fn selected_text_range(&self, cx: &mut ViewContext) -> Option> { // Prevent the IME menu from appearing when holding down an alphabetic key // while input is disabled. - // if !self.input_enabled { - // return None; - // } + if !self.input_enabled { + return None; + } - // let range = self.selections.newest::(cx).range(); - // Some(range.start.0..range.end.0) - todo!() + let range = self.selections.newest::(cx).range(); + Some(range.start.0..range.end.0) } - fn marked_text_range(&self, cx: &AppContext) -> Option> { - // let snapshot = self.buffer.read(cx).read(cx); - // let range = self.text_highlights::(cx)?.1.get(0)?; - // Some(range.start.to_offset_utf16(&snapshot).0..range.end.to_offset_utf16(&snapshot).0) - todo!() + fn marked_text_range(&self, cx: &mut ViewContext) -> Option> { + let snapshot = self.buffer.read(cx).read(cx); + let range = self.text_highlights::(cx)?.1.get(0)?; + Some(range.start.to_offset_utf16(&snapshot).0..range.end.to_offset_utf16(&snapshot).0) } fn unmark_text(&mut self, cx: &mut ViewContext) { - // self.clear_highlights::(cx); - // self.ime_transaction.take(); - todo!() + self.clear_highlights::(cx); + self.ime_transaction.take(); } fn replace_text_in_range( &mut self, - //range_utf16: Option>, - // text: &str, + range_utf16: Option>, + text: &str, cx: &mut ViewContext, ) { - // if !self.input_enabled { - // cx.emit(Event::InputIgnored { text: text.into() }); - // return; - // } + if !self.input_enabled { + cx.emit(Event::InputIgnored { text: text.into() }); + return; + } - // self.transact(cx, |this, cx| { - // let new_selected_ranges = if let Some(range_utf16) = range_utf16 { - // let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); - // Some(this.selection_replacement_ranges(range_utf16, cx)) - // } else { - // this.marked_text_ranges(cx) - // }; + self.transact(cx, |this, cx| { + let new_selected_ranges = if let Some(range_utf16) = range_utf16 { + let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); + Some(this.selection_replacement_ranges(range_utf16, cx)) + } else { + this.marked_text_ranges(cx) + }; - // let range_to_replace = new_selected_ranges.as_ref().and_then(|ranges_to_replace| { - // let newest_selection_id = this.selections.newest_anchor().id; - // this.selections - // .all::(cx) - // .iter() - // .zip(ranges_to_replace.iter()) - // .find_map(|(selection, range)| { - // if selection.id == newest_selection_id { - // Some( - // (range.start.0 as isize - selection.head().0 as isize) - // ..(range.end.0 as isize - selection.head().0 as isize), - // ) - // } else { - // None - // } - // }) - // }); + let range_to_replace = new_selected_ranges.as_ref().and_then(|ranges_to_replace| { + let newest_selection_id = this.selections.newest_anchor().id; + this.selections + .all::(cx) + .iter() + .zip(ranges_to_replace.iter()) + .find_map(|(selection, range)| { + if selection.id == newest_selection_id { + Some( + (range.start.0 as isize - selection.head().0 as isize) + ..(range.end.0 as isize - selection.head().0 as isize), + ) + } else { + None + } + }) + }); - // cx.emit(Event::InputHandled { - // utf16_range_to_replace: range_to_replace, - // text: text.into(), - // }); + cx.emit(Event::InputHandled { + utf16_range_to_replace: range_to_replace, + text: text.into(), + }); - // if let Some(new_selected_ranges) = new_selected_ranges { - // this.change_selections(None, cx, |selections| { - // selections.select_ranges(new_selected_ranges) - // }); - // } + if let Some(new_selected_ranges) = new_selected_ranges { + this.change_selections(None, cx, |selections| { + selections.select_ranges(new_selected_ranges) + }); + } - // this.handle_input(text, cx); - // }); + this.handle_input(text, cx); + }); - // if let Some(transaction) = self.ime_transaction { - // self.buffer.update(cx, |buffer, cx| { - // buffer.group_until_transaction(transaction, cx); - // }); - // } + if let Some(transaction) = self.ime_transaction { + self.buffer.update(cx, |buffer, cx| { + buffer.group_until_transaction(transaction, cx); + }); + } - // self.unmark_text(cx); - todo!() + self.unmark_text(cx); } fn replace_and_mark_text_in_range( @@ -9700,7 +9700,11 @@ impl PlatformInputHandler for Editor { todo!() } - fn bounds_for_range(&self, range_utf16: Range) -> Option> { + fn bounds_for_range( + &self, + range_utf16: Range, + cx: &mut ViewContext, + ) -> Option> { todo!() } } diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 3ff68e18978161185f55dffa3eb0eab55a49ed3e..4e16ff450413d7f143820a8e8797e9f69ef7b51f 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2624,7 +2624,7 @@ impl Element for EditorElement { }); if editor.focus_handle.is_focused(cx) { - cx.set_input_handler(editor.handle); + cx.handle_text_input(); } cx.with_content_mask(ContentMask { bounds }, |cx| { diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 4fc940069cafce0b63cc1e2605e22dfeb25ba685..b7977bbf44d077f0c8a4be60386419561456bc5d 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -679,17 +679,6 @@ impl<'a> WindowContext<'a> { self.window.requested_cursor_style = Some(style) } - pub fn set_input_handler(&mut self, handler: WeakView, cx: ViewContext) - where - V: InputHandler + 'static, - { - self.window.requested_input_handler = Some(Box::new(WindowInputHandler { - cx: cx.app.this.clone(), - window: cx.window_handle(), - handler, - })) - } - /// Called during painting to invoke the given closure in a new stacking context. The given /// z-index is interpreted relative to the previous call to `stack`. pub fn stack(&mut self, z_index: u32, f: impl FnOnce(&mut Self) -> R) -> R { @@ -2009,6 +1998,19 @@ impl<'a, V: 'static> ViewContext<'a, V> { } } +impl ViewContext<'_, V> +where + V: InputHandler + 'static, +{ + pub fn handle_text_input(&mut self) { + self.window.requested_input_handler = Some(Box::new(WindowInputHandler { + cx: self.app.this.clone(), + window: self.window_handle(), + handler: self.view().downgrade(), + })) + } +} + impl ViewContext<'_, V> where V: EventEmitter, From 9fe3073af76f56fbfa82167b0ebe03ea8527bfa0 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 16:33:02 -0800 Subject: [PATCH 080/110] Get basic text input working Co-authored-by: Marshall --- crates/editor2/src/editor.rs | 283 ++++++++++++++-------------- crates/gpui2/src/window.rs | 11 +- crates/workspace2/src/workspace2.rs | 2 +- 3 files changed, 151 insertions(+), 145 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index ccab3ee1caaa9168e73b17be235c138861ca6c90..29742f365120a63df882e8f1bc77dba67264e1df 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -8135,15 +8135,14 @@ impl Editor { } fn start_transaction_at(&mut self, now: Instant, cx: &mut ViewContext) { - todo!() - // self.end_selection(cx); - // if let Some(tx_id) = self - // .buffer - // .update(cx, |buffer, cx| buffer.start_transaction_at(now, cx)) - // { - // self.selection_history - // .insert_transaction(tx_id, self.selections.disjoint_anchors()); - // } + self.end_selection(cx); + if let Some(tx_id) = self + .buffer + .update(cx, |buffer, cx| buffer.start_transaction_at(now, cx)) + { + self.selection_history + .insert_transaction(tx_id, self.selections.disjoint_anchors()); + } } fn end_transaction_at( @@ -8151,22 +8150,21 @@ impl Editor { now: Instant, cx: &mut ViewContext, ) -> Option { - todo!() - // if let Some(tx_id) = self - // .buffer - // .update(cx, |buffer, cx| buffer.end_transaction_at(now, cx)) - // { - // if let Some((_, end_selections)) = self.selection_history.transaction_mut(tx_id) { - // *end_selections = Some(self.selections.disjoint_anchors()); - // } else { - // error!("unexpectedly ended a transaction that wasn't started by this editor"); - // } - - // cx.emit(Event::Edited); - // Some(tx_id) - // } else { - // None - // } + if let Some(tx_id) = self + .buffer + .update(cx, |buffer, cx| buffer.end_transaction_at(now, cx)) + { + if let Some((_, end_selections)) = self.selection_history.transaction_mut(tx_id) { + *end_selections = Some(self.selections.disjoint_anchors()); + } else { + log::error!("unexpectedly ended a transaction that wasn't started by this editor"); + } + + cx.emit(Event::Edited); + Some(tx_id) + } else { + None + } } // pub fn fold(&mut self, _: &Fold, cx: &mut ViewContext) { @@ -8689,17 +8687,17 @@ impl Editor { // results // } - // pub fn highlight_text( - // &mut self, - // ranges: Vec>, - // style: HighlightStyle, - // cx: &mut ViewContext, - // ) { - // self.display_map.update(cx, |map, _| { - // map.highlight_text(TypeId::of::(), ranges, style) - // }); - // cx.notify(); - // } + pub fn highlight_text( + &mut self, + ranges: Vec>, + style: HighlightStyle, + cx: &mut ViewContext, + ) { + self.display_map.update(cx, |map, _| { + map.highlight_text(TypeId::of::(), ranges, style) + }); + cx.notify(); + } // pub fn highlight_inlays( // &mut self, @@ -9591,113 +9589,112 @@ impl InputHandler for Editor { new_selected_range_utf16: Option>, cx: &mut ViewContext, ) { - // if !self.input_enabled { - // cx.emit(Event::InputIgnored { text: text.into() }); - // return; - // } + if !self.input_enabled { + cx.emit(Event::InputIgnored { text: text.into() }); + return; + } - // let transaction = self.transact(cx, |this, cx| { - // let ranges_to_replace = if let Some(mut marked_ranges) = this.marked_text_ranges(cx) { - // let snapshot = this.buffer.read(cx).read(cx); - // if let Some(relative_range_utf16) = range_utf16.as_ref() { - // for marked_range in &mut marked_ranges { - // marked_range.end.0 = marked_range.start.0 + relative_range_utf16.end; - // marked_range.start.0 += relative_range_utf16.start; - // marked_range.start = - // snapshot.clip_offset_utf16(marked_range.start, Bias::Left); - // marked_range.end = - // snapshot.clip_offset_utf16(marked_range.end, Bias::Right); - // } - // } - // Some(marked_ranges) - // } else if let Some(range_utf16) = range_utf16 { - // let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); - // Some(this.selection_replacement_ranges(range_utf16, cx)) - // } else { - // None - // }; - - // let range_to_replace = ranges_to_replace.as_ref().and_then(|ranges_to_replace| { - // let newest_selection_id = this.selections.newest_anchor().id; - // this.selections - // .all::(cx) - // .iter() - // .zip(ranges_to_replace.iter()) - // .find_map(|(selection, range)| { - // if selection.id == newest_selection_id { - // Some( - // (range.start.0 as isize - selection.head().0 as isize) - // ..(range.end.0 as isize - selection.head().0 as isize), - // ) - // } else { - // None - // } - // }) - // }); - - // cx.emit(Event::InputHandled { - // utf16_range_to_replace: range_to_replace, - // text: text.into(), - // }); - - // if let Some(ranges) = ranges_to_replace { - // this.change_selections(None, cx, |s| s.select_ranges(ranges)); - // } - - // let marked_ranges = { - // let snapshot = this.buffer.read(cx).read(cx); - // this.selections - // .disjoint_anchors() - // .iter() - // .map(|selection| { - // selection.start.bias_left(&*snapshot)..selection.end.bias_right(&*snapshot) - // }) - // .collect::>() - // }; - - // if text.is_empty() { - // this.unmark_text(cx); - // } else { - // this.highlight_text::( - // marked_ranges.clone(), - // this.style(cx).composition_mark, - // cx, - // ); - // } - - // this.handle_input(text, cx); - - // if let Some(new_selected_range) = new_selected_range_utf16 { - // let snapshot = this.buffer.read(cx).read(cx); - // let new_selected_ranges = marked_ranges - // .into_iter() - // .map(|marked_range| { - // let insertion_start = marked_range.start.to_offset_utf16(&snapshot).0; - // let new_start = OffsetUtf16(new_selected_range.start + insertion_start); - // let new_end = OffsetUtf16(new_selected_range.end + insertion_start); - // snapshot.clip_offset_utf16(new_start, Bias::Left) - // ..snapshot.clip_offset_utf16(new_end, Bias::Right) - // }) - // .collect::>(); - - // drop(snapshot); - // this.change_selections(None, cx, |selections| { - // selections.select_ranges(new_selected_ranges) - // }); - // } - // }); - - // self.ime_transaction = self.ime_transaction.or(transaction); - // if let Some(transaction) = self.ime_transaction { - // self.buffer.update(cx, |buffer, cx| { - // buffer.group_until_transaction(transaction, cx); - // }); - // } + let transaction = self.transact(cx, |this, cx| { + let ranges_to_replace = if let Some(mut marked_ranges) = this.marked_text_ranges(cx) { + let snapshot = this.buffer.read(cx).read(cx); + if let Some(relative_range_utf16) = range_utf16.as_ref() { + for marked_range in &mut marked_ranges { + marked_range.end.0 = marked_range.start.0 + relative_range_utf16.end; + marked_range.start.0 += relative_range_utf16.start; + marked_range.start = + snapshot.clip_offset_utf16(marked_range.start, Bias::Left); + marked_range.end = + snapshot.clip_offset_utf16(marked_range.end, Bias::Right); + } + } + Some(marked_ranges) + } else if let Some(range_utf16) = range_utf16 { + let range_utf16 = OffsetUtf16(range_utf16.start)..OffsetUtf16(range_utf16.end); + Some(this.selection_replacement_ranges(range_utf16, cx)) + } else { + None + }; - // if self.text_highlights::(cx).is_none() { - // self.ime_transaction.take(); - // } - todo!() + let range_to_replace = ranges_to_replace.as_ref().and_then(|ranges_to_replace| { + let newest_selection_id = this.selections.newest_anchor().id; + this.selections + .all::(cx) + .iter() + .zip(ranges_to_replace.iter()) + .find_map(|(selection, range)| { + if selection.id == newest_selection_id { + Some( + (range.start.0 as isize - selection.head().0 as isize) + ..(range.end.0 as isize - selection.head().0 as isize), + ) + } else { + None + } + }) + }); + + cx.emit(Event::InputHandled { + utf16_range_to_replace: range_to_replace, + text: text.into(), + }); + + if let Some(ranges) = ranges_to_replace { + this.change_selections(None, cx, |s| s.select_ranges(ranges)); + } + + let marked_ranges = { + let snapshot = this.buffer.read(cx).read(cx); + this.selections + .disjoint_anchors() + .iter() + .map(|selection| { + selection.start.bias_left(&*snapshot)..selection.end.bias_right(&*snapshot) + }) + .collect::>() + }; + + if text.is_empty() { + this.unmark_text(cx); + } else { + this.highlight_text::( + marked_ranges.clone(), + HighlightStyle::default(), // todo!() this.style(cx).composition_mark, + cx, + ); + } + + this.handle_input(text, cx); + + if let Some(new_selected_range) = new_selected_range_utf16 { + let snapshot = this.buffer.read(cx).read(cx); + let new_selected_ranges = marked_ranges + .into_iter() + .map(|marked_range| { + let insertion_start = marked_range.start.to_offset_utf16(&snapshot).0; + let new_start = OffsetUtf16(new_selected_range.start + insertion_start); + let new_end = OffsetUtf16(new_selected_range.end + insertion_start); + snapshot.clip_offset_utf16(new_start, Bias::Left) + ..snapshot.clip_offset_utf16(new_end, Bias::Right) + }) + .collect::>(); + + drop(snapshot); + this.change_selections(None, cx, |selections| { + selections.select_ranges(new_selected_ranges) + }); + } + }); + + self.ime_transaction = self.ime_transaction.or(transaction); + if let Some(transaction) = self.ime_transaction { + self.buffer.update(cx, |buffer, cx| { + buffer.group_until_transaction(transaction, cx); + }); + } + + if self.text_highlights::(cx).is_none() { + self.ime_transaction.take(); + } } fn bounds_for_range( @@ -9705,7 +9702,9 @@ impl InputHandler for Editor { range_utf16: Range, cx: &mut ViewContext, ) -> Option> { - todo!() + // todo!() + // See how we did it before: `rect_for_range` + None } } diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index b7977bbf44d077f0c8a4be60386419561456bc5d..50c7b772f882f07aa99e668676f1e7b5ddc8688a 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -255,7 +255,7 @@ impl Window { handle .update(&mut cx, |_, cx| cx.dispatch_event(event)) .log_err() - .unwrap_or(true) + .unwrap_or(false) }) }); @@ -1011,6 +1011,9 @@ impl<'a> WindowContext<'a> { .take() .unwrap_or(CursorStyle::Arrow); self.platform.set_cursor_style(cursor_style); + if let Some(handler) = self.window.requested_input_handler.take() { + self.window.platform_window.set_input_handler(handler); + } self.window.dirty = false; } @@ -1155,6 +1158,7 @@ impl<'a> WindowContext<'a> { .insert(any_mouse_event.type_id(), handlers); } } else if let Some(any_key_event) = event.keyboard_event() { + let mut did_handle_action = false; let key_dispatch_stack = mem::take(&mut self.window.key_dispatch_stack); let key_event_type = any_key_event.type_id(); let mut context_stack = SmallVec::<[&DispatchContext; 16]>::new(); @@ -1175,6 +1179,7 @@ impl<'a> WindowContext<'a> { self.dispatch_action(action, &key_dispatch_stack[..ix]); } if !self.app.propagate_event { + did_handle_action = true; break; } } @@ -1203,6 +1208,7 @@ impl<'a> WindowContext<'a> { } if !self.app.propagate_event { + did_handle_action = true; break; } } @@ -1216,6 +1222,7 @@ impl<'a> WindowContext<'a> { drop(context_stack); self.window.key_dispatch_stack = key_dispatch_stack; + return did_handle_action; } true @@ -2007,7 +2014,7 @@ where cx: self.app.this.clone(), window: self.window_handle(), handler: self.view().downgrade(), - })) + })); } } diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index 90204f60386e02cb08eb171d381b9e97b6fbea7f..b51b0186efd4ab4bccd8822f407141a05eeb2b10 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -2694,7 +2694,7 @@ impl Workspace { .any(|item| item.has_conflict(cx) || item.is_dirty(cx)); if is_edited != self.window_edited { self.window_edited = is_edited; - todo!() + // todo!() // cx.set_window_edited(self.window_edited) } } From 06960df287853505b84018eb3218525f4803aca3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 7 Nov 2023 17:24:04 -0800 Subject: [PATCH 081/110] Implement basic fuzzy filtering in picker --- Cargo.lock | 1 + crates/picker2/src/picker2.rs | 41 +++++- crates/storybook2/Cargo.toml | 1 + crates/storybook2/src/stories/picker.rs | 176 +++++++++++++++--------- 4 files changed, 153 insertions(+), 66 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e52a8444e4f55bf06d615543ab43e34995e7c617..580de35aa0c9b5ddedcd6dc9b4821cb39a5b5e97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8558,6 +8558,7 @@ dependencies = [ "chrono", "clap 4.4.4", "editor2", + "fuzzy2", "gpui2", "itertools 0.11.0", "language2", diff --git a/crates/picker2/src/picker2.rs b/crates/picker2/src/picker2.rs index e80801229d06101d17fcfb5c8fe2008e7c080b13..075cf10ff6811eeb2ce8f8a82f31f9799c0a4a00 100644 --- a/crates/picker2/src/picker2.rs +++ b/crates/picker2/src/picker2.rs @@ -1,7 +1,7 @@ use editor::Editor; use gpui::{ div, uniform_list, Component, Div, FocusEnabled, ParentElement, Render, StatefulInteractivity, - StatelessInteractive, Styled, UniformListScrollHandle, View, ViewContext, VisualContext, + StatelessInteractive, Styled, Task, UniformListScrollHandle, View, ViewContext, VisualContext, WindowContext, }; use std::cmp; @@ -10,6 +10,7 @@ pub struct Picker { pub delegate: D, scroll_handle: UniformListScrollHandle, editor: View, + pending_update_matches: Option>>, } pub trait PickerDelegate: Sized + 'static { @@ -20,7 +21,7 @@ pub trait PickerDelegate: Sized + 'static { fn set_selected_index(&mut self, ix: usize, cx: &mut ViewContext>); // fn placeholder_text(&self) -> Arc; - // fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; + fn update_matches(&mut self, query: String, cx: &mut ViewContext>) -> Task<()>; fn confirm(&mut self, secondary: bool, cx: &mut ViewContext>); fn dismissed(&mut self, cx: &mut ViewContext>); @@ -35,10 +36,13 @@ pub trait PickerDelegate: Sized + 'static { impl Picker { pub fn new(delegate: D, cx: &mut ViewContext) -> Self { + let editor = cx.build_view(|cx| Editor::single_line(cx)); + cx.subscribe(&editor, Self::on_input_editor_event).detach(); Self { delegate, scroll_handle: UniformListScrollHandle::new(), - editor: cx.build_view(|cx| Editor::single_line(cx)), + pending_update_matches: None, + editor, } } @@ -93,6 +97,37 @@ impl Picker { fn secondary_confirm(&mut self, _: &menu::SecondaryConfirm, cx: &mut ViewContext) { self.delegate.confirm(true, cx); } + + fn on_input_editor_event( + &mut self, + _: View, + event: &editor::Event, + cx: &mut ViewContext, + ) { + if let editor::Event::BufferEdited = event { + let query = self.editor.read(cx).text(cx); + self.update_matches(query, cx); + } + } + + pub fn update_matches(&mut self, query: String, cx: &mut ViewContext) { + let update = self.delegate.update_matches(query, cx); + self.matches_updated(cx); + self.pending_update_matches = Some(cx.spawn(|this, mut cx| async move { + update.await; + this.update(&mut cx, |this, cx| { + this.matches_updated(cx); + }) + .ok() + })); + } + + fn matches_updated(&mut self, cx: &mut ViewContext) { + let index = self.delegate.selected_index(); + self.scroll_handle.scroll_to_item(index); + self.pending_update_matches = None; + cx.notify(); + } } impl Render for Picker { diff --git a/crates/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index 3bf06a97780b8c24c1086d009eec2c76ae34d65e..7c6776c9309fd68352b7e18b846af8cd4e8fbdae 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -15,6 +15,7 @@ backtrace-on-stack-overflow = "0.3.0" clap = { version = "4.4", features = ["derive", "string"] } editor = { package = "editor2", path = "../editor2" } chrono = "0.4" +fuzzy = { package = "fuzzy2", path = "../fuzzy2" } gpui = { package = "gpui2", path = "../gpui2" } itertools = "0.11.0" language = { package = "language2", path = "../language2" } diff --git a/crates/storybook2/src/stories/picker.rs b/crates/storybook2/src/stories/picker.rs index 0a0ee0c1d4513df617c55b16561352d1e90948e8..82a010e6b30e820681b903232b74c35cad6b8584 100644 --- a/crates/storybook2/src/stories/picker.rs +++ b/crates/storybook2/src/stories/picker.rs @@ -1,6 +1,9 @@ +use std::sync::Arc; + +use fuzzy::StringMatchCandidate; use gpui::{ - div, Component, Div, KeyBinding, ParentElement, Render, SharedString, StatelessInteractive, - Styled, View, VisualContext, WindowContext, + div, Component, Div, KeyBinding, ParentElement, Render, StatelessInteractive, Styled, Task, + View, VisualContext, WindowContext, }; use picker::{Picker, PickerDelegate}; use theme2::ActiveTheme; @@ -10,10 +13,30 @@ pub struct PickerStory { } struct Delegate { - candidates: Vec, + candidates: Arc<[StringMatchCandidate]>, + matches: Vec, selected_ix: usize, } +impl Delegate { + fn new(strings: &[&str]) -> Self { + Self { + candidates: strings + .iter() + .copied() + .enumerate() + .map(|(id, string)| StringMatchCandidate { + id, + char_bag: string.into(), + string: string.into(), + }) + .collect(), + matches: vec![], + selected_ix: 0, + } + } +} + impl PickerDelegate for Delegate { type ListItem = Div>; @@ -28,6 +51,10 @@ impl PickerDelegate for Delegate { cx: &mut gpui::ViewContext>, ) -> Self::ListItem { let colors = cx.theme().colors(); + let Some(candidate_ix) = self.matches.get(ix) else { + return div(); + }; + let candidate = self.candidates[*candidate_ix].string.clone(); div() .text_color(colors.text) @@ -39,7 +66,7 @@ impl PickerDelegate for Delegate { .bg(colors.element_active) .text_color(colors.text_accent) }) - .child(self.candidates[ix].clone()) + .child(candidate) } fn selected_index(&self) -> usize { @@ -52,16 +79,42 @@ impl PickerDelegate for Delegate { } fn confirm(&mut self, secondary: bool, cx: &mut gpui::ViewContext>) { + let candidate_ix = self.matches[self.selected_ix]; + let candidate = self.candidates[candidate_ix].string.clone(); + if secondary { - eprintln!("Secondary confirmed {}", self.candidates[self.selected_ix]) + eprintln!("Secondary confirmed {}", candidate) } else { - eprintln!("Confirmed {}", self.candidates[self.selected_ix]) + eprintln!("Confirmed {}", candidate) } } fn dismissed(&mut self, cx: &mut gpui::ViewContext>) { cx.quit(); } + + fn update_matches( + &mut self, + query: String, + cx: &mut gpui::ViewContext>, + ) -> Task<()> { + let candidates = self.candidates.clone(); + self.matches = cx + .background_executor() + .block(fuzzy::match_strings( + &candidates, + &query, + true, + 100, + &Default::default(), + cx.background_executor().clone(), + )) + .into_iter() + .map(|r| r.candidate_id) + .collect(); + self.selected_ix = 0; + Task::ready(()) + } } impl PickerStory { @@ -87,63 +140,60 @@ impl PickerStory { PickerStory { picker: cx.build_view(|cx| { - let picker = Picker::new( - Delegate { - candidates: vec![ - "Baguette (France)".into(), - "Baklava (Turkey)".into(), - "Beef Wellington (UK)".into(), - "Biryani (India)".into(), - "Borscht (Ukraine)".into(), - "Bratwurst (Germany)".into(), - "Bulgogi (Korea)".into(), - "Burrito (USA)".into(), - "Ceviche (Peru)".into(), - "Chicken Tikka Masala (India)".into(), - "Churrasco (Brazil)".into(), - "Couscous (North Africa)".into(), - "Croissant (France)".into(), - "Dim Sum (China)".into(), - "Empanada (Argentina)".into(), - "Fajitas (Mexico)".into(), - "Falafel (Middle East)".into(), - "Feijoada (Brazil)".into(), - "Fish and Chips (UK)".into(), - "Fondue (Switzerland)".into(), - "Goulash (Hungary)".into(), - "Haggis (Scotland)".into(), - "Kebab (Middle East)".into(), - "Kimchi (Korea)".into(), - "Lasagna (Italy)".into(), - "Maple Syrup Pancakes (Canada)".into(), - "Moussaka (Greece)".into(), - "Pad Thai (Thailand)".into(), - "Paella (Spain)".into(), - "Pancakes (USA)".into(), - "Pasta Carbonara (Italy)".into(), - "Pavlova (Australia)".into(), - "Peking Duck (China)".into(), - "Pho (Vietnam)".into(), - "Pierogi (Poland)".into(), - "Pizza (Italy)".into(), - "Poutine (Canada)".into(), - "Pretzel (Germany)".into(), - "Ramen (Japan)".into(), - "Rendang (Indonesia)".into(), - "Sashimi (Japan)".into(), - "Satay (Indonesia)".into(), - "Shepherd's Pie (Ireland)".into(), - "Sushi (Japan)".into(), - "Tacos (Mexico)".into(), - "Tandoori Chicken (India)".into(), - "Tortilla (Spain)".into(), - "Tzatziki (Greece)".into(), - "Wiener Schnitzel (Austria)".into(), - ], - selected_ix: 0, - }, - cx, - ); + let mut delegate = Delegate::new(&[ + "Baguette (France)", + "Baklava (Turkey)", + "Beef Wellington (UK)", + "Biryani (India)", + "Borscht (Ukraine)", + "Bratwurst (Germany)", + "Bulgogi (Korea)", + "Burrito (USA)", + "Ceviche (Peru)", + "Chicken Tikka Masala (India)", + "Churrasco (Brazil)", + "Couscous (North Africa)", + "Croissant (France)", + "Dim Sum (China)", + "Empanada (Argentina)", + "Fajitas (Mexico)", + "Falafel (Middle East)", + "Feijoada (Brazil)", + "Fish and Chips (UK)", + "Fondue (Switzerland)", + "Goulash (Hungary)", + "Haggis (Scotland)", + "Kebab (Middle East)", + "Kimchi (Korea)", + "Lasagna (Italy)", + "Maple Syrup Pancakes (Canada)", + "Moussaka (Greece)", + "Pad Thai (Thailand)", + "Paella (Spain)", + "Pancakes (USA)", + "Pasta Carbonara (Italy)", + "Pavlova (Australia)", + "Peking Duck (China)", + "Pho (Vietnam)", + "Pierogi (Poland)", + "Pizza (Italy)", + "Poutine (Canada)", + "Pretzel (Germany)", + "Ramen (Japan)", + "Rendang (Indonesia)", + "Sashimi (Japan)", + "Satay (Indonesia)", + "Shepherd's Pie (Ireland)", + "Sushi (Japan)", + "Tacos (Mexico)", + "Tandoori Chicken (India)", + "Tortilla (Spain)", + "Tzatziki (Greece)", + "Wiener Schnitzel (Austria)", + ]); + delegate.update_matches("".into(), cx).detach(); + + let picker = Picker::new(delegate, cx); picker.focus(cx); picker }), From a39865b4b2178c969e2c74ef95bf78e51c155560 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 7 Nov 2023 20:27:00 -0500 Subject: [PATCH 082/110] Update default player colors --- crates/theme2/src/colors.rs | 6 +++ crates/theme2/src/default_colors.rs | 78 ++++++++++++++++++----------- 2 files changed, 55 insertions(+), 29 deletions(-) diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 8ee4b5fd47830d062105c85959827cb37c2d7bc1..929838379e56620d51104c9507b071975951296e 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -20,6 +20,12 @@ pub struct PlayerColor { pub selection: Hsla, } +/// A collection of colors that are used to color players in the editor. +/// +/// The first color is always the local player's color, usually a blue. +/// +/// The rest of the default colors crisscross back and forth on the +/// color wheel so that the colors are as distinct as possible. #[derive(Clone)] pub struct PlayerColors(pub Vec); diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 7252e829723d7dce36bceff4ecd882a46bff97e4..a3345ffbafa12e2f285a96dbf4509e8246313ce6 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -27,17 +27,17 @@ impl Default for SystemColors { impl Default for StatusColors { fn default() -> Self { Self { - conflict: red().dark().step_11(), - created: grass().dark().step_11(), - deleted: red().dark().step_11(), - error: red().dark().step_11(), - hidden: neutral().dark().step_11(), - ignored: neutral().dark().step_11(), - info: blue().dark().step_11(), - modified: yellow().dark().step_11(), - renamed: blue().dark().step_11(), - success: grass().dark().step_11(), - warning: yellow().dark().step_11(), + conflict: red().dark().step_9(), + created: grass().dark().step_9(), + deleted: red().dark().step_9(), + error: red().dark().step_9(), + hidden: neutral().dark().step_9(), + ignored: neutral().dark().step_9(), + info: blue().dark().step_9(), + modified: yellow().dark().step_9(), + renamed: blue().dark().step_9(), + success: grass().dark().step_9(), + warning: yellow().dark().step_9(), } } } @@ -45,12 +45,12 @@ impl Default for StatusColors { impl Default for GitStatusColors { fn default() -> Self { Self { - conflict: orange().dark().step_11(), - created: grass().dark().step_11(), - deleted: red().dark().step_11(), - ignored: neutral().dark().step_11(), - modified: yellow().dark().step_11(), - renamed: blue().dark().step_11(), + conflict: orange().dark().step_9(), + created: grass().dark().step_9(), + deleted: red().dark().step_9(), + ignored: neutral().dark().step_9(), + modified: yellow().dark().step_9(), + renamed: blue().dark().step_9(), } } } @@ -59,24 +59,44 @@ impl Default for PlayerColors { fn default() -> Self { Self(vec![ PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 1.0), - background: hsla(0.0, 0.0, 0.0, 1.0), - selection: hsla(0.0, 0.0, 0.0, 1.0), + cursor: blue().dark().step_9(), + background: blue().dark().step_4(), + selection: blue().dark().step_3(), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 1.0), - background: hsla(0.0, 0.0, 0.0, 1.0), - selection: hsla(0.0, 0.0, 0.0, 1.0), + cursor: orange().dark().step_9(), + background: orange().dark().step_4(), + selection: orange().dark().step_3(), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 1.0), - background: hsla(0.0, 0.0, 0.0, 1.0), - selection: hsla(0.0, 0.0, 0.0, 1.0), + cursor: pink().dark().step_9(), + background: pink().dark().step_4(), + selection: pink().dark().step_3(), }, PlayerColor { - cursor: hsla(0.0, 0.0, 0.0, 1.0), - background: hsla(0.0, 0.0, 0.0, 1.0), - selection: hsla(0.0, 0.0, 0.0, 1.0), + cursor: lime().dark().step_9(), + background: lime().dark().step_4(), + selection: lime().dark().step_3(), + }, + PlayerColor { + cursor: purple().dark().step_9(), + background: purple().dark().step_4(), + selection: purple().dark().step_3(), + }, + PlayerColor { + cursor: amber().dark().step_9(), + background: amber().dark().step_4(), + selection: amber().dark().step_3(), + }, + PlayerColor { + cursor: jade().dark().step_9(), + background: jade().dark().step_4(), + selection: jade().dark().step_3(), + }, + PlayerColor { + cursor: red().dark().step_9(), + background: red().dark().step_4(), + selection: red().dark().step_3(), }, ]) } From 79b4f78cb3104cc53138d3767c6d1045e86d040b Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 7 Nov 2023 21:08:33 -0500 Subject: [PATCH 083/110] Extend the theme crate to enable stories, add players story --- Cargo.lock | 1 + crates/storybook2/src/story_selector.rs | 2 + crates/theme2/Cargo.toml | 3 + crates/theme2/src/colors.rs | 35 +----- crates/theme2/src/default_colors.rs | 145 ++++++++++++++++-------- crates/theme2/src/default_theme.rs | 6 +- crates/theme2/src/players.rs | 86 ++++++++++++++ crates/theme2/src/story.rs | 38 +++++++ crates/theme2/src/theme2.rs | 7 ++ 9 files changed, 237 insertions(+), 86 deletions(-) create mode 100644 crates/theme2/src/players.rs create mode 100644 crates/theme2/src/story.rs diff --git a/Cargo.lock b/Cargo.lock index 7d17b48cc789efac41ef9cdbf34fbba2d76582e4..19b1ca6c0a580e9a24869a88880f97200d4486b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9005,6 +9005,7 @@ dependencies = [ "fs2", "gpui2", "indexmap 1.9.3", + "itertools 0.11.0", "parking_lot 0.11.2", "refineable", "schemars", diff --git a/crates/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rs index f59208ccb8794948dd93afa99155d707ea91ad0d..47807def2515e955fc8ea8733badadb761d1d923 100644 --- a/crates/storybook2/src/story_selector.rs +++ b/crates/storybook2/src/story_selector.rs @@ -38,6 +38,7 @@ pub enum ComponentStory { Palette, Panel, ProjectPanel, + Players, RecentProjects, Scroll, Tab, @@ -79,6 +80,7 @@ impl ComponentStory { Self::MultiBuffer => cx.build_view(|_| ui::MultiBufferStory).into(), Self::NotificationsPanel => cx.build_view(|cx| ui::NotificationsPanelStory).into(), Self::Palette => cx.build_view(|cx| ui::PaletteStory).into(), + Self::Players => cx.build_view(|_| theme2::PlayerStory).into(), Self::Panel => cx.build_view(|cx| ui::PanelStory).into(), Self::ProjectPanel => cx.build_view(|_| ui::ProjectPanelStory).into(), Self::RecentProjects => cx.build_view(|_| ui::RecentProjectsStory).into(), diff --git a/crates/theme2/Cargo.toml b/crates/theme2/Cargo.toml index d57c22ede7830fccdce6ce26cd1bcc10fb88923c..45ba4587bab8d5953b39469c5e2382d11b38db57 100644 --- a/crates/theme2/Cargo.toml +++ b/crates/theme2/Cargo.toml @@ -5,6 +5,8 @@ edition = "2021" publish = false [features] +default = ["stories"] +stories = ["dep:itertools"] test-support = [ "gpui/test-support", "fs/test-support", @@ -30,6 +32,7 @@ settings = { package = "settings2", path = "../settings2" } toml.workspace = true uuid.workspace = true util = { path = "../util" } +itertools = { version = "0.11.0", optional = true } [dev-dependencies] gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] } diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 929838379e56620d51104c9507b071975951296e..8e3db63537823e7eaaf8c10a2dfc587fa7493ec0 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use gpui::Hsla; use refineable::Refineable; -use crate::SyntaxTheme; +use crate::{PlayerColors, SyntaxTheme}; #[derive(Clone)] pub struct SystemColors { @@ -13,39 +13,6 @@ pub struct SystemColors { pub mac_os_traffic_light_green: Hsla, } -#[derive(Debug, Clone, Copy)] -pub struct PlayerColor { - pub cursor: Hsla, - pub background: Hsla, - pub selection: Hsla, -} - -/// A collection of colors that are used to color players in the editor. -/// -/// The first color is always the local player's color, usually a blue. -/// -/// The rest of the default colors crisscross back and forth on the -/// color wheel so that the colors are as distinct as possible. -#[derive(Clone)] -pub struct PlayerColors(pub Vec); - -impl PlayerColors { - pub fn local(&self) -> PlayerColor { - // todo!("use a valid color"); - *self.0.first().unwrap() - } - - pub fn absent(&self) -> PlayerColor { - // todo!("use a valid color"); - *self.0.last().unwrap() - } - - pub fn color_for_participant(&self, participant_index: u32) -> PlayerColor { - let len = self.0.len() - 1; - self.0[(participant_index as usize % len) + 1] - } -} - #[derive(Refineable, Clone, Debug)] #[refineable(debug)] pub struct StatusColors { diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index a3345ffbafa12e2f285a96dbf4509e8246313ce6..3a626205f925f081c550776ade24ef807eaf73a3 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -3,12 +3,106 @@ use std::num::ParseIntError; use gpui::{hsla, Hsla, Rgba}; use crate::{ - colors::{GitStatusColors, PlayerColor, PlayerColors, StatusColors, SystemColors, ThemeColors}, + colors::{GitStatusColors, StatusColors, SystemColors, ThemeColors}, scale::{ColorScaleSet, ColorScales}, syntax::SyntaxTheme, - ColorScale, + ColorScale, PlayerColor, PlayerColors, }; +impl Default for PlayerColors { + fn default() -> Self { + Self(vec![ + PlayerColor { + cursor: blue().dark().step_9(), + background: blue().dark().step_5(), + selection: blue().dark().step_3(), + }, + PlayerColor { + cursor: orange().dark().step_9(), + background: orange().dark().step_5(), + selection: orange().dark().step_3(), + }, + PlayerColor { + cursor: pink().dark().step_9(), + background: pink().dark().step_5(), + selection: pink().dark().step_3(), + }, + PlayerColor { + cursor: lime().dark().step_9(), + background: lime().dark().step_5(), + selection: lime().dark().step_3(), + }, + PlayerColor { + cursor: purple().dark().step_9(), + background: purple().dark().step_5(), + selection: purple().dark().step_3(), + }, + PlayerColor { + cursor: amber().dark().step_9(), + background: amber().dark().step_5(), + selection: amber().dark().step_3(), + }, + PlayerColor { + cursor: jade().dark().step_9(), + background: jade().dark().step_5(), + selection: jade().dark().step_3(), + }, + PlayerColor { + cursor: red().dark().step_9(), + background: red().dark().step_5(), + selection: red().dark().step_3(), + }, + ]) + } +} + +impl PlayerColors { + pub fn default_light() -> Self { + Self(vec![ + PlayerColor { + cursor: blue().light().step_9(), + background: blue().light().step_4(), + selection: blue().light().step_3(), + }, + PlayerColor { + cursor: orange().light().step_9(), + background: orange().light().step_4(), + selection: orange().light().step_3(), + }, + PlayerColor { + cursor: pink().light().step_9(), + background: pink().light().step_4(), + selection: pink().light().step_3(), + }, + PlayerColor { + cursor: lime().light().step_9(), + background: lime().light().step_4(), + selection: lime().light().step_3(), + }, + PlayerColor { + cursor: purple().light().step_9(), + background: purple().light().step_4(), + selection: purple().light().step_3(), + }, + PlayerColor { + cursor: amber().light().step_9(), + background: amber().light().step_4(), + selection: amber().light().step_3(), + }, + PlayerColor { + cursor: jade().light().step_9(), + background: jade().light().step_4(), + selection: jade().light().step_3(), + }, + PlayerColor { + cursor: red().light().step_9(), + background: red().light().step_4(), + selection: red().light().step_3(), + }, + ]) + } +} + fn neutral() -> ColorScaleSet { slate() } @@ -55,53 +149,6 @@ impl Default for GitStatusColors { } } -impl Default for PlayerColors { - fn default() -> Self { - Self(vec![ - PlayerColor { - cursor: blue().dark().step_9(), - background: blue().dark().step_4(), - selection: blue().dark().step_3(), - }, - PlayerColor { - cursor: orange().dark().step_9(), - background: orange().dark().step_4(), - selection: orange().dark().step_3(), - }, - PlayerColor { - cursor: pink().dark().step_9(), - background: pink().dark().step_4(), - selection: pink().dark().step_3(), - }, - PlayerColor { - cursor: lime().dark().step_9(), - background: lime().dark().step_4(), - selection: lime().dark().step_3(), - }, - PlayerColor { - cursor: purple().dark().step_9(), - background: purple().dark().step_4(), - selection: purple().dark().step_3(), - }, - PlayerColor { - cursor: amber().dark().step_9(), - background: amber().dark().step_4(), - selection: amber().dark().step_3(), - }, - PlayerColor { - cursor: jade().dark().step_9(), - background: jade().dark().step_4(), - selection: jade().dark().step_3(), - }, - PlayerColor { - cursor: red().dark().step_9(), - background: red().dark().step_4(), - selection: red().dark().step_3(), - }, - ]) - } -} - impl SyntaxTheme { pub fn default_light() -> Self { Self { diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index 3c9634c9898062db06b3431e6d495df7cb8ae682..a0947e47c347a9bb9c67962485ae3cfe524e4e9d 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -1,8 +1,8 @@ use std::sync::Arc; use crate::{ - colors::{GitStatusColors, PlayerColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, - default_color_scales, Appearance, SyntaxTheme, Theme, ThemeFamily, + colors::{GitStatusColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, + default_color_scales, Appearance, PlayerColors, SyntaxTheme, Theme, ThemeFamily, }; fn zed_pro_daylight() -> Theme { @@ -15,7 +15,7 @@ fn zed_pro_daylight() -> Theme { colors: ThemeColors::default_light(), status: StatusColors::default(), git: GitStatusColors::default(), - player: PlayerColors::default(), + player: PlayerColors::default_light(), syntax: Arc::new(SyntaxTheme::default_light()), }, } diff --git a/crates/theme2/src/players.rs b/crates/theme2/src/players.rs new file mode 100644 index 0000000000000000000000000000000000000000..6f7a20980c11e8415131e192582ecbf8280b7685 --- /dev/null +++ b/crates/theme2/src/players.rs @@ -0,0 +1,86 @@ +use gpui::Hsla; + +#[derive(Debug, Clone, Copy)] +pub struct PlayerColor { + pub cursor: Hsla, + pub background: Hsla, + pub selection: Hsla, +} + +/// A collection of colors that are used to color players in the editor. +/// +/// The first color is always the local player's color, usually a blue. +/// +/// The rest of the default colors crisscross back and forth on the +/// color wheel so that the colors are as distinct as possible. +#[derive(Clone)] +pub struct PlayerColors(pub Vec); + +impl PlayerColors { + pub fn local(&self) -> PlayerColor { + // todo!("use a valid color"); + *self.0.first().unwrap() + } + + pub fn absent(&self) -> PlayerColor { + // todo!("use a valid color"); + *self.0.last().unwrap() + } + + pub fn color_for_participant(&self, participant_index: u32) -> PlayerColor { + let len = self.0.len() - 1; + self.0[(participant_index as usize % len) + 1] + } +} + +#[cfg(feature = "stories")] +pub use stories::*; + +#[cfg(feature = "stories")] +mod stories { + use super::*; + use crate::{ActiveTheme, Story}; + use gpui::{div, Div, ParentElement, Render, Styled, ViewContext}; + + pub struct PlayerStory; + + impl Render for PlayerStory { + type Element = Div; + + fn render(&mut self, cx: &mut ViewContext) -> Self::Element { + Story::container(cx) + .child(Story::title_for::<_, PlayerColors>(cx)) + .child(Story::label(cx, "Player Colors")) + .child( + div() + .flex() + .flex_col() + .gap_1() + .child( + div().flex().gap_1().children( + cx.theme() + .players() + .0 + .clone() + .iter_mut() + .map(|color| div().w_8().h_8().rounded_md().bg(color.cursor)), + ), + ) + .child( + div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|color| { + div().w_8().h_8().rounded_md().bg(color.background) + }), + ), + ) + .child( + div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|color| { + div().w_8().h_8().rounded_md().bg(color.selection) + }), + ), + ), + ) + } + } +} diff --git a/crates/theme2/src/story.rs b/crates/theme2/src/story.rs new file mode 100644 index 0000000000000000000000000000000000000000..8b3754b59e9799f00cc60f3cb3f45fb84fcd0cff --- /dev/null +++ b/crates/theme2/src/story.rs @@ -0,0 +1,38 @@ +use gpui::{div, Component, Div, ParentElement, Styled, ViewContext}; + +use crate::ActiveTheme; + +pub struct Story {} + +impl Story { + pub fn container(cx: &mut ViewContext) -> Div { + div() + .size_full() + .flex() + .flex_col() + .pt_2() + .px_4() + .font("Zed Mono") + .bg(cx.theme().colors().background) + } + + pub fn title(cx: &mut ViewContext, title: &str) -> impl Component { + div() + .text_xl() + .text_color(cx.theme().colors().text) + .child(title.to_owned()) + } + + pub fn title_for(cx: &mut ViewContext) -> impl Component { + Self::title(cx, std::any::type_name::()) + } + + pub fn label(cx: &mut ViewContext, label: &str) -> impl Component { + div() + .mt_4() + .mb_2() + .text_xs() + .text_color(cx.theme().colors().text) + .child(label.to_owned()) + } +} diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 88db3c55f47cf859fa5475745c270064d09d120a..9019eba07ada33433a1c189e07278d8c0b1d795f 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -1,6 +1,7 @@ mod colors; mod default_colors; mod default_theme; +mod players; mod registry; mod scale; mod settings; @@ -14,6 +15,7 @@ use ::settings::Settings; pub use colors::*; pub use default_colors::*; pub use default_theme::*; +pub use players::*; pub use registry::*; pub use scale::*; pub use settings::*; @@ -120,3 +122,8 @@ pub struct DiagnosticStyle { pub hint: Hsla, pub ignored: Hsla, } + +#[cfg(feature = "stories")] +mod story; +#[cfg(feature = "stories")] +pub use story::*; From 0dd6ea6d411aaa86e2978e344d34defbb42c6be1 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 7 Nov 2023 21:51:12 -0500 Subject: [PATCH 084/110] Add new default player colors and the players story. --- crates/theme2/src/players.rs | 144 +++++++++++++++++++++++++++-------- 1 file changed, 114 insertions(+), 30 deletions(-) diff --git a/crates/theme2/src/players.rs b/crates/theme2/src/players.rs index 6f7a20980c11e8415131e192582ecbf8280b7685..0e36ff594732c67ac7f1fd455e849aa259084bc7 100644 --- a/crates/theme2/src/players.rs +++ b/crates/theme2/src/players.rs @@ -40,7 +40,7 @@ pub use stories::*; mod stories { use super::*; use crate::{ActiveTheme, Story}; - use gpui::{div, Div, ParentElement, Render, Styled, ViewContext}; + use gpui::{div, img, px, Div, ParentElement, Render, Styled, ViewContext}; pub struct PlayerStory; @@ -48,39 +48,123 @@ mod stories { type Element = Div; fn render(&mut self, cx: &mut ViewContext) -> Self::Element { - Story::container(cx) - .child(Story::title_for::<_, PlayerColors>(cx)) - .child(Story::label(cx, "Player Colors")) - .child( - div() - .flex() - .flex_col() - .gap_1() - .child( - div().flex().gap_1().children( - cx.theme() - .players() - .0 - .clone() - .iter_mut() - .map(|color| div().w_8().h_8().rounded_md().bg(color.cursor)), - ), - ) - .child( - div().flex().gap_1().children( - cx.theme().players().0.clone().iter_mut().map(|color| { - div().w_8().h_8().rounded_md().bg(color.background) + Story::container(cx).child( + div() + .flex() + .flex_col() + .gap_4() + .child(Story::title_for::<_, PlayerColors>(cx)) + .child(Story::label(cx, "Player Colors")) + .child( + div() + .flex() + .flex_col() + .gap_1() + .child( + div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div().w_8().h_8().rounded_md().bg(player.cursor) + }), + ), + ) + .child(div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div().w_8().h_8().rounded_md().bg(player.background) }), - ), - ) - .child( - div().flex().gap_1().children( - cx.theme().players().0.clone().iter_mut().map(|color| { - div().w_8().h_8().rounded_md().bg(color.selection) + )) + .child(div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div().w_8().h_8().rounded_md().bg(player.selection) }), + )), + ) + .child(Story::label(cx, "Avatar Rings")) + .child(div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div() + .my_1() + .rounded_full() + .border_2() + .border_color(player.cursor) + .child( + img() + .rounded_full() + .uri("https://avatars.githubusercontent.com/u/1714999?v=4") + .size_6() + .bg(gpui::red()), + ) + }), + )) + .child(Story::label(cx, "Player Backgrounds")) + .child(div().flex().gap_1().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div() + .my_1() + .rounded_xl() + .flex() + .items_center() + .h_8() + .py_0p5() + .px_1p5() + .bg(player.background) + .child( + div().relative().neg_mx_1().rounded_full().z_index(3) + .border_2() + .border_color(player.background) + .size(px(28.)) + .child( + img() + .rounded_full() + .uri("https://avatars.githubusercontent.com/u/1714999?v=4") + .size(px(24.)) + .bg(gpui::red()), + ), + ).child( + div().relative().neg_mx_1().rounded_full().z_index(2) + .border_2() + .border_color(player.background) + .size(px(28.)) + .child( + img() + .rounded_full() + .uri("https://avatars.githubusercontent.com/u/1714999?v=4") + .size(px(24.)) + .bg(gpui::red()), ), + ).child( + div().relative().neg_mx_1().rounded_full().z_index(1) + .border_2() + .border_color(player.background) + .size(px(28.)) + .child( + img() + .rounded_full() + .uri("https://avatars.githubusercontent.com/u/1714999?v=4") + .size(px(24.)) + .bg(gpui::red()), ), - ) + ) + }), + )) + .child(Story::label(cx, "Player Selections")) + .child(div().flex().flex_col().gap_px().children( + cx.theme().players().0.clone().iter_mut().map(|player| { + div() + .flex() + .child( + div() + .flex() + .flex_none() + .rounded_sm() + .px_0p5() + .text_color(cx.theme().colors().text) + .bg(player.selection) + .child("The brown fox jumped over the lazy dog."), + ) + .child(div().flex_1()) + }), + )), + ) } } } From 80630cd4d900275ad626f41517898b617e79ee12 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Nov 2023 20:23:02 -0700 Subject: [PATCH 085/110] WIP --- crates/gpui2/src/action.rs | 24 ++++++++++++++++ crates/gpui2/src/gpui2.rs | 1 + crates/gpui2_macros/src/action.rs | 30 ++++++++++++++++++++ crates/gpui2_macros/src/gpui2_macros.rs | 6 ++++ crates/gpui2_macros/src/register_action.rs | 32 ++++++++++++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 crates/gpui2_macros/src/action.rs create mode 100644 crates/gpui2_macros/src/register_action.rs diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 90f312f502ca60d011c7c40c1dac60a1a5427bef..289d858c62a8d246fba18561f606dcf36ec26eac 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -1,6 +1,8 @@ use crate::SharedString; use anyhow::{anyhow, Context, Result}; use collections::{HashMap, HashSet}; +use ctor::ctor; +use parking_lot::Mutex; use serde::Deserialize; use std::any::{type_name, Any}; @@ -17,17 +19,38 @@ pub trait Action: std::fmt::Debug + 'static { fn as_any(&self) -> &dyn Any; } +type ActionBuilder = fn(json: Option) -> anyhow::Result>; + +#[ctor] +static ACTION_BUILDERS: Mutex> = Mutex::default(); + +/// Register an action type to allow it to be referenced in keymaps. +pub fn register_action() { + ACTION_BUILDERS.lock().insert(A::qualified_name(), A::build); +} + +/// Construct an action based on its name and optional JSON parameters sourced from the keymap. +pub fn build_action(name: &str, params: Option) -> Result> { + let lock = &ACTION_BUILDERS.lock(); + let build_action = lock + .get(name) + .ok_or_else(|| anyhow!("no action type registered for {}", name))?; + (build_action)(params) +} + // actions defines structs that can be used as actions. #[macro_export] macro_rules! actions { () => {}; ( $name:ident ) => { + #[gpui::register_action] #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] pub struct $name; }; ( $name:ident { $($token:tt)* } ) => { + #[gpui::register_action] #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] pub struct $name { $($token)* } }; @@ -317,6 +340,7 @@ fn skip_whitespace(source: &str) -> &str { #[cfg(test)] mod tests { use super::*; + use crate as gpui; use DispatchContextPredicate::*; #[test] diff --git a/crates/gpui2/src/gpui2.rs b/crates/gpui2/src/gpui2.rs index 348da17356dd3f48d1a507cfcb0c8d19a4413d2b..4441c9565fe7af5668816e6137b7aa0151439592 100644 --- a/crates/gpui2/src/gpui2.rs +++ b/crates/gpui2/src/gpui2.rs @@ -36,6 +36,7 @@ pub use anyhow::Result; pub use app::*; pub use assets::*; pub use color::*; +pub use ctor::ctor; pub use element::*; pub use elements::*; pub use executor::*; diff --git a/crates/gpui2_macros/src/action.rs b/crates/gpui2_macros/src/action.rs new file mode 100644 index 0000000000000000000000000000000000000000..9a8ec0d8b09d82d85a9faa1d6664a44482612822 --- /dev/null +++ b/crates/gpui2_macros/src/action.rs @@ -0,0 +1,30 @@ +// Input: +// +// #[action] +// struct Foo {} + +// Output: +// +// #[gpui::register_action] +// #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::default::Default, std::fmt::Debug)] +// struct Foo {} + +use proc_macro::TokenStream; +use quote::quote; +use syn::{parse_macro_input, DeriveInput}; + +pub fn action(_attr: TokenStream, item: TokenStream) -> TokenStream { + let input = parse_macro_input!(item as DeriveInput); + let name = &input.ident; + let data = &input.data; + + let data_tokens = quote! { #data }.into(); + + let expanded = quote! { + #[gpui::register_action] + #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::default::Default, std::fmt::Debug)] + struct #name { #data } + }; + + TokenStream::from(expanded) +} diff --git a/crates/gpui2_macros/src/gpui2_macros.rs b/crates/gpui2_macros/src/gpui2_macros.rs index 2e0c0547f79e29f1e3bcc5bfcc43cfed516f7df9..d1271ad041cce5ffe4f8e758e394c9710cefd6b1 100644 --- a/crates/gpui2_macros/src/gpui2_macros.rs +++ b/crates/gpui2_macros/src/gpui2_macros.rs @@ -1,6 +1,7 @@ use proc_macro::TokenStream; mod derive_component; +mod register_action; mod style_helpers; mod test; @@ -9,6 +10,11 @@ pub fn style_helpers(args: TokenStream) -> TokenStream { style_helpers::style_helpers(args) } +#[proc_macro_attribute] +pub fn register_action(attr: TokenStream, item: TokenStream) -> TokenStream { + register_action::register_action(attr, item) +} + #[proc_macro_derive(Component, attributes(component))] pub fn derive_component(input: TokenStream) -> TokenStream { derive_component::derive_component(input) diff --git a/crates/gpui2_macros/src/register_action.rs b/crates/gpui2_macros/src/register_action.rs new file mode 100644 index 0000000000000000000000000000000000000000..77516cdec8278edc28e011800795f17294e5c2ee --- /dev/null +++ b/crates/gpui2_macros/src/register_action.rs @@ -0,0 +1,32 @@ +// Input: +// +// struct Foo {} + +// Output: +// +// struct Foo {} +// +// #[allow(non_snake_case)] +// #[gpui2::ctor] +// fn register_Foo_builder() { +// gpui2::register_action_builder::() +// } +use proc_macro::TokenStream; +use quote::{format_ident, quote}; +use syn::{parse_macro_input, DeriveInput}; + +pub fn register_action(_attr: TokenStream, item: TokenStream) -> TokenStream { + let input = parse_macro_input!(item as DeriveInput); + let type_name = &input.ident; + let ctor_fn_name = format_ident!("register_{}_builder", type_name); + + let expanded = quote! { + #input + #[allow(non_snake_case)] + #[gpui::ctor] + fn #ctor_fn_name() { + gpui::register_action::<#type_name>() + } + }; + TokenStream::from(expanded) +} From 814e62050c89d340fe63a2e2033b1c455d7a97b3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Nov 2023 20:58:37 -0700 Subject: [PATCH 086/110] Register actions globally before main --- crates/client2/src/client2.rs | 3 - crates/editor2/src/editor.rs | 124 --------------------- crates/gpui2/src/action.rs | 30 ++++- crates/gpui2/src/app.rs | 31 +----- crates/gpui2_macros/src/register_action.rs | 6 +- crates/settings2/src/keymap_file.rs | 4 +- crates/storybook2/src/stories/focus.rs | 2 - crates/zed2/src/languages/json.rs | 2 +- 8 files changed, 33 insertions(+), 169 deletions(-) diff --git a/crates/client2/src/client2.rs b/crates/client2/src/client2.rs index 4a1c5f321c375a097a89252830bd17c572d0c648..93ec7f329bfab51f11d3689904cbc4d5edb62071 100644 --- a/crates/client2/src/client2.rs +++ b/crates/client2/src/client2.rs @@ -80,7 +80,6 @@ pub fn init(client: &Arc, cx: &mut AppContext) { init_settings(cx); let client = Arc::downgrade(client); - cx.register_action_type::(); cx.on_action({ let client = client.clone(); move |_: &SignIn, cx| { @@ -93,7 +92,6 @@ pub fn init(client: &Arc, cx: &mut AppContext) { } }); - cx.register_action_type::(); cx.on_action({ let client = client.clone(); move |_: &SignOut, cx| { @@ -106,7 +104,6 @@ pub fn init(client: &Arc, cx: &mut AppContext) { } }); - cx.register_action_type::(); cx.on_action({ let client = client.clone(); move |_: &Reconnect, cx| { diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 13afe8aebac141f9d202ab363cdae0ed0cb62f79..e7936b8ebc226a569775df417362f03818964753 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -406,130 +406,6 @@ pub fn init_settings(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) { init_settings(cx); - // cx.register_action_type(Editor::new_file); - // cx.register_action_type(Editor::new_file_in_direction); - // cx.register_action_type(Editor::cancel); - // cx.register_action_type(Editor::newline); - // cx.register_action_type(Editor::newline_above); - // cx.register_action_type(Editor::newline_below); - // cx.register_action_type(Editor::backspace); - // cx.register_action_type(Editor::delete); - // cx.register_action_type(Editor::tab); - // cx.register_action_type(Editor::tab_prev); - // cx.register_action_type(Editor::indent); - // cx.register_action_type(Editor::outdent); - // cx.register_action_type(Editor::delete_line); - // cx.register_action_type(Editor::join_lines); - // cx.register_action_type(Editor::sort_lines_case_sensitive); - // cx.register_action_type(Editor::sort_lines_case_insensitive); - // cx.register_action_type(Editor::reverse_lines); - // cx.register_action_type(Editor::shuffle_lines); - // cx.register_action_type(Editor::convert_to_upper_case); - // cx.register_action_type(Editor::convert_to_lower_case); - // cx.register_action_type(Editor::convert_to_title_case); - // cx.register_action_type(Editor::convert_to_snake_case); - // cx.register_action_type(Editor::convert_to_kebab_case); - // cx.register_action_type(Editor::convert_to_upper_camel_case); - // cx.register_action_type(Editor::convert_to_lower_camel_case); - // cx.register_action_type(Editor::delete_to_previous_word_start); - // cx.register_action_type(Editor::delete_to_previous_subword_start); - // cx.register_action_type(Editor::delete_to_next_word_end); - // cx.register_action_type(Editor::delete_to_next_subword_end); - // cx.register_action_type(Editor::delete_to_beginning_of_line); - // cx.register_action_type(Editor::delete_to_end_of_line); - // cx.register_action_type(Editor::cut_to_end_of_line); - // cx.register_action_type(Editor::duplicate_line); - // cx.register_action_type(Editor::move_line_up); - // cx.register_action_type(Editor::move_line_down); - // cx.register_action_type(Editor::transpose); - // cx.register_action_type(Editor::cut); - // cx.register_action_type(Editor::copy); - // cx.register_action_type(Editor::paste); - // cx.register_action_type(Editor::undo); - // cx.register_action_type(Editor::redo); - cx.register_action_type::(); - // cx.register_action_type(Editor::move_page_up); - cx.register_action_type::(); - // cx.register_action_type(Editor::move_page_down); - // cx.register_action_type(Editor::next_screen); - cx.register_action_type::(); - cx.register_action_type::(); - // cx.register_action_type(Editor::move_to_previous_word_start); - // cx.register_action_type(Editor::move_to_previous_subword_start); - // cx.register_action_type(Editor::move_to_next_word_end); - // cx.register_action_type(Editor::move_to_next_subword_end); - // cx.register_action_type(Editor::move_to_beginning_of_line); - // cx.register_action_type(Editor::move_to_end_of_line); - // cx.register_action_type(Editor::move_to_start_of_paragraph); - // cx.register_action_type(Editor::move_to_end_of_paragraph); - // cx.register_action_type(Editor::move_to_beginning); - // cx.register_action_type(Editor::move_to_end); - // cx.register_action_type(Editor::select_up); - // cx.register_action_type(Editor::select_down); - // cx.register_action_type(Editor::select_left); - // cx.register_action_type(Editor::select_right); - // cx.register_action_type(Editor::select_to_previous_word_start); - // cx.register_action_type(Editor::select_to_previous_subword_start); - // cx.register_action_type(Editor::select_to_next_word_end); - // cx.register_action_type(Editor::select_to_next_subword_end); - // cx.register_action_type(Editor::select_to_beginning_of_line); - // cx.register_action_type(Editor::select_to_end_of_line); - // cx.register_action_type(Editor::select_to_start_of_paragraph); - // cx.register_action_type(Editor::select_to_end_of_paragraph); - // cx.register_action_type(Editor::select_to_beginning); - // cx.register_action_type(Editor::select_to_end); - // cx.register_action_type(Editor::select_all); - // cx.register_action_type(Editor::select_all_matches); - // cx.register_action_type(Editor::select_line); - // cx.register_action_type(Editor::split_selection_into_lines); - // cx.register_action_type(Editor::add_selection_above); - // cx.register_action_type(Editor::add_selection_below); - // cx.register_action_type(Editor::select_next); - // cx.register_action_type(Editor::select_previous); - // cx.register_action_type(Editor::toggle_comments); - // cx.register_action_type(Editor::select_larger_syntax_node); - // cx.register_action_type(Editor::select_smaller_syntax_node); - // cx.register_action_type(Editor::move_to_enclosing_bracket); - // cx.register_action_type(Editor::undo_selection); - // cx.register_action_type(Editor::redo_selection); - // cx.register_action_type(Editor::go_to_diagnostic); - // cx.register_action_type(Editor::go_to_prev_diagnostic); - // cx.register_action_type(Editor::go_to_hunk); - // cx.register_action_type(Editor::go_to_prev_hunk); - // cx.register_action_type(Editor::go_to_definition); - // cx.register_action_type(Editor::go_to_definition_split); - // cx.register_action_type(Editor::go_to_type_definition); - // cx.register_action_type(Editor::go_to_type_definition_split); - // cx.register_action_type(Editor::fold); - // cx.register_action_type(Editor::fold_at); - // cx.register_action_type(Editor::unfold_lines); - // cx.register_action_type(Editor::unfold_at); - // cx.register_action_type(Editor::gutter_hover); - // cx.register_action_type(Editor::fold_selected_ranges); - // cx.register_action_type(Editor::show_completions); - // cx.register_action_type(Editor::toggle_code_actions); - // cx.register_action_type(Editor::open_excerpts); - // cx.register_action_type(Editor::toggle_soft_wrap); - // cx.register_action_type(Editor::toggle_inlay_hints); - // cx.register_action_type(Editor::reveal_in_finder); - // cx.register_action_type(Editor::copy_path); - // cx.register_action_type(Editor::copy_relative_path); - // cx.register_action_type(Editor::copy_highlight_json); - // cx.add_async_action(Editor::format); - // cx.register_action_type(Editor::restart_language_server); - // cx.register_action_type(Editor::show_character_palette); - // cx.add_async_action(Editor::confirm_completion); - // cx.add_async_action(Editor::confirm_code_action); - // cx.add_async_action(Editor::rename); - // cx.add_async_action(Editor::confirm_rename); - // cx.add_async_action(Editor::find_all_references); - // cx.register_action_type(Editor::next_copilot_suggestion); - // cx.register_action_type(Editor::previous_copilot_suggestion); - // cx.register_action_type(Editor::copilot_suggest); - // cx.register_action_type(Editor::context_menu_first); - // cx.register_action_type(Editor::context_menu_prev); - // cx.register_action_type(Editor::context_menu_next); - // cx.register_action_type(Editor::context_menu_last); hover_popover::init(cx); scroll::actions::init(cx); diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 289d858c62a8d246fba18561f606dcf36ec26eac..ba4ed077f22f7aa1e17e8ca66359fafe32fb57a3 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -1,8 +1,8 @@ use crate::SharedString; use anyhow::{anyhow, Context, Result}; use collections::{HashMap, HashSet}; -use ctor::ctor; -use parking_lot::Mutex; +use lazy_static::lazy_static; +use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard}; use serde::Deserialize; use std::any::{type_name, Any}; @@ -21,23 +21,41 @@ pub trait Action: std::fmt::Debug + 'static { type ActionBuilder = fn(json: Option) -> anyhow::Result>; -#[ctor] -static ACTION_BUILDERS: Mutex> = Mutex::default(); +lazy_static! { + static ref ACTION_REGISTRY: RwLock = RwLock::default(); +} + +#[derive(Default)] +struct ActionRegistry { + builders_by_name: HashMap, + all_names: Vec, // So we can return a static slice. +} /// Register an action type to allow it to be referenced in keymaps. pub fn register_action() { - ACTION_BUILDERS.lock().insert(A::qualified_name(), A::build); + let name = A::qualified_name(); + let mut lock = ACTION_REGISTRY.write(); + lock.builders_by_name.insert(name.clone(), A::build); + lock.all_names.push(name); } /// Construct an action based on its name and optional JSON parameters sourced from the keymap. pub fn build_action(name: &str, params: Option) -> Result> { - let lock = &ACTION_BUILDERS.lock(); + let lock = ACTION_REGISTRY.read(); let build_action = lock + .builders_by_name .get(name) .ok_or_else(|| anyhow!("no action type registered for {}", name))?; (build_action)(params) } +pub fn all_action_names() -> MappedRwLockReadGuard<'static, [SharedString]> { + let lock = ACTION_REGISTRY.read(); + RwLockReadGuard::map(lock, |registry: &ActionRegistry| { + registry.all_names.as_slice() + }) +} + // actions defines structs that can be used as actions. #[macro_export] macro_rules! actions { diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs index 63d2143a6726773be7508c77c72bdd6b1052fe3d..0267f4723686bcf5c60e52da09e079f5ac7393b5 100644 --- a/crates/gpui2/src/app.rs +++ b/crates/gpui2/src/app.rs @@ -17,9 +17,9 @@ use crate::{ current_platform, image_cache::ImageCache, Action, AnyBox, AnyView, AnyWindowHandle, AppMetadata, AssetSource, BackgroundExecutor, ClipboardItem, Context, DispatchPhase, DisplayId, Entity, FocusEvent, FocusHandle, FocusId, ForegroundExecutor, KeyBinding, Keymap, LayoutId, - PathPromptOptions, Pixels, Platform, PlatformDisplay, Point, Render, SharedString, - SubscriberSet, Subscription, SvgRenderer, Task, TextStyle, TextStyleRefinement, TextSystem, - View, Window, WindowContext, WindowHandle, WindowId, + PathPromptOptions, Pixels, Platform, PlatformDisplay, Point, Render, SubscriberSet, + Subscription, SvgRenderer, Task, TextStyle, TextStyleRefinement, TextSystem, View, Window, + WindowContext, WindowHandle, WindowId, }; use anyhow::{anyhow, Result}; use collections::{HashMap, HashSet, VecDeque}; @@ -140,7 +140,6 @@ impl App { } } -type ActionBuilder = fn(json: Option) -> anyhow::Result>; pub(crate) type FrameCallback = Box; type Handler = Box bool + 'static>; type Listener = Box bool + 'static>; @@ -176,7 +175,6 @@ pub struct AppContext { pub(crate) keymap: Arc>, pub(crate) global_action_listeners: HashMap>>, - action_builders: HashMap, pending_effects: VecDeque, pub(crate) pending_notifications: HashSet, pub(crate) pending_global_notifications: HashSet, @@ -234,7 +232,6 @@ impl AppContext { windows: SlotMap::with_key(), keymap: Arc::new(Mutex::new(Keymap::default())), global_action_listeners: HashMap::default(), - action_builders: HashMap::default(), pending_effects: VecDeque::new(), pending_notifications: HashSet::default(), pending_global_notifications: HashSet::default(), @@ -695,10 +692,6 @@ impl AppContext { ) } - pub fn all_action_names<'a>(&'a self) -> impl Iterator + 'a { - self.action_builders.keys().cloned() - } - /// Move the global of the given type to the stack. pub(crate) fn lease_global(&mut self) -> GlobalLease { GlobalLease::new( @@ -761,24 +754,6 @@ impl AppContext { })); } - /// Register an action type to allow it to be referenced in keymaps. - pub fn register_action_type(&mut self) { - self.action_builders.insert(A::qualified_name(), A::build); - } - - /// Construct an action based on its name and parameters. - pub fn build_action( - &mut self, - name: &str, - params: Option, - ) -> Result> { - let build = self - .action_builders - .get(name) - .ok_or_else(|| anyhow!("no action type registered for {}", name))?; - (build)(params) - } - /// Event handlers propagate events by default. Call this method to stop dispatching to /// event handlers with a lower z-index (mouse) or higher in the tree (keyboard). This is /// the opposite of [propagate]. It's also possible to cancel a call to [propagate] by diff --git a/crates/gpui2_macros/src/register_action.rs b/crates/gpui2_macros/src/register_action.rs index 77516cdec8278edc28e011800795f17294e5c2ee..ab00daf4773a620200d2edd8129dd666a233bfde 100644 --- a/crates/gpui2_macros/src/register_action.rs +++ b/crates/gpui2_macros/src/register_action.rs @@ -1,14 +1,14 @@ // Input: // -// struct Foo {} +// struct FooBar {} // Output: // -// struct Foo {} +// struct FooBar {} // // #[allow(non_snake_case)] // #[gpui2::ctor] -// fn register_Foo_builder() { +// fn register_foobar_builder() { // gpui2::register_action_builder::() // } use proc_macro::TokenStream; diff --git a/crates/settings2/src/keymap_file.rs b/crates/settings2/src/keymap_file.rs index e51bd76e5e0c9e0d86241a9c3bb816c90d0e1063..ec1f02a95d103a78f05a5f8f028f4ce5cc6b709a 100644 --- a/crates/settings2/src/keymap_file.rs +++ b/crates/settings2/src/keymap_file.rs @@ -73,9 +73,9 @@ impl KeymapFile { "Expected first item in array to be a string." ))); }; - cx.build_action(&name, Some(data)) + gpui::build_action(&name, Some(data)) } - Value::String(name) => cx.build_action(&name, None), + Value::String(name) => gpui::build_action(&name, None), Value::Null => Ok(no_action()), _ => { return Some(Err(anyhow!("Expected two-element array, got {action:?}"))) diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index 0f580d0cbf171ef32b2c83465ad8601785304227..57f9869859710bfd07967af6e8170c8048634124 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -15,8 +15,6 @@ impl FocusStory { KeyBinding::new("cmd-a", ActionB, Some("child-1")), KeyBinding::new("cmd-c", ActionC, None), ]); - cx.register_action_type::(); - cx.register_action_type::(); cx.build_view(move |cx| Self {}) } diff --git a/crates/zed2/src/languages/json.rs b/crates/zed2/src/languages/json.rs index 63f909ae2a2e264ea672dee48e305ba1be82e066..cf9b33d9683cadd9f5b27c41104d215becd1110d 100644 --- a/crates/zed2/src/languages/json.rs +++ b/crates/zed2/src/languages/json.rs @@ -107,7 +107,7 @@ impl LspAdapter for JsonLspAdapter { &self, cx: &mut AppContext, ) -> BoxFuture<'static, serde_json::Value> { - let action_names = cx.all_action_names().collect::>(); + let action_names = gpui::all_action_names(); let staff_mode = cx.is_staff(); let language_names = &self.languages.language_names(); let settings_schema = cx.global::().json_schema( From fdc9ea7f9b6d473f2d60768236475f66484d13ef Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Nov 2023 21:26:51 -0700 Subject: [PATCH 087/110] Docs and cleanup --- crates/editor2/src/editor.rs | 123 +++++++++++++++++++++++++++++++++++ crates/gpui2/src/action.rs | 118 ++++++++++++++++++++++----------- 2 files changed, 204 insertions(+), 37 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index e7936b8ebc226a569775df417362f03818964753..eaf91b089b0b5c14bcafda4ac98b730198635971 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -406,6 +406,129 @@ pub fn init_settings(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) { init_settings(cx); + // cx.register_action_type(Editor::new_file); + // cx.register_action_type(Editor::new_file_in_direction); + // cx.register_action_type(Editor::cancel); + // cx.register_action_type(Editor::newline); + // cx.register_action_type(Editor::newline_above); + // cx.register_action_type(Editor::newline_below); + // cx.register_action_type(Editor::backspace); + // cx.register_action_type(Editor::delete); + // cx.register_action_type(Editor::tab); + // cx.register_action_type(Editor::tab_prev); + // cx.register_action_type(Editor::indent); + // cx.register_action_type(Editor::outdent); + // cx.register_action_type(Editor::delete_line); + // cx.register_action_type(Editor::join_lines); + // cx.register_action_type(Editor::sort_lines_case_sensitive); + // cx.register_action_type(Editor::sort_lines_case_insensitive); + // cx.register_action_type(Editor::reverse_lines); + // cx.register_action_type(Editor::shuffle_lines); + // cx.register_action_type(Editor::convert_to_upper_case); + // cx.register_action_type(Editor::convert_to_lower_case); + // cx.register_action_type(Editor::convert_to_title_case); + // cx.register_action_type(Editor::convert_to_snake_case); + // cx.register_action_type(Editor::convert_to_kebab_case); + // cx.register_action_type(Editor::convert_to_upper_camel_case); + // cx.register_action_type(Editor::convert_to_lower_camel_case); + // cx.register_action_type(Editor::delete_to_previous_word_start); + // cx.register_action_type(Editor::delete_to_previous_subword_start); + // cx.register_action_type(Editor::delete_to_next_word_end); + // cx.register_action_type(Editor::delete_to_next_subword_end); + // cx.register_action_type(Editor::delete_to_beginning_of_line); + // cx.register_action_type(Editor::delete_to_end_of_line); + // cx.register_action_type(Editor::cut_to_end_of_line); + // cx.register_action_type(Editor::duplicate_line); + // cx.register_action_type(Editor::move_line_up); + // cx.register_action_type(Editor::move_line_down); + // cx.register_action_type(Editor::transpose); + // cx.register_action_type(Editor::cut); + // cx.register_action_type(Editor::copy); + // cx.register_action_type(Editor::paste); + // cx.register_action_type(Editor::undo); + // cx.register_action_type(Editor::redo); + // cx.register_action_type(Editor::move_page_up); + // cx.register_action_type::(); + // cx.register_action_type(Editor::move_page_down); + // cx.register_action_type(Editor::next_screen); + // cx.register_action_type::(); + // cx.register_action_type::(); + // cx.register_action_type(Editor::move_to_previous_word_start); + // cx.register_action_type(Editor::move_to_previous_subword_start); + // cx.register_action_type(Editor::move_to_next_word_end); + // cx.register_action_type(Editor::move_to_next_subword_end); + // cx.register_action_type(Editor::move_to_beginning_of_line); + // cx.register_action_type(Editor::move_to_end_of_line); + // cx.register_action_type(Editor::move_to_start_of_paragraph); + // cx.register_action_type(Editor::move_to_end_of_paragraph); + // cx.register_action_type(Editor::move_to_beginning); + // cx.register_action_type(Editor::move_to_end); + // cx.register_action_type(Editor::select_up); + // cx.register_action_type(Editor::select_down); + // cx.register_action_type(Editor::select_left); + // cx.register_action_type(Editor::select_right); + // cx.register_action_type(Editor::select_to_previous_word_start); + // cx.register_action_type(Editor::select_to_previous_subword_start); + // cx.register_action_type(Editor::select_to_next_word_end); + // cx.register_action_type(Editor::select_to_next_subword_end); + // cx.register_action_type(Editor::select_to_beginning_of_line); + // cx.register_action_type(Editor::select_to_end_of_line); + // cx.register_action_type(Editor::select_to_start_of_paragraph); + // cx.register_action_type(Editor::select_to_end_of_paragraph); + // cx.register_action_type(Editor::select_to_beginning); + // cx.register_action_type(Editor::select_to_end); + // cx.register_action_type(Editor::select_all); + // cx.register_action_type(Editor::select_all_matches); + // cx.register_action_type(Editor::select_line); + // cx.register_action_type(Editor::split_selection_into_lines); + // cx.register_action_type(Editor::add_selection_above); + // cx.register_action_type(Editor::add_selection_below); + // cx.register_action_type(Editor::select_next); + // cx.register_action_type(Editor::select_previous); + // cx.register_action_type(Editor::toggle_comments); + // cx.register_action_type(Editor::select_larger_syntax_node); + // cx.register_action_type(Editor::select_smaller_syntax_node); + // cx.register_action_type(Editor::move_to_enclosing_bracket); + // cx.register_action_type(Editor::undo_selection); + // cx.register_action_type(Editor::redo_selection); + // cx.register_action_type(Editor::go_to_diagnostic); + // cx.register_action_type(Editor::go_to_prev_diagnostic); + // cx.register_action_type(Editor::go_to_hunk); + // cx.register_action_type(Editor::go_to_prev_hunk); + // cx.register_action_type(Editor::go_to_definition); + // cx.register_action_type(Editor::go_to_definition_split); + // cx.register_action_type(Editor::go_to_type_definition); + // cx.register_action_type(Editor::go_to_type_definition_split); + // cx.register_action_type(Editor::fold); + // cx.register_action_type(Editor::fold_at); + // cx.register_action_type(Editor::unfold_lines); + // cx.register_action_type(Editor::unfold_at); + // cx.register_action_type(Editor::gutter_hover); + // cx.register_action_type(Editor::fold_selected_ranges); + // cx.register_action_type(Editor::show_completions); + // cx.register_action_type(Editor::toggle_code_actions); + // cx.register_action_type(Editor::open_excerpts); + // cx.register_action_type(Editor::toggle_soft_wrap); + // cx.register_action_type(Editor::toggle_inlay_hints); + // cx.register_action_type(Editor::reveal_in_finder); + // cx.register_action_type(Editor::copy_path); + // cx.register_action_type(Editor::copy_relative_path); + // cx.register_action_type(Editor::copy_highlight_json); + // cx.add_async_action(Editor::format); + // cx.register_action_type(Editor::restart_language_server); + // cx.register_action_type(Editor::show_character_palette); + // cx.add_async_action(Editor::confirm_completion); + // cx.add_async_action(Editor::confirm_code_action); + // cx.add_async_action(Editor::rename); + // cx.add_async_action(Editor::confirm_rename); + // cx.add_async_action(Editor::find_all_references); + // cx.register_action_type(Editor::next_copilot_suggestion); + // cx.register_action_type(Editor::previous_copilot_suggestion); + // cx.register_action_type(Editor::copilot_suggest); + // cx.register_action_type(Editor::context_menu_first); + // cx.register_action_type(Editor::context_menu_prev); + // cx.register_action_type(Editor::context_menu_next); + // cx.register_action_type(Editor::context_menu_last); hover_popover::init(cx); scroll::actions::init(cx); diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index ba4ed077f22f7aa1e17e8ca66359fafe32fb57a3..6e0bcedf4de1b76ac73ccd05c449aa9cfaca2517 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -6,6 +6,49 @@ use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard}; use serde::Deserialize; use std::any::{type_name, Any}; +/// Actions are used to implement keyboard-driven UI. +/// When you declare an action, you can bind keys to the action in the keymap and +/// listeners for that action in the element tree. +/// +/// To declare a list of simple actions, you can use the actions! macro, which defines a simple unit struct +/// action for each listed action name. +/// ```rust +/// actions!(MoveUp, MoveDown, MoveLeft, MoveRight, Newline); +/// ``` +/// More complex data types can also be actions. If you annotate your type with the `#[action]` proc macro, +/// it will automatically +/// ``` +/// #[action] +/// pub struct SelectNext { +/// pub replace_newest: bool, +/// } +/// +/// Any type A that satisfies the following bounds is automatically an action: +/// +/// ``` +/// A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + std::fmt::Debug + 'static, +/// ``` +/// +/// The `#[action]` annotation will derive these implementations for your struct automatically. If you +/// want to control them manually, you can use the lower-level `#[register_action]` macro, which only +/// generates the code needed to register your action before `main`. Then you'll need to implement all +/// the traits manually. +/// +/// ``` +/// #[gpui::register_action] +/// #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::fmt::Debug)] +/// pub struct Paste { +/// pub content: SharedString, +/// } +/// +/// impl std::default::Default for Paste { +/// fn default() -> Self { +/// Self { +/// content: SharedString::from("🍝"), +/// } +/// } +/// } +/// ``` pub trait Action: std::fmt::Debug + 'static { fn qualified_name() -> SharedString where @@ -19,6 +62,44 @@ pub trait Action: std::fmt::Debug + 'static { fn as_any(&self) -> &dyn Any; } +// Types become actions by satisfying a list of trait bounds. +impl Action for A +where + A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + std::fmt::Debug + 'static, +{ + fn qualified_name() -> SharedString { + // todo!() remove the 2 replacement when migration is done + type_name::().replace("2::", "::").into() + } + + fn build(params: Option) -> Result> + where + Self: Sized, + { + let action = if let Some(params) = params { + serde_json::from_value(params).context("failed to deserialize action")? + } else { + Self::default() + }; + Ok(Box::new(action)) + } + + fn partial_eq(&self, action: &dyn Action) -> bool { + action + .as_any() + .downcast_ref::() + .map_or(false, |a| self == a) + } + + fn boxed_clone(&self) -> Box { + Box::new(self.clone()) + } + + fn as_any(&self) -> &dyn Any { + self + } +} + type ActionBuilder = fn(json: Option) -> anyhow::Result>; lazy_static! { @@ -84,43 +165,6 @@ macro_rules! actions { }; } -impl Action for A -where - A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + std::fmt::Debug + 'static, -{ - fn qualified_name() -> SharedString { - // todo!() remove the 2 replacement when migration is done - type_name::().replace("2::", "::").into() - } - - fn build(params: Option) -> Result> - where - Self: Sized, - { - let action = if let Some(params) = params { - serde_json::from_value(params).context("failed to deserialize action")? - } else { - Self::default() - }; - Ok(Box::new(action)) - } - - fn partial_eq(&self, action: &dyn Action) -> bool { - action - .as_any() - .downcast_ref::() - .map_or(false, |a| self == a) - } - - fn boxed_clone(&self) -> Box { - Box::new(self.clone()) - } - - fn as_any(&self) -> &dyn Any { - self - } -} - #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct DispatchContext { set: HashSet, From 2a55b0dbfbd1e691b71d25bb7a3fc69c3e1d80cc Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Nov 2023 21:48:47 -0700 Subject: [PATCH 088/110] Simplify actions macro. --- crates/gpui2/src/action.rs | 20 ++++--------- crates/gpui2_macros/src/action.rs | 40 ++++++++++++++++++++----- crates/gpui2_macros/src/gpui2_macros.rs | 10 +++++-- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs index 6e0bcedf4de1b76ac73ccd05c449aa9cfaca2517..4d89ba1826e03a75a71b2fbd27018b511d784a02 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -137,7 +137,8 @@ pub fn all_action_names() -> MappedRwLockReadGuard<'static, [SharedString]> { }) } -// actions defines structs that can be used as actions. +/// Defines unit structs that can be used as actions. +/// To use more complex data types as actions, annotate your type with the #[action] macro. #[macro_export] macro_rules! actions { () => {}; @@ -148,21 +149,10 @@ macro_rules! actions { pub struct $name; }; - ( $name:ident { $($token:tt)* } ) => { - #[gpui::register_action] - #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug, ::std::cmp::PartialEq, $crate::serde::Deserialize)] - pub struct $name { $($token)* } - }; - ( $name:ident, $($rest:tt)* ) => { actions!($name); actions!($($rest)*); }; - - ( $name:ident { $($token:tt)* }, $($rest:tt)* ) => { - actions!($name { $($token)* }); - actions!($($rest)*); - }; } #[derive(Clone, Debug, Default, Eq, PartialEq)] @@ -408,17 +398,17 @@ mod tests { #[test] fn test_actions_definition() { { - actions!(A, B { field: i32 }, C, D, E, F {}, G); + actions!(A, B, C, D, E, F, G); } { actions!( A, - B { field: i32 }, + B, C, D, E, - F {}, + F, G, // Don't wrap, test the trailing comma ); } diff --git a/crates/gpui2_macros/src/action.rs b/crates/gpui2_macros/src/action.rs index 9a8ec0d8b09d82d85a9faa1d6664a44482612822..e4f54e58d5c601561925be05e962626dd5fd5d64 100644 --- a/crates/gpui2_macros/src/action.rs +++ b/crates/gpui2_macros/src/action.rs @@ -1,13 +1,17 @@ // Input: // // #[action] -// struct Foo {} +// struct Foo { +// bar: String, +// } // Output: // // #[gpui::register_action] // #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::default::Default, std::fmt::Debug)] -// struct Foo {} +// struct Foo { +// bar: String, +// } use proc_macro::TokenStream; use quote::quote; @@ -16,15 +20,35 @@ use syn::{parse_macro_input, DeriveInput}; pub fn action(_attr: TokenStream, item: TokenStream) -> TokenStream { let input = parse_macro_input!(item as DeriveInput); let name = &input.ident; - let data = &input.data; + let attrs = input + .attrs + .into_iter() + .filter(|attr| !attr.path.is_ident("action")) + .collect::>(); - let data_tokens = quote! { #data }.into(); - - let expanded = quote! { + let attributes = quote! { #[gpui::register_action] #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::default::Default, std::fmt::Debug)] - struct #name { #data } + #(#attrs)* + }; + + let output = match input.data { + syn::Data::Struct(ref struct_data) => { + let fields = &struct_data.fields; + quote! { + #attributes + struct #name { #fields } + } + } + syn::Data::Enum(ref enum_data) => { + let variants = &enum_data.variants; + quote! { + #attributes + enum #name { #variants } + } + } + _ => panic!("Expected a struct or an enum."), }; - TokenStream::from(expanded) + TokenStream::from(output) } diff --git a/crates/gpui2_macros/src/gpui2_macros.rs b/crates/gpui2_macros/src/gpui2_macros.rs index d1271ad041cce5ffe4f8e758e394c9710cefd6b1..80b67e1a12393d76d1ecffc5a342dc8eaefacc40 100644 --- a/crates/gpui2_macros/src/gpui2_macros.rs +++ b/crates/gpui2_macros/src/gpui2_macros.rs @@ -1,15 +1,21 @@ -use proc_macro::TokenStream; - +mod action; mod derive_component; mod register_action; mod style_helpers; mod test; +use proc_macro::TokenStream; + #[proc_macro] pub fn style_helpers(args: TokenStream) -> TokenStream { style_helpers::style_helpers(args) } +#[proc_macro_attribute] +pub fn action(attr: TokenStream, item: TokenStream) -> TokenStream { + action::action(attr, item) +} + #[proc_macro_attribute] pub fn register_action(attr: TokenStream, item: TokenStream) -> TokenStream { register_action::register_action(attr, item) From 408edaae399123bd51e4399d3192b33d5a905aa7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Nov 2023 21:58:46 -0700 Subject: [PATCH 089/110] Remove call to removed method --- crates/go_to_line2/src/go_to_line.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/go_to_line2/src/go_to_line.rs b/crates/go_to_line2/src/go_to_line.rs index 13d283ecff245abb11bafd75cabca94ac79e80dc..b8b91b16468c0e97e25946c3e24be5a9e062dd21 100644 --- a/crates/go_to_line2/src/go_to_line.rs +++ b/crates/go_to_line2/src/go_to_line.rs @@ -4,7 +4,6 @@ use workspace::ModalRegistry; actions!(Toggle); pub fn init(cx: &mut AppContext) { - cx.register_action_type::(); cx.global_mut::() .register_modal(Toggle, |_, cx| { // if let Some(editor) = workspace From 8ac8a6f1d95717cb457064c174b7276ee31238d1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 11:30:32 +0100 Subject: [PATCH 090/110] Re-enable most of the functionalities in editor2 --- crates/copilot2/src/copilot2.rs | 16 +- crates/editor2/src/editor.rs | 7342 ++++++++++--------- crates/editor2/src/element.rs | 152 +- crates/editor2/src/scroll.rs | 109 +- crates/editor2/src/scroll/actions.rs | 203 +- crates/editor2/src/selections_collection.rs | 66 +- crates/gpui2/src/window.rs | 4 + crates/gpui2_macros/src/action.rs | 5 +- crates/gpui2_macros/src/register_action.rs | 1 + 9 files changed, 4006 insertions(+), 3892 deletions(-) diff --git a/crates/copilot2/src/copilot2.rs b/crates/copilot2/src/copilot2.rs index ac52bf156d66fe52c1e1625b56195555a4db5a21..9e82823b9bcaee3ebeee7edf9c03a3d0a9486fb5 100644 --- a/crates/copilot2/src/copilot2.rs +++ b/crates/copilot2/src/copilot2.rs @@ -7,8 +7,8 @@ use async_tar::Archive; use collections::{HashMap, HashSet}; use futures::{channel::oneshot, future::Shared, Future, FutureExt, TryFutureExt}; use gpui::{ - AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Model, ModelContext, - Task, WeakModel, + actions, AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Model, + ModelContext, Task, WeakModel, }; use language::{ language_settings::{all_language_settings, language_settings}, @@ -34,19 +34,11 @@ use util::{ // todo!() // const COPILOT_AUTH_NAMESPACE: &'static str = "copilot_auth"; -// actions!(copilot_auth, [SignIn, SignOut]); +actions!(SignIn, SignOut); // todo!() // const COPILOT_NAMESPACE: &'static str = "copilot"; -// actions!( -// copilot, -// [Suggest, NextSuggestion, PreviousSuggestion, Reinstall] -// ); -// -pub struct Suggest; -pub struct NextSuggestion; -pub struct PreviousSuggestion; -pub struct Reinstall; +actions!(Suggest, NextSuggestion, PreviousSuggestion, Reinstall); pub fn init( new_server_id: LanguageServerId, diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index a37442be57edb41c7afcfef08d6c60b3a4c1f3c7..cfa615c321e869fdf326bfc723e881b218f6d0dc 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -20,12 +20,14 @@ pub mod selections_collection; mod editor_tests; #[cfg(any(test, feature = "test-support"))] pub mod test; +use ::git::diff::DiffHunk; use aho_corasick::AhoCorasick; use anyhow::{Context as _, Result}; use blink_manager::BlinkManager; use client::{ClickhouseEvent, Client, Collaborator, ParticipantIndex, TelemetrySettings}; use clock::ReplicaId; -use collections::{BTreeMap, HashMap, HashSet, VecDeque}; +use collections::{BTreeMap, Bound, HashMap, HashSet, VecDeque}; +use convert_case::{Case, Casing}; use copilot::Copilot; pub use display_map::DisplayPoint; use display_map::*; @@ -35,11 +37,13 @@ pub use element::{ }; use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; +use git::diff_hunk_to_display; use gpui::{ - actions, div, px, relative, AnyElement, AppContext, BackgroundExecutor, Context, - DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, FontWeight, - HighlightStyle, Hsla, InputHandler, Model, Pixels, PlatformInputHandler, Render, Styled, - Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, WindowContext, + action, actions, div, px, relative, AnyElement, AppContext, BackgroundExecutor, ClipboardItem, + Context, DispatchContext, Div, Element, Entity, EventEmitter, FocusHandle, FontStyle, + FontWeight, HighlightStyle, Hsla, InputHandler, Model, Pixels, PlatformInputHandler, Render, + Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext, WeakView, + WindowContext, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -50,8 +54,8 @@ pub use language::{char_kind, CharKind}; use language::{ language_settings::{self, all_language_settings, InlayHintSettings}, point_from_lsp, AutoindentMode, BracketPair, Buffer, CodeAction, Completion, CursorShape, - Diagnostic, Language, LanguageRegistry, LanguageServerName, OffsetRangeExt, Point, Selection, - SelectionGoal, TransactionId, + Diagnostic, IndentKind, IndentSize, Language, LanguageRegistry, LanguageServerName, + OffsetRangeExt, Point, Selection, SelectionGoal, TransactionId, }; use link_go_to_definition::{GoToDefinitionLink, InlayHighlight, LinkGoToDefinitionState}; use lsp::{DiagnosticSeverity, Documentation, LanguageServerId}; @@ -64,6 +68,7 @@ pub use multi_buffer::{ use ordered_float::OrderedFloat; use parking_lot::RwLock; use project::{FormatTrigger, Location, Project}; +use rand::prelude::*; use rpc::proto::*; use scroll::{ autoscroll::Autoscroll, OngoingScroll, ScrollAnchor, ScrollManager, ScrollbarAutoHide, @@ -72,11 +77,14 @@ use selections_collection::{resolve_multiple, MutableSelectionsCollection, Selec use serde::{Deserialize, Serialize}; use settings::{Settings, SettingsStore}; use smallvec::SmallVec; +use snippet::Snippet; use std::{ any::TypeId, borrow::Cow, cmp::{self, Ordering, Reverse}, - ops::{ControlFlow, Deref, DerefMut, Range}, + mem, + num::NonZeroU32, + ops::{ControlFlow, Deref, DerefMut, Range, RangeInclusive}, path::Path, sync::Arc, time::{Duration, Instant}, @@ -165,83 +173,83 @@ pub const FORMAT_TIMEOUT: Duration = Duration::from_secs(2); // // .with_soft_wrap(true) // } -#[derive(Clone, Deserialize, PartialEq, Default)] +#[action] pub struct SelectNext { #[serde(default)] pub replace_newest: bool, } -#[derive(Clone, Deserialize, PartialEq, Default)] +#[action] pub struct SelectPrevious { #[serde(default)] pub replace_newest: bool, } -#[derive(Clone, Deserialize, PartialEq, Default)] +#[action] pub struct SelectAllMatches { #[serde(default)] pub replace_newest: bool, } -#[derive(Clone, Deserialize, PartialEq)] +#[action] pub struct SelectToBeginningOfLine { #[serde(default)] stop_at_soft_wraps: bool, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct MovePageUp { #[serde(default)] center_cursor: bool, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct MovePageDown { #[serde(default)] center_cursor: bool, } -#[derive(Clone, Deserialize, PartialEq)] +#[action] pub struct SelectToEndOfLine { #[serde(default)] stop_at_soft_wraps: bool, } -#[derive(Clone, Deserialize, PartialEq)] +#[action] pub struct ToggleCodeActions { #[serde(default)] pub deployed_from_indicator: bool, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct ConfirmCompletion { #[serde(default)] pub item_ix: Option, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct ConfirmCodeAction { #[serde(default)] pub item_ix: Option, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct ToggleComments { #[serde(default)] pub advance_downwards: bool, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct FoldAt { pub buffer_row: u32, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct UnfoldAt { pub buffer_row: u32, } -#[derive(Clone, Default, Deserialize, PartialEq)] +#[action] pub struct GutterHover { pub hovered: bool, } @@ -262,113 +270,121 @@ impl InlayId { } actions!( - Cancel, + AddSelectionAbove, + AddSelectionBelow, Backspace, + Cancel, + ConfirmRename, + ContextMenuFirst, + ContextMenuLast, + ContextMenuNext, + ContextMenuPrev, + ConvertToKebabCase, + ConvertToLowerCamelCase, + ConvertToLowerCase, + ConvertToSnakeCase, + ConvertToTitleCase, + ConvertToUpperCamelCase, + ConvertToUpperCase, + Copy, + CopyHighlightJson, + CopyPath, + CopyRelativePath, + Cut, + CutToEndOfLine, Delete, - Newline, - NewlineAbove, - NewlineBelow, - GoToDiagnostic, - GoToPrevDiagnostic, - GoToHunk, - GoToPrevHunk, - Indent, - Outdent, DeleteLine, - DeleteToPreviousWordStart, - DeleteToPreviousSubwordStart, - DeleteToNextWordEnd, - DeleteToNextSubwordEnd, DeleteToBeginningOfLine, DeleteToEndOfLine, - CutToEndOfLine, + DeleteToNextSubwordEnd, + DeleteToNextWordEnd, + DeleteToPreviousSubwordStart, + DeleteToPreviousWordStart, DuplicateLine, - MoveLineUp, - MoveLineDown, + FindAllReferences, + Fold, + FoldSelectedRanges, + Format, + GoToDefinition, + GoToDefinitionSplit, + GoToDiagnostic, + GoToHunk, + GoToPrevDiagnostic, + GoToPrevHunk, + GoToTypeDefinition, + GoToTypeDefinitionSplit, + HalfPageDown, + HalfPageUp, + Hover, + Indent, JoinLines, - SortLinesCaseSensitive, - SortLinesCaseInsensitive, - ReverseLines, - ShuffleLines, - ConvertToUpperCase, - ConvertToLowerCase, - ConvertToTitleCase, - ConvertToSnakeCase, - ConvertToKebabCase, - ConvertToUpperCamelCase, - ConvertToLowerCamelCase, - Transpose, - Cut, - Copy, - Paste, - Undo, - Redo, - MoveUp, - PageUp, + LineDown, + LineUp, MoveDown, - PageDown, MoveLeft, + MoveLineDown, + MoveLineUp, MoveRight, - MoveToPreviousWordStart, - MoveToPreviousSubwordStart, - MoveToNextWordEnd, - MoveToNextSubwordEnd, + MoveToBeginning, MoveToBeginningOfLine, + MoveToEnclosingBracket, + MoveToEnd, MoveToEndOfLine, - MoveToStartOfParagraph, MoveToEndOfParagraph, - MoveToBeginning, - MoveToEnd, - SelectUp, + MoveToNextSubwordEnd, + MoveToNextWordEnd, + MoveToPreviousSubwordStart, + MoveToPreviousWordStart, + MoveToStartOfParagraph, + MoveUp, + Newline, + NewlineAbove, + NewlineBelow, + NextScreen, + OpenExcerpts, + Outdent, + PageDown, + PageUp, + Paste, + Redo, + RedoSelection, + Rename, + RestartLanguageServer, + RevealInFinder, + ReverseLines, + ScrollCursorBottom, + ScrollCursorCenter, + ScrollCursorTop, + SelectAll, SelectDown, + SelectLargerSyntaxNode, SelectLeft, + SelectLine, SelectRight, - SelectToPreviousWordStart, - SelectToPreviousSubwordStart, - SelectToNextWordEnd, - SelectToNextSubwordEnd, - SelectToStartOfParagraph, - SelectToEndOfParagraph, + SelectSmallerSyntaxNode, SelectToBeginning, SelectToEnd, - SelectAll, - SelectLine, + SelectToEndOfParagraph, + SelectToNextSubwordEnd, + SelectToNextWordEnd, + SelectToPreviousSubwordStart, + SelectToPreviousWordStart, + SelectToStartOfParagraph, + SelectUp, + ShowCharacterPalette, + ShowCompletions, + ShuffleLines, + SortLinesCaseInsensitive, + SortLinesCaseSensitive, SplitSelectionIntoLines, - AddSelectionAbove, - AddSelectionBelow, Tab, TabPrev, - ShowCharacterPalette, - SelectLargerSyntaxNode, - SelectSmallerSyntaxNode, - GoToDefinition, - GoToDefinitionSplit, - GoToTypeDefinition, - GoToTypeDefinitionSplit, - MoveToEnclosingBracket, + ToggleInlayHints, + ToggleSoftWrap, + Transpose, + Undo, UndoSelection, - RedoSelection, - FindAllReferences, - Rename, - ConfirmRename, - Fold, UnfoldLines, - FoldSelectedRanges, - ShowCompletions, - OpenExcerpts, - RestartLanguageServer, - Hover, - Format, - ToggleSoftWrap, - ToggleInlayHints, - RevealInFinder, - CopyPath, - CopyRelativePath, - CopyHighlightJson, - ContextMenuFirst, - ContextMenuPrev, - ContextMenuNext, - ContextMenuLast, ); // impl_actions!( @@ -532,7 +548,6 @@ pub fn init(cx: &mut AppContext) { // cx.register_action_type(Editor::context_menu_last); hover_popover::init(cx); - scroll::actions::init(cx); workspace::register_project_item::(cx); workspace::register_followable_item::(cx); @@ -988,7 +1003,7 @@ impl CompletionsMenu { project: Option>, cx: &mut ViewContext, ) { - todo!("implementation below "); + // todo!("implementation below "); } // ) { // let settings = EditorSettings::get_global(cx); @@ -1155,7 +1170,7 @@ impl CompletionsMenu { client: Arc, language_registry: Arc, ) { - todo!() + // todo!() // let request = proto::ResolveCompletionDocumentation { // project_id, // language_server_id: server_id.0 as u64, @@ -1199,7 +1214,7 @@ impl CompletionsMenu { completion: lsp::CompletionItem, language_registry: Arc, ) { - todo!() + // todo!() // let can_resolve = server // .capabilities() // .completion_provider @@ -2383,45 +2398,45 @@ impl Editor { .update(cx, |buffer, cx| buffer.edit(edits, None, cx)); } - // pub fn edit_with_autoindent(&mut self, edits: I, cx: &mut ViewContext) - // where - // I: IntoIterator, T)>, - // S: ToOffset, - // T: Into>, - // { - // if self.read_only { - // return; - // } + pub fn edit_with_autoindent(&mut self, edits: I, cx: &mut ViewContext) + where + I: IntoIterator, T)>, + S: ToOffset, + T: Into>, + { + if self.read_only { + return; + } - // self.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, self.autoindent_mode.clone(), cx) - // }); - // } + self.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, self.autoindent_mode.clone(), cx) + }); + } - // pub fn edit_with_block_indent( - // &mut self, - // edits: I, - // original_indent_columns: Vec, - // cx: &mut ViewContext, - // ) where - // I: IntoIterator, T)>, - // S: ToOffset, - // T: Into>, - // { - // if self.read_only { - // return; - // } + pub fn edit_with_block_indent( + &mut self, + edits: I, + original_indent_columns: Vec, + cx: &mut ViewContext, + ) where + I: IntoIterator, T)>, + S: ToOffset, + T: Into>, + { + if self.read_only { + return; + } - // self.buffer.update(cx, |buffer, cx| { - // buffer.edit( - // edits, - // Some(AutoindentMode::Block { - // original_indent_columns, - // }), - // cx, - // ) - // }); - // } + self.buffer.update(cx, |buffer, cx| { + buffer.edit( + edits, + Some(AutoindentMode::Block { + original_indent_columns, + }), + cx, + ) + }); + } fn select(&mut self, phase: SelectPhase, cx: &mut ViewContext) { self.hide_context_menu(cx); @@ -2734,40 +2749,40 @@ impl Editor { self.selections.pending_anchor().is_some() || self.columnar_selection_tail.is_some() } - // pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext) { - // if self.take_rename(false, cx).is_some() { - // return; - // } + pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext) { + if self.take_rename(false, cx).is_some() { + return; + } - // if hide_hover(self, cx) { - // return; - // } + if hide_hover(self, cx) { + return; + } - // if self.hide_context_menu(cx).is_some() { - // return; - // } + if self.hide_context_menu(cx).is_some() { + return; + } - // if self.discard_copilot_suggestion(cx) { - // return; - // } + if self.discard_copilot_suggestion(cx) { + return; + } - // if self.snippet_stack.pop().is_some() { - // return; - // } + if self.snippet_stack.pop().is_some() { + return; + } - // if self.mode == EditorMode::Full { - // if self.active_diagnostics.is_some() { - // self.dismiss_diagnostics(cx); - // return; - // } + if self.mode == EditorMode::Full { + if self.active_diagnostics.is_some() { + self.dismiss_diagnostics(cx); + return; + } - // if self.change_selections(Some(Autoscroll::fit()), cx, |s| s.try_cancel()) { - // return; - // } - // } + if self.change_selections(Some(Autoscroll::fit()), cx, |s| s.try_cancel()) { + return; + } + } - // cx.propagate(); - // } + cx.propagate(); + } pub fn handle_input(&mut self, text: &str, cx: &mut ViewContext) { let text: Arc = text.into(); @@ -2961,263 +2976,263 @@ impl Editor { }); } - // pub fn newline(&mut self, _: &Newline, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // let (edits, selection_fixup_info): (Vec<_>, Vec<_>) = { - // let selections = this.selections.all::(cx); - // let multi_buffer = this.buffer.read(cx); - // let buffer = multi_buffer.snapshot(cx); - // selections - // .iter() - // .map(|selection| { - // let start_point = selection.start.to_point(&buffer); - // let mut indent = buffer.indent_size_for_line(start_point.row); - // indent.len = cmp::min(indent.len, start_point.column); - // let start = selection.start; - // let end = selection.end; - // let is_cursor = start == end; - // let language_scope = buffer.language_scope_at(start); - // let (comment_delimiter, insert_extra_newline) = if let Some(language) = - // &language_scope - // { - // let leading_whitespace_len = buffer - // .reversed_chars_at(start) - // .take_while(|c| c.is_whitespace() && *c != '\n') - // .map(|c| c.len_utf8()) - // .sum::(); - - // let trailing_whitespace_len = buffer - // .chars_at(end) - // .take_while(|c| c.is_whitespace() && *c != '\n') - // .map(|c| c.len_utf8()) - // .sum::(); - - // let insert_extra_newline = - // language.brackets().any(|(pair, enabled)| { - // let pair_start = pair.start.trim_end(); - // let pair_end = pair.end.trim_start(); - - // enabled - // && pair.newline - // && buffer.contains_str_at( - // end + trailing_whitespace_len, - // pair_end, - // ) - // && buffer.contains_str_at( - // (start - leading_whitespace_len) - // .saturating_sub(pair_start.len()), - // pair_start, - // ) - // }); - // // Comment extension on newline is allowed only for cursor selections - // let comment_delimiter = language.line_comment_prefix().filter(|_| { - // let is_comment_extension_enabled = - // multi_buffer.settings_at(0, cx).extend_comment_on_newline; - // is_cursor && is_comment_extension_enabled - // }); - // let comment_delimiter = if let Some(delimiter) = comment_delimiter { - // buffer - // .buffer_line_for_row(start_point.row) - // .is_some_and(|(snapshot, range)| { - // let mut index_of_first_non_whitespace = 0; - // let line_starts_with_comment = snapshot - // .chars_for_range(range) - // .skip_while(|c| { - // let should_skip = c.is_whitespace(); - // if should_skip { - // index_of_first_non_whitespace += 1; - // } - // should_skip - // }) - // .take(delimiter.len()) - // .eq(delimiter.chars()); - // let cursor_is_placed_after_comment_marker = - // index_of_first_non_whitespace + delimiter.len() - // <= start_point.column as usize; - // line_starts_with_comment - // && cursor_is_placed_after_comment_marker - // }) - // .then(|| delimiter.clone()) - // } else { - // None - // }; - // (comment_delimiter, insert_extra_newline) - // } else { - // (None, false) - // }; - - // let capacity_for_delimiter = comment_delimiter - // .as_deref() - // .map(str::len) - // .unwrap_or_default(); - // let mut new_text = - // String::with_capacity(1 + capacity_for_delimiter + indent.len as usize); - // new_text.push_str("\n"); - // new_text.extend(indent.chars()); - // if let Some(delimiter) = &comment_delimiter { - // new_text.push_str(&delimiter); - // } - // if insert_extra_newline { - // new_text = new_text.repeat(2); - // } - - // let anchor = buffer.anchor_after(end); - // let new_selection = selection.map(|_| anchor); - // ( - // (start..end, new_text), - // (insert_extra_newline, new_selection), - // ) - // }) - // .unzip() - // }; + pub fn newline(&mut self, _: &Newline, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + let (edits, selection_fixup_info): (Vec<_>, Vec<_>) = { + let selections = this.selections.all::(cx); + let multi_buffer = this.buffer.read(cx); + let buffer = multi_buffer.snapshot(cx); + selections + .iter() + .map(|selection| { + let start_point = selection.start.to_point(&buffer); + let mut indent = buffer.indent_size_for_line(start_point.row); + indent.len = cmp::min(indent.len, start_point.column); + let start = selection.start; + let end = selection.end; + let is_cursor = start == end; + let language_scope = buffer.language_scope_at(start); + let (comment_delimiter, insert_extra_newline) = if let Some(language) = + &language_scope + { + let leading_whitespace_len = buffer + .reversed_chars_at(start) + .take_while(|c| c.is_whitespace() && *c != '\n') + .map(|c| c.len_utf8()) + .sum::(); + + let trailing_whitespace_len = buffer + .chars_at(end) + .take_while(|c| c.is_whitespace() && *c != '\n') + .map(|c| c.len_utf8()) + .sum::(); + + let insert_extra_newline = + language.brackets().any(|(pair, enabled)| { + let pair_start = pair.start.trim_end(); + let pair_end = pair.end.trim_start(); + + enabled + && pair.newline + && buffer.contains_str_at( + end + trailing_whitespace_len, + pair_end, + ) + && buffer.contains_str_at( + (start - leading_whitespace_len) + .saturating_sub(pair_start.len()), + pair_start, + ) + }); + // Comment extension on newline is allowed only for cursor selections + let comment_delimiter = language.line_comment_prefix().filter(|_| { + let is_comment_extension_enabled = + multi_buffer.settings_at(0, cx).extend_comment_on_newline; + is_cursor && is_comment_extension_enabled + }); + let comment_delimiter = if let Some(delimiter) = comment_delimiter { + buffer + .buffer_line_for_row(start_point.row) + .is_some_and(|(snapshot, range)| { + let mut index_of_first_non_whitespace = 0; + let line_starts_with_comment = snapshot + .chars_for_range(range) + .skip_while(|c| { + let should_skip = c.is_whitespace(); + if should_skip { + index_of_first_non_whitespace += 1; + } + should_skip + }) + .take(delimiter.len()) + .eq(delimiter.chars()); + let cursor_is_placed_after_comment_marker = + index_of_first_non_whitespace + delimiter.len() + <= start_point.column as usize; + line_starts_with_comment + && cursor_is_placed_after_comment_marker + }) + .then(|| delimiter.clone()) + } else { + None + }; + (comment_delimiter, insert_extra_newline) + } else { + (None, false) + }; + + let capacity_for_delimiter = comment_delimiter + .as_deref() + .map(str::len) + .unwrap_or_default(); + let mut new_text = + String::with_capacity(1 + capacity_for_delimiter + indent.len as usize); + new_text.push_str("\n"); + new_text.extend(indent.chars()); + if let Some(delimiter) = &comment_delimiter { + new_text.push_str(&delimiter); + } + if insert_extra_newline { + new_text = new_text.repeat(2); + } - // this.edit_with_autoindent(edits, cx); - // let buffer = this.buffer.read(cx).snapshot(cx); - // let new_selections = selection_fixup_info - // .into_iter() - // .map(|(extra_newline_inserted, new_selection)| { - // let mut cursor = new_selection.end.to_point(&buffer); - // if extra_newline_inserted { - // cursor.row -= 1; - // cursor.column = buffer.line_len(cursor.row); - // } - // new_selection.map(|_| cursor) - // }) - // .collect(); + let anchor = buffer.anchor_after(end); + let new_selection = selection.map(|_| anchor); + ( + (start..end, new_text), + (insert_extra_newline, new_selection), + ) + }) + .unzip() + }; - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } + this.edit_with_autoindent(edits, cx); + let buffer = this.buffer.read(cx).snapshot(cx); + let new_selections = selection_fixup_info + .into_iter() + .map(|(extra_newline_inserted, new_selection)| { + let mut cursor = new_selection.end.to_point(&buffer); + if extra_newline_inserted { + cursor.row -= 1; + cursor.column = buffer.line_len(cursor.row); + } + new_selection.map(|_| cursor) + }) + .collect(); - // pub fn newline_above(&mut self, _: &NewlineAbove, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); + this.refresh_copilot_suggestions(true, cx); + }); + } - // let mut edits = Vec::new(); - // let mut rows = Vec::new(); - // let mut rows_inserted = 0; + pub fn newline_above(&mut self, _: &NewlineAbove, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); - // for selection in self.selections.all_adjusted(cx) { - // let cursor = selection.head(); - // let row = cursor.row; + let mut edits = Vec::new(); + let mut rows = Vec::new(); + let mut rows_inserted = 0; - // let start_of_line = snapshot.clip_point(Point::new(row, 0), Bias::Left); + for selection in self.selections.all_adjusted(cx) { + let cursor = selection.head(); + let row = cursor.row; - // let newline = "\n".to_string(); - // edits.push((start_of_line..start_of_line, newline)); + let start_of_line = snapshot.clip_point(Point::new(row, 0), Bias::Left); - // rows.push(row + rows_inserted); - // rows_inserted += 1; - // } + let newline = "\n".to_string(); + edits.push((start_of_line..start_of_line, newline)); - // self.transact(cx, |editor, cx| { - // editor.edit(edits, cx); + rows.push(row + rows_inserted); + rows_inserted += 1; + } - // editor.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut index = 0; - // s.move_cursors_with(|map, _, _| { - // let row = rows[index]; - // index += 1; + self.transact(cx, |editor, cx| { + editor.edit(edits, cx); - // let point = Point::new(row, 0); - // let boundary = map.next_line_boundary(point).1; - // let clipped = map.clip_point(boundary, Bias::Left); + editor.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut index = 0; + s.move_cursors_with(|map, _, _| { + let row = rows[index]; + index += 1; - // (clipped, SelectionGoal::None) - // }); - // }); + let point = Point::new(row, 0); + let boundary = map.next_line_boundary(point).1; + let clipped = map.clip_point(boundary, Bias::Left); - // let mut indent_edits = Vec::new(); - // let multibuffer_snapshot = editor.buffer.read(cx).snapshot(cx); - // for row in rows { - // let indents = multibuffer_snapshot.suggested_indents(row..row + 1, cx); - // for (row, indent) in indents { - // if indent.len == 0 { - // continue; - // } + (clipped, SelectionGoal::None) + }); + }); - // let text = match indent.kind { - // IndentKind::Space => " ".repeat(indent.len as usize), - // IndentKind::Tab => "\t".repeat(indent.len as usize), - // }; - // let point = Point::new(row, 0); - // indent_edits.push((point..point, text)); - // } - // } - // editor.edit(indent_edits, cx); - // }); - // } + let mut indent_edits = Vec::new(); + let multibuffer_snapshot = editor.buffer.read(cx).snapshot(cx); + for row in rows { + let indents = multibuffer_snapshot.suggested_indents(row..row + 1, cx); + for (row, indent) in indents { + if indent.len == 0 { + continue; + } - // pub fn newline_below(&mut self, _: &NewlineBelow, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); + let text = match indent.kind { + IndentKind::Space => " ".repeat(indent.len as usize), + IndentKind::Tab => "\t".repeat(indent.len as usize), + }; + let point = Point::new(row, 0); + indent_edits.push((point..point, text)); + } + } + editor.edit(indent_edits, cx); + }); + } - // let mut edits = Vec::new(); - // let mut rows = Vec::new(); - // let mut rows_inserted = 0; + pub fn newline_below(&mut self, _: &NewlineBelow, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); - // for selection in self.selections.all_adjusted(cx) { - // let cursor = selection.head(); - // let row = cursor.row; + let mut edits = Vec::new(); + let mut rows = Vec::new(); + let mut rows_inserted = 0; - // let point = Point::new(row + 1, 0); - // let start_of_line = snapshot.clip_point(point, Bias::Left); + for selection in self.selections.all_adjusted(cx) { + let cursor = selection.head(); + let row = cursor.row; - // let newline = "\n".to_string(); - // edits.push((start_of_line..start_of_line, newline)); + let point = Point::new(row + 1, 0); + let start_of_line = snapshot.clip_point(point, Bias::Left); - // rows_inserted += 1; - // rows.push(row + rows_inserted); - // } + let newline = "\n".to_string(); + edits.push((start_of_line..start_of_line, newline)); - // self.transact(cx, |editor, cx| { - // editor.edit(edits, cx); + rows_inserted += 1; + rows.push(row + rows_inserted); + } - // editor.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut index = 0; - // s.move_cursors_with(|map, _, _| { - // let row = rows[index]; - // index += 1; + self.transact(cx, |editor, cx| { + editor.edit(edits, cx); - // let point = Point::new(row, 0); - // let boundary = map.next_line_boundary(point).1; - // let clipped = map.clip_point(boundary, Bias::Left); + editor.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut index = 0; + s.move_cursors_with(|map, _, _| { + let row = rows[index]; + index += 1; - // (clipped, SelectionGoal::None) - // }); - // }); + let point = Point::new(row, 0); + let boundary = map.next_line_boundary(point).1; + let clipped = map.clip_point(boundary, Bias::Left); - // let mut indent_edits = Vec::new(); - // let multibuffer_snapshot = editor.buffer.read(cx).snapshot(cx); - // for row in rows { - // let indents = multibuffer_snapshot.suggested_indents(row..row + 1, cx); - // for (row, indent) in indents { - // if indent.len == 0 { - // continue; - // } + (clipped, SelectionGoal::None) + }); + }); - // let text = match indent.kind { - // IndentKind::Space => " ".repeat(indent.len as usize), - // IndentKind::Tab => "\t".repeat(indent.len as usize), - // }; - // let point = Point::new(row, 0); - // indent_edits.push((point..point, text)); - // } - // } - // editor.edit(indent_edits, cx); - // }); - // } + let mut indent_edits = Vec::new(); + let multibuffer_snapshot = editor.buffer.read(cx).snapshot(cx); + for row in rows { + let indents = multibuffer_snapshot.suggested_indents(row..row + 1, cx); + for (row, indent) in indents { + if indent.len == 0 { + continue; + } - // pub fn insert(&mut self, text: &str, cx: &mut ViewContext) { - // self.insert_with_autoindent_mode( - // text, - // Some(AutoindentMode::Block { - // original_indent_columns: Vec::new(), - // }), - // cx, - // ); - // } + let text = match indent.kind { + IndentKind::Space => " ".repeat(indent.len as usize), + IndentKind::Tab => "\t".repeat(indent.len as usize), + }; + let point = Point::new(row, 0); + indent_edits.push((point..point, text)); + } + } + editor.edit(indent_edits, cx); + }); + } + + pub fn insert(&mut self, text: &str, cx: &mut ViewContext) { + self.insert_with_autoindent_mode( + text, + Some(AutoindentMode::Block { + original_indent_columns: Vec::new(), + }), + cx, + ); + } fn insert_with_autoindent_mode( &mut self, @@ -3276,34 +3291,34 @@ impl Editor { } } - // /// If any empty selections is touching the start of its innermost containing autoclose - // /// region, expand it to select the brackets. - // fn select_autoclose_pair(&mut self, cx: &mut ViewContext) { - // let selections = self.selections.all::(cx); - // let buffer = self.buffer.read(cx).read(cx); - // let mut new_selections = Vec::new(); - // for (mut selection, region) in self.selections_with_autoclose_regions(selections, &buffer) { - // if let (Some(region), true) = (region, selection.is_empty()) { - // let mut range = region.range.to_offset(&buffer); - // if selection.start == range.start { - // if range.start >= region.pair.start.len() { - // range.start -= region.pair.start.len(); - // if buffer.contains_str_at(range.start, ®ion.pair.start) { - // if buffer.contains_str_at(range.end, ®ion.pair.end) { - // range.end += region.pair.end.len(); - // selection.start = range.start; - // selection.end = range.end; - // } - // } - // } - // } - // } - // new_selections.push(selection); - // } + /// If any empty selections is touching the start of its innermost containing autoclose + /// region, expand it to select the brackets. + fn select_autoclose_pair(&mut self, cx: &mut ViewContext) { + let selections = self.selections.all::(cx); + let buffer = self.buffer.read(cx).read(cx); + let mut new_selections = Vec::new(); + for (mut selection, region) in self.selections_with_autoclose_regions(selections, &buffer) { + if let (Some(region), true) = (region, selection.is_empty()) { + let mut range = region.range.to_offset(&buffer); + if selection.start == range.start { + if range.start >= region.pair.start.len() { + range.start -= region.pair.start.len(); + if buffer.contains_str_at(range.start, ®ion.pair.start) { + if buffer.contains_str_at(range.end, ®ion.pair.end) { + range.end += region.pair.end.len(); + selection.start = range.start; + selection.end = range.end; + } + } + } + } + } + new_selections.push(selection); + } - // drop(buffer); - // self.change_selections(None, cx, |selections| selections.select(new_selections)); - // } + drop(buffer); + self.change_selections(None, cx, |selections| selections.select(new_selections)); + } /// Iterate the given selections, and for each one, find the smallest surrounding /// autoclose region. This uses the ordering of the selections and the autoclose @@ -3377,18 +3392,16 @@ impl Editor { } } - // pub fn toggle_inlay_hints(&mut self, _: &ToggleInlayHints, cx: &mut ViewContext) { - // todo!(); - // // self.refresh_inlay_hints( - // // InlayHintRefreshReason::Toggle(!self.inlay_hint_cache.enabled), - // // cx, - // // ); - // } + pub fn toggle_inlay_hints(&mut self, _: &ToggleInlayHints, cx: &mut ViewContext) { + self.refresh_inlay_hints( + InlayHintRefreshReason::Toggle(!self.inlay_hint_cache.enabled), + cx, + ); + } - // pub fn inlay_hints_enabled(&self) -> bool { - // todo!(); - // self.inlay_hint_cache.enabled - // } + pub fn inlay_hints_enabled(&self) -> bool { + self.inlay_hint_cache.enabled + } fn refresh_inlay_hints(&mut self, reason: InlayHintRefreshReason, cx: &mut ViewContext) { if self.project.is_none() || self.mode != EditorMode::Full { @@ -4225,8 +4238,7 @@ impl Editor { } else { let is_copilot_disabled = self.refresh_copilot_suggestions(false, cx).is_none(); if is_copilot_disabled { - todo!(); - // cx.propagate(); + cx.propagate(); } } } @@ -4241,8 +4253,7 @@ impl Editor { } else { let is_copilot_disabled = self.refresh_copilot_suggestions(false, cx).is_none(); if is_copilot_disabled { - todo!(); - // cx.propagate(); + cx.propagate(); } } } @@ -4499,1224 +4510,1224 @@ impl Editor { context_menu } - // pub fn insert_snippet( - // &mut self, - // insertion_ranges: &[Range], - // snippet: Snippet, - // cx: &mut ViewContext, - // ) -> Result<()> { - // let tabstops = self.buffer.update(cx, |buffer, cx| { - // let snippet_text: Arc = snippet.text.clone().into(); - // buffer.edit( - // insertion_ranges - // .iter() - // .cloned() - // .map(|range| (range, snippet_text.clone())), - // Some(AutoindentMode::EachLine), - // cx, - // ); - - // let snapshot = &*buffer.read(cx); - // let snippet = &snippet; - // snippet - // .tabstops - // .iter() - // .map(|tabstop| { - // let mut tabstop_ranges = tabstop - // .iter() - // .flat_map(|tabstop_range| { - // let mut delta = 0_isize; - // insertion_ranges.iter().map(move |insertion_range| { - // let insertion_start = insertion_range.start as isize + delta; - // delta += - // snippet.text.len() as isize - insertion_range.len() as isize; - - // let start = snapshot.anchor_before( - // (insertion_start + tabstop_range.start) as usize, - // ); - // let end = snapshot - // .anchor_after((insertion_start + tabstop_range.end) as usize); - // start..end - // }) - // }) - // .collect::>(); - // tabstop_ranges.sort_unstable_by(|a, b| a.start.cmp(&b.start, snapshot)); - // tabstop_ranges - // }) - // .collect::>() - // }); + pub fn insert_snippet( + &mut self, + insertion_ranges: &[Range], + snippet: Snippet, + cx: &mut ViewContext, + ) -> Result<()> { + let tabstops = self.buffer.update(cx, |buffer, cx| { + let snippet_text: Arc = snippet.text.clone().into(); + buffer.edit( + insertion_ranges + .iter() + .cloned() + .map(|range| (range, snippet_text.clone())), + Some(AutoindentMode::EachLine), + cx, + ); - // if let Some(tabstop) = tabstops.first() { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_ranges(tabstop.iter().cloned()); - // }); - // self.snippet_stack.push(SnippetState { - // active_index: 0, - // ranges: tabstops, - // }); - // } + let snapshot = &*buffer.read(cx); + let snippet = &snippet; + snippet + .tabstops + .iter() + .map(|tabstop| { + let mut tabstop_ranges = tabstop + .iter() + .flat_map(|tabstop_range| { + let mut delta = 0_isize; + insertion_ranges.iter().map(move |insertion_range| { + let insertion_start = insertion_range.start as isize + delta; + delta += + snippet.text.len() as isize - insertion_range.len() as isize; + + let start = snapshot.anchor_before( + (insertion_start + tabstop_range.start) as usize, + ); + let end = snapshot + .anchor_after((insertion_start + tabstop_range.end) as usize); + start..end + }) + }) + .collect::>(); + tabstop_ranges.sort_unstable_by(|a, b| a.start.cmp(&b.start, snapshot)); + tabstop_ranges + }) + .collect::>() + }); - // Ok(()) - // } + if let Some(tabstop) = tabstops.first() { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_ranges(tabstop.iter().cloned()); + }); + self.snippet_stack.push(SnippetState { + active_index: 0, + ranges: tabstops, + }); + } - // pub fn move_to_next_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { - // self.move_to_snippet_tabstop(Bias::Right, cx) - // } + Ok(()) + } - // pub fn move_to_prev_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { - // self.move_to_snippet_tabstop(Bias::Left, cx) - // } + pub fn move_to_next_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { + self.move_to_snippet_tabstop(Bias::Right, cx) + } - // pub fn move_to_snippet_tabstop(&mut self, bias: Bias, cx: &mut ViewContext) -> bool { - // if let Some(mut snippet) = self.snippet_stack.pop() { - // match bias { - // Bias::Left => { - // if snippet.active_index > 0 { - // snippet.active_index -= 1; - // } else { - // self.snippet_stack.push(snippet); - // return false; - // } - // } - // Bias::Right => { - // if snippet.active_index + 1 < snippet.ranges.len() { - // snippet.active_index += 1; - // } else { - // self.snippet_stack.push(snippet); - // return false; - // } - // } - // } - // if let Some(current_ranges) = snippet.ranges.get(snippet.active_index) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_anchor_ranges(current_ranges.iter().cloned()) - // }); - // // If snippet state is not at the last tabstop, push it back on the stack - // if snippet.active_index + 1 < snippet.ranges.len() { - // self.snippet_stack.push(snippet); - // } - // return true; - // } - // } + pub fn move_to_prev_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { + self.move_to_snippet_tabstop(Bias::Left, cx) + } - // false - // } + pub fn move_to_snippet_tabstop(&mut self, bias: Bias, cx: &mut ViewContext) -> bool { + if let Some(mut snippet) = self.snippet_stack.pop() { + match bias { + Bias::Left => { + if snippet.active_index > 0 { + snippet.active_index -= 1; + } else { + self.snippet_stack.push(snippet); + return false; + } + } + Bias::Right => { + if snippet.active_index + 1 < snippet.ranges.len() { + snippet.active_index += 1; + } else { + self.snippet_stack.push(snippet); + return false; + } + } + } + if let Some(current_ranges) = snippet.ranges.get(snippet.active_index) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_anchor_ranges(current_ranges.iter().cloned()) + }); + // If snippet state is not at the last tabstop, push it back on the stack + if snippet.active_index + 1 < snippet.ranges.len() { + self.snippet_stack.push(snippet); + } + return true; + } + } - // pub fn clear(&mut self, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.select_all(&SelectAll, cx); - // this.insert("", cx); - // }); - // } + false + } - // pub fn backspace(&mut self, _: &Backspace, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.select_autoclose_pair(cx); - // let mut selections = this.selections.all::(cx); - // if !this.selections.line_mode { - // let display_map = this.display_map.update(cx, |map, cx| map.snapshot(cx)); - // for selection in &mut selections { - // if selection.is_empty() { - // let old_head = selection.head(); - // let mut new_head = - // movement::left(&display_map, old_head.to_display_point(&display_map)) - // .to_point(&display_map); - // if let Some((buffer, line_buffer_range)) = display_map - // .buffer_snapshot - // .buffer_line_for_row(old_head.row) - // { - // let indent_size = - // buffer.indent_size_for_line(line_buffer_range.start.row); - // let indent_len = match indent_size.kind { - // IndentKind::Space => { - // buffer.settings_at(line_buffer_range.start, cx).tab_size - // } - // IndentKind::Tab => NonZeroU32::new(1).unwrap(), - // }; - // if old_head.column <= indent_size.len && old_head.column > 0 { - // let indent_len = indent_len.get(); - // new_head = cmp::min( - // new_head, - // Point::new( - // old_head.row, - // ((old_head.column - 1) / indent_len) * indent_len, - // ), - // ); - // } - // } + pub fn clear(&mut self, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.select_all(&SelectAll, cx); + this.insert("", cx); + }); + } - // selection.set_head(new_head, SelectionGoal::None); - // } - // } - // } + pub fn backspace(&mut self, _: &Backspace, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.select_autoclose_pair(cx); + let mut selections = this.selections.all::(cx); + if !this.selections.line_mode { + let display_map = this.display_map.update(cx, |map, cx| map.snapshot(cx)); + for selection in &mut selections { + if selection.is_empty() { + let old_head = selection.head(); + let mut new_head = + movement::left(&display_map, old_head.to_display_point(&display_map)) + .to_point(&display_map); + if let Some((buffer, line_buffer_range)) = display_map + .buffer_snapshot + .buffer_line_for_row(old_head.row) + { + let indent_size = + buffer.indent_size_for_line(line_buffer_range.start.row); + let indent_len = match indent_size.kind { + IndentKind::Space => { + buffer.settings_at(line_buffer_range.start, cx).tab_size + } + IndentKind::Tab => NonZeroU32::new(1).unwrap(), + }; + if old_head.column <= indent_size.len && old_head.column > 0 { + let indent_len = indent_len.get(); + new_head = cmp::min( + new_head, + Point::new( + old_head.row, + ((old_head.column - 1) / indent_len) * indent_len, + ), + ); + } + } - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // this.insert("", cx); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } + selection.set_head(new_head, SelectionGoal::None); + } + } + } - // pub fn delete(&mut self, _: &Delete, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if selection.is_empty() && !line_mode { - // let cursor = movement::right(map, selection.head()); - // selection.end = cursor; - // selection.reversed = true; - // selection.goal = SelectionGoal::None; - // } - // }) - // }); - // this.insert("", cx); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + this.insert("", cx); + this.refresh_copilot_suggestions(true, cx); + }); + } - // pub fn tab_prev(&mut self, _: &TabPrev, cx: &mut ViewContext) { - // if self.move_to_prev_snippet_tabstop(cx) { - // return; - // } + pub fn delete(&mut self, _: &Delete, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if selection.is_empty() && !line_mode { + let cursor = movement::right(map, selection.head()); + selection.end = cursor; + selection.reversed = true; + selection.goal = SelectionGoal::None; + } + }) + }); + this.insert("", cx); + this.refresh_copilot_suggestions(true, cx); + }); + } - // self.outdent(&Outdent, cx); - // } + pub fn tab_prev(&mut self, _: &TabPrev, cx: &mut ViewContext) { + if self.move_to_prev_snippet_tabstop(cx) { + return; + } - // pub fn tab(&mut self, _: &Tab, cx: &mut ViewContext) { - // if self.move_to_next_snippet_tabstop(cx) { - // return; - // } + self.outdent(&Outdent, cx); + } - // let mut selections = self.selections.all_adjusted(cx); - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); - // let rows_iter = selections.iter().map(|s| s.head().row); - // let suggested_indents = snapshot.suggested_indents(rows_iter, cx); - - // let mut edits = Vec::new(); - // let mut prev_edited_row = 0; - // let mut row_delta = 0; - // for selection in &mut selections { - // if selection.start.row != prev_edited_row { - // row_delta = 0; - // } - // prev_edited_row = selection.end.row; + pub fn tab(&mut self, _: &Tab, cx: &mut ViewContext) { + if self.move_to_next_snippet_tabstop(cx) { + return; + } - // // If the selection is non-empty, then increase the indentation of the selected lines. - // if !selection.is_empty() { - // row_delta = - // Self::indent_selection(buffer, &snapshot, selection, &mut edits, row_delta, cx); - // continue; - // } + let mut selections = self.selections.all_adjusted(cx); + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); + let rows_iter = selections.iter().map(|s| s.head().row); + let suggested_indents = snapshot.suggested_indents(rows_iter, cx); - // // If the selection is empty and the cursor is in the leading whitespace before the - // // suggested indentation, then auto-indent the line. - // let cursor = selection.head(); - // let current_indent = snapshot.indent_size_for_line(cursor.row); - // if let Some(suggested_indent) = suggested_indents.get(&cursor.row).copied() { - // if cursor.column < suggested_indent.len - // && cursor.column <= current_indent.len - // && current_indent.len <= suggested_indent.len - // { - // selection.start = Point::new(cursor.row, suggested_indent.len); - // selection.end = selection.start; - // if row_delta == 0 { - // edits.extend(Buffer::edit_for_indent_size_adjustment( - // cursor.row, - // current_indent, - // suggested_indent, - // )); - // row_delta = suggested_indent.len - current_indent.len; - // } - // continue; - // } - // } + let mut edits = Vec::new(); + let mut prev_edited_row = 0; + let mut row_delta = 0; + for selection in &mut selections { + if selection.start.row != prev_edited_row { + row_delta = 0; + } + prev_edited_row = selection.end.row; - // // Accept copilot suggestion if there is only one selection and the cursor is not - // // in the leading whitespace. - // if self.selections.count() == 1 - // && cursor.column >= current_indent.len - // && self.has_active_copilot_suggestion(cx) - // { - // self.accept_copilot_suggestion(cx); - // return; - // } + // If the selection is non-empty, then increase the indentation of the selected lines. + if !selection.is_empty() { + row_delta = + Self::indent_selection(buffer, &snapshot, selection, &mut edits, row_delta, cx); + continue; + } - // // Otherwise, insert a hard or soft tab. - // let settings = buffer.settings_at(cursor, cx); - // let tab_size = if settings.hard_tabs { - // IndentSize::tab() - // } else { - // let tab_size = settings.tab_size.get(); - // let char_column = snapshot - // .text_for_range(Point::new(cursor.row, 0)..cursor) - // .flat_map(str::chars) - // .count() - // + row_delta as usize; - // let chars_to_next_tab_stop = tab_size - (char_column as u32 % tab_size); - // IndentSize::spaces(chars_to_next_tab_stop) - // }; - // selection.start = Point::new(cursor.row, cursor.column + row_delta + tab_size.len); - // selection.end = selection.start; - // edits.push((cursor..cursor, tab_size.chars().collect::())); - // row_delta += tab_size.len; - // } + // If the selection is empty and the cursor is in the leading whitespace before the + // suggested indentation, then auto-indent the line. + let cursor = selection.head(); + let current_indent = snapshot.indent_size_for_line(cursor.row); + if let Some(suggested_indent) = suggested_indents.get(&cursor.row).copied() { + if cursor.column < suggested_indent.len + && cursor.column <= current_indent.len + && current_indent.len <= suggested_indent.len + { + selection.start = Point::new(cursor.row, suggested_indent.len); + selection.end = selection.start; + if row_delta == 0 { + edits.extend(Buffer::edit_for_indent_size_adjustment( + cursor.row, + current_indent, + suggested_indent, + )); + row_delta = suggested_indent.len - current_indent.len; + } + continue; + } + } - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |b, cx| b.edit(edits, None, cx)); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } + // Accept copilot suggestion if there is only one selection and the cursor is not + // in the leading whitespace. + if self.selections.count() == 1 + && cursor.column >= current_indent.len + && self.has_active_copilot_suggestion(cx) + { + self.accept_copilot_suggestion(cx); + return; + } - // pub fn indent(&mut self, _: &Indent, cx: &mut ViewContext) { - // let mut selections = self.selections.all::(cx); - // let mut prev_edited_row = 0; - // let mut row_delta = 0; - // let mut edits = Vec::new(); - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); - // for selection in &mut selections { - // if selection.start.row != prev_edited_row { - // row_delta = 0; - // } - // prev_edited_row = selection.end.row; + // Otherwise, insert a hard or soft tab. + let settings = buffer.settings_at(cursor, cx); + let tab_size = if settings.hard_tabs { + IndentSize::tab() + } else { + let tab_size = settings.tab_size.get(); + let char_column = snapshot + .text_for_range(Point::new(cursor.row, 0)..cursor) + .flat_map(str::chars) + .count() + + row_delta as usize; + let chars_to_next_tab_stop = tab_size - (char_column as u32 % tab_size); + IndentSize::spaces(chars_to_next_tab_stop) + }; + selection.start = Point::new(cursor.row, cursor.column + row_delta + tab_size.len); + selection.end = selection.start; + edits.push((cursor..cursor, tab_size.chars().collect::())); + row_delta += tab_size.len; + } - // row_delta = - // Self::indent_selection(buffer, &snapshot, selection, &mut edits, row_delta, cx); - // } + self.transact(cx, |this, cx| { + this.buffer.update(cx, |b, cx| b.edit(edits, None, cx)); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + this.refresh_copilot_suggestions(true, cx); + }); + } - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |b, cx| b.edit(edits, None, cx)); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // }); - // } + pub fn indent(&mut self, _: &Indent, cx: &mut ViewContext) { + let mut selections = self.selections.all::(cx); + let mut prev_edited_row = 0; + let mut row_delta = 0; + let mut edits = Vec::new(); + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); + for selection in &mut selections { + if selection.start.row != prev_edited_row { + row_delta = 0; + } + prev_edited_row = selection.end.row; - // fn indent_selection( - // buffer: &MultiBuffer, - // snapshot: &MultiBufferSnapshot, - // selection: &mut Selection, - // edits: &mut Vec<(Range, String)>, - // delta_for_start_row: u32, - // cx: &AppContext, - // ) -> u32 { - // let settings = buffer.settings_at(selection.start, cx); - // let tab_size = settings.tab_size.get(); - // let indent_kind = if settings.hard_tabs { - // IndentKind::Tab - // } else { - // IndentKind::Space - // }; - // let mut start_row = selection.start.row; - // let mut end_row = selection.end.row + 1; + row_delta = + Self::indent_selection(buffer, &snapshot, selection, &mut edits, row_delta, cx); + } - // // If a selection ends at the beginning of a line, don't indent - // // that last line. - // if selection.end.column == 0 { - // end_row -= 1; - // } - - // // Avoid re-indenting a row that has already been indented by a - // // previous selection, but still update this selection's column - // // to reflect that indentation. - // if delta_for_start_row > 0 { - // start_row += 1; - // selection.start.column += delta_for_start_row; - // if selection.end.row == selection.start.row { - // selection.end.column += delta_for_start_row; - // } - // } - - // let mut delta_for_end_row = 0; - // for row in start_row..end_row { - // let current_indent = snapshot.indent_size_for_line(row); - // let indent_delta = match (current_indent.kind, indent_kind) { - // (IndentKind::Space, IndentKind::Space) => { - // let columns_to_next_tab_stop = tab_size - (current_indent.len % tab_size); - // IndentSize::spaces(columns_to_next_tab_stop) - // } - // (IndentKind::Tab, IndentKind::Space) => IndentSize::spaces(tab_size), - // (_, IndentKind::Tab) => IndentSize::tab(), - // }; + self.transact(cx, |this, cx| { + this.buffer.update(cx, |b, cx| b.edit(edits, None, cx)); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + }); + } - // let row_start = Point::new(row, 0); - // edits.push(( - // row_start..row_start, - // indent_delta.chars().collect::(), - // )); + fn indent_selection( + buffer: &MultiBuffer, + snapshot: &MultiBufferSnapshot, + selection: &mut Selection, + edits: &mut Vec<(Range, String)>, + delta_for_start_row: u32, + cx: &AppContext, + ) -> u32 { + let settings = buffer.settings_at(selection.start, cx); + let tab_size = settings.tab_size.get(); + let indent_kind = if settings.hard_tabs { + IndentKind::Tab + } else { + IndentKind::Space + }; + let mut start_row = selection.start.row; + let mut end_row = selection.end.row + 1; - // // Update this selection's endpoints to reflect the indentation. - // if row == selection.start.row { - // selection.start.column += indent_delta.len; - // } - // if row == selection.end.row { - // selection.end.column += indent_delta.len; - // delta_for_end_row = indent_delta.len; - // } - // } + // If a selection ends at the beginning of a line, don't indent + // that last line. + if selection.end.column == 0 { + end_row -= 1; + } - // if selection.start.row == selection.end.row { - // delta_for_start_row + delta_for_end_row - // } else { - // delta_for_end_row - // } - // } + // Avoid re-indenting a row that has already been indented by a + // previous selection, but still update this selection's column + // to reflect that indentation. + if delta_for_start_row > 0 { + start_row += 1; + selection.start.column += delta_for_start_row; + if selection.end.row == selection.start.row { + selection.end.column += delta_for_start_row; + } + } - // pub fn outdent(&mut self, _: &Outdent, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let selections = self.selections.all::(cx); - // let mut deletion_ranges = Vec::new(); - // let mut last_outdent = None; - // { - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); - // for selection in &selections { - // let settings = buffer.settings_at(selection.start, cx); - // let tab_size = settings.tab_size.get(); - // let mut rows = selection.spanned_rows(false, &display_map); - - // // Avoid re-outdenting a row that has already been outdented by a - // // previous selection. - // if let Some(last_row) = last_outdent { - // if last_row == rows.start { - // rows.start += 1; - // } - // } + let mut delta_for_end_row = 0; + for row in start_row..end_row { + let current_indent = snapshot.indent_size_for_line(row); + let indent_delta = match (current_indent.kind, indent_kind) { + (IndentKind::Space, IndentKind::Space) => { + let columns_to_next_tab_stop = tab_size - (current_indent.len % tab_size); + IndentSize::spaces(columns_to_next_tab_stop) + } + (IndentKind::Tab, IndentKind::Space) => IndentSize::spaces(tab_size), + (_, IndentKind::Tab) => IndentSize::tab(), + }; - // for row in rows { - // let indent_size = snapshot.indent_size_for_line(row); - // if indent_size.len > 0 { - // let deletion_len = match indent_size.kind { - // IndentKind::Space => { - // let columns_to_prev_tab_stop = indent_size.len % tab_size; - // if columns_to_prev_tab_stop == 0 { - // tab_size - // } else { - // columns_to_prev_tab_stop - // } - // } - // IndentKind::Tab => 1, - // }; - // deletion_ranges.push(Point::new(row, 0)..Point::new(row, deletion_len)); - // last_outdent = Some(row); - // } - // } - // } - // } + let row_start = Point::new(row, 0); + edits.push(( + row_start..row_start, + indent_delta.chars().collect::(), + )); - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // let empty_str: Arc = "".into(); - // buffer.edit( - // deletion_ranges - // .into_iter() - // .map(|range| (range, empty_str.clone())), - // None, - // cx, - // ); - // }); - // let selections = this.selections.all::(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // }); - // } + // Update this selection's endpoints to reflect the indentation. + if row == selection.start.row { + selection.start.column += indent_delta.len; + } + if row == selection.end.row { + selection.end.column += indent_delta.len; + delta_for_end_row = indent_delta.len; + } + } - // pub fn delete_line(&mut self, _: &DeleteLine, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let selections = self.selections.all::(cx); - - // let mut new_cursors = Vec::new(); - // let mut edit_ranges = Vec::new(); - // let mut selections = selections.iter().peekable(); - // while let Some(selection) = selections.next() { - // let mut rows = selection.spanned_rows(false, &display_map); - // let goal_display_column = selection.head().to_display_point(&display_map).column(); - - // // Accumulate contiguous regions of rows that we want to delete. - // while let Some(next_selection) = selections.peek() { - // let next_rows = next_selection.spanned_rows(false, &display_map); - // if next_rows.start <= rows.end { - // rows.end = next_rows.end; - // selections.next().unwrap(); - // } else { - // break; - // } - // } + if selection.start.row == selection.end.row { + delta_for_start_row + delta_for_end_row + } else { + delta_for_end_row + } + } - // let buffer = &display_map.buffer_snapshot; - // let mut edit_start = Point::new(rows.start, 0).to_offset(buffer); - // let edit_end; - // let cursor_buffer_row; - // if buffer.max_point().row >= rows.end { - // // If there's a line after the range, delete the \n from the end of the row range - // // and position the cursor on the next line. - // edit_end = Point::new(rows.end, 0).to_offset(buffer); - // cursor_buffer_row = rows.end; - // } else { - // // If there isn't a line after the range, delete the \n from the line before the - // // start of the row range and position the cursor there. - // edit_start = edit_start.saturating_sub(1); - // edit_end = buffer.len(); - // cursor_buffer_row = rows.start.saturating_sub(1); - // } + pub fn outdent(&mut self, _: &Outdent, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let selections = self.selections.all::(cx); + let mut deletion_ranges = Vec::new(); + let mut last_outdent = None; + { + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); + for selection in &selections { + let settings = buffer.settings_at(selection.start, cx); + let tab_size = settings.tab_size.get(); + let mut rows = selection.spanned_rows(false, &display_map); + + // Avoid re-outdenting a row that has already been outdented by a + // previous selection. + if let Some(last_row) = last_outdent { + if last_row == rows.start { + rows.start += 1; + } + } - // let mut cursor = Point::new(cursor_buffer_row, 0).to_display_point(&display_map); - // *cursor.column_mut() = - // cmp::min(goal_display_column, display_map.line_len(cursor.row())); + for row in rows { + let indent_size = snapshot.indent_size_for_line(row); + if indent_size.len > 0 { + let deletion_len = match indent_size.kind { + IndentKind::Space => { + let columns_to_prev_tab_stop = indent_size.len % tab_size; + if columns_to_prev_tab_stop == 0 { + tab_size + } else { + columns_to_prev_tab_stop + } + } + IndentKind::Tab => 1, + }; + deletion_ranges.push(Point::new(row, 0)..Point::new(row, deletion_len)); + last_outdent = Some(row); + } + } + } + } - // new_cursors.push(( - // selection.id, - // buffer.anchor_after(cursor.to_point(&display_map)), - // )); - // edit_ranges.push(edit_start..edit_end); - // } + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + let empty_str: Arc = "".into(); + buffer.edit( + deletion_ranges + .into_iter() + .map(|range| (range, empty_str.clone())), + None, + cx, + ); + }); + let selections = this.selections.all::(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + }); + } - // self.transact(cx, |this, cx| { - // let buffer = this.buffer.update(cx, |buffer, cx| { - // let empty_str: Arc = "".into(); - // buffer.edit( - // edit_ranges - // .into_iter() - // .map(|range| (range, empty_str.clone())), - // None, - // cx, - // ); - // buffer.snapshot(cx) - // }); - // let new_selections = new_cursors - // .into_iter() - // .map(|(id, cursor)| { - // let cursor = cursor.to_point(&buffer); - // Selection { - // id, - // start: cursor, - // end: cursor, - // reversed: false, - // goal: SelectionGoal::None, - // } - // }) - // .collect(); + pub fn delete_line(&mut self, _: &DeleteLine, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let selections = self.selections.all::(cx); + + let mut new_cursors = Vec::new(); + let mut edit_ranges = Vec::new(); + let mut selections = selections.iter().peekable(); + while let Some(selection) = selections.next() { + let mut rows = selection.spanned_rows(false, &display_map); + let goal_display_column = selection.head().to_display_point(&display_map).column(); + + // Accumulate contiguous regions of rows that we want to delete. + while let Some(next_selection) = selections.peek() { + let next_rows = next_selection.spanned_rows(false, &display_map); + if next_rows.start <= rows.end { + rows.end = next_rows.end; + selections.next().unwrap(); + } else { + break; + } + } - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - // }); - // } + let buffer = &display_map.buffer_snapshot; + let mut edit_start = Point::new(rows.start, 0).to_offset(buffer); + let edit_end; + let cursor_buffer_row; + if buffer.max_point().row >= rows.end { + // If there's a line after the range, delete the \n from the end of the row range + // and position the cursor on the next line. + edit_end = Point::new(rows.end, 0).to_offset(buffer); + cursor_buffer_row = rows.end; + } else { + // If there isn't a line after the range, delete the \n from the line before the + // start of the row range and position the cursor there. + edit_start = edit_start.saturating_sub(1); + edit_end = buffer.len(); + cursor_buffer_row = rows.start.saturating_sub(1); + } - // pub fn join_lines(&mut self, _: &JoinLines, cx: &mut ViewContext) { - // let mut row_ranges = Vec::>::new(); - // for selection in self.selections.all::(cx) { - // let start = selection.start.row; - // let end = if selection.start.row == selection.end.row { - // selection.start.row + 1 - // } else { - // selection.end.row - // }; + let mut cursor = Point::new(cursor_buffer_row, 0).to_display_point(&display_map); + *cursor.column_mut() = + cmp::min(goal_display_column, display_map.line_len(cursor.row())); - // if let Some(last_row_range) = row_ranges.last_mut() { - // if start <= last_row_range.end { - // last_row_range.end = end; - // continue; - // } - // } - // row_ranges.push(start..end); - // } + new_cursors.push(( + selection.id, + buffer.anchor_after(cursor.to_point(&display_map)), + )); + edit_ranges.push(edit_start..edit_end); + } - // let snapshot = self.buffer.read(cx).snapshot(cx); - // let mut cursor_positions = Vec::new(); - // for row_range in &row_ranges { - // let anchor = snapshot.anchor_before(Point::new( - // row_range.end - 1, - // snapshot.line_len(row_range.end - 1), - // )); - // cursor_positions.push(anchor.clone()..anchor); - // } + self.transact(cx, |this, cx| { + let buffer = this.buffer.update(cx, |buffer, cx| { + let empty_str: Arc = "".into(); + buffer.edit( + edit_ranges + .into_iter() + .map(|range| (range, empty_str.clone())), + None, + cx, + ); + buffer.snapshot(cx) + }); + let new_selections = new_cursors + .into_iter() + .map(|(id, cursor)| { + let cursor = cursor.to_point(&buffer); + Selection { + id, + start: cursor, + end: cursor, + reversed: false, + goal: SelectionGoal::None, + } + }) + .collect(); - // self.transact(cx, |this, cx| { - // for row_range in row_ranges.into_iter().rev() { - // for row in row_range.rev() { - // let end_of_line = Point::new(row, snapshot.line_len(row)); - // let indent = snapshot.indent_size_for_line(row + 1); - // let start_of_next_line = Point::new(row + 1, indent.len); - - // let replace = if snapshot.line_len(row + 1) > indent.len { - // " " - // } else { - // "" - // }; + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + }); + } - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit([(end_of_line..start_of_next_line, replace)], None, cx) - // }); - // } - // } + pub fn join_lines(&mut self, _: &JoinLines, cx: &mut ViewContext) { + let mut row_ranges = Vec::>::new(); + for selection in self.selections.all::(cx) { + let start = selection.start.row; + let end = if selection.start.row == selection.end.row { + selection.start.row + 1 + } else { + selection.end.row + }; - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_anchor_ranges(cursor_positions) - // }); - // }); - // } + if let Some(last_row_range) = row_ranges.last_mut() { + if start <= last_row_range.end { + last_row_range.end = end; + continue; + } + } + row_ranges.push(start..end); + } - // pub fn sort_lines_case_sensitive( - // &mut self, - // _: &SortLinesCaseSensitive, - // cx: &mut ViewContext, - // ) { - // self.manipulate_lines(cx, |lines| lines.sort()) - // } + let snapshot = self.buffer.read(cx).snapshot(cx); + let mut cursor_positions = Vec::new(); + for row_range in &row_ranges { + let anchor = snapshot.anchor_before(Point::new( + row_range.end - 1, + snapshot.line_len(row_range.end - 1), + )); + cursor_positions.push(anchor.clone()..anchor); + } - // pub fn sort_lines_case_insensitive( - // &mut self, - // _: &SortLinesCaseInsensitive, - // cx: &mut ViewContext, - // ) { - // self.manipulate_lines(cx, |lines| lines.sort_by_key(|line| line.to_lowercase())) - // } + self.transact(cx, |this, cx| { + for row_range in row_ranges.into_iter().rev() { + for row in row_range.rev() { + let end_of_line = Point::new(row, snapshot.line_len(row)); + let indent = snapshot.indent_size_for_line(row + 1); + let start_of_next_line = Point::new(row + 1, indent.len); + + let replace = if snapshot.line_len(row + 1) > indent.len { + " " + } else { + "" + }; - // pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext) { - // self.manipulate_lines(cx, |lines| lines.reverse()) - // } + this.buffer.update(cx, |buffer, cx| { + buffer.edit([(end_of_line..start_of_next_line, replace)], None, cx) + }); + } + } - // pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext) { - // self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng())) - // } + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_anchor_ranges(cursor_positions) + }); + }); + } - // fn manipulate_lines(&mut self, cx: &mut ViewContext, mut callback: Fn) - // where - // Fn: FnMut(&mut [&str]), - // { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = self.buffer.read(cx).snapshot(cx); - - // let mut edits = Vec::new(); - - // let selections = self.selections.all::(cx); - // let mut selections = selections.iter().peekable(); - // let mut contiguous_row_selections = Vec::new(); - // let mut new_selections = Vec::new(); - - // while let Some(selection) = selections.next() { - // let (start_row, end_row) = consume_contiguous_rows( - // &mut contiguous_row_selections, - // selection, - // &display_map, - // &mut selections, - // ); + pub fn sort_lines_case_sensitive( + &mut self, + _: &SortLinesCaseSensitive, + cx: &mut ViewContext, + ) { + self.manipulate_lines(cx, |lines| lines.sort()) + } - // let start_point = Point::new(start_row, 0); - // let end_point = Point::new(end_row - 1, buffer.line_len(end_row - 1)); - // let text = buffer - // .text_for_range(start_point..end_point) - // .collect::(); - // let mut lines = text.split("\n").collect_vec(); - - // let lines_len = lines.len(); - // callback(&mut lines); - - // // This is a current limitation with selections. - // // If we wanted to support removing or adding lines, we'd need to fix the logic associated with selections. - // debug_assert!( - // lines.len() == lines_len, - // "callback should not change the number of lines" - // ); + pub fn sort_lines_case_insensitive( + &mut self, + _: &SortLinesCaseInsensitive, + cx: &mut ViewContext, + ) { + self.manipulate_lines(cx, |lines| lines.sort_by_key(|line| line.to_lowercase())) + } - // edits.push((start_point..end_point, lines.join("\n"))); - // let start_anchor = buffer.anchor_after(start_point); - // let end_anchor = buffer.anchor_before(end_point); - - // // Make selection and push - // new_selections.push(Selection { - // id: selection.id, - // start: start_anchor.to_offset(&buffer), - // end: end_anchor.to_offset(&buffer), - // goal: SelectionGoal::None, - // reversed: selection.reversed, - // }); - // } + pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext) { + self.manipulate_lines(cx, |lines| lines.reverse()) + } - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); + pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext) { + self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng())) + } - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); + fn manipulate_lines(&mut self, cx: &mut ViewContext, mut callback: Fn) + where + Fn: FnMut(&mut [&str]), + { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = self.buffer.read(cx).snapshot(cx); - // this.request_autoscroll(Autoscroll::fit(), cx); - // }); - // } + let mut edits = Vec::new(); - // pub fn convert_to_upper_case(&mut self, _: &ConvertToUpperCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_uppercase()) - // } + let selections = self.selections.all::(cx); + let mut selections = selections.iter().peekable(); + let mut contiguous_row_selections = Vec::new(); + let mut new_selections = Vec::new(); + + while let Some(selection) = selections.next() { + let (start_row, end_row) = consume_contiguous_rows( + &mut contiguous_row_selections, + selection, + &display_map, + &mut selections, + ); - // pub fn convert_to_lower_case(&mut self, _: &ConvertToLowerCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_lowercase()) - // } + let start_point = Point::new(start_row, 0); + let end_point = Point::new(end_row - 1, buffer.line_len(end_row - 1)); + let text = buffer + .text_for_range(start_point..end_point) + .collect::(); + let mut lines = text.split("\n").collect_vec(); + + let lines_len = lines.len(); + callback(&mut lines); + + // This is a current limitation with selections. + // If we wanted to support removing or adding lines, we'd need to fix the logic associated with selections. + debug_assert!( + lines.len() == lines_len, + "callback should not change the number of lines" + ); - // pub fn convert_to_title_case(&mut self, _: &ConvertToTitleCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| { - // // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary - // // https://github.com/rutrum/convert-case/issues/16 - // text.split("\n") - // .map(|line| line.to_case(Case::Title)) - // .join("\n") - // }) - // } + edits.push((start_point..end_point, lines.join("\n"))); + let start_anchor = buffer.anchor_after(start_point); + let end_anchor = buffer.anchor_before(end_point); + + // Make selection and push + new_selections.push(Selection { + id: selection.id, + start: start_anchor.to_offset(&buffer), + end: end_anchor.to_offset(&buffer), + goal: SelectionGoal::None, + reversed: selection.reversed, + }); + } - // pub fn convert_to_snake_case(&mut self, _: &ConvertToSnakeCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_case(Case::Snake)) - // } + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); - // pub fn convert_to_kebab_case(&mut self, _: &ConvertToKebabCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_case(Case::Kebab)) - // } + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); - // pub fn convert_to_upper_camel_case( - // &mut self, - // _: &ConvertToUpperCamelCase, - // cx: &mut ViewContext, - // ) { - // self.manipulate_text(cx, |text| { - // // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary - // // https://github.com/rutrum/convert-case/issues/16 - // text.split("\n") - // .map(|line| line.to_case(Case::UpperCamel)) - // .join("\n") - // }) - // } + this.request_autoscroll(Autoscroll::fit(), cx); + }); + } - // pub fn convert_to_lower_camel_case( - // &mut self, - // _: &ConvertToLowerCamelCase, - // cx: &mut ViewContext, - // ) { - // self.manipulate_text(cx, |text| text.to_case(Case::Camel)) - // } + pub fn convert_to_upper_case(&mut self, _: &ConvertToUpperCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_uppercase()) + } - // fn manipulate_text(&mut self, cx: &mut ViewContext, mut callback: Fn) - // where - // Fn: FnMut(&str) -> String, - // { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = self.buffer.read(cx).snapshot(cx); + pub fn convert_to_lower_case(&mut self, _: &ConvertToLowerCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_lowercase()) + } - // let mut new_selections = Vec::new(); - // let mut edits = Vec::new(); - // let mut selection_adjustment = 0i32; + pub fn convert_to_title_case(&mut self, _: &ConvertToTitleCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| { + // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary + // https://github.com/rutrum/convert-case/issues/16 + text.split("\n") + .map(|line| line.to_case(Case::Title)) + .join("\n") + }) + } - // for selection in self.selections.all::(cx) { - // let selection_is_empty = selection.is_empty(); + pub fn convert_to_snake_case(&mut self, _: &ConvertToSnakeCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_case(Case::Snake)) + } - // let (start, end) = if selection_is_empty { - // let word_range = movement::surrounding_word( - // &display_map, - // selection.start.to_display_point(&display_map), - // ); - // let start = word_range.start.to_offset(&display_map, Bias::Left); - // let end = word_range.end.to_offset(&display_map, Bias::Left); - // (start, end) - // } else { - // (selection.start, selection.end) - // }; + pub fn convert_to_kebab_case(&mut self, _: &ConvertToKebabCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_case(Case::Kebab)) + } - // let text = buffer.text_for_range(start..end).collect::(); - // let old_length = text.len() as i32; - // let text = callback(&text); + pub fn convert_to_upper_camel_case( + &mut self, + _: &ConvertToUpperCamelCase, + cx: &mut ViewContext, + ) { + self.manipulate_text(cx, |text| { + // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary + // https://github.com/rutrum/convert-case/issues/16 + text.split("\n") + .map(|line| line.to_case(Case::UpperCamel)) + .join("\n") + }) + } - // new_selections.push(Selection { - // start: (start as i32 - selection_adjustment) as usize, - // end: ((start + text.len()) as i32 - selection_adjustment) as usize, - // goal: SelectionGoal::None, - // ..selection - // }); + pub fn convert_to_lower_camel_case( + &mut self, + _: &ConvertToLowerCamelCase, + cx: &mut ViewContext, + ) { + self.manipulate_text(cx, |text| text.to_case(Case::Camel)) + } - // selection_adjustment += old_length - text.len() as i32; + fn manipulate_text(&mut self, cx: &mut ViewContext, mut callback: Fn) + where + Fn: FnMut(&str) -> String, + { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = self.buffer.read(cx).snapshot(cx); - // edits.push((start..end, text)); - // } + let mut new_selections = Vec::new(); + let mut edits = Vec::new(); + let mut selection_adjustment = 0i32; - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); + for selection in self.selections.all::(cx) { + let selection_is_empty = selection.is_empty(); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); + let (start, end) = if selection_is_empty { + let word_range = movement::surrounding_word( + &display_map, + selection.start.to_display_point(&display_map), + ); + let start = word_range.start.to_offset(&display_map, Bias::Left); + let end = word_range.end.to_offset(&display_map, Bias::Left); + (start, end) + } else { + (selection.start, selection.end) + }; - // this.request_autoscroll(Autoscroll::fit(), cx); - // }); - // } + let text = buffer.text_for_range(start..end).collect::(); + let old_length = text.len() as i32; + let text = callback(&text); - // pub fn duplicate_line(&mut self, _: &DuplicateLine, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = &display_map.buffer_snapshot; - // let selections = self.selections.all::(cx); - - // let mut edits = Vec::new(); - // let mut selections_iter = selections.iter().peekable(); - // while let Some(selection) = selections_iter.next() { - // // Avoid duplicating the same lines twice. - // let mut rows = selection.spanned_rows(false, &display_map); - - // while let Some(next_selection) = selections_iter.peek() { - // let next_rows = next_selection.spanned_rows(false, &display_map); - // if next_rows.start < rows.end { - // rows.end = next_rows.end; - // selections_iter.next().unwrap(); - // } else { - // break; - // } - // } + new_selections.push(Selection { + start: (start as i32 - selection_adjustment) as usize, + end: ((start + text.len()) as i32 - selection_adjustment) as usize, + goal: SelectionGoal::None, + ..selection + }); - // // Copy the text from the selected row region and splice it at the start of the region. - // let start = Point::new(rows.start, 0); - // let end = Point::new(rows.end - 1, buffer.line_len(rows.end - 1)); - // let text = buffer - // .text_for_range(start..end) - // .chain(Some("\n")) - // .collect::(); - // edits.push((start..start, text)); - // } + selection_adjustment += old_length - text.len() as i32; - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); + edits.push((start..end, text)); + } - // this.request_autoscroll(Autoscroll::fit(), cx); - // }); - // } + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); - // pub fn move_line_up(&mut self, _: &MoveLineUp, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = self.buffer.read(cx).snapshot(cx); - - // let mut edits = Vec::new(); - // let mut unfold_ranges = Vec::new(); - // let mut refold_ranges = Vec::new(); - - // let selections = self.selections.all::(cx); - // let mut selections = selections.iter().peekable(); - // let mut contiguous_row_selections = Vec::new(); - // let mut new_selections = Vec::new(); - - // while let Some(selection) = selections.next() { - // // Find all the selections that span a contiguous row range - // let (start_row, end_row) = consume_contiguous_rows( - // &mut contiguous_row_selections, - // selection, - // &display_map, - // &mut selections, - // ); + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); - // // Move the text spanned by the row range to be before the line preceding the row range - // if start_row > 0 { - // let range_to_move = Point::new(start_row - 1, buffer.line_len(start_row - 1)) - // ..Point::new(end_row - 1, buffer.line_len(end_row - 1)); - // let insertion_point = display_map - // .prev_line_boundary(Point::new(start_row - 1, 0)) - // .0; - - // // Don't move lines across excerpts - // if buffer - // .excerpt_boundaries_in_range(( - // Bound::Excluded(insertion_point), - // Bound::Included(range_to_move.end), - // )) - // .next() - // .is_none() - // { - // let text = buffer - // .text_for_range(range_to_move.clone()) - // .flat_map(|s| s.chars()) - // .skip(1) - // .chain(['\n']) - // .collect::(); - - // edits.push(( - // buffer.anchor_after(range_to_move.start) - // ..buffer.anchor_before(range_to_move.end), - // String::new(), - // )); - // let insertion_anchor = buffer.anchor_after(insertion_point); - // edits.push((insertion_anchor..insertion_anchor, text)); - - // let row_delta = range_to_move.start.row - insertion_point.row + 1; - - // // Move selections up - // new_selections.extend(contiguous_row_selections.drain(..).map( - // |mut selection| { - // selection.start.row -= row_delta; - // selection.end.row -= row_delta; - // selection - // }, - // )); - - // // Move folds up - // unfold_ranges.push(range_to_move.clone()); - // for fold in display_map.folds_in_range( - // buffer.anchor_before(range_to_move.start) - // ..buffer.anchor_after(range_to_move.end), - // ) { - // let mut start = fold.start.to_point(&buffer); - // let mut end = fold.end.to_point(&buffer); - // start.row -= row_delta; - // end.row -= row_delta; - // refold_ranges.push(start..end); - // } - // } - // } + this.request_autoscroll(Autoscroll::fit(), cx); + }); + } - // // If we didn't move line(s), preserve the existing selections - // new_selections.append(&mut contiguous_row_selections); - // } + pub fn duplicate_line(&mut self, _: &DuplicateLine, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = &display_map.buffer_snapshot; + let selections = self.selections.all::(cx); - // self.transact(cx, |this, cx| { - // this.unfold_ranges(unfold_ranges, true, true, cx); - // this.buffer.update(cx, |buffer, cx| { - // for (range, text) in edits { - // buffer.edit([(range, text)], None, cx); - // } - // }); - // this.fold_ranges(refold_ranges, true, cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }) - // }); - // } + let mut edits = Vec::new(); + let mut selections_iter = selections.iter().peekable(); + while let Some(selection) = selections_iter.next() { + // Avoid duplicating the same lines twice. + let mut rows = selection.spanned_rows(false, &display_map); + + while let Some(next_selection) = selections_iter.peek() { + let next_rows = next_selection.spanned_rows(false, &display_map); + if next_rows.start < rows.end { + rows.end = next_rows.end; + selections_iter.next().unwrap(); + } else { + break; + } + } - // pub fn move_line_down(&mut self, _: &MoveLineDown, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = self.buffer.read(cx).snapshot(cx); - - // let mut edits = Vec::new(); - // let mut unfold_ranges = Vec::new(); - // let mut refold_ranges = Vec::new(); - - // let selections = self.selections.all::(cx); - // let mut selections = selections.iter().peekable(); - // let mut contiguous_row_selections = Vec::new(); - // let mut new_selections = Vec::new(); - - // while let Some(selection) = selections.next() { - // // Find all the selections that span a contiguous row range - // let (start_row, end_row) = consume_contiguous_rows( - // &mut contiguous_row_selections, - // selection, - // &display_map, - // &mut selections, - // ); + // Copy the text from the selected row region and splice it at the start of the region. + let start = Point::new(rows.start, 0); + let end = Point::new(rows.end - 1, buffer.line_len(rows.end - 1)); + let text = buffer + .text_for_range(start..end) + .chain(Some("\n")) + .collect::(); + edits.push((start..start, text)); + } - // // Move the text spanned by the row range to be after the last line of the row range - // if end_row <= buffer.max_point().row { - // let range_to_move = Point::new(start_row, 0)..Point::new(end_row, 0); - // let insertion_point = display_map.next_line_boundary(Point::new(end_row, 0)).0; - - // // Don't move lines across excerpt boundaries - // if buffer - // .excerpt_boundaries_in_range(( - // Bound::Excluded(range_to_move.start), - // Bound::Included(insertion_point), - // )) - // .next() - // .is_none() - // { - // let mut text = String::from("\n"); - // text.extend(buffer.text_for_range(range_to_move.clone())); - // text.pop(); // Drop trailing newline - // edits.push(( - // buffer.anchor_after(range_to_move.start) - // ..buffer.anchor_before(range_to_move.end), - // String::new(), - // )); - // let insertion_anchor = buffer.anchor_after(insertion_point); - // edits.push((insertion_anchor..insertion_anchor, text)); - - // let row_delta = insertion_point.row - range_to_move.end.row + 1; - - // // Move selections down - // new_selections.extend(contiguous_row_selections.drain(..).map( - // |mut selection| { - // selection.start.row += row_delta; - // selection.end.row += row_delta; - // selection - // }, - // )); - - // // Move folds down - // unfold_ranges.push(range_to_move.clone()); - // for fold in display_map.folds_in_range( - // buffer.anchor_before(range_to_move.start) - // ..buffer.anchor_after(range_to_move.end), - // ) { - // let mut start = fold.start.to_point(&buffer); - // let mut end = fold.end.to_point(&buffer); - // start.row += row_delta; - // end.row += row_delta; - // refold_ranges.push(start..end); - // } - // } - // } + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); - // // If we didn't move line(s), preserve the existing selections - // new_selections.append(&mut contiguous_row_selections); - // } + this.request_autoscroll(Autoscroll::fit(), cx); + }); + } - // self.transact(cx, |this, cx| { - // this.unfold_ranges(unfold_ranges, true, true, cx); - // this.buffer.update(cx, |buffer, cx| { - // for (range, text) in edits { - // buffer.edit([(range, text)], None, cx); - // } - // }); - // this.fold_ranges(refold_ranges, true, cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); - // }); - // } + pub fn move_line_up(&mut self, _: &MoveLineUp, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = self.buffer.read(cx).snapshot(cx); - // pub fn transpose(&mut self, _: &Transpose, cx: &mut ViewContext) { - // let text_layout_details = &self.text_layout_details(cx); - // self.transact(cx, |this, cx| { - // let edits = this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut edits: Vec<(Range, String)> = Default::default(); - // let line_mode = s.line_mode; - // s.move_with(|display_map, selection| { - // if !selection.is_empty() || line_mode { - // return; - // } + let mut edits = Vec::new(); + let mut unfold_ranges = Vec::new(); + let mut refold_ranges = Vec::new(); + + let selections = self.selections.all::(cx); + let mut selections = selections.iter().peekable(); + let mut contiguous_row_selections = Vec::new(); + let mut new_selections = Vec::new(); + + while let Some(selection) = selections.next() { + // Find all the selections that span a contiguous row range + let (start_row, end_row) = consume_contiguous_rows( + &mut contiguous_row_selections, + selection, + &display_map, + &mut selections, + ); - // let mut head = selection.head(); - // let mut transpose_offset = head.to_offset(display_map, Bias::Right); - // if head.column() == display_map.line_len(head.row()) { - // transpose_offset = display_map - // .buffer_snapshot - // .clip_offset(transpose_offset.saturating_sub(1), Bias::Left); - // } + // Move the text spanned by the row range to be before the line preceding the row range + if start_row > 0 { + let range_to_move = Point::new(start_row - 1, buffer.line_len(start_row - 1)) + ..Point::new(end_row - 1, buffer.line_len(end_row - 1)); + let insertion_point = display_map + .prev_line_boundary(Point::new(start_row - 1, 0)) + .0; + + // Don't move lines across excerpts + if buffer + .excerpt_boundaries_in_range(( + Bound::Excluded(insertion_point), + Bound::Included(range_to_move.end), + )) + .next() + .is_none() + { + let text = buffer + .text_for_range(range_to_move.clone()) + .flat_map(|s| s.chars()) + .skip(1) + .chain(['\n']) + .collect::(); + + edits.push(( + buffer.anchor_after(range_to_move.start) + ..buffer.anchor_before(range_to_move.end), + String::new(), + )); + let insertion_anchor = buffer.anchor_after(insertion_point); + edits.push((insertion_anchor..insertion_anchor, text)); + + let row_delta = range_to_move.start.row - insertion_point.row + 1; + + // Move selections up + new_selections.extend(contiguous_row_selections.drain(..).map( + |mut selection| { + selection.start.row -= row_delta; + selection.end.row -= row_delta; + selection + }, + )); + + // Move folds up + unfold_ranges.push(range_to_move.clone()); + for fold in display_map.folds_in_range( + buffer.anchor_before(range_to_move.start) + ..buffer.anchor_after(range_to_move.end), + ) { + let mut start = fold.start.to_point(&buffer); + let mut end = fold.end.to_point(&buffer); + start.row -= row_delta; + end.row -= row_delta; + refold_ranges.push(start..end); + } + } + } - // if transpose_offset == 0 { - // return; - // } + // If we didn't move line(s), preserve the existing selections + new_selections.append(&mut contiguous_row_selections); + } - // *head.column_mut() += 1; - // head = display_map.clip_point(head, Bias::Right); - // let goal = SelectionGoal::HorizontalPosition( - // display_map.x_for_point(head, &text_layout_details), - // ); - // selection.collapse_to(head, goal); - - // let transpose_start = display_map - // .buffer_snapshot - // .clip_offset(transpose_offset.saturating_sub(1), Bias::Left); - // if edits.last().map_or(true, |e| e.0.end <= transpose_start) { - // let transpose_end = display_map - // .buffer_snapshot - // .clip_offset(transpose_offset + 1, Bias::Right); - // if let Some(ch) = - // display_map.buffer_snapshot.chars_at(transpose_start).next() - // { - // edits.push((transpose_start..transpose_offset, String::new())); - // edits.push((transpose_end..transpose_end, ch.to_string())); - // } - // } - // }); - // edits - // }); - // this.buffer - // .update(cx, |buffer, cx| buffer.edit(edits, None, cx)); - // let selections = this.selections.all::(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(selections); - // }); - // }); - // } + self.transact(cx, |this, cx| { + this.unfold_ranges(unfold_ranges, true, true, cx); + this.buffer.update(cx, |buffer, cx| { + for (range, text) in edits { + buffer.edit([(range, text)], None, cx); + } + }); + this.fold_ranges(refold_ranges, true, cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }) + }); + } - // pub fn cut(&mut self, _: &Cut, cx: &mut ViewContext) { - // let mut text = String::new(); - // let buffer = self.buffer.read(cx).snapshot(cx); - // let mut selections = self.selections.all::(cx); - // let mut clipboard_selections = Vec::with_capacity(selections.len()); - // { - // let max_point = buffer.max_point(); - // let mut is_first = true; - // for selection in &mut selections { - // let is_entire_line = selection.is_empty() || self.selections.line_mode; - // if is_entire_line { - // selection.start = Point::new(selection.start.row, 0); - // selection.end = cmp::min(max_point, Point::new(selection.end.row + 1, 0)); - // selection.goal = SelectionGoal::None; - // } - // if is_first { - // is_first = false; - // } else { - // text += "\n"; - // } - // let mut len = 0; - // for chunk in buffer.text_for_range(selection.start..selection.end) { - // text.push_str(chunk); - // len += chunk.len(); - // } - // clipboard_selections.push(ClipboardSelection { - // len, - // is_entire_line, - // first_line_indent: buffer.indent_size_for_line(selection.start.row).len, - // }); - // } - // } + pub fn move_line_down(&mut self, _: &MoveLineDown, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = self.buffer.read(cx).snapshot(cx); - // self.transact(cx, |this, cx| { - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(selections); - // }); - // this.insert("", cx); - // cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections)); - // }); - // } + let mut edits = Vec::new(); + let mut unfold_ranges = Vec::new(); + let mut refold_ranges = Vec::new(); + + let selections = self.selections.all::(cx); + let mut selections = selections.iter().peekable(); + let mut contiguous_row_selections = Vec::new(); + let mut new_selections = Vec::new(); + + while let Some(selection) = selections.next() { + // Find all the selections that span a contiguous row range + let (start_row, end_row) = consume_contiguous_rows( + &mut contiguous_row_selections, + selection, + &display_map, + &mut selections, + ); - // pub fn copy(&mut self, _: &Copy, cx: &mut ViewContext) { - // let selections = self.selections.all::(cx); - // let buffer = self.buffer.read(cx).read(cx); - // let mut text = String::new(); + // Move the text spanned by the row range to be after the last line of the row range + if end_row <= buffer.max_point().row { + let range_to_move = Point::new(start_row, 0)..Point::new(end_row, 0); + let insertion_point = display_map.next_line_boundary(Point::new(end_row, 0)).0; + + // Don't move lines across excerpt boundaries + if buffer + .excerpt_boundaries_in_range(( + Bound::Excluded(range_to_move.start), + Bound::Included(insertion_point), + )) + .next() + .is_none() + { + let mut text = String::from("\n"); + text.extend(buffer.text_for_range(range_to_move.clone())); + text.pop(); // Drop trailing newline + edits.push(( + buffer.anchor_after(range_to_move.start) + ..buffer.anchor_before(range_to_move.end), + String::new(), + )); + let insertion_anchor = buffer.anchor_after(insertion_point); + edits.push((insertion_anchor..insertion_anchor, text)); + + let row_delta = insertion_point.row - range_to_move.end.row + 1; + + // Move selections down + new_selections.extend(contiguous_row_selections.drain(..).map( + |mut selection| { + selection.start.row += row_delta; + selection.end.row += row_delta; + selection + }, + )); + + // Move folds down + unfold_ranges.push(range_to_move.clone()); + for fold in display_map.folds_in_range( + buffer.anchor_before(range_to_move.start) + ..buffer.anchor_after(range_to_move.end), + ) { + let mut start = fold.start.to_point(&buffer); + let mut end = fold.end.to_point(&buffer); + start.row += row_delta; + end.row += row_delta; + refold_ranges.push(start..end); + } + } + } - // let mut clipboard_selections = Vec::with_capacity(selections.len()); - // { - // let max_point = buffer.max_point(); - // let mut is_first = true; - // for selection in selections.iter() { - // let mut start = selection.start; - // let mut end = selection.end; - // let is_entire_line = selection.is_empty() || self.selections.line_mode; - // if is_entire_line { - // start = Point::new(start.row, 0); - // end = cmp::min(max_point, Point::new(end.row + 1, 0)); - // } - // if is_first { - // is_first = false; - // } else { - // text += "\n"; - // } - // let mut len = 0; - // for chunk in buffer.text_for_range(start..end) { - // text.push_str(chunk); - // len += chunk.len(); - // } - // clipboard_selections.push(ClipboardSelection { - // len, - // is_entire_line, - // first_line_indent: buffer.indent_size_for_line(start.row).len, - // }); - // } - // } + // If we didn't move line(s), preserve the existing selections + new_selections.append(&mut contiguous_row_selections); + } - // cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections)); - // } + self.transact(cx, |this, cx| { + this.unfold_ranges(unfold_ranges, true, true, cx); + this.buffer.update(cx, |buffer, cx| { + for (range, text) in edits { + buffer.edit([(range, text)], None, cx); + } + }); + this.fold_ranges(refold_ranges, true, cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); + }); + } - // pub fn paste(&mut self, _: &Paste, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // if let Some(item) = cx.read_from_clipboard() { - // let clipboard_text = Cow::Borrowed(item.text()); - // if let Some(mut clipboard_selections) = item.metadata::>() { - // let old_selections = this.selections.all::(cx); - // let all_selections_were_entire_line = - // clipboard_selections.iter().all(|s| s.is_entire_line); - // let first_selection_indent_column = - // clipboard_selections.first().map(|s| s.first_line_indent); - // if clipboard_selections.len() != old_selections.len() { - // clipboard_selections.drain(..); - // } + pub fn transpose(&mut self, _: &Transpose, cx: &mut ViewContext) { + let text_layout_details = &self.text_layout_details(cx); + self.transact(cx, |this, cx| { + let edits = this.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut edits: Vec<(Range, String)> = Default::default(); + let line_mode = s.line_mode; + s.move_with(|display_map, selection| { + if !selection.is_empty() || line_mode { + return; + } - // this.buffer.update(cx, |buffer, cx| { - // let snapshot = buffer.read(cx); - // let mut start_offset = 0; - // let mut edits = Vec::new(); - // let mut original_indent_columns = Vec::new(); - // let line_mode = this.selections.line_mode; - // for (ix, selection) in old_selections.iter().enumerate() { - // let to_insert; - // let entire_line; - // let original_indent_column; - // if let Some(clipboard_selection) = clipboard_selections.get(ix) { - // let end_offset = start_offset + clipboard_selection.len; - // to_insert = &clipboard_text[start_offset..end_offset]; - // entire_line = clipboard_selection.is_entire_line; - // start_offset = end_offset + 1; - // original_indent_column = - // Some(clipboard_selection.first_line_indent); - // } else { - // to_insert = clipboard_text.as_str(); - // entire_line = all_selections_were_entire_line; - // original_indent_column = first_selection_indent_column - // } + let mut head = selection.head(); + let mut transpose_offset = head.to_offset(display_map, Bias::Right); + if head.column() == display_map.line_len(head.row()) { + transpose_offset = display_map + .buffer_snapshot + .clip_offset(transpose_offset.saturating_sub(1), Bias::Left); + } - // // If the corresponding selection was empty when this slice of the - // // clipboard text was written, then the entire line containing the - // // selection was copied. If this selection is also currently empty, - // // then paste the line before the current line of the buffer. - // let range = if selection.is_empty() && !line_mode && entire_line { - // let column = selection.start.to_point(&snapshot).column as usize; - // let line_start = selection.start - column; - // line_start..line_start - // } else { - // selection.range() - // }; + if transpose_offset == 0 { + return; + } - // edits.push((range, to_insert)); - // original_indent_columns.extend(original_indent_column); - // } - // drop(snapshot); + *head.column_mut() += 1; + head = display_map.clip_point(head, Bias::Right); + let goal = SelectionGoal::HorizontalPosition( + display_map.x_for_point(head, &text_layout_details).into(), + ); + selection.collapse_to(head, goal); + + let transpose_start = display_map + .buffer_snapshot + .clip_offset(transpose_offset.saturating_sub(1), Bias::Left); + if edits.last().map_or(true, |e| e.0.end <= transpose_start) { + let transpose_end = display_map + .buffer_snapshot + .clip_offset(transpose_offset + 1, Bias::Right); + if let Some(ch) = + display_map.buffer_snapshot.chars_at(transpose_start).next() + { + edits.push((transpose_start..transpose_offset, String::new())); + edits.push((transpose_end..transpose_end, ch.to_string())); + } + } + }); + edits + }); + this.buffer + .update(cx, |buffer, cx| buffer.edit(edits, None, cx)); + let selections = this.selections.all::(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(selections); + }); + }); + } - // buffer.edit( - // edits, - // Some(AutoindentMode::Block { - // original_indent_columns, - // }), - // cx, - // ); - // }); + pub fn cut(&mut self, _: &Cut, cx: &mut ViewContext) { + let mut text = String::new(); + let buffer = self.buffer.read(cx).snapshot(cx); + let mut selections = self.selections.all::(cx); + let mut clipboard_selections = Vec::with_capacity(selections.len()); + { + let max_point = buffer.max_point(); + let mut is_first = true; + for selection in &mut selections { + let is_entire_line = selection.is_empty() || self.selections.line_mode; + if is_entire_line { + selection.start = Point::new(selection.start.row, 0); + selection.end = cmp::min(max_point, Point::new(selection.end.row + 1, 0)); + selection.goal = SelectionGoal::None; + } + if is_first { + is_first = false; + } else { + text += "\n"; + } + let mut len = 0; + for chunk in buffer.text_for_range(selection.start..selection.end) { + text.push_str(chunk); + len += chunk.len(); + } + clipboard_selections.push(ClipboardSelection { + len, + is_entire_line, + first_line_indent: buffer.indent_size_for_line(selection.start.row).len, + }); + } + } - // let selections = this.selections.all::(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // } else { - // this.insert(&clipboard_text, cx); - // } - // } - // }); - // } + self.transact(cx, |this, cx| { + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(selections); + }); + this.insert("", cx); + cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections)); + }); + } - // pub fn undo(&mut self, _: &Undo, cx: &mut ViewContext) { - // if let Some(tx_id) = self.buffer.update(cx, |buffer, cx| buffer.undo(cx)) { - // if let Some((selections, _)) = self.selection_history.transaction(tx_id).cloned() { - // self.change_selections(None, cx, |s| { - // s.select_anchors(selections.to_vec()); - // }); - // } - // self.request_autoscroll(Autoscroll::fit(), cx); - // self.unmark_text(cx); - // self.refresh_copilot_suggestions(true, cx); - // cx.emit(Event::Edited); - // } - // } + pub fn copy(&mut self, _: &Copy, cx: &mut ViewContext) { + let selections = self.selections.all::(cx); + let buffer = self.buffer.read(cx).read(cx); + let mut text = String::new(); - // pub fn redo(&mut self, _: &Redo, cx: &mut ViewContext) { - // if let Some(tx_id) = self.buffer.update(cx, |buffer, cx| buffer.redo(cx)) { - // if let Some((_, Some(selections))) = self.selection_history.transaction(tx_id).cloned() - // { - // self.change_selections(None, cx, |s| { - // s.select_anchors(selections.to_vec()); - // }); - // } - // self.request_autoscroll(Autoscroll::fit(), cx); - // self.unmark_text(cx); - // self.refresh_copilot_suggestions(true, cx); - // cx.emit(Event::Edited); - // } - // } + let mut clipboard_selections = Vec::with_capacity(selections.len()); + { + let max_point = buffer.max_point(); + let mut is_first = true; + for selection in selections.iter() { + let mut start = selection.start; + let mut end = selection.end; + let is_entire_line = selection.is_empty() || self.selections.line_mode; + if is_entire_line { + start = Point::new(start.row, 0); + end = cmp::min(max_point, Point::new(end.row + 1, 0)); + } + if is_first { + is_first = false; + } else { + text += "\n"; + } + let mut len = 0; + for chunk in buffer.text_for_range(start..end) { + text.push_str(chunk); + len += chunk.len(); + } + clipboard_selections.push(ClipboardSelection { + len, + is_entire_line, + first_line_indent: buffer.indent_size_for_line(start.row).len, + }); + } + } - // pub fn finalize_last_transaction(&mut self, cx: &mut ViewContext) { - // self.buffer - // .update(cx, |buffer, cx| buffer.finalize_last_transaction(cx)); - // } + cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections)); + } + + pub fn paste(&mut self, _: &Paste, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + if let Some(item) = cx.read_from_clipboard() { + let clipboard_text = Cow::Borrowed(item.text()); + if let Some(mut clipboard_selections) = item.metadata::>() { + let old_selections = this.selections.all::(cx); + let all_selections_were_entire_line = + clipboard_selections.iter().all(|s| s.is_entire_line); + let first_selection_indent_column = + clipboard_selections.first().map(|s| s.first_line_indent); + if clipboard_selections.len() != old_selections.len() { + clipboard_selections.drain(..); + } + + this.buffer.update(cx, |buffer, cx| { + let snapshot = buffer.read(cx); + let mut start_offset = 0; + let mut edits = Vec::new(); + let mut original_indent_columns = Vec::new(); + let line_mode = this.selections.line_mode; + for (ix, selection) in old_selections.iter().enumerate() { + let to_insert; + let entire_line; + let original_indent_column; + if let Some(clipboard_selection) = clipboard_selections.get(ix) { + let end_offset = start_offset + clipboard_selection.len; + to_insert = &clipboard_text[start_offset..end_offset]; + entire_line = clipboard_selection.is_entire_line; + start_offset = end_offset + 1; + original_indent_column = + Some(clipboard_selection.first_line_indent); + } else { + to_insert = clipboard_text.as_str(); + entire_line = all_selections_were_entire_line; + original_indent_column = first_selection_indent_column + } + + // If the corresponding selection was empty when this slice of the + // clipboard text was written, then the entire line containing the + // selection was copied. If this selection is also currently empty, + // then paste the line before the current line of the buffer. + let range = if selection.is_empty() && !line_mode && entire_line { + let column = selection.start.to_point(&snapshot).column as usize; + let line_start = selection.start - column; + line_start..line_start + } else { + selection.range() + }; + + edits.push((range, to_insert)); + original_indent_columns.extend(original_indent_column); + } + drop(snapshot); + + buffer.edit( + edits, + Some(AutoindentMode::Block { + original_indent_columns, + }), + cx, + ); + }); + + let selections = this.selections.all::(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + } else { + this.insert(&clipboard_text, cx); + } + } + }); + } + + pub fn undo(&mut self, _: &Undo, cx: &mut ViewContext) { + if let Some(tx_id) = self.buffer.update(cx, |buffer, cx| buffer.undo(cx)) { + if let Some((selections, _)) = self.selection_history.transaction(tx_id).cloned() { + self.change_selections(None, cx, |s| { + s.select_anchors(selections.to_vec()); + }); + } + self.request_autoscroll(Autoscroll::fit(), cx); + self.unmark_text(cx); + self.refresh_copilot_suggestions(true, cx); + cx.emit(Event::Edited); + } + } + + pub fn redo(&mut self, _: &Redo, cx: &mut ViewContext) { + if let Some(tx_id) = self.buffer.update(cx, |buffer, cx| buffer.redo(cx)) { + if let Some((_, Some(selections))) = self.selection_history.transaction(tx_id).cloned() + { + self.change_selections(None, cx, |s| { + s.select_anchors(selections.to_vec()); + }); + } + self.request_autoscroll(Autoscroll::fit(), cx); + self.unmark_text(cx); + self.refresh_copilot_suggestions(true, cx); + cx.emit(Event::Edited); + } + } + + pub fn finalize_last_transaction(&mut self, cx: &mut ViewContext) { + self.buffer + .update(cx, |buffer, cx| buffer.finalize_last_transaction(cx)); + } pub fn move_left(&mut self, _: &MoveLeft, cx: &mut ViewContext) { self.change_selections(Some(Autoscroll::fit()), cx, |s| { @@ -5732,11 +5743,11 @@ impl Editor { }) } - // pub fn select_left(&mut self, _: &SelectLeft, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| (movement::left(map, head), SelectionGoal::None)); - // }) - // } + pub fn select_left(&mut self, _: &SelectLeft, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| (movement::left(map, head), SelectionGoal::None)); + }) + } pub fn move_right(&mut self, _: &MoveRight, cx: &mut ViewContext) { self.change_selections(Some(Autoscroll::fit()), cx, |s| { @@ -5752,11 +5763,11 @@ impl Editor { }) } - // pub fn select_right(&mut self, _: &SelectRight, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| (movement::right(map, head), SelectionGoal::None)); - // }) - // } + pub fn select_right(&mut self, _: &SelectRight, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| (movement::right(map, head), SelectionGoal::None)); + }) + } pub fn move_up(&mut self, _: &MoveUp, cx: &mut ViewContext) { if self.take_rename(true, cx).is_some() { @@ -5788,76 +5799,40 @@ impl Editor { }) } - // pub fn move_page_up(&mut self, action: &MovePageUp, cx: &mut ViewContext) { - // if self.take_rename(true, cx).is_some() { - // return; - // } - - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } - - // let row_count = if let Some(row_count) = self.visible_line_count() { - // row_count as u32 - 1 - // } else { - // return; - // }; - - // let autoscroll = if action.center_cursor { - // Autoscroll::center() - // } else { - // Autoscroll::fit() - // }; - - // let text_layout_details = &self.text_layout_details(cx); - - // self.change_selections(Some(autoscroll), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if !selection.is_empty() && !line_mode { - // selection.goal = SelectionGoal::None; - // } - // let (cursor, goal) = movement::up_by_rows( - // map, - // selection.end, - // row_count, - // selection.goal, - // false, - // &text_layout_details, - // ); - // selection.collapse_to(cursor, goal); - // }); - // }); - // } - - // pub fn select_up(&mut self, _: &SelectUp, cx: &mut ViewContext) { - // let text_layout_details = &self.text_layout_details(cx); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, goal| { - // movement::up(map, head, goal, false, &text_layout_details) - // }) - // }) - // } - - pub fn move_down(&mut self, _: &MoveDown, cx: &mut ViewContext) { - self.take_rename(true, cx); + pub fn move_page_up(&mut self, action: &MovePageUp, cx: &mut ViewContext) { + if self.take_rename(true, cx).is_some() { + return; + } - if self.mode == EditorMode::SingleLine { + if matches!(self.mode, EditorMode::SingleLine) { cx.propagate(); return; } + let row_count = if let Some(row_count) = self.visible_line_count() { + row_count as u32 - 1 + } else { + return; + }; + + let autoscroll = if action.center_cursor { + Autoscroll::center() + } else { + Autoscroll::fit() + }; + let text_layout_details = &self.text_layout_details(cx); - self.change_selections(Some(Autoscroll::fit()), cx, |s| { + + self.change_selections(Some(autoscroll), cx, |s| { let line_mode = s.line_mode; s.move_with(|map, selection| { if !selection.is_empty() && !line_mode { selection.goal = SelectionGoal::None; } - let (cursor, goal) = movement::down( + let (cursor, goal) = movement::up_by_rows( map, selection.end, + row_count, selection.goal, false, &text_layout_details, @@ -5867,66 +5842,102 @@ impl Editor { }); } - // pub fn move_page_down(&mut self, action: &MovePageDown, cx: &mut ViewContext) { - // if self.take_rename(true, cx).is_some() { - // return; - // } - - // if self - // .context_menu - // .write() - // .as_mut() - // .map(|menu| menu.select_last(self.project.as_ref(), cx)) - // .unwrap_or(false) - // { - // return; - // } + pub fn select_up(&mut self, _: &SelectUp, cx: &mut ViewContext) { + let text_layout_details = &self.text_layout_details(cx); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, goal| { + movement::up(map, head, goal, false, &text_layout_details) + }) + }) + } - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + pub fn move_down(&mut self, _: &MoveDown, cx: &mut ViewContext) { + self.take_rename(true, cx); - // let row_count = if let Some(row_count) = self.visible_line_count() { - // row_count as u32 - 1 - // } else { - // return; - // }; + if self.mode == EditorMode::SingleLine { + cx.propagate(); + return; + } - // let autoscroll = if action.center_cursor { - // Autoscroll::center() - // } else { - // Autoscroll::fit() - // }; + let text_layout_details = &self.text_layout_details(cx); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if !selection.is_empty() && !line_mode { + selection.goal = SelectionGoal::None; + } + let (cursor, goal) = movement::down( + map, + selection.end, + selection.goal, + false, + &text_layout_details, + ); + selection.collapse_to(cursor, goal); + }); + }); + } - // let text_layout_details = &self.text_layout_details(cx); - // self.change_selections(Some(autoscroll), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if !selection.is_empty() && !line_mode { - // selection.goal = SelectionGoal::None; - // } - // let (cursor, goal) = movement::down_by_rows( - // map, - // selection.end, - // row_count, - // selection.goal, - // false, - // &text_layout_details, - // ); - // selection.collapse_to(cursor, goal); - // }); - // }); - // } + pub fn move_page_down(&mut self, action: &MovePageDown, cx: &mut ViewContext) { + if self.take_rename(true, cx).is_some() { + return; + } - // pub fn select_down(&mut self, _: &SelectDown, cx: &mut ViewContext) { - // let text_layout_details = &self.text_layout_details(cx); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, goal| { - // movement::down(map, head, goal, false, &text_layout_details) - // }) - // }); - // } + if self + .context_menu + .write() + .as_mut() + .map(|menu| menu.select_last(self.project.as_ref(), cx)) + .unwrap_or(false) + { + return; + } + + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } + + let row_count = if let Some(row_count) = self.visible_line_count() { + row_count as u32 - 1 + } else { + return; + }; + + let autoscroll = if action.center_cursor { + Autoscroll::center() + } else { + Autoscroll::fit() + }; + + let text_layout_details = &self.text_layout_details(cx); + self.change_selections(Some(autoscroll), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if !selection.is_empty() && !line_mode { + selection.goal = SelectionGoal::None; + } + let (cursor, goal) = movement::down_by_rows( + map, + selection.end, + row_count, + selection.goal, + false, + &text_layout_details, + ); + selection.collapse_to(cursor, goal); + }); + }); + } + + pub fn select_down(&mut self, _: &SelectDown, cx: &mut ViewContext) { + let text_layout_details = &self.text_layout_details(cx); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, goal| { + movement::down(map, head, goal, false, &text_layout_details) + }) + }); + } // pub fn context_menu_first(&mut self, _: &ContextMenuFirst, cx: &mut ViewContext) { // if let Some(context_menu) = self.context_menu.write().as_mut() { @@ -5952,397 +5963,397 @@ impl Editor { // } // } - // pub fn move_to_previous_word_start( - // &mut self, - // _: &MoveToPreviousWordStart, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // ( - // movement::previous_word_start(map, head), - // SelectionGoal::None, - // ) - // }); - // }) - // } - - // pub fn move_to_previous_subword_start( - // &mut self, - // _: &MoveToPreviousSubwordStart, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // ( - // movement::previous_subword_start(map, head), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn move_to_previous_word_start( + &mut self, + _: &MoveToPreviousWordStart, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + ( + movement::previous_word_start(map, head), + SelectionGoal::None, + ) + }); + }) + } - // pub fn select_to_previous_word_start( - // &mut self, - // _: &SelectToPreviousWordStart, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::previous_word_start(map, head), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn move_to_previous_subword_start( + &mut self, + _: &MoveToPreviousSubwordStart, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + ( + movement::previous_subword_start(map, head), + SelectionGoal::None, + ) + }); + }) + } - // pub fn select_to_previous_subword_start( - // &mut self, - // _: &SelectToPreviousSubwordStart, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::previous_subword_start(map, head), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn select_to_previous_word_start( + &mut self, + _: &SelectToPreviousWordStart, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::previous_word_start(map, head), + SelectionGoal::None, + ) + }); + }) + } - // pub fn delete_to_previous_word_start( - // &mut self, - // _: &DeleteToPreviousWordStart, - // cx: &mut ViewContext, - // ) { - // self.transact(cx, |this, cx| { - // this.select_autoclose_pair(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if selection.is_empty() && !line_mode { - // let cursor = movement::previous_word_start(map, selection.head()); - // selection.set_head(cursor, SelectionGoal::None); - // } - // }); - // }); - // this.insert("", cx); - // }); - // } + pub fn select_to_previous_subword_start( + &mut self, + _: &SelectToPreviousSubwordStart, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::previous_subword_start(map, head), + SelectionGoal::None, + ) + }); + }) + } - // pub fn delete_to_previous_subword_start( - // &mut self, - // _: &DeleteToPreviousSubwordStart, - // cx: &mut ViewContext, - // ) { - // self.transact(cx, |this, cx| { - // this.select_autoclose_pair(cx); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if selection.is_empty() && !line_mode { - // let cursor = movement::previous_subword_start(map, selection.head()); - // selection.set_head(cursor, SelectionGoal::None); - // } - // }); - // }); - // this.insert("", cx); - // }); - // } + pub fn delete_to_previous_word_start( + &mut self, + _: &DeleteToPreviousWordStart, + cx: &mut ViewContext, + ) { + self.transact(cx, |this, cx| { + this.select_autoclose_pair(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if selection.is_empty() && !line_mode { + let cursor = movement::previous_word_start(map, selection.head()); + selection.set_head(cursor, SelectionGoal::None); + } + }); + }); + this.insert("", cx); + }); + } - // pub fn move_to_next_word_end(&mut self, _: &MoveToNextWordEnd, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // (movement::next_word_end(map, head), SelectionGoal::None) - // }); - // }) - // } + pub fn delete_to_previous_subword_start( + &mut self, + _: &DeleteToPreviousSubwordStart, + cx: &mut ViewContext, + ) { + self.transact(cx, |this, cx| { + this.select_autoclose_pair(cx); + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if selection.is_empty() && !line_mode { + let cursor = movement::previous_subword_start(map, selection.head()); + selection.set_head(cursor, SelectionGoal::None); + } + }); + }); + this.insert("", cx); + }); + } - // pub fn move_to_next_subword_end( - // &mut self, - // _: &MoveToNextSubwordEnd, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // (movement::next_subword_end(map, head), SelectionGoal::None) - // }); - // }) - // } + pub fn move_to_next_word_end(&mut self, _: &MoveToNextWordEnd, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + (movement::next_word_end(map, head), SelectionGoal::None) + }); + }) + } - // pub fn select_to_next_word_end(&mut self, _: &SelectToNextWordEnd, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // (movement::next_word_end(map, head), SelectionGoal::None) - // }); - // }) - // } + pub fn move_to_next_subword_end( + &mut self, + _: &MoveToNextSubwordEnd, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + (movement::next_subword_end(map, head), SelectionGoal::None) + }); + }) + } - // pub fn select_to_next_subword_end( - // &mut self, - // _: &SelectToNextSubwordEnd, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // (movement::next_subword_end(map, head), SelectionGoal::None) - // }); - // }) - // } + pub fn select_to_next_word_end(&mut self, _: &SelectToNextWordEnd, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + (movement::next_word_end(map, head), SelectionGoal::None) + }); + }) + } - // pub fn delete_to_next_word_end(&mut self, _: &DeleteToNextWordEnd, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let line_mode = s.line_mode; - // s.move_with(|map, selection| { - // if selection.is_empty() && !line_mode { - // let cursor = movement::next_word_end(map, selection.head()); - // selection.set_head(cursor, SelectionGoal::None); - // } - // }); - // }); - // this.insert("", cx); - // }); - // } + pub fn select_to_next_subword_end( + &mut self, + _: &SelectToNextSubwordEnd, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + (movement::next_subword_end(map, head), SelectionGoal::None) + }); + }) + } - // pub fn delete_to_next_subword_end( - // &mut self, - // _: &DeleteToNextSubwordEnd, - // cx: &mut ViewContext, - // ) { - // self.transact(cx, |this, cx| { - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_with(|map, selection| { - // if selection.is_empty() { - // let cursor = movement::next_subword_end(map, selection.head()); - // selection.set_head(cursor, SelectionGoal::None); - // } - // }); - // }); - // this.insert("", cx); - // }); - // } + pub fn delete_to_next_word_end(&mut self, _: &DeleteToNextWordEnd, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + let line_mode = s.line_mode; + s.move_with(|map, selection| { + if selection.is_empty() && !line_mode { + let cursor = movement::next_word_end(map, selection.head()); + selection.set_head(cursor, SelectionGoal::None); + } + }); + }); + this.insert("", cx); + }); + } - // pub fn move_to_beginning_of_line( - // &mut self, - // _: &MoveToBeginningOfLine, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // ( - // movement::indented_line_beginning(map, head, true), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn delete_to_next_subword_end( + &mut self, + _: &DeleteToNextSubwordEnd, + cx: &mut ViewContext, + ) { + self.transact(cx, |this, cx| { + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_with(|map, selection| { + if selection.is_empty() { + let cursor = movement::next_subword_end(map, selection.head()); + selection.set_head(cursor, SelectionGoal::None); + } + }); + }); + this.insert("", cx); + }); + } - // pub fn select_to_beginning_of_line( - // &mut self, - // action: &SelectToBeginningOfLine, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::indented_line_beginning(map, head, action.stop_at_soft_wraps), - // SelectionGoal::None, - // ) - // }); - // }); - // } + pub fn move_to_beginning_of_line( + &mut self, + _: &MoveToBeginningOfLine, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + ( + movement::indented_line_beginning(map, head, true), + SelectionGoal::None, + ) + }); + }) + } - // pub fn delete_to_beginning_of_line( - // &mut self, - // _: &DeleteToBeginningOfLine, - // cx: &mut ViewContext, - // ) { - // self.transact(cx, |this, cx| { - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_with(|_, selection| { - // selection.reversed = true; - // }); - // }); + pub fn select_to_beginning_of_line( + &mut self, + action: &SelectToBeginningOfLine, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::indented_line_beginning(map, head, action.stop_at_soft_wraps), + SelectionGoal::None, + ) + }); + }); + } - // this.select_to_beginning_of_line( - // &SelectToBeginningOfLine { - // stop_at_soft_wraps: false, - // }, - // cx, - // ); - // this.backspace(&Backspace, cx); - // }); - // } + pub fn delete_to_beginning_of_line( + &mut self, + _: &DeleteToBeginningOfLine, + cx: &mut ViewContext, + ) { + self.transact(cx, |this, cx| { + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_with(|_, selection| { + selection.reversed = true; + }); + }); - // pub fn move_to_end_of_line(&mut self, _: &MoveToEndOfLine, cx: &mut ViewContext) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|map, head, _| { - // (movement::line_end(map, head, true), SelectionGoal::None) - // }); - // }) - // } + this.select_to_beginning_of_line( + &SelectToBeginningOfLine { + stop_at_soft_wraps: false, + }, + cx, + ); + this.backspace(&Backspace, cx); + }); + } - // pub fn select_to_end_of_line( - // &mut self, - // action: &SelectToEndOfLine, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::line_end(map, head, action.stop_at_soft_wraps), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn move_to_end_of_line(&mut self, _: &MoveToEndOfLine, cx: &mut ViewContext) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|map, head, _| { + (movement::line_end(map, head, true), SelectionGoal::None) + }); + }) + } - // pub fn delete_to_end_of_line(&mut self, _: &DeleteToEndOfLine, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.select_to_end_of_line( - // &SelectToEndOfLine { - // stop_at_soft_wraps: false, - // }, - // cx, - // ); - // this.delete(&Delete, cx); - // }); - // } + pub fn select_to_end_of_line( + &mut self, + action: &SelectToEndOfLine, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::line_end(map, head, action.stop_at_soft_wraps), + SelectionGoal::None, + ) + }); + }) + } - // pub fn cut_to_end_of_line(&mut self, _: &CutToEndOfLine, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.select_to_end_of_line( - // &SelectToEndOfLine { - // stop_at_soft_wraps: false, - // }, - // cx, - // ); - // this.cut(&Cut, cx); - // }); - // } + pub fn delete_to_end_of_line(&mut self, _: &DeleteToEndOfLine, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.select_to_end_of_line( + &SelectToEndOfLine { + stop_at_soft_wraps: false, + }, + cx, + ); + this.delete(&Delete, cx); + }); + } - // pub fn move_to_start_of_paragraph( - // &mut self, - // _: &MoveToStartOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + pub fn cut_to_end_of_line(&mut self, _: &CutToEndOfLine, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.select_to_end_of_line( + &SelectToEndOfLine { + stop_at_soft_wraps: false, + }, + cx, + ); + this.cut(&Cut, cx); + }); + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_with(|map, selection| { - // selection.collapse_to( - // movement::start_of_paragraph(map, selection.head(), 1), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn move_to_start_of_paragraph( + &mut self, + _: &MoveToStartOfParagraph, + cx: &mut ViewContext, + ) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn move_to_end_of_paragraph( - // &mut self, - // _: &MoveToEndOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_with(|map, selection| { + selection.collapse_to( + movement::start_of_paragraph(map, selection.head(), 1), + SelectionGoal::None, + ) + }); + }) + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_with(|map, selection| { - // selection.collapse_to( - // movement::end_of_paragraph(map, selection.head(), 1), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn move_to_end_of_paragraph( + &mut self, + _: &MoveToEndOfParagraph, + cx: &mut ViewContext, + ) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn select_to_start_of_paragraph( - // &mut self, - // _: &SelectToStartOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_with(|map, selection| { + selection.collapse_to( + movement::end_of_paragraph(map, selection.head(), 1), + SelectionGoal::None, + ) + }); + }) + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::start_of_paragraph(map, head, 1), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn select_to_start_of_paragraph( + &mut self, + _: &SelectToStartOfParagraph, + cx: &mut ViewContext, + ) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn select_to_end_of_paragraph( - // &mut self, - // _: &SelectToEndOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::start_of_paragraph(map, head, 1), + SelectionGoal::None, + ) + }); + }) + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_heads_with(|map, head, _| { - // ( - // movement::end_of_paragraph(map, head, 1), - // SelectionGoal::None, - // ) - // }); - // }) - // } + pub fn select_to_end_of_paragraph( + &mut self, + _: &SelectToEndOfParagraph, + cx: &mut ViewContext, + ) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn move_to_beginning(&mut self, _: &MoveToBeginning, cx: &mut ViewContext) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_heads_with(|map, head, _| { + ( + movement::end_of_paragraph(map, head, 1), + SelectionGoal::None, + ) + }); + }) + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_ranges(vec![0..0]); - // }); - // } + pub fn move_to_beginning(&mut self, _: &MoveToBeginning, cx: &mut ViewContext) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn select_to_beginning(&mut self, _: &SelectToBeginning, cx: &mut ViewContext) { - // let mut selection = self.selections.last::(cx); - // selection.set_head(Point::zero(), SelectionGoal::None); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_ranges(vec![0..0]); + }); + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(vec![selection]); - // }); - // } + pub fn select_to_beginning(&mut self, _: &SelectToBeginning, cx: &mut ViewContext) { + let mut selection = self.selections.last::(cx); + selection.set_head(Point::zero(), SelectionGoal::None); - // pub fn move_to_end(&mut self, _: &MoveToEnd, cx: &mut ViewContext) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate(); - // return; - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(vec![selection]); + }); + } - // let cursor = self.buffer.read(cx).read(cx).len(); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_ranges(vec![cursor..cursor]) - // }); - // } + pub fn move_to_end(&mut self, _: &MoveToEnd, cx: &mut ViewContext) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // pub fn set_nav_history(&mut self, nav_history: Option) { - // self.nav_history = nav_history; - // } + let cursor = self.buffer.read(cx).read(cx).len(); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_ranges(vec![cursor..cursor]) + }); + } - // pub fn nav_history(&self) -> Option<&ItemNavHistory> { - // self.nav_history.as_ref() - // } + pub fn set_nav_history(&mut self, nav_history: Option) { + self.nav_history = nav_history; + } + + pub fn nav_history(&self) -> Option<&ItemNavHistory> { + self.nav_history.as_ref() + } fn push_to_nav_history( &mut self, @@ -6376,1018 +6387,1019 @@ impl Editor { } } - // pub fn select_to_end(&mut self, _: &SelectToEnd, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx).snapshot(cx); - // let mut selection = self.selections.first::(cx); - // selection.set_head(buffer.len(), SelectionGoal::None); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(vec![selection]); - // }); - // } - - // pub fn select_all(&mut self, _: &SelectAll, cx: &mut ViewContext) { - // let end = self.buffer.read(cx).read(cx).len(); - // self.change_selections(None, cx, |s| { - // s.select_ranges(vec![0..end]); - // }); - // } - - // pub fn select_line(&mut self, _: &SelectLine, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let mut selections = self.selections.all::(cx); - // let max_point = display_map.buffer_snapshot.max_point(); - // for selection in &mut selections { - // let rows = selection.spanned_rows(true, &display_map); - // selection.start = Point::new(rows.start, 0); - // selection.end = cmp::min(max_point, Point::new(rows.end, 0)); - // selection.reversed = false; - // } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(selections); - // }); - // } - - // pub fn split_selection_into_lines( - // &mut self, - // _: &SplitSelectionIntoLines, - // cx: &mut ViewContext, - // ) { - // let mut to_unfold = Vec::new(); - // let mut new_selection_ranges = Vec::new(); - // { - // let selections = self.selections.all::(cx); - // let buffer = self.buffer.read(cx).read(cx); - // for selection in selections { - // for row in selection.start.row..selection.end.row { - // let cursor = Point::new(row, buffer.line_len(row)); - // new_selection_ranges.push(cursor..cursor); - // } - // new_selection_ranges.push(selection.end..selection.end); - // to_unfold.push(selection.start..selection.end); - // } - // } - // self.unfold_ranges(to_unfold, true, true, cx); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_ranges(new_selection_ranges); - // }); - // } - - // pub fn add_selection_above(&mut self, _: &AddSelectionAbove, cx: &mut ViewContext) { - // self.add_selection(true, cx); - // } + pub fn select_to_end(&mut self, _: &SelectToEnd, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx).snapshot(cx); + let mut selection = self.selections.first::(cx); + selection.set_head(buffer.len(), SelectionGoal::None); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(vec![selection]); + }); + } - // pub fn add_selection_below(&mut self, _: &AddSelectionBelow, cx: &mut ViewContext) { - // self.add_selection(false, cx); - // } + pub fn select_all(&mut self, _: &SelectAll, cx: &mut ViewContext) { + let end = self.buffer.read(cx).read(cx).len(); + self.change_selections(None, cx, |s| { + s.select_ranges(vec![0..end]); + }); + } - // fn add_selection(&mut self, above: bool, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let mut selections = self.selections.all::(cx); - // let text_layout_details = self.text_layout_details(cx); - // let mut state = self.add_selections_state.take().unwrap_or_else(|| { - // let oldest_selection = selections.iter().min_by_key(|s| s.id).unwrap().clone(); - // let range = oldest_selection.display_range(&display_map).sorted(); - - // let start_x = display_map.x_for_point(range.start, &text_layout_details); - // let end_x = display_map.x_for_point(range.end, &text_layout_details); - // let positions = start_x.min(end_x)..start_x.max(end_x); - - // selections.clear(); - // let mut stack = Vec::new(); - // for row in range.start.row()..=range.end.row() { - // if let Some(selection) = self.selections.build_columnar_selection( - // &display_map, - // row, - // &positions, - // oldest_selection.reversed, - // &text_layout_details, - // ) { - // stack.push(selection.id); - // selections.push(selection); - // } - // } + pub fn select_line(&mut self, _: &SelectLine, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let mut selections = self.selections.all::(cx); + let max_point = display_map.buffer_snapshot.max_point(); + for selection in &mut selections { + let rows = selection.spanned_rows(true, &display_map); + selection.start = Point::new(rows.start, 0); + selection.end = cmp::min(max_point, Point::new(rows.end, 0)); + selection.reversed = false; + } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(selections); + }); + } - // if above { - // stack.reverse(); - // } + pub fn split_selection_into_lines( + &mut self, + _: &SplitSelectionIntoLines, + cx: &mut ViewContext, + ) { + let mut to_unfold = Vec::new(); + let mut new_selection_ranges = Vec::new(); + { + let selections = self.selections.all::(cx); + let buffer = self.buffer.read(cx).read(cx); + for selection in selections { + for row in selection.start.row..selection.end.row { + let cursor = Point::new(row, buffer.line_len(row)); + new_selection_ranges.push(cursor..cursor); + } + new_selection_ranges.push(selection.end..selection.end); + to_unfold.push(selection.start..selection.end); + } + } + self.unfold_ranges(to_unfold, true, true, cx); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_ranges(new_selection_ranges); + }); + } - // AddSelectionsState { above, stack } - // }); + pub fn add_selection_above(&mut self, _: &AddSelectionAbove, cx: &mut ViewContext) { + self.add_selection(true, cx); + } - // let last_added_selection = *state.stack.last().unwrap(); - // let mut new_selections = Vec::new(); - // if above == state.above { - // let end_row = if above { - // 0 - // } else { - // display_map.max_point().row() - // }; + pub fn add_selection_below(&mut self, _: &AddSelectionBelow, cx: &mut ViewContext) { + self.add_selection(false, cx); + } - // 'outer: for selection in selections { - // if selection.id == last_added_selection { - // let range = selection.display_range(&display_map).sorted(); - // debug_assert_eq!(range.start.row(), range.end.row()); - // let mut row = range.start.row(); - // let positions = if let SelectionGoal::HorizontalRange { start, end } = - // selection.goal - // { - // start..end - // } else { - // let start_x = display_map.x_for_point(range.start, &text_layout_details); - // let end_x = display_map.x_for_point(range.end, &text_layout_details); + fn add_selection(&mut self, above: bool, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let mut selections = self.selections.all::(cx); + let text_layout_details = self.text_layout_details(cx); + let mut state = self.add_selections_state.take().unwrap_or_else(|| { + let oldest_selection = selections.iter().min_by_key(|s| s.id).unwrap().clone(); + let range = oldest_selection.display_range(&display_map).sorted(); + + let start_x = display_map.x_for_point(range.start, &text_layout_details); + let end_x = display_map.x_for_point(range.end, &text_layout_details); + let positions = start_x.min(end_x)..start_x.max(end_x); + + selections.clear(); + let mut stack = Vec::new(); + for row in range.start.row()..=range.end.row() { + if let Some(selection) = self.selections.build_columnar_selection( + &display_map, + row, + &positions, + oldest_selection.reversed, + &text_layout_details, + ) { + stack.push(selection.id); + selections.push(selection); + } + } - // start_x.min(end_x)..start_x.max(end_x) - // }; + if above { + stack.reverse(); + } - // while row != end_row { - // if above { - // row -= 1; - // } else { - // row += 1; - // } + AddSelectionsState { above, stack } + }); - // if let Some(new_selection) = self.selections.build_columnar_selection( - // &display_map, - // row, - // &positions, - // selection.reversed, - // &text_layout_details, - // ) { - // state.stack.push(new_selection.id); - // if above { - // new_selections.push(new_selection); - // new_selections.push(selection); - // } else { - // new_selections.push(selection); - // new_selections.push(new_selection); - // } + let last_added_selection = *state.stack.last().unwrap(); + let mut new_selections = Vec::new(); + if above == state.above { + let end_row = if above { + 0 + } else { + display_map.max_point().row() + }; - // continue 'outer; - // } - // } - // } + 'outer: for selection in selections { + if selection.id == last_added_selection { + let range = selection.display_range(&display_map).sorted(); + debug_assert_eq!(range.start.row(), range.end.row()); + let mut row = range.start.row(); + let positions = if let SelectionGoal::HorizontalRange { start, end } = + selection.goal + { + px(start)..px(end) + } else { + let start_x = display_map.x_for_point(range.start, &text_layout_details); + let end_x = display_map.x_for_point(range.end, &text_layout_details); + start_x.min(end_x)..start_x.max(end_x) + }; - // new_selections.push(selection); - // } - // } else { - // new_selections = selections; - // new_selections.retain(|s| s.id != last_added_selection); - // state.stack.pop(); - // } + while row != end_row { + if above { + row -= 1; + } else { + row += 1; + } - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - // if state.stack.len() > 1 { - // self.add_selections_state = Some(state); - // } - // } + if let Some(new_selection) = self.selections.build_columnar_selection( + &display_map, + row, + &positions, + selection.reversed, + &text_layout_details, + ) { + state.stack.push(new_selection.id); + if above { + new_selections.push(new_selection); + new_selections.push(selection); + } else { + new_selections.push(selection); + new_selections.push(new_selection); + } - // pub fn select_next_match_internal( - // &mut self, - // display_map: &DisplaySnapshot, - // replace_newest: bool, - // autoscroll: Option, - // cx: &mut ViewContext, - // ) -> Result<()> { - // fn select_next_match_ranges( - // this: &mut Editor, - // range: Range, - // replace_newest: bool, - // auto_scroll: Option, - // cx: &mut ViewContext, - // ) { - // this.unfold_ranges([range.clone()], false, true, cx); - // this.change_selections(auto_scroll, cx, |s| { - // if replace_newest { - // s.delete(s.newest_anchor().id); - // } - // s.insert_range(range.clone()); - // }); - // } + continue 'outer; + } + } + } - // let buffer = &display_map.buffer_snapshot; - // let mut selections = self.selections.all::(cx); - // if let Some(mut select_next_state) = self.select_next_state.take() { - // let query = &select_next_state.query; - // if !select_next_state.done { - // let first_selection = selections.iter().min_by_key(|s| s.id).unwrap(); - // let last_selection = selections.iter().max_by_key(|s| s.id).unwrap(); - // let mut next_selected_range = None; - - // let bytes_after_last_selection = - // buffer.bytes_in_range(last_selection.end..buffer.len()); - // let bytes_before_first_selection = buffer.bytes_in_range(0..first_selection.start); - // let query_matches = query - // .stream_find_iter(bytes_after_last_selection) - // .map(|result| (last_selection.end, result)) - // .chain( - // query - // .stream_find_iter(bytes_before_first_selection) - // .map(|result| (0, result)), - // ); + new_selections.push(selection); + } + } else { + new_selections = selections; + new_selections.retain(|s| s.id != last_added_selection); + state.stack.pop(); + } - // for (start_offset, query_match) in query_matches { - // let query_match = query_match.unwrap(); // can only fail due to I/O - // let offset_range = - // start_offset + query_match.start()..start_offset + query_match.end(); - // let display_range = offset_range.start.to_display_point(&display_map) - // ..offset_range.end.to_display_point(&display_map); - - // if !select_next_state.wordwise - // || (!movement::is_inside_word(&display_map, display_range.start) - // && !movement::is_inside_word(&display_map, display_range.end)) - // { - // if selections - // .iter() - // .find(|selection| selection.range().overlaps(&offset_range)) - // .is_none() - // { - // next_selected_range = Some(offset_range); - // break; - // } - // } - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + if state.stack.len() > 1 { + self.add_selections_state = Some(state); + } + } - // if let Some(next_selected_range) = next_selected_range { - // select_next_match_ranges( - // self, - // next_selected_range, - // replace_newest, - // autoscroll, - // cx, - // ); - // } else { - // select_next_state.done = true; - // } - // } + pub fn select_next_match_internal( + &mut self, + display_map: &DisplaySnapshot, + replace_newest: bool, + autoscroll: Option, + cx: &mut ViewContext, + ) -> Result<()> { + fn select_next_match_ranges( + this: &mut Editor, + range: Range, + replace_newest: bool, + auto_scroll: Option, + cx: &mut ViewContext, + ) { + this.unfold_ranges([range.clone()], false, true, cx); + this.change_selections(auto_scroll, cx, |s| { + if replace_newest { + s.delete(s.newest_anchor().id); + } + s.insert_range(range.clone()); + }); + } - // self.select_next_state = Some(select_next_state); - // } else if selections.len() == 1 { - // let selection = selections.last_mut().unwrap(); - // if selection.start == selection.end { - // let word_range = movement::surrounding_word( - // &display_map, - // selection.start.to_display_point(&display_map), - // ); - // selection.start = word_range.start.to_offset(&display_map, Bias::Left); - // selection.end = word_range.end.to_offset(&display_map, Bias::Left); - // selection.goal = SelectionGoal::None; - // selection.reversed = false; - - // let query = buffer - // .text_for_range(selection.start..selection.end) - // .collect::(); - - // let is_empty = query.is_empty(); - // let select_state = SelectNextState { - // query: AhoCorasick::new(&[query])?, - // wordwise: true, - // done: is_empty, - // }; - // select_next_match_ranges( - // self, - // selection.start..selection.end, - // replace_newest, - // autoscroll, - // cx, - // ); - // self.select_next_state = Some(select_state); - // } else { - // let query = buffer - // .text_for_range(selection.start..selection.end) - // .collect::(); - // self.select_next_state = Some(SelectNextState { - // query: AhoCorasick::new(&[query])?, - // wordwise: false, - // done: false, - // }); - // self.select_next_match_internal(display_map, replace_newest, autoscroll, cx)?; - // } - // } - // Ok(()) - // } + let buffer = &display_map.buffer_snapshot; + let mut selections = self.selections.all::(cx); + if let Some(mut select_next_state) = self.select_next_state.take() { + let query = &select_next_state.query; + if !select_next_state.done { + let first_selection = selections.iter().min_by_key(|s| s.id).unwrap(); + let last_selection = selections.iter().max_by_key(|s| s.id).unwrap(); + let mut next_selected_range = None; + + let bytes_after_last_selection = + buffer.bytes_in_range(last_selection.end..buffer.len()); + let bytes_before_first_selection = buffer.bytes_in_range(0..first_selection.start); + let query_matches = query + .stream_find_iter(bytes_after_last_selection) + .map(|result| (last_selection.end, result)) + .chain( + query + .stream_find_iter(bytes_before_first_selection) + .map(|result| (0, result)), + ); - // pub fn select_all_matches( - // &mut self, - // action: &SelectAllMatches, - // cx: &mut ViewContext, - // ) -> Result<()> { - // self.push_to_selection_history(); - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + for (start_offset, query_match) in query_matches { + let query_match = query_match.unwrap(); // can only fail due to I/O + let offset_range = + start_offset + query_match.start()..start_offset + query_match.end(); + let display_range = offset_range.start.to_display_point(&display_map) + ..offset_range.end.to_display_point(&display_map); - // loop { - // self.select_next_match_internal(&display_map, action.replace_newest, None, cx)?; + if !select_next_state.wordwise + || (!movement::is_inside_word(&display_map, display_range.start) + && !movement::is_inside_word(&display_map, display_range.end)) + { + if selections + .iter() + .find(|selection| selection.range().overlaps(&offset_range)) + .is_none() + { + next_selected_range = Some(offset_range); + break; + } + } + } - // if self - // .select_next_state - // .as_ref() - // .map(|selection_state| selection_state.done) - // .unwrap_or(true) - // { - // break; - // } - // } + if let Some(next_selected_range) = next_selected_range { + select_next_match_ranges( + self, + next_selected_range, + replace_newest, + autoscroll, + cx, + ); + } else { + select_next_state.done = true; + } + } - // Ok(()) - // } + self.select_next_state = Some(select_next_state); + } else if selections.len() == 1 { + let selection = selections.last_mut().unwrap(); + if selection.start == selection.end { + let word_range = movement::surrounding_word( + &display_map, + selection.start.to_display_point(&display_map), + ); + selection.start = word_range.start.to_offset(&display_map, Bias::Left); + selection.end = word_range.end.to_offset(&display_map, Bias::Left); + selection.goal = SelectionGoal::None; + selection.reversed = false; + + let query = buffer + .text_for_range(selection.start..selection.end) + .collect::(); + + let is_empty = query.is_empty(); + let select_state = SelectNextState { + query: AhoCorasick::new(&[query])?, + wordwise: true, + done: is_empty, + }; + select_next_match_ranges( + self, + selection.start..selection.end, + replace_newest, + autoscroll, + cx, + ); + self.select_next_state = Some(select_state); + } else { + let query = buffer + .text_for_range(selection.start..selection.end) + .collect::(); + self.select_next_state = Some(SelectNextState { + query: AhoCorasick::new(&[query])?, + wordwise: false, + done: false, + }); + self.select_next_match_internal(display_map, replace_newest, autoscroll, cx)?; + } + } + Ok(()) + } - // pub fn select_next(&mut self, action: &SelectNext, cx: &mut ViewContext) -> Result<()> { - // self.push_to_selection_history(); - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // self.select_next_match_internal( - // &display_map, - // action.replace_newest, - // Some(Autoscroll::newest()), - // cx, - // )?; - // Ok(()) - // } + pub fn select_all_matches( + &mut self, + action: &SelectAllMatches, + cx: &mut ViewContext, + ) -> Result<()> { + self.push_to_selection_history(); + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // pub fn select_previous( - // &mut self, - // action: &SelectPrevious, - // cx: &mut ViewContext, - // ) -> Result<()> { - // self.push_to_selection_history(); - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = &display_map.buffer_snapshot; - // let mut selections = self.selections.all::(cx); - // if let Some(mut select_prev_state) = self.select_prev_state.take() { - // let query = &select_prev_state.query; - // if !select_prev_state.done { - // let first_selection = selections.iter().min_by_key(|s| s.id).unwrap(); - // let last_selection = selections.iter().max_by_key(|s| s.id).unwrap(); - // let mut next_selected_range = None; - // // When we're iterating matches backwards, the oldest match will actually be the furthest one in the buffer. - // let bytes_before_last_selection = - // buffer.reversed_bytes_in_range(0..last_selection.start); - // let bytes_after_first_selection = - // buffer.reversed_bytes_in_range(first_selection.end..buffer.len()); - // let query_matches = query - // .stream_find_iter(bytes_before_last_selection) - // .map(|result| (last_selection.start, result)) - // .chain( - // query - // .stream_find_iter(bytes_after_first_selection) - // .map(|result| (buffer.len(), result)), - // ); - // for (end_offset, query_match) in query_matches { - // let query_match = query_match.unwrap(); // can only fail due to I/O - // let offset_range = - // end_offset - query_match.end()..end_offset - query_match.start(); - // let display_range = offset_range.start.to_display_point(&display_map) - // ..offset_range.end.to_display_point(&display_map); - - // if !select_prev_state.wordwise - // || (!movement::is_inside_word(&display_map, display_range.start) - // && !movement::is_inside_word(&display_map, display_range.end)) - // { - // next_selected_range = Some(offset_range); - // break; - // } - // } + loop { + self.select_next_match_internal(&display_map, action.replace_newest, None, cx)?; - // if let Some(next_selected_range) = next_selected_range { - // self.unfold_ranges([next_selected_range.clone()], false, true, cx); - // self.change_selections(Some(Autoscroll::newest()), cx, |s| { - // if action.replace_newest { - // s.delete(s.newest_anchor().id); - // } - // s.insert_range(next_selected_range); - // }); - // } else { - // select_prev_state.done = true; - // } - // } + if self + .select_next_state + .as_ref() + .map(|selection_state| selection_state.done) + .unwrap_or(true) + { + break; + } + } - // self.select_prev_state = Some(select_prev_state); - // } else if selections.len() == 1 { - // let selection = selections.last_mut().unwrap(); - // if selection.start == selection.end { - // let word_range = movement::surrounding_word( - // &display_map, - // selection.start.to_display_point(&display_map), - // ); - // selection.start = word_range.start.to_offset(&display_map, Bias::Left); - // selection.end = word_range.end.to_offset(&display_map, Bias::Left); - // selection.goal = SelectionGoal::None; - // selection.reversed = false; - - // let query = buffer - // .text_for_range(selection.start..selection.end) - // .collect::(); - // let query = query.chars().rev().collect::(); - // let select_state = SelectNextState { - // query: AhoCorasick::new(&[query])?, - // wordwise: true, - // done: false, - // }; - // self.unfold_ranges([selection.start..selection.end], false, true, cx); - // self.change_selections(Some(Autoscroll::newest()), cx, |s| { - // s.select(selections); - // }); - // self.select_prev_state = Some(select_state); - // } else { - // let query = buffer - // .text_for_range(selection.start..selection.end) - // .collect::(); - // let query = query.chars().rev().collect::(); - // self.select_prev_state = Some(SelectNextState { - // query: AhoCorasick::new(&[query])?, - // wordwise: false, - // done: false, - // }); - // self.select_previous(action, cx)?; - // } - // } - // Ok(()) - // } + Ok(()) + } - // pub fn toggle_comments(&mut self, action: &ToggleComments, cx: &mut ViewContext) { - // let text_layout_details = &self.text_layout_details(cx); - // self.transact(cx, |this, cx| { - // let mut selections = this.selections.all::(cx); - // let mut edits = Vec::new(); - // let mut selection_edit_ranges = Vec::new(); - // let mut last_toggled_row = None; - // let snapshot = this.buffer.read(cx).read(cx); - // let empty_str: Arc = "".into(); - // let mut suffixes_inserted = Vec::new(); - - // fn comment_prefix_range( - // snapshot: &MultiBufferSnapshot, - // row: u32, - // comment_prefix: &str, - // comment_prefix_whitespace: &str, - // ) -> Range { - // let start = Point::new(row, snapshot.indent_size_for_line(row).len); - - // let mut line_bytes = snapshot - // .bytes_in_range(start..snapshot.max_point()) - // .flatten() - // .copied(); - - // // If this line currently begins with the line comment prefix, then record - // // the range containing the prefix. - // if line_bytes - // .by_ref() - // .take(comment_prefix.len()) - // .eq(comment_prefix.bytes()) - // { - // // Include any whitespace that matches the comment prefix. - // let matching_whitespace_len = line_bytes - // .zip(comment_prefix_whitespace.bytes()) - // .take_while(|(a, b)| a == b) - // .count() as u32; - // let end = Point::new( - // start.row, - // start.column + comment_prefix.len() as u32 + matching_whitespace_len, - // ); - // start..end - // } else { - // start..start - // } - // } + pub fn select_next(&mut self, action: &SelectNext, cx: &mut ViewContext) -> Result<()> { + self.push_to_selection_history(); + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + self.select_next_match_internal( + &display_map, + action.replace_newest, + Some(Autoscroll::newest()), + cx, + )?; + Ok(()) + } - // fn comment_suffix_range( - // snapshot: &MultiBufferSnapshot, - // row: u32, - // comment_suffix: &str, - // comment_suffix_has_leading_space: bool, - // ) -> Range { - // let end = Point::new(row, snapshot.line_len(row)); - // let suffix_start_column = end.column.saturating_sub(comment_suffix.len() as u32); - - // let mut line_end_bytes = snapshot - // .bytes_in_range(Point::new(end.row, suffix_start_column.saturating_sub(1))..end) - // .flatten() - // .copied(); + pub fn select_previous( + &mut self, + action: &SelectPrevious, + cx: &mut ViewContext, + ) -> Result<()> { + self.push_to_selection_history(); + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = &display_map.buffer_snapshot; + let mut selections = self.selections.all::(cx); + if let Some(mut select_prev_state) = self.select_prev_state.take() { + let query = &select_prev_state.query; + if !select_prev_state.done { + let first_selection = selections.iter().min_by_key(|s| s.id).unwrap(); + let last_selection = selections.iter().max_by_key(|s| s.id).unwrap(); + let mut next_selected_range = None; + // When we're iterating matches backwards, the oldest match will actually be the furthest one in the buffer. + let bytes_before_last_selection = + buffer.reversed_bytes_in_range(0..last_selection.start); + let bytes_after_first_selection = + buffer.reversed_bytes_in_range(first_selection.end..buffer.len()); + let query_matches = query + .stream_find_iter(bytes_before_last_selection) + .map(|result| (last_selection.start, result)) + .chain( + query + .stream_find_iter(bytes_after_first_selection) + .map(|result| (buffer.len(), result)), + ); + for (end_offset, query_match) in query_matches { + let query_match = query_match.unwrap(); // can only fail due to I/O + let offset_range = + end_offset - query_match.end()..end_offset - query_match.start(); + let display_range = offset_range.start.to_display_point(&display_map) + ..offset_range.end.to_display_point(&display_map); + + if !select_prev_state.wordwise + || (!movement::is_inside_word(&display_map, display_range.start) + && !movement::is_inside_word(&display_map, display_range.end)) + { + next_selected_range = Some(offset_range); + break; + } + } - // let leading_space_len = if suffix_start_column > 0 - // && line_end_bytes.next() == Some(b' ') - // && comment_suffix_has_leading_space - // { - // 1 - // } else { - // 0 - // }; + if let Some(next_selected_range) = next_selected_range { + self.unfold_ranges([next_selected_range.clone()], false, true, cx); + self.change_selections(Some(Autoscroll::newest()), cx, |s| { + if action.replace_newest { + s.delete(s.newest_anchor().id); + } + s.insert_range(next_selected_range); + }); + } else { + select_prev_state.done = true; + } + } - // // If this line currently begins with the line comment prefix, then record - // // the range containing the prefix. - // if line_end_bytes.by_ref().eq(comment_suffix.bytes()) { - // let start = Point::new(end.row, suffix_start_column - leading_space_len); - // start..end - // } else { - // end..end - // } - // } + self.select_prev_state = Some(select_prev_state); + } else if selections.len() == 1 { + let selection = selections.last_mut().unwrap(); + if selection.start == selection.end { + let word_range = movement::surrounding_word( + &display_map, + selection.start.to_display_point(&display_map), + ); + selection.start = word_range.start.to_offset(&display_map, Bias::Left); + selection.end = word_range.end.to_offset(&display_map, Bias::Left); + selection.goal = SelectionGoal::None; + selection.reversed = false; + + let query = buffer + .text_for_range(selection.start..selection.end) + .collect::(); + let query = query.chars().rev().collect::(); + let select_state = SelectNextState { + query: AhoCorasick::new(&[query])?, + wordwise: true, + done: false, + }; + self.unfold_ranges([selection.start..selection.end], false, true, cx); + self.change_selections(Some(Autoscroll::newest()), cx, |s| { + s.select(selections); + }); + self.select_prev_state = Some(select_state); + } else { + let query = buffer + .text_for_range(selection.start..selection.end) + .collect::(); + let query = query.chars().rev().collect::(); + self.select_prev_state = Some(SelectNextState { + query: AhoCorasick::new(&[query])?, + wordwise: false, + done: false, + }); + self.select_previous(action, cx)?; + } + } + Ok(()) + } - // // TODO: Handle selections that cross excerpts - // for selection in &mut selections { - // let start_column = snapshot.indent_size_for_line(selection.start.row).len; - // let language = if let Some(language) = - // snapshot.language_scope_at(Point::new(selection.start.row, start_column)) - // { - // language - // } else { - // continue; - // }; + pub fn toggle_comments(&mut self, action: &ToggleComments, cx: &mut ViewContext) { + let text_layout_details = &self.text_layout_details(cx); + self.transact(cx, |this, cx| { + let mut selections = this.selections.all::(cx); + let mut edits = Vec::new(); + let mut selection_edit_ranges = Vec::new(); + let mut last_toggled_row = None; + let snapshot = this.buffer.read(cx).read(cx); + let empty_str: Arc = "".into(); + let mut suffixes_inserted = Vec::new(); + + fn comment_prefix_range( + snapshot: &MultiBufferSnapshot, + row: u32, + comment_prefix: &str, + comment_prefix_whitespace: &str, + ) -> Range { + let start = Point::new(row, snapshot.indent_size_for_line(row).len); + + let mut line_bytes = snapshot + .bytes_in_range(start..snapshot.max_point()) + .flatten() + .copied(); + + // If this line currently begins with the line comment prefix, then record + // the range containing the prefix. + if line_bytes + .by_ref() + .take(comment_prefix.len()) + .eq(comment_prefix.bytes()) + { + // Include any whitespace that matches the comment prefix. + let matching_whitespace_len = line_bytes + .zip(comment_prefix_whitespace.bytes()) + .take_while(|(a, b)| a == b) + .count() as u32; + let end = Point::new( + start.row, + start.column + comment_prefix.len() as u32 + matching_whitespace_len, + ); + start..end + } else { + start..start + } + } - // selection_edit_ranges.clear(); + fn comment_suffix_range( + snapshot: &MultiBufferSnapshot, + row: u32, + comment_suffix: &str, + comment_suffix_has_leading_space: bool, + ) -> Range { + let end = Point::new(row, snapshot.line_len(row)); + let suffix_start_column = end.column.saturating_sub(comment_suffix.len() as u32); + + let mut line_end_bytes = snapshot + .bytes_in_range(Point::new(end.row, suffix_start_column.saturating_sub(1))..end) + .flatten() + .copied(); + + let leading_space_len = if suffix_start_column > 0 + && line_end_bytes.next() == Some(b' ') + && comment_suffix_has_leading_space + { + 1 + } else { + 0 + }; - // // If multiple selections contain a given row, avoid processing that - // // row more than once. - // let mut start_row = selection.start.row; - // if last_toggled_row == Some(start_row) { - // start_row += 1; - // } - // let end_row = - // if selection.end.row > selection.start.row && selection.end.column == 0 { - // selection.end.row - 1 - // } else { - // selection.end.row - // }; - // last_toggled_row = Some(end_row); + // If this line currently begins with the line comment prefix, then record + // the range containing the prefix. + if line_end_bytes.by_ref().eq(comment_suffix.bytes()) { + let start = Point::new(end.row, suffix_start_column - leading_space_len); + start..end + } else { + end..end + } + } - // if start_row > end_row { - // continue; - // } + // TODO: Handle selections that cross excerpts + for selection in &mut selections { + let start_column = snapshot.indent_size_for_line(selection.start.row).len; + let language = if let Some(language) = + snapshot.language_scope_at(Point::new(selection.start.row, start_column)) + { + language + } else { + continue; + }; - // // If the language has line comments, toggle those. - // if let Some(full_comment_prefix) = language.line_comment_prefix() { - // // Split the comment prefix's trailing whitespace into a separate string, - // // as that portion won't be used for detecting if a line is a comment. - // let comment_prefix = full_comment_prefix.trim_end_matches(' '); - // let comment_prefix_whitespace = &full_comment_prefix[comment_prefix.len()..]; - // let mut all_selection_lines_are_comments = true; - - // for row in start_row..=end_row { - // if snapshot.is_line_blank(row) && start_row < end_row { - // continue; - // } + selection_edit_ranges.clear(); - // let prefix_range = comment_prefix_range( - // snapshot.deref(), - // row, - // comment_prefix, - // comment_prefix_whitespace, - // ); - // if prefix_range.is_empty() { - // all_selection_lines_are_comments = false; - // } - // selection_edit_ranges.push(prefix_range); - // } + // If multiple selections contain a given row, avoid processing that + // row more than once. + let mut start_row = selection.start.row; + if last_toggled_row == Some(start_row) { + start_row += 1; + } + let end_row = + if selection.end.row > selection.start.row && selection.end.column == 0 { + selection.end.row - 1 + } else { + selection.end.row + }; + last_toggled_row = Some(end_row); - // if all_selection_lines_are_comments { - // edits.extend( - // selection_edit_ranges - // .iter() - // .cloned() - // .map(|range| (range, empty_str.clone())), - // ); - // } else { - // let min_column = selection_edit_ranges - // .iter() - // .map(|r| r.start.column) - // .min() - // .unwrap_or(0); - // edits.extend(selection_edit_ranges.iter().map(|range| { - // let position = Point::new(range.start.row, min_column); - // (position..position, full_comment_prefix.clone()) - // })); - // } - // } else if let Some((full_comment_prefix, comment_suffix)) = - // language.block_comment_delimiters() - // { - // let comment_prefix = full_comment_prefix.trim_end_matches(' '); - // let comment_prefix_whitespace = &full_comment_prefix[comment_prefix.len()..]; - // let prefix_range = comment_prefix_range( - // snapshot.deref(), - // start_row, - // comment_prefix, - // comment_prefix_whitespace, - // ); - // let suffix_range = comment_suffix_range( - // snapshot.deref(), - // end_row, - // comment_suffix.trim_start_matches(' '), - // comment_suffix.starts_with(' '), - // ); + if start_row > end_row { + continue; + } - // if prefix_range.is_empty() || suffix_range.is_empty() { - // edits.push(( - // prefix_range.start..prefix_range.start, - // full_comment_prefix.clone(), - // )); - // edits.push((suffix_range.end..suffix_range.end, comment_suffix.clone())); - // suffixes_inserted.push((end_row, comment_suffix.len())); - // } else { - // edits.push((prefix_range, empty_str.clone())); - // edits.push((suffix_range, empty_str.clone())); - // } - // } else { - // continue; - // } - // } + // If the language has line comments, toggle those. + if let Some(full_comment_prefix) = language.line_comment_prefix() { + // Split the comment prefix's trailing whitespace into a separate string, + // as that portion won't be used for detecting if a line is a comment. + let comment_prefix = full_comment_prefix.trim_end_matches(' '); + let comment_prefix_whitespace = &full_comment_prefix[comment_prefix.len()..]; + let mut all_selection_lines_are_comments = true; + + for row in start_row..=end_row { + if snapshot.is_line_blank(row) && start_row < end_row { + continue; + } - // drop(snapshot); - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); + let prefix_range = comment_prefix_range( + snapshot.deref(), + row, + comment_prefix, + comment_prefix_whitespace, + ); + if prefix_range.is_empty() { + all_selection_lines_are_comments = false; + } + selection_edit_ranges.push(prefix_range); + } - // // Adjust selections so that they end before any comment suffixes that - // // were inserted. - // let mut suffixes_inserted = suffixes_inserted.into_iter().peekable(); - // let mut selections = this.selections.all::(cx); - // let snapshot = this.buffer.read(cx).read(cx); - // for selection in &mut selections { - // while let Some((row, suffix_len)) = suffixes_inserted.peek().copied() { - // match row.cmp(&selection.end.row) { - // Ordering::Less => { - // suffixes_inserted.next(); - // continue; - // } - // Ordering::Greater => break, - // Ordering::Equal => { - // if selection.end.column == snapshot.line_len(row) { - // if selection.is_empty() { - // selection.start.column -= suffix_len as u32; - // } - // selection.end.column -= suffix_len as u32; - // } - // break; - // } - // } - // } - // } + if all_selection_lines_are_comments { + edits.extend( + selection_edit_ranges + .iter() + .cloned() + .map(|range| (range, empty_str.clone())), + ); + } else { + let min_column = selection_edit_ranges + .iter() + .map(|r| r.start.column) + .min() + .unwrap_or(0); + edits.extend(selection_edit_ranges.iter().map(|range| { + let position = Point::new(range.start.row, min_column); + (position..position, full_comment_prefix.clone()) + })); + } + } else if let Some((full_comment_prefix, comment_suffix)) = + language.block_comment_delimiters() + { + let comment_prefix = full_comment_prefix.trim_end_matches(' '); + let comment_prefix_whitespace = &full_comment_prefix[comment_prefix.len()..]; + let prefix_range = comment_prefix_range( + snapshot.deref(), + start_row, + comment_prefix, + comment_prefix_whitespace, + ); + let suffix_range = comment_suffix_range( + snapshot.deref(), + end_row, + comment_suffix.trim_start_matches(' '), + comment_suffix.starts_with(' '), + ); - // drop(snapshot); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + if prefix_range.is_empty() || suffix_range.is_empty() { + edits.push(( + prefix_range.start..prefix_range.start, + full_comment_prefix.clone(), + )); + edits.push((suffix_range.end..suffix_range.end, comment_suffix.clone())); + suffixes_inserted.push((end_row, comment_suffix.len())); + } else { + edits.push((prefix_range, empty_str.clone())); + edits.push((suffix_range, empty_str.clone())); + } + } else { + continue; + } + } - // let selections = this.selections.all::(cx); - // let selections_on_single_row = selections.windows(2).all(|selections| { - // selections[0].start.row == selections[1].start.row - // && selections[0].end.row == selections[1].end.row - // && selections[0].start.row == selections[0].end.row - // }); - // let selections_selecting = selections - // .iter() - // .any(|selection| selection.start != selection.end); - // let advance_downwards = action.advance_downwards - // && selections_on_single_row - // && !selections_selecting - // && this.mode != EditorMode::SingleLine; - - // if advance_downwards { - // let snapshot = this.buffer.read(cx).snapshot(cx); - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_cursors_with(|display_snapshot, display_point, _| { - // let mut point = display_point.to_point(display_snapshot); - // point.row += 1; - // point = snapshot.clip_point(point, Bias::Left); - // let display_point = point.to_display_point(display_snapshot); - // let goal = SelectionGoal::HorizontalPosition( - // display_snapshot.x_for_point(display_point, &text_layout_details), - // ); - // (display_point, goal) - // }) - // }); - // } - // }); - // } + drop(snapshot); + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); - // pub fn select_larger_syntax_node( - // &mut self, - // _: &SelectLargerSyntaxNode, - // cx: &mut ViewContext, - // ) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = self.buffer.read(cx).snapshot(cx); - // let old_selections = self.selections.all::(cx).into_boxed_slice(); + // Adjust selections so that they end before any comment suffixes that + // were inserted. + let mut suffixes_inserted = suffixes_inserted.into_iter().peekable(); + let mut selections = this.selections.all::(cx); + let snapshot = this.buffer.read(cx).read(cx); + for selection in &mut selections { + while let Some((row, suffix_len)) = suffixes_inserted.peek().copied() { + match row.cmp(&selection.end.row) { + Ordering::Less => { + suffixes_inserted.next(); + continue; + } + Ordering::Greater => break, + Ordering::Equal => { + if selection.end.column == snapshot.line_len(row) { + if selection.is_empty() { + selection.start.column -= suffix_len as u32; + } + selection.end.column -= suffix_len as u32; + } + break; + } + } + } + } - // let mut stack = mem::take(&mut self.select_larger_syntax_node_stack); - // let mut selected_larger_node = false; - // let new_selections = old_selections - // .iter() - // .map(|selection| { - // let old_range = selection.start..selection.end; - // let mut new_range = old_range.clone(); - // while let Some(containing_range) = - // buffer.range_for_syntax_ancestor(new_range.clone()) - // { - // new_range = containing_range; - // if !display_map.intersects_fold(new_range.start) - // && !display_map.intersects_fold(new_range.end) - // { - // break; - // } - // } + drop(snapshot); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // selected_larger_node |= new_range != old_range; - // Selection { - // id: selection.id, - // start: new_range.start, - // end: new_range.end, - // goal: SelectionGoal::None, - // reversed: selection.reversed, - // } - // }) - // .collect::>(); + let selections = this.selections.all::(cx); + let selections_on_single_row = selections.windows(2).all(|selections| { + selections[0].start.row == selections[1].start.row + && selections[0].end.row == selections[1].end.row + && selections[0].start.row == selections[0].end.row + }); + let selections_selecting = selections + .iter() + .any(|selection| selection.start != selection.end); + let advance_downwards = action.advance_downwards + && selections_on_single_row + && !selections_selecting + && this.mode != EditorMode::SingleLine; + + if advance_downwards { + let snapshot = this.buffer.read(cx).snapshot(cx); + + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_cursors_with(|display_snapshot, display_point, _| { + let mut point = display_point.to_point(display_snapshot); + point.row += 1; + point = snapshot.clip_point(point, Bias::Left); + let display_point = point.to_display_point(display_snapshot); + let goal = SelectionGoal::HorizontalPosition( + display_snapshot + .x_for_point(display_point, &text_layout_details) + .into(), + ); + (display_point, goal) + }) + }); + } + }); + } - // if selected_larger_node { - // stack.push(old_selections); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - // } - // self.select_larger_syntax_node_stack = stack; - // } + pub fn select_larger_syntax_node( + &mut self, + _: &SelectLargerSyntaxNode, + cx: &mut ViewContext, + ) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = self.buffer.read(cx).snapshot(cx); + let old_selections = self.selections.all::(cx).into_boxed_slice(); - // pub fn select_smaller_syntax_node( - // &mut self, - // _: &SelectSmallerSyntaxNode, - // cx: &mut ViewContext, - // ) { - // let mut stack = mem::take(&mut self.select_larger_syntax_node_stack); - // if let Some(selections) = stack.pop() { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(selections.to_vec()); - // }); - // } - // self.select_larger_syntax_node_stack = stack; - // } + let mut stack = mem::take(&mut self.select_larger_syntax_node_stack); + let mut selected_larger_node = false; + let new_selections = old_selections + .iter() + .map(|selection| { + let old_range = selection.start..selection.end; + let mut new_range = old_range.clone(); + while let Some(containing_range) = + buffer.range_for_syntax_ancestor(new_range.clone()) + { + new_range = containing_range; + if !display_map.intersects_fold(new_range.start) + && !display_map.intersects_fold(new_range.end) + { + break; + } + } - // pub fn move_to_enclosing_bracket( - // &mut self, - // _: &MoveToEnclosingBracket, - // cx: &mut ViewContext, - // ) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.move_offsets_with(|snapshot, selection| { - // let Some(enclosing_bracket_ranges) = - // snapshot.enclosing_bracket_ranges(selection.start..selection.end) - // else { - // return; - // }; + selected_larger_node |= new_range != old_range; + Selection { + id: selection.id, + start: new_range.start, + end: new_range.end, + goal: SelectionGoal::None, + reversed: selection.reversed, + } + }) + .collect::>(); - // let mut best_length = usize::MAX; - // let mut best_inside = false; - // let mut best_in_bracket_range = false; - // let mut best_destination = None; - // for (open, close) in enclosing_bracket_ranges { - // let close = close.to_inclusive(); - // let length = close.end() - open.start; - // let inside = selection.start >= open.end && selection.end <= *close.start(); - // let in_bracket_range = open.to_inclusive().contains(&selection.head()) - // || close.contains(&selection.head()); - - // // If best is next to a bracket and current isn't, skip - // if !in_bracket_range && best_in_bracket_range { - // continue; - // } + if selected_larger_node { + stack.push(old_selections); + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + } + self.select_larger_syntax_node_stack = stack; + } - // // Prefer smaller lengths unless best is inside and current isn't - // if length > best_length && (best_inside || !inside) { - // continue; - // } + pub fn select_smaller_syntax_node( + &mut self, + _: &SelectSmallerSyntaxNode, + cx: &mut ViewContext, + ) { + let mut stack = mem::take(&mut self.select_larger_syntax_node_stack); + if let Some(selections) = stack.pop() { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(selections.to_vec()); + }); + } + self.select_larger_syntax_node_stack = stack; + } - // best_length = length; - // best_inside = inside; - // best_in_bracket_range = in_bracket_range; - // best_destination = Some( - // if close.contains(&selection.start) && close.contains(&selection.end) { - // if inside { - // open.end - // } else { - // open.start - // } - // } else { - // if inside { - // *close.start() - // } else { - // *close.end() - // } - // }, - // ); - // } + pub fn move_to_enclosing_bracket( + &mut self, + _: &MoveToEnclosingBracket, + cx: &mut ViewContext, + ) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.move_offsets_with(|snapshot, selection| { + let Some(enclosing_bracket_ranges) = + snapshot.enclosing_bracket_ranges(selection.start..selection.end) + else { + return; + }; - // if let Some(destination) = best_destination { - // selection.collapse_to(destination, SelectionGoal::None); - // } - // }) - // }); - // } + let mut best_length = usize::MAX; + let mut best_inside = false; + let mut best_in_bracket_range = false; + let mut best_destination = None; + for (open, close) in enclosing_bracket_ranges { + let close = close.to_inclusive(); + let length = close.end() - open.start; + let inside = selection.start >= open.end && selection.end <= *close.start(); + let in_bracket_range = open.to_inclusive().contains(&selection.head()) + || close.contains(&selection.head()); + + // If best is next to a bracket and current isn't, skip + if !in_bracket_range && best_in_bracket_range { + continue; + } - // pub fn undo_selection(&mut self, _: &UndoSelection, cx: &mut ViewContext) { - // self.end_selection(cx); - // self.selection_history.mode = SelectionHistoryMode::Undoing; - // if let Some(entry) = self.selection_history.undo_stack.pop_back() { - // self.change_selections(None, cx, |s| s.select_anchors(entry.selections.to_vec())); - // self.select_next_state = entry.select_next_state; - // self.select_prev_state = entry.select_prev_state; - // self.add_selections_state = entry.add_selections_state; - // self.request_autoscroll(Autoscroll::newest(), cx); - // } - // self.selection_history.mode = SelectionHistoryMode::Normal; - // } + // Prefer smaller lengths unless best is inside and current isn't + if length > best_length && (best_inside || !inside) { + continue; + } - // pub fn redo_selection(&mut self, _: &RedoSelection, cx: &mut ViewContext) { - // self.end_selection(cx); - // self.selection_history.mode = SelectionHistoryMode::Redoing; - // if let Some(entry) = self.selection_history.redo_stack.pop_back() { - // self.change_selections(None, cx, |s| s.select_anchors(entry.selections.to_vec())); - // self.select_next_state = entry.select_next_state; - // self.select_prev_state = entry.select_prev_state; - // self.add_selections_state = entry.add_selections_state; - // self.request_autoscroll(Autoscroll::newest(), cx); - // } - // self.selection_history.mode = SelectionHistoryMode::Normal; - // } + best_length = length; + best_inside = inside; + best_in_bracket_range = in_bracket_range; + best_destination = Some( + if close.contains(&selection.start) && close.contains(&selection.end) { + if inside { + open.end + } else { + open.start + } + } else { + if inside { + *close.start() + } else { + *close.end() + } + }, + ); + } - // fn go_to_diagnostic(&mut self, _: &GoToDiagnostic, cx: &mut ViewContext) { - // self.go_to_diagnostic_impl(Direction::Next, cx) - // } + if let Some(destination) = best_destination { + selection.collapse_to(destination, SelectionGoal::None); + } + }) + }); + } - // fn go_to_prev_diagnostic(&mut self, _: &GoToPrevDiagnostic, cx: &mut ViewContext) { - // self.go_to_diagnostic_impl(Direction::Prev, cx) - // } + pub fn undo_selection(&mut self, _: &UndoSelection, cx: &mut ViewContext) { + self.end_selection(cx); + self.selection_history.mode = SelectionHistoryMode::Undoing; + if let Some(entry) = self.selection_history.undo_stack.pop_back() { + self.change_selections(None, cx, |s| s.select_anchors(entry.selections.to_vec())); + self.select_next_state = entry.select_next_state; + self.select_prev_state = entry.select_prev_state; + self.add_selections_state = entry.add_selections_state; + self.request_autoscroll(Autoscroll::newest(), cx); + } + self.selection_history.mode = SelectionHistoryMode::Normal; + } - // pub fn go_to_diagnostic_impl(&mut self, direction: Direction, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx).snapshot(cx); - // let selection = self.selections.newest::(cx); - - // // If there is an active Diagnostic Popover. Jump to it's diagnostic instead. - // if direction == Direction::Next { - // if let Some(popover) = self.hover_state.diagnostic_popover.as_ref() { - // let (group_id, jump_to) = popover.activation_info(); - // if self.activate_diagnostics(group_id, cx) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut new_selection = s.newest_anchor().clone(); - // new_selection.collapse_to(jump_to, SelectionGoal::None); - // s.select_anchors(vec![new_selection.clone()]); - // }); - // } - // return; - // } - // } + pub fn redo_selection(&mut self, _: &RedoSelection, cx: &mut ViewContext) { + self.end_selection(cx); + self.selection_history.mode = SelectionHistoryMode::Redoing; + if let Some(entry) = self.selection_history.redo_stack.pop_back() { + self.change_selections(None, cx, |s| s.select_anchors(entry.selections.to_vec())); + self.select_next_state = entry.select_next_state; + self.select_prev_state = entry.select_prev_state; + self.add_selections_state = entry.add_selections_state; + self.request_autoscroll(Autoscroll::newest(), cx); + } + self.selection_history.mode = SelectionHistoryMode::Normal; + } - // let mut active_primary_range = self.active_diagnostics.as_ref().map(|active_diagnostics| { - // active_diagnostics - // .primary_range - // .to_offset(&buffer) - // .to_inclusive() - // }); - // let mut search_start = if let Some(active_primary_range) = active_primary_range.as_ref() { - // if active_primary_range.contains(&selection.head()) { - // *active_primary_range.end() - // } else { - // selection.head() - // } - // } else { - // selection.head() - // }; + fn go_to_diagnostic(&mut self, _: &GoToDiagnostic, cx: &mut ViewContext) { + self.go_to_diagnostic_impl(Direction::Next, cx) + } + + fn go_to_prev_diagnostic(&mut self, _: &GoToPrevDiagnostic, cx: &mut ViewContext) { + self.go_to_diagnostic_impl(Direction::Prev, cx) + } + + pub fn go_to_diagnostic_impl(&mut self, direction: Direction, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx).snapshot(cx); + let selection = self.selections.newest::(cx); + + // If there is an active Diagnostic Popover. Jump to it's diagnostic instead. + if direction == Direction::Next { + if let Some(popover) = self.hover_state.diagnostic_popover.as_ref() { + let (group_id, jump_to) = popover.activation_info(); + if self.activate_diagnostics(group_id, cx) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut new_selection = s.newest_anchor().clone(); + new_selection.collapse_to(jump_to, SelectionGoal::None); + s.select_anchors(vec![new_selection.clone()]); + }); + } + return; + } + } + + let mut active_primary_range = self.active_diagnostics.as_ref().map(|active_diagnostics| { + active_diagnostics + .primary_range + .to_offset(&buffer) + .to_inclusive() + }); + let mut search_start = if let Some(active_primary_range) = active_primary_range.as_ref() { + if active_primary_range.contains(&selection.head()) { + *active_primary_range.end() + } else { + selection.head() + } + } else { + selection.head() + }; - // loop { - // let mut diagnostics = if direction == Direction::Prev { - // buffer.diagnostics_in_range::<_, usize>(0..search_start, true) - // } else { - // buffer.diagnostics_in_range::<_, usize>(search_start..buffer.len(), false) - // }; - // let group = diagnostics.find_map(|entry| { - // if entry.diagnostic.is_primary - // && entry.diagnostic.severity <= DiagnosticSeverity::WARNING - // && !entry.range.is_empty() - // && Some(entry.range.end) != active_primary_range.as_ref().map(|r| *r.end()) - // && !entry.range.contains(&search_start) - // { - // Some((entry.range, entry.diagnostic.group_id)) - // } else { - // None - // } - // }); + loop { + let mut diagnostics = if direction == Direction::Prev { + buffer.diagnostics_in_range::<_, usize>(0..search_start, true) + } else { + buffer.diagnostics_in_range::<_, usize>(search_start..buffer.len(), false) + }; + let group = diagnostics.find_map(|entry| { + if entry.diagnostic.is_primary + && entry.diagnostic.severity <= DiagnosticSeverity::WARNING + && !entry.range.is_empty() + && Some(entry.range.end) != active_primary_range.as_ref().map(|r| *r.end()) + && !entry.range.contains(&search_start) + { + Some((entry.range, entry.diagnostic.group_id)) + } else { + None + } + }); - // if let Some((primary_range, group_id)) = group { - // if self.activate_diagnostics(group_id, cx) { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(vec![Selection { - // id: selection.id, - // start: primary_range.start, - // end: primary_range.start, - // reversed: false, - // goal: SelectionGoal::None, - // }]); - // }); - // } - // break; - // } else { - // // Cycle around to the start of the buffer, potentially moving back to the start of - // // the currently active diagnostic. - // active_primary_range.take(); - // if direction == Direction::Prev { - // if search_start == buffer.len() { - // break; - // } else { - // search_start = buffer.len(); - // } - // } else if search_start == 0 { - // break; - // } else { - // search_start = 0; - // } - // } - // } - // } + if let Some((primary_range, group_id)) = group { + if self.activate_diagnostics(group_id, cx) { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(vec![Selection { + id: selection.id, + start: primary_range.start, + end: primary_range.start, + reversed: false, + goal: SelectionGoal::None, + }]); + }); + } + break; + } else { + // Cycle around to the start of the buffer, potentially moving back to the start of + // the currently active diagnostic. + active_primary_range.take(); + if direction == Direction::Prev { + if search_start == buffer.len() { + break; + } else { + search_start = buffer.len(); + } + } else if search_start == 0 { + break; + } else { + search_start = 0; + } + } + } + } - // fn go_to_hunk(&mut self, _: &GoToHunk, cx: &mut ViewContext) { - // let snapshot = self - // .display_map - // .update(cx, |display_map, cx| display_map.snapshot(cx)); - // let selection = self.selections.newest::(cx); - - // if !self.seek_in_direction( - // &snapshot, - // selection.head(), - // false, - // snapshot - // .buffer_snapshot - // .git_diff_hunks_in_range((selection.head().row + 1)..u32::MAX), - // cx, - // ) { - // let wrapped_point = Point::zero(); - // self.seek_in_direction( - // &snapshot, - // wrapped_point, - // true, - // snapshot - // .buffer_snapshot - // .git_diff_hunks_in_range((wrapped_point.row + 1)..u32::MAX), - // cx, - // ); - // } - // } + fn go_to_hunk(&mut self, _: &GoToHunk, cx: &mut ViewContext) { + let snapshot = self + .display_map + .update(cx, |display_map, cx| display_map.snapshot(cx)); + let selection = self.selections.newest::(cx); + + if !self.seek_in_direction( + &snapshot, + selection.head(), + false, + snapshot + .buffer_snapshot + .git_diff_hunks_in_range((selection.head().row + 1)..u32::MAX), + cx, + ) { + let wrapped_point = Point::zero(); + self.seek_in_direction( + &snapshot, + wrapped_point, + true, + snapshot + .buffer_snapshot + .git_diff_hunks_in_range((wrapped_point.row + 1)..u32::MAX), + cx, + ); + } + } - // fn go_to_prev_hunk(&mut self, _: &GoToPrevHunk, cx: &mut ViewContext) { - // let snapshot = self - // .display_map - // .update(cx, |display_map, cx| display_map.snapshot(cx)); - // let selection = self.selections.newest::(cx); - - // if !self.seek_in_direction( - // &snapshot, - // selection.head(), - // false, - // snapshot - // .buffer_snapshot - // .git_diff_hunks_in_range_rev(0..selection.head().row), - // cx, - // ) { - // let wrapped_point = snapshot.buffer_snapshot.max_point(); - // self.seek_in_direction( - // &snapshot, - // wrapped_point, - // true, - // snapshot - // .buffer_snapshot - // .git_diff_hunks_in_range_rev(0..wrapped_point.row), - // cx, - // ); - // } - // } + fn go_to_prev_hunk(&mut self, _: &GoToPrevHunk, cx: &mut ViewContext) { + let snapshot = self + .display_map + .update(cx, |display_map, cx| display_map.snapshot(cx)); + let selection = self.selections.newest::(cx); + + if !self.seek_in_direction( + &snapshot, + selection.head(), + false, + snapshot + .buffer_snapshot + .git_diff_hunks_in_range_rev(0..selection.head().row), + cx, + ) { + let wrapped_point = snapshot.buffer_snapshot.max_point(); + self.seek_in_direction( + &snapshot, + wrapped_point, + true, + snapshot + .buffer_snapshot + .git_diff_hunks_in_range_rev(0..wrapped_point.row), + cx, + ); + } + } - // fn seek_in_direction( - // &mut self, - // snapshot: &DisplaySnapshot, - // initial_point: Point, - // is_wrapped: bool, - // hunks: impl Iterator>, - // cx: &mut ViewContext, - // ) -> bool { - // let display_point = initial_point.to_display_point(snapshot); - // let mut hunks = hunks - // .map(|hunk| diff_hunk_to_display(hunk, &snapshot)) - // .filter(|hunk| { - // if is_wrapped { - // true - // } else { - // !hunk.contains_display_row(display_point.row()) - // } - // }) - // .dedup(); + fn seek_in_direction( + &mut self, + snapshot: &DisplaySnapshot, + initial_point: Point, + is_wrapped: bool, + hunks: impl Iterator>, + cx: &mut ViewContext, + ) -> bool { + let display_point = initial_point.to_display_point(snapshot); + let mut hunks = hunks + .map(|hunk| diff_hunk_to_display(hunk, &snapshot)) + .filter(|hunk| { + if is_wrapped { + true + } else { + !hunk.contains_display_row(display_point.row()) + } + }) + .dedup(); - // if let Some(hunk) = hunks.next() { - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let row = hunk.start_display_row(); - // let point = DisplayPoint::new(row, 0); - // s.select_display_ranges([point..point]); - // }); + if let Some(hunk) = hunks.next() { + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + let row = hunk.start_display_row(); + let point = DisplayPoint::new(row, 0); + s.select_display_ranges([point..point]); + }); - // true - // } else { - // false - // } - // } + true + } else { + false + } + } pub fn go_to_definition(&mut self, _: &GoToDefinition, cx: &mut ViewContext) { self.go_to_definition_of_kind(GotoDefinitionKind::Symbol, false, cx); @@ -7725,139 +7737,138 @@ impl Editor { } } - // pub fn rename(&mut self, _: &Rename, cx: &mut ViewContext) -> Option>> { - // use language::ToOffset as _; - - // let project = self.project.clone()?; - // let selection = self.selections.newest_anchor().clone(); - // let (cursor_buffer, cursor_buffer_position) = self - // .buffer - // .read(cx) - // .text_anchor_for_position(selection.head(), cx)?; - // let (tail_buffer, _) = self - // .buffer - // .read(cx) - // .text_anchor_for_position(selection.tail(), cx)?; - // if tail_buffer != cursor_buffer { - // return None; - // } - - // let snapshot = cursor_buffer.read(cx).snapshot(); - // let cursor_buffer_offset = cursor_buffer_position.to_offset(&snapshot); - // let prepare_rename = project.update(cx, |project, cx| { - // project.prepare_rename(cursor_buffer, cursor_buffer_offset, cx) - // }); + // pub fn rename(&mut self, _: &Rename, cx: &mut ViewContext) -> Option>> { + // use language::ToOffset as _; + + // let project = self.project.clone()?; + // let selection = self.selections.newest_anchor().clone(); + // let (cursor_buffer, cursor_buffer_position) = self + // .buffer + // .read(cx) + // .text_anchor_for_position(selection.head(), cx)?; + // let (tail_buffer, _) = self + // .buffer + // .read(cx) + // .text_anchor_for_position(selection.tail(), cx)?; + // if tail_buffer != cursor_buffer { + // return None; + // } + + // let snapshot = cursor_buffer.read(cx).snapshot(); + // let cursor_buffer_offset = cursor_buffer_position.to_offset(&snapshot); + // let prepare_rename = project.update(cx, |project, cx| { + // project.prepare_rename(cursor_buffer, cursor_buffer_offset, cx) + // }); + + // Some(cx.spawn(|this, mut cx| async move { + // let rename_range = if let Some(range) = prepare_rename.await? { + // Some(range) + // } else { + // this.update(&mut cx, |this, cx| { + // let buffer = this.buffer.read(cx).snapshot(cx); + // let mut buffer_highlights = this + // .document_highlights_for_position(selection.head(), &buffer) + // .filter(|highlight| { + // highlight.start.excerpt_id == selection.head().excerpt_id + // && highlight.end.excerpt_id == selection.head().excerpt_id + // }); + // buffer_highlights + // .next() + // .map(|highlight| highlight.start.text_anchor..highlight.end.text_anchor) + // })? + // }; + // if let Some(rename_range) = rename_range { + // let rename_buffer_range = rename_range.to_offset(&snapshot); + // let cursor_offset_in_rename_range = + // cursor_buffer_offset.saturating_sub(rename_buffer_range.start); - // Some(cx.spawn(|this, mut cx| async move { - // let rename_range = if let Some(range) = prepare_rename.await? { - // Some(range) - // } else { - // this.update(&mut cx, |this, cx| { - // let buffer = this.buffer.read(cx).snapshot(cx); - // let mut buffer_highlights = this - // .document_highlights_for_position(selection.head(), &buffer) - // .filter(|highlight| { - // highlight.start.excerpt_id == selection.head().excerpt_id - // && highlight.end.excerpt_id == selection.head().excerpt_id - // }); - // buffer_highlights - // .next() - // .map(|highlight| highlight.start.text_anchor..highlight.end.text_anchor) - // })? - // }; - // if let Some(rename_range) = rename_range { - // let rename_buffer_range = rename_range.to_offset(&snapshot); - // let cursor_offset_in_rename_range = - // cursor_buffer_offset.saturating_sub(rename_buffer_range.start); - - // this.update(&mut cx, |this, cx| { - // this.take_rename(false, cx); - // let style = this.style(cx); - // let buffer = this.buffer.read(cx).read(cx); - // let cursor_offset = selection.head().to_offset(&buffer); - // let rename_start = cursor_offset.saturating_sub(cursor_offset_in_rename_range); - // let rename_end = rename_start + rename_buffer_range.len(); - // let range = buffer.anchor_before(rename_start)..buffer.anchor_after(rename_end); - // let mut old_highlight_id = None; - // let old_name: Arc = buffer - // .chunks(rename_start..rename_end, true) - // .map(|chunk| { - // if old_highlight_id.is_none() { - // old_highlight_id = chunk.syntax_highlight_id; - // } - // chunk.text - // }) - // .collect::() - // .into(); - - // drop(buffer); - - // // Position the selection in the rename editor so that it matches the current selection. - // this.show_local_selections = false; - // let rename_editor = cx.add_view(|cx| { - // let mut editor = Editor::single_line(None, cx); - // if let Some(old_highlight_id) = old_highlight_id { - // editor.override_text_style = - // Some(Box::new(move |style| old_highlight_id.style(&style.syntax))); + // this.update(&mut cx, |this, cx| { + // this.take_rename(false, cx); + // let buffer = this.buffer.read(cx).read(cx); + // let cursor_offset = selection.head().to_offset(&buffer); + // let rename_start = cursor_offset.saturating_sub(cursor_offset_in_rename_range); + // let rename_end = rename_start + rename_buffer_range.len(); + // let range = buffer.anchor_before(rename_start)..buffer.anchor_after(rename_end); + // let mut old_highlight_id = None; + // let old_name: Arc = buffer + // .chunks(rename_start..rename_end, true) + // .map(|chunk| { + // if old_highlight_id.is_none() { + // old_highlight_id = chunk.syntax_highlight_id; // } - // editor.buffer.update(cx, |buffer, cx| { - // buffer.edit([(0..0, old_name.clone())], None, cx) - // }); - // editor.select_all(&SelectAll, cx); - // editor + // chunk.text + // }) + // .collect::() + // .into(); + + // drop(buffer); + + // // Position the selection in the rename editor so that it matches the current selection. + // this.show_local_selections = false; + // let rename_editor = cx.build_view(|cx| { + // let mut editor = Editor::single_line(cx); + // if let Some(old_highlight_id) = old_highlight_id { + // editor.override_text_style = + // Some(Box::new(move |style| old_highlight_id.style(&style.syntax))); + // } + // editor.buffer.update(cx, |buffer, cx| { + // buffer.edit([(0..0, old_name.clone())], None, cx) // }); + // editor.select_all(&SelectAll, cx); + // editor + // }); - // let ranges = this - // .clear_background_highlights::(cx) - // .into_iter() - // .flat_map(|(_, ranges)| ranges.into_iter()) - // .chain( - // this.clear_background_highlights::(cx) - // .into_iter() - // .flat_map(|(_, ranges)| ranges.into_iter()), - // ) - // .collect(); - - // this.highlight_text::( - // ranges, - // HighlightStyle { - // fade_out: Some(style.rename_fade), - // ..Default::default() - // }, - // cx, - // ); - // cx.focus(&rename_editor); - // let block_id = this.insert_blocks( - // [BlockProperties { - // style: BlockStyle::Flex, - // position: range.start.clone(), - // height: 1, - // render: Arc::new({ - // let editor = rename_editor.clone(); - // move |cx: &mut BlockContext| { - // ChildView::new(&editor, cx) - // .contained() - // .with_padding_left(cx.anchor_x) - // .into_any() - // } - // }), - // disposition: BlockDisposition::Below, - // }], - // Some(Autoscroll::fit()), - // cx, - // )[0]; - // this.pending_rename = Some(RenameState { - // range, - // old_name, - // editor: rename_editor, - // block_id, - // }); - // })?; - // } + // let ranges = this + // .clear_background_highlights::(cx) + // .into_iter() + // .flat_map(|(_, ranges)| ranges.into_iter()) + // .chain( + // this.clear_background_highlights::(cx) + // .into_iter() + // .flat_map(|(_, ranges)| ranges.into_iter()), + // ) + // .collect(); + + // this.highlight_text::( + // ranges, + // HighlightStyle { + // fade_out: Some(style.rename_fade), + // ..Default::default() + // }, + // cx, + // ); + // cx.focus(&rename_editor); + // let block_id = this.insert_blocks( + // [BlockProperties { + // style: BlockStyle::Flex, + // position: range.start.clone(), + // height: 1, + // render: Arc::new({ + // let editor = rename_editor.clone(); + // move |cx: &mut BlockContext| { + // ChildView::new(&editor, cx) + // .contained() + // .with_padding_left(cx.anchor_x) + // .into_any() + // } + // }), + // disposition: BlockDisposition::Below, + // }], + // Some(Autoscroll::fit()), + // cx, + // )[0]; + // this.pending_rename = Some(RenameState { + // range, + // old_name, + // editor: rename_editor, + // block_id, + // }); + // })?; + // } - // Ok(()) - // })) - // } + // Ok(()) + // })) + // } // pub fn confirm_rename( // workspace: &mut Workspace, @@ -7946,14 +7957,14 @@ impl Editor { self.pending_rename.as_ref() } - // fn format(&mut self, _: &Format, cx: &mut ViewContext) -> Option>> { - // let project = match &self.project { - // Some(project) => project.clone(), - // None => return None, - // }; + fn format(&mut self, _: &Format, cx: &mut ViewContext) -> Option>> { + let project = match &self.project { + Some(project) => project.clone(), + None => return None, + }; - // Some(self.perform_format(project, FormatTrigger::Manual, cx)) - // } + Some(self.perform_format(project, FormatTrigger::Manual, cx)) + } fn perform_format( &mut self, @@ -7990,19 +8001,19 @@ impl Editor { }) } - // fn restart_language_server(&mut self, _: &RestartLanguageServer, cx: &mut ViewContext) { - // if let Some(project) = self.project.clone() { - // self.buffer.update(cx, |multi_buffer, cx| { - // project.update(cx, |project, cx| { - // project.restart_language_servers_for_buffers(multi_buffer.all_buffers(), cx); - // }); - // }) - // } - // } + fn restart_language_server(&mut self, _: &RestartLanguageServer, cx: &mut ViewContext) { + if let Some(project) = self.project.clone() { + self.buffer.update(cx, |multi_buffer, cx| { + project.update(cx, |project, cx| { + project.restart_language_servers_for_buffers(multi_buffer.all_buffers(), cx); + }); + }) + } + } - // fn show_character_palette(&mut self, _: &ShowCharacterPalette, cx: &mut ViewContext) { - // cx.show_character_palette(); - // } + fn show_character_palette(&mut self, _: &ShowCharacterPalette, cx: &mut ViewContext) { + cx.show_character_palette(); + } fn refresh_active_diagnostics(&mut self, cx: &mut ViewContext) { if let Some(active_diagnostics) = self.active_diagnostics.as_mut() { @@ -8032,87 +8043,87 @@ impl Editor { } } - // fn activate_diagnostics(&mut self, group_id: usize, cx: &mut ViewContext) -> bool { - // self.dismiss_diagnostics(cx); - // self.active_diagnostics = self.display_map.update(cx, |display_map, cx| { - // let buffer = self.buffer.read(cx).snapshot(cx); + fn activate_diagnostics(&mut self, group_id: usize, cx: &mut ViewContext) -> bool { + self.dismiss_diagnostics(cx); + self.active_diagnostics = self.display_map.update(cx, |display_map, cx| { + let buffer = self.buffer.read(cx).snapshot(cx); - // let mut primary_range = None; - // let mut primary_message = None; - // let mut group_end = Point::zero(); - // let diagnostic_group = buffer - // .diagnostic_group::(group_id) - // .map(|entry| { - // if entry.range.end > group_end { - // group_end = entry.range.end; - // } - // if entry.diagnostic.is_primary { - // primary_range = Some(entry.range.clone()); - // primary_message = Some(entry.diagnostic.message.clone()); - // } - // entry - // }) - // .collect::>(); - // let primary_range = primary_range?; - // let primary_message = primary_message?; - // let primary_range = - // buffer.anchor_after(primary_range.start)..buffer.anchor_before(primary_range.end); - - // let blocks = display_map - // .insert_blocks( - // diagnostic_group.iter().map(|entry| { - // let diagnostic = entry.diagnostic.clone(); - // let message_height = diagnostic.message.lines().count() as u8; - // BlockProperties { - // style: BlockStyle::Fixed, - // position: buffer.anchor_after(entry.range.start), - // height: message_height, - // render: diagnostic_block_renderer(diagnostic, true), - // disposition: BlockDisposition::Below, - // } - // }), - // cx, - // ) - // .into_iter() - // .zip(diagnostic_group.into_iter().map(|entry| entry.diagnostic)) - // .collect(); - - // Some(ActiveDiagnosticGroup { - // primary_range, - // primary_message, - // blocks, - // is_valid: true, - // }) - // }); - // self.active_diagnostics.is_some() - // } + let mut primary_range = None; + let mut primary_message = None; + let mut group_end = Point::zero(); + let diagnostic_group = buffer + .diagnostic_group::(group_id) + .map(|entry| { + if entry.range.end > group_end { + group_end = entry.range.end; + } + if entry.diagnostic.is_primary { + primary_range = Some(entry.range.clone()); + primary_message = Some(entry.diagnostic.message.clone()); + } + entry + }) + .collect::>(); + let primary_range = primary_range?; + let primary_message = primary_message?; + let primary_range = + buffer.anchor_after(primary_range.start)..buffer.anchor_before(primary_range.end); + + let blocks = display_map + .insert_blocks( + diagnostic_group.iter().map(|entry| { + let diagnostic = entry.diagnostic.clone(); + let message_height = diagnostic.message.lines().count() as u8; + BlockProperties { + style: BlockStyle::Fixed, + position: buffer.anchor_after(entry.range.start), + height: message_height, + render: diagnostic_block_renderer(diagnostic, true), + disposition: BlockDisposition::Below, + } + }), + cx, + ) + .into_iter() + .zip(diagnostic_group.into_iter().map(|entry| entry.diagnostic)) + .collect(); + + Some(ActiveDiagnosticGroup { + primary_range, + primary_message, + blocks, + is_valid: true, + }) + }); + self.active_diagnostics.is_some() + } - // fn dismiss_diagnostics(&mut self, cx: &mut ViewContext) { - // if let Some(active_diagnostic_group) = self.active_diagnostics.take() { - // self.display_map.update(cx, |display_map, cx| { - // display_map.remove_blocks(active_diagnostic_group.blocks.into_keys().collect(), cx); - // }); - // cx.notify(); - // } - // } + fn dismiss_diagnostics(&mut self, cx: &mut ViewContext) { + if let Some(active_diagnostic_group) = self.active_diagnostics.take() { + self.display_map.update(cx, |display_map, cx| { + display_map.remove_blocks(active_diagnostic_group.blocks.into_keys().collect(), cx); + }); + cx.notify(); + } + } - // pub fn set_selections_from_remote( - // &mut self, - // selections: Vec>, - // pending_selection: Option>, - // cx: &mut ViewContext, - // ) { - // let old_cursor_position = self.selections.newest_anchor().head(); - // self.selections.change_with(cx, |s| { - // s.select_anchors(selections); - // if let Some(pending_selection) = pending_selection { - // s.set_pending(pending_selection, SelectMode::Character); - // } else { - // s.clear_pending(); - // } - // }); - // self.selections_did_change(false, &old_cursor_position, cx); - // } + pub fn set_selections_from_remote( + &mut self, + selections: Vec>, + pending_selection: Option>, + cx: &mut ViewContext, + ) { + let old_cursor_position = self.selections.newest_anchor().head(); + self.selections.change_with(cx, |s| { + s.select_anchors(selections); + if let Some(pending_selection) = pending_selection { + s.set_pending(pending_selection, SelectMode::Character); + } else { + s.clear_pending(); + } + }); + self.selections_did_change(false, &old_cursor_position, cx); + } fn push_to_selection_history(&mut self) { self.selection_history.push(SelectionHistoryEntry { @@ -8166,100 +8177,100 @@ impl Editor { } } - // pub fn fold(&mut self, _: &Fold, cx: &mut ViewContext) { - // let mut fold_ranges = Vec::new(); + pub fn fold(&mut self, _: &Fold, cx: &mut ViewContext) { + let mut fold_ranges = Vec::new(); - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let selections = self.selections.all_adjusted(cx); - // for selection in selections { - // let range = selection.range().sorted(); - // let buffer_start_row = range.start.row; + let selections = self.selections.all_adjusted(cx); + for selection in selections { + let range = selection.range().sorted(); + let buffer_start_row = range.start.row; - // for row in (0..=range.end.row).rev() { - // let fold_range = display_map.foldable_range(row); + for row in (0..=range.end.row).rev() { + let fold_range = display_map.foldable_range(row); - // if let Some(fold_range) = fold_range { - // if fold_range.end.row >= buffer_start_row { - // fold_ranges.push(fold_range); - // if row <= range.start.row { - // break; - // } - // } - // } - // } - // } + if let Some(fold_range) = fold_range { + if fold_range.end.row >= buffer_start_row { + fold_ranges.push(fold_range); + if row <= range.start.row { + break; + } + } + } + } + } - // self.fold_ranges(fold_ranges, true, cx); - // } + self.fold_ranges(fold_ranges, true, cx); + } - // pub fn fold_at(&mut self, fold_at: &FoldAt, cx: &mut ViewContext) { - // let buffer_row = fold_at.buffer_row; - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + pub fn fold_at(&mut self, fold_at: &FoldAt, cx: &mut ViewContext) { + let buffer_row = fold_at.buffer_row; + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // if let Some(fold_range) = display_map.foldable_range(buffer_row) { - // let autoscroll = self - // .selections - // .all::(cx) - // .iter() - // .any(|selection| fold_range.overlaps(&selection.range())); + if let Some(fold_range) = display_map.foldable_range(buffer_row) { + let autoscroll = self + .selections + .all::(cx) + .iter() + .any(|selection| fold_range.overlaps(&selection.range())); - // self.fold_ranges(std::iter::once(fold_range), autoscroll, cx); - // } - // } + self.fold_ranges(std::iter::once(fold_range), autoscroll, cx); + } + } - // pub fn unfold_lines(&mut self, _: &UnfoldLines, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let buffer = &display_map.buffer_snapshot; - // let selections = self.selections.all::(cx); - // let ranges = selections - // .iter() - // .map(|s| { - // let range = s.display_range(&display_map).sorted(); - // let mut start = range.start.to_point(&display_map); - // let mut end = range.end.to_point(&display_map); - // start.column = 0; - // end.column = buffer.line_len(end.row); - // start..end - // }) - // .collect::>(); + pub fn unfold_lines(&mut self, _: &UnfoldLines, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let buffer = &display_map.buffer_snapshot; + let selections = self.selections.all::(cx); + let ranges = selections + .iter() + .map(|s| { + let range = s.display_range(&display_map).sorted(); + let mut start = range.start.to_point(&display_map); + let mut end = range.end.to_point(&display_map); + start.column = 0; + end.column = buffer.line_len(end.row); + start..end + }) + .collect::>(); - // self.unfold_ranges(ranges, true, true, cx); - // } + self.unfold_ranges(ranges, true, true, cx); + } - // pub fn unfold_at(&mut self, unfold_at: &UnfoldAt, cx: &mut ViewContext) { - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + pub fn unfold_at(&mut self, unfold_at: &UnfoldAt, cx: &mut ViewContext) { + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let intersection_range = Point::new(unfold_at.buffer_row, 0) - // ..Point::new( - // unfold_at.buffer_row, - // display_map.buffer_snapshot.line_len(unfold_at.buffer_row), - // ); + let intersection_range = Point::new(unfold_at.buffer_row, 0) + ..Point::new( + unfold_at.buffer_row, + display_map.buffer_snapshot.line_len(unfold_at.buffer_row), + ); - // let autoscroll = self - // .selections - // .all::(cx) - // .iter() - // .any(|selection| selection.range().overlaps(&intersection_range)); + let autoscroll = self + .selections + .all::(cx) + .iter() + .any(|selection| selection.range().overlaps(&intersection_range)); - // self.unfold_ranges(std::iter::once(intersection_range), true, autoscroll, cx) - // } + self.unfold_ranges(std::iter::once(intersection_range), true, autoscroll, cx) + } - // pub fn fold_selected_ranges(&mut self, _: &FoldSelectedRanges, cx: &mut ViewContext) { - // let selections = self.selections.all::(cx); - // let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let line_mode = self.selections.line_mode; - // let ranges = selections.into_iter().map(|s| { - // if line_mode { - // let start = Point::new(s.start.row, 0); - // let end = Point::new(s.end.row, display_map.buffer_snapshot.line_len(s.end.row)); - // start..end - // } else { - // s.start..s.end - // } - // }); - // self.fold_ranges(ranges, true, cx); - // } + pub fn fold_selected_ranges(&mut self, _: &FoldSelectedRanges, cx: &mut ViewContext) { + let selections = self.selections.all::(cx); + let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let line_mode = self.selections.line_mode; + let ranges = selections.into_iter().map(|s| { + if line_mode { + let start = Point::new(s.start.row, 0); + let end = Point::new(s.end.row, display_map.buffer_snapshot.line_len(s.end.row)); + start..end + } else { + s.start..s.end + } + }); + self.fold_ranges(ranges, true, cx); + } pub fn fold_ranges( &mut self, @@ -8298,6 +8309,7 @@ impl Editor { } } + // todo!() // pub fn gutter_hover( // &mut self, // GutterHover { hovered }: &GutterHover, @@ -8307,33 +8319,33 @@ impl Editor { // cx.notify(); // } - // pub fn insert_blocks( - // &mut self, - // blocks: impl IntoIterator>, - // autoscroll: Option, - // cx: &mut ViewContext, - // ) -> Vec { - // let blocks = self - // .display_map - // .update(cx, |display_map, cx| display_map.insert_blocks(blocks, cx)); - // if let Some(autoscroll) = autoscroll { - // self.request_autoscroll(autoscroll, cx); - // } - // blocks - // } + pub fn insert_blocks( + &mut self, + blocks: impl IntoIterator>, + autoscroll: Option, + cx: &mut ViewContext, + ) -> Vec { + let blocks = self + .display_map + .update(cx, |display_map, cx| display_map.insert_blocks(blocks, cx)); + if let Some(autoscroll) = autoscroll { + self.request_autoscroll(autoscroll, cx); + } + blocks + } - // pub fn replace_blocks( - // &mut self, - // blocks: HashMap, - // autoscroll: Option, - // cx: &mut ViewContext, - // ) { - // self.display_map - // .update(cx, |display_map, _| display_map.replace_blocks(blocks)); - // if let Some(autoscroll) = autoscroll { - // self.request_autoscroll(autoscroll, cx); - // } - // } + pub fn replace_blocks( + &mut self, + blocks: HashMap, + autoscroll: Option, + cx: &mut ViewContext, + ) { + self.display_map + .update(cx, |display_map, _| display_map.replace_blocks(blocks)); + if let Some(autoscroll) = autoscroll { + self.request_autoscroll(autoscroll, cx); + } + } pub fn remove_blocks( &mut self, @@ -8349,37 +8361,37 @@ impl Editor { } } - // pub fn longest_row(&self, cx: &mut AppContext) -> u32 { - // self.display_map - // .update(cx, |map, cx| map.snapshot(cx)) - // .longest_row() - // } + pub fn longest_row(&self, cx: &mut AppContext) -> u32 { + self.display_map + .update(cx, |map, cx| map.snapshot(cx)) + .longest_row() + } - // pub fn max_point(&self, cx: &mut AppContext) -> DisplayPoint { - // self.display_map - // .update(cx, |map, cx| map.snapshot(cx)) - // .max_point() - // } + pub fn max_point(&self, cx: &mut AppContext) -> DisplayPoint { + self.display_map + .update(cx, |map, cx| map.snapshot(cx)) + .max_point() + } pub fn text(&self, cx: &AppContext) -> String { self.buffer.read(cx).read(cx).text() } - // pub fn set_text(&mut self, text: impl Into>, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.buffer - // .read(cx) - // .as_singleton() - // .expect("you can only call set_text on editors for singleton buffers") - // .update(cx, |buffer, cx| buffer.set_text(text, cx)); - // }); - // } + pub fn set_text(&mut self, text: impl Into>, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.buffer + .read(cx) + .as_singleton() + .expect("you can only call set_text on editors for singleton buffers") + .update(cx, |buffer, cx| buffer.set_text(text, cx)); + }); + } - // pub fn display_text(&self, cx: &mut AppContext) -> String { - // self.display_map - // .update(cx, |map, cx| map.snapshot(cx)) - // .text() - // } + pub fn display_text(&self, cx: &mut AppContext) -> String { + self.display_map + .update(cx, |map, cx| map.snapshot(cx)) + .text() + } pub fn wrap_guides(&self, cx: &AppContext) -> SmallVec<[(usize, bool); 2]> { let mut wrap_guides = smallvec::smallvec![]; @@ -8427,56 +8439,56 @@ impl Editor { .update(cx, |map, cx| map.set_wrap_width(width, cx)) } - // pub fn toggle_soft_wrap(&mut self, _: &ToggleSoftWrap, cx: &mut ViewContext) { - // if self.soft_wrap_mode_override.is_some() { - // self.soft_wrap_mode_override.take(); - // } else { - // let soft_wrap = match self.soft_wrap_mode(cx) { - // SoftWrap::None => language_settings::SoftWrap::EditorWidth, - // SoftWrap::EditorWidth | SoftWrap::Column(_) => language_settings::SoftWrap::None, - // }; - // self.soft_wrap_mode_override = Some(soft_wrap); - // } - // cx.notify(); - // } + pub fn toggle_soft_wrap(&mut self, _: &ToggleSoftWrap, cx: &mut ViewContext) { + if self.soft_wrap_mode_override.is_some() { + self.soft_wrap_mode_override.take(); + } else { + let soft_wrap = match self.soft_wrap_mode(cx) { + SoftWrap::None => language_settings::SoftWrap::EditorWidth, + SoftWrap::EditorWidth | SoftWrap::Column(_) => language_settings::SoftWrap::None, + }; + self.soft_wrap_mode_override = Some(soft_wrap); + } + cx.notify(); + } - // pub fn set_show_gutter(&mut self, show_gutter: bool, cx: &mut ViewContext) { - // self.show_gutter = show_gutter; - // cx.notify(); - // } + pub fn set_show_gutter(&mut self, show_gutter: bool, cx: &mut ViewContext) { + self.show_gutter = show_gutter; + cx.notify(); + } - // pub fn set_show_wrap_guides(&mut self, show_gutter: bool, cx: &mut ViewContext) { - // self.show_wrap_guides = Some(show_gutter); - // cx.notify(); - // } + pub fn set_show_wrap_guides(&mut self, show_gutter: bool, cx: &mut ViewContext) { + self.show_wrap_guides = Some(show_gutter); + cx.notify(); + } - // pub fn reveal_in_finder(&mut self, _: &RevealInFinder, cx: &mut ViewContext) { - // if let Some(buffer) = self.buffer().read(cx).as_singleton() { - // if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { - // cx.reveal_path(&file.abs_path(cx)); - // } - // } - // } + pub fn reveal_in_finder(&mut self, _: &RevealInFinder, cx: &mut ViewContext) { + if let Some(buffer) = self.buffer().read(cx).as_singleton() { + if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { + cx.reveal_path(&file.abs_path(cx)); + } + } + } - // pub fn copy_path(&mut self, _: &CopyPath, cx: &mut ViewContext) { - // if let Some(buffer) = self.buffer().read(cx).as_singleton() { - // if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { - // if let Some(path) = file.abs_path(cx).to_str() { - // cx.write_to_clipboard(ClipboardItem::new(path.to_string())); - // } - // } - // } - // } + pub fn copy_path(&mut self, _: &CopyPath, cx: &mut ViewContext) { + if let Some(buffer) = self.buffer().read(cx).as_singleton() { + if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { + if let Some(path) = file.abs_path(cx).to_str() { + cx.write_to_clipboard(ClipboardItem::new(path.to_string())); + } + } + } + } - // pub fn copy_relative_path(&mut self, _: &CopyRelativePath, cx: &mut ViewContext) { - // if let Some(buffer) = self.buffer().read(cx).as_singleton() { - // if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { - // if let Some(path) = file.path().to_str() { - // cx.write_to_clipboard(ClipboardItem::new(path.to_string())); - // } - // } - // } - // } + pub fn copy_relative_path(&mut self, _: &CopyRelativePath, cx: &mut ViewContext) { + if let Some(buffer) = self.buffer().read(cx).as_singleton() { + if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) { + if let Some(path) = file.path().to_str() { + cx.write_to_clipboard(ClipboardItem::new(path.to_string())); + } + } + } + } pub fn highlight_rows(&mut self, rows: Option>) { self.highlighted_rows = rows; @@ -8497,81 +8509,81 @@ impl Editor { cx.notify(); } - // pub fn highlight_inlay_background( - // &mut self, - // ranges: Vec, - // color_fetcher: fn(&Theme) -> Color, - // cx: &mut ViewContext, - // ) { - // // TODO: no actual highlights happen for inlays currently, find a way to do that - // self.inlay_background_highlights - // .insert(Some(TypeId::of::()), (color_fetcher, ranges)); - // cx.notify(); - // } + pub fn highlight_inlay_background( + &mut self, + ranges: Vec, + color_fetcher: fn(&ThemeColors) -> Hsla, + cx: &mut ViewContext, + ) { + // TODO: no actual highlights happen for inlays currently, find a way to do that + self.inlay_background_highlights + .insert(Some(TypeId::of::()), (color_fetcher, ranges)); + cx.notify(); + } - // pub fn clear_background_highlights( - // &mut self, - // cx: &mut ViewContext, - // ) -> Option { - // let text_highlights = self.background_highlights.remove(&TypeId::of::()); - // let inlay_highlights = self - // .inlay_background_highlights - // .remove(&Some(TypeId::of::())); - // if text_highlights.is_some() || inlay_highlights.is_some() { - // cx.notify(); - // } - // text_highlights - // } + pub fn clear_background_highlights( + &mut self, + cx: &mut ViewContext, + ) -> Option { + let text_highlights = self.background_highlights.remove(&TypeId::of::()); + let inlay_highlights = self + .inlay_background_highlights + .remove(&Some(TypeId::of::())); + if text_highlights.is_some() || inlay_highlights.is_some() { + cx.notify(); + } + text_highlights + } - // #[cfg(feature = "test-support")] - // pub fn all_text_background_highlights( - // &mut self, - // cx: &mut ViewContext, - // ) -> Vec<(Range, Color)> { - // let snapshot = self.snapshot(cx); - // let buffer = &snapshot.buffer_snapshot; - // let start = buffer.anchor_before(0); - // let end = buffer.anchor_after(buffer.len()); - // let theme = theme::current(cx); - // self.background_highlights_in_range(start..end, &snapshot, theme.as_ref()) - // } + #[cfg(feature = "test-support")] + pub fn all_text_background_highlights( + &mut self, + cx: &mut ViewContext, + ) -> Vec<(Range, Hsla)> { + let snapshot = self.snapshot(cx); + let buffer = &snapshot.buffer_snapshot; + let start = buffer.anchor_before(0); + let end = buffer.anchor_after(buffer.len()); + let theme = cx.theme().colors(); + self.background_highlights_in_range(start..end, &snapshot, theme) + } - // fn document_highlights_for_position<'a>( - // &'a self, - // position: Anchor, - // buffer: &'a MultiBufferSnapshot, - // ) -> impl 'a + Iterator> { - // let read_highlights = self - // .background_highlights - // .get(&TypeId::of::()) - // .map(|h| &h.1); - // let write_highlights = self - // .background_highlights - // .get(&TypeId::of::()) - // .map(|h| &h.1); - // let left_position = position.bias_left(buffer); - // let right_position = position.bias_right(buffer); - // read_highlights - // .into_iter() - // .chain(write_highlights) - // .flat_map(move |ranges| { - // let start_ix = match ranges.binary_search_by(|probe| { - // let cmp = probe.end.cmp(&left_position, buffer); - // if cmp.is_ge() { - // Ordering::Greater - // } else { - // Ordering::Less - // } - // }) { - // Ok(i) | Err(i) => i, - // }; + fn document_highlights_for_position<'a>( + &'a self, + position: Anchor, + buffer: &'a MultiBufferSnapshot, + ) -> impl 'a + Iterator> { + let read_highlights = self + .background_highlights + .get(&TypeId::of::()) + .map(|h| &h.1); + let write_highlights = self + .background_highlights + .get(&TypeId::of::()) + .map(|h| &h.1); + let left_position = position.bias_left(buffer); + let right_position = position.bias_right(buffer); + read_highlights + .into_iter() + .chain(write_highlights) + .flat_map(move |ranges| { + let start_ix = match ranges.binary_search_by(|probe| { + let cmp = probe.end.cmp(&left_position, buffer); + if cmp.is_ge() { + Ordering::Greater + } else { + Ordering::Less + } + }) { + Ok(i) | Err(i) => i, + }; - // let right_position = right_position.clone(); - // ranges[start_ix..] - // .iter() - // .take_while(move |range| range.start.cmp(&right_position, buffer).is_le()) - // }) - // } + let right_position = right_position.clone(); + ranges[start_ix..] + .iter() + .take_while(move |range| range.start.cmp(&right_position, buffer).is_le()) + }) + } pub fn background_highlights_in_range( &self, @@ -8611,80 +8623,80 @@ impl Editor { results } - // pub fn background_highlight_row_ranges( - // &self, - // search_range: Range, - // display_snapshot: &DisplaySnapshot, - // count: usize, - // ) -> Vec> { - // let mut results = Vec::new(); - // let Some((_, ranges)) = self.background_highlights.get(&TypeId::of::()) else { - // return vec![]; - // }; + pub fn background_highlight_row_ranges( + &self, + search_range: Range, + display_snapshot: &DisplaySnapshot, + count: usize, + ) -> Vec> { + let mut results = Vec::new(); + let Some((_, ranges)) = self.background_highlights.get(&TypeId::of::()) else { + return vec![]; + }; - // let start_ix = match ranges.binary_search_by(|probe| { - // let cmp = probe - // .end - // .cmp(&search_range.start, &display_snapshot.buffer_snapshot); - // if cmp.is_gt() { - // Ordering::Greater - // } else { - // Ordering::Less - // } - // }) { - // Ok(i) | Err(i) => i, - // }; - // let mut push_region = |start: Option, end: Option| { - // if let (Some(start_display), Some(end_display)) = (start, end) { - // results.push( - // start_display.to_display_point(display_snapshot) - // ..=end_display.to_display_point(display_snapshot), - // ); - // } - // }; - // let mut start_row: Option = None; - // let mut end_row: Option = None; - // if ranges.len() > count { - // return Vec::new(); - // } - // for range in &ranges[start_ix..] { - // if range - // .start - // .cmp(&search_range.end, &display_snapshot.buffer_snapshot) - // .is_ge() - // { - // break; - // } - // let end = range.end.to_point(&display_snapshot.buffer_snapshot); - // if let Some(current_row) = &end_row { - // if end.row == current_row.row { - // continue; - // } - // } - // let start = range.start.to_point(&display_snapshot.buffer_snapshot); - // if start_row.is_none() { - // assert_eq!(end_row, None); - // start_row = Some(start); - // end_row = Some(end); - // continue; - // } - // if let Some(current_end) = end_row.as_mut() { - // if start.row > current_end.row + 1 { - // push_region(start_row, end_row); - // start_row = Some(start); - // end_row = Some(end); - // } else { - // // Merge two hunks. - // *current_end = end; - // } - // } else { - // unreachable!(); - // } - // } - // // We might still have a hunk that was not rendered (if there was a search hit on the last line) - // push_region(start_row, end_row); - // results - // } + let start_ix = match ranges.binary_search_by(|probe| { + let cmp = probe + .end + .cmp(&search_range.start, &display_snapshot.buffer_snapshot); + if cmp.is_gt() { + Ordering::Greater + } else { + Ordering::Less + } + }) { + Ok(i) | Err(i) => i, + }; + let mut push_region = |start: Option, end: Option| { + if let (Some(start_display), Some(end_display)) = (start, end) { + results.push( + start_display.to_display_point(display_snapshot) + ..=end_display.to_display_point(display_snapshot), + ); + } + }; + let mut start_row: Option = None; + let mut end_row: Option = None; + if ranges.len() > count { + return Vec::new(); + } + for range in &ranges[start_ix..] { + if range + .start + .cmp(&search_range.end, &display_snapshot.buffer_snapshot) + .is_ge() + { + break; + } + let end = range.end.to_point(&display_snapshot.buffer_snapshot); + if let Some(current_row) = &end_row { + if end.row == current_row.row { + continue; + } + } + let start = range.start.to_point(&display_snapshot.buffer_snapshot); + if start_row.is_none() { + assert_eq!(end_row, None); + start_row = Some(start); + end_row = Some(end); + continue; + } + if let Some(current_end) = end_row.as_mut() { + if start.row > current_end.row + 1 { + push_region(start_row, end_row); + start_row = Some(start); + end_row = Some(end); + } else { + // Merge two hunks. + *current_end = end; + } + } else { + unreachable!(); + } + } + // We might still have a hunk that was not rendered (if there was a search hit on the last line) + push_region(start_row, end_row); + results + } pub fn highlight_text( &mut self, @@ -8698,17 +8710,17 @@ impl Editor { cx.notify(); } - // pub fn highlight_inlays( - // &mut self, - // highlights: Vec, - // style: HighlightStyle, - // cx: &mut ViewContext, - // ) { - // self.display_map.update(cx, |map, _| { - // map.highlight_inlays(TypeId::of::(), highlights, style) - // }); - // cx.notify(); - // } + pub fn highlight_inlays( + &mut self, + highlights: Vec, + style: HighlightStyle, + cx: &mut ViewContext, + ) { + self.display_map.update(cx, |map, _| { + map.highlight_inlays(TypeId::of::(), highlights, style) + }); + cx.notify(); + } pub fn text_highlights<'a, T: 'static>( &'a self, @@ -9053,136 +9065,140 @@ impl Editor { telemetry.report_clickhouse_event(event, telemetry_settings) } - // /// Copy the highlighted chunks to the clipboard as JSON. The format is an array of lines, - // /// with each line being an array of {text, highlight} objects. - // fn copy_highlight_json(&mut self, _: &CopyHighlightJson, cx: &mut ViewContext) { - // let Some(buffer) = self.buffer.read(cx).as_singleton() else { - // return; - // }; + /// Copy the highlighted chunks to the clipboard as JSON. The format is an array of lines, + /// with each line being an array of {text, highlight} objects. + fn copy_highlight_json(&mut self, _: &CopyHighlightJson, cx: &mut ViewContext) { + let Some(buffer) = self.buffer.read(cx).as_singleton() else { + return; + }; - // #[derive(Serialize)] - // struct Chunk<'a> { - // text: String, - // highlight: Option<&'a str>, - // } + #[derive(Serialize)] + struct Chunk<'a> { + text: String, + highlight: Option<&'a str>, + } - // let snapshot = buffer.read(cx).snapshot(); - // let range = self - // .selected_text_range(cx) - // .and_then(|selected_range| { - // if selected_range.is_empty() { - // None - // } else { - // Some(selected_range) - // } - // }) - // .unwrap_or_else(|| 0..snapshot.len()); - - // let chunks = snapshot.chunks(range, true); - // let mut lines = Vec::new(); - // let mut line: VecDeque = VecDeque::new(); - - // let theme = &theme::current(cx).editor.syntax; - - // for chunk in chunks { - // let highlight = chunk.syntax_highlight_id.and_then(|id| id.name(theme)); - // let mut chunk_lines = chunk.text.split("\n").peekable(); - // while let Some(text) = chunk_lines.next() { - // let mut merged_with_last_token = false; - // if let Some(last_token) = line.back_mut() { - // if last_token.highlight == highlight { - // last_token.text.push_str(text); - // merged_with_last_token = true; - // } - // } + let snapshot = buffer.read(cx).snapshot(); + let range = self + .selected_text_range(cx) + .and_then(|selected_range| { + if selected_range.is_empty() { + None + } else { + Some(selected_range) + } + }) + .unwrap_or_else(|| 0..snapshot.len()); - // if !merged_with_last_token { - // line.push_back(Chunk { - // text: text.into(), - // highlight, - // }); - // } + let chunks = snapshot.chunks(range, true); + let mut lines = Vec::new(); + let mut line: VecDeque = VecDeque::new(); - // if chunk_lines.peek().is_some() { - // if line.len() > 1 && line.front().unwrap().text.is_empty() { - // line.pop_front(); - // } - // if line.len() > 1 && line.back().unwrap().text.is_empty() { - // line.pop_back(); - // } + let Some(style) = self.style.as_ref() else { + return; + }; - // lines.push(mem::take(&mut line)); - // } - // } - // } + for chunk in chunks { + let highlight = chunk + .syntax_highlight_id + .and_then(|id| id.name(&style.syntax)); + let mut chunk_lines = chunk.text.split("\n").peekable(); + while let Some(text) = chunk_lines.next() { + let mut merged_with_last_token = false; + if let Some(last_token) = line.back_mut() { + if last_token.highlight == highlight { + last_token.text.push_str(text); + merged_with_last_token = true; + } + } - // let Some(lines) = serde_json::to_string_pretty(&lines).log_err() else { - // return; - // }; - // cx.write_to_clipboard(ClipboardItem::new(lines)); - // } + if !merged_with_last_token { + line.push_back(Chunk { + text: text.into(), + highlight, + }); + } - // pub fn inlay_hint_cache(&self) -> &InlayHintCache { - // &self.inlay_hint_cache - // } + if chunk_lines.peek().is_some() { + if line.len() > 1 && line.front().unwrap().text.is_empty() { + line.pop_front(); + } + if line.len() > 1 && line.back().unwrap().text.is_empty() { + line.pop_back(); + } - // pub fn replay_insert_event( - // &mut self, - // text: &str, - // relative_utf16_range: Option>, - // cx: &mut ViewContext, - // ) { - // if !self.input_enabled { - // cx.emit(Event::InputIgnored { text: text.into() }); - // return; - // } - // if let Some(relative_utf16_range) = relative_utf16_range { - // let selections = self.selections.all::(cx); - // self.change_selections(None, cx, |s| { - // let new_ranges = selections.into_iter().map(|range| { - // let start = OffsetUtf16( - // range - // .head() - // .0 - // .saturating_add_signed(relative_utf16_range.start), - // ); - // let end = OffsetUtf16( - // range - // .head() - // .0 - // .saturating_add_signed(relative_utf16_range.end), - // ); - // start..end - // }); - // s.select_ranges(new_ranges); - // }); - // } + lines.push(mem::take(&mut line)); + } + } + } - // self.handle_input(text, cx); - // } + let Some(lines) = serde_json::to_string_pretty(&lines).log_err() else { + return; + }; + cx.write_to_clipboard(ClipboardItem::new(lines)); + } - // pub fn supports_inlay_hints(&self, cx: &AppContext) -> bool { - // let Some(project) = self.project.as_ref() else { - // return false; - // }; - // let project = project.read(cx); - - // let mut supports = false; - // self.buffer().read(cx).for_each_buffer(|buffer| { - // if !supports { - // supports = project - // .language_servers_for_buffer(buffer.read(cx), cx) - // .any( - // |(_, server)| match server.capabilities().inlay_hint_provider { - // Some(lsp::OneOf::Left(enabled)) => enabled, - // Some(lsp::OneOf::Right(_)) => true, - // None => false, - // }, - // ) - // } - // }); - // supports - // } + pub fn inlay_hint_cache(&self) -> &InlayHintCache { + &self.inlay_hint_cache + } + + pub fn replay_insert_event( + &mut self, + text: &str, + relative_utf16_range: Option>, + cx: &mut ViewContext, + ) { + if !self.input_enabled { + cx.emit(Event::InputIgnored { text: text.into() }); + return; + } + if let Some(relative_utf16_range) = relative_utf16_range { + let selections = self.selections.all::(cx); + self.change_selections(None, cx, |s| { + let new_ranges = selections.into_iter().map(|range| { + let start = OffsetUtf16( + range + .head() + .0 + .saturating_add_signed(relative_utf16_range.start), + ); + let end = OffsetUtf16( + range + .head() + .0 + .saturating_add_signed(relative_utf16_range.end), + ); + start..end + }); + s.select_ranges(new_ranges); + }); + } + + self.handle_input(text, cx); + } + + pub fn supports_inlay_hints(&self, cx: &AppContext) -> bool { + let Some(project) = self.project.as_ref() else { + return false; + }; + let project = project.read(cx); + + let mut supports = false; + self.buffer().read(cx).for_each_buffer(|buffer| { + if !supports { + supports = project + .language_servers_for_buffer(buffer.read(cx), cx) + .any( + |(_, server)| match server.capabilities().inlay_hint_provider { + Some(lsp::OneOf::Left(enabled)) => enabled, + Some(lsp::OneOf::Right(_)) => true, + None => false, + }, + ) + } + }); + supports + } fn focus(&self, cx: &mut WindowContext) { cx.focus(&self.focus_handle) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 4e16ff450413d7f143820a8e8797e9f69ef7b51f..569b6581ce1b2f0d3b3145d3773a548f2352a05e 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2,8 +2,10 @@ use crate::{ display_map::{BlockStyle, DisplaySnapshot, FoldStatus, HighlightedChunk, ToDisplayPoint}, editor_settings::ShowScrollbar, git::{diff_hunk_to_display, DisplayDiffHunk}, + scroll::scroll_amount::ScrollAmount, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, - MoveDown, Point, Selection, SoftWrap, ToPoint, MAX_LINE_LEN, + HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, Selection, + SoftWrap, ToPoint, MAX_LINE_LEN, }; use anyhow::Result; use collections::{BTreeMap, HashMap}; @@ -31,6 +33,7 @@ use std::{ }; use sum_tree::Bias; use theme::{ActiveTheme, PlayerColor}; +use util::ResultExt; use workspace::item::Item; enum FoldMarkers {} @@ -2562,6 +2565,153 @@ impl Element for EditorElement { build_action_listener(Editor::move_right), build_action_listener(Editor::move_down), build_action_listener(Editor::move_up), + // build_action_listener(Editor::new_file), todo!() + // build_action_listener(Editor::new_file_in_direction), todo!() + build_action_listener(Editor::cancel), + build_action_listener(Editor::newline), + build_action_listener(Editor::newline_above), + build_action_listener(Editor::newline_below), + build_action_listener(Editor::backspace), + build_action_listener(Editor::delete), + build_action_listener(Editor::tab), + build_action_listener(Editor::tab_prev), + build_action_listener(Editor::indent), + build_action_listener(Editor::outdent), + build_action_listener(Editor::delete_line), + build_action_listener(Editor::join_lines), + build_action_listener(Editor::sort_lines_case_sensitive), + build_action_listener(Editor::sort_lines_case_insensitive), + build_action_listener(Editor::reverse_lines), + build_action_listener(Editor::shuffle_lines), + build_action_listener(Editor::convert_to_upper_case), + build_action_listener(Editor::convert_to_lower_case), + build_action_listener(Editor::convert_to_title_case), + build_action_listener(Editor::convert_to_snake_case), + build_action_listener(Editor::convert_to_kebab_case), + build_action_listener(Editor::convert_to_upper_camel_case), + build_action_listener(Editor::convert_to_lower_camel_case), + build_action_listener(Editor::delete_to_previous_word_start), + build_action_listener(Editor::delete_to_previous_subword_start), + build_action_listener(Editor::delete_to_next_word_end), + build_action_listener(Editor::delete_to_next_subword_end), + build_action_listener(Editor::delete_to_beginning_of_line), + build_action_listener(Editor::delete_to_end_of_line), + build_action_listener(Editor::cut_to_end_of_line), + build_action_listener(Editor::duplicate_line), + build_action_listener(Editor::move_line_up), + build_action_listener(Editor::move_line_down), + build_action_listener(Editor::transpose), + build_action_listener(Editor::cut), + build_action_listener(Editor::copy), + build_action_listener(Editor::paste), + build_action_listener(Editor::undo), + build_action_listener(Editor::redo), + build_action_listener(Editor::move_page_up), + build_action_listener(Editor::move_page_down), + build_action_listener(Editor::next_screen), + build_action_listener(Editor::scroll_cursor_top), + build_action_listener(Editor::scroll_cursor_center), + build_action_listener(Editor::scroll_cursor_bottom), + build_action_listener(|editor, _: &LineDown, cx| { + editor.scroll_screen(&ScrollAmount::Line(1.), cx) + }), + build_action_listener(|editor, _: &LineUp, cx| { + editor.scroll_screen(&ScrollAmount::Line(-1.), cx) + }), + build_action_listener(|editor, _: &HalfPageDown, cx| { + editor.scroll_screen(&ScrollAmount::Page(0.5), cx) + }), + build_action_listener(|editor, _: &HalfPageUp, cx| { + editor.scroll_screen(&ScrollAmount::Page(-0.5), cx) + }), + build_action_listener(|editor, _: &PageDown, cx| { + editor.scroll_screen(&ScrollAmount::Page(1.), cx) + }), + build_action_listener(|editor, _: &PageUp, cx| { + editor.scroll_screen(&ScrollAmount::Page(-1.), cx) + }), + build_action_listener(Editor::move_to_previous_word_start), + build_action_listener(Editor::move_to_previous_subword_start), + build_action_listener(Editor::move_to_next_word_end), + build_action_listener(Editor::move_to_next_subword_end), + build_action_listener(Editor::move_to_beginning_of_line), + build_action_listener(Editor::move_to_end_of_line), + build_action_listener(Editor::move_to_start_of_paragraph), + build_action_listener(Editor::move_to_end_of_paragraph), + build_action_listener(Editor::move_to_beginning), + build_action_listener(Editor::move_to_end), + build_action_listener(Editor::select_up), + build_action_listener(Editor::select_down), + build_action_listener(Editor::select_left), + build_action_listener(Editor::select_right), + build_action_listener(Editor::select_to_previous_word_start), + build_action_listener(Editor::select_to_previous_subword_start), + build_action_listener(Editor::select_to_next_word_end), + build_action_listener(Editor::select_to_next_subword_end), + build_action_listener(Editor::select_to_beginning_of_line), + build_action_listener(Editor::select_to_end_of_line), + build_action_listener(Editor::select_to_start_of_paragraph), + build_action_listener(Editor::select_to_end_of_paragraph), + build_action_listener(Editor::select_to_beginning), + build_action_listener(Editor::select_to_end), + build_action_listener(Editor::select_all), + build_action_listener(|editor, action, cx| { + editor.select_all_matches(action, cx).log_err(); + }), + build_action_listener(Editor::select_line), + build_action_listener(Editor::split_selection_into_lines), + build_action_listener(Editor::add_selection_above), + build_action_listener(Editor::add_selection_below), + build_action_listener(|editor, action, cx| { + editor.select_next(action, cx).log_err(); + }), + build_action_listener(|editor, action, cx| { + editor.select_previous(action, cx).log_err(); + }), + build_action_listener(Editor::toggle_comments), + build_action_listener(Editor::select_larger_syntax_node), + build_action_listener(Editor::select_smaller_syntax_node), + build_action_listener(Editor::move_to_enclosing_bracket), + build_action_listener(Editor::undo_selection), + build_action_listener(Editor::redo_selection), + build_action_listener(Editor::go_to_diagnostic), + build_action_listener(Editor::go_to_prev_diagnostic), + build_action_listener(Editor::go_to_hunk), + build_action_listener(Editor::go_to_prev_hunk), + build_action_listener(Editor::go_to_definition), + build_action_listener(Editor::go_to_definition_split), + build_action_listener(Editor::go_to_type_definition), + build_action_listener(Editor::go_to_type_definition_split), + build_action_listener(Editor::fold), + build_action_listener(Editor::fold_at), + build_action_listener(Editor::unfold_lines), + build_action_listener(Editor::unfold_at), + // build_action_listener(Editor::gutter_hover), todo!() + build_action_listener(Editor::fold_selected_ranges), + build_action_listener(Editor::show_completions), + // build_action_listener(Editor::toggle_code_actions), todo!() + // build_action_listener(Editor::open_excerpts), todo!() + build_action_listener(Editor::toggle_soft_wrap), + build_action_listener(Editor::toggle_inlay_hints), + build_action_listener(Editor::reveal_in_finder), + build_action_listener(Editor::copy_path), + build_action_listener(Editor::copy_relative_path), + build_action_listener(Editor::copy_highlight_json), + build_action_listener(|editor, action, cx| { + editor + .format(action, cx) + .map(|task| task.detach_and_log_err(cx)); + }), + build_action_listener(Editor::restart_language_server), + build_action_listener(Editor::show_character_palette), + // build_action_listener(Editor::confirm_completion), todo!() + // build_action_listener(Editor::confirm_code_action), todo!() + // build_action_listener(Editor::rename), todo!() + // build_action_listener(Editor::confirm_rename), todo!() + // build_action_listener(Editor::find_all_references), todo!() + build_action_listener(Editor::next_copilot_suggestion), + build_action_listener(Editor::previous_copilot_suggestion), + build_action_listener(Editor::copilot_suggest), build_key_listener( move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| { if phase == DispatchPhase::Bubble { diff --git a/crates/editor2/src/scroll.rs b/crates/editor2/src/scroll.rs index d5aeb853bbf7a1210387b8c7c9184d4a2f43192c..52e7498f970c8c325ae6133529da0fe98443d4d2 100644 --- a/crates/editor2/src/scroll.rs +++ b/crates/editor2/src/scroll.rs @@ -288,16 +288,15 @@ impl ScrollManager { } } -// todo!() impl Editor { - // pub fn vertical_scroll_margin(&mut self) -> usize { - // self.scroll_manager.vertical_scroll_margin as usize - // } + pub fn vertical_scroll_margin(&mut self) -> usize { + self.scroll_manager.vertical_scroll_margin as usize + } - // pub fn set_vertical_scroll_margin(&mut self, margin_rows: usize, cx: &mut ViewContext) { - // self.scroll_manager.vertical_scroll_margin = margin_rows as f32; - // cx.notify(); - // } + pub fn set_vertical_scroll_margin(&mut self, margin_rows: usize, cx: &mut ViewContext) { + self.scroll_manager.vertical_scroll_margin = margin_rows as f32; + cx.notify(); + } pub fn visible_line_count(&self) -> Option { self.scroll_manager.visible_line_count @@ -349,11 +348,9 @@ impl Editor { self.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx); } - pub fn scroll_position(&self, cx: &mut ViewContext) -> gpui::Point { + pub fn scroll_position(&self, cx: &mut ViewContext) -> gpui::Point { let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // todo!() Should `self.scroll_manager.anchor.scroll_position()` return `Pixels`? - // self.scroll_manager.anchor.scroll_position(&display_map) - todo!() + self.scroll_manager.anchor.scroll_position(&display_map) } pub fn set_scroll_anchor(&mut self, scroll_anchor: ScrollAnchor, cx: &mut ViewContext) { @@ -382,50 +379,50 @@ impl Editor { .set_anchor(scroll_anchor, top_row, false, false, workspace_id, cx); } - // pub fn scroll_screen(&mut self, amount: &ScrollAmount, cx: &mut ViewContext) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // return; - // } - - // if self.take_rename(true, cx).is_some() { - // return; - // } - - // let cur_position = self.scroll_position(cx); - // let new_pos = cur_position + point(0., amount.lines(self)); - // self.set_scroll_position(new_pos, cx); - // } - - // /// Returns an ordering. The newest selection is: - // /// Ordering::Equal => on screen - // /// Ordering::Less => above the screen - // /// Ordering::Greater => below the screen - // pub fn newest_selection_on_screen(&self, cx: &mut AppContext) -> Ordering { - // let snapshot = self.display_map.update(cx, |map, cx| map.snapshot(cx)); - // let newest_head = self - // .selections - // .newest_anchor() - // .head() - // .to_display_point(&snapshot); - // let screen_top = self - // .scroll_manager - // .anchor - // .anchor - // .to_display_point(&snapshot); - - // if screen_top > newest_head { - // return Ordering::Less; - // } - - // if let Some(visible_lines) = self.visible_line_count() { - // if newest_head.row() < screen_top.row() + visible_lines as u32 { - // return Ordering::Equal; - // } - // } - - // Ordering::Greater - // } + pub fn scroll_screen(&mut self, amount: &ScrollAmount, cx: &mut ViewContext) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } + + if self.take_rename(true, cx).is_some() { + return; + } + + let cur_position = self.scroll_position(cx); + let new_pos = cur_position + point(0., amount.lines(self)); + self.set_scroll_position(new_pos, cx); + } + + /// Returns an ordering. The newest selection is: + /// Ordering::Equal => on screen + /// Ordering::Less => above the screen + /// Ordering::Greater => below the screen + pub fn newest_selection_on_screen(&self, cx: &mut AppContext) -> Ordering { + let snapshot = self.display_map.update(cx, |map, cx| map.snapshot(cx)); + let newest_head = self + .selections + .newest_anchor() + .head() + .to_display_point(&snapshot); + let screen_top = self + .scroll_manager + .anchor + .anchor + .to_display_point(&snapshot); + + if screen_top > newest_head { + return Ordering::Less; + } + + if let Some(visible_lines) = self.visible_line_count() { + if newest_head.row() < screen_top.row() + visible_lines as u32 { + return Ordering::Equal; + } + } + + Ordering::Greater + } pub fn read_scroll_position_from_db( &mut self, diff --git a/crates/editor2/src/scroll/actions.rs b/crates/editor2/src/scroll/actions.rs index 5ea502c456b0c2f73f24dc05833f9864ee97f90d..9a1e54f5e48bc301bd29756b92e20885f2466117 100644 --- a/crates/editor2/src/scroll/actions.rs +++ b/crates/editor2/src/scroll/actions.rs @@ -1,66 +1,27 @@ use super::Axis; -use crate::Editor; -use gpui::{AppContext, Point, ViewContext}; - -// actions!( -// editor, -// [ -// LineDown, -// LineUp, -// HalfPageDown, -// HalfPageUp, -// PageDown, -// PageUp, -// NextScreen, -// ScrollCursorTop, -// ScrollCursorCenter, -// ScrollCursorBottom, -// ] -// ); - -pub fn init(cx: &mut AppContext) { - // todo!() - // cx.add_action(Editor::next_screen); - // cx.add_action(Editor::scroll_cursor_top); - // cx.add_action(Editor::scroll_cursor_center); - // cx.add_action(Editor::scroll_cursor_bottom); - // cx.add_action(|this: &mut Editor, _: &LineDown, cx| { - // this.scroll_screen(&ScrollAmount::Line(1.), cx) - // }); - // cx.add_action(|this: &mut Editor, _: &LineUp, cx| { - // this.scroll_screen(&ScrollAmount::Line(-1.), cx) - // }); - // cx.add_action(|this: &mut Editor, _: &HalfPageDown, cx| { - // this.scroll_screen(&ScrollAmount::Page(0.5), cx) - // }); - // cx.add_action(|this: &mut Editor, _: &HalfPageUp, cx| { - // this.scroll_screen(&ScrollAmount::Page(-0.5), cx) - // }); - // cx.add_action(|this: &mut Editor, _: &PageDown, cx| { - // this.scroll_screen(&ScrollAmount::Page(1.), cx) - // }); - // cx.add_action(|this: &mut Editor, _: &PageUp, cx| { - // this.scroll_screen(&ScrollAmount::Page(-1.), cx) - // }); -} +use crate::{ + Autoscroll, Bias, Editor, EditorMode, NextScreen, ScrollAnchor, ScrollCursorBottom, + ScrollCursorCenter, ScrollCursorTop, +}; +use gpui::{actions, AppContext, Point, ViewContext}; impl Editor { - // pub fn next_screen(&mut self, _: &NextScreen, cx: &mut ViewContext) -> Option<()> { - // if self.take_rename(true, cx).is_some() { - // return None; - // } + pub fn next_screen(&mut self, _: &NextScreen, cx: &mut ViewContext) { + if self.take_rename(true, cx).is_some() { + return; + } - // if self.mouse_context_menu.read(cx).visible() { - // return None; - // } + // todo!() + // if self.mouse_context_menu.read(cx).visible() { + // return None; + // } - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // return None; - // } - // self.request_autoscroll(Autoscroll::Next, cx); - // Some(()) - // } + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } + self.request_autoscroll(Autoscroll::Next, cx); + } pub fn scroll( &mut self, @@ -72,79 +33,71 @@ impl Editor { self.set_scroll_position(scroll_position, cx); } - // fn scroll_cursor_top(editor: &mut Editor, _: &ScrollCursorTop, cx: &mut ViewContext) { - // let snapshot = editor.snapshot(cx).display_snapshot; - // let scroll_margin_rows = editor.vertical_scroll_margin() as u32; + pub fn scroll_cursor_top(&mut self, _: &ScrollCursorTop, cx: &mut ViewContext) { + let snapshot = self.snapshot(cx).display_snapshot; + let scroll_margin_rows = self.vertical_scroll_margin() as u32; - // let mut new_screen_top = editor.selections.newest_display(cx).head(); - // *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(scroll_margin_rows); - // *new_screen_top.column_mut() = 0; - // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); - // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + let mut new_screen_top = self.selections.newest_display(cx).head(); + *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(scroll_margin_rows); + *new_screen_top.column_mut() = 0; + let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); - // editor.set_scroll_anchor( - // ScrollAnchor { - // anchor: new_anchor, - // offset: Default::default(), - // }, - // cx, - // ) - // } + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } - // fn scroll_cursor_center( - // editor: &mut Editor, - // _: &ScrollCursorCenter, - // cx: &mut ViewContext, - // ) { - // let snapshot = editor.snapshot(cx).display_snapshot; - // let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { - // visible_rows as u32 - // } else { - // return; - // }; + pub fn scroll_cursor_center(&mut self, _: &ScrollCursorCenter, cx: &mut ViewContext) { + let snapshot = self.snapshot(cx).display_snapshot; + let visible_rows = if let Some(visible_rows) = self.visible_line_count() { + visible_rows as u32 + } else { + return; + }; - // let mut new_screen_top = editor.selections.newest_display(cx).head(); - // *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(visible_rows / 2); - // *new_screen_top.column_mut() = 0; - // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); - // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + let mut new_screen_top = self.selections.newest_display(cx).head(); + *new_screen_top.row_mut() = new_screen_top.row().saturating_sub(visible_rows / 2); + *new_screen_top.column_mut() = 0; + let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); - // editor.set_scroll_anchor( - // ScrollAnchor { - // anchor: new_anchor, - // offset: Default::default(), - // }, - // cx, - // ) - // } + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } - // fn scroll_cursor_bottom( - // editor: &mut Editor, - // _: &ScrollCursorBottom, - // cx: &mut ViewContext, - // ) { - // let snapshot = editor.snapshot(cx).display_snapshot; - // let scroll_margin_rows = editor.vertical_scroll_margin() as u32; - // let visible_rows = if let Some(visible_rows) = editor.visible_line_count() { - // visible_rows as u32 - // } else { - // return; - // }; + pub fn scroll_cursor_bottom(&mut self, _: &ScrollCursorBottom, cx: &mut ViewContext) { + let snapshot = self.snapshot(cx).display_snapshot; + let scroll_margin_rows = self.vertical_scroll_margin() as u32; + let visible_rows = if let Some(visible_rows) = self.visible_line_count() { + visible_rows as u32 + } else { + return; + }; - // let mut new_screen_top = editor.selections.newest_display(cx).head(); - // *new_screen_top.row_mut() = new_screen_top - // .row() - // .saturating_sub(visible_rows.saturating_sub(scroll_margin_rows)); - // *new_screen_top.column_mut() = 0; - // let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); - // let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); + let mut new_screen_top = self.selections.newest_display(cx).head(); + *new_screen_top.row_mut() = new_screen_top + .row() + .saturating_sub(visible_rows.saturating_sub(scroll_margin_rows)); + *new_screen_top.column_mut() = 0; + let new_screen_top = new_screen_top.to_offset(&snapshot, Bias::Left); + let new_anchor = snapshot.buffer_snapshot.anchor_before(new_screen_top); - // editor.set_scroll_anchor( - // ScrollAnchor { - // anchor: new_anchor, - // offset: Default::default(), - // }, - // cx, - // ) - // } + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } } diff --git a/crates/editor2/src/selections_collection.rs b/crates/editor2/src/selections_collection.rs index 2762fd369ea2bf16e687fb61a41d4811973b86fb..23c5a75809719fc918a8716d17e949538fcc1c2c 100644 --- a/crates/editor2/src/selections_collection.rs +++ b/crates/editor2/src/selections_collection.rs @@ -302,39 +302,39 @@ impl SelectionsCollection { .collect() } - // pub fn build_columnar_selection( - // &mut self, - // display_map: &DisplaySnapshot, - // row: u32, - // positions: &Range, - // reversed: bool, - // text_layout_details: &TextLayoutDetails, - // ) -> Option> { - // let is_empty = positions.start == positions.end; - // let line_len = display_map.line_len(row); - - // let layed_out_line = display_map.lay_out_line_for_row(row, &text_layout_details); - - // let start_col = layed_out_line.closest_index_for_x(positions.start) as u32; - // if start_col < line_len || (is_empty && positions.start == layed_out_line.width()) { - // let start = DisplayPoint::new(row, start_col); - // let end_col = layed_out_line.closest_index_for_x(positions.end) as u32; - // let end = DisplayPoint::new(row, end_col); - - // Some(Selection { - // id: post_inc(&mut self.next_selection_id), - // start: start.to_point(display_map), - // end: end.to_point(display_map), - // reversed, - // goal: SelectionGoal::HorizontalRange { - // start: positions.start, - // end: positions.end, - // }, - // }) - // } else { - // None - // } - // } + pub fn build_columnar_selection( + &mut self, + display_map: &DisplaySnapshot, + row: u32, + positions: &Range, + reversed: bool, + text_layout_details: &TextLayoutDetails, + ) -> Option> { + let is_empty = positions.start == positions.end; + let line_len = display_map.line_len(row); + + let layed_out_line = display_map.lay_out_line_for_row(row, &text_layout_details); + + let start_col = layed_out_line.closest_index_for_x(positions.start) as u32; + if start_col < line_len || (is_empty && positions.start == layed_out_line.width) { + let start = DisplayPoint::new(row, start_col); + let end_col = layed_out_line.closest_index_for_x(positions.end) as u32; + let end = DisplayPoint::new(row, end_col); + + Some(Selection { + id: post_inc(&mut self.next_selection_id), + start: start.to_point(display_map), + end: end.to_point(display_map), + reversed, + goal: SelectionGoal::HorizontalRange { + start: positions.start.into(), + end: positions.end.into(), + }, + }) + } else { + None + } + } pub(crate) fn change_with( &mut self, diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 50c7b772f882f07aa99e668676f1e7b5ddc8688a..e5791a2dcb4007df21e435c111a5e7260be2ad93 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -608,6 +608,10 @@ impl<'a> WindowContext<'a> { .find(|display| display.id() == self.window.display_id) } + pub fn show_character_palette(&self) { + self.window.platform_window.show_character_palette(); + } + /// The scale factor of the display associated with the window. For example, it could /// return 2.0 for a "retina" display, indicating that each logical pixel should actually /// be rendered as two pixels on screen. diff --git a/crates/gpui2_macros/src/action.rs b/crates/gpui2_macros/src/action.rs index e4f54e58d5c601561925be05e962626dd5fd5d64..66302f3fc0b6ee519e349376ca65fda8b2e4a783 100644 --- a/crates/gpui2_macros/src/action.rs +++ b/crates/gpui2_macros/src/action.rs @@ -31,20 +31,21 @@ pub fn action(_attr: TokenStream, item: TokenStream) -> TokenStream { #[derive(gpui::serde::Deserialize, std::cmp::PartialEq, std::clone::Clone, std::default::Default, std::fmt::Debug)] #(#attrs)* }; + let visibility = input.vis; let output = match input.data { syn::Data::Struct(ref struct_data) => { let fields = &struct_data.fields; quote! { #attributes - struct #name { #fields } + #visibility struct #name #fields } } syn::Data::Enum(ref enum_data) => { let variants = &enum_data.variants; quote! { #attributes - enum #name { #variants } + #visibility enum #name { #variants } } } _ => panic!("Expected a struct or an enum."), diff --git a/crates/gpui2_macros/src/register_action.rs b/crates/gpui2_macros/src/register_action.rs index ab00daf4773a620200d2edd8129dd666a233bfde..37f57ccb27b14c841fd6bcf660ee4f39076d8fcb 100644 --- a/crates/gpui2_macros/src/register_action.rs +++ b/crates/gpui2_macros/src/register_action.rs @@ -28,5 +28,6 @@ pub fn register_action(_attr: TokenStream, item: TokenStream) -> TokenStream { gpui::register_action::<#type_name>() } }; + TokenStream::from(expanded) } From 6a0789c88e36b9b9ef98f2305b4a2bef0ec3b549 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 12:04:25 +0100 Subject: [PATCH 091/110] Don't alpha blend when rasterizing paths Co-Authored-By: Piotr --- .../gpui2/src/platform/mac/metal_renderer.rs | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/crates/gpui2/src/platform/mac/metal_renderer.rs b/crates/gpui2/src/platform/mac/metal_renderer.rs index 7bb80640beb76f1fa1eb0dd8bc991314d9aa043b..0631c75de5e222e43f780f29fb9844f5e96c099c 100644 --- a/crates/gpui2/src/platform/mac/metal_renderer.rs +++ b/crates/gpui2/src/platform/mac/metal_renderer.rs @@ -87,7 +87,7 @@ impl MetalRenderer { MTLResourceOptions::StorageModeManaged, ); - let paths_rasterization_pipeline_state = build_pipeline_state( + let paths_rasterization_pipeline_state = build_path_rasterization_pipeline_state( &device, &library, "paths_rasterization", @@ -823,7 +823,40 @@ fn build_pipeline_state( color_attachment.set_source_alpha_blend_factor(metal::MTLBlendFactor::One); color_attachment.set_destination_rgb_blend_factor(metal::MTLBlendFactor::OneMinusSourceAlpha); color_attachment.set_destination_alpha_blend_factor(metal::MTLBlendFactor::One); - descriptor.set_depth_attachment_pixel_format(MTLPixelFormat::Invalid); + + device + .new_render_pipeline_state(&descriptor) + .expect("could not create render pipeline state") +} + +fn build_path_rasterization_pipeline_state( + device: &metal::DeviceRef, + library: &metal::LibraryRef, + label: &str, + vertex_fn_name: &str, + fragment_fn_name: &str, + pixel_format: metal::MTLPixelFormat, +) -> metal::RenderPipelineState { + let vertex_fn = library + .get_function(vertex_fn_name, None) + .expect("error locating vertex function"); + let fragment_fn = library + .get_function(fragment_fn_name, None) + .expect("error locating fragment function"); + + let descriptor = metal::RenderPipelineDescriptor::new(); + descriptor.set_label(label); + descriptor.set_vertex_function(Some(vertex_fn.as_ref())); + descriptor.set_fragment_function(Some(fragment_fn.as_ref())); + let color_attachment = descriptor.color_attachments().object_at(0).unwrap(); + color_attachment.set_pixel_format(pixel_format); + color_attachment.set_blending_enabled(true); + color_attachment.set_rgb_blend_operation(metal::MTLBlendOperation::Add); + color_attachment.set_alpha_blend_operation(metal::MTLBlendOperation::Add); + color_attachment.set_source_rgb_blend_factor(metal::MTLBlendFactor::One); + color_attachment.set_source_alpha_blend_factor(metal::MTLBlendFactor::One); + color_attachment.set_destination_rgb_blend_factor(metal::MTLBlendFactor::One); + color_attachment.set_destination_alpha_blend_factor(metal::MTLBlendFactor::One); device .new_render_pipeline_state(&descriptor) From c5d5571ad35f6aa15a146550f5d81fe269a579c2 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 12:31:35 +0100 Subject: [PATCH 092/110] Fix warnings when generating function name for `ctor` Co-Authored-By: Piotr --- crates/gpui2_macros/src/register_action.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui2_macros/src/register_action.rs b/crates/gpui2_macros/src/register_action.rs index 37f57ccb27b14c841fd6bcf660ee4f39076d8fcb..68c39ad9bd7347be7d01e139e37b5a14c8c05d92 100644 --- a/crates/gpui2_macros/src/register_action.rs +++ b/crates/gpui2_macros/src/register_action.rs @@ -18,7 +18,7 @@ use syn::{parse_macro_input, DeriveInput}; pub fn register_action(_attr: TokenStream, item: TokenStream) -> TokenStream { let input = parse_macro_input!(item as DeriveInput); let type_name = &input.ident; - let ctor_fn_name = format_ident!("register_{}_builder", type_name); + let ctor_fn_name = format_ident!("register_{}_builder", type_name.to_string().to_lowercase()); let expanded = quote! { #input From 2364f6b22ee71ffc7dd394a3ee51ef52357878b9 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:54:37 +0100 Subject: [PATCH 093/110] gpui2: Type-erase futures. Project2's LLVM IR size is ~20-25% bigger than project1 due to the fact that in gpui2 we call async_task::spawn(_local) with impl Future instead of dyn Future, which leads to quite a few more instantiations of RawTask. LLVM-IR size for project2: | build_type | main | this branch | project1 | | debug | 2617795 | 2022814 | 1817866 | | release | 4439033 | 3715086 | 3314489 | --- crates/gpui2/src/executor.rs | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/crates/gpui2/src/executor.rs b/crates/gpui2/src/executor.rs index b6fd5b23180bed5bf852ae99e79a6cb071ac7174..b7e3610283f5ec58fbd61a6d977c02e55efedaaf 100644 --- a/crates/gpui2/src/executor.rs +++ b/crates/gpui2/src/executor.rs @@ -68,7 +68,8 @@ impl Future for Task { } } } - +type AnyLocalFuture = Pin>>; +type AnyFuture = Pin>>; impl BackgroundExecutor { pub fn new(dispatcher: Arc) -> Self { Self { dispatcher } @@ -81,10 +82,16 @@ impl BackgroundExecutor { R: Send + 'static, { let dispatcher = self.dispatcher.clone(); - let (runnable, task) = - async_task::spawn(future, move |runnable| dispatcher.dispatch(runnable)); - runnable.schedule(); - Task::Spawned(task) + fn inner( + dispatcher: Arc, + future: AnyFuture, + ) -> Task { + let (runnable, task) = + async_task::spawn(future, move |runnable| dispatcher.dispatch(runnable)); + runnable.schedule(); + Task::Spawned(task) + } + inner::(dispatcher, Box::pin(future)) } #[cfg(any(test, feature = "test-support"))] @@ -243,11 +250,17 @@ impl ForegroundExecutor { R: 'static, { let dispatcher = self.dispatcher.clone(); - let (runnable, task) = async_task::spawn_local(future, move |runnable| { - dispatcher.dispatch_on_main_thread(runnable) - }); - runnable.schedule(); - Task::Spawned(task) + fn inner( + dispatcher: Arc, + future: AnyLocalFuture, + ) -> Task { + let (runnable, task) = async_task::spawn_local(future, move |runnable| { + dispatcher.dispatch_on_main_thread(runnable) + }); + runnable.schedule(); + Task::Spawned(task) + } + inner::(dispatcher, Box::pin(future)) } } From cd3773531c9e323ff0fda4eafdf14be4e4b3e255 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 13:28:20 +0100 Subject: [PATCH 094/110] uncomment mouse moved --- crates/editor2/src/element.rs | 108 ++++--- crates/editor2/src/link_go_to_definition.rs | 329 ++++++++++---------- 2 files changed, 225 insertions(+), 212 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 569b6581ce1b2f0d3b3145d3773a548f2352a05e..0a590fe2fdb8ec8d017461fe36dfd490c714ce49 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2,6 +2,10 @@ use crate::{ display_map::{BlockStyle, DisplaySnapshot, FoldStatus, HighlightedChunk, ToDisplayPoint}, editor_settings::ShowScrollbar, git::{diff_hunk_to_display, DisplayDiffHunk}, + hover_popover::hover_at, + link_go_to_definition::{ + update_go_to_definition_link, update_inlay_link_and_hover_points, GoToDefinitionTrigger, + }, scroll::scroll_amount::ScrollAmount, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, Selection, @@ -12,9 +16,9 @@ use collections::{BTreeMap, HashMap}; use gpui::{ black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, - Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Pixels, - ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, - TextSystem, ViewContext, WindowContext, + Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Modifiers, + MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, + TextRun, TextStyle, TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -423,50 +427,50 @@ impl EditorElement { // } // } - // fn mouse_moved( - // editor: &mut Editor, - // MouseMovedEvent { - // modifiers: Modifiers { shift, cmd, .. }, - // position, - // .. - // }: MouseMovedEvent, - // position_map: &PositionMap, - // text_bounds: Bounds, - // cx: &mut ViewContext, - // ) -> bool { - // // This will be handled more correctly once https://github.com/zed-industries/zed/issues/1218 is completed - // // Don't trigger hover popover if mouse is hovering over context menu - // if text_bounds.contains_point(position) { - // let point_for_position = position_map.point_for_position(text_bounds, position); - // match point_for_position.as_valid() { - // Some(point) => { - // update_go_to_definition_link( - // editor, - // Some(GoToDefinitionTrigger::Text(point)), - // cmd, - // shift, - // cx, - // ); - // hover_at(editor, Some(point), cx); - // } - // None => { - // update_inlay_link_and_hover_points( - // &position_map.snapshot, - // point_for_position, - // editor, - // cmd, - // shift, - // cx, - // ); - // } - // } - // } else { - // update_go_to_definition_link(editor, None, cmd, shift, cx); - // hover_at(editor, None, cx); - // } + fn mouse_moved( + editor: &mut Editor, + MouseMoveEvent { + modifiers: Modifiers { shift, command, .. }, + position, + .. + }: &MouseMoveEvent, + position_map: &PositionMap, + text_bounds: Bounds, + cx: &mut ViewContext, + ) -> bool { + // This will be handled more correctly once https://github.com/zed-industries/zed/issues/1218 is completed + // Don't trigger hover popover if mouse is hovering over context menu + if text_bounds.contains_point(position) { + let point_for_position = position_map.point_for_position(text_bounds, position.clone()); + match point_for_position.as_valid() { + Some(point) => { + update_go_to_definition_link( + editor, + Some(GoToDefinitionTrigger::Text(point)), + *command, + *shift, + cx, + ); + hover_at(editor, Some(point), cx); + } + None => { + update_inlay_link_and_hover_points( + &position_map.snapshot, + point_for_position, + editor, + *command, + *shift, + cx, + ); + } + } + } else { + update_go_to_definition_link(editor, None, *command, *shift, cx); + hover_at(editor, None, cx); + } - // true - // } + true + } fn scroll( editor: &mut Editor, @@ -2772,6 +2776,18 @@ impl Element for EditorElement { } } }); + cx.on_mouse_event({ + let position_map = layout.position_map.clone(); + move |editor, event: &MouseMoveEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_moved(editor, event, &position_map, bounds, cx) { + cx.stop_propagation() + } + } + }); if editor.focus_handle.is_focused(cx) { cx.handle_text_input(); diff --git a/crates/editor2/src/link_go_to_definition.rs b/crates/editor2/src/link_go_to_definition.rs index 9db4061e5096ac3f4b3a221a3bc22f45114b26d2..d36762f3955e126200d7025002d543e9744bce79 100644 --- a/crates/editor2/src/link_go_to_definition.rs +++ b/crates/editor2/src/link_go_to_definition.rs @@ -171,173 +171,170 @@ pub fn update_inlay_link_and_hover_points( shift_held: bool, cx: &mut ViewContext<'_, Editor>, ) { - todo!("old implementation below") -} -// ) { -// let hovered_offset = if point_for_position.column_overshoot_after_line_end == 0 { -// Some(snapshot.display_point_to_inlay_offset(point_for_position.exact_unclipped, Bias::Left)) -// } else { -// None -// }; -// let mut go_to_definition_updated = false; -// let mut hover_updated = false; -// if let Some(hovered_offset) = hovered_offset { -// let buffer_snapshot = editor.buffer().read(cx).snapshot(cx); -// let previous_valid_anchor = buffer_snapshot.anchor_at( -// point_for_position.previous_valid.to_point(snapshot), -// Bias::Left, -// ); -// let next_valid_anchor = buffer_snapshot.anchor_at( -// point_for_position.next_valid.to_point(snapshot), -// Bias::Right, -// ); -// if let Some(hovered_hint) = editor -// .visible_inlay_hints(cx) -// .into_iter() -// .skip_while(|hint| { -// hint.position -// .cmp(&previous_valid_anchor, &buffer_snapshot) -// .is_lt() -// }) -// .take_while(|hint| { -// hint.position -// .cmp(&next_valid_anchor, &buffer_snapshot) -// .is_le() -// }) -// .max_by_key(|hint| hint.id) -// { -// let inlay_hint_cache = editor.inlay_hint_cache(); -// let excerpt_id = previous_valid_anchor.excerpt_id; -// if let Some(cached_hint) = inlay_hint_cache.hint_by_id(excerpt_id, hovered_hint.id) { -// match cached_hint.resolve_state { -// ResolveState::CanResolve(_, _) => { -// if let Some(buffer_id) = previous_valid_anchor.buffer_id { -// inlay_hint_cache.spawn_hint_resolve( -// buffer_id, -// excerpt_id, -// hovered_hint.id, -// cx, -// ); -// } -// } -// ResolveState::Resolved => { -// let mut extra_shift_left = 0; -// let mut extra_shift_right = 0; -// if cached_hint.padding_left { -// extra_shift_left += 1; -// extra_shift_right += 1; -// } -// if cached_hint.padding_right { -// extra_shift_right += 1; -// } -// match cached_hint.label { -// project::InlayHintLabel::String(_) => { -// if let Some(tooltip) = cached_hint.tooltip { -// hover_popover::hover_at_inlay( -// editor, -// InlayHover { -// excerpt: excerpt_id, -// tooltip: match tooltip { -// InlayHintTooltip::String(text) => HoverBlock { -// text, -// kind: HoverBlockKind::PlainText, -// }, -// InlayHintTooltip::MarkupContent(content) => { -// HoverBlock { -// text: content.value, -// kind: content.kind, -// } -// } -// }, -// range: InlayHighlight { -// inlay: hovered_hint.id, -// inlay_position: hovered_hint.position, -// range: extra_shift_left -// ..hovered_hint.text.len() + extra_shift_right, -// }, -// }, -// cx, -// ); -// hover_updated = true; -// } -// } -// project::InlayHintLabel::LabelParts(label_parts) => { -// let hint_start = -// snapshot.anchor_to_inlay_offset(hovered_hint.position); -// if let Some((hovered_hint_part, part_range)) = -// hover_popover::find_hovered_hint_part( -// label_parts, -// hint_start, -// hovered_offset, -// ) -// { -// let highlight_start = -// (part_range.start - hint_start).0 + extra_shift_left; -// let highlight_end = -// (part_range.end - hint_start).0 + extra_shift_right; -// let highlight = InlayHighlight { -// inlay: hovered_hint.id, -// inlay_position: hovered_hint.position, -// range: highlight_start..highlight_end, -// }; -// if let Some(tooltip) = hovered_hint_part.tooltip { -// hover_popover::hover_at_inlay( -// editor, -// InlayHover { -// excerpt: excerpt_id, -// tooltip: match tooltip { -// InlayHintLabelPartTooltip::String(text) => { -// HoverBlock { -// text, -// kind: HoverBlockKind::PlainText, -// } -// } -// InlayHintLabelPartTooltip::MarkupContent( -// content, -// ) => HoverBlock { -// text: content.value, -// kind: content.kind, -// }, -// }, -// range: highlight.clone(), -// }, -// cx, -// ); -// hover_updated = true; -// } -// if let Some((language_server_id, location)) = -// hovered_hint_part.location -// { -// go_to_definition_updated = true; -// update_go_to_definition_link( -// editor, -// Some(GoToDefinitionTrigger::InlayHint( -// highlight, -// location, -// language_server_id, -// )), -// cmd_held, -// shift_held, -// cx, -// ); -// } -// } -// } -// }; -// } -// ResolveState::Resolving => {} -// } -// } -// } -// } + let hovered_offset = if point_for_position.column_overshoot_after_line_end == 0 { + Some(snapshot.display_point_to_inlay_offset(point_for_position.exact_unclipped, Bias::Left)) + } else { + None + }; + let mut go_to_definition_updated = false; + let mut hover_updated = false; + if let Some(hovered_offset) = hovered_offset { + let buffer_snapshot = editor.buffer().read(cx).snapshot(cx); + let previous_valid_anchor = buffer_snapshot.anchor_at( + point_for_position.previous_valid.to_point(snapshot), + Bias::Left, + ); + let next_valid_anchor = buffer_snapshot.anchor_at( + point_for_position.next_valid.to_point(snapshot), + Bias::Right, + ); + if let Some(hovered_hint) = editor + .visible_inlay_hints(cx) + .into_iter() + .skip_while(|hint| { + hint.position + .cmp(&previous_valid_anchor, &buffer_snapshot) + .is_lt() + }) + .take_while(|hint| { + hint.position + .cmp(&next_valid_anchor, &buffer_snapshot) + .is_le() + }) + .max_by_key(|hint| hint.id) + { + let inlay_hint_cache = editor.inlay_hint_cache(); + let excerpt_id = previous_valid_anchor.excerpt_id; + if let Some(cached_hint) = inlay_hint_cache.hint_by_id(excerpt_id, hovered_hint.id) { + match cached_hint.resolve_state { + ResolveState::CanResolve(_, _) => { + if let Some(buffer_id) = previous_valid_anchor.buffer_id { + inlay_hint_cache.spawn_hint_resolve( + buffer_id, + excerpt_id, + hovered_hint.id, + cx, + ); + } + } + ResolveState::Resolved => { + let mut extra_shift_left = 0; + let mut extra_shift_right = 0; + if cached_hint.padding_left { + extra_shift_left += 1; + extra_shift_right += 1; + } + if cached_hint.padding_right { + extra_shift_right += 1; + } + match cached_hint.label { + project::InlayHintLabel::String(_) => { + if let Some(tooltip) = cached_hint.tooltip { + hover_popover::hover_at_inlay( + editor, + InlayHover { + excerpt: excerpt_id, + tooltip: match tooltip { + InlayHintTooltip::String(text) => HoverBlock { + text, + kind: HoverBlockKind::PlainText, + }, + InlayHintTooltip::MarkupContent(content) => { + HoverBlock { + text: content.value, + kind: content.kind, + } + } + }, + range: InlayHighlight { + inlay: hovered_hint.id, + inlay_position: hovered_hint.position, + range: extra_shift_left + ..hovered_hint.text.len() + extra_shift_right, + }, + }, + cx, + ); + hover_updated = true; + } + } + project::InlayHintLabel::LabelParts(label_parts) => { + let hint_start = + snapshot.anchor_to_inlay_offset(hovered_hint.position); + if let Some((hovered_hint_part, part_range)) = + hover_popover::find_hovered_hint_part( + label_parts, + hint_start, + hovered_offset, + ) + { + let highlight_start = + (part_range.start - hint_start).0 + extra_shift_left; + let highlight_end = + (part_range.end - hint_start).0 + extra_shift_right; + let highlight = InlayHighlight { + inlay: hovered_hint.id, + inlay_position: hovered_hint.position, + range: highlight_start..highlight_end, + }; + if let Some(tooltip) = hovered_hint_part.tooltip { + hover_popover::hover_at_inlay( + editor, + InlayHover { + excerpt: excerpt_id, + tooltip: match tooltip { + InlayHintLabelPartTooltip::String(text) => { + HoverBlock { + text, + kind: HoverBlockKind::PlainText, + } + } + InlayHintLabelPartTooltip::MarkupContent( + content, + ) => HoverBlock { + text: content.value, + kind: content.kind, + }, + }, + range: highlight.clone(), + }, + cx, + ); + hover_updated = true; + } + if let Some((language_server_id, location)) = + hovered_hint_part.location + { + go_to_definition_updated = true; + update_go_to_definition_link( + editor, + Some(GoToDefinitionTrigger::InlayHint( + highlight, + location, + language_server_id, + )), + cmd_held, + shift_held, + cx, + ); + } + } + } + }; + } + ResolveState::Resolving => {} + } + } + } + } -// if !go_to_definition_updated { -// update_go_to_definition_link(editor, None, cmd_held, shift_held, cx); -// } -// if !hover_updated { -// hover_popover::hover_at(editor, None, cx); -// } -// } + if !go_to_definition_updated { + update_go_to_definition_link(editor, None, cmd_held, shift_held, cx); + } + if !hover_updated { + hover_popover::hover_at(editor, None, cx); + } +} #[derive(Debug, Clone, Copy, PartialEq)] pub enum LinkDefinitionKind { From 334829f868494cdcb3ea29756707b1c93126d9af Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 13:41:38 +0100 Subject: [PATCH 095/110] uncomment show_hover --- crates/editor2/src/hover_popover.rs | 33 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/crates/editor2/src/hover_popover.rs b/crates/editor2/src/hover_popover.rs index 9eddd259af022d03da94a0ceec83b052c1ef684c..bee95994e4b858bb2b693d033d5e12ef76a3a273 100644 --- a/crates/editor2/src/hover_popover.rs +++ b/crates/editor2/src/hover_popover.rs @@ -325,23 +325,22 @@ fn show_hover( }; this.update(&mut cx, |this, cx| { - todo!(); - // if let Some(symbol_range) = hover_popover - // .as_ref() - // .and_then(|hover_popover| hover_popover.symbol_range.as_text_range()) - // { - // // Highlight the selected symbol using a background highlight - // this.highlight_background::( - // vec![symbol_range], - // |theme| theme.editor.hover_popover.highlight, - // cx, - // ); - // } else { - // this.clear_background_highlights::(cx); - // } - // - // this.hover_state.info_popover = hover_popover; - // cx.notify(); + if let Some(symbol_range) = hover_popover + .as_ref() + .and_then(|hover_popover| hover_popover.symbol_range.as_text_range()) + { + // Highlight the selected symbol using a background highlight + this.highlight_background::( + vec![symbol_range], + |theme| theme.element_hover, // todo! update theme + cx, + ); + } else { + this.clear_background_highlights::(cx); + } + + this.hover_state.info_popover = hover_popover; + cx.notify(); })?; Ok::<_, anyhow::Error>(()) From e30449e61a712377c81873edde203def7fd0f24e Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:28:16 +0100 Subject: [PATCH 096/110] Pass text_bounds instead of full editor bounds into mouse_moved. Co-authored-by: Antonio --- crates/editor2/src/element.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 0a590fe2fdb8ec8d017461fe36dfd490c714ce49..24277521ffb43ee8913b37b649f9935115e6f246 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2763,6 +2763,14 @@ impl Element for EditorElement { cx: &mut gpui::ViewContext, ) { let layout = self.compute_layout(editor, cx, bounds); + let gutter_bounds = Bounds { + origin: bounds.origin, + size: layout.gutter_size, + }; + let text_bounds = Bounds { + origin: gutter_bounds.upper_right(), + size: layout.text_size, + }; cx.on_mouse_event({ let position_map = layout.position_map.clone(); @@ -2783,7 +2791,7 @@ impl Element for EditorElement { return; } - if Self::mouse_moved(editor, event, &position_map, bounds, cx) { + if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { cx.stop_propagation() } } @@ -2794,15 +2802,6 @@ impl Element for EditorElement { } cx.with_content_mask(ContentMask { bounds }, |cx| { - let gutter_bounds = Bounds { - origin: bounds.origin, - size: layout.gutter_size, - }; - let text_bounds = Bounds { - origin: gutter_bounds.upper_right(), - size: layout.text_size, - }; - self.paint_background(gutter_bounds, text_bounds, &layout, cx); if layout.gutter_size.width > Pixels::ZERO { self.paint_gutter(gutter_bounds, &layout, editor, cx); From dd20032eab368aceedc8efc20468acaa8192d039 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:36:05 +0100 Subject: [PATCH 097/110] Hook up mouse_down function handler Co-authored-by: Antonio --- crates/editor2/src/element.rs | 121 +++++++++++++++++----------------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 24277521ffb43ee8913b37b649f9935115e6f246..f83ec86106fd8aeee70910c4a66ec0d78813c6ef 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -8,8 +8,8 @@ use crate::{ }, scroll::scroll_amount::ScrollAmount, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, - HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, Selection, - SoftWrap, ToPoint, MAX_LINE_LEN, + HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, SelectPhase, + Selection, SoftWrap, ToPoint, MAX_LINE_LEN, }; use anyhow::Result; use collections::{BTreeMap, HashMap}; @@ -17,8 +17,8 @@ use gpui::{ black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Modifiers, - MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, - TextRun, TextStyle, TextSystem, ViewContext, WindowContext, + MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, + StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -242,63 +242,54 @@ impl EditorElement { // ) // } - // fn mouse_down( - // editor: &mut Editor, - // MouseButtonEvent { - // position, - // modifiers: - // Modifiers { - // shift, - // ctrl, - // alt, - // cmd, - // .. - // }, - // mut click_count, - // .. - // }: MouseButtonEvent, - // position_map: &PositionMap, - // text_bounds: Bounds, - // gutter_bounds: Bounds, - // cx: &mut EventContext, - // ) -> bool { - // if gutter_bounds.contains_point(position) { - // click_count = 3; // Simulate triple-click when clicking the gutter to select lines - // } else if !text_bounds.contains_point(position) { - // return false; - // } + fn mouse_down( + editor: &mut Editor, + event: &MouseDownEvent, + position_map: &PositionMap, + text_bounds: Bounds, + gutter_bounds: Bounds, + cx: &mut ViewContext, + ) -> bool { + let mut click_count = event.click_count; + let modifiers = event.modifiers; - // let point_for_position = position_map.point_for_position(text_bounds, position); - // let position = point_for_position.previous_valid; - // if shift && alt { - // editor.select( - // SelectPhase::BeginColumnar { - // position, - // goal_column: point_for_position.exact_unclipped.column(), - // }, - // cx, - // ); - // } else if shift && !ctrl && !alt && !cmd { - // editor.select( - // SelectPhase::Extend { - // position, - // click_count, - // }, - // cx, - // ); - // } else { - // editor.select( - // SelectPhase::Begin { - // position, - // add: alt, - // click_count, - // }, - // cx, - // ); - // } + if gutter_bounds.contains_point(&event.position) { + click_count = 3; // Simulate triple-click when clicking the gutter to select lines + } else if !text_bounds.contains_point(&event.position) { + return false; + } - // true - // } + let point_for_position = position_map.point_for_position(text_bounds, event.position); + let position = point_for_position.previous_valid; + if modifiers.shift && modifiers.alt { + editor.select( + SelectPhase::BeginColumnar { + position, + goal_column: point_for_position.exact_unclipped.column(), + }, + cx, + ); + } else if modifiers.shift && !modifiers.control && !modifiers.alt && !modifiers.command { + editor.select( + SelectPhase::Extend { + position, + click_count, + }, + cx, + ); + } else { + editor.select( + SelectPhase::Begin { + position, + add: modifiers.alt, + click_count, + }, + cx, + ); + } + + true + } // fn mouse_right_down( // editor: &mut Editor, @@ -2796,6 +2787,18 @@ impl Element for EditorElement { } } }); + cx.on_mouse_event({ + let position_map = layout.position_map.clone(); + move |editor, event: &MouseDownEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_down(editor, event, &position_map, text_bounds, gutter_bounds, cx) { + cx.stop_propagation() + } + } + }); if editor.focus_handle.is_focused(cx) { cx.handle_text_input(); From 1b085bd61800083a61089c6396a20356bcbd6277 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:40:08 +0100 Subject: [PATCH 098/110] Extract mouse event handlers into paint_mouse_listeners Co-authored-by: Antonio --- crates/editor2/src/element.rs | 90 +++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index f83ec86106fd8aeee70910c4a66ec0d78813c6ef..0cda0d38771e9e2a83fae45aa84694e743f280ff 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -2335,6 +2335,52 @@ impl EditorElement { // blocks, // ) // } + + fn paint_mouse_listeners( + &mut self, + bounds: Bounds, + text_bounds: Bounds, + gutter_bounds: Bounds, + position_map: &Arc, + cx: &mut ViewContext, + ) { + cx.on_mouse_event({ + let position_map = position_map.clone(); + move |editor, event: &ScrollWheelEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::scroll(editor, event, &position_map, bounds, cx) { + cx.stop_propagation(); + } + } + }); + cx.on_mouse_event({ + let position_map = position_map.clone(); + move |editor, event: &MouseMoveEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { + cx.stop_propagation() + } + } + }); + cx.on_mouse_event({ + let position_map = position_map.clone(); + move |editor, event: &MouseDownEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_down(editor, event, &position_map, text_bounds, gutter_bounds, cx) { + cx.stop_propagation() + } + } + }); + } } #[derive(Debug)] @@ -2763,48 +2809,18 @@ impl Element for EditorElement { size: layout.text_size, }; - cx.on_mouse_event({ - let position_map = layout.position_map.clone(); - move |editor, event: &ScrollWheelEvent, phase, cx| { - if phase != DispatchPhase::Bubble { - return; - } - - if Self::scroll(editor, event, &position_map, bounds, cx) { - cx.stop_propagation(); - } - } - }); - cx.on_mouse_event({ - let position_map = layout.position_map.clone(); - move |editor, event: &MouseMoveEvent, phase, cx| { - if phase != DispatchPhase::Bubble { - return; - } - - if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { - cx.stop_propagation() - } - } - }); - cx.on_mouse_event({ - let position_map = layout.position_map.clone(); - move |editor, event: &MouseDownEvent, phase, cx| { - if phase != DispatchPhase::Bubble { - return; - } - - if Self::mouse_down(editor, event, &position_map, text_bounds, gutter_bounds, cx) { - cx.stop_propagation() - } - } - }); - if editor.focus_handle.is_focused(cx) { cx.handle_text_input(); } cx.with_content_mask(ContentMask { bounds }, |cx| { + self.paint_mouse_listeners( + bounds, + gutter_bounds, + text_bounds, + &layout.position_map, + cx, + ); self.paint_background(gutter_bounds, text_bounds, &layout, cx); if layout.gutter_size.width > Pixels::ZERO { self.paint_gutter(gutter_bounds, &layout, editor, cx); From e5f78ec12292bd55dc33c4cc61d608fb264e6316 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:02:35 +0100 Subject: [PATCH 099/110] Uncomment mouse_dragged event Co-authored-by: Antonio --- crates/editor2/src/element.rs | 143 ++++++++++++---------------------- 1 file changed, 50 insertions(+), 93 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 0cda0d38771e9e2a83fae45aa84694e743f280ff..fce2634e2bc22178385b65c9ad94352afc630ee7 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -17,7 +17,7 @@ use gpui::{ black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Modifiers, - MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, + MouseButton, MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; @@ -343,103 +343,60 @@ impl EditorElement { // end_selection // } - // fn mouse_dragged( - // editor: &mut Editor, - // MouseMovedEvent { - // modifiers: Modifiers { cmd, shift, .. }, - // position, - // .. - // }: MouseMovedEvent, - // position_map: &PositionMap, - // text_bounds: Bounds, - // cx: &mut EventContext, - // ) -> bool { - // // This will be handled more correctly once https://github.com/zed-industries/zed/issues/1218 is completed - // // Don't trigger hover popover if mouse is hovering over context menu - // let point = if text_bounds.contains_point(position) { - // position_map - // .point_for_position(text_bounds, position) - // .as_valid() - // } else { - // None - // }; - - // update_go_to_definition_link( - // editor, - // point.map(GoToDefinitionTrigger::Text), - // cmd, - // shift, - // cx, - // ); - - // if editor.has_pending_selection() { - // let mut scroll_delta = gpui::Point::::zero(); - - // let vertical_margin = position_map.line_height.min(text_bounds.height() / 3.0); - // let top = text_bounds.origin.y + vertical_margin; - // let bottom = text_bounds.lower_left().y - vertical_margin; - // if position.y < top { - // scroll_delta.set_y(-scale_vertical_mouse_autoscroll_delta(top - position.y)) - // } - // if position.y > bottom { - // scroll_delta.set_y(scale_vertical_mouse_autoscroll_delta(position.y - bottom)) - // } - - // let horizontal_margin = position_map.line_height.min(text_bounds.width() / 3.0); - // let left = text_bounds.origin.x + horizontal_margin; - // let right = text_bounds.upper_right().x - horizontal_margin; - // if position.x < left { - // scroll_delta.set_x(-scale_horizontal_mouse_autoscroll_delta( - // left - position.x, - // )) - // } - // if position.x > right { - // scroll_delta.set_x(scale_horizontal_mouse_autoscroll_delta( - // position.x - right, - // )) - // } - - // let point_for_position = position_map.point_for_position(text_bounds, position); - - // editor.select( - // SelectPhase::Update { - // position: point_for_position.previous_valid, - // goal_column: point_for_position.exact_unclipped.column(), - // scroll_position: (position_map.snapshot.scroll_position() + scroll_delta) - // .clamp(gpui::Point::::zero(), position_map.scroll_max), - // }, - // cx, - // ); - // hover_at(editor, point, cx); - // true - // } else { - // hover_at(editor, point, cx); - // false - // } - // } - fn mouse_moved( editor: &mut Editor, - MouseMoveEvent { - modifiers: Modifiers { shift, command, .. }, - position, - .. - }: &MouseMoveEvent, + event: &MouseMoveEvent, position_map: &PositionMap, text_bounds: Bounds, cx: &mut ViewContext, ) -> bool { + let modifiers = event.modifiers; + if editor.has_pending_selection() && event.pressed_button == Some(MouseButton::Left) { + let point_for_position = position_map.point_for_position(text_bounds, event.position); + let mut scroll_delta = gpui::Point::::zero(); + let vertical_margin = position_map.line_height.min(text_bounds.size.height / 3.0); + let top = text_bounds.origin.y + vertical_margin; + let bottom = text_bounds.lower_left().y - vertical_margin; + if event.position.y < top { + scroll_delta.y = -scale_vertical_mouse_autoscroll_delta(top - event.position.y); + } + if event.position.y > bottom { + scroll_delta.y = scale_vertical_mouse_autoscroll_delta(event.position.y - bottom); + } + + let horizontal_margin = position_map.line_height.min(text_bounds.size.width / 3.0); + let left = text_bounds.origin.x + horizontal_margin; + let right = text_bounds.upper_right().x - horizontal_margin; + if event.position.x < left { + scroll_delta.x = -scale_horizontal_mouse_autoscroll_delta(left - event.position.x); + } + if event.position.x > right { + scroll_delta.x = scale_horizontal_mouse_autoscroll_delta(event.position.x - right); + } + + editor.select( + SelectPhase::Update { + position: point_for_position.previous_valid, + goal_column: point_for_position.exact_unclipped.column(), + scroll_position: (position_map.snapshot.scroll_position() + scroll_delta) + .clamp(&gpui::Point::zero(), &position_map.scroll_max), + }, + cx, + ); + } + // This will be handled more correctly once https://github.com/zed-industries/zed/issues/1218 is completed // Don't trigger hover popover if mouse is hovering over context menu - if text_bounds.contains_point(position) { - let point_for_position = position_map.point_for_position(text_bounds, position.clone()); + if text_bounds.contains_point(&event.position) { + let point_for_position = position_map.point_for_position(text_bounds, event.position); + match point_for_position.as_valid() { Some(point) => { update_go_to_definition_link( editor, Some(GoToDefinitionTrigger::Text(point)), - *command, - *shift, + modifiers.command, + modifiers.shift, cx, ); hover_at(editor, Some(point), cx); @@ -449,14 +406,14 @@ impl EditorElement { &position_map.snapshot, point_for_position, editor, - *command, - *shift, + modifiers.command, + modifiers.shift, cx, ); } } } else { - update_go_to_definition_link(editor, None, *command, *shift, cx); + update_go_to_definition_link(editor, None, modifiers.command, modifiers.shift, cx); hover_at(editor, None, cx); } @@ -2339,8 +2296,8 @@ impl EditorElement { fn paint_mouse_listeners( &mut self, bounds: Bounds, - text_bounds: Bounds, gutter_bounds: Bounds, + text_bounds: Bounds, position_map: &Arc, cx: &mut ViewContext, ) { @@ -3849,12 +3806,12 @@ impl HighlightedRange { // bounds.into_iter() // } -pub fn scale_vertical_mouse_autoscroll_delta(delta: f32) -> f32 { - delta.powf(1.5) / 100.0 +pub fn scale_vertical_mouse_autoscroll_delta(delta: Pixels) -> f32 { + (delta.pow(1.5) / 100.0).into() } -fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { - delta.powf(1.2) / 300.0 +fn scale_horizontal_mouse_autoscroll_delta(delta: Pixels) -> f32 { + (delta.pow(1.2) / 300.0).into() } // #[cfg(test)] From bef3b80bd458539661eb9cd4a5b366337fd8c826 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 15:08:54 +0100 Subject: [PATCH 100/110] Clear hover background highlights Co-Authored-By: Piotr --- crates/editor2/src/element.rs | 5 +++-- crates/editor2/src/hover_popover.rs | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index fce2634e2bc22178385b65c9ad94352afc630ee7..2e29793670dd9407649f65777f3ad18f58a62c3a 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -412,12 +412,13 @@ impl EditorElement { ); } } + + true } else { update_go_to_definition_link(editor, None, modifiers.command, modifiers.shift, cx); hover_at(editor, None, cx); + false } - - true } fn scroll( diff --git a/crates/editor2/src/hover_popover.rs b/crates/editor2/src/hover_popover.rs index bee95994e4b858bb2b693d033d5e12ef76a3a273..5c8f403d4f7d768d764f5665f45e31863b00e733 100644 --- a/crates/editor2/src/hover_popover.rs +++ b/crates/editor2/src/hover_popover.rs @@ -144,8 +144,7 @@ pub fn hide_hover(editor: &mut Editor, cx: &mut ViewContext) -> bool { editor.hover_state.info_task = None; editor.hover_state.triggered_from = None; - // todo!() - // editor.clear_background_highlights::(cx); + editor.clear_background_highlights::(cx); if did_hide { cx.notify(); From e500c05880dab35a0348ece16b172fb94d5988e9 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 15:12:54 +0100 Subject: [PATCH 101/110] Move building of key listeners outside of EditorElement::initialize --- crates/editor2/src/element.rs | 354 +++++++++++++++++----------------- 1 file changed, 180 insertions(+), 174 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index 2e29793670dd9407649f65777f3ad18f58a62c3a..f197734a0d4f8d52394aef599dce544e3733a04f 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -16,9 +16,10 @@ use collections::{BTreeMap, HashMap}; use gpui::{ black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, - Edges, Element, ElementId, Entity, Hsla, KeyDownEvent, KeyListener, KeyMatch, Line, Modifiers, - MouseButton, MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, ShapedGlyph, Size, - StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, WindowContext, + Edges, Element, ElementId, Entity, GlobalElementId, Hsla, KeyDownEvent, KeyListener, KeyMatch, + Line, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, + ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, + WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -2558,177 +2559,9 @@ impl Element for EditorElement { let dispatch_context = editor.dispatch_context(cx); cx.with_element_id(cx.view().entity_id(), |global_id, cx| { cx.with_key_dispatch_context(dispatch_context, |cx| { - cx.with_key_listeners( - [ - build_action_listener(Editor::move_left), - build_action_listener(Editor::move_right), - build_action_listener(Editor::move_down), - build_action_listener(Editor::move_up), - // build_action_listener(Editor::new_file), todo!() - // build_action_listener(Editor::new_file_in_direction), todo!() - build_action_listener(Editor::cancel), - build_action_listener(Editor::newline), - build_action_listener(Editor::newline_above), - build_action_listener(Editor::newline_below), - build_action_listener(Editor::backspace), - build_action_listener(Editor::delete), - build_action_listener(Editor::tab), - build_action_listener(Editor::tab_prev), - build_action_listener(Editor::indent), - build_action_listener(Editor::outdent), - build_action_listener(Editor::delete_line), - build_action_listener(Editor::join_lines), - build_action_listener(Editor::sort_lines_case_sensitive), - build_action_listener(Editor::sort_lines_case_insensitive), - build_action_listener(Editor::reverse_lines), - build_action_listener(Editor::shuffle_lines), - build_action_listener(Editor::convert_to_upper_case), - build_action_listener(Editor::convert_to_lower_case), - build_action_listener(Editor::convert_to_title_case), - build_action_listener(Editor::convert_to_snake_case), - build_action_listener(Editor::convert_to_kebab_case), - build_action_listener(Editor::convert_to_upper_camel_case), - build_action_listener(Editor::convert_to_lower_camel_case), - build_action_listener(Editor::delete_to_previous_word_start), - build_action_listener(Editor::delete_to_previous_subword_start), - build_action_listener(Editor::delete_to_next_word_end), - build_action_listener(Editor::delete_to_next_subword_end), - build_action_listener(Editor::delete_to_beginning_of_line), - build_action_listener(Editor::delete_to_end_of_line), - build_action_listener(Editor::cut_to_end_of_line), - build_action_listener(Editor::duplicate_line), - build_action_listener(Editor::move_line_up), - build_action_listener(Editor::move_line_down), - build_action_listener(Editor::transpose), - build_action_listener(Editor::cut), - build_action_listener(Editor::copy), - build_action_listener(Editor::paste), - build_action_listener(Editor::undo), - build_action_listener(Editor::redo), - build_action_listener(Editor::move_page_up), - build_action_listener(Editor::move_page_down), - build_action_listener(Editor::next_screen), - build_action_listener(Editor::scroll_cursor_top), - build_action_listener(Editor::scroll_cursor_center), - build_action_listener(Editor::scroll_cursor_bottom), - build_action_listener(|editor, _: &LineDown, cx| { - editor.scroll_screen(&ScrollAmount::Line(1.), cx) - }), - build_action_listener(|editor, _: &LineUp, cx| { - editor.scroll_screen(&ScrollAmount::Line(-1.), cx) - }), - build_action_listener(|editor, _: &HalfPageDown, cx| { - editor.scroll_screen(&ScrollAmount::Page(0.5), cx) - }), - build_action_listener(|editor, _: &HalfPageUp, cx| { - editor.scroll_screen(&ScrollAmount::Page(-0.5), cx) - }), - build_action_listener(|editor, _: &PageDown, cx| { - editor.scroll_screen(&ScrollAmount::Page(1.), cx) - }), - build_action_listener(|editor, _: &PageUp, cx| { - editor.scroll_screen(&ScrollAmount::Page(-1.), cx) - }), - build_action_listener(Editor::move_to_previous_word_start), - build_action_listener(Editor::move_to_previous_subword_start), - build_action_listener(Editor::move_to_next_word_end), - build_action_listener(Editor::move_to_next_subword_end), - build_action_listener(Editor::move_to_beginning_of_line), - build_action_listener(Editor::move_to_end_of_line), - build_action_listener(Editor::move_to_start_of_paragraph), - build_action_listener(Editor::move_to_end_of_paragraph), - build_action_listener(Editor::move_to_beginning), - build_action_listener(Editor::move_to_end), - build_action_listener(Editor::select_up), - build_action_listener(Editor::select_down), - build_action_listener(Editor::select_left), - build_action_listener(Editor::select_right), - build_action_listener(Editor::select_to_previous_word_start), - build_action_listener(Editor::select_to_previous_subword_start), - build_action_listener(Editor::select_to_next_word_end), - build_action_listener(Editor::select_to_next_subword_end), - build_action_listener(Editor::select_to_beginning_of_line), - build_action_listener(Editor::select_to_end_of_line), - build_action_listener(Editor::select_to_start_of_paragraph), - build_action_listener(Editor::select_to_end_of_paragraph), - build_action_listener(Editor::select_to_beginning), - build_action_listener(Editor::select_to_end), - build_action_listener(Editor::select_all), - build_action_listener(|editor, action, cx| { - editor.select_all_matches(action, cx).log_err(); - }), - build_action_listener(Editor::select_line), - build_action_listener(Editor::split_selection_into_lines), - build_action_listener(Editor::add_selection_above), - build_action_listener(Editor::add_selection_below), - build_action_listener(|editor, action, cx| { - editor.select_next(action, cx).log_err(); - }), - build_action_listener(|editor, action, cx| { - editor.select_previous(action, cx).log_err(); - }), - build_action_listener(Editor::toggle_comments), - build_action_listener(Editor::select_larger_syntax_node), - build_action_listener(Editor::select_smaller_syntax_node), - build_action_listener(Editor::move_to_enclosing_bracket), - build_action_listener(Editor::undo_selection), - build_action_listener(Editor::redo_selection), - build_action_listener(Editor::go_to_diagnostic), - build_action_listener(Editor::go_to_prev_diagnostic), - build_action_listener(Editor::go_to_hunk), - build_action_listener(Editor::go_to_prev_hunk), - build_action_listener(Editor::go_to_definition), - build_action_listener(Editor::go_to_definition_split), - build_action_listener(Editor::go_to_type_definition), - build_action_listener(Editor::go_to_type_definition_split), - build_action_listener(Editor::fold), - build_action_listener(Editor::fold_at), - build_action_listener(Editor::unfold_lines), - build_action_listener(Editor::unfold_at), - // build_action_listener(Editor::gutter_hover), todo!() - build_action_listener(Editor::fold_selected_ranges), - build_action_listener(Editor::show_completions), - // build_action_listener(Editor::toggle_code_actions), todo!() - // build_action_listener(Editor::open_excerpts), todo!() - build_action_listener(Editor::toggle_soft_wrap), - build_action_listener(Editor::toggle_inlay_hints), - build_action_listener(Editor::reveal_in_finder), - build_action_listener(Editor::copy_path), - build_action_listener(Editor::copy_relative_path), - build_action_listener(Editor::copy_highlight_json), - build_action_listener(|editor, action, cx| { - editor - .format(action, cx) - .map(|task| task.detach_and_log_err(cx)); - }), - build_action_listener(Editor::restart_language_server), - build_action_listener(Editor::show_character_palette), - // build_action_listener(Editor::confirm_completion), todo!() - // build_action_listener(Editor::confirm_code_action), todo!() - // build_action_listener(Editor::rename), todo!() - // build_action_listener(Editor::confirm_rename), todo!() - // build_action_listener(Editor::find_all_references), todo!() - build_action_listener(Editor::next_copilot_suggestion), - build_action_listener(Editor::previous_copilot_suggestion), - build_action_listener(Editor::copilot_suggest), - build_key_listener( - move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| { - if phase == DispatchPhase::Bubble { - if let KeyMatch::Some(action) = cx.match_keystroke( - &global_id, - &key_down.keystroke, - dispatch_context, - ) { - return Some(action); - } - } - - None - }, - ), - ], - |cx| cx.with_focus(editor.focus_handle.clone(), |_| {}), - ); + cx.with_key_listeners(build_key_listeners(global_id), |cx| { + cx.with_focus(editor.focus_handle.clone(), |_| {}) + }); }) }); } @@ -4258,6 +4091,179 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: Pixels) -> f32 { // } // } +fn build_key_listeners( + global_element_id: GlobalElementId, +) -> impl IntoIterator)> { + [ + build_action_listener(Editor::move_left), + build_action_listener(Editor::move_right), + build_action_listener(Editor::move_down), + build_action_listener(Editor::move_up), + // build_action_listener(Editor::new_file), todo!() + // build_action_listener(Editor::new_file_in_direction), todo!() + build_action_listener(Editor::cancel), + build_action_listener(Editor::newline), + build_action_listener(Editor::newline_above), + build_action_listener(Editor::newline_below), + build_action_listener(Editor::backspace), + build_action_listener(Editor::delete), + build_action_listener(Editor::tab), + build_action_listener(Editor::tab_prev), + build_action_listener(Editor::indent), + build_action_listener(Editor::outdent), + build_action_listener(Editor::delete_line), + build_action_listener(Editor::join_lines), + build_action_listener(Editor::sort_lines_case_sensitive), + build_action_listener(Editor::sort_lines_case_insensitive), + build_action_listener(Editor::reverse_lines), + build_action_listener(Editor::shuffle_lines), + build_action_listener(Editor::convert_to_upper_case), + build_action_listener(Editor::convert_to_lower_case), + build_action_listener(Editor::convert_to_title_case), + build_action_listener(Editor::convert_to_snake_case), + build_action_listener(Editor::convert_to_kebab_case), + build_action_listener(Editor::convert_to_upper_camel_case), + build_action_listener(Editor::convert_to_lower_camel_case), + build_action_listener(Editor::delete_to_previous_word_start), + build_action_listener(Editor::delete_to_previous_subword_start), + build_action_listener(Editor::delete_to_next_word_end), + build_action_listener(Editor::delete_to_next_subword_end), + build_action_listener(Editor::delete_to_beginning_of_line), + build_action_listener(Editor::delete_to_end_of_line), + build_action_listener(Editor::cut_to_end_of_line), + build_action_listener(Editor::duplicate_line), + build_action_listener(Editor::move_line_up), + build_action_listener(Editor::move_line_down), + build_action_listener(Editor::transpose), + build_action_listener(Editor::cut), + build_action_listener(Editor::copy), + build_action_listener(Editor::paste), + build_action_listener(Editor::undo), + build_action_listener(Editor::redo), + build_action_listener(Editor::move_page_up), + build_action_listener(Editor::move_page_down), + build_action_listener(Editor::next_screen), + build_action_listener(Editor::scroll_cursor_top), + build_action_listener(Editor::scroll_cursor_center), + build_action_listener(Editor::scroll_cursor_bottom), + build_action_listener(|editor, _: &LineDown, cx| { + editor.scroll_screen(&ScrollAmount::Line(1.), cx) + }), + build_action_listener(|editor, _: &LineUp, cx| { + editor.scroll_screen(&ScrollAmount::Line(-1.), cx) + }), + build_action_listener(|editor, _: &HalfPageDown, cx| { + editor.scroll_screen(&ScrollAmount::Page(0.5), cx) + }), + build_action_listener(|editor, _: &HalfPageUp, cx| { + editor.scroll_screen(&ScrollAmount::Page(-0.5), cx) + }), + build_action_listener(|editor, _: &PageDown, cx| { + editor.scroll_screen(&ScrollAmount::Page(1.), cx) + }), + build_action_listener(|editor, _: &PageUp, cx| { + editor.scroll_screen(&ScrollAmount::Page(-1.), cx) + }), + build_action_listener(Editor::move_to_previous_word_start), + build_action_listener(Editor::move_to_previous_subword_start), + build_action_listener(Editor::move_to_next_word_end), + build_action_listener(Editor::move_to_next_subword_end), + build_action_listener(Editor::move_to_beginning_of_line), + build_action_listener(Editor::move_to_end_of_line), + build_action_listener(Editor::move_to_start_of_paragraph), + build_action_listener(Editor::move_to_end_of_paragraph), + build_action_listener(Editor::move_to_beginning), + build_action_listener(Editor::move_to_end), + build_action_listener(Editor::select_up), + build_action_listener(Editor::select_down), + build_action_listener(Editor::select_left), + build_action_listener(Editor::select_right), + build_action_listener(Editor::select_to_previous_word_start), + build_action_listener(Editor::select_to_previous_subword_start), + build_action_listener(Editor::select_to_next_word_end), + build_action_listener(Editor::select_to_next_subword_end), + build_action_listener(Editor::select_to_beginning_of_line), + build_action_listener(Editor::select_to_end_of_line), + build_action_listener(Editor::select_to_start_of_paragraph), + build_action_listener(Editor::select_to_end_of_paragraph), + build_action_listener(Editor::select_to_beginning), + build_action_listener(Editor::select_to_end), + build_action_listener(Editor::select_all), + build_action_listener(|editor, action, cx| { + editor.select_all_matches(action, cx).log_err(); + }), + build_action_listener(Editor::select_line), + build_action_listener(Editor::split_selection_into_lines), + build_action_listener(Editor::add_selection_above), + build_action_listener(Editor::add_selection_below), + build_action_listener(|editor, action, cx| { + editor.select_next(action, cx).log_err(); + }), + build_action_listener(|editor, action, cx| { + editor.select_previous(action, cx).log_err(); + }), + build_action_listener(Editor::toggle_comments), + build_action_listener(Editor::select_larger_syntax_node), + build_action_listener(Editor::select_smaller_syntax_node), + build_action_listener(Editor::move_to_enclosing_bracket), + build_action_listener(Editor::undo_selection), + build_action_listener(Editor::redo_selection), + build_action_listener(Editor::go_to_diagnostic), + build_action_listener(Editor::go_to_prev_diagnostic), + build_action_listener(Editor::go_to_hunk), + build_action_listener(Editor::go_to_prev_hunk), + build_action_listener(Editor::go_to_definition), + build_action_listener(Editor::go_to_definition_split), + build_action_listener(Editor::go_to_type_definition), + build_action_listener(Editor::go_to_type_definition_split), + build_action_listener(Editor::fold), + build_action_listener(Editor::fold_at), + build_action_listener(Editor::unfold_lines), + build_action_listener(Editor::unfold_at), + // build_action_listener(Editor::gutter_hover), todo!() + build_action_listener(Editor::fold_selected_ranges), + build_action_listener(Editor::show_completions), + // build_action_listener(Editor::toggle_code_actions), todo!() + // build_action_listener(Editor::open_excerpts), todo!() + build_action_listener(Editor::toggle_soft_wrap), + build_action_listener(Editor::toggle_inlay_hints), + build_action_listener(Editor::reveal_in_finder), + build_action_listener(Editor::copy_path), + build_action_listener(Editor::copy_relative_path), + build_action_listener(Editor::copy_highlight_json), + build_action_listener(|editor, action, cx| { + editor + .format(action, cx) + .map(|task| task.detach_and_log_err(cx)); + }), + build_action_listener(Editor::restart_language_server), + build_action_listener(Editor::show_character_palette), + // build_action_listener(Editor::confirm_completion), todo!() + // build_action_listener(Editor::confirm_code_action), todo!() + // build_action_listener(Editor::rename), todo!() + // build_action_listener(Editor::confirm_rename), todo!() + // build_action_listener(Editor::find_all_references), todo!() + build_action_listener(Editor::next_copilot_suggestion), + build_action_listener(Editor::previous_copilot_suggestion), + build_action_listener(Editor::copilot_suggest), + build_key_listener( + move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| { + if phase == DispatchPhase::Bubble { + if let KeyMatch::Some(action) = cx.match_keystroke( + &global_element_id, + &key_down.keystroke, + dispatch_context, + ) { + return Some(action); + } + } + + None + }, + ), + ] +} + fn build_key_listener( listener: impl Fn( &mut Editor, From dfc536b4f5794ec71218868d33b9522ca296ad28 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 15:17:30 +0100 Subject: [PATCH 102/110] Handle MouseUpEvent in editor2 --- crates/editor2/src/element.rs | 85 ++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index f197734a0d4f8d52394aef599dce544e3733a04f..c2ffaad6381b740b29239b9510e96a15e7740b79 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -4,7 +4,8 @@ use crate::{ git::{diff_hunk_to_display, DisplayDiffHunk}, hover_popover::hover_at, link_go_to_definition::{ - update_go_to_definition_link, update_inlay_link_and_hover_points, GoToDefinitionTrigger, + go_to_fetched_definition, go_to_fetched_type_definition, update_go_to_definition_link, + update_inlay_link_and_hover_points, GoToDefinitionTrigger, }, scroll::scroll_amount::ScrollAmount, CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle, @@ -17,9 +18,9 @@ use gpui::{ black, hsla, point, px, relative, size, transparent_black, Action, AnyElement, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, DispatchContext, DispatchPhase, Edges, Element, ElementId, Entity, GlobalElementId, Hsla, KeyDownEvent, KeyListener, KeyMatch, - Line, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, Pixels, ScrollWheelEvent, - ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, TextSystem, ViewContext, - WindowContext, + Line, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent, Pixels, + ScrollWheelEvent, ShapedGlyph, Size, StatefulInteraction, Style, TextRun, TextStyle, + TextSystem, ViewContext, WindowContext, }; use itertools::Itertools; use language::language_settings::ShowWhitespaceSetting; @@ -312,37 +313,38 @@ impl EditorElement { // true // } - // fn mouse_up( - // editor: &mut Editor, - // position: gpui::Point, - // cmd: bool, - // shift: bool, - // alt: bool, - // position_map: &PositionMap, - // text_bounds: Bounds, - // cx: &mut EventContext, - // ) -> bool { - // let end_selection = editor.has_pending_selection(); - // let pending_nonempty_selections = editor.has_pending_nonempty_selection(); + fn mouse_up( + editor: &mut Editor, + event: &MouseUpEvent, + position_map: &PositionMap, + text_bounds: Bounds, + cx: &mut ViewContext, + ) -> bool { + let end_selection = editor.has_pending_selection(); + let pending_nonempty_selections = editor.has_pending_nonempty_selection(); - // if end_selection { - // editor.select(SelectPhase::End, cx); - // } + if end_selection { + editor.select(SelectPhase::End, cx); + } - // if !pending_nonempty_selections && cmd && text_bounds.contains_point(position) { - // let point = position_map.point_for_position(text_bounds, position); - // let could_be_inlay = point.as_valid().is_none(); - // if shift || could_be_inlay { - // go_to_fetched_type_definition(editor, point, alt, cx); - // } else { - // go_to_fetched_definition(editor, point, alt, cx); - // } + if !pending_nonempty_selections + && event.modifiers.command + && text_bounds.contains_point(&event.position) + { + let point = position_map.point_for_position(text_bounds, event.position); + let could_be_inlay = point.as_valid().is_none(); + let split = event.modifiers.alt; + if event.modifiers.shift || could_be_inlay { + go_to_fetched_type_definition(editor, point, split, cx); + } else { + go_to_fetched_definition(editor, point, split, cx); + } - // return true; - // } + return true; + } - // end_selection - // } + end_selection + } fn mouse_moved( editor: &mut Editor, @@ -2317,24 +2319,37 @@ impl EditorElement { }); cx.on_mouse_event({ let position_map = position_map.clone(); - move |editor, event: &MouseMoveEvent, phase, cx| { + move |editor, event: &MouseDownEvent, phase, cx| { if phase != DispatchPhase::Bubble { return; } - if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { + if Self::mouse_down(editor, event, &position_map, text_bounds, gutter_bounds, cx) { cx.stop_propagation() } } }); cx.on_mouse_event({ let position_map = position_map.clone(); - move |editor, event: &MouseDownEvent, phase, cx| { + move |editor, event: &MouseUpEvent, phase, cx| { if phase != DispatchPhase::Bubble { return; } - if Self::mouse_down(editor, event, &position_map, text_bounds, gutter_bounds, cx) { + if Self::mouse_up(editor, event, &position_map, text_bounds, cx) { + cx.stop_propagation() + } + } + }); + + cx.on_mouse_event({ + let position_map = position_map.clone(); + move |editor, event: &MouseMoveEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { cx.stop_propagation() } } From 15d40d6df5f2cc523b62718da3f28ba7cb443fb0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 15:30:41 +0100 Subject: [PATCH 103/110] Determine whether the gutter was hovered --- crates/editor2/src/editor.rs | 20 ++++++-------------- crates/editor2/src/element.rs | 12 ++++++++---- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index cfa615c321e869fdf326bfc723e881b218f6d0dc..8c691b33509bd5930f8b3da6deafc29f3c03e0b9 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -249,11 +249,6 @@ pub struct UnfoldAt { pub buffer_row: u32, } -#[action] -pub struct GutterHover { - pub hovered: bool, -} - #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum InlayId { Suggestion(usize), @@ -8309,15 +8304,12 @@ impl Editor { } } - // todo!() - // pub fn gutter_hover( - // &mut self, - // GutterHover { hovered }: &GutterHover, - // cx: &mut ViewContext, - // ) { - // self.gutter_hovered = *hovered; - // cx.notify(); - // } + pub fn set_gutter_hovered(&mut self, hovered: bool, cx: &mut ViewContext) { + if hovered != self.gutter_hovered { + self.gutter_hovered = hovered; + cx.notify(); + } + } pub fn insert_blocks( &mut self, diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index c2ffaad6381b740b29239b9510e96a15e7740b79..fc2a4ccb92f11b42225729c5f23383a7a4c5e4d3 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -351,6 +351,7 @@ impl EditorElement { event: &MouseMoveEvent, position_map: &PositionMap, text_bounds: Bounds, + gutter_bounds: Bounds, cx: &mut ViewContext, ) -> bool { let modifiers = event.modifiers; @@ -388,9 +389,12 @@ impl EditorElement { ); } - // This will be handled more correctly once https://github.com/zed-industries/zed/issues/1218 is completed + let text_hovered = text_bounds.contains_point(&event.position); + let gutter_hovered = gutter_bounds.contains_point(&event.position); + editor.set_gutter_hovered(gutter_hovered, cx); + // Don't trigger hover popover if mouse is hovering over context menu - if text_bounds.contains_point(&event.position) { + if text_hovered { let point_for_position = position_map.point_for_position(text_bounds, event.position); match point_for_position.as_valid() { @@ -420,7 +424,7 @@ impl EditorElement { } else { update_go_to_definition_link(editor, None, modifiers.command, modifiers.shift, cx); hover_at(editor, None, cx); - false + gutter_hovered } } @@ -2349,7 +2353,7 @@ impl EditorElement { return; } - if Self::mouse_moved(editor, event, &position_map, text_bounds, cx) { + if Self::mouse_moved(editor, event, &position_map, text_bounds, gutter_bounds, cx) { cx.stop_propagation() } } From 55dca1e3e1bae49227b8acc86476a72a74871f76 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 15:33:11 +0100 Subject: [PATCH 104/110] :lipstick: --- crates/editor2/src/element.rs | 148 ++++------------------------------ 1 file changed, 15 insertions(+), 133 deletions(-) diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index fc2a4ccb92f11b42225729c5f23383a7a4c5e4d3..34ce39fd8a39404e308784a0162a399332a984f7 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -113,137 +113,6 @@ impl EditorElement { Self { style } } - // fn attach_mouse_handlers( - // position_map: &Arc, - // has_popovers: bool, - // visible_bounds: Bounds, - // text_bounds: Bounds, - // gutter_bounds: Bounds, - // bounds: Bounds, - // cx: &mut ViewContext, - // ) { - // enum EditorElementMouseHandlers {} - // let view_id = cx.view_id(); - // cx.scene().push_mouse_region( - // MouseRegion::new::(view_id, view_id, visible_bounds) - // .on_down(MouseButton::Left, { - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if !Self::mouse_down( - // editor, - // event.platform_event, - // position_map.as_ref(), - // text_bounds, - // gutter_bounds, - // cx, - // ) { - // cx.propagate_event(); - // } - // } - // }) - // .on_down(MouseButton::Right, { - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if !Self::mouse_right_down( - // editor, - // event.position, - // position_map.as_ref(), - // text_bounds, - // cx, - // ) { - // cx.propagate_event(); - // } - // } - // }) - // .on_up(MouseButton::Left, { - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if !Self::mouse_up( - // editor, - // event.position, - // event.cmd, - // event.shift, - // event.alt, - // position_map.as_ref(), - // text_bounds, - // cx, - // ) { - // cx.propagate_event() - // } - // } - // }) - // .on_drag(MouseButton::Left, { - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if event.end { - // return; - // } - - // if !Self::mouse_dragged( - // editor, - // event.platform_event, - // position_map.as_ref(), - // text_bounds, - // cx, - // ) { - // cx.propagate_event() - // } - // } - // }) - // .on_move({ - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if !Self::mouse_moved( - // editor, - // event.platform_event, - // &position_map, - // text_bounds, - // cx, - // ) { - // cx.propagate_event() - // } - // } - // }) - // .on_move_out(move |_, editor: &mut Editor, cx| { - // if has_popovers { - // hide_hover(editor, cx); - // } - // }) - // .on_scroll({ - // let position_map = position_map.clone(); - // move |event, editor, cx| { - // if !Self::scroll( - // editor, - // event.position, - // *event.delta.raw(), - // event.delta.precise(), - // &position_map, - // bounds, - // cx, - // ) { - // cx.propagate_event() - // } - // } - // }), - // ); - - // enum GutterHandlers {} - // let view_id = cx.view_id(); - // let region_id = cx.view_id() + 1; - // cx.scene().push_mouse_region( - // MouseRegion::new::(view_id, region_id, gutter_bounds).on_hover( - // |hover, editor: &mut Editor, cx| { - // editor.gutter_hover( - // &GutterHover { - // hovered: hover.started, - // }, - // cx, - // ); - // }, - // ), - // ) - // } - fn mouse_down( editor: &mut Editor, event: &MouseDownEvent, @@ -2345,7 +2214,21 @@ impl EditorElement { } } }); - + // todo!() + // on_down(MouseButton::Right, { + // let position_map = position_map.clone(); + // move |event, editor, cx| { + // if !Self::mouse_right_down( + // editor, + // event.position, + // position_map.as_ref(), + // text_bounds, + // cx, + // ) { + // cx.propagate_event(); + // } + // } + // }); cx.on_mouse_event({ let position_map = position_map.clone(); move |editor, event: &MouseMoveEvent, phase, cx| { @@ -4239,7 +4122,6 @@ fn build_key_listeners( build_action_listener(Editor::fold_at), build_action_listener(Editor::unfold_lines), build_action_listener(Editor::unfold_at), - // build_action_listener(Editor::gutter_hover), todo!() build_action_listener(Editor::fold_selected_ranges), build_action_listener(Editor::show_completions), // build_action_listener(Editor::toggle_code_actions), todo!() From 9e5a4ea6c48a611c47492466792ff5c99ae5f151 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Wed, 8 Nov 2023 10:53:37 -0500 Subject: [PATCH 105/110] v0.113.x dev --- Cargo.lock | 2 +- crates/zed/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19b1ca6c0a580e9a24869a88880f97200d4486b7..5b548babd78cae1a936fb939b1764917bdcb2310 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11078,7 +11078,7 @@ dependencies = [ [[package]] name = "zed" -version = "0.112.0" +version = "0.113.0" dependencies = [ "activity_indicator", "ai", diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index c9012a3a143a95718ab59eeb10d2afd60210b3c6..bee8d0bc429b1b9a70626ef811ae6ef8926adedf 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Nathan Sobo "] description = "The fast, collaborative code editor." edition = "2021" name = "zed" -version = "0.112.0" +version = "0.113.0" publish = false [lib] From e9650c025fe42cf37ad92ee8f52bccc2163eb12a Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 8 Nov 2023 11:26:26 -0500 Subject: [PATCH 106/110] Fix overflow in `UniformList` --- crates/gpui2/src/elements/uniform_list.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/gpui2/src/elements/uniform_list.rs b/crates/gpui2/src/elements/uniform_list.rs index 64933951f5ea36e2a8e19ddf3e8256a0e318c34e..d43c6b59926de499959304d5af754bc8a97aec07 100644 --- a/crates/gpui2/src/elements/uniform_list.rs +++ b/crates/gpui2/src/elements/uniform_list.rs @@ -141,8 +141,11 @@ impl Element for UniformList { scroll_offset: element_state.track_scroll_offset(), }); } - let visible_item_count = - (padded_bounds.size.height / item_height).ceil() as usize + 1; + let visible_item_count = if item_height > px(0.) { + (padded_bounds.size.height / item_height).ceil() as usize + 1 + } else { + 0 + }; let scroll_offset = element_state .scroll_offset() .map_or((0.0).into(), |offset| offset.y); From 727fb4fbff724870959f09ad8ca01c4029a0aad1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 17:29:05 +0100 Subject: [PATCH 107/110] Use a consistent clipping strategy for drawing all the primitives Co-Authored-By: Nathan --- crates/gpui2/src/platform/mac/shaders.metal | 150 +++++++++++++------- 1 file changed, 100 insertions(+), 50 deletions(-) diff --git a/crates/gpui2/src/platform/mac/shaders.metal b/crates/gpui2/src/platform/mac/shaders.metal index 0a3a2b2129de9355b657905adee1fc39f6007ff5..4def1c33b85a430d051376322dca47de93b9e70c 100644 --- a/crates/gpui2/src/platform/mac/shaders.metal +++ b/crates/gpui2/src/platform/mac/shaders.metal @@ -5,10 +5,11 @@ using namespace metal; float4 hsla_to_rgba(Hsla hsla); float4 to_device_position(float2 unit_vertex, Bounds_ScaledPixels bounds, - Bounds_ScaledPixels clip_bounds, constant Size_DevicePixels *viewport_size); float2 to_tile_position(float2 unit_vertex, AtlasTile tile, constant Size_DevicePixels *atlas_size); +float4 distance_from_clip_rect(float2 unit_vertex, Bounds_ScaledPixels bounds, + Bounds_ScaledPixels clip_bounds); float quad_sdf(float2 point, Bounds_ScaledPixels bounds, Corners_ScaledPixels corner_radii); float gaussian(float x, float sigma); @@ -21,6 +22,14 @@ struct QuadVertexOutput { float4 background_color [[flat]]; float4 border_color [[flat]]; uint quad_id [[flat]]; + float clip_distance [[clip_distance]][4]; +}; + +struct QuadFragmentInput { + float4 position [[position]]; + float4 background_color [[flat]]; + float4 border_color [[flat]]; + uint quad_id [[flat]]; }; vertex QuadVertexOutput quad_vertex(uint unit_vertex_id [[vertex_id]], @@ -33,15 +42,21 @@ vertex QuadVertexOutput quad_vertex(uint unit_vertex_id [[vertex_id]], [[buffer(QuadInputIndex_ViewportSize)]]) { float2 unit_vertex = unit_vertices[unit_vertex_id]; Quad quad = quads[quad_id]; - float4 device_position = to_device_position( - unit_vertex, quad.bounds, quad.content_mask.bounds, viewport_size); + float4 device_position = + to_device_position(unit_vertex, quad.bounds, viewport_size); + float4 clip_distance = distance_from_clip_rect(unit_vertex, quad.bounds, + quad.content_mask.bounds); float4 background_color = hsla_to_rgba(quad.background); float4 border_color = hsla_to_rgba(quad.border_color); - return QuadVertexOutput{device_position, background_color, border_color, - quad_id}; + return QuadVertexOutput{ + device_position, + background_color, + border_color, + quad_id, + {clip_distance.x, clip_distance.y, clip_distance.z, clip_distance.w}}; } -fragment float4 quad_fragment(QuadVertexOutput input [[stage_in]], +fragment float4 quad_fragment(QuadFragmentInput input [[stage_in]], constant Quad *quads [[buffer(QuadInputIndex_Quads)]]) { Quad quad = quads[input.quad_id]; @@ -117,6 +132,13 @@ struct ShadowVertexOutput { float4 position [[position]]; float4 color [[flat]]; uint shadow_id [[flat]]; + float clip_distance [[clip_distance]][4]; +}; + +struct ShadowFragmentInput { + float4 position [[position]]; + float4 color [[flat]]; + uint shadow_id [[flat]]; }; vertex ShadowVertexOutput shadow_vertex( @@ -137,18 +159,20 @@ vertex ShadowVertexOutput shadow_vertex( bounds.size.width += 2. * margin; bounds.size.height += 2. * margin; - float4 device_position = to_device_position( - unit_vertex, bounds, shadow.content_mask.bounds, viewport_size); + float4 device_position = + to_device_position(unit_vertex, bounds, viewport_size); + float4 clip_distance = + distance_from_clip_rect(unit_vertex, bounds, shadow.content_mask.bounds); float4 color = hsla_to_rgba(shadow.color); return ShadowVertexOutput{ device_position, color, shadow_id, - }; + {clip_distance.x, clip_distance.y, clip_distance.z, clip_distance.w}}; } -fragment float4 shadow_fragment(ShadowVertexOutput input [[stage_in]], +fragment float4 shadow_fragment(ShadowFragmentInput input [[stage_in]], constant Shadow *shadows [[buffer(ShadowInputIndex_Shadows)]]) { Shadow shadow = shadows[input.shadow_id]; @@ -197,6 +221,13 @@ struct UnderlineVertexOutput { float4 position [[position]]; float4 color [[flat]]; uint underline_id [[flat]]; + float clip_distance [[clip_distance]][4]; +}; + +struct UnderlineFragmentInput { + float4 position [[position]]; + float4 color [[flat]]; + uint underline_id [[flat]]; }; vertex UnderlineVertexOutput underline_vertex( @@ -208,13 +239,18 @@ vertex UnderlineVertexOutput underline_vertex( float2 unit_vertex = unit_vertices[unit_vertex_id]; Underline underline = underlines[underline_id]; float4 device_position = - to_device_position(unit_vertex, underline.bounds, - underline.content_mask.bounds, viewport_size); + to_device_position(unit_vertex, underline.bounds, viewport_size); + float4 clip_distance = distance_from_clip_rect(unit_vertex, underline.bounds, + underline.content_mask.bounds); float4 color = hsla_to_rgba(underline.color); - return UnderlineVertexOutput{device_position, color, underline_id}; + return UnderlineVertexOutput{ + device_position, + color, + underline_id, + {clip_distance.x, clip_distance.y, clip_distance.z, clip_distance.w}}; } -fragment float4 underline_fragment(UnderlineVertexOutput input [[stage_in]], +fragment float4 underline_fragment(UnderlineFragmentInput input [[stage_in]], constant Underline *underlines [[buffer(UnderlineInputIndex_Underlines)]]) { Underline underline = underlines[input.underline_id]; @@ -244,7 +280,13 @@ struct MonochromeSpriteVertexOutput { float4 position [[position]]; float2 tile_position; float4 color [[flat]]; - uint sprite_id [[flat]]; + float clip_distance [[clip_distance]][4]; +}; + +struct MonochromeSpriteFragmentInput { + float4 position [[position]]; + float2 tile_position; + float4 color [[flat]]; }; vertex MonochromeSpriteVertexOutput monochrome_sprite_vertex( @@ -255,32 +297,31 @@ vertex MonochromeSpriteVertexOutput monochrome_sprite_vertex( [[buffer(SpriteInputIndex_ViewportSize)]], constant Size_DevicePixels *atlas_size [[buffer(SpriteInputIndex_AtlasTextureSize)]]) { - float2 unit_vertex = unit_vertices[unit_vertex_id]; MonochromeSprite sprite = sprites[sprite_id]; - // Don't apply content mask at the vertex level because we don't have time - // to make sampling from the texture match the mask. - float4 device_position = to_device_position(unit_vertex, sprite.bounds, - sprite.bounds, viewport_size); + float4 device_position = + to_device_position(unit_vertex, sprite.bounds, viewport_size); + float4 clip_distance = distance_from_clip_rect(unit_vertex, sprite.bounds, + sprite.content_mask.bounds); float2 tile_position = to_tile_position(unit_vertex, sprite.tile, atlas_size); float4 color = hsla_to_rgba(sprite.color); - return MonochromeSpriteVertexOutput{device_position, tile_position, color, - sprite_id}; + return MonochromeSpriteVertexOutput{ + device_position, + tile_position, + color, + {clip_distance.x, clip_distance.y, clip_distance.z, clip_distance.w}}; } fragment float4 monochrome_sprite_fragment( - MonochromeSpriteVertexOutput input [[stage_in]], + MonochromeSpriteFragmentInput input [[stage_in]], constant MonochromeSprite *sprites [[buffer(SpriteInputIndex_Sprites)]], texture2d atlas_texture [[texture(SpriteInputIndex_AtlasTexture)]]) { - MonochromeSprite sprite = sprites[input.sprite_id]; constexpr sampler atlas_texture_sampler(mag_filter::linear, min_filter::linear); float4 sample = atlas_texture.sample(atlas_texture_sampler, input.tile_position); - float clip_distance = quad_sdf(input.position.xy, sprite.content_mask.bounds, - Corners_ScaledPixels{0., 0., 0., 0.}); float4 color = input.color; - color.a *= sample.a * saturate(0.5 - clip_distance); + color.a *= sample.a; return color; } @@ -288,6 +329,13 @@ struct PolychromeSpriteVertexOutput { float4 position [[position]]; float2 tile_position; uint sprite_id [[flat]]; + float clip_distance [[clip_distance]][4]; +}; + +struct PolychromeSpriteFragmentInput { + float4 position [[position]]; + float2 tile_position; + uint sprite_id [[flat]]; }; vertex PolychromeSpriteVertexOutput polychrome_sprite_vertex( @@ -301,17 +349,20 @@ vertex PolychromeSpriteVertexOutput polychrome_sprite_vertex( float2 unit_vertex = unit_vertices[unit_vertex_id]; PolychromeSprite sprite = sprites[sprite_id]; - // Don't apply content mask at the vertex level because we don't have time - // to make sampling from the texture match the mask. - float4 device_position = to_device_position(unit_vertex, sprite.bounds, - sprite.bounds, viewport_size); + float4 device_position = + to_device_position(unit_vertex, sprite.bounds, viewport_size); + float4 clip_distance = distance_from_clip_rect(unit_vertex, sprite.bounds, + sprite.content_mask.bounds); float2 tile_position = to_tile_position(unit_vertex, sprite.tile, atlas_size); - return PolychromeSpriteVertexOutput{device_position, tile_position, - sprite_id}; + return PolychromeSpriteVertexOutput{ + device_position, + tile_position, + sprite_id, + {clip_distance.x, clip_distance.y, clip_distance.z, clip_distance.w}}; } fragment float4 polychrome_sprite_fragment( - PolychromeSpriteVertexOutput input [[stage_in]], + PolychromeSpriteFragmentInput input [[stage_in]], constant PolychromeSprite *sprites [[buffer(SpriteInputIndex_Sprites)]], texture2d atlas_texture [[texture(SpriteInputIndex_AtlasTexture)]]) { PolychromeSprite sprite = sprites[input.sprite_id]; @@ -319,11 +370,8 @@ fragment float4 polychrome_sprite_fragment( min_filter::linear); float4 sample = atlas_texture.sample(atlas_texture_sampler, input.tile_position); - float quad_distance = + float distance = quad_sdf(input.position.xy, sprite.bounds, sprite.corner_radii); - float clip_distance = quad_sdf(input.position.xy, sprite.content_mask.bounds, - Corners_ScaledPixels{0., 0., 0., 0.}); - float distance = max(quad_distance, clip_distance); float4 color = sample; if (sprite.grayscale) { @@ -385,7 +433,6 @@ struct PathSpriteVertexOutput { float4 position [[position]]; float2 tile_position; float4 color [[flat]]; - uint sprite_id [[flat]]; }; vertex PathSpriteVertexOutput path_sprite_vertex( @@ -401,19 +448,17 @@ vertex PathSpriteVertexOutput path_sprite_vertex( PathSprite sprite = sprites[sprite_id]; // Don't apply content mask because it was already accounted for when // rasterizing the path. - float4 device_position = to_device_position(unit_vertex, sprite.bounds, - sprite.bounds, viewport_size); + float4 device_position = + to_device_position(unit_vertex, sprite.bounds, viewport_size); float2 tile_position = to_tile_position(unit_vertex, sprite.tile, atlas_size); float4 color = hsla_to_rgba(sprite.color); - return PathSpriteVertexOutput{device_position, tile_position, color, - sprite_id}; + return PathSpriteVertexOutput{device_position, tile_position, color}; } fragment float4 path_sprite_fragment( PathSpriteVertexOutput input [[stage_in]], constant PathSprite *sprites [[buffer(SpriteInputIndex_Sprites)]], texture2d atlas_texture [[texture(SpriteInputIndex_AtlasTexture)]]) { - PathSprite sprite = sprites[input.sprite_id]; constexpr sampler atlas_texture_sampler(mag_filter::linear, min_filter::linear); float4 sample = @@ -473,16 +518,10 @@ float4 hsla_to_rgba(Hsla hsla) { } float4 to_device_position(float2 unit_vertex, Bounds_ScaledPixels bounds, - Bounds_ScaledPixels clip_bounds, constant Size_DevicePixels *input_viewport_size) { float2 position = unit_vertex * float2(bounds.size.width, bounds.size.height) + float2(bounds.origin.x, bounds.origin.y); - position.x = max(clip_bounds.origin.x, position.x); - position.x = min(clip_bounds.origin.x + clip_bounds.size.width, position.x); - position.y = max(clip_bounds.origin.y, position.y); - position.y = min(clip_bounds.origin.y + clip_bounds.size.height, position.y); - float2 viewport_size = float2((float)input_viewport_size->width, (float)input_viewport_size->height); float2 device_position = @@ -551,3 +590,14 @@ float blur_along_x(float x, float y, float sigma, float corner, 0.5 + 0.5 * erf((x + float2(-curved, curved)) * (sqrt(0.5) / sigma)); return integral.y - integral.x; } + +float4 distance_from_clip_rect(float2 unit_vertex, Bounds_ScaledPixels bounds, + Bounds_ScaledPixels clip_bounds) { + float2 position = + unit_vertex * float2(bounds.size.width, bounds.size.height) + + float2(bounds.origin.x, bounds.origin.y); + return float4(position.x - clip_bounds.origin.x, + clip_bounds.origin.x + clip_bounds.size.width - position.x, + position.y - clip_bounds.origin.y, + clip_bounds.origin.y + clip_bounds.size.height - position.y); +} From d71f671476e4c389e01d075938692a51921613ca Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Nov 2023 17:32:21 +0100 Subject: [PATCH 108/110] Fix clipping in `Line::draw` Co-Authored-By: Nathan Co-Authored-By: Marshall --- crates/gpui2/src/text_system/line.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/gpui2/src/text_system/line.rs b/crates/gpui2/src/text_system/line.rs index ad70a79bb1e411fdaa4b0fddc0de39bdbf96e7af..707274ad33f26ce2212512c97df5527bd420ead7 100644 --- a/crates/gpui2/src/text_system/line.rs +++ b/crates/gpui2/src/text_system/line.rs @@ -74,7 +74,6 @@ impl Line { glyph_origin.y += line_height; } prev_glyph_position = glyph.position; - let glyph_origin = glyph_origin + baseline_offset; let mut finished_underline: Option<(Point, UnderlineStyle)> = None; if glyph.index >= run_end { @@ -125,14 +124,14 @@ impl Line { if max_glyph_bounds.intersects(&content_mask.bounds) { if glyph.is_emoji { cx.paint_emoji( - glyph_origin, + glyph_origin + baseline_offset, run.font_id, glyph.id, self.layout.layout.font_size, )?; } else { cx.paint_glyph( - glyph_origin, + glyph_origin + baseline_offset, run.font_id, glyph.id, self.layout.layout.font_size, From b6766ba39a631f199c61cd4ae5d02ce97a736a46 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 8 Nov 2023 17:32:32 +0100 Subject: [PATCH 109/110] Replace `GitStatusColors` with `StatusColors` (#3268) This PR removes `GitStatusColors` in favor of just using `StatusColors` instead. Release Notes: - N/A --- crates/storybook2/src/stories/focus.rs | 12 +++++------ crates/storybook2/src/stories/scroll.rs | 4 ++-- crates/theme2/src/colors.rs | 12 ----------- crates/theme2/src/default_colors.rs | 23 ++++------------------ crates/theme2/src/default_theme.rs | 4 +--- crates/theme2/src/registry.rs | 5 ++--- crates/theme2/src/theme2.rs | 14 ++++++------- crates/theme_importer/src/theme_printer.rs | 19 ++---------------- crates/ui2/src/prelude.rs | 12 +++++------ 9 files changed, 30 insertions(+), 75 deletions(-) diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index 57f9869859710bfd07967af6e8170c8048634124..d2d565aadafdeaa5082417b6186bbf10c35dab90 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -25,12 +25,12 @@ impl Render for FocusStory { fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { let theme = cx.theme(); - let color_1 = theme.styles.git.created; - let color_2 = theme.styles.git.modified; - let color_3 = theme.styles.git.deleted; - let color_4 = theme.styles.git.conflict; - let color_5 = theme.styles.git.ignored; - let color_6 = theme.styles.git.renamed; + let color_1 = theme.status().created; + let color_2 = theme.status().modified; + let color_3 = theme.status().deleted; + let color_4 = theme.status().conflict; + let color_5 = theme.status().ignored; + let color_6 = theme.status().renamed; let child_1 = cx.focus_handle(); let child_2 = cx.focus_handle(); diff --git a/crates/storybook2/src/stories/scroll.rs b/crates/storybook2/src/stories/scroll.rs index cdb48603e093f62e4ef5ee5968af068798e3bce9..744d0206f9a8c7f12aae1363e448acb8e448d2a9 100644 --- a/crates/storybook2/src/stories/scroll.rs +++ b/crates/storybook2/src/stories/scroll.rs @@ -17,8 +17,8 @@ impl Render for ScrollStory { fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { let theme = cx.theme(); - let color_1 = theme.styles.git.created; - let color_2 = theme.styles.git.modified; + let color_1 = theme.status().created; + let color_2 = theme.status().modified; div() .id("parent") diff --git a/crates/theme2/src/colors.rs b/crates/theme2/src/colors.rs index 8e3db63537823e7eaaf8c10a2dfc587fa7493ec0..83af983d04486ddcb0d03ecfc1d35c034079259e 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -29,17 +29,6 @@ pub struct StatusColors { pub warning: Hsla, } -#[derive(Refineable, Clone, Debug)] -#[refineable(debug)] -pub struct GitStatusColors { - pub conflict: Hsla, - pub created: Hsla, - pub deleted: Hsla, - pub ignored: Hsla, - pub modified: Hsla, - pub renamed: Hsla, -} - #[derive(Refineable, Clone, Debug)] #[refineable(debug, deserialize)] pub struct ThemeColors { @@ -260,7 +249,6 @@ pub struct ThemeStyles { #[refineable] pub colors: ThemeColors, pub status: StatusColors, - pub git: GitStatusColors, pub player: PlayerColors, pub syntax: Arc, } diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 3a626205f925f081c550776ade24ef807eaf73a3..ec57538e8f710e813ebcbb3ee5e7cb3083ccd895 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -2,12 +2,10 @@ use std::num::ParseIntError; use gpui::{hsla, Hsla, Rgba}; -use crate::{ - colors::{GitStatusColors, StatusColors, SystemColors, ThemeColors}, - scale::{ColorScaleSet, ColorScales}, - syntax::SyntaxTheme, - ColorScale, PlayerColor, PlayerColors, -}; +use crate::colors::{StatusColors, SystemColors, ThemeColors}; +use crate::scale::{ColorScaleSet, ColorScales}; +use crate::syntax::SyntaxTheme; +use crate::{ColorScale, PlayerColor, PlayerColors}; impl Default for PlayerColors { fn default() -> Self { @@ -136,19 +134,6 @@ impl Default for StatusColors { } } -impl Default for GitStatusColors { - fn default() -> Self { - Self { - conflict: orange().dark().step_9(), - created: grass().dark().step_9(), - deleted: red().dark().step_9(), - ignored: neutral().dark().step_9(), - modified: yellow().dark().step_9(), - renamed: blue().dark().step_9(), - } - } -} - impl SyntaxTheme { pub fn default_light() -> Self { Self { diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index a0947e47c347a9bb9c67962485ae3cfe524e4e9d..40fb7df7cfd85d1ed33edcd16ad562af4519ee5d 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use crate::{ - colors::{GitStatusColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, + colors::{StatusColors, SystemColors, ThemeColors, ThemeStyles}, default_color_scales, Appearance, PlayerColors, SyntaxTheme, Theme, ThemeFamily, }; @@ -14,7 +14,6 @@ fn zed_pro_daylight() -> Theme { system: SystemColors::default(), colors: ThemeColors::default_light(), status: StatusColors::default(), - git: GitStatusColors::default(), player: PlayerColors::default_light(), syntax: Arc::new(SyntaxTheme::default_light()), }, @@ -30,7 +29,6 @@ pub(crate) fn zed_pro_moonlight() -> Theme { system: SystemColors::default(), colors: ThemeColors::default_dark(), status: StatusColors::default(), - git: GitStatusColors::default(), player: PlayerColors::default(), syntax: Arc::new(SyntaxTheme::default_dark()), }, diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index c6e195e757c8b349d98b105615d97aea40cbde3f..decec8b5dada0ef19250f15de5de100ce57d47c2 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -6,8 +6,8 @@ use gpui::SharedString; use refineable::Refineable; use crate::{ - zed_pro_family, Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily, + zed_pro_family, Appearance, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme, + ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily, }; pub struct ThemeRegistry { @@ -50,7 +50,6 @@ impl ThemeRegistry { system: SystemColors::default(), colors: theme_colors, status: StatusColors::default(), - git: GitStatusColors::default(), player: PlayerColors::default(), syntax: match user_theme.appearance { Appearance::Light => Arc::new(SyntaxTheme::default_light()), diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 9019eba07ada33433a1c189e07278d8c0b1d795f..28d12e2b43caee04136a850761a2ca5bcbd3f939 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -65,6 +65,12 @@ pub struct Theme { } impl Theme { + /// Returns the [`SystemColors`] for the theme. + #[inline(always)] + pub fn system(&self) -> &SystemColors { + &self.styles.system + } + /// Returns the [`ThemeColors`] for the theme. #[inline(always)] pub fn players(&self) -> &PlayerColors { @@ -89,19 +95,13 @@ impl Theme { &self.styles.status } - /// Returns the [`GitStatusColors`] for the theme. - #[inline(always)] - pub fn git(&self) -> &GitStatusColors { - &self.styles.git - } - /// Returns the color for the syntax node with the given name. #[inline(always)] pub fn syntax_color(&self, name: &str) -> Hsla { self.syntax().color(name) } - /// Returns the [`StatusColors`] for the theme. + /// Returns the [`DiagnosticStyle`] for the theme. #[inline(always)] pub fn diagnostic_style(&self) -> DiagnosticStyle { DiagnosticStyle { diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs index 0f20a8d60f93620fc990f815d3248b36452df641..49caf7bfd0be145329efb2e2bfca23fab77f15bd 100644 --- a/crates/theme_importer/src/theme_printer.rs +++ b/crates/theme_importer/src/theme_printer.rs @@ -2,8 +2,8 @@ use std::fmt::{self, Debug}; use gpui::{Hsla, Rgba}; use theme::{ - Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, - SystemColors, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, + Appearance, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, SystemColors, + ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, }; struct RawSyntaxPrinter<'a>(&'a str); @@ -270,21 +270,6 @@ impl<'a> Debug for StatusColorsPrinter<'a> { } } -pub struct GitStatusColorsPrinter<'a>(&'a GitStatusColors); - -impl<'a> Debug for GitStatusColorsPrinter<'a> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("GitStatusColors") - .field("conflict", &HslaPrinter(self.0.conflict)) - .field("created", &HslaPrinter(self.0.created)) - .field("deleted", &HslaPrinter(self.0.deleted)) - .field("ignored", &HslaPrinter(self.0.ignored)) - .field("modified", &HslaPrinter(self.0.modified)) - .field("renamed", &HslaPrinter(self.0.renamed)) - .finish() - } -} - pub struct PlayerColorsPrinter<'a>(&'a PlayerColors); impl<'a> Debug for PlayerColorsPrinter<'a> { diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs index c942f0aa3b883141a6178533c83e45c2a3a9f48c..3f179210eb3fc5c8329ea3cde110f2f5b33e7ee0 100644 --- a/crates/ui2/src/prelude.rs +++ b/crates/ui2/src/prelude.rs @@ -46,12 +46,12 @@ pub enum GitStatus { impl GitStatus { pub fn hsla(&self, cx: &WindowContext) -> Hsla { match self { - Self::None => cx.theme().styles.system.transparent, - Self::Created => cx.theme().styles.git.created, - Self::Modified => cx.theme().styles.git.modified, - Self::Deleted => cx.theme().styles.git.deleted, - Self::Conflict => cx.theme().styles.git.conflict, - Self::Renamed => cx.theme().styles.git.renamed, + Self::None => cx.theme().system().transparent, + Self::Created => cx.theme().status().created, + Self::Modified => cx.theme().status().modified, + Self::Deleted => cx.theme().status().deleted, + Self::Conflict => cx.theme().status().conflict, + Self::Renamed => cx.theme().status().renamed, } } } From e6bda025a346da751136a8a21ab0bc0e6242f6a6 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Wed, 8 Nov 2023 11:40:53 -0500 Subject: [PATCH 110/110] Improve get preview channel changes script - Filter out N/As - Identify missing release note lines Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> --- script/get-preview-channel-changes | 63 ++++++++++++++++++------------ 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/script/get-preview-channel-changes b/script/get-preview-channel-changes index 5a0be3ed6669233bb50e001320259f09c626c288..7206134200b9df7c2804a37ca2afe06cde5c12ca 100755 --- a/script/get-preview-channel-changes +++ b/script/get-preview-channel-changes @@ -2,7 +2,7 @@ const { execFileSync } = require("child_process"); const { GITHUB_ACCESS_TOKEN } = process.env; -const PR_REGEX = /#\d+/ // Ex: matches on #4241 +const PR_REGEX = /#\d+/; // Ex: matches on #4241 const FIXES_REGEX = /(fixes|closes|completes) (.+[/#]\d+.*)$/im; main(); @@ -12,7 +12,7 @@ async function main() { const [newTag, oldTag] = execFileSync( "git", ["tag", "--sort", "-committerdate"], - { encoding: "utf8" } + { encoding: "utf8" }, ) .split("\n") .filter((t) => t.startsWith("v") && t.endsWith("-pre")); @@ -22,13 +22,22 @@ async function main() { let hasProtocolChanges = false; try { - execFileSync("git", ["diff", oldTag, newTag, "--exit-code", "--", "crates/rpc"]).status != 0; + execFileSync("git", [ + "diff", + oldTag, + newTag, + "--exit-code", + "--", + "crates/rpc", + ]).status != 0; } catch (error) { hasProtocolChanges = true; } if (hasProtocolChanges) { - console.warn("\033[31;1;4mRPC protocol changes, server should be re-deployed\033[0m\n"); + console.warn( + "\033[31;1;4mRPC protocol changes, server should be re-deployed\033[0m\n", + ); } else { console.log("No RPC protocol changes\n"); } @@ -37,10 +46,14 @@ async function main() { const pullRequestNumbers = getPullRequestNumbers(oldTag, newTag); // Get the PRs that were cherry-picked between main and the old tag. - const existingPullRequestNumbers = new Set(getPullRequestNumbers("main", oldTag)); + const existingPullRequestNumbers = new Set( + getPullRequestNumbers("main", oldTag), + ); // Filter out those existing PRs from the set of new PRs. - const newPullRequestNumbers = pullRequestNumbers.filter(number => !existingPullRequestNumbers.has(number)); + const newPullRequestNumbers = pullRequestNumbers.filter( + (number) => !existingPullRequestNumbers.has(number), + ); // Fetch the pull requests from the GitHub API. console.log("Merged Pull requests:"); @@ -56,6 +69,16 @@ async function main() { // Print the pull request title and URL. const pullRequest = await response.json(); + const releaseNotesHeader = /^\s*(?:Release )?Notes\s*:(.+)/ims; + + let releaseNotes = pullRequest.body || ""; + const captures = releaseNotesHeader.exec(releaseNotes); + const notes = captures ? captures[1] : "MISSING"; + const skippableNoteRegex = /^\s*-?\s*n\/?a\s*/ims; + + if (skippableNoteRegex.exec(notes) != null) { + continue; + } console.log("*", pullRequest.title); console.log(" PR URL: ", webURL); @@ -66,38 +89,30 @@ async function main() { console.log(" Issue URL: ", fixedIssueURL); } - let releaseNotes = (pullRequest.body || "").split("Release Notes:")[1]; - - if (releaseNotes) { - releaseNotes = releaseNotes.trim().split("\n") - console.log(" Release Notes:"); + releaseNotes = notes.trim().split("\n"); + console.log(" Release Notes:"); - for (const line of releaseNotes) { - console.log(` ${line}`); - } + for (const line of releaseNotes) { + console.log(` ${line}`); } - console.log() + console.log(); } } function getPullRequestNumbers(oldTag, newTag) { const pullRequestNumbers = execFileSync( "git", - [ - "log", - `${oldTag}..${newTag}`, - "--oneline" - ], - { encoding: "utf8" } + ["log", `${oldTag}..${newTag}`, "--oneline"], + { encoding: "utf8" }, ) .split("\n") - .filter(line => line.length > 0) - .map(line => { + .filter((line) => line.length > 0) + .map((line) => { const match = line.match(/#(\d+)/); return match ? match[1] : null; }) - .filter(line => line); + .filter((line) => line); return pullRequestNumbers; }