Skip to content

Commit 6689105

Browse files
authored
feat(extras): update zed windows and search highlights
* feat(extras-zed): Add background and search highlight colors * chore: generate extras --------- Co-authored-by: byt3m4st3r <[email protected]>
1 parent f86f4ac commit 6689105

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

extras/zed/README.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ Open [Zed](https://zed.dev) and select the theme under `Settings -> Select Theme
99
Alternatively, put the following config into your `settings.json` under `~/.config/zed`.
1010

1111
```json
12-
// settings.json
1312
{
14-
// ---
15-
"theme": {
16-
"mode": "system",
17-
"light": "Cyberdream light",
18-
"dark": "Cyberdream dark"
19-
}
20-
// ---
13+
"theme": {
14+
"mode": "system",
15+
"light": "Cyberdream light",
16+
"dark": "Cyberdream dark"
17+
}
2118
}
2219
```
2320

extras/zed/cyberdream-light.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
"title_bar.background": null,
4545
"toolbar.background": "#ffffff",
4646
"tab_bar.background": null,
47-
"tab.inactive_background": null,
48-
"tab.active_background": null,
49-
"search.match_background": null,
50-
"panel.background": null,
47+
"tab.inactive_background": "#ffffff",
48+
"tab.active_background": "#eaeaea",
49+
"search.match_background": "#d17c0080",
50+
"panel.background": "#ffffff",
5151
"panel.focused_border": null,
5252
"pane.focused_border": null,
5353
"pane_group.border": null,
@@ -71,7 +71,7 @@
7171
"editor.indent_guide_active": null,
7272
"editor.document_highlight.read_background": null,
7373
"editor.document_highlight.write_background": null,
74-
"terminal.background": null,
74+
"terminal.background": "#ffffff",
7575
"terminal.foreground": null,
7676
"terminal.bright_foreground": null,
7777
"terminal.dim_foreground": null,

extras/zed/cyberdream.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
"title_bar.background": null,
4545
"toolbar.background": "#16181a",
4646
"tab_bar.background": null,
47-
"tab.inactive_background": null,
48-
"tab.active_background": null,
49-
"search.match_background": null,
50-
"panel.background": null,
47+
"tab.inactive_background": "#16181a",
48+
"tab.active_background": "#1e2124",
49+
"search.match_background": "#ffbd5e80",
50+
"panel.background": "#16181a",
5151
"panel.focused_border": null,
5252
"pane.focused_border": null,
5353
"pane_group.border": null,
@@ -71,7 +71,7 @@
7171
"editor.indent_guide_active": null,
7272
"editor.document_highlight.read_background": null,
7373
"editor.document_highlight.write_background": null,
74-
"terminal.background": null,
74+
"terminal.background": "#16181a",
7575
"terminal.foreground": null,
7676
"terminal.bright_foreground": null,
7777
"terminal.dim_foreground": null,

lua/cyberdream/extra/zed.lua

+14-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ local M = {}
66
--- Generate cyberdream theme for https://zed.dev/
77
--- @param variant string: Variation of the colorscheme to use.
88
function M.generate(variant)
9-
local modified_colors = vim.fn.copy(colors[variant])
10-
modified_colors.variant = variant == "default" and "dark" or "light"
9+
local extended_colors = vim.fn.copy(colors[variant])
10+
11+
for key, value in pairs(colors[variant]) do
12+
extended_colors[key .. "Alpha"] = value .. "80" -- 50% transparency
13+
end
14+
15+
extended_colors.variant = variant == "default" and "dark" or "light"
16+
1117
local template = [==[
1218
{
1319
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
@@ -55,10 +61,10 @@ function M.generate(variant)
5561
"title_bar.background": null,
5662
"toolbar.background": "${bg}",
5763
"tab_bar.background": null,
58-
"tab.inactive_background": null,
59-
"tab.active_background": null,
60-
"search.match_background": null,
61-
"panel.background": null,
64+
"tab.inactive_background": "${bg}",
65+
"tab.active_background": "${bgAlt}",
66+
"search.match_background": "${orangeAlpha}",
67+
"panel.background": "${bg}",
6268
"panel.focused_border": null,
6369
"pane.focused_border": null,
6470
"pane_group.border": null,
@@ -82,7 +88,7 @@ function M.generate(variant)
8288
"editor.indent_guide_active": null,
8389
"editor.document_highlight.read_background": null,
8490
"editor.document_highlight.write_background": null,
85-
"terminal.background": null,
91+
"terminal.background": "${bg}",
8692
"terminal.foreground": null,
8793
"terminal.bright_foreground": null,
8894
"terminal.dim_foreground": null,
@@ -330,7 +336,7 @@ function M.generate(variant)
330336
}
331337
]==]
332338

333-
return util.parse_extra_template(template, modified_colors)
339+
return util.parse_extra_template(template, extended_colors)
334340
end
335341

336342
return M

0 commit comments

Comments
 (0)