diff --git a/extras/vscode/README.md b/extras/vscode/README.md new file mode 100644 index 0000000..3d35bc6 --- /dev/null +++ b/extras/vscode/README.md @@ -0,0 +1,5 @@ +# VS Code / Cursor + +Command Palette → **Developer: Install Extension from Location…** → this folder. + +Reload window. **Color Theme** → `AstroDark` (or AstroLight / AstroMars / AstroJupiter). diff --git a/extras/vscode/icon.png b/extras/vscode/icon.png new file mode 100644 index 0000000..9c34660 Binary files /dev/null and b/extras/vscode/icon.png differ diff --git a/extras/vscode/package.json b/extras/vscode/package.json new file mode 100644 index 0000000..b3834b4 --- /dev/null +++ b/extras/vscode/package.json @@ -0,0 +1,46 @@ +{ + "name": "astrotheme", + "displayName": "AstroTheme", + "description": "AstroNvim AstroTheme palettes for VS Code and Cursor (AstroDark, AstroLight, AstroMars, AstroJupiter).", + "version": "0.1.0", + "publisher": "astrotheme", + "icon": "icon.png", + "license": "GPL-3.0-only", + "engines": { + "vscode": "^1.80.0" + }, + "categories": [ + "Themes" + ], + "keywords": [ + "theme", + "astrotheme", + "astronvim", + "dark", + "light" + ], + "contributes": { + "themes": [ + { + "label": "AstroDark", + "uiTheme": "vs-dark", + "path": "./astrodark.json" + }, + { + "label": "AstroLight", + "uiTheme": "vs", + "path": "./astrolight.json" + }, + { + "label": "AstroMars", + "uiTheme": "vs-dark", + "path": "./astromars.json" + }, + { + "label": "AstroJupiter", + "uiTheme": "vs", + "path": "./astrojupiter.json" + } + ] + } +} diff --git a/lua/astrotheme/extras/init.lua b/lua/astrotheme/extras/init.lua index 497b8a4..9299d25 100644 --- a/lua/astrotheme/extras/init.lua +++ b/lua/astrotheme/extras/init.lua @@ -39,6 +39,7 @@ M.extras = { tmux = { ext = "tmux", url = "https://github.com/tmux/tmux/wiki", label = "Tmux" }, vim = { ext = "vim", url = "https://vimhelp.org/", label = "Vim", subdir = "colors"}, vimium = { ext = "css", url = "https://vimium.github.io/", label = "Vimium" }, + vscode = { ext = "json", url = "https://code.visualstudio.com/", label = "VS Code" }, wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" }, windows_terminal = { ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal" }, xfceterm = { ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal" }, diff --git a/lua/astrotheme/extras/vscode.lua b/lua/astrotheme/extras/vscode.lua new file mode 100644 index 0000000..a8c964a --- /dev/null +++ b/lua/astrotheme/extras/vscode.lua @@ -0,0 +1,1078 @@ +local M = {} + +local Color = require "astrotheme.lib.color" + +--- @param hex string +--- @param opacity number +local function alpha(hex, opacity) return hex .. string.format("%02X", math.floor(opacity * 255 + 0.5)) end + +--- @param src string +--- @param dst string +--- @param amount number +local function blend(src, dst, amount) return Color.new(src):blend(Color.new(dst), amount):tohex() end + +local function is_array(t) + local i = 0 + for _ in pairs(t) do + i = i + 1 + if t[i] == nil then return false end + end + return true +end + +local function encode(val, indent) + indent = indent or 0 + local ty = type(val) + if ty == "boolean" then + return val and "true" or "false" + elseif ty == "number" then + return tostring(val) + elseif ty == "string" then + return vim.json.encode(val) + elseif ty == "table" then + local pad = string.rep(" ", indent) + local inner = string.rep(" ", indent + 1) + if is_array(val) then + if #val == 0 then return "[]" end + local parts = {} + for _, v in ipairs(val) do + table.insert(parts, inner .. encode(v, indent + 1)) + end + return "[\n" .. table.concat(parts, ",\n") .. "\n" .. pad .. "]" + end + local keys = {} + for k in pairs(val) do + table.insert(keys, k) + end + table.sort(keys) + if #keys == 0 then return "{}" end + local parts = {} + for _, k in ipairs(keys) do + table.insert(parts, inner .. vim.json.encode(k) .. ": " .. encode(val[k], indent + 1)) + end + return "{\n" .. table.concat(parts, ",\n") .. "\n" .. pad .. "}" + end + error("cannot encode " .. ty) +end + +local function scope(name, scopes, foreground, settings) + local s = vim.tbl_extend("force", { foreground = foreground }, settings or {}) + return { name = name, scope = scopes, settings = s } +end + +--- @param colors AstroThemePalette +local function workbench(colors) + local ui, syn, term = colors.ui, colors.syntax, colors.term + local diff_add = blend(syn.green, ui.base, 0.75) + local diff_del = blend(syn.red, ui.base, 0.75) + return { + foreground = ui.text, + focusBorder = ui.accent, + ["selection.background"] = ui.selection, + ["widget.shadow"] = alpha(ui.tabline, 0.45), + descriptionForeground = ui.text_inactive, + errorForeground = ui.red, + ["icon.foreground"] = ui.text, + ["sash.hoverBorder"] = ui.accent, + ["window.activeBorder"] = "#00000000", + ["window.inactiveBorder"] = "#00000000", + ["textLink.foreground"] = syn.blue, + ["textLink.activeForeground"] = ui.accent, + ["textPreformat.foreground"] = syn.red, + ["textBlockQuote.background"] = ui.float, + ["textBlockQuote.border"] = ui.accent, + ["textCodeBlock.background"] = ui.highlight, + ["textSeparator.foreground"] = ui.border, + ["button.background"] = ui.accent, + ["button.foreground"] = ui.base, + ["button.hoverBackground"] = ui.blue, + ["button.secondaryBackground"] = ui.highlight, + ["button.secondaryForeground"] = ui.text_active, + ["button.secondaryHoverBackground"] = ui.selection, + ["checkbox.background"] = ui.prompt, + ["checkbox.foreground"] = ui.text_active, + ["checkbox.border"] = ui.border, + ["dropdown.background"] = ui.float, + ["dropdown.foreground"] = ui.text, + ["dropdown.border"] = ui.border, + ["dropdown.listBackground"] = ui.float, + ["input.background"] = ui.prompt, + ["input.foreground"] = syn.text, + ["input.border"] = ui.border, + ["input.placeholderForeground"] = ui.text_inactive, + ["inputOption.activeBackground"] = ui.selection, + ["inputOption.activeBorder"] = ui.accent, + ["inputOption.activeForeground"] = ui.text_active, + ["inputValidation.errorBackground"] = ui.float, + ["inputValidation.errorForeground"] = ui.red, + ["inputValidation.errorBorder"] = ui.red, + ["inputValidation.warningBackground"] = ui.float, + ["inputValidation.warningForeground"] = ui.yellow, + ["inputValidation.warningBorder"] = ui.yellow, + ["inputValidation.infoBackground"] = ui.float, + ["inputValidation.infoForeground"] = ui.blue, + ["inputValidation.infoBorder"] = ui.blue, + ["scrollbar.shadow"] = alpha(ui.tabline, 0.4), + ["scrollbarSlider.background"] = alpha(ui.accent, 0.35), + ["scrollbarSlider.hoverBackground"] = alpha(ui.accent, 0.5), + ["scrollbarSlider.activeBackground"] = alpha(ui.accent, 0.7), + ["badge.background"] = ui.accent, + ["badge.foreground"] = ui.base, + ["progressBar.background"] = ui.accent, + ["list.activeSelectionBackground"] = ui.selection, + ["list.activeSelectionForeground"] = ui.text_active, + ["list.inactiveSelectionBackground"] = ui.highlight, + ["list.inactiveSelectionForeground"] = ui.text_active, + ["list.hoverBackground"] = ui.highlight, + ["list.hoverForeground"] = ui.text_active, + ["list.focusBackground"] = ui.selection, + ["list.focusForeground"] = ui.text_active, + ["list.highlightForeground"] = ui.text_match, + ["list.focusHighlightForeground"] = ui.text_match, + ["list.errorForeground"] = ui.red, + ["list.warningForeground"] = ui.yellow, + ["list.invalidItemForeground"] = ui.red, + ["list.deemphasizedForeground"] = ui.text_inactive, + ["list.filterMatchBackground"] = ui.selection, + ["list.filterMatchBorder"] = ui.accent, + ["listFilterWidget.background"] = ui.float, + ["listFilterWidget.outline"] = ui.accent, + ["listFilterWidget.noMatchesOutline"] = ui.red, + ["tree.indentGuidesStroke"] = ui.border, + ["tree.inactiveIndentGuidesStroke"] = alpha(ui.border, 0.45), + ["activityBar.background"] = ui.tabline, + ["activityBar.foreground"] = ui.accent, + ["activityBar.inactiveForeground"] = ui.text_inactive, + ["activityBar.border"] = ui.split, + ["activityBar.activeBorder"] = ui.accent, + ["activityBarBadge.background"] = ui.accent, + ["activityBarBadge.foreground"] = ui.base, + ["activityBarTop.foreground"] = ui.accent, + ["activityBarTop.inactiveForeground"] = ui.text_inactive, + ["sideBar.background"] = ui.tool, + ["sideBar.foreground"] = ui.text, + ["sideBar.border"] = ui.split, + ["sideBarTitle.foreground"] = ui.text_active, + ["sideBarSectionHeader.background"] = ui.tool, + ["sideBarSectionHeader.foreground"] = ui.text_active, + ["sideBarSectionHeader.border"] = ui.split, + ["minimap.background"] = ui.base, + ["minimap.selectionHighlight"] = ui.selection, + ["minimap.findMatchHighlight"] = alpha(ui.purple, 0.55), + ["minimap.errorHighlight"] = ui.red, + ["minimap.warningHighlight"] = ui.yellow, + ["minimapGutter.addedBackground"] = syn.green, + ["minimapGutter.modifiedBackground"] = syn.orange, + ["minimapGutter.deletedBackground"] = syn.red, + ["editorGroup.border"] = ui.split, + ["editorGroup.dropBackground"] = alpha(ui.accent, 0.18), + ["editorGroupHeader.tabsBackground"] = ui.tabline, + ["editorGroupHeader.tabsBorder"] = ui.split, + ["editorGroupHeader.noTabsBackground"] = ui.tabline, + ["tab.activeBackground"] = ui.base, + ["tab.activeForeground"] = ui.text_active, + ["tab.activeBorderTop"] = ui.accent, + ["tab.inactiveBackground"] = ui.tabline, + ["tab.inactiveForeground"] = ui.text_inactive, + ["tab.border"] = ui.split, + ["tab.hoverBackground"] = ui.highlight, + ["tab.hoverForeground"] = ui.text_active, + ["tab.unfocusedActiveBackground"] = ui.inactive_base, + ["tab.unfocusedActiveForeground"] = ui.text, + ["tab.unfocusedInactiveBackground"] = ui.tabline, + ["tab.unfocusedInactiveForeground"] = ui.text_inactive, + ["tab.lastPinnedBorder"] = ui.border, + ["editor.background"] = ui.base, + ["editor.foreground"] = syn.text, + ["editorLineNumber.foreground"] = ui.none_text, + ["editorLineNumber.activeForeground"] = ui.text_active, + ["editorCursor.foreground"] = ui.text, + ["editorCursor.background"] = ui.base, + ["editor.selectionBackground"] = ui.selection, + ["editor.inactiveSelectionBackground"] = alpha(ui.selection, 0.55), + ["editor.selectionHighlightBackground"] = alpha(ui.accent, 0.22), + ["editor.wordHighlightBackground"] = alpha(ui.accent, 0.18), + ["editor.wordHighlightStrongBackground"] = alpha(ui.accent, 0.28), + ["editor.findMatchBackground"] = ui.purple, + -- VS Code #228782: findMatchForeground / findMatchHighlightForeground are swapped. + -- HighlightForeground actually paints the CURRENT match; omit Foreground so others keep tokens. + ["editor.findMatchHighlightForeground"] = ui.base, + ["editor.findMatchHighlightBackground"] = ui.selection, + ["editor.findRangeHighlightBackground"] = alpha(ui.selection, 0.45), + ["editor.hoverHighlightBackground"] = alpha(ui.accent, 0.12), + ["editor.lineHighlightBackground"] = ui.current_line, + ["editor.lineHighlightBorder"] = "#00000000", + ["editor.rangeHighlightBackground"] = alpha(ui.yellow, 0.12), + ["editor.symbolHighlightBackground"] = alpha(ui.cyan, 0.18), + ["editor.foldBackground"] = alpha(ui.selection, 0.4), + ["editor.foldPlaceholderForeground"] = ui.text_inactive, + ["editorWhitespace.foreground"] = ui.none_text, + ["editorIndentGuide.background1"] = alpha(ui.none_text, 0.45), + ["editorIndentGuide.activeBackground1"] = ui.border, + ["editorRuler.foreground"] = ui.border, + ["editorCodeLens.foreground"] = ui.none_text, + ["editorBracketMatch.background"] = "#00000000", + ["editorBracketMatch.border"] = ui.orange, + ["editorBracketHighlight.foreground1"] = syn.blue, + ["editorBracketHighlight.foreground2"] = syn.purple, + ["editorBracketHighlight.foreground3"] = syn.cyan, + ["editorBracketHighlight.foreground4"] = syn.yellow, + ["editorBracketHighlight.foreground5"] = syn.orange, + ["editorBracketHighlight.foreground6"] = syn.green, + ["editorBracketHighlight.unexpectedBracket.foreground"] = ui.red, + ["editorOverviewRuler.border"] = "#00000000", + ["editorOverviewRuler.findMatchForeground"] = ui.purple, + ["editorOverviewRuler.rangeHighlightForeground"] = ui.yellow, + ["editorOverviewRuler.selectionHighlightForeground"] = ui.accent, + ["editorOverviewRuler.wordHighlightForeground"] = ui.accent, + ["editorOverviewRuler.wordHighlightStrongForeground"] = ui.blue, + ["editorOverviewRuler.modifiedForeground"] = syn.orange, + ["editorOverviewRuler.addedForeground"] = syn.green, + ["editorOverviewRuler.deletedForeground"] = syn.red, + ["editorOverviewRuler.errorForeground"] = ui.red, + ["editorOverviewRuler.warningForeground"] = ui.yellow, + ["editorOverviewRuler.infoForeground"] = ui.blue, + ["editorError.foreground"] = ui.red, + ["editorWarning.foreground"] = ui.yellow, + ["editorInfo.foreground"] = ui.blue, + ["editorHint.foreground"] = ui.cyan, + ["editorUnnecessaryCode.opacity"] = "#00000088", + ["editorGutter.background"] = ui.base, + ["editorGutter.modifiedBackground"] = syn.orange, + ["editorGutter.addedBackground"] = syn.green, + ["editorGutter.deletedBackground"] = syn.red, + ["editorGutter.foldingControlForeground"] = ui.text_inactive, + ["editorInlayHint.foreground"] = ui.none_text, + ["editorInlayHint.background"] = alpha(ui.highlight, 0.65), + ["editorInlayHint.typeForeground"] = syn.yellow, + ["editorInlayHint.parameterForeground"] = syn.orange, + ["editorStickyScroll.background"] = ui.base, + ["editorStickyScrollHover.background"] = ui.current_line, + ["editorStickyScroll.shadow"] = alpha(ui.tabline, 0.4), + ["diffEditor.insertedTextBackground"] = alpha(syn.green, 0.22), + ["diffEditor.removedTextBackground"] = alpha(syn.red, 0.22), + ["diffEditor.insertedLineBackground"] = alpha(diff_add, 0.85), + ["diffEditor.removedLineBackground"] = alpha(diff_del, 0.85), + ["diffEditorGutter.insertedLineBackground"] = diff_add, + ["diffEditorGutter.removedLineBackground"] = diff_del, + ["diffEditor.diagonalFill"] = ui.border, + ["diffEditor.border"] = ui.split, + ["editorWidget.background"] = ui.float, + ["editorWidget.foreground"] = ui.text, + ["editorWidget.border"] = ui.border, + ["editorSuggestWidget.background"] = ui.float, + ["editorSuggestWidget.foreground"] = ui.text, + ["editorSuggestWidget.border"] = ui.border, + ["editorSuggestWidget.highlightForeground"] = ui.text_match, + ["editorSuggestWidget.focusHighlightForeground"] = ui.text_match, + ["editorSuggestWidget.selectedBackground"] = ui.selection, + ["editorSuggestWidget.selectedForeground"] = ui.text_active, + ["editorHoverWidget.background"] = ui.float, + ["editorHoverWidget.foreground"] = ui.text, + ["editorHoverWidget.border"] = ui.border, + ["editorHoverWidget.statusBarBackground"] = ui.tool, + ["debugExceptionWidget.background"] = ui.float, + ["debugExceptionWidget.border"] = ui.red, + ["editorMarkerNavigation.background"] = ui.float, + ["editorMarkerNavigationError.background"] = ui.red, + ["editorMarkerNavigationWarning.background"] = ui.yellow, + ["editorMarkerNavigationInfo.background"] = ui.blue, + ["peekView.border"] = ui.accent, + ["peekViewEditor.background"] = ui.float, + ["peekViewEditor.matchHighlightBackground"] = ui.selection, + ["peekViewResult.background"] = ui.tool, + ["peekViewResult.fileForeground"] = ui.text_active, + ["peekViewResult.lineForeground"] = ui.text, + ["peekViewResult.matchHighlightBackground"] = ui.selection, + ["peekViewResult.selectionBackground"] = ui.selection, + ["peekViewResult.selectionForeground"] = ui.text_active, + ["peekViewTitle.background"] = ui.tabline, + ["peekViewTitleLabel.foreground"] = ui.text_active, + ["peekViewTitleDescription.foreground"] = ui.text_inactive, + ["merge.currentHeaderBackground"] = alpha(syn.blue, 0.35), + ["merge.currentContentBackground"] = alpha(syn.blue, 0.16), + ["merge.incomingHeaderBackground"] = alpha(syn.green, 0.35), + ["merge.incomingContentBackground"] = alpha(syn.green, 0.16), + ["merge.commonHeaderBackground"] = alpha(ui.border, 0.45), + ["merge.commonContentBackground"] = alpha(ui.border, 0.18), + ["panel.background"] = ui.tool, + ["panel.border"] = ui.split, + ["panelTitle.activeBorder"] = ui.accent, + ["panelTitle.activeForeground"] = ui.text_active, + ["panelTitle.inactiveForeground"] = ui.text_inactive, + ["panelSection.border"] = ui.split, + ["panelSectionHeader.background"] = ui.tabline, + ["statusBar.background"] = ui.statusline, + ["statusBar.foreground"] = ui.text, + ["statusBar.border"] = ui.split, + ["statusBar.debuggingBackground"] = ui.red, + ["statusBar.debuggingForeground"] = ui.base, + ["statusBar.noFolderBackground"] = ui.statusline, + ["statusBar.noFolderForeground"] = ui.text, + ["statusBarItem.hoverBackground"] = ui.highlight, + ["statusBarItem.prominentBackground"] = ui.highlight, + ["statusBarItem.prominentForeground"] = ui.text_active, + ["statusBarItem.remoteBackground"] = ui.blue, + ["statusBarItem.remoteForeground"] = ui.base, + ["statusBarItem.errorBackground"] = ui.red, + ["statusBarItem.errorForeground"] = ui.base, + ["statusBarItem.warningBackground"] = ui.yellow, + ["statusBarItem.warningForeground"] = ui.base, + ["titleBar.activeBackground"] = ui.tabline, + ["titleBar.activeForeground"] = ui.text_active, + ["titleBar.inactiveBackground"] = ui.inactive_base, + ["titleBar.inactiveForeground"] = ui.text_inactive, + ["titleBar.border"] = ui.split, + ["menubar.selectionBackground"] = ui.selection, + ["menubar.selectionForeground"] = ui.text_active, + ["menu.background"] = ui.float, + ["menu.foreground"] = ui.text, + ["menu.selectionBackground"] = ui.selection, + ["menu.selectionForeground"] = ui.text_active, + ["menu.separatorBackground"] = ui.border, + ["menu.border"] = ui.border, + ["commandCenter.background"] = ui.tabline, + ["commandCenter.foreground"] = ui.text, + ["commandCenter.border"] = ui.border, + ["commandCenter.activeBackground"] = ui.highlight, + ["commandCenter.activeForeground"] = ui.text_active, + ["commandCenter.activeBorder"] = ui.accent, + ["notificationCenter.border"] = ui.border, + ["notificationCenterHeader.background"] = ui.tabline, + ["notificationCenterHeader.foreground"] = ui.text_active, + ["notifications.background"] = ui.float, + ["notifications.foreground"] = ui.text, + ["notifications.border"] = ui.border, + ["notificationLink.foreground"] = syn.blue, + ["notificationsErrorIcon.foreground"] = ui.red, + ["notificationsWarningIcon.foreground"] = ui.yellow, + ["notificationsInfoIcon.foreground"] = ui.blue, + ["banner.background"] = ui.accent, + ["banner.foreground"] = ui.base, + ["banner.iconForeground"] = ui.base, + ["pickerGroup.border"] = ui.border, + ["pickerGroup.foreground"] = ui.accent, + ["quickInput.background"] = ui.float, + ["quickInput.foreground"] = ui.text, + ["quickInputList.focusBackground"] = ui.selection, + ["quickInputList.focusForeground"] = ui.text_active, + ["quickInputTitle.background"] = ui.tabline, + ["keybindingLabel.background"] = ui.highlight, + ["keybindingLabel.foreground"] = ui.text_active, + ["keybindingLabel.border"] = ui.border, + ["keybindingLabel.bottomBorder"] = ui.border, + ["terminal.background"] = term.background, + ["terminal.foreground"] = term.foreground, + ["terminal.ansiBlack"] = term.black, + ["terminal.ansiRed"] = term.red, + ["terminal.ansiGreen"] = term.green, + ["terminal.ansiYellow"] = term.yellow, + ["terminal.ansiBlue"] = term.blue, + ["terminal.ansiMagenta"] = term.purple, + ["terminal.ansiCyan"] = term.cyan, + ["terminal.ansiWhite"] = term.white, + ["terminal.ansiBrightBlack"] = term.bright_black, + ["terminal.ansiBrightRed"] = term.bright_red, + ["terminal.ansiBrightGreen"] = term.bright_green, + ["terminal.ansiBrightYellow"] = term.bright_yellow, + ["terminal.ansiBrightBlue"] = term.bright_blue, + ["terminal.ansiBrightMagenta"] = term.bright_purple, + ["terminal.ansiBrightCyan"] = term.bright_cyan, + ["terminal.ansiBrightWhite"] = term.bright_white, + ["terminal.selectionBackground"] = ui.selection, + ["terminalCursor.foreground"] = ui.text, + ["terminalCursor.background"] = ui.base, + ["terminal.border"] = ui.split, + ["terminal.tab.activeBorder"] = ui.accent, + ["debugToolBar.background"] = ui.float, + ["debugToolBar.border"] = ui.border, + ["debugConsole.infoForeground"] = ui.blue, + ["debugConsole.warningForeground"] = ui.yellow, + ["debugConsole.errorForeground"] = ui.red, + ["debugConsole.sourceForeground"] = syn.comment, + ["debugIcon.breakpointForeground"] = ui.red, + ["debugIcon.startForeground"] = ui.green, + ["debugIcon.pauseForeground"] = ui.yellow, + ["debugIcon.stopForeground"] = ui.red, + ["debugIcon.restartForeground"] = ui.cyan, + ["debugIcon.stepOverForeground"] = ui.blue, + ["debugIcon.stepIntoForeground"] = ui.blue, + ["debugIcon.stepOutForeground"] = ui.blue, + ["debugIcon.continueForeground"] = ui.green, + ["debugTokenExpression.name"] = syn.blue, + ["debugTokenExpression.value"] = syn.text, + ["debugTokenExpression.string"] = syn.green, + ["debugTokenExpression.boolean"] = syn.orange, + ["debugTokenExpression.number"] = syn.orange, + ["debugTokenExpression.error"] = ui.red, + ["welcomePage.background"] = ui.base, + ["welcomePage.tileBackground"] = ui.float, + ["welcomePage.tileHoverBackground"] = ui.highlight, + ["welcomePage.progress.background"] = ui.prompt, + ["welcomePage.progress.foreground"] = ui.accent, + ["walkThrough.embeddedEditorBackground"] = ui.float, + ["gitDecoration.addedResourceForeground"] = syn.green, + ["gitDecoration.modifiedResourceForeground"] = syn.orange, + ["gitDecoration.deletedResourceForeground"] = syn.red, + ["gitDecoration.renamedResourceForeground"] = syn.cyan, + ["gitDecoration.stageModifiedResourceForeground"] = syn.orange, + ["gitDecoration.stageDeletedResourceForeground"] = syn.red, + ["gitDecoration.untrackedResourceForeground"] = syn.cyan, + ["gitDecoration.ignoredResourceForeground"] = ui.text_inactive, + ["gitDecoration.conflictingResourceForeground"] = syn.yellow, + ["gitDecoration.submoduleResourceForeground"] = syn.blue, + ["gitlens.gutterForegroundColor"] = ui.none_text, + ["gitlens.gutterBackgroundColor"] = ui.base, + ["gitlens.trailingLineForegroundColor"] = ui.none_text, + ["breadcrumb.foreground"] = ui.winbar, + ["breadcrumb.background"] = ui.base, + ["breadcrumb.focusForeground"] = ui.text_active, + ["breadcrumb.activeSelectionForeground"] = ui.text_active, + ["breadcrumbPicker.background"] = ui.float, + ["symbolIcon.arrayForeground"] = syn.orange, + ["symbolIcon.booleanForeground"] = syn.orange, + ["symbolIcon.classForeground"] = syn.blue, + ["symbolIcon.colorForeground"] = syn.cyan, + ["symbolIcon.constantForeground"] = syn.yellow, + ["symbolIcon.constructorForeground"] = syn.blue, + ["symbolIcon.enumeratorForeground"] = syn.cyan, + ["symbolIcon.enumeratorMemberForeground"] = syn.orange, + ["symbolIcon.eventForeground"] = syn.orange, + ["symbolIcon.fieldForeground"] = syn.red, + ["symbolIcon.fileForeground"] = ui.text, + ["symbolIcon.folderForeground"] = ui.blue, + ["symbolIcon.functionForeground"] = syn.blue, + ["symbolIcon.interfaceForeground"] = syn.orange, + ["symbolIcon.keyForeground"] = syn.yellow, + ["symbolIcon.keywordForeground"] = syn.purple, + ["symbolIcon.methodForeground"] = syn.blue, + ["symbolIcon.moduleForeground"] = syn.purple, + ["symbolIcon.namespaceForeground"] = syn.purple, + ["symbolIcon.nullForeground"] = syn.orange, + ["symbolIcon.numberForeground"] = syn.orange, + ["symbolIcon.objectForeground"] = syn.blue, + ["symbolIcon.operatorForeground"] = syn.text, + ["symbolIcon.packageForeground"] = syn.purple, + ["symbolIcon.propertyForeground"] = syn.red, + ["symbolIcon.referenceForeground"] = syn.yellow, + ["symbolIcon.snippetForeground"] = ui.text, + ["symbolIcon.stringForeground"] = syn.green, + ["symbolIcon.structForeground"] = syn.blue, + ["symbolIcon.textForeground"] = syn.text, + ["symbolIcon.typeParameterForeground"] = syn.yellow, + ["symbolIcon.unitForeground"] = syn.orange, + ["symbolIcon.variableForeground"] = syn.text, + ["ports.iconRunningProcessForeground"] = ui.green, + ["charts.red"] = ui.red, + ["charts.blue"] = ui.blue, + ["charts.yellow"] = ui.yellow, + ["charts.orange"] = ui.orange, + ["charts.green"] = ui.green, + ["charts.purple"] = ui.purple, + ["charts.foreground"] = ui.text, + ["charts.lines"] = ui.border, + ["errorLens.errorForeground"] = ui.red, + ["errorLens.warningForeground"] = ui.yellow, + ["errorLens.infoForeground"] = ui.blue, + ["errorLens.hintForeground"] = ui.cyan, + ["errorLens.errorBackground"] = alpha(ui.red, 0.12), + ["errorLens.warningBackground"] = alpha(ui.yellow, 0.12), + ["errorLens.infoBackground"] = alpha(ui.blue, 0.12), + ["errorLens.hintBackground"] = alpha(ui.cyan, 0.12), + ["inlineChat.background"] = ui.float, + ["inlineChat.border"] = ui.border, + ["inlineChatInput.background"] = ui.prompt, + ["inlineChatInput.border"] = ui.border, + ["inlineChatDiff.inserted"] = alpha(syn.green, 0.18), + ["inlineChatDiff.removed"] = alpha(syn.red, 0.18), + ["editorGhostText.foreground"] = ui.text_inactive, + ["editor.inlineSuggest.background"] = alpha(ui.highlight, 0.7), + ["editorLightBulb.foreground"] = ui.yellow, + ["editorLightBulbAutoFix.foreground"] = ui.cyan, + ["notebook.cellBorderColor"] = ui.split, + ["notebook.cellEditorBackground"] = ui.inactive_base, + ["notebook.cellHoverBackground"] = ui.highlight, + ["notebook.focusedCellBorder"] = ui.accent, + ["notebook.outputContainerBackgroundColor"] = ui.tool, + ["settings.headerForeground"] = ui.text_active, + ["settings.modifiedItemIndicator"] = ui.accent, + ["settings.focusedRowBackground"] = ui.current_line, + ["settings.rowHoverBackground"] = ui.highlight, + ["walkthrough.stepTitle.foreground"] = ui.text_active, + ["profileBadge.background"] = ui.accent, + ["profileBadge.foreground"] = ui.base, + ["editorUnnecessary.foreground"] = syn.mute, + ["diffEditor.unchangedRegionBackground"] = ui.tool, + ["diffEditor.unchangedRegionForeground"] = ui.text_inactive, + ["diffEditor.unchangedCodeBackground"] = alpha(ui.highlight, 0.28), + ["editor.linkedEditingBackground"] = alpha(ui.cyan, 0.16), + ["editor.snippetTabstopHighlightBackground"] = alpha(ui.accent, 0.22), + ["editor.snippetFinalTabstopHighlightBorder"] = ui.accent, + ["editorUnicodeHighlight.border"] = ui.yellow, + ["editorUnicodeHighlight.background"] = alpha(ui.yellow, 0.12), + ["problemsErrorIcon.foreground"] = ui.red, + ["problemsWarningIcon.foreground"] = ui.yellow, + ["problemsInfoIcon.foreground"] = ui.blue, + ["editorHoverWidget.highlightForeground"] = ui.text_match, + ["editorCommentsWidget.resolvedBorder"] = ui.cyan, + ["editorCommentsWidget.unresolvedBorder"] = ui.accent, + ["editorCommentsWidget.rangeBackground"] = alpha(ui.accent, 0.12), + ["editorCommentsWidget.rangeActiveBackground"] = alpha(ui.accent, 0.22), + ["comment.foreground"] = syn.comment, + ["commentThread.rangeBackground"] = alpha(ui.accent, 0.1), + ["extensionButton.prominentBackground"] = ui.accent, + ["extensionButton.prominentForeground"] = ui.base, + ["extensionButton.prominentHoverBackground"] = ui.blue, + ["extensionBadge.remoteBackground"] = ui.blue, + ["extensionBadge.remoteForeground"] = ui.base, + ["toolbar.hoverBackground"] = ui.highlight, + ["toolbar.activeBackground"] = ui.selection, + ["editorMultiCursor.primary.foreground"] = ui.text, + ["editorMultiCursor.secondary.foreground"] = ui.accent, + ["editorWatermark.foreground"] = ui.text_inactive, + ["chat.requestBackground"] = ui.float, + ["chat.requestBorder"] = ui.border, + ["chat.slashCommandBackground"] = ui.highlight, + ["chat.slashCommandForeground"] = ui.accent, + ["chat.avatarBackground"] = ui.prompt, + ["chat.avatarForeground"] = ui.accent, + ["inlineEdit.originalBackground"] = alpha(syn.red, 0.14), + ["inlineEdit.modifiedBackground"] = alpha(syn.green, 0.14), + ["inlineEdit.originalChangedLineBackground"] = diff_del, + ["inlineEdit.originalChangedTextBackground"] = alpha(syn.red, 0.22), + ["inlineEdit.modifiedChangedLineBackground"] = diff_add, + ["inlineEdit.modifiedChangedTextBackground"] = alpha(syn.green, 0.22), + ["inlineEdit.gutterIndicator.primaryBackground"] = ui.accent, + ["inlineEdit.gutterIndicator.primaryForeground"] = ui.base, + ["inlineEdit.gutterIndicator.secondaryBackground"] = ui.highlight, + ["inlineEdit.gutterIndicator.secondaryForeground"] = ui.text, + ["inlineEdit.gutterIndicator.successfulBackground"] = ui.green, + ["inlineEdit.gutterIndicator.successfulForeground"] = ui.base, + ["editor.compositionBackground"] = ui.current_line, + ["editor.findMatchHighlightBorder"] = "#00000000", + ["tab.activeModifiedBorder"] = syn.orange, + ["tab.inactiveModifiedBorder"] = syn.orange, + ["editor.placeholder.foreground"] = ui.text_inactive, + ["simpleFindWidget.sashBorder"] = ui.border, + ["editorWarning.background"] = alpha(ui.yellow, 0.08), + ["editorInfo.background"] = alpha(ui.blue, 0.08), + ["editorError.background"] = alpha(ui.red, 0.08), + ["diffEditor.insertedTextBorder"] = "#00000000", + ["diffEditor.removedTextBorder"] = "#00000000", + ["scmGraph.foreground1"] = syn.blue, + ["scmGraph.foreground2"] = syn.purple, + ["scmGraph.foreground3"] = syn.cyan, + ["scmGraph.foreground4"] = syn.green, + ["scmGraph.foreground5"] = syn.orange, + ["scmGraph.historyItemRefColor"] = syn.blue, + ["scmGraph.historyItemRemoteRefColor"] = syn.cyan, + ["scmGraph.historyItemBaseRefColor"] = syn.orange, + ["multiDiffEditor.headerBackground"] = ui.tabline, + ["multiDiffEditor.background"] = ui.base, + ["multiDiffEditor.border"] = ui.split, + ["actionBar.toggledBackground"] = ui.selection, + ["editorGutter.commentRangeForeground"] = ui.none_text, + ["editorGutter.commentGlyphForeground"] = ui.accent, + ["editorGutter.commentUnresolvedGlyphForeground"] = ui.yellow, + ["peekViewEditorGutter.background"] = ui.float, + ["peekViewEditorStickyScroll.background"] = ui.float, + ["editor.inlineValuesForeground"] = syn.cyan, + ["editor.inlineValuesBackground"] = alpha(ui.highlight, 0.7), + ["testing.iconFailed"] = ui.red, + ["testing.iconErrored"] = ui.red, + ["testing.iconPassed"] = ui.green, + ["testing.iconQueued"] = ui.yellow, + ["testing.iconUnset"] = ui.text_inactive, + ["testing.iconSkipped"] = ui.cyan, + ["testing.peekHeaderBackground"] = ui.float, + ["testing.message.error.lineBackground"] = alpha(ui.red, 0.12), + ["testing.message.info.lineBackground"] = alpha(ui.blue, 0.12), + ["commandCenter.debuggingBackground"] = ui.red, + ["statusBar.focusBorder"] = ui.accent, + ["sideBarStickyScroll.background"] = ui.tool, + ["sideBarStickyScroll.shadow"] = alpha(ui.tabline, 0.35), + ["panelStickyScroll.background"] = ui.tool, + ["editorPane.background"] = ui.base, + ["outputView.background"] = ui.tool, + ["outputViewStickyScroll.background"] = ui.tool, + ["searchEditor.findMatchBackground"] = ui.selection, + ["search.resultsInfoForeground"] = ui.text_inactive, + ["editorLink.activeForeground"] = syn.blue, + ["editor.focusedStackFrameHighlightBackground"] = alpha(syn.green, 0.18), + ["editor.stackFrameHighlightBackground"] = alpha(syn.yellow, 0.16), + ["debugView.exceptionLabelForeground"] = ui.base, + ["debugView.exceptionLabelBackground"] = ui.red, + ["debugView.stateLabelForeground"] = ui.text, + ["debugView.stateLabelBackground"] = ui.highlight, + ["debugView.valueChangedHighlight"] = ui.cyan, + ["debugConsoleInputIcon.foreground"] = ui.accent, + ["editorStickyScroll.border"] = ui.split, + ["tab.dragAndDropBorder"] = ui.accent, + ["editorGroup.dropIntoPromptForeground"] = ui.text_active, + ["editorGroup.dropIntoPromptBackground"] = ui.float, + ["editorGroup.dropIntoPromptBorder"] = ui.border, + ["sideBar.dropBackground"] = alpha(ui.accent, 0.18), + ["list.dropBackground"] = alpha(ui.accent, 0.18), + ["list.dropBetweenBackground"] = ui.accent, + ["settings.dropdownBackground"] = ui.float, + ["settings.dropdownForeground"] = ui.text, + ["settings.dropdownBorder"] = ui.border, + ["settings.checkboxBackground"] = ui.prompt, + ["settings.checkboxForeground"] = ui.text_active, + ["settings.checkboxBorder"] = ui.border, + ["settings.textInputBackground"] = ui.prompt, + ["settings.textInputForeground"] = syn.text, + ["settings.textInputBorder"] = ui.border, + ["settings.numberInputBackground"] = ui.prompt, + ["settings.numberInputForeground"] = syn.text, + ["settings.numberInputBorder"] = ui.border, + ["settings.sashBorder"] = ui.split, + ["terminal.inactiveSelectionBackground"] = alpha(ui.selection, 0.45), + ["terminalCommandDecoration.defaultBackground"] = ui.text_inactive, + ["terminalCommandDecoration.successBackground"] = ui.green, + ["terminalCommandDecoration.errorBackground"] = ui.red, + ["terminalOverviewRuler.cursorForeground"] = ui.text, + ["terminalOverviewRuler.findMatchForeground"] = ui.purple, + ["editorIndentGuide.background"] = alpha(ui.none_text, 0.45), + ["editorIndentGuide.activeBackground"] = ui.border, + ["diffEditor.move.border"] = ui.cyan, + ["diffEditor.moveActive.border"] = ui.accent, + ["editorGutter.itemBackground"] = ui.highlight, + ["editorGutter.itemGlyphForeground"] = ui.text, + ["editorHoverHighlight.background"] = alpha(ui.accent, 0.12), + ["gauge.background"] = ui.highlight, + ["gauge.foreground"] = ui.accent, + ["gauge.border"] = ui.border, + ["gauge.warningBackground"] = ui.yellow, + ["gauge.errorBackground"] = ui.red, + ["radio.activeForeground"] = ui.text_active, + ["radio.activeBackground"] = ui.selection, + ["radio.activeBorder"] = ui.accent, + ["radio.inactiveForeground"] = ui.text, + ["radio.inactiveBorder"] = ui.border, + ["checkbox.selectBackground"] = ui.accent, + ["checkbox.selectBorder"] = ui.accent, + ["editor.selectionHighlightBorder"] = "#00000000", + ["editor.wordHighlightBorder"] = "#00000000", + ["editor.wordHighlightStrongBorder"] = "#00000000", + ["editor.findMatchBorder"] = ui.purple, + ["editor.rangeHighlightBorder"] = "#00000000", + ["editor.symbolHighlightBorder"] = "#00000000", + ["diffEditor.unchangedRegionShadow"] = alpha(ui.tabline, 0.35), + ["editorOverviewRuler.incomingContentForeground"] = syn.green, + ["editorOverviewRuler.currentContentForeground"] = syn.blue, + ["editorOverviewRuler.commonContentForeground"] = ui.border, + ["mergeEditor.change.background"] = alpha(syn.yellow, 0.14), + ["mergeEditor.change.word.background"] = alpha(syn.yellow, 0.22), + ["mergeEditor.conflict.unhandledUnfocused.border"] = ui.red, + ["mergeEditor.conflict.unhandledFocused.border"] = ui.red, + ["mergeEditor.conflict.handledUnfocused.border"] = ui.green, + ["mergeEditor.conflict.handledFocused.border"] = ui.green, + ["mergeEditor.conflict.handled.minimapOverViewRuler"] = ui.green, + ["mergeEditor.conflict.unhandled.minimapOverViewRuler"] = ui.red, + ["editorGhostText.border"] = "#00000000", + ["editorStickyScrollGutter.background"] = ui.base, + ["editorLineNumber.dimmedForeground"] = syn.mute, + ["tab.selectedBackground"] = ui.base, + ["tab.selectedForeground"] = ui.text_active, + ["editorGroupHeader.border"] = ui.split, + ["commentsView.resolvedIcon"] = ui.cyan, + ["commentsView.unresolvedIcon"] = ui.accent, + ["editorCommentsWidget.replyInputBackground"] = ui.prompt, + ["peekViewEditor.matchHighlightBorder"] = ui.accent, + ["editorMarkerNavigationError.headerBackground"] = alpha(ui.red, 0.16), + ["editorMarkerNavigationWarning.headerBackground"] = alpha(ui.yellow, 0.16), + ["editorMarkerNavigationInfo.headerBackground"] = alpha(ui.blue, 0.16), + disabledForeground = ui.text_inactive, + ["editorInfo.border"] = "#00000000", + ["editorWarning.border"] = "#00000000", + ["editorError.border"] = "#00000000", + ["editorHint.border"] = "#00000000", + contrastActiveBorder = "#00000000", + contrastBorder = "#00000000", + ["editorWidget.resizeBorder"] = ui.accent, + ["debugIcon.breakpointDisabledForeground"] = ui.text_inactive, + ["debugIcon.breakpointUnverifiedForeground"] = ui.yellow, + ["debugIcon.breakpointCurrentStackframeForeground"] = ui.yellow, + ["debugIcon.breakpointStackframeForeground"] = syn.green, + ["statusBarItem.offlineBackground"] = ui.statusline, + ["statusBarItem.offlineForeground"] = ui.text_inactive, + ["statusBarItem.focusBorder"] = ui.accent, + ["statusBarItem.compactHoverBackground"] = ui.highlight, + ["activityBar.activeBackground"] = ui.base, + ["activityBar.activeFocusBorder"] = ui.accent, + ["sideBarActivityBarTop.border"] = ui.split, + ["panelInput.border"] = ui.border, + ["panelSection.dropBackground"] = alpha(ui.accent, 0.18), + ["panelSectionHeader.foreground"] = ui.text_active, + ["panelSectionHeader.border"] = ui.split, + ["imagePreview.border"] = ui.split, + ["editorLightBulbAi.foreground"] = ui.purple, + ["editorMultiDiff.headerBackground"] = ui.tabline, + ["inlineChat.shadow"] = alpha(ui.tabline, 0.4), + ["inlineChatInput.focusBorder"] = ui.accent, + ["inlineChatInput.placeholderForeground"] = ui.text_inactive, + ["editor.inlineSuggest.foreground"] = ui.text_inactive, + ["editor.inlineSuggest.indicator.foreground"] = ui.accent, + ["editor.inlineSuggest.indicator.background"] = ui.float, + ["chat.editedFileForeground"] = syn.orange, + ["chat.requestCodeBorder"] = ui.border, + ["chat.requestBubbleBackground"] = ui.float, + ["chat.requestBubbleHoverBackground"] = ui.highlight, + ["inlineEdit.tabWillAcceptModifiedBorder"] = ui.green, + ["inlineEdit.tabWillAcceptOriginalBorder"] = ui.red, + ["inlineEdit.modifiedBorder"] = syn.green, + ["inlineEdit.originalBorder"] = syn.red, + ["editor.selectionForeground"] = syn.text, + ["list.activeSelectionIconForeground"] = ui.text_active, + ["list.inactiveSelectionIconForeground"] = ui.text, + ["list.focusAndSelectionOutline"] = ui.accent, + ["list.focusOutline"] = ui.accent, + ["list.inactiveFocusBackground"] = ui.highlight, + ["list.inactiveFocusOutline"] = ui.border, + ["tree.tableColumnsBorder"] = ui.split, + ["tree.tableOddRowsBackground"] = alpha(ui.highlight, 0.35), + ["editor.wordHighlightTextBackground"] = alpha(ui.accent, 0.14), + ["editor.wordHighlightTextBorder"] = "#00000000", + ["searchEditor.findMatchBorder"] = ui.accent, + ["minimap.foregroundOpacity"] = "#000000c0", + ["minimap.infoHighlight"] = ui.blue, + ["minimapSlider.background"] = alpha(ui.accent, 0.25), + ["minimapSlider.hoverBackground"] = alpha(ui.accent, 0.4), + ["minimapSlider.activeBackground"] = alpha(ui.accent, 0.55), + ["editorOverviewRuler.bracketMatchForeground"] = ui.orange, + ["editorBracketPairGuide.background1"] = alpha(syn.blue, 0.35), + ["editorBracketPairGuide.background2"] = alpha(syn.purple, 0.35), + ["editorBracketPairGuide.background3"] = alpha(syn.cyan, 0.35), + ["editorBracketPairGuide.background4"] = alpha(syn.yellow, 0.35), + ["editorBracketPairGuide.background5"] = alpha(syn.orange, 0.35), + ["editorBracketPairGuide.background6"] = alpha(syn.green, 0.35), + ["editorBracketPairGuide.activeBackground1"] = syn.blue, + ["editorBracketPairGuide.activeBackground2"] = syn.purple, + ["editorBracketPairGuide.activeBackground3"] = syn.cyan, + ["editorBracketPairGuide.activeBackground4"] = syn.yellow, + ["editorBracketPairGuide.activeBackground5"] = syn.orange, + ["editorBracketPairGuide.activeBackground6"] = syn.green, + ["editorInlayHint.parameterBackground"] = alpha(ui.highlight, 0.65), + ["editorInlayHint.typeBackground"] = alpha(ui.highlight, 0.65), + ["editorGhostText.background"] = "#00000000", + ["notebook.editorBackground"] = ui.base, + ["notebook.focusedEditorBorder"] = ui.accent, + ["notebookStatusSuccessIcon.foreground"] = ui.green, + ["notebookStatusErrorIcon.foreground"] = ui.red, + ["notebookStatusRunningIcon.foreground"] = ui.blue, + ["notebook.selectedCellBackground"] = ui.selection, + ["notebook.selectedCellBorder"] = ui.accent, + ["notebook.inactiveSelectedCellBorder"] = ui.border, + ["notebook.cellStatusBarItemHoverBackground"] = ui.highlight, + ["notebook.cellInsertionIndicator"] = ui.accent, + ["notebook.cellToolbarSeparator"] = ui.split, + ["notebookScrollbarSlider.background"] = alpha(ui.accent, 0.35), + ["notebookScrollbarSlider.hoverBackground"] = alpha(ui.accent, 0.5), + ["notebookScrollbarSlider.activeBackground"] = alpha(ui.accent, 0.7), + ["notebook.symbolHighlightBackground"] = alpha(ui.accent, 0.16), + ["pullRequests.open"] = syn.green, + ["pullRequests.closed"] = syn.red, + ["pullRequests.merged"] = syn.purple, + ["pullRequests.draft"] = ui.text_inactive, + ["pullRequests.notification"] = ui.accent, + ["issues.open"] = syn.green, + ["issues.closed"] = syn.purple, + ["gitlens.graphLane1Color"] = syn.blue, + ["gitlens.graphLane2Color"] = syn.purple, + ["gitlens.graphLane3Color"] = syn.cyan, + ["gitlens.graphLane4Color"] = syn.green, + ["gitlens.graphLane5Color"] = syn.orange, + ["gitlens.graphLane6Color"] = syn.yellow, + ["gitlens.graphLane7Color"] = syn.red, + ["gitlens.graphLane8Color"] = ui.accent, + ["gitlens.graphLane9Color"] = ui.winbar, + ["gitlens.graphLane10Color"] = syn.mute, + ["gitlens.closedAutolinkedIssueIconColor"] = syn.purple, + ["gitlens.closedPullRequestIconColor"] = syn.red, + ["gitlens.mergedPullRequestIconColor"] = syn.purple, + ["gitlens.openAutolinkedIssueIconColor"] = syn.green, + ["gitlens.openPullRequestIconColor"] = syn.green, + ["editorUnnecessaryCode.border"] = "#00000000", + ["tab.hoverBorder"] = "#00000000", + ["tab.unfocusedHoverBackground"] = ui.highlight, + ["tab.unfocusedActiveBorderTop"] = alpha(ui.accent, 0.5), + ["editorGroup.emptyBackground"] = ui.base, + ["statusBar.debuggingBorder"] = ui.split, + ["statusBar.noFolderBorder"] = ui.split, + ["menubar.selectionBorder"] = "#00000000", + ["notificationToast.border"] = ui.border, + ["widget.border"] = ui.border, + ["terminal.dropBackground"] = alpha(ui.accent, 0.18), + ["terminalStickyScroll.background"] = ui.base, + ["terminalStickyScrollHover.background"] = ui.current_line, + ["inlineChat.foreground"] = ui.text, + ["chat.checkpointSeparator"] = ui.border, + ["editor.compositionBorder"] = ui.accent, + ["editor.snippetTabstopHighlightBorder"] = "#00000000", + ["editor.snippetFinalTabstopHighlightBackground"] = alpha(ui.accent, 0.12), + ["commandCenter.inactiveForeground"] = ui.text_inactive, + ["commandCenter.inactiveBorder"] = ui.border, + ["testing.messagePeekBorder"] = ui.border, + ["testing.messagePeekHeaderBackground"] = ui.float, + ["testing.coverCountBadgeBackground"] = ui.accent, + ["testing.coverCountBadgeForeground"] = ui.base, + ["testing.coveredBackground"] = alpha(syn.green, 0.14), + ["testing.coveredBorder"] = alpha(syn.green, 0.35), + ["testing.uncoveredBackground"] = alpha(syn.red, 0.14), + ["testing.uncoveredBorder"] = alpha(syn.red, 0.35), + ["testing.coverPreviousRunForeground"] = syn.cyan, + ["merge.border"] = "#00000000", + ["panel.dropBorder"] = ui.accent, + ["statusBarItem.hoverForeground"] = ui.text_active, + ["statusBarItem.prominentHoverForeground"] = ui.text_active, + ["statusBarItem.remoteHoverBackground"] = ui.accent, + ["statusBarItem.remoteHoverForeground"] = ui.base, + ["statusBarItem.errorHoverBackground"] = ui.red, + ["statusBarItem.errorHoverForeground"] = ui.base, + ["statusBarItem.warningHoverBackground"] = ui.yellow, + ["statusBarItem.warningHoverForeground"] = ui.base, + ["activityBarTop.activeBorder"] = ui.accent, + ["welcomePage.tileBorder"] = ui.border, + } +end + +--- @param colors AstroThemePalette +local function token_colors(colors) + local syn, ui = colors.syntax, colors.ui + return { + scope( + "Comment", + { "comment", "punctuation.definition.comment", "string.comment" }, + syn.comment, + { fontStyle = "italic" } + ), + scope( + "Doc comment", + { "comment.block.documentation", "string.quoted.docstring" }, + syn.comment, + { fontStyle = "italic" } + ), + scope("String", { "string", "string.quoted", "string.template", "punctuation.definition.string" }, syn.green), + scope("String escape", { "constant.character.escape", "string.escape", "constant.other.placeholder" }, syn.red), + scope("Regexp", { "string.regexp", "constant.regexp" }, syn.green), + scope("Number", { "constant.numeric", "constant.numeric.integer" }, syn.orange), + scope("Float", { "constant.numeric.float", "constant.numeric.decimal" }, syn.yellow), + scope( + "Boolean / null", + { "constant.language.boolean", "constant.language.null", "constant.language.nil", "constant.language.undefined" }, + syn.orange + ), + scope( + "Constant", + { "constant", "constant.language", "constant.other", "variable.other.constant", "support.constant" }, + syn.yellow + ), + scope("Variable", { "variable", "variable.other", "variable.other.readwrite", "identifier" }, syn.text), + scope( + "Builtin variable", + { "variable.language", "variable.language.special", "support.variable", "variable.other.predefined" }, + syn.cyan + ), + scope("Parameter", { "variable.parameter", "meta.function.parameters variable" }, syn.orange), + scope("Property / member", { + "variable.other.property", + "variable.other.object.property", + "support.type.property-name", + "meta.object-literal.key", + "meta.definition.property", + }, syn.red), + scope( + "Function", + { "entity.name.function", "support.function", "meta.function-call", "meta.method-call" }, + syn.blue + ), + scope("Builtin function", { "support.function.builtin", "support.function.magic" }, syn.cyan), + scope("Macro", { "entity.name.function.macro", "support.function.macro", "meta.preprocessor.macro" }, syn.yellow), + scope("Keyword", { "keyword", "keyword.control", "keyword.other", "storage.modifier.async" }, syn.purple), + scope( + "Import", + { "keyword.control.import", "keyword.control.from", "keyword.control.export", "keyword.other.import" }, + syn.purple + ), + scope("Operator", { "keyword.operator", "punctuation.separator", "punctuation.accessor" }, syn.text), + scope("Storage", { "storage", "storage.type", "storage.modifier" }, syn.blue), + scope( + "Type", + { "entity.name.type", "entity.name.class", "entity.name.struct", "support.type", "support.class" }, + syn.blue + ), + scope( + "Builtin type", + { "support.type.builtin", "support.type.primitive", "storage.type.builtin", "storage.type.primitive" }, + syn.yellow + ), + scope( + "Namespace / module", + { "entity.name.namespace", "entity.name.scope-resolution", "entity.name.module", "support.module" }, + syn.purple + ), + scope( + "Attribute / decorator", + { "entity.other.attribute-name", "meta.decorator", "punctuation.decorator", "entity.name.function.decorator" }, + syn.yellow + ), + scope("Tag", { "entity.name.tag" }, syn.red), + scope("Tag delimiter", { "punctuation.definition.tag" }, syn.text), + scope( + "Tag attribute", + { "entity.other.attribute-name.html", "entity.other.attribute-name.xml", "meta.tag.attributes" }, + syn.cyan + ), + scope( + "Punctuation", + { "punctuation", "meta.brace", "punctuation.definition.block", "punctuation.section" }, + syn.text + ), + scope("Invalid", { "invalid", "invalid.illegal" }, ui.red), + scope("Deprecated", { "invalid.deprecated" }, ui.yellow, { fontStyle = "strikethrough" }), + scope("URL", { "markup.underline.link", "*url*", "*link*", "*uri*" }, syn.blue, { fontStyle = "italic underline" }), + scope("Markup heading", { "markup.heading", "entity.name.section" }, syn.text, { fontStyle = "bold" }), + scope("Markup heading 1", { "markup.heading.1", "heading.1" }, syn.purple, { fontStyle = "bold" }), + scope("Markup heading 2", { "markup.heading.2", "heading.2" }, syn.blue, { fontStyle = "bold" }), + scope("Markup heading 3", { "markup.heading.3", "heading.3" }, syn.cyan, { fontStyle = "bold" }), + scope("Markup heading 4", { "markup.heading.4", "heading.4" }, syn.green, { fontStyle = "bold" }), + scope( + "Markup heading 5-6", + { "markup.heading.5", "markup.heading.6", "heading.5", "heading.6" }, + syn.yellow, + { fontStyle = "bold" } + ), + scope("Markup bold", { "markup.bold" }, syn.text, { fontStyle = "bold" }), + scope("Markup italic", { "markup.italic" }, syn.text, { fontStyle = "italic" }), + scope("Markup strikethrough", { "markup.strikethrough" }, syn.text, { fontStyle = "strikethrough" }), + scope("Markup quote", { "markup.quote" }, syn.text, { fontStyle = "italic" }), + scope("Markup raw", { "markup.inline.raw", "markup.raw.inline", "markup.fenced_code", "markup.raw" }, syn.red), + scope("Markup list", { "markup.list", "punctuation.definition.list" }, syn.blue), + scope( + "Markup link text", + { "string.other.link", "markup.underline.link.markdown", "meta.link.inline" }, + syn.yellow, + { fontStyle = "bold" } + ), + scope( + "JSON key", + { "support.type.property-name.json", "meta.structure.dictionary.json support.type.property-name" }, + syn.blue + ), + scope("CSS property", { "support.type.property-name.css", "meta.property-name.css" }, syn.orange), + scope("CSS class", { "entity.other.attribute-name.class.css", "entity.other.attribute-name.class" }, syn.yellow), + scope("CSS id", { "entity.other.attribute-name.id.css", "entity.other.attribute-name.id" }, syn.blue), + scope("CSS tag", { "entity.name.tag.css", "source.css entity.name.tag" }, syn.purple), + scope("CSS number", { "constant.numeric.css", "source.css constant.numeric" }, syn.cyan), + scope("JS/TS this / super", { "variable.language.this", "variable.language.super" }, syn.cyan), + scope("JS/TS class", { "entity.name.type.class", "entity.name.class.js", "entity.name.class.ts" }, syn.blue), + scope("JS/TS constructor", { "meta.class storage.modifier", "entity.name.function.constructor" }, syn.purple), + scope("TS type modifier", { + "storage.type.ts", + "storage.type.tsx", + "keyword.operator.expression.typeof", + "keyword.operator.expression.instanceof", + }, syn.purple), + scope( + "Python self", + { "variable.parameter.function.language.special.self.python", "variable.language.special.self.python" }, + syn.cyan + ), + scope( + "Python decorator", + { "entity.name.function.decorator.python", "punctuation.definition.decorator.python" }, + syn.yellow + ), + scope("Rust type", { "entity.name.type.rust", "storage.type.rust" }, syn.cyan), + scope("Rust module", { "entity.name.module.rust", "meta.import.rust" }, syn.purple), + scope("Rust macro", { "entity.name.function.macro.rust", "support.function.macro.rust" }, syn.red), + scope("Lua constructor", { "support.function.builtin.lua" }, syn.cyan), + scope("TOML key", { "support.type.property-name.toml", "entity.other.attribute-name.table.toml" }, syn.red), + scope("YAML key", { "entity.name.tag.yaml", "source.yaml entity.name.tag" }, syn.red), + scope("PHP variable", { "variable.other.php" }, syn.text), + scope("Diff added", { "markup.inserted", "diff.inserted" }, syn.green), + scope("Diff deleted", { "markup.deleted", "diff.deleted" }, syn.red), + scope("Diff changed", { "markup.changed", "diff.changed" }, syn.orange), + scope("Gitgutter / submodule", { "markup.ignored", "markup.untracked" }, ui.text_inactive), + scope("TODO", { "keyword.todo" }, ui.yellow), + scope("Unit", { "keyword.other.unit" }, syn.cyan), + scope("JSDoc type", { "storage.type.class.jsdoc" }, syn.yellow), + scope( + "Special comment", + { "comment.line.double-slash.documentation", "punctuation.definition.comment.documentation" }, + ui.none_text, + { fontStyle = "italic" } + ), + } +end + +--- @param colors AstroThemePalette +local function semantic_tokens(colors) + local syn, ui = colors.syntax, colors.ui + return { + comment = { + foreground = syn.comment, + italic = true, + }, + string = syn.green, + regexp = syn.cyan, + number = syn.orange, + boolean = syn.orange, + keyword = syn.purple, + ["keyword.control"] = syn.purple, + operator = syn.text, + namespace = syn.purple, + type = syn.blue, + ["type.defaultLibrary"] = syn.yellow, + struct = syn.blue, + class = syn.blue, + ["class.defaultLibrary"] = syn.yellow, + interface = syn.orange, + enum = syn.cyan, + enumMember = syn.orange, + typeParameter = syn.yellow, + ["function"] = syn.blue, + ["function.defaultLibrary"] = syn.cyan, + method = syn.blue, + macro = syn.yellow, + decorator = syn.orange, + variable = syn.text, + ["variable.readonly"] = syn.yellow, + ["variable.defaultLibrary"] = syn.cyan, + parameter = syn.orange, + property = syn.red, + ["property.readonly"] = syn.red, + event = syn.orange, + label = syn.blue, + selfKeyword = syn.cyan, + selfParameter = syn.cyan, + builtinAttribute = syn.yellow, + escapeSequence = syn.red, + formatSpecifier = syn.text, + ["*.deprecated"] = { + foreground = ui.yellow, + strikethrough = true, + }, + ["*.modification"] = { + underline = true, + }, + unresolvedReference = ui.red, + } +end + +--- @param colors AstroThemePalette +function M.generate(colors) + local dark = Color.new(colors.ui.base):less(127) + local theme = { + name = colors._style_name, + type = dark and "dark" or "light", + semanticHighlighting = true, + semanticTokenColors = semantic_tokens(colors), + colors = workbench(colors), + tokenColors = token_colors(colors), + } + return encode(theme) .. "\n" +end + +return M