diff --git a/extras/zed/README.md b/extras/zed/README.md index a1c388e..299ec75 100644 --- a/extras/zed/README.md +++ b/extras/zed/README.md @@ -9,15 +9,12 @@ Open [Zed](https://zed.dev) and select the theme under `Settings -> Select Theme Alternatively, put the following config into your `settings.json` under `~/.config/zed`. ```json -// settings.json { - // --- - "theme": { - "mode": "system", - "light": "Cyberdream light", - "dark": "Cyberdream dark" - } - // --- + "theme": { + "mode": "system", + "light": "Cyberdream light", + "dark": "Cyberdream dark" + } } ``` diff --git a/extras/zed/cyberdream-light.json b/extras/zed/cyberdream-light.json index 0fb27a4..035ccb4 100644 --- a/extras/zed/cyberdream-light.json +++ b/extras/zed/cyberdream-light.json @@ -44,10 +44,10 @@ "title_bar.background": null, "toolbar.background": "#ffffff", "tab_bar.background": null, - "tab.inactive_background": null, - "tab.active_background": null, - "search.match_background": null, - "panel.background": null, + "tab.inactive_background": "#ffffff", + "tab.active_background": "#eaeaea", + "search.match_background": "#d17c0080", + "panel.background": "#ffffff", "panel.focused_border": null, "pane.focused_border": null, "pane_group.border": null, @@ -71,7 +71,7 @@ "editor.indent_guide_active": null, "editor.document_highlight.read_background": null, "editor.document_highlight.write_background": null, - "terminal.background": null, + "terminal.background": "#ffffff", "terminal.foreground": null, "terminal.bright_foreground": null, "terminal.dim_foreground": null, diff --git a/extras/zed/cyberdream.json b/extras/zed/cyberdream.json index 88fc095..2783441 100644 --- a/extras/zed/cyberdream.json +++ b/extras/zed/cyberdream.json @@ -44,10 +44,10 @@ "title_bar.background": null, "toolbar.background": "#16181a", "tab_bar.background": null, - "tab.inactive_background": null, - "tab.active_background": null, - "search.match_background": null, - "panel.background": null, + "tab.inactive_background": "#16181a", + "tab.active_background": "#1e2124", + "search.match_background": "#ffbd5e80", + "panel.background": "#16181a", "panel.focused_border": null, "pane.focused_border": null, "pane_group.border": null, @@ -71,7 +71,7 @@ "editor.indent_guide_active": null, "editor.document_highlight.read_background": null, "editor.document_highlight.write_background": null, - "terminal.background": null, + "terminal.background": "#16181a", "terminal.foreground": null, "terminal.bright_foreground": null, "terminal.dim_foreground": null, diff --git a/lua/cyberdream/extra/zed.lua b/lua/cyberdream/extra/zed.lua index f0493cb..06d7565 100644 --- a/lua/cyberdream/extra/zed.lua +++ b/lua/cyberdream/extra/zed.lua @@ -6,8 +6,14 @@ local M = {} --- Generate cyberdream theme for https://zed.dev/ --- @param variant string: Variation of the colorscheme to use. function M.generate(variant) - local modified_colors = vim.fn.copy(colors[variant]) - modified_colors.variant = variant == "default" and "dark" or "light" + local extended_colors = vim.fn.copy(colors[variant]) + + for key, value in pairs(colors[variant]) do + extended_colors[key .. "Alpha"] = value .. "80" -- 50% transparency + end + + extended_colors.variant = variant == "default" and "dark" or "light" + local template = [==[ { "$schema": "https://zed.dev/schema/themes/v0.1.0.json", @@ -55,10 +61,10 @@ function M.generate(variant) "title_bar.background": null, "toolbar.background": "${bg}", "tab_bar.background": null, - "tab.inactive_background": null, - "tab.active_background": null, - "search.match_background": null, - "panel.background": null, + "tab.inactive_background": "${bg}", + "tab.active_background": "${bgAlt}", + "search.match_background": "${orangeAlpha}", + "panel.background": "${bg}", "panel.focused_border": null, "pane.focused_border": null, "pane_group.border": null, @@ -82,7 +88,7 @@ function M.generate(variant) "editor.indent_guide_active": null, "editor.document_highlight.read_background": null, "editor.document_highlight.write_background": null, - "terminal.background": null, + "terminal.background": "${bg}", "terminal.foreground": null, "terminal.bright_foreground": null, "terminal.dim_foreground": null, @@ -330,7 +336,7 @@ function M.generate(variant) } ]==] - return util.parse_extra_template(template, modified_colors) + return util.parse_extra_template(template, extended_colors) end return M