Skip to content

Commit bba3685

Browse files
tspencer0917Taylor
and
Taylor
authored
fix(extras): correctly generate names for Windows Terminal extra theme config (#181)
Co-authored-by: Taylor <[email protected]>
1 parent a7f4efa commit bba3685

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

lua/cyberdream/extra/windowsterminal.lua

+20-12
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,39 @@ local M = {}
88
function M.generate(variant)
99
local template = [==[
1010
{
11+
"name": "${name}",
12+
"cursorColor": "${fg}",
13+
"selectionBackground": "${bg_highlight}",
1114
"background": "${bg}",
15+
"foreground": "${fg}",
1216
"black": "${bg}",
1317
"blue": "${blue}",
18+
"cyan": "${cyan}",
19+
"green": "${green}",
20+
"purple": "${purple}",
21+
"red": "${red}",
22+
"white": "${fg}",
23+
"yellow": "${yellow}",
1424
"brightBlack": "${bg_highlight}",
1525
"brightBlue": "${blue}",
1626
"brightCyan": "${cyan}",
1727
"brightGreen": "${green}",
1828
"brightPurple": "${purple}",
1929
"brightRed": "${red}",
2030
"brightWhite": "${fg}",
21-
"brightYellow": "${yellow}",
22-
"cursorColor": "${fg}",
23-
"cyan": "${cyan}",
24-
"foreground": "${fg}",
25-
"green": "${green}",
26-
"name": "cyberdream",
27-
"purple": "${purple}",
28-
"red": "${red}",
29-
"selectionBackground": "${bg_highlight}",
30-
"white": "${fg}",
31-
"yellow": "${yellow}"
31+
"brightYellow": "${yellow}"
3232
}
3333
]==]
3434

35-
return util.parse_extra_template(template, colors[variant])
35+
local theme = colors[variant]
36+
37+
if variant == "default" then
38+
theme.name = "Cyberdream"
39+
else
40+
theme.name = "Cyberdream " .. variant:sub(1, 1):upper() .. variant:sub(2, -1)
41+
end
42+
43+
return util.parse_extra_template(template, theme)
3644
end
3745

3846
return M

0 commit comments

Comments
 (0)