Skip to content

Commit

Permalink
fix!: un-break previous breaking change 💩
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Jun 13, 2024
1 parent 1028765 commit 78b6bc0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 41 deletions.
3 changes: 2 additions & 1 deletion lua/cyberdream/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ function M.toggle_lualine_theme()
return
end

package.loaded["lualine.themes.cyberdream"] = nil
local lualine_opts = require("lualine").get_config()
local lualine_theme = require("lualine.themes.cyberdream").get_theme()
local lualine_theme = require("lualine.themes.cyberdream")
lualine_opts.options.theme = lualine_theme
require("lualine").setup(lualine_opts)
end
Expand Down
74 changes: 34 additions & 40 deletions lua/lualine/themes/cyberdream.lua
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
local M = {}
local colors = require("cyberdream.colors").default
local opts = require("cyberdream.config").options

M.get_theme = function()
local colors = require("cyberdream.colors").default
local opts = require("cyberdream.config").options
if opts.theme.variant == "light" then
colors = require("cyberdream.colors").light
end

if opts.theme.variant == "light" then
if opts.theme.variant == "auto" then
if vim.o.background == "light" then
colors = require("cyberdream.colors").light
end
end

if opts.theme.variant == "auto" then
if vim.o.background == "light" then
colors = require("cyberdream.colors").light
end
end

if opts.transparent then
colors.bg = "NONE"
end

local cyberdream = {
normal = {
a = { fg = colors.blue, bg = colors.bg },
b = { fg = colors.cyan, bg = colors.bg },
c = { fg = colors.fg, bg = colors.bg },
x = { fg = colors.fg, bg = colors.bg },
y = { fg = colors.magenta, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
insert = {
a = { fg = colors.green, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
visual = {
a = { fg = colors.magenta, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
terminal = {
a = { fg = colors.orange, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
}

return cyberdream
if opts.transparent then
colors.bg = "NONE"
end

return M
local cyberdream = {
normal = {
a = { fg = colors.blue, bg = colors.bg },
b = { fg = colors.cyan, bg = colors.bg },
c = { fg = colors.fg, bg = colors.bg },
x = { fg = colors.fg, bg = colors.bg },
y = { fg = colors.magenta, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
insert = {
a = { fg = colors.green, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
visual = {
a = { fg = colors.magenta, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
terminal = {
a = { fg = colors.orange, bg = colors.bg },
z = { fg = colors.grey, bg = colors.bg },
},
}

return cyberdream

0 comments on commit 78b6bc0

Please sign in to comment.