Skip to content

Commit 78b6bc0

Browse files
committed
fix!: un-break previous breaking change 💩
1 parent 1028765 commit 78b6bc0

File tree

2 files changed

+36
-41
lines changed

2 files changed

+36
-41
lines changed

lua/cyberdream/util.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ function M.toggle_lualine_theme()
152152
return
153153
end
154154

155+
package.loaded["lualine.themes.cyberdream"] = nil
155156
local lualine_opts = require("lualine").get_config()
156-
local lualine_theme = require("lualine.themes.cyberdream").get_theme()
157+
local lualine_theme = require("lualine.themes.cyberdream")
157158
lualine_opts.options.theme = lualine_theme
158159
require("lualine").setup(lualine_opts)
159160
end

lua/lualine/themes/cyberdream.lua

+34-40
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
1-
local M = {}
1+
local colors = require("cyberdream.colors").default
2+
local opts = require("cyberdream.config").options
23

3-
M.get_theme = function()
4-
local colors = require("cyberdream.colors").default
5-
local opts = require("cyberdream.config").options
4+
if opts.theme.variant == "light" then
5+
colors = require("cyberdream.colors").light
6+
end
67

7-
if opts.theme.variant == "light" then
8+
if opts.theme.variant == "auto" then
9+
if vim.o.background == "light" then
810
colors = require("cyberdream.colors").light
911
end
12+
end
1013

11-
if opts.theme.variant == "auto" then
12-
if vim.o.background == "light" then
13-
colors = require("cyberdream.colors").light
14-
end
15-
end
16-
17-
if opts.transparent then
18-
colors.bg = "NONE"
19-
end
20-
21-
local cyberdream = {
22-
normal = {
23-
a = { fg = colors.blue, bg = colors.bg },
24-
b = { fg = colors.cyan, bg = colors.bg },
25-
c = { fg = colors.fg, bg = colors.bg },
26-
x = { fg = colors.fg, bg = colors.bg },
27-
y = { fg = colors.magenta, bg = colors.bg },
28-
z = { fg = colors.grey, bg = colors.bg },
29-
},
30-
insert = {
31-
a = { fg = colors.green, bg = colors.bg },
32-
z = { fg = colors.grey, bg = colors.bg },
33-
},
34-
visual = {
35-
a = { fg = colors.magenta, bg = colors.bg },
36-
z = { fg = colors.grey, bg = colors.bg },
37-
},
38-
terminal = {
39-
a = { fg = colors.orange, bg = colors.bg },
40-
z = { fg = colors.grey, bg = colors.bg },
41-
},
42-
}
43-
44-
return cyberdream
14+
if opts.transparent then
15+
colors.bg = "NONE"
4516
end
4617

47-
return M
18+
local cyberdream = {
19+
normal = {
20+
a = { fg = colors.blue, bg = colors.bg },
21+
b = { fg = colors.cyan, bg = colors.bg },
22+
c = { fg = colors.fg, bg = colors.bg },
23+
x = { fg = colors.fg, bg = colors.bg },
24+
y = { fg = colors.magenta, bg = colors.bg },
25+
z = { fg = colors.grey, bg = colors.bg },
26+
},
27+
insert = {
28+
a = { fg = colors.green, bg = colors.bg },
29+
z = { fg = colors.grey, bg = colors.bg },
30+
},
31+
visual = {
32+
a = { fg = colors.magenta, bg = colors.bg },
33+
z = { fg = colors.grey, bg = colors.bg },
34+
},
35+
terminal = {
36+
a = { fg = colors.orange, bg = colors.bg },
37+
z = { fg = colors.grey, bg = colors.bg },
38+
},
39+
}
40+
41+
return cyberdream

0 commit comments

Comments
 (0)