diff --git a/Cargo.lock b/Cargo.lock index 71090e06e0..f614dcbeac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2749,7 +2749,7 @@ dependencies = [ "env_logger 0.9.3", "futures 0.3.28", "fuzzy2", - "git", + "git3", "gpui2", "indoc", "itertools 0.10.5", @@ -3601,6 +3601,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" @@ -5042,7 +5059,8 @@ dependencies = [ name = "menu2" version = "0.1.0" dependencies = [ - "gpui2", + "serde", + "serde_derive", ] [[package]] @@ -6078,6 +6096,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" @@ -8596,9 +8631,14 @@ dependencies = [ "backtrace-on-stack-overflow", "chrono", "clap 4.4.4", + "editor2", + "fuzzy2", "gpui2", "itertools 0.11.0", + "language2", "log", + "menu2", + "picker2", "rust-embed", "serde", "settings2", @@ -9062,6 +9102,7 @@ dependencies = [ "fs2", "gpui2", "indexmap 1.9.3", + "itertools 0.11.0", "parking_lot 0.11.2", "refineable", "schemars", @@ -9071,6 +9112,22 @@ dependencies = [ "settings2", "toml 0.5.11", "util", + "uuid 1.4.1", +] + +[[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]] @@ -11118,7 +11175,7 @@ dependencies = [ [[package]] name = "zed" -version = "0.112.0" +version = "0.113.0" dependencies = [ "activity_indicator", "ai", @@ -11282,6 +11339,7 @@ dependencies = [ "fsevent", "futures 0.3.28", "fuzzy", + "go_to_line2", "gpui2", "ignore", "image", diff --git a/Cargo.toml b/Cargo.toml index 9e1201e428..f2ad2949fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,7 @@ members = [ "crates/fuzzy2", "crates/git", "crates/go_to_line", + "crates/go_to_line2", "crates/gpui", "crates/gpui_macros", "crates/gpui2", @@ -68,6 +69,7 @@ members = [ "crates/notifications", "crates/outline", "crates/picker", + "crates/picker2", "crates/plugin", "crates/plugin_macros", "crates/plugin_runtime", @@ -95,6 +97,7 @@ members = [ "crates/text", "crates/theme", "crates/theme2", + "crates/theme_importer", "crates/theme_selector", "crates/ui2", "crates/util", diff --git a/assets/themes/src/vscode/andromeda/LICENSE b/assets/themes/src/vscode/andromeda/LICENSE new file mode 100644 index 0000000000..82d25d5061 --- /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 0000000000..c59ece1ee1 --- /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 0000000000..235eb8f003 --- /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 0000000000..cbdc038a55 --- /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" + } + ] +} diff --git a/assets/themes/src/vscode/ayu/LICENSE b/assets/themes/src/vscode/ayu/LICENSE new file mode 100644 index 0000000000..97c615481a --- /dev/null +++ b/assets/themes/src/vscode/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/vscode/ayu/ayu-dark.json b/assets/themes/src/vscode/ayu/ayu-dark.json new file mode 100644 index 0000000000..71c1da3fa5 --- /dev/null +++ b/assets/themes/src/vscode/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/vscode/ayu/ayu-light.json b/assets/themes/src/vscode/ayu/ayu-light.json new file mode 100644 index 0000000000..782b04ac76 --- /dev/null +++ b/assets/themes/src/vscode/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/vscode/ayu/ayu-mirage.json b/assets/themes/src/vscode/ayu/ayu-mirage.json new file mode 100644 index 0000000000..7708236829 --- /dev/null +++ b/assets/themes/src/vscode/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/vscode/ayu/family.json b/assets/themes/src/vscode/ayu/family.json new file mode 100644 index 0000000000..05092a335d --- /dev/null +++ b/assets/themes/src/vscode/ayu/family.json @@ -0,0 +1,21 @@ +{ + "name": "Ayu", + "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" + } + ] +} diff --git a/assets/themes/src/vscode/dracula/LICENSE b/assets/themes/src/vscode/dracula/LICENSE new file mode 100644 index 0000000000..dcaf6d7f61 --- /dev/null +++ b/assets/themes/src/vscode/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/vscode/dracula/dracula.json b/assets/themes/src/vscode/dracula/dracula.json new file mode 100644 index 0000000000..6604a094d5 --- /dev/null +++ b/assets/themes/src/vscode/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/assets/themes/src/vscode/dracula/family.json b/assets/themes/src/vscode/dracula/family.json new file mode 100644 index 0000000000..b3bf2cf04a --- /dev/null +++ b/assets/themes/src/vscode/dracula/family.json @@ -0,0 +1,11 @@ +{ + "name": "Dracula", + "author": "Zeno Rocha", + "themes": [ + { + "name": "Dracula", + "file_name": "dracula.json", + "appearance": "dark" + } + ] +} diff --git a/assets/themes/src/vscode/gruvbox/LICENSE b/assets/themes/src/vscode/gruvbox/LICENSE new file mode 100644 index 0000000000..01085fd817 --- /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 0000000000..7ff7589a8e --- /dev/null +++ b/assets/themes/src/vscode/gruvbox/family.json @@ -0,0 +1,36 @@ +{ + "name": "Gruvbox", + "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 0000000000..4c1a7c9e8a --- /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 0000000000..e9ef916193 --- /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 0000000000..8581447f49 --- /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 0000000000..bd0f60eac9 --- /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 0000000000..6cd742090e --- /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 0000000000..a101704eed --- /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" + } +} diff --git a/assets/themes/src/vscode/night-owl/LICENSE b/assets/themes/src/vscode/night-owl/LICENSE new file mode 100644 index 0000000000..e1de2ebbb6 --- /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 0000000000..81c6ca7534 --- /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 0000000000..81e0fc0092 --- /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 0000000000..6d41b6299b --- /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/noctis/LICENSE b/assets/themes/src/vscode/noctis/LICENSE new file mode 100644 index 0000000000..44dde44047 --- /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 0000000000..d550e74811 --- /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 0000000000..a6c4853c3b --- /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 0000000000..26aba7e213 --- /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 0000000000..a20a19289e --- /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 0000000000..26e0fe4223 --- /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 0000000000..1f72b0e59c --- /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 0000000000..88493d99d5 --- /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 0000000000..cc270fe526 --- /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 0000000000..26d1a02de8 --- /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 0000000000..05768aff35 --- /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 0000000000..6ccbff372b --- /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 0000000000..4d474ad311 --- /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/assets/themes/src/vscode/nord/LICENSE b/assets/themes/src/vscode/nord/LICENSE new file mode 100644 index 0000000000..996f8fb612 --- /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 0000000000..eb0e94d202 --- /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 0000000000..bb300297c1 --- /dev/null +++ b/assets/themes/src/vscode/nord/nord.json @@ -0,0 +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", + + "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", + "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/assets/themes/src/vscode/palenight/LICENSE b/assets/themes/src/vscode/palenight/LICENSE new file mode 100644 index 0000000000..139fba6d40 --- /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 0000000000..69379fafe2 --- /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 0000000000..60164e29c7 --- /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 0000000000..92104cd9ed --- /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 0000000000..5351dc4f23 --- /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 0000000000..158292b8df --- /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 0000000000..5b72edd300 --- /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 0000000000..39cc251fe9 --- /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 0000000000..dbbb757335 --- /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 0000000000..c2a0d23efc --- /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 0000000000..a6777a9935 --- /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 0000000000..b7ea4f2b27 --- /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 0000000000..6c21ce8dcb --- /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 0000000000..74f0ce47e3 --- /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 0000000000..c3388dbb50 --- /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 0000000000..f8e0f5d9e6 --- /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 0000000000..5b38ef46fa --- /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/client2/src/client2.rs b/crates/client2/src/client2.rs index 6494e0350b..93ec7f329b 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); @@ -87,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| { @@ -100,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| { @@ -113,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/copilot2/src/copilot2.rs b/crates/copilot2/src/copilot2.rs index ac52bf156d..9e82823b9b 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/Cargo.toml b/crates/editor2/Cargo.toml index 121c03ec00..b897110966 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 2955a929f8..808f0d340a 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,18 @@ 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, TextRun, 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::{SyntaxTheme, Theme}; use wrap_map::WrapMap; pub use block_map::{ @@ -35,6 +40,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 +503,63 @@ 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)); + pub fn highlighted_chunks<'a>( + &'a self, + display_rows: Range, + language_aware: bool, + editor_style: &'a EditorStyle, + ) -> impl Iterator> { + self.chunks( + display_rows, + language_aware, + 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(&editor_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); - // } - // } + 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(); + let mut diagnostic_highlight = HighlightStyle::default(); - // if chunk.is_unnecessary { - // diagnostic_highlight.fade_out = Some(style.unnecessary_code_fade); - // } + 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 { - // 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(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, &editor_style.diagnostic_style); + 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); - // } + 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, - // } - // }) - // } + HighlightedChunk { + chunk: chunk.text, + style: highlight_style, + is_tab: chunk.is_tab, + } + }) + } pub fn lay_out_line_for_row( &self, @@ -560,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 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 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"); + 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"); - // styles.push( - // todo!(), // len: chunk.chunk.len(), - // // font_id: text_style.font_id, - // // color: text_style.color, - // // underline: text_style.underline, - // ); - // } + 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"); + // 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())); + } - // 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 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 52628f61b5..ea76a7b57d 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,10 +37,13 @@ pub use element::{ }; use futures::FutureExt; use fuzzy::{StringMatch, StringMatchCandidate}; +use git::diff_hunk_to_display; use gpui::{ - div, AnyElement, AppContext, BackgroundExecutor, Context, Div, Element, EventEmitter, - FocusHandle, Hsla, Model, Pixels, 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}; @@ -49,11 +54,13 @@ 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::{Documentation, LanguageServerId}; +use lsp::{DiagnosticSeverity, Documentation, LanguageServerId}; +use movement::TextLayoutDetails; +use multi_buffer::ToOffsetUtf16; pub use multi_buffer::{ Anchor, AnchorRangeExt, ExcerptId, ExcerptRange, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, @@ -61,27 +68,33 @@ 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, }; -use selections_collection::{MutableSelectionsCollection, SelectionsCollection}; +use selections_collection::{resolve_multiple, MutableSelectionsCollection, SelectionsCollection}; use serde::{Deserialize, Serialize}; use settings::{Settings, SettingsStore}; use smallvec::SmallVec; +use snippet::Snippet; use std::{ any::TypeId, borrow::Cow, - cmp::{self, Reverse}, - ops::{ControlFlow, Deref, DerefMut, Range}, + cmp::{self, Ordering, Reverse}, + mem, + num::NonZeroU32, + ops::{ControlFlow, Deref, DerefMut, Range, RangeInclusive}, path::Path, sync::Arc, time::{Duration, Instant}, }; pub use sum_tree::Bias; use sum_tree::TreeMap; -use text::Rope; -use theme::ThemeColors; +use text::{OffsetUtf16, Rope}; +use theme::{ + ActiveTheme, DiagnosticStyle, PlayerColor, SyntaxTheme, Theme, ThemeColors, ThemeSettings, +}; use util::{post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace}; @@ -160,87 +173,82 @@ 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)] -pub struct GutterHover { - pub hovered: bool, -} - #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum InlayId { Suggestion(usize), @@ -256,118 +264,123 @@ 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!( + AddSelectionAbove, + AddSelectionBelow, + Backspace, + Cancel, + ConfirmRename, + ContextMenuFirst, + ContextMenuLast, + ContextMenuNext, + ContextMenuPrev, + ConvertToKebabCase, + ConvertToLowerCamelCase, + ConvertToLowerCase, + ConvertToSnakeCase, + ConvertToTitleCase, + ConvertToUpperCamelCase, + ConvertToUpperCase, + Copy, + CopyHighlightJson, + CopyPath, + CopyRelativePath, + Cut, + CutToEndOfLine, + Delete, + DeleteLine, + DeleteToBeginningOfLine, + DeleteToEndOfLine, + DeleteToNextSubwordEnd, + DeleteToNextWordEnd, + DeleteToPreviousSubwordStart, + DeleteToPreviousWordStart, + DuplicateLine, + FindAllReferences, + Fold, + FoldSelectedRanges, + Format, + GoToDefinition, + GoToDefinitionSplit, + GoToDiagnostic, + GoToHunk, + GoToPrevDiagnostic, + GoToPrevHunk, + GoToTypeDefinition, + GoToTypeDefinitionSplit, + HalfPageDown, + HalfPageUp, + Hover, + Indent, + JoinLines, + LineDown, + LineUp, + MoveDown, + MoveLeft, + MoveLineDown, + MoveLineUp, + MoveRight, + MoveToBeginning, + MoveToBeginningOfLine, + MoveToEnclosingBracket, + MoveToEnd, + MoveToEndOfLine, + MoveToEndOfParagraph, + 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, + SelectSmallerSyntaxNode, + SelectToBeginning, + SelectToEnd, + SelectToEndOfParagraph, + SelectToNextSubwordEnd, + SelectToNextWordEnd, + SelectToPreviousSubwordStart, + SelectToPreviousWordStart, + SelectToStartOfParagraph, + SelectUp, + ShowCharacterPalette, + ShowCompletions, + ShuffleLines, + SortLinesCaseInsensitive, + SortLinesCaseSensitive, + SplitSelectionIntoLines, + Tab, + TabPrev, + ToggleInlayHints, + ToggleSoftWrap, + Transpose, + Undo, + UndoSelection, + UnfoldLines, +); // impl_actions!( // editor, @@ -389,14 +402,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; - enum DocumentHighlightRead {} enum DocumentHighlightWrite {} enum InputComposition {} @@ -413,133 +418,131 @@ 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(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); workspace::register_project_item::(cx); workspace::register_followable_item::(cx); @@ -597,11 +600,12 @@ 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, + pub syntax: Arc, + pub diagnostic_style: DiagnosticStyle, } type CompletionId = usize; @@ -634,7 +638,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, @@ -658,7 +661,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, @@ -671,6 +674,7 @@ pub struct Editor { next_inlay_id: usize, _subscriptions: Vec, pixel_position_of_newest_cursor: Option>, + style: Option, } pub struct EditorSnapshot { @@ -994,7 +998,7 @@ impl CompletionsMenu { project: Option>, cx: &mut ViewContext, ) { - todo!("implementation below "); + // todo!("implementation below "); } // ) { // let settings = EditorSettings::get_global(cx); @@ -1161,7 +1165,7 @@ impl CompletionsMenu { client: Arc, language_registry: Arc, ) { - todo!() + // todo!() // let request = proto::ResolveCompletionDocumentation { // project_id, // language_server_id: server_id.0 as u64, @@ -1205,7 +1209,7 @@ impl CompletionsMenu { completion: lsp::CompletionItem, language_registry: Arc, ) { - todo!() + // todo!() // let can_resolve = server // .capabilities() // .completion_provider @@ -1800,14 +1804,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>, @@ -1882,7 +1883,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); @@ -1940,7 +1941,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, @@ -1967,7 +1967,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, @@ -1978,6 +1978,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), @@ -2016,6 +2017,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, @@ -2023,7 +2066,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() @@ -2042,7 +2085,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() @@ -2211,7 +2254,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(), @@ -2350,45 +2393,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); @@ -2458,7 +2501,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 +2567,7 @@ impl Editor { goal_column: u32, cx: &mut ViewContext, ) { - if !self.focused { + if !self.focus_handle.is_focused(cx) { cx.focus(&self.focus_handle); } @@ -2701,490 +2744,490 @@ 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_action(); - // } + 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 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 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| { - // 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::(); + 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 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(); + 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) - // }; + 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 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() - // }; + let anchor = buffer.anchor_after(end); + let new_selection = selection.map(|_| anchor); + ( + (start..end, new_text), + (insert_extra_newline, new_selection), + ) + }) + .unzip() + }; - // 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(); + 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(); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(new_selections)); + this.refresh_copilot_suggestions(true, cx); + }); + } - // pub fn newline_above(&mut self, _: &NewlineAbove, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); + pub fn newline_above(&mut self, _: &NewlineAbove, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); - // let mut edits = Vec::new(); - // let mut rows = Vec::new(); - // let mut rows_inserted = 0; + let mut edits = Vec::new(); + let mut rows = Vec::new(); + let mut rows_inserted = 0; - // for selection in self.selections.all_adjusted(cx) { - // let cursor = selection.head(); - // let row = cursor.row; + for selection in self.selections.all_adjusted(cx) { + let cursor = selection.head(); + let row = cursor.row; - // let start_of_line = snapshot.clip_point(Point::new(row, 0), Bias::Left); + let start_of_line = snapshot.clip_point(Point::new(row, 0), Bias::Left); - // let newline = "\n".to_string(); - // edits.push((start_of_line..start_of_line, newline)); + let newline = "\n".to_string(); + edits.push((start_of_line..start_of_line, newline)); - // rows.push(row + rows_inserted); - // rows_inserted += 1; - // } + rows.push(row + rows_inserted); + rows_inserted += 1; + } - // self.transact(cx, |editor, cx| { - // editor.edit(edits, cx); + self.transact(cx, |editor, cx| { + editor.edit(edits, cx); - // editor.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut index = 0; - // s.move_cursors_with(|map, _, _| { - // let row = rows[index]; - // index += 1; + editor.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut index = 0; + s.move_cursors_with(|map, _, _| { + let row = rows[index]; + index += 1; - // let point = Point::new(row, 0); - // let boundary = map.next_line_boundary(point).1; - // let clipped = map.clip_point(boundary, Bias::Left); + let point = Point::new(row, 0); + let boundary = map.next_line_boundary(point).1; + let clipped = map.clip_point(boundary, Bias::Left); - // (clipped, SelectionGoal::None) - // }); - // }); + (clipped, SelectionGoal::None) + }); + }); - // 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; - // } + 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; + } - // 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 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 newline_below(&mut self, _: &NewlineBelow, cx: &mut ViewContext) { - // let buffer = self.buffer.read(cx); - // let snapshot = buffer.snapshot(cx); + pub fn newline_below(&mut self, _: &NewlineBelow, cx: &mut ViewContext) { + let buffer = self.buffer.read(cx); + let snapshot = buffer.snapshot(cx); - // let mut edits = Vec::new(); - // let mut rows = Vec::new(); - // let mut rows_inserted = 0; + let mut edits = Vec::new(); + let mut rows = Vec::new(); + let mut rows_inserted = 0; - // for selection in self.selections.all_adjusted(cx) { - // let cursor = selection.head(); - // let row = cursor.row; + for selection in self.selections.all_adjusted(cx) { + let cursor = selection.head(); + let row = cursor.row; - // let point = Point::new(row + 1, 0); - // let start_of_line = snapshot.clip_point(point, Bias::Left); + let point = Point::new(row + 1, 0); + let start_of_line = snapshot.clip_point(point, Bias::Left); - // let newline = "\n".to_string(); - // edits.push((start_of_line..start_of_line, newline)); + let newline = "\n".to_string(); + edits.push((start_of_line..start_of_line, newline)); - // rows_inserted += 1; - // rows.push(row + rows_inserted); - // } + rows_inserted += 1; + rows.push(row + rows_inserted); + } - // self.transact(cx, |editor, cx| { - // editor.edit(edits, cx); + self.transact(cx, |editor, cx| { + editor.edit(edits, cx); - // editor.change_selections(Some(Autoscroll::fit()), cx, |s| { - // let mut index = 0; - // s.move_cursors_with(|map, _, _| { - // let row = rows[index]; - // index += 1; + editor.change_selections(Some(Autoscroll::fit()), cx, |s| { + let mut index = 0; + s.move_cursors_with(|map, _, _| { + let row = rows[index]; + index += 1; - // let point = Point::new(row, 0); - // let boundary = map.next_line_boundary(point).1; - // let clipped = map.clip_point(boundary, Bias::Left); + let point = Point::new(row, 0); + let boundary = map.next_line_boundary(point).1; + let clipped = map.clip_point(boundary, Bias::Left); - // (clipped, SelectionGoal::None) - // }); - // }); + (clipped, SelectionGoal::None) + }); + }); - // 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; - // } + 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; + } - // 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 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, - // ); - // } + 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, @@ -3226,83 +3269,83 @@ 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. - // 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 - // /// 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); + /// 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; - // } - // } + 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( @@ -3344,18 +3387,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 { @@ -3484,13 +3525,13 @@ 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(), + rem_size: cx.rem_size(), + } + } fn splice_inlay_hints( &self, @@ -3504,51 +3545,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)?; + 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(); + // 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 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() { @@ -3631,7 +3672,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); @@ -4059,12 +4100,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(); @@ -4192,8 +4233,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(); } } } @@ -4208,8 +4248,7 @@ impl Editor { } else { let is_copilot_disabled = self.refresh_copilot_suggestions(false, cx).is_none(); if is_copilot_disabled { - todo!(); - // cx.propagate_action(); + cx.propagate(); } } } @@ -4431,12 +4470,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, @@ -4464,1434 +4505,1434 @@ 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::>() - // }); - - // 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, - // }); - // } - - // Ok(()) - // } - - // 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_prev_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { - // self.move_to_snippet_tabstop(Bias::Left, 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; - // } - // } - - // false - // } - - // pub fn clear(&mut self, cx: &mut ViewContext) { - // self.transact(cx, |this, cx| { - // this.select_all(&SelectAll, cx); - // this.insert("", cx); - // }); - // } - - // 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, - // ), - // ); - // } - // } - - // selection.set_head(new_head, SelectionGoal::None); - // } - // } - // } - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - // this.insert("", cx); - // this.refresh_copilot_suggestions(true, cx); - // }); - // } - - // 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); - // }); - // } - - // pub fn tab_prev(&mut self, _: &TabPrev, cx: &mut ViewContext) { - // if self.move_to_prev_snippet_tabstop(cx) { - // return; - // } - - // self.outdent(&Outdent, cx); - // } - - // pub fn tab(&mut self, _: &Tab, cx: &mut ViewContext) { - // if self.move_to_next_snippet_tabstop(cx) { - // return; - // } - - // 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; - - // // 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; - // } - - // // 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; - // } - // } - - // // 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; - // } - - // // 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; - // } - - // 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); - // }); - // } - - // 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; - - // 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)); - // }); - // } - - // 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; - - // // 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(), - // }; - - // let row_start = Point::new(row, 0); - // edits.push(( - // row_start..row_start, - // indent_delta.chars().collect::(), - // )); - - // // 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 selection.start.row == selection.end.row { - // delta_for_start_row + delta_for_end_row - // } else { - // delta_for_end_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; - // } - // } - - // 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); - // } - // } - // } - // } - - // 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)); - // }); - // } - - // 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; - // } - // } - - // 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); - // } - - // 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())); - - // 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| { - // 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(); - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - // }); - // } - - // 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 - // }; - - // 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); - // } - - // 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| { - // 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.buffer.update(cx, |buffer, cx| { - // buffer.edit([(end_of_line..start_of_next_line, replace)], None, cx) - // }); - // } - // } - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_anchor_ranges(cursor_positions) - // }); - // }); - // } - - // pub fn sort_lines_case_sensitive( - // &mut self, - // _: &SortLinesCaseSensitive, - // cx: &mut ViewContext, - // ) { - // self.manipulate_lines(cx, |lines| lines.sort()) - // } - - // 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())) - // } - - // pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext) { - // self.manipulate_lines(cx, |lines| lines.reverse()) - // } - - // pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext) { - // self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng())) - // } - - // 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, - // ); - - // 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" - // ); - - // 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, - // }); - // } - - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - - // this.request_autoscroll(Autoscroll::fit(), cx); - // }); - // } - - // pub fn convert_to_upper_case(&mut self, _: &ConvertToUpperCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_uppercase()) - // } - - // pub fn convert_to_lower_case(&mut self, _: &ConvertToLowerCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_lowercase()) - // } - - // 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") - // }) - // } - - // pub fn convert_to_snake_case(&mut self, _: &ConvertToSnakeCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_case(Case::Snake)) - // } - - // pub fn convert_to_kebab_case(&mut self, _: &ConvertToKebabCase, cx: &mut ViewContext) { - // self.manipulate_text(cx, |text| text.to_case(Case::Kebab)) - // } - - // 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") - // }) - // } - - // pub fn convert_to_lower_camel_case( - // &mut self, - // _: &ConvertToLowerCamelCase, - // cx: &mut ViewContext, - // ) { - // self.manipulate_text(cx, |text| text.to_case(Case::Camel)) - // } - - // 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); - - // let mut new_selections = Vec::new(); - // let mut edits = Vec::new(); - // let mut selection_adjustment = 0i32; - - // for selection in self.selections.all::(cx) { - // let selection_is_empty = selection.is_empty(); - - // 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) - // }; - - // let text = buffer.text_for_range(start..end).collect::(); - // let old_length = text.len() as i32; - // let text = callback(&text); - - // 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 - // }); - - // selection_adjustment += old_length - text.len() as i32; - - // edits.push((start..end, text)); - // } - - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); - - // this.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - - // this.request_autoscroll(Autoscroll::fit(), cx); - // }); - // } - - // 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; - // } - // } - - // // 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)); - // } - - // self.transact(cx, |this, cx| { - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); - - // this.request_autoscroll(Autoscroll::fit(), 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, - // ); - - // // 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 we didn't move line(s), preserve the existing selections - // new_selections.append(&mut contiguous_row_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 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, - // ); - - // // 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); - // } - // } - // } - - // // If we didn't move line(s), preserve the existing selections - // new_selections.append(&mut contiguous_row_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 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 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 transpose_offset == 0 { - // return; - // } - - // *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); - // }); - // }); - // } - - // 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, - // }); - // } - // } - - // 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 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(); - - // 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, - // }); - // } - // } - - // 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| { - // 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| { - // 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| { - // 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| { - // 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() { - // return; - // } - - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // 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::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() { - // return; - // } - - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // 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); - - // if self.mode == EditorMode::SingleLine { - // cx.propagate_action(); - // 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); - // }); - // }); - // } - - // 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; - // } - - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // 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 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::>() + }); + + 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, + }); + } + + Ok(()) + } + + 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_prev_snippet_tabstop(&mut self, cx: &mut ViewContext) -> bool { + self.move_to_snippet_tabstop(Bias::Left, 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; + } + } + + false + } + + pub fn clear(&mut self, cx: &mut ViewContext) { + self.transact(cx, |this, cx| { + this.select_all(&SelectAll, cx); + this.insert("", cx); + }); + } + + 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, + ), + ); + } + } + + selection.set_head(new_head, SelectionGoal::None); + } + } + } + + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + this.insert("", cx); + this.refresh_copilot_suggestions(true, cx); + }); + } + + 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); + }); + } + + pub fn tab_prev(&mut self, _: &TabPrev, cx: &mut ViewContext) { + if self.move_to_prev_snippet_tabstop(cx) { + return; + } + + self.outdent(&Outdent, cx); + } + + pub fn tab(&mut self, _: &Tab, cx: &mut ViewContext) { + if self.move_to_next_snippet_tabstop(cx) { + return; + } + + 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; + + // 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; + } + + // 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; + } + } + + // 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; + } + + // 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; + } + + 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); + }); + } + + 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; + + 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)); + }); + } + + 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; + + // 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(), + }; + + let row_start = Point::new(row, 0); + edits.push(( + row_start..row_start, + indent_delta.chars().collect::(), + )); + + // 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 selection.start.row == selection.end.row { + delta_for_start_row + delta_for_end_row + } else { + delta_for_end_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; + } + } + + 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); + } + } + } + } + + 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)); + }); + } + + 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; + } + } + + 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); + } + + 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())); + + 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| { + 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(); + + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + }); + } + + 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 + }; + + 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); + } + + 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| { + 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.buffer.update(cx, |buffer, cx| { + buffer.edit([(end_of_line..start_of_next_line, replace)], None, cx) + }); + } + } + + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_anchor_ranges(cursor_positions) + }); + }); + } + + pub fn sort_lines_case_sensitive( + &mut self, + _: &SortLinesCaseSensitive, + cx: &mut ViewContext, + ) { + self.manipulate_lines(cx, |lines| lines.sort()) + } + + 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())) + } + + pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext) { + self.manipulate_lines(cx, |lines| lines.reverse()) + } + + pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext) { + self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng())) + } + + 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, + ); + + 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" + ); + + 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, + }); + } + + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); + + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + + this.request_autoscroll(Autoscroll::fit(), cx); + }); + } + + pub fn convert_to_upper_case(&mut self, _: &ConvertToUpperCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_uppercase()) + } + + pub fn convert_to_lower_case(&mut self, _: &ConvertToLowerCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_lowercase()) + } + + 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") + }) + } + + pub fn convert_to_snake_case(&mut self, _: &ConvertToSnakeCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_case(Case::Snake)) + } + + pub fn convert_to_kebab_case(&mut self, _: &ConvertToKebabCase, cx: &mut ViewContext) { + self.manipulate_text(cx, |text| text.to_case(Case::Kebab)) + } + + 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") + }) + } + + pub fn convert_to_lower_camel_case( + &mut self, + _: &ConvertToLowerCamelCase, + cx: &mut ViewContext, + ) { + self.manipulate_text(cx, |text| text.to_case(Case::Camel)) + } + + 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); + + let mut new_selections = Vec::new(); + let mut edits = Vec::new(); + let mut selection_adjustment = 0i32; + + for selection in self.selections.all::(cx) { + let selection_is_empty = selection.is_empty(); + + 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) + }; + + let text = buffer.text_for_range(start..end).collect::(); + let old_length = text.len() as i32; + let text = callback(&text); + + 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 + }); + + selection_adjustment += old_length - text.len() as i32; + + edits.push((start..end, text)); + } + + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); + + this.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + + this.request_autoscroll(Autoscroll::fit(), cx); + }); + } + + 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; + } + } + + // 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)); + } + + self.transact(cx, |this, cx| { + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); + + this.request_autoscroll(Autoscroll::fit(), 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, + ); + + // 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 we didn't move line(s), preserve the existing selections + new_selections.append(&mut contiguous_row_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 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, + ); + + // 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); + } + } + } + + // If we didn't move line(s), preserve the existing selections + new_selections.append(&mut contiguous_row_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 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 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 transpose_offset == 0 { + return; + } + + *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); + }); + }); + } + + 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, + }); + } + } + + 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 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(); + + 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, + }); + } + } + + 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| { + 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| { + 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| { + 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| { + 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() { + return; + } + + if matches!(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::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() { + 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); + + 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); + }); + }); + } + + 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; + } + + 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() { @@ -5917,397 +5958,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_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_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_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 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 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_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_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 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 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_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_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 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 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_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_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 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 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_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_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 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 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_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 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 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 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 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 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 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; + }); + }); - // this.select_to_beginning_of_line( - // &SelectToBeginningOfLine { - // stop_at_soft_wraps: false, - // }, - // cx, - // ); - // this.backspace(&Backspace, cx); - // }); - // } + this.select_to_beginning_of_line( + &SelectToBeginningOfLine { + stop_at_soft_wraps: false, + }, + cx, + ); + this.backspace(&Backspace, cx); + }); + } - // 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 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 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 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 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 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 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 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 move_to_start_of_paragraph( - // &mut self, - // _: &MoveToStartOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // return; - // } + pub fn move_to_start_of_paragraph( + &mut self, + _: &MoveToStartOfParagraph, + 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::start_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_action(); - // 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::end_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 select_to_start_of_paragraph( - // &mut self, - // _: &SelectToStartOfParagraph, - // cx: &mut ViewContext, - // ) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // 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_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::start_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_action(); - // 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::end_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 move_to_beginning(&mut self, _: &MoveToBeginning, cx: &mut ViewContext) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // 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.select_ranges(vec![0..0]); - // }); - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select_ranges(vec![0..0]); + }); + } - // 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 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(vec![selection]); - // }); - // } + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(vec![selection]); + }); + } - // pub fn move_to_end(&mut self, _: &MoveToEnd, cx: &mut ViewContext) { - // if matches!(self.mode, EditorMode::SingleLine) { - // cx.propagate_action(); - // return; - // } + pub fn move_to_end(&mut self, _: &MoveToEnd, cx: &mut ViewContext) { + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } - // let cursor = self.buffer.read(cx).read(cx).len(); - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select_ranges(vec![cursor..cursor]) - // }); - // } + 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 set_nav_history(&mut self, nav_history: Option) { - // self.nav_history = nav_history; - // } + 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() - // } + pub fn nav_history(&self) -> Option<&ItemNavHistory> { + self.nav_history.as_ref() + } fn push_to_nav_history( &mut self, @@ -6341,1018 +6382,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 add_selection_below(&mut self, _: &AddSelectionBelow, cx: &mut ViewContext) { - // self.add_selection(false, cx); - // } - - // 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); - // } - // } - - // if above { - // stack.reverse(); - // } - - // AddSelectionsState { above, stack } - // }); - - // 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() - // }; - - // '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); - - // start_x.min(end_x)..start_x.max(end_x) - // }; - - // while row != end_row { - // if above { - // row -= 1; - // } else { - // row += 1; - // } - - // 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); - // } - - // continue 'outer; - // } - // } - // } - - // new_selections.push(selection); - // } - // } else { - // new_selections = selections; - // new_selections.retain(|s| s.id != last_added_selection); - // state.stack.pop(); - // } - - // self.change_selections(Some(Autoscroll::fit()), cx, |s| { - // s.select(new_selections); - // }); - // if state.stack.len() > 1 { - // self.add_selections_state = Some(state); - // } - // } - - // 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()); - // }); - // } - - // 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)), - // ); - - // 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; - // } - // } - // } - - // 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; - // } - // } - - // 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_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)); - - // loop { - // self.select_next_match_internal(&display_map, action.replace_newest, None, cx)?; - - // if self - // .select_next_state - // .as_ref() - // .map(|selection_state| selection_state.done) - // .unwrap_or(true) - // { - // break; - // } - // } - - // 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_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; - // } - // } - - // 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; - // } - // } - - // 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(()) - // } - - // 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 - // } - // } - - // 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 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 - // } - // } - - // // 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; - // }; - - // selection_edit_ranges.clear(); - - // // 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 start_row > end_row { - // 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; - // } - - // 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 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 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; - // } - // } - - // drop(snapshot); - // this.buffer.update(cx, |buffer, cx| { - // buffer.edit(edits, None, cx); - // }); - - // // 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; - // } - // } - // } - // } - - // drop(snapshot); - // this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); - - // 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) - // }) - // }); - // } - // }); - // } - - // 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(); - - // 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; - // } - // } - - // 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::>(); - - // 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_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; - // } - - // 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; - // }; - - // 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; - // } - - // // Prefer smaller lengths unless best is inside and current isn't - // if length > best_length && (best_inside || !inside) { - // continue; - // } - - // 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() - // } - // }, - // ); - // } - - // if let Some(destination) = best_destination { - // selection.collapse_to(destination, SelectionGoal::None); - // } - // }) - // }); - // } - - // 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 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; - // } - - // 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 - // } - // }); - - // 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_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(); - - // 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 - // } - // } + 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 add_selection_below(&mut self, _: &AddSelectionBelow, cx: &mut ViewContext) { + self.add_selection(false, cx); + } + + 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); + } + } + + if above { + stack.reverse(); + } + + AddSelectionsState { above, stack } + }); + + 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() + }; + + '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) + }; + + while row != end_row { + if above { + row -= 1; + } else { + row += 1; + } + + 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); + } + + continue 'outer; + } + } + } + + new_selections.push(selection); + } + } else { + new_selections = selections; + new_selections.retain(|s| s.id != last_added_selection); + state.stack.pop(); + } + + self.change_selections(Some(Autoscroll::fit()), cx, |s| { + s.select(new_selections); + }); + if state.stack.len() > 1 { + self.add_selections_state = Some(state); + } + } + + 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()); + }); + } + + 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)), + ); + + 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; + } + } + } + + 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; + } + } + + 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_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)); + + loop { + self.select_next_match_internal(&display_map, action.replace_newest, None, cx)?; + + if self + .select_next_state + .as_ref() + .map(|selection_state| selection_state.done) + .unwrap_or(true) + { + break; + } + } + + 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_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; + } + } + + 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; + } + } + + 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(()) + } + + 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 + } + } + + 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 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 + } + } + + // 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; + }; + + selection_edit_ranges.clear(); + + // 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 start_row > end_row { + 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; + } + + 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 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 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; + } + } + + drop(snapshot); + this.buffer.update(cx, |buffer, cx| { + buffer.edit(edits, None, cx); + }); + + // 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; + } + } + } + } + + drop(snapshot); + this.change_selections(Some(Autoscroll::fit()), cx, |s| s.select(selections)); + + 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) + }) + }); + } + }); + } + + 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(); + + 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; + } + } + + 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::>(); + + 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_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; + } + + 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; + }; + + 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; + } + + // Prefer smaller lengths unless best is inside and current isn't + if length > best_length && (best_inside || !inside) { + continue; + } + + 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() + } + }, + ); + } + + if let Some(destination) = best_destination { + selection.collapse_to(destination, SelectionGoal::None); + } + }) + }); + } + + 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 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; + } + + 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 + } + }); + + 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_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(); + + 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 + } + } pub fn go_to_definition(&mut self, _: &GoToDefinition, cx: &mut ViewContext) { self.go_to_definition_of_kind(GotoDefinitionKind::Symbol, false, cx); @@ -7690,139 +7732,138 @@ impl Editor { } } - // pub fn rename(&mut self, _: &Rename, cx: &mut ViewContext) -> Option>> { - // use language::ToOffset as _; + // 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 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); + + // 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; + // } + // 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 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); - - // 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))); - // } - // 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, - // }); - // })?; - // } - - // Ok(()) - // })) - // } + // Ok(()) + // })) + // } // pub fn confirm_rename( // workspace: &mut Workspace, @@ -7911,14 +7952,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, @@ -7955,19 +7996,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() { @@ -7997,87 +8038,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 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(); + 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() - // } + 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 { @@ -8099,15 +8140,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( @@ -8115,118 +8155,117 @@ 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"); - // } + 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 - // } + cx.emit(Event::Edited); + Some(tx_id) + } else { + None + } } - // 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, @@ -8265,42 +8304,40 @@ impl Editor { } } - // 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, - // 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, @@ -8316,37 +8353,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 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![]; @@ -8394,64 +8431,64 @@ 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; - // } + 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, @@ -8464,225 +8501,225 @@ 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, - // 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, - // 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, - // 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, - // 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, - // 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 @@ -8693,9 +8730,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: &WindowContext) -> bool { + self.blink_manager.read(cx).visible() && self.focus_handle.is_focused(cx) + } fn on_buffer_changed(&mut self, _: Model, cx: &mut ViewContext) { cx.notify(); @@ -8809,14 +8846,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; // } @@ -8899,43 +8936,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, @@ -9020,136 +9057,144 @@ 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 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 chunks = snapshot.chunks(range, true); + let mut lines = Vec::new(); + let mut line: VecDeque = VecDeque::new(); - // let theme = &theme::current(cx).editor.syntax; + let Some(style) = self.style.as_ref() else { + return; + }; - // 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; - // } - // } + 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; + } + } - // if !merged_with_last_token { - // line.push_back(Chunk { - // text: text.into(), - // highlight, - // }); - // } + if !merged_with_last_token { + line.push_back(Chunk { + text: text.into(), + highlight, + }); + } - // 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(); - // } + 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(); + } - // lines.push(mem::take(&mut line)); - // } - // } - // } + lines.push(mem::take(&mut line)); + } + } + } - // let Some(lines) = serde_json::to_string_pretty(&lines).log_err() else { - // return; - // }; - // cx.write_to_clipboard(ClipboardItem::new(lines)); - // } + let Some(lines) = serde_json::to_string_pretty(&lines).log_err() else { + return; + }; + cx.write_to_clipboard(ClipboardItem::new(lines)); + } - // pub fn inlay_hint_cache(&self) -> &InlayHintCache { - // &self.inlay_hint_cache - // } + 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); - // }); - // } + 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); - // } + 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); + 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 - // } + 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 focus(&self, cx: &mut WindowContext) { + cx.focus(&self.focus_handle) + } } pub trait CollaborationHub { @@ -9325,10 +9370,24 @@ 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: relative(settings.buffer_line_height.value()), + underline: None, + }; EditorElement::new(EditorStyle { - text: cx.text_style(), - line_height_scalar: 1., - theme_id: 0, + background: cx.theme().colors().editor_background, + local_player: cx.theme().players().local(), + text: text_style, + scrollbar_width: px(12.), + syntax: cx.theme().syntax().clone(), + diagnostic_style: cx.theme().diagnostic_style(), }) } } @@ -9433,252 +9492,228 @@ 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 => {} -// } -// } +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(), + ) + } -// for layer in self.keymap_context_layers.values() { -// keymap.extend(layer); -// } + 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 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()); -// } -// } + let range = self.selections.newest::(cx).range(); + Some(range.start.0..range.end.0) + } -// 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 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 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; -// } + fn unmark_text(&mut self, cx: &mut ViewContext) { + self.clear_highlights::(cx); + self.ime_transaction.take(); + } -// let range = self.selections.newest::(cx).range(); -// Some(range.start.0..range.end.0) -// } + 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; + } -// 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) -// } + 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) + }; -// fn unmark_text(&mut self, cx: &mut ViewContext) { -// self.clear_highlights::(cx); -// self.ime_transaction.take(); -// } + 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 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; -// } + cx.emit(Event::InputHandled { + utf16_range_to_replace: range_to_replace, + text: text.into(), + }); -// 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) -// }; + if let Some(new_selected_ranges) = new_selected_ranges { + this.change_selections(None, cx, |selections| { + selections.select_ranges(new_selected_ranges) + }); + } -// 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 -// } -// }) -// }); + this.handle_input(text, cx); + }); -// cx.emit(Event::InputHandled { -// utf16_range_to_replace: range_to_replace, -// text: text.into(), -// }); + if let Some(transaction) = self.ime_transaction { + self.buffer.update(cx, |buffer, cx| { + buffer.group_until_transaction(transaction, cx); + }); + } -// if let Some(new_selected_ranges) = new_selected_ranges { -// this.change_selections(None, cx, |selections| { -// selections.select_ranges(new_selected_ranges) -// }); -// } + self.unmark_text(cx); + } -// this.handle_input(text, cx); -// }); + 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(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 + }; -// self.unmark_text(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 + } + }) + }); -// 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; -// } + cx.emit(Event::InputHandled { + utf16_range_to_replace: range_to_replace, + text: text.into(), + }); -// 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(ranges) = ranges_to_replace { + this.change_selections(None, cx, |s| s.select_ranges(ranges)); + } -// 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 -// } -// }) -// }); + 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::>() + }; -// cx.emit(Event::InputHandled { -// utf16_range_to_replace: range_to_replace, -// text: text.into(), -// }); + if text.is_empty() { + this.unmark_text(cx); + } else { + this.highlight_text::( + marked_ranges.clone(), + HighlightStyle::default(), // todo!() this.style(cx).composition_mark, + cx, + ); + } -// if let Some(ranges) = ranges_to_replace { -// this.change_selections(None, cx, |s| s.select_ranges(ranges)); -// } + this.handle_input(text, cx); -// 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 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::>(); -// if text.is_empty() { -// this.unmark_text(cx); -// } else { -// this.highlight_text::( -// marked_ranges.clone(), -// this.style(cx).composition_mark, -// cx, -// ); -// } + drop(snapshot); + this.change_selections(None, cx, |selections| { + selections.select_ranges(new_selected_ranges) + }); + } + }); -// this.handle_input(text, 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 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::>(); + if self.text_highlights::(cx).is_none() { + self.ime_transaction.take(); + } + } -// 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( + &self, + range_utf16: Range, + cx: &mut ViewContext, + ) -> Option> { + // todo!() + // See how we did it before: `rect_for_range` + None + } +} // fn build_style( // settings: &ThemeSettings, @@ -9951,23 +9986,23 @@ 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, + style: &DiagnosticStyle, +) -> Hsla { + match (severity, valid) { + (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, + } +} // 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 6420d1e6cd..04b8494a88 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -1,20 +1,46 @@ -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, HighlightedChunk, ToDisplayPoint}, + editor_settings::ShowScrollbar, + git::{diff_hunk_to_display, DisplayDiffHunk}, + hover_popover::hover_at, + link_go_to_definition::{ + 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, + HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, SelectPhase, + 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, + 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, MouseUpEvent, Pixels, + ScrollWheelEvent, ShapedGlyph, Size, Style, TextRun, TextStyle, TextSystem, ViewContext, + WindowContext, }; -use language::{CursorShape, Selection}; +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::{cmp, ops::Range, sync::Arc}; +use std::{ + any::TypeId, + borrow::Cow, + cmp::{self, Ordering}, + fmt::Write, + iter, + ops::Range, + sync::Arc, +}; use sum_tree::Bias; -use theme::ActiveTheme; +use theme::{ActiveTheme, PlayerColor}; +use util::ResultExt; +use workspace::item::Item; enum FoldMarkers {} @@ -79,204 +105,62 @@ 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( - // 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; - // } + 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; - // 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() - // } - // } - // }), - // ); + 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; + } - // 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, - // ); - // }, - // ), - // ) - // } + 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, + ); + } - // 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; - // } - - // 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, - // ); - // } - - // true - // } + true + } // fn mouse_right_down( // editor: &mut Editor, @@ -298,746 +182,731 @@ 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(); - - // 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); - // } - - // return true; - // } - - // 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, - // 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); - // } - - // 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; - // } - - // let line_height = position_map.line_height; - // let max_glyph_width = position_map.em_width; - - // let axis = if precise { - // //Trackpad - // position_map.snapshot.ongoing_scroll.filter(&mut delta) - // } else { - // //Not trackpad - // delta *= vec2f(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); - // 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(), - // }); - - // 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 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(), - // }); - // } - - // 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; - - // 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(), - // }); - // } - // } - // } - - // 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() - // + vec2f( - // 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 = vec2f( - // bounds.width() - layout.gutter_padding, - // ix as f32 * line_height - (scroll_top % line_height), - // ); - // let centering_offset = vec2f( - // (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() + vec2f(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() + vec2f(-width, start_y); - // let highlight_size = vec2f(width * 2., end_y - start_y); - // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - - // cx.scene().push_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; - - // 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() + vec2f(-width, start_y); - // let highlight_size = vec2f(width * 2., end_y - start_y); - // let highlight_bounds = Bounds::new(highlight_origin, highlight_size); - - // cx.scene().push_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 start_row = display_row_range.start; - // let end_row = display_row_range.end; - - // let start_y = start_row as f32 * line_height - scroll_top; - // 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_bounds = Bounds::new(highlight_origin, highlight_size); - - // cx.scene().push_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(), - // }); - // } - // } - - // 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() + vec2f(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; - - // cx.scene().push_layer(Some(bounds)); - - // cx.scene().push_cursor_region(CursorRegion { - // bounds, - // style: if !editor.link_go_to_definition_state.definitions.is_empty() { - // CursorStyle::PointingHand - // } else { - // CursorStyle::IBeam - // }, - // }); - - // 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, - // 0., - // 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( - // 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 - // }; - - // 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(vec2f( - // 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), - // line_height: layout.position_map.line_height, - // shape: selection.cursor_shape, - // block_text, - // }); - // } - // } - // } - // } - - // 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.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 + vec2f(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(), vec2f(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 + vec2f(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 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(), vec2f(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 = vec2f(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(), vec2f(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_layer(); - // } - - // fn scrollbar_left(&self, bounds: &Bounds) -> f32 { - // bounds.max_x() - self.style.theme.scrollbar.width - // } + 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 !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; + } + + end_selection + } + + fn mouse_moved( + editor: &mut Editor, + event: &MouseMoveEvent, + position_map: &PositionMap, + text_bounds: Bounds, + gutter_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, + ); + } + + 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_hovered { + 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)), + modifiers.command, + modifiers.shift, + cx, + ); + hover_at(editor, Some(point), cx); + } + None => { + update_inlay_link_and_hover_points( + &position_map.snapshot, + point_for_position, + editor, + modifiers.command, + modifiers.shift, + cx, + ); + } + } + + true + } else { + update_go_to_definition_link(editor, None, modifiers.command, modifiers.shift, cx); + hover_at(editor, None, cx); + gutter_hovered + } + } + + 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 (delta, axis) = match event.delta { + gpui::ScrollDelta::Pixels(mut pixels) => { + //Trackpad + let axis = position_map.snapshot.ongoing_scroll.filter(&mut pixels); + (pixels, axis) + } + + 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 = 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 + } + + 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_background; + 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 !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_background; + 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 = 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_background; + 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; + + 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; + } + + 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, + bounds: Bounds, + layout: &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!( + ProjectSettings::get_global(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.size.width - line.width - layout.gutter_padding, + ix as f32 * line_height - (scroll_top % line_height), + ); + + line.paint(line_origin, line_height, cx); + } + } + + // 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 indicator_origin = bounds.origin + position + centering_offset; + + // indicator.paint(indicator_origin, visible_bounds, editor, cx); + // } + // } + + // 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); + // } + } + + fn paint_diff_hunks( + bounds: Bounds, + layout: &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; + // } + + // 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 start_row = display_row_range.start; + // let end_row = display_row_range.end; + + // let start_y = start_row as f32 * line_height - scroll_top; + // let end_y = end_row as f32 * line_height - scroll_top; + + // 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); + + // 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(), + // }); + // } + } + + fn paint_text( + &mut self, + bounds: Bounds, + layout: &LayoutState, + editor: &mut Editor, + cx: &mut ViewContext, + ) { + 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; + + 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, + ); + } + + 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 == 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, + ) + } + + 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 { + bounds.upper_right().x - self.style.scrollbar_width + } // fn paint_scrollbar( // &mut self, @@ -1053,9 +922,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); @@ -1077,11 +946,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, @@ -1092,7 +961,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., @@ -1109,9 +978,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(), @@ -1153,7 +1022,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, @@ -1171,7 +1040,7 @@ impl EditorElement { // left: true, // }; - // cx.scene().push_quad(Quad { + // cx.paint_quad(Quad { // bounds, // background: Some(color), // border: border.into(), @@ -1180,7 +1049,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, @@ -1203,7 +1072,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 @@ -1222,12 +1091,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); @@ -1237,65 +1106,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, @@ -1306,17 +1175,17 @@ 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() - // + vec2f( + // let mut origin = bounds.origin + // + 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); // } @@ -1324,7 +1193,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( @@ -1350,215 +1219,735 @@ 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; + 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; + 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() - // } + 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, - // 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 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 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 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 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()); + 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 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, &[run], None) + .unwrap() + .pop() + .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, - // 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); + // When the editor is empty and unfocused, then show the placeholder. + 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 + .as_ref() + .map_or("", AsRef::as_ref) + .split('\n') + .skip(rows.start as usize) + .chain(iter::repeat("")) + .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, font_size, &[run], None) + .unwrap() + .pop() + .unwrap() + }) + .map(|line| LineWithInvisibles { + line, + invisibles: Vec::new(), + }) + .collect() + } else { + let chunks = snapshot.highlighted_chunks(rows.clone(), true, &self.style); + LineWithInvisibles::from_chunks( + chunks, + &self.style.text, + MAX_LINE_LEN, + rows.len() as usize, + line_number_layouts, + snapshot.mode, + cx, + ) + } + } - // 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, - // ) - // } - // } + fn compute_layout( + &mut self, + editor: &mut Editor, + cx: &mut ViewContext<'_, Editor>, + mut 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"); + // } + + 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.to_pixels(cx.rem_size()); + 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') + .unwrap() + .size + .width; + let em_advance = cx + .text_system() + .advance(font_id, font_size, 'm') + .unwrap() + .width; + + 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 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 = Pixels::ZERO; + gutter_width = Pixels::ZERO; + gutter_margin = Pixels::ZERO; + }; + + 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 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), + }; + + if editor.set_wrap_width(Some(wrap_width), cx) { + editor.snapshot(cx) + } else { + snapshot + } + }; + + 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") + 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 { + bounds.size.height = line_height.min(bounds.size.height); + } + // 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(); + + // 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 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 = 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, + ); + + 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 + }; + + 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); + // } + + // 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; + // 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; + + // todo!("fold_indicators") + // let mut fold_indicators = editor.render_fold_indicators( + // fold_statuses, + // &style, + // editor.gutter_hovered, + // line_height, + // gutter_margin, + // cx, + // ); + + // 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, + // ); + // } + + // 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, + // ); + // } + + // 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, + // ); + // } + // } + + // 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, + // ); + // } + // } + + 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( @@ -1578,7 +1967,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 { @@ -1690,9 +2079,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() @@ -1734,8 +2123,8 @@ impl EditorElement { // element.layout( // SizeConstraint { - // min: gpui::Point::zero(), - // max: vec2f(width, block.height() as f32 * line_height), + // min: gpui::Point::::zero(), + // max: point(width, block.height() as f32 * line_height), // }, // editor, // cx, @@ -1748,7 +2137,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, @@ -1780,6 +2169,79 @@ impl EditorElement { // blocks, // ) // } + + fn paint_mouse_listeners( + &mut self, + bounds: Bounds, + gutter_bounds: Bounds, + text_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: &MouseDownEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + 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: &MouseUpEvent, phase, cx| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_up(editor, event, &position_map, text_bounds, cx) { + cx.stop_propagation() + } + } + }); + // 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| { + if phase != DispatchPhase::Bubble { + return; + } + + if Self::mouse_moved(editor, event, &position_map, text_bounds, gutter_bounds, cx) { + cx.stop_propagation() + } + } + }); + } } #[derive(Debug)] @@ -1788,194 +2250,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(), -// }); +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.to_pixels(cx.rem_size()); -// line.clear(); -// styles.clear(); -// row += 1; -// line_exceeded_max_len = false; -// non_whitespace_added = false; -// if row == max_line_count { -// return layouts; -// } -// } + 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(), + }); -// 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) -// }; + line.clear(); + styles.clear(); + row += 1; + line_exceeded_max_len = false; + non_whitespace_added = false; + if row == max_line_count { + return layouts; + } + } -// 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; -// } + 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) + }; -// styles.push(( -// line_chunk.len(), -// RunStyle { -// font_id: text_style.font_id, -// color: text_style.color, -// underline: text_style.underline, -// }, -// )); + 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; + } -// 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, -// }), -// ) -// } -// } + styles.push(TextRun { + len: line_chunk.len(), + font: text_style.font(), + color: text_style.color, + underline: text_style.underline, + }); -// line.push_str(line_chunk); -// } -// } -// } + 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, + }), + ) + } + } -// layouts -// } + line.push_str(line_chunk); + } + } + } -// 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; + layouts + } -// self.line.paint( -// content_origin + vec2f(-scroll_left, line_y), -// visible_text_bounds, -// line_height, -// cx, -// ); + fn draw( + &self, + layout: &LayoutState, + row: u32, + scroll_top: Pixels, + content_origin: gpui::Point, + scroll_left: Pixels, + 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.draw_invisibles( -// &selection_ranges, -// layout, -// content_origin, -// scroll_left, -// line_y, -// row, -// visible_bounds, -// line_height, -// whitespace_setting, -// cx, -// ); -// } + self.line.paint( + content_origin + gpui::point(-scroll_left, line_y), + line_height, + cx, + ); -// 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, -// }; + self.draw_invisibles( + &selection_ranges, + layout, + content_origin, + scroll_left, + line_y, + row, + 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: 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, + }; -// 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(Pixels::ZERO) / 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); + if !allowed_regions + .iter() + .any(|region| region.start <= invisible_point && invisible_point < region.end) + { + continue; + } + } + invisible_symbol.paint(origin, line_height, cx); + } + } +} #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum Invisible { @@ -1992,23 +2452,36 @@ impl Element for EditorElement { fn initialize( &mut self, - view_state: &mut Editor, + editor: &mut Editor, 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_listeners(global_id), |cx| { + cx.with_focus(editor.focus_handle.clone(), |_| {}) + }); + }) + }); } fn layout( &mut self, - view_state: &mut Editor, + editor: &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(); + 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) } @@ -2019,121 +2492,34 @@ impl Element for EditorElement { 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 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 gutter_padding; - let gutter_width; - let gutter_margin; - if snapshot.show_gutter { - let descent = cx.text_system().descent(font_id, font_size).unwrap(); - - 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 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, }; - let text_width = bounds.size.width - gutter_width; - let overscroll = point(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 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), - }; - - if editor.set_wrap_width(Some(wrap_width), cx) { - editor.snapshot(cx) - } else { - snapshot - } - }; - - 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 editor.focus_handle.is_focused(cx) { + cx.handle_text_input(); } - // 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(); - - // 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 line_height = text_style - // .line_height - // .to_pixels(text_style.font_size.into(), cx.rem_size()); - - // layout_text.unwrap()[0] - // .paint(bounds.origin, line_height, cx) - // .unwrap(); + 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); + } + self.paint_text(text_bounds, &layout, editor, cx); + }); } } @@ -2148,7 +2534,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"); // } @@ -2171,14 +2557,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 = vec2f(em_width, 0.); +// 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, @@ -2209,25 +2595,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 = 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 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, // ); @@ -2239,7 +2625,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 @@ -2367,7 +2753,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() // } @@ -2415,7 +2801,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 = @@ -2434,12 +2820,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, @@ -2452,17 +2838,17 @@ impl Element for EditorElement { // cx, // ); -// let scroll_max = vec2f( -// ((scroll_width - text_size.x()) / em_width).max(0.0), +// let scroll_max = point( +// ((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, @@ -2520,10 +2906,10 @@ impl Element for EditorElement { // 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.), +// min: gpui::Point::::zero(), +// max: point( +// cx.window_size().x * 0.7, +// (12. * line_height).min((size.y - line_height) / 2.), // ), // }, // editor, @@ -2559,13 +2945,13 @@ impl Element for EditorElement { // for hover_popover in hover_popovers.iter_mut() { // hover_popover.layout( // SizeConstraint { -// min: gpui::Point::zero(), -// max: vec2f( +// 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 // ), // }, @@ -2642,9 +3028,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() + vec2f(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, // ); @@ -2659,13 +3045,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); @@ -2683,15 +3069,15 @@ impl Element for EditorElement { // _: &Editor, // _: &ViewContext, // ) -> Option> { -// let text_bounds = Bounds::new( -// bounds.origin() + vec2f(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() + 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; -// 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); @@ -2706,14 +3092,14 @@ 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 -// + 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, // ), @@ -2737,39 +3123,39 @@ 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: Size, + gutter_padding: Pixels, + gutter_margin: Pixels, + text_size: gpui::Size, + mode: EditorMode, + 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, + 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, line_height: Pixels, - scroll_max: Size, + scroll_max: gpui::Point, em_width: Pixels, em_advance: Pixels, line_layouts: Vec, @@ -2824,7 +3210,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) @@ -2834,7 +3220,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, @@ -2855,9 +3241,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 { @@ -2869,17 +3254,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.to_pixels(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)] @@ -2893,69 +3282,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(Pixels::ZERO, 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)] @@ -2969,130 +3365,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( @@ -3120,39 +3515,39 @@ 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( -// 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), +// 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), // )) // } // 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)] @@ -3250,7 +3645,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, // ) @@ -3334,7 +3729,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, // ) @@ -3380,7 +3775,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, @@ -3393,7 +3788,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, // ) @@ -3410,7 +3805,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); // }); @@ -3478,7 +3873,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:?}"); // } // } @@ -3551,7 +3946,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:?}" // ); @@ -3581,7 +3976,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, // ) @@ -3597,3 +3992,205 @@ fn scale_horizontal_mouse_autoscroll_delta(delta: f32) -> f32 { // .collect() // } // } + +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::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, + &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/highlight_matching_bracket.rs b/crates/editor2/src/highlight_matching_bracket.rs index fd8fb6b097..d7fd37745f 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/hover_popover.rs b/crates/editor2/src/hover_popover.rs index 9eddd259af..5c8f403d4f 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(); @@ -325,23 +324,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>(()) diff --git a/crates/editor2/src/items.rs b/crates/editor2/src/items.rs index a4d34ad36f..9c49e5f143 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::{ @@ -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(); @@ -779,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/editor2/src/link_go_to_definition.rs b/crates/editor2/src/link_go_to_definition.rs index 8c285c8214..d36762f395 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 { @@ -581,7 +578,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/editor2/src/movement.rs b/crates/editor2/src/movement.rs index 962f4f60e6..b28af681e0 100644 --- a/crates/editor2/src/movement.rs +++ b/crates/editor2/src/movement.rs @@ -1,9 +1,9 @@ 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; +use std::{ops::Range, sync::Arc}; #[derive(Debug, PartialEq)] pub enum FindRange { @@ -14,8 +14,9 @@ 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, + pub rem_size: Pixels, } pub fn left(map: &DisplaySnapshot, mut point: DisplayPoint) -> DisplayPoint { diff --git a/crates/editor2/src/scroll.rs b/crates/editor2/src/scroll.rs index 1876952ae2..52e7498f97 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,10 +348,10 @@ 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)); + self.scroll_manager.anchor.scroll_position(&display_map) + } pub fn set_scroll_anchor(&mut self, scroll_anchor: ScrollAnchor, cx: &mut ViewContext) { hide_hover(self, cx); @@ -380,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; - // } + 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; - // } + 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); - // } + 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); + /// 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 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; - // } - // } + 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 - // } + 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 ba39d3849b..9a1e54f5e4 100644 --- a/crates/editor2/src/scroll/actions.rs +++ b/crates/editor2/src/scroll/actions.rs @@ -1,148 +1,103 @@ -use gpui::AppContext; +use super::Axis; +use crate::{ + Autoscroll, Bias, Editor, EditorMode, NextScreen, ScrollAnchor, ScrollCursorBottom, + ScrollCursorCenter, ScrollCursorTop, +}; +use gpui::{actions, AppContext, Point, ViewContext}; -// actions!( -// editor, -// [ -// LineDown, -// LineUp, -// HalfPageDown, -// HalfPageUp, -// PageDown, -// PageUp, -// NextScreen, -// ScrollCursorTop, -// ScrollCursorCenter, -// ScrollCursorBottom, -// ] -// ); +impl Editor { + pub fn next_screen(&mut self, _: &NextScreen, cx: &mut ViewContext) { + if self.take_rename(true, cx).is_some() { + return; + } -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) - // }); + // todo!() + // if self.mouse_context_menu.read(cx).visible() { + // return None; + // } + + if matches!(self.mode, EditorMode::SingleLine) { + cx.propagate(); + return; + } + self.request_autoscroll(Autoscroll::Next, 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); + } + + 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 = 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); + + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } + + 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 = 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); + + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } + + 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 = 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); + + self.set_scroll_anchor( + ScrollAnchor { + anchor: new_anchor, + offset: Default::default(), + }, + cx, + ) + } } - -// 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 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); -// } - -// 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); - -// 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; -// }; - -// 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, -// ) -// } - -// 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); - -// editor.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 2762fd369e..23c5a75809 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); + 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 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); + 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 - // } - // } + 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/go_to_line2/Cargo.toml b/crates/go_to_line2/Cargo.toml new file mode 100644 index 0000000000..66fb3b68ff --- /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 0000000000..b8b91b1646 --- /dev/null +++ b/crates/go_to_line2/src/go_to_line.rs @@ -0,0 +1,221 @@ +use gpui::{actions, div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext}; +use workspace::ModalRegistry; + +actions!(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/action.rs b/crates/gpui2/src/action.rs index 84843c9876..4d89ba1826 100644 --- a/crates/gpui2/src/action.rs +++ b/crates/gpui2/src/action.rs @@ -1,10 +1,55 @@ use crate::SharedString; use anyhow::{anyhow, Context, Result}; use collections::{HashMap, HashSet}; +use lazy_static::lazy_static; +use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard}; use serde::Deserialize; use std::any::{type_name, Any}; -pub trait Action: 'static { +/// 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 Self: Sized; @@ -17,12 +62,14 @@ pub trait Action: '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 + '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> @@ -53,6 +100,61 @@ where } } +type ActionBuilder = fn(json: Option) -> anyhow::Result>; + +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() { + 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_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() + }) +} + +/// 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 { + () => {}; + + ( $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, $($rest:tt)* ) => { + actions!($name); + actions!($($rest)*); + }; +} + #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct DispatchContext { set: HashSet, @@ -290,8 +392,28 @@ fn skip_whitespace(source: &str) -> &str { #[cfg(test)] mod tests { use super::*; + use crate as gpui; use DispatchContextPredicate::*; + #[test] + fn test_actions_definition() { + { + actions!(A, B, C, D, E, F, G); + } + + { + actions!( + A, + B, + 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/app.rs b/crates/gpui2/src/app.rs index e016c193f2..0cec0fd0da 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, EventEmitter, 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, + LayoutId, 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}; @@ -144,7 +144,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>; @@ -158,7 +157,7 @@ type ReleaseListener = Box; // } pub struct AppContext { - this: Weak, + pub(crate) this: Weak, pub(crate) platform: Rc, app_metadata: AppMetadata, text_system: Arc, @@ -180,7 +179,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, @@ -238,7 +236,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(), @@ -755,13 +752,17 @@ impl AppContext { self.globals_by_type.insert(global_type, Box::new(global)); } + #[track_caller] pub fn clear_globals(&mut self) { + dbg!(core::panic::Location::caller()); //todo!(notify globals?) self.globals_by_type.drain(); } /// Set the value of the global of the given type. + #[track_caller] pub fn remove_global(&mut self) -> G { + dbg!(core::panic::Location::caller()); let global_type = TypeId::of::(); //todo!(notify globals?) *self @@ -795,10 +796,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( @@ -861,29 +858,21 @@ 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) - } - - /// 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/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rs index ed04af8d68..1ae9aec9b5 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/app/test_context.rs b/crates/gpui2/src/app/test_context.rs index 1ee48b4354..eb5ce283a5 100644 --- a/crates/gpui2/src/app/test_context.rs +++ b/crates/gpui2/src/app/test_context.rs @@ -1,7 +1,8 @@ use crate::{ AnyView, AnyWindowHandle, AppCell, AppContext, AsyncAppContext, BackgroundExecutor, Context, - EventEmitter, ForegroundExecutor, Model, ModelContext, Render, Result, Task, TestDispatcher, - TestPlatform, ViewContext, VisualContext, WindowContext, WindowHandle, WindowOptions, + EventEmitter, ForegroundExecutor, InputEvent, KeyDownEvent, Keystroke, Model, ModelContext, + Render, Result, Task, TestDispatcher, TestPlatform, ViewContext, VisualContext, WindowContext, + WindowHandle, WindowOptions, }; use anyhow::{anyhow, bail}; use futures::{Stream, StreamExt}; @@ -161,6 +162,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/color.rs b/crates/gpui2/src/color.rs index db07259476..3ae247962b 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., @@ -194,6 +203,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/element.rs b/crates/gpui2/src/element.rs index 2a0f557272..8fdc17de07 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/elements.rs b/crates/gpui2/src/elements.rs index 83c27b8a3b..eb061f7d34 100644 --- a/crates/gpui2/src/elements.rs +++ b/crates/gpui2/src/elements.rs @@ -2,8 +2,10 @@ mod div; mod img; mod svg; mod text; +mod uniform_list; pub use div::*; pub use img::*; pub use svg::*; pub use text::*; +pub use uniform_list::*; diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rs index e011041bae..9b8c9dbf85 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()) } @@ -209,15 +213,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.interactivity.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 } @@ -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 a35436d74e..638665d414 100644 --- a/crates/gpui2/src/elements/img.rs +++ b/crates/gpui2/src/elements/img.rs @@ -1,15 +1,15 @@ 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, @@ -17,7 +17,7 @@ pub struct Img< grayscale: bool, } -pub fn img() -> Img, FocusDisabled> { +pub fn img() -> Img, FocusDisabled> { Img { base: div(), uri: None, @@ -28,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 { @@ -42,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, @@ -57,7 +57,7 @@ where impl Component for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn render(self) -> AnyElement { @@ -67,7 +67,7 @@ where impl Element for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { type ElementState = DivState; @@ -101,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); }); @@ -118,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() }); @@ -136,7 +136,7 @@ where impl Styled for Img where - I: ElementInteraction, + I: ElementInteractivity, F: ElementFocus, { fn style(&mut self) -> &mut StyleRefinement { @@ -146,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/svg.rs b/crates/gpui2/src/elements/svg.rs index 7db4c5cf6d..8e2ba9d8a1 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/elements/text.rs b/crates/gpui2/src/elements/text.rs index 4bc3705490..e258d3e7dc 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()); @@ -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/elements/uniform_list.rs b/crates/gpui2/src/elements/uniform_list.rs new file mode 100644 index 0000000000..d43c6b5992 --- /dev/null +++ b/crates/gpui2/src/elements/uniform_list.rs @@ -0,0 +1,244 @@ +use crate::{ + point, px, AnyElement, AvailableSpace, BorrowWindow, Bounds, Component, Element, ElementId, + 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, sync::Arc}; +use taffy::style::Overflow; + +pub fn uniform_list( + id: Id, + item_count: usize, + f: impl 'static + Fn(&mut V, Range, &mut ViewContext) -> SmallVec<[C; 64]>, +) -> UniformList +where + Id: Into, + V: 'static, + C: Component, +{ + let id = id.into(); + UniformList { + id: id.clone(), + style: Default::default(), + item_count, + render_items: Box::new(move |view, visible_range, cx| { + f(view, visible_range, cx) + .into_iter() + .map(|component| component.render()) + .collect() + }), + interactivity: id.into(), + scroll_handle: None, + } +} + +pub struct UniformList { + id: ElementId, + style: StyleRefinement, + item_count: usize, + render_items: Box< + dyn for<'a> Fn( + &'a mut V, + Range, + &'a mut ViewContext, + ) -> SmallVec<[AnyElement; 64]>, + >, + interactivity: StatefulInteractivity, + scroll_handle: Option, +} + +#[derive(Clone)] +pub struct UniformListScrollHandle(Arc>>); + +#[derive(Clone, Debug)] +struct ScrollHandleState { + item_height: Pixels, + list_height: Pixels, + scroll_offset: Arc>>, +} + +impl UniformListScrollHandle { + 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); + } + } + } +} + +impl Styled for UniformList { + fn style(&mut self) -> &mut StyleRefinement { + &mut self.style + } +} + +impl Element for UniformList { + type ElementState = InteractiveElementState; + + fn id(&self) -> Option { + Some(self.id.clone()) + } + + fn initialize( + &mut self, + _: &mut V, + element_state: Option, + _: &mut ViewContext, + ) -> Self::ElementState { + element_state.unwrap_or_default() + } + + fn layout( + &mut self, + _view_state: &mut V, + _element_state: &mut Self::ElementState, + cx: &mut ViewContext, + ) -> LayoutId { + cx.request_layout(&self.computed_style(), None) + } + + fn paint( + &mut self, + bounds: crate::Bounds, + view_state: &mut V, + element_state: &mut Self::ElementState, + 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), + ); + + 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); + if let Some(scroll_handle) = self.scroll_handle.clone() { + scroll_handle.0.lock().replace(ScrollHandleState { + item_height, + list_height: padded_bounds.size.height, + scroll_offset: element_state.track_scroll_offset(), + }); + } + 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); + 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.), + }; + } + + let overflow = point(style.overflow.x, Overflow::Scroll); + + cx.with_z_index(0, |cx| { + self.interactivity + .paint(bounds, content_size, overflow, element_state, cx); + }); + }) + } +} + +impl UniformList { + 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 + } + + pub fn track_scroll(mut self, handle: UniformListScrollHandle) -> Self { + self.scroll_handle = Some(handle); + self + } +} + +impl StatelessInteractive for UniformList { + fn stateless_interactivity(&mut self) -> &mut StatelessInteractivity { + self.interactivity.as_stateless_mut() + } +} + +impl StatefulInteractive for UniformList { + fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity { + &mut self.interactivity + } +} + +impl Component for UniformList { + fn render(self) -> AnyElement { + AnyElement::new(self) + } +} diff --git a/crates/gpui2/src/executor.rs b/crates/gpui2/src/executor.rs index 4e434da8cc..32deb3725e 100644 --- a/crates/gpui2/src/executor.rs +++ b/crates/gpui2/src/executor.rs @@ -71,7 +71,8 @@ impl Future for Task { } } } - +type AnyLocalFuture = Pin>>; +type AnyFuture = Pin>>; impl BackgroundExecutor { pub fn new(dispatcher: Arc) -> Self { Self { dispatcher } @@ -84,10 +85,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"))] @@ -251,11 +258,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)) } } diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rs index d6755a5397..c5209239ae 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()), @@ -120,6 +124,10 @@ where }, } } + + pub fn clamp(&self, min: &Self, max: &Self) -> Self { + self.max(min).min(max) + } } impl Clone for Point { @@ -259,6 +267,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 { @@ -492,6 +518,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, @@ -541,6 +576,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 +716,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); } } @@ -730,16 +774,9 @@ 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 { - 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/gpui2.rs b/crates/gpui2/src/gpui2.rs index 2563d508ae..e253872ed4 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; @@ -23,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. @@ -35,6 +37,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::*; @@ -63,6 +66,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/interactive.rs b/crates/gpui2/src/interactive.rs index da208b3813..308c39fe7f 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 } - fn on_action( + /// Capture the given action, fires during the capture phase + fn capture_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::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, &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::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, @@ -397,9 +422,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(); @@ -735,11 +761,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 +774,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 +809,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 +823,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(), @@ -875,9 +901,15 @@ 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 StatelessInteraction { +impl Default for StatelessInteractivity { fn default() -> Self { Self { dispatch_context: DispatchContext::default(), @@ -895,20 +927,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 } } @@ -1230,3 +1262,70 @@ pub type KeyListener = Box< ) -> Option> + 'static, >; + +#[cfg(test)] +mod test { + use crate::{ + self as gpui, div, Div, FocusHandle, KeyBinding, Keystroke, ParentElement, Render, + StatefulInteractivity, StatelessInteractive, TestAppContext, VisualContext, + }; + + struct TestView { + saw_key_down: bool, + saw_action: bool, + focus_handle: FocusHandle, + } + + actions!(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(); + } +} diff --git a/crates/gpui2/src/platform/mac/metal_renderer.rs b/crates/gpui2/src/platform/mac/metal_renderer.rs index 7bb80640be..0631c75de5 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) diff --git a/crates/gpui2/src/platform/mac/shaders.metal b/crates/gpui2/src/platform/mac/shaders.metal index 0a3a2b2129..4def1c33b8 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); +} diff --git a/crates/gpui2/src/platform/test.rs b/crates/gpui2/src/platform/test.rs index 7e59ced730..acc8ffe41c 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 0000000000..78d75296e6 --- /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 b4f3c739e6..37978e7ad7 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 0000000000..f132719655 --- /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/style.rs b/crates/gpui2/src/style.rs index d2571a3253..6d3b31c1f7 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -1,8 +1,8 @@ use crate::{ black, phi, point, rems, AbsoluteLength, BorrowAppContext, BorrowWindow, Bounds, ContentMask, Corners, CornersRefinement, CursorStyle, DefiniteLength, Edges, EdgesRefinement, Font, - FontFeatures, FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Rems, - Result, Rgba, SharedString, Size, SizeRefinement, Styled, TextRun, ViewContext, WindowContext, + FontFeatures, FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Result, + Rgba, SharedString, Size, SizeRefinement, Styled, TextRun, ViewContext, WindowContext, }; use refineable::{Cascade, Refineable}; use smallvec::SmallVec; @@ -134,7 +134,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, @@ -147,7 +147,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(), @@ -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, @@ -277,7 +281,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 +291,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/styled.rs b/crates/gpui2/src/styled.rs index a272ab95b1..c27347f2b1 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, + self as gpui, hsla, point, px, relative, rems, AbsoluteLength, AlignItems, CursorStyle, + DefiniteLength, Display, Fill, FlexDirection, Hsla, JustifyContent, Length, Position, + SharedString, 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. @@ -433,7 +438,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, { @@ -449,7 +454,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 } @@ -459,7 +464,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 } @@ -469,7 +474,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 } @@ -479,7 +484,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 } @@ -489,7 +494,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 } @@ -499,7 +504,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 } @@ -509,7 +514,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.rs b/crates/gpui2/src/text_system/line.rs index 63aac96faf..707274ad33 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() } @@ -78,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 { @@ -129,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, diff --git a/crates/gpui2/src/text_system/line_layout.rs b/crates/gpui2/src/text_system/line_layout.rs index a310c32cd1..1b5e28c958 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/gpui2/src/window.rs b/crates/gpui2/src/window.rs index a722dca140..b50dbf0134 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>, @@ -253,7 +255,7 @@ impl Window { handle .update(&mut cx, |_, cx| cx.dispatch_event(event)) .log_err() - .unwrap_or(true) + .unwrap_or(false) }) }); @@ -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(), @@ -300,7 +303,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, @@ -559,6 +563,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. @@ -604,6 +614,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. @@ -786,6 +800,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, @@ -839,6 +854,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, @@ -1007,6 +1023,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; } @@ -1047,7 +1066,11 @@ 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 { + // 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 +1124,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 @@ -1151,6 +1170,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(); @@ -1171,6 +1191,7 @@ impl<'a> WindowContext<'a> { self.dispatch_action(action, &key_dispatch_stack[..ix]); } if !self.app.propagate_event { + did_handle_action = true; break; } } @@ -1199,6 +1220,7 @@ impl<'a> WindowContext<'a> { } if !self.app.propagate_event { + did_handle_action = true; break; } } @@ -1212,6 +1234,7 @@ impl<'a> WindowContext<'a> { drop(context_stack); self.window.key_dispatch_stack = key_dispatch_stack; + return did_handle_action; } true @@ -1314,6 +1337,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 +1352,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; @@ -1702,8 +1727,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 @@ -2004,6 +2029,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, @@ -2058,9 +2096,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/gpui2/src/window_input_handler.rs b/crates/gpui2/src/window_input_handler.rs new file mode 100644 index 0000000000..caae5838ce --- /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>; +} diff --git a/crates/gpui2_macros/src/action.rs b/crates/gpui2_macros/src/action.rs new file mode 100644 index 0000000000..66302f3fc0 --- /dev/null +++ b/crates/gpui2_macros/src/action.rs @@ -0,0 +1,55 @@ +// Input: +// +// #[action] +// 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 { +// bar: String, +// } + +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 attrs = input + .attrs + .into_iter() + .filter(|attr| !attr.path.is_ident("action")) + .collect::>(); + + let attributes = quote! { + #[gpui::register_action] + #[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 + #visibility struct #name #fields + } + } + syn::Data::Enum(ref enum_data) => { + let variants = &enum_data.variants; + quote! { + #attributes + #visibility enum #name { #variants } + } + } + _ => panic!("Expected a struct or an enum."), + }; + + TokenStream::from(output) +} diff --git a/crates/gpui2_macros/src/gpui2_macros.rs b/crates/gpui2_macros/src/gpui2_macros.rs index 2e0c0547f7..80b67e1a12 100644 --- a/crates/gpui2_macros/src/gpui2_macros.rs +++ b/crates/gpui2_macros/src/gpui2_macros.rs @@ -1,14 +1,26 @@ -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) +} + #[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 0000000000..68c39ad9bd --- /dev/null +++ b/crates/gpui2_macros/src/register_action.rs @@ -0,0 +1,33 @@ +// Input: +// +// struct FooBar {} + +// Output: +// +// struct FooBar {} +// +// #[allow(non_snake_case)] +// #[gpui2::ctor] +// fn register_foobar_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.to_string().to_lowercase()); + + let expanded = quote! { + #input + #[allow(non_snake_case)] + #[gpui::ctor] + fn #ctor_fn_name() { + gpui::register_action::<#type_name>() + } + }; + + TokenStream::from(expanded) +} diff --git a/crates/language2/src/highlight_map.rs b/crates/language2/src/highlight_map.rs index aeeda546bf..1421ef672d 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/language2/src/language2.rs b/crates/language2/src/language2.rs index 826817c99a..bdea440c08 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/menu2/Cargo.toml b/crates/menu2/Cargo.toml index 9bf61db82c..5fc33ddb11 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 decd4aca22..da21bdcd22 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/Cargo.toml b/crates/picker2/Cargo.toml new file mode 100644 index 0000000000..8d88c25366 --- /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 0000000000..075cf10ff6 --- /dev/null +++ b/crates/picker2/src/picker2.rs @@ -0,0 +1,163 @@ +use editor::Editor; +use gpui::{ + div, uniform_list, Component, Div, FocusEnabled, ParentElement, Render, StatefulInteractivity, + StatelessInteractive, Styled, Task, UniformListScrollHandle, View, ViewContext, VisualContext, + WindowContext, +}; +use std::cmp; + +pub struct Picker { + pub delegate: D, + scroll_handle: UniformListScrollHandle, + editor: View, + pending_update_matches: Option>>, +} + +pub trait PickerDelegate: Sized + 'static { + type ListItem: Component>; + + 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, cx: &mut ViewContext>); + fn dismissed(&mut self, cx: &mut ViewContext>); + + fn render_match( + &self, + ix: usize, + selected: bool, + cx: &mut ViewContext>, + ) -> Self::ListItem; +} + +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(), + pending_update_matches: None, + editor, + } + } + + 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 { + 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); + } + + 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 { + type Element = Div, FocusEnabled>; + + fn render(&mut self, _cx: &mut ViewContext) -> Self::Element { + div() + .context("picker") + .id("picker-container") + .focusable() + .size_full() + .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/settings2/src/keymap_file.rs b/crates/settings2/src/keymap_file.rs index e51bd76e5e..9f279864ee 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}, @@ -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:?}"))) @@ -137,8 +137,10 @@ impl KeymapFile { } } +actions!(NoAction); + fn no_action() -> Box { - todo!() + NoAction.boxed_clone() } #[cfg(test)] diff --git a/crates/settings2/src/settings_file.rs b/crates/settings2/src/settings_file.rs index c623ae9caf..6f2c8d374f 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/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index 1f3a0b33cc..7c6776c930 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -13,9 +13,12 @@ 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" +fuzzy = { package = "fuzzy2", path = "../fuzzy2" } gpui = { package = "gpui2", path = "../gpui2" } itertools = "0.11.0" +language = { package = "language2", path = "../language2" } log.workspace = true rust-embed.workspace = true serde.workspace = true @@ -25,8 +28,10 @@ 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" } [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 3d8a332fb9..2620e68d6c 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/focus.rs b/crates/storybook2/src/stories/focus.rs index 16c03f87d5..984ee421db 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, + StatefulInteractivity, 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 {} @@ -23,24 +15,22 @@ 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 {}) } } 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(); - 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(); @@ -48,20 +38,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 +58,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 +70,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 +88,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 54d6f2a3a9..6831ae2722 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 new file mode 100644 index 0000000000..82a010e6b3 --- /dev/null +++ b/crates/storybook2/src/stories/picker.rs @@ -0,0 +1,214 @@ +use std::sync::Arc; + +use fuzzy::StringMatchCandidate; +use gpui::{ + div, Component, Div, KeyBinding, ParentElement, Render, StatelessInteractive, Styled, Task, + View, VisualContext, WindowContext, +}; +use picker::{Picker, PickerDelegate}; +use theme2::ActiveTheme; + +pub struct PickerStory { + picker: View>, +} + +struct Delegate { + 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>; + + fn match_count(&self) -> usize { + self.candidates.len() + } + + fn render_match( + &self, + ix: usize, + selected: bool, + 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) + .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(candidate) + } + + fn selected_index(&self) -> usize { + self.selected_ix + } + + fn set_selected_index(&mut self, ix: usize, cx: &mut gpui::ViewContext>) { + self.selected_ix = ix; + cx.notify(); + } + + 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 {}", candidate) + } else { + 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 { + pub fn new(cx: &mut WindowContext) -> View { + 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")), + ]); + + PickerStory { + picker: cx.build_view(|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 + }), + } + }) + } +} + +impl Render for PickerStory { + type Element = Div; + + fn render(&mut self, cx: &mut gpui::ViewContext) -> Self::Element { + div() + .bg(cx.theme().styles.colors.background) + .size_full() + .child(self.picker.clone()) + } +} diff --git a/crates/storybook2/src/stories/scroll.rs b/crates/storybook2/src/stories/scroll.rs index cdb48603e0..296dc50cb4 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,12 +13,12 @@ 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(); - 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/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rs index f59208ccb8..040bd75189 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, @@ -51,6 +52,7 @@ pub enum ComponentStory { TrafficLights, Workspace, ZIndex, + Picker, } impl ComponentStory { @@ -79,6 +81,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(), @@ -94,6 +97,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/storybook2/src/storybook2.rs b/crates/storybook2/src/storybook2.rs index c8849c1342..f0ba124162 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 { diff --git a/crates/terminal2/src/mappings/mouse.rs b/crates/terminal2/src/mappings/mouse.rs index eac6ad17ff..edced3156f 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 ba5c4815f2..3d06b48812 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 } diff --git a/crates/theme2/Cargo.toml b/crates/theme2/Cargo.toml index 5a8448372c..45ba4587ba 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", @@ -28,7 +30,9 @@ serde_derive.workspace = true serde_json.workspace = true 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 1a1fd2e99e..83af983d04 100644 --- a/crates/theme2/src/colors.rs +++ b/crates/theme2/src/colors.rs @@ -1,7 +1,9 @@ +use std::sync::Arc; + use gpui::Hsla; use refineable::Refineable; -use crate::SyntaxTheme; +use crate::{PlayerColors, SyntaxTheme}; #[derive(Clone)] pub struct SystemColors { @@ -11,16 +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, -} - -#[derive(Clone)] -pub struct PlayerColors(pub Vec); - #[derive(Refineable, Clone, Debug)] #[refineable(debug)] pub struct StatusColors { @@ -37,77 +29,217 @@ 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 { 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, + /// Border color. Used for elevated surfaces, like a context menu, popup, or dialog. pub elevated_surface_background: Hsla, + /// Background Color. Used for grounded surfaces like a panel or tab. pub surface_background: Hsla, + /// Background Color. Used for the app background and blank panels or windows. pub background: Hsla, + /// 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, + /// 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, + /// 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, + /// 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, + /// 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, - pub element_placeholder: Hsla, - pub element_drop_target: Hsla, + /// Background Color. Used for the area that shows where a dragged element will be dropped. + pub drop_target_background: Hsla, + /// 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. + /// + /// 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, + /// 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, + /// 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, + /// 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, + /// 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: 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 + // === + // 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)] @@ -117,9 +249,8 @@ pub struct ThemeStyles { #[refineable] pub colors: ThemeColors, 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 53e34acf16..ec57538e8f 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -2,12 +2,104 @@ use std::num::ParseIntError; use gpui::{hsla, Hsla, Rgba}; -use crate::{ - colors::{GitStatusColors, PlayerColor, PlayerColors, StatusColors, SystemColors, ThemeColors}, - scale::{ColorScaleSet, ColorScales}, - syntax::SyntaxTheme, - ColorScale, -}; +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 { + 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() @@ -27,61 +119,21 @@ 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(), } } } -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(), - } - } -} - -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), - }, - 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), - }, - 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), - }, - 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), - }, - ]) - } -} - impl SyntaxTheme { pub fn default_light() -> Self { Self { @@ -138,6 +190,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 +247,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") } } } @@ -216,8 +272,7 @@ 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(), + 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(), @@ -240,8 +295,17 @@ impl ThemeColors { tab_active_background: neutral().light().step_1(), tab_inactive_background: neutral().light().step_2(), editor_background: neutral().light().step_1(), + editor_gutter_background: neutral().light().step_1(), // todo!("pick the right colors") editor_subheader_background: neutral().light().step_2(), - editor_active_line: neutral().light_alpha().step_3(), + editor_active_line_background: 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_background: 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") + 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(), @@ -280,8 +344,7 @@ 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(), + 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(), @@ -304,8 +367,17 @@ impl ThemeColors { tab_active_background: neutral().dark().step_1(), tab_inactive_background: neutral().dark().step_2(), editor_background: neutral().dark().step_1(), + editor_gutter_background: neutral().dark().step_1(), // todo!("pick the right colors") editor_subheader_background: neutral().dark().step_2(), - editor_active_line: neutral().dark_alpha().step_3(), + editor_active_line_background: 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_background: 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") + 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(), diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index d7360b6f71..40fb7df7cf 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -1,10 +1,12 @@ +use std::sync::Arc; + use crate::{ - colors::{GitStatusColors, PlayerColors, StatusColors, SystemColors, ThemeColors, ThemeStyles}, - default_color_scales, Appearance, SyntaxTheme, ThemeFamily, ThemeVariant, + colors::{StatusColors, SystemColors, ThemeColors, ThemeStyles}, + default_color_scales, Appearance, PlayerColors, 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, @@ -12,15 +14,14 @@ fn zed_pro_daylight() -> ThemeVariant { system: SystemColors::default(), colors: ThemeColors::default_light(), status: StatusColors::default(), - git: GitStatusColors::default(), - player: PlayerColors::default(), - syntax: SyntaxTheme::default_light(), + player: PlayerColors::default_light(), + syntax: Arc::new(SyntaxTheme::default_light()), }, } } -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, @@ -28,9 +29,8 @@ pub(crate) fn zed_pro_moonlight() -> ThemeVariant { system: SystemColors::default(), colors: ThemeColors::default_dark(), status: StatusColors::default(), - git: GitStatusColors::default(), player: PlayerColors::default(), - syntax: SyntaxTheme::default_dark(), + syntax: Arc::new(SyntaxTheme::default_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/players.rs b/crates/theme2/src/players.rs new file mode 100644 index 0000000000..0e36ff5947 --- /dev/null +++ b/crates/theme2/src/players.rs @@ -0,0 +1,170 @@ +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, img, px, 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( + 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(|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()) + }), + )), + ) + } + } +} diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index c1bba121e1..decec8b5da 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -1,10 +1,17 @@ -use crate::{zed_pro_family, ThemeFamily, ThemeVariant}; +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, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme, + ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily, +}; pub struct ThemeRegistry { - themes: HashMap>, + themes: HashMap>, } impl ThemeRegistry { @@ -14,12 +21,45 @@ 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)); } } + 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(), + player: PlayerColors::default(), + syntax: match user_theme.appearance { + Appearance::Light => Arc::new(SyntaxTheme::default_light()), + Appearance::Dark => Arc::new(SyntaxTheme::default_dark()), + }, + }, + } + })); + } + pub fn list_names(&self, _staff: bool) -> impl Iterator + '_ { self.themes.keys().cloned() } @@ -28,7 +68,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)) @@ -43,6 +83,7 @@ impl Default for ThemeRegistry { }; this.insert_theme_families([zed_pro_family()]); + this.insert_user_theme_familes(crate::all_user_themes()); this } diff --git a/crates/theme2/src/settings.rs b/crates/theme2/src/settings.rs index 5e8f9de873..c575768401 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/story.rs b/crates/theme2/src/story.rs new file mode 100644 index 0000000000..8b3754b59e --- /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/syntax.rs b/crates/theme2/src/syntax.rs index 3a068349fb..8aac238555 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 b8e22f8319..28d12e2b43 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -1,23 +1,32 @@ mod colors; mod default_colors; mod default_theme; +mod players; mod registry; mod scale; mod settings; mod syntax; +mod themes; +mod user_theme; + +use std::sync::Arc; 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::*; 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, @@ -29,35 +38,45 @@ 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 } } pub struct ThemeFamily { - #[allow(dead_code)] - pub(crate) id: String, + pub id: String, pub name: SharedString, pub author: SharedString, - pub themes: Vec, + pub themes: Vec, pub scales: ColorScales, } impl ThemeFamily {} -pub struct ThemeVariant { - #[allow(dead_code)] - pub(crate) id: String, +pub struct Theme { + pub id: String, pub name: SharedString, pub appearance: Appearance, pub styles: ThemeStyles, } -impl ThemeVariant { +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 { + &self.styles.player + } + /// Returns the [`ThemeColors`] for the theme. #[inline(always)] pub fn colors(&self) -> &ThemeColors { @@ -66,7 +85,7 @@ impl ThemeVariant { /// Returns the [`SyntaxTheme`] for the theme. #[inline(always)] - pub fn syntax(&self) -> &SyntaxTheme { + pub fn syntax(&self) -> &Arc { &self.styles.syntax } @@ -76,15 +95,35 @@ impl ThemeVariant { &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 [`DiagnosticStyle`] 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, +} + +#[cfg(feature = "stories")] +mod story; +#[cfg(feature = "stories")] +pub use story::*; diff --git a/crates/theme2/src/themes/.gitkeep b/crates/theme2/src/themes/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs new file mode 100644 index 0000000000..22a0a8741c --- /dev/null +++ b/crates/theme2/src/themes/andromeda.rs @@ -0,0 +1,85 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn andromeda() -> UserThemeFamily { + UserThemeFamily { + name: "Andromeda".into(), + author: "Eliver Lara (EliverLara)".into(), + themes: vec![ + UserTheme { + name: "Andromeda".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Andromeda Bordered".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs new file mode 100644 index 0000000000..8d79289046 --- /dev/null +++ b/crates/theme2/src/themes/ayu.rs @@ -0,0 +1,134 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn ayu() -> UserThemeFamily { + UserThemeFamily { + name: "Ayu".into(), + author: "dempfi (Ike Ku)".into(), + themes: vec![ + UserTheme { + name: "Ayu Light".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + UserTheme { + name: "Ayu Mirage".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Ayu Dark".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rs new file mode 100644 index 0000000000..57c04851a5 --- /dev/null +++ b/crates/theme2/src/themes/dracula.rs @@ -0,0 +1,54 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn dracula() -> UserThemeFamily { + UserThemeFamily { + name: "Dracula".into(), + author: "Zeno Rocha".into(), + themes: vec![UserTheme { + name: "Dracula".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }], + } +} diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs new file mode 100644 index 0000000000..2e79b250da --- /dev/null +++ b/crates/theme2/src/themes/gruvbox.rs @@ -0,0 +1,239 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn gruvbox() -> UserThemeFamily { + UserThemeFamily { + name: "Gruvbox".into(), + author: "morhetz".into(), + themes: vec![ + UserTheme { + name: "Gruvbox Dark Hard".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Gruvbox Dark Medium".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Gruvbox Dark Soft".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Gruvbox Light Hard".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + UserTheme { + name: "Gruvbox Light Medium".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + UserTheme { + name: "Gruvbox Light Soft".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/mod.rs b/crates/theme2/src/themes/mod.rs new file mode 100644 index 0000000000..c48338b184 --- /dev/null +++ b/crates/theme2/src/themes/mod.rs @@ -0,0 +1,44 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +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::UserThemeFamily; + +pub(crate) fn all_user_themes() -> Vec { + 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 0000000000..90ae45f879 --- /dev/null +++ b/crates/theme2/src/themes/night_owl.rs @@ -0,0 +1,94 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn night_owl() -> UserThemeFamily { + UserThemeFamily { + name: "Night Owl".into(), + author: "Sarah Drasner (sdras)".into(), + themes: vec![ + UserTheme { + name: "Night Owl".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Night Owl Light".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rs new file mode 100644 index 0000000000..b1dedd6b16 --- /dev/null +++ b/crates/theme2/src/themes/nord.rs @@ -0,0 +1,54 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn nord() -> UserThemeFamily { + UserThemeFamily { + name: "Nord".into(), + author: "Sven Greb (svengreb)".into(), + themes: vec![UserTheme { + name: "Nord".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }], + } +} diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rs new file mode 100644 index 0000000000..f5b8f1207d --- /dev/null +++ b/crates/theme2/src/themes/notctis.rs @@ -0,0 +1,446 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn notctis() -> UserThemeFamily { + UserThemeFamily { + name: "Notctis".into(), + author: "Liviu Schera (liviuschera)".into(), + themes: vec![ + UserTheme { + name: "Noctis Azureus".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Bordo".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctus Hibernus".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Lilac".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Lux".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Minimus".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Obscuro".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Sereno".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Uva".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Noctis Viola".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rs new file mode 100644 index 0000000000..7ed27d3b75 --- /dev/null +++ b/crates/theme2/src/themes/palenight.rs @@ -0,0 +1,131 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn palenight() -> UserThemeFamily { + UserThemeFamily { + name: "Palenight".into(), + author: "Olaolu Olawuyi (whizkydee)".into(), + themes: vec![ + UserTheme { + name: "Palenight".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Palenight Operator".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Palenight (Mild Contrast)".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs new file mode 100644 index 0000000000..913af127fb --- /dev/null +++ b/crates/theme2/src/themes/rose_pine.rs @@ -0,0 +1,131 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn rose_pine() -> UserThemeFamily { + UserThemeFamily { + name: "Rose Pine".into(), + author: "Rosé Pine".into(), + themes: vec![ + UserTheme { + name: "Rose Pine".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Rose Moon".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Rose Pine Dawn".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs new file mode 100644 index 0000000000..0a78328e2e --- /dev/null +++ b/crates/theme2/src/themes/solarized.rs @@ -0,0 +1,87 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn solarized() -> UserThemeFamily { + UserThemeFamily { + name: "Solarized".into(), + author: "Ethan Schoonover (altercation)".into(), + themes: vec![ + UserTheme { + name: "Solarized Dark".into(), + appearance: Appearance::Dark, + 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() + }, + }, + }, + UserTheme { + name: "Solarized Light".into(), + appearance: Appearance::Light, + 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() + }, + }, + }, + ], + } +} diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rs new file mode 100644 index 0000000000..8c0520ee11 --- /dev/null +++ b/crates/theme2/src/themes/synthwave_84.rs @@ -0,0 +1,40 @@ +// This file was generated by the `theme_importer`. +// Be careful when modifying it by hand. + +use gpui::rgba; + +use crate::{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +pub fn synthwave_84() -> UserThemeFamily { + UserThemeFamily { + name: "Synthwave 84".into(), + author: "Robb Owen (robb0wen)".into(), + themes: vec![UserTheme { + name: "Synthwave 84".into(), + appearance: Appearance::Dark, + styles: UserThemeStylesRefinement { + colors: ThemeColorsRefinement { + 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() + }, + }, + }], + } +} diff --git a/crates/theme2/src/user_theme.rs b/crates/theme2/src/user_theme.rs new file mode 100644 index 0000000000..87ba9a76d1 --- /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/Cargo.toml b/crates/theme_importer/Cargo.toml new file mode 100644 index 0000000000..1c86349e96 --- /dev/null +++ b/crates/theme_importer/Cargo.toml @@ -0,0 +1,18 @@ +[package] +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 + +[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/README.md b/crates/theme_importer/README.md new file mode 100644 index 0000000000..a610d694d7 --- /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" + } + ] +} +``` diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs new file mode 100644 index 0000000000..b41994a0be --- /dev/null +++ b/crates/theme_importer/src/main.rs @@ -0,0 +1,237 @@ +mod theme_printer; +mod util; +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}; +use convert_case::{Case, Casing}; +use gpui::serde_json; +use log::LevelFilter; +use serde::Deserialize; +use simplelog::SimpleLogger; +use theme::{Appearance, UserThemeFamily}; +use vscode::VsCodeThemeConverter; + +use crate::theme_printer::UserThemeFamilyPrinter; +use crate::vscode::VsCodeTheme; + +#[derive(Debug, Deserialize)] +struct FamilyMetadata { + pub name: String, + pub author: String, + pub themes: Vec, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ThemeAppearanceJson { + Light, + Dark, +} + +impl From for Appearance { + fn from(value: ThemeAppearanceJson) -> Self { + match value { + ThemeAppearanceJson::Light => Self::Light, + ThemeAppearanceJson::Dark => Self::Dark, + } + } +} + +#[derive(Debug, Deserialize)] +pub struct ThemeMetadata { + pub name: String, + pub file_name: String, + pub appearance: ThemeAppearanceJson, +} + +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!("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)? { + let theme_family_dir = theme_family_dir?; + + if !theme_family_dir.file_type()?.is_dir() { + continue; + } + + 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 family_metadata_file = File::open(theme_family_dir.path().join("family.json")) + .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!( + "failed to parse `family.json` for '{theme_family_slug}'" + ))?; + + let mut themes = Vec::new(); + + for theme_metadata in family_metadata.themes { + let theme_file_path = theme_family_dir.path().join(&theme_metadata.file_name); + + 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:?}"))?; + + let converter = VsCodeThemeConverter::new(vscode_theme, theme_metadata); + + let theme = converter.convert()?; + + themes.push(theme); + } + + let theme_family = UserThemeFamily { + name: family_metadata.name.into(), + author: family_metadata.author.into(), + themes, + }; + + 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 { + 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")))?; + println!( + "Creating file: {:?}", + themes_output_path.join(format!("{theme_family_slug}.rs")) + ); + + 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::{{ + Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, + }}; + + pub fn {theme_family_slug}() -> UserThemeFamily {{ + {theme_family_definition} + }} + "#, + theme_family_definition = format!("{:#?}", UserThemeFamilyPrinter::new(theme_family)) + ); + + output_file.write_all(theme_module.as_bytes())?; + + theme_modules.push(theme_family_slug); + } + + let themes_vector_contents = format!( + r#" + use crate::UserThemeFamily; + + pub(crate) fn all_user_themes() -> Vec {{ + vec![{all_themes}] + }} + "#, + all_themes = theme_modules + .iter() + .map(|module| format!("{}()", module)) + .collect::>() + .join(", ") + ); + + 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} + + {themes_vector_contents} + "#, + 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"), + themes_vector_contents = themes_vector_contents + ); + + 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() +} diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rs new file mode 100644 index 0000000000..49caf7bfd0 --- /dev/null +++ b/crates/theme_importer/src/theme_printer.rs @@ -0,0 +1,322 @@ +use std::fmt::{self, Debug}; + +use gpui::{Hsla, Rgba}; +use theme::{ + Appearance, PlayerColor, PlayerColors, StatusColors, SyntaxTheme, SystemColors, + ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement, +}; + +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 { + 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 UserThemeFamilyPrinter(UserThemeFamily); + +impl UserThemeFamilyPrinter { + pub fn new(theme_family: UserThemeFamily) -> Self { + Self(theme_family) + } +} + +impl Debug for UserThemeFamilyPrinter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("UserThemeFamily") + .field("name", &IntoPrinter(&self.0.name)) + .field("author", &IntoPrinter(&self.0.author)) + .field( + "themes", + &VecPrinter( + &self + .0 + .themes + .iter() + .map(|theme| UserThemePrinter(theme)) + .collect(), + ), + ) + .finish() + } +} + +pub struct UserThemePrinter<'a>(&'a UserTheme); + +impl<'a> Debug for UserThemePrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("UserTheme") + .field("name", &IntoPrinter(&self.0.name)) + .field("appearance", &AppearancePrinter(self.0.appearance)) + .field("styles", &UserThemeStylesRefinementPrinter(&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 UserThemeStylesRefinementPrinter<'a>(&'a UserThemeStylesRefinement); + +impl<'a> Debug for UserThemeStylesRefinementPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("UserThemeStylesRefinement") + .field("colors", &ThemeColorsRefinementPrinter(&self.0.colors)) + .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 ThemeColorsRefinementPrinter<'a>(&'a ThemeColorsRefinement); + +impl<'a> Debug for ThemeColorsRefinementPrinter<'a> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + 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", + 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), + ("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), + ("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", + self.0.editor_subheader_background, + ), + ( + "editor_active_line_background", + self.0.editor_active_line_background, + ), + ( + "editor_highlighted_line_background", + self.0.editor_highlighted_line_background, + ), + ("editor_line_number", self.0.editor_line_number), + ( + "editor_active_line_number", + 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", + self.0.editor_document_highlight_read_background, + ), + ( + "editor_document_highlight_write_background", + self.0.editor_document_highlight_write_background, + ), + ("terminal_background", self.0.terminal_background), + ( + "terminal_ansi_bright_black", + self.0.terminal_ansi_bright_black, + ), + ("terminal_ansi_bright_red", self.0.terminal_ansi_bright_red), + ( + "terminal_ansi_bright_green", + self.0.terminal_ansi_bright_green, + ), + ( + "terminal_ansi_bright_yellow", + self.0.terminal_ansi_bright_yellow, + ), + ( + "terminal_ansi_bright_blue", + self.0.terminal_ansi_bright_blue, + ), + ( + "terminal_ansi_bright_magenta", + self.0.terminal_ansi_bright_magenta, + ), + ( + "terminal_ansi_bright_cyan", + self.0.terminal_ansi_bright_cyan, + ), + ( + "terminal_ansi_bright_white", + 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("}") + } +} + +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 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() + } +} diff --git a/crates/theme_importer/src/util.rs b/crates/theme_importer/src/util.rs new file mode 100644 index 0000000000..a78d57ecde --- /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 new file mode 100644 index 0000000000..5a09870dc8 --- /dev/null +++ b/crates/theme_importer/src/vscode.rs @@ -0,0 +1,570 @@ +use anyhow::Result; +use gpui::{Hsla, Rgba}; +use serde::Deserialize; +use theme::{ThemeColorsRefinement, UserTheme, UserThemeStylesRefinement}; + +use crate::util::Traverse; +use crate::ThemeMetadata; + +#[derive(Deserialize, Debug)] +pub struct VsCodeTheme { + #[serde(rename = "$schema")] + pub schema: Option, + pub name: Option, + pub author: Option, + pub maintainers: Option>, + #[serde(rename = "semanticClass")] + pub semantic_class: Option, + #[serde(rename = "semanticHighlighting")] + pub semantic_highlighting: Option, + pub colors: VsCodeColors, +} + +#[derive(Debug, Deserialize)] +pub struct VsCodeColors { + #[serde(rename = "terminal.background")] + pub terminal_background: Option, + #[serde(rename = "terminal.foreground")] + pub terminal_foreground: Option, + #[serde(rename = "terminal.ansiBrightBlack")] + pub terminal_ansi_bright_black: Option, + #[serde(rename = "terminal.ansiBrightRed")] + pub terminal_ansi_bright_red: Option, + #[serde(rename = "terminal.ansiBrightGreen")] + pub terminal_ansi_bright_green: Option, + #[serde(rename = "terminal.ansiBrightYellow")] + pub terminal_ansi_bright_yellow: Option, + #[serde(rename = "terminal.ansiBrightBlue")] + pub terminal_ansi_bright_blue: Option, + #[serde(rename = "terminal.ansiBrightMagenta")] + pub terminal_ansi_bright_magenta: Option, + #[serde(rename = "terminal.ansiBrightCyan")] + pub terminal_ansi_bright_cyan: Option, + #[serde(rename = "terminal.ansiBrightWhite")] + pub terminal_ansi_bright_white: Option, + #[serde(rename = "terminal.ansiBlack")] + pub terminal_ansi_black: Option, + #[serde(rename = "terminal.ansiRed")] + pub terminal_ansi_red: Option, + #[serde(rename = "terminal.ansiGreen")] + pub terminal_ansi_green: Option, + #[serde(rename = "terminal.ansiYellow")] + pub terminal_ansi_yellow: Option, + #[serde(rename = "terminal.ansiBlue")] + pub terminal_ansi_blue: Option, + #[serde(rename = "terminal.ansiMagenta")] + pub terminal_ansi_magenta: Option, + #[serde(rename = "terminal.ansiCyan")] + pub terminal_ansi_cyan: Option, + #[serde(rename = "terminal.ansiWhite")] + 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 { + 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 vscode_colors = &self.theme.colors; + + let theme_colors_refinements = ThemeColorsRefinement { + 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_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() + .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() + }; + + Ok(UserTheme { + name: self.theme_metadata.name.into(), + appearance, + styles: UserThemeStylesRefinement { + colors: theme_colors_refinements, + }, + }) + } +} diff --git a/crates/ui2/src/components/checkbox.rs b/crates/ui2/src/components/checkbox.rs index 9f7c10a104..20dad74712 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/ui2/src/components/list.rs b/crates/ui2/src/components/list.rs index c11860e9a5..57143e1f0c 100644 --- a/crates/ui2/src/components/list.rs +++ b/crates/ui2/src/components/list.rs @@ -309,6 +309,10 @@ impl ListEntry { .group("") .bg(cx.theme().colors().surface_background) // TODO: Add focus state + // .when(self.state == InteractionState::Focused, |this| { + // this.border() + // .border_color(cx.theme().colors().border_focused) + // }) .child( sized_item .when(self.variant == ListItemVariant::Inset, |this| this.px_2()) diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rs index 416db2d172..e936dc924a 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)); }) diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs index c942f0aa3b..3f179210eb 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, } } } diff --git a/crates/ui2/src/to_extract/buffer.rs b/crates/ui2/src/to_extract/buffer.rs index 8ab435e994..aa4bebc9d5 100644 --- a/crates/ui2/src/to_extract/buffer.rs +++ b/crates/ui2/src/to_extract/buffer.rs @@ -156,7 +156,7 @@ impl Buffer { fn render_row(row: BufferRow, cx: &WindowContext) -> impl Component { let line_background = if row.current { - cx.theme().colors().editor_active_line + cx.theme().colors().editor_active_line_background } else { cx.theme().styles.system.transparent }; diff --git a/crates/workspace2/src/item.rs b/crates/workspace2/src/item.rs index e933f373d4..1a7f30646d 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) } diff --git a/crates/workspace2/src/modal_layer.rs b/crates/workspace2/src/modal_layer.rs new file mode 100644 index 0000000000..4121574b6a --- /dev/null +++ b/crates/workspace2/src/modal_layer.rs @@ -0,0 +1,102 @@ +use crate::Workspace; +use gpui::{ + div, AnyView, AppContext, Div, ParentElement, Render, StatelessInteractive, View, ViewContext, +}; +use std::{any::TypeId, sync::Arc}; + +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, +} + +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); + + self.registered_modals.push(( + TypeId::of::(), + Box::new(move |mut div| { + let build_view = build_view.clone(); + + div.on_action( + move |workspace: &mut Workspace, event: &A, cx: &mut ViewContext| { + 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, workspace: &Workspace, cx: &ViewContext) -> Div { + 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 7561c903d3..b51b0186ef 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, @@ -2770,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) } } @@ -3783,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() diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index c9012a3a14..bee8d0bc42 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] diff --git a/crates/zed/src/languages/racket/highlights.scm b/crates/zed/src/languages/racket/highlights.scm index 2c0caf8935..3caf1d88e9 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/Cargo.toml b/crates/zed2/Cargo.toml index d510de24ee..2c93de734e 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/assets.rs b/crates/zed2/src/assets.rs index 873138c244..5d5e81a60e 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"] diff --git a/crates/zed2/src/languages/json.rs b/crates/zed2/src/languages/json.rs index 63f909ae2a..cf9b33d968 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( diff --git a/crates/zed2/src/languages/racket/highlights.scm b/crates/zed2/src/languages/racket/highlights.scm index 2c0caf8935..3caf1d88e9 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]$")) - diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 52eb512eb4..7f25a6a5d4 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; @@ -38,6 +39,7 @@ use std::{ thread, time::{SystemTime, UNIX_EPOCH}, }; +use theme::ActiveTheme; use util::{ async_maybe, channel::{parse_zed_link, ReleaseChannel, RELEASE_CHANNEL}, @@ -75,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(), @@ -115,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); @@ -139,17 +141,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(), @@ -164,7 +155,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()) @@ -192,6 +183,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); diff --git a/script/bundle b/script/bundle index 69a2f165dc..8c0b3fef87 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 " @@ -83,14 +86,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" @@ -228,8 +225,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 "$APPLE_NOTORIZATION_TEAM" "${dmg_file_path}" fi if [ "$open_result" = true ]; then diff --git a/script/get-preview-channel-changes b/script/get-preview-channel-changes index 5a0be3ed66..7206134200 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]; + releaseNotes = notes.trim().split("\n"); + console.log(" Release Notes:"); - if (releaseNotes) { - releaseNotes = releaseNotes.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; }