mirror of https://github.com/sgoudham/nvim.git
fix: bugs at init
parent
9ac9710650
commit
df70644d9d
@ -1,104 +1,92 @@
|
|||||||
local util = require("catppuccino.utils.util")
|
local util = require("catppuccino.utils.util")
|
||||||
|
local opts = require("catppuccino.config").options
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.setup(config)
|
local colors = {
|
||||||
config = config or require("nightfox.config")
|
none = "NONE",
|
||||||
|
bg = "#0e171c",
|
||||||
-- References:
|
fg = "#CDCECF",
|
||||||
-- https://coolors.co/e63946-f1faee-a8dadc-457b9d-1d3557
|
fg_gutter = "#3b4261",
|
||||||
-- https://coolors.co/f4f1de-e07a5f-3d405b-81b29a-f2cc8f
|
black = "#393b44",
|
||||||
-- https://coolors.co/264653-2a9d8f-e9c46a-f4a261-e76f51
|
red = "#c94f6d",
|
||||||
|
green = "#81B29A",
|
||||||
-- stylua: ignore
|
yellow = "#dbc074",
|
||||||
local colors = {
|
blue = "#719cd6",
|
||||||
none = "NONE",
|
magenta = "#9D79D6",
|
||||||
bg = "#0e171c",
|
cyan = "#63cdcf",
|
||||||
fg = "#CDCECF",
|
white = "#dfdfe0",
|
||||||
fg_gutter = "#3b4261",
|
orange = "#F4A261",
|
||||||
black = "#393b44",
|
pink = "#D67AD2",
|
||||||
red = "#c94f6d",
|
black_br = "#7f8c98",
|
||||||
green = "#81B29A",
|
red_br = "#D6616B",
|
||||||
yellow = "#dbc074",
|
green_br = "#58cd8b",
|
||||||
blue = "#719cd6",
|
yellow_br = "#FFE37E",
|
||||||
magenta = "#9D79D6",
|
blue_br = "#84CEE4",
|
||||||
cyan = "#63cdcf",
|
magenta_br = "#B8A1E3",
|
||||||
white = "#dfdfe0",
|
cyan_br = "#59F0FF",
|
||||||
orange = "#F4A261",
|
white_br = "#F2F2F2",
|
||||||
pink = "#D67AD2",
|
orange_br = "#F6A878",
|
||||||
black_br = "#7f8c98",
|
pink_br = "#DF97DB",
|
||||||
red_br = "#D6616B",
|
comment = "#526175",
|
||||||
green_br = "#58cd8b",
|
git = {
|
||||||
yellow_br = "#FFE37E",
|
add = "#70a288",
|
||||||
blue_br = "#84CEE4",
|
change = "#A58155",
|
||||||
magenta_br = "#B8A1E3",
|
delete = "#904A6A",
|
||||||
cyan_br = "#59F0FF",
|
conflict = "#C07A6D"
|
||||||
white_br = "#F2F2F2",
|
},
|
||||||
orange_br = "#F6A878",
|
gitSigns = {
|
||||||
pink_br = "#DF97DB",
|
add = "#164846",
|
||||||
comment = "#526175",
|
change = "#394b70",
|
||||||
git = {
|
delete = "#823c41"
|
||||||
add = "#70a288",
|
|
||||||
change = "#A58155",
|
|
||||||
delete = "#904A6A",
|
|
||||||
conflict = "#C07A6D"
|
|
||||||
},
|
|
||||||
gitSigns = {
|
|
||||||
add = "#164846",
|
|
||||||
change = "#394b70",
|
|
||||||
delete = "#823c41"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
util.bg = colors.bg
|
util.bg = colors.bg
|
||||||
|
|
||||||
colors.bg_alt = util.darken(colors.bg, 0.75, "#000000")
|
colors.bg_alt = util.darken(colors.bg, 0.75, "#000000")
|
||||||
colors.bg_highlight = util.brighten(colors.bg, 0.10)
|
colors.bg_highlight = util.brighten(colors.bg, 0.10)
|
||||||
|
|
||||||
colors.fg_alt = util.darken(colors.fg, 0.80, "#000000")
|
colors.fg_alt = util.darken(colors.fg, 0.80, "#000000")
|
||||||
|
|
||||||
colors.diff = {
|
colors.diff = {
|
||||||
add = util.darken(colors.green, 0.15),
|
add = util.darken(colors.green, 0.15),
|
||||||
delete = util.darken(colors.red, 0.15),
|
delete = util.darken(colors.red, 0.15),
|
||||||
change = util.darken(colors.blue, 0.15),
|
change = util.darken(colors.blue, 0.15),
|
||||||
text = colors.blue
|
text = colors.blue
|
||||||
}
|
}
|
||||||
|
|
||||||
colors.gitSigns = {
|
|
||||||
add = util.brighten(colors.gitSigns.add, 0.2),
|
|
||||||
change = util.brighten(colors.gitSigns.change, 0.2),
|
|
||||||
delete = util.brighten(colors.gitSigns.delete, 0.2)
|
|
||||||
}
|
|
||||||
|
|
||||||
colors.git.ignore = colors.black
|
colors.gitSigns = {
|
||||||
colors.black = util.darken(colors.bg, 0.8, "#000000")
|
add = util.brighten(colors.gitSigns.add, 0.2),
|
||||||
colors.border_highlight = colors.blue
|
change = util.brighten(colors.gitSigns.change, 0.2),
|
||||||
colors.border = colors.black
|
delete = util.brighten(colors.gitSigns.delete, 0.2)
|
||||||
|
}
|
||||||
|
|
||||||
-- Popups and statusline always get a dark background
|
colors.git.ignore = colors.black
|
||||||
colors.bg_popup = colors.bg_alt
|
colors.black = util.darken(colors.bg, 0.8, "#000000")
|
||||||
colors.bg_statusline = colors.bg_alt
|
colors.border_highlight = colors.blue
|
||||||
|
colors.border = colors.black
|
||||||
|
|
||||||
-- Sidebar and Floats are configurable
|
-- Popups and statusline always get a dark background
|
||||||
-- colors.bg_sidebar = config.darkSidebar and colors.bg_alt or colors.bg
|
colors.bg_popup = colors.bg_alt
|
||||||
-- colors.bg_float = config.darkFloat and colors.bg_alt or colors.bg
|
colors.bg_statusline = colors.bg_alt
|
||||||
colors.bg_sidebar = colors.bg_alt
|
|
||||||
colors.bg_float = colors.bg_alt
|
|
||||||
|
|
||||||
colors.bg_visual = util.darken(colors.blue, 0.2)
|
-- Sidebar and Floats are configurable
|
||||||
colors.bg_search = util.darken(colors.cyan, 0.3)
|
-- colors.bg_sidebar = config.darkSidebar and colors.bg_alt or colors.bg
|
||||||
colors.fg_sidebar = colors.fg_alt
|
-- colors.bg_float = config.darkFloat and colors.bg_alt or colors.bg
|
||||||
|
colors.bg_sidebar = colors.bg_alt
|
||||||
|
colors.bg_float = colors.bg_alt
|
||||||
|
|
||||||
colors.error = colors.red
|
colors.bg_visual = util.darken(colors.blue, 0.2)
|
||||||
colors.warning = colors.yellow
|
colors.bg_search = util.darken(colors.cyan, 0.3)
|
||||||
colors.info = colors.blue
|
colors.fg_sidebar = colors.fg_alt
|
||||||
colors.hint = colors.cyan
|
|
||||||
|
|
||||||
colors.variable = colors.white
|
colors.error = colors.red
|
||||||
|
colors.warning = colors.yellow
|
||||||
|
colors.info = colors.blue
|
||||||
|
colors.hint = colors.cyan
|
||||||
|
|
||||||
util.color_overrides(colors, config)
|
colors.variable = colors.white
|
||||||
|
|
||||||
return colors
|
util.color_overrides(colors, opts)
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return colors
|
||||||
|
Loading…
Reference in New Issue