fix: bugs at init

dev-assets
Pocco81 3 years ago
parent 9ac9710650
commit df70644d9d

@ -1,16 +1,7 @@
local util = require("catppuccino.utils.util") local util = require("catppuccino.utils.util")
local opts = require("catppuccino.config").options
local M = {}
function M.setup(config)
config = config or require("nightfox.config")
-- References:
-- https://coolors.co/e63946-f1faee-a8dadc-457b9d-1d3557
-- https://coolors.co/f4f1de-e07a5f-3d405b-81b29a-f2cc8f
-- https://coolors.co/264653-2a9d8f-e9c46a-f4a261-e76f51
-- stylua: ignore
local colors = { local colors = {
none = "NONE", none = "NONE",
bg = "#0e171c", bg = "#0e171c",
@ -96,9 +87,6 @@ function M.setup(config)
colors.variable = colors.white colors.variable = colors.white
util.color_overrides(colors, config) util.color_overrides(colors, opts)
return colors return colors
end
return M

@ -1,4 +1,5 @@
local hsluv = require("catppuccino.utils.hsluv") local hsluv = require("catppuccino.utils.hsluv")
local opts = require("catppuccino.config").options
local g = vim.g local g = vim.g
local o = vim.o local o = vim.o
@ -9,6 +10,7 @@ util.bg = "#000000"
util.fg = "#ffffff" util.fg = "#ffffff"
util.day_brightness = 0.3 util.day_brightness = 0.3
---@param hex_str string hexadecimal value of a color
local hex_to_rgb = function(hex_str) local hex_to_rgb = function(hex_str)
local hex = "[abcdef0-9][abcdef0-9]" local hex = "[abcdef0-9][abcdef0-9]"
local pat = "^#(" .. hex .. ")(" .. hex .. ")(" .. hex .. ")$" local pat = "^#(" .. hex .. ")(" .. hex .. ")(" .. hex .. ")$"
@ -169,9 +171,9 @@ function util.load(theme)
util.syntax(theme.base) util.syntax(theme.base)
util.syntax(theme.plugins) util.syntax(theme.plugins)
if theme.config.terminal_colors then -- if opts.ui.terminal then
util.terminal(theme) -- util.terminal(theme)
end -- end
end end
return util return util

Loading…
Cancel
Save