fix: get command

dev
Pocco81 2 years ago
parent 3682671de4
commit c9422b4157

@ -1,15 +1,16 @@
local M = {} local M = {}
local cp = require("catppuccin.core.palettes.init").get_palette() function M.get(cp)
local cnf = require("catppuccin.config").options local cnf = require("catppuccin.config").options
local dim_percentage = cnf.dim_inactive.percentage local bg_highlight = (cnf.transparent_background and cnf.dim_inactive.enable and cp.dim)
local ucolors = require("catppuccin.utils.colors") or (cnf.transparent_background and "NONE")
or (cnf.dim_inactive.enable and cp.dim)
function M.dim() or cp.base
if cnf.dim_inactive.shade == "dark" then return {
return ucolors.darken(cp.base, dim_percentage, cp.mantle) GitSignsAdd = { fg = cp.green, bg = bg_highlight }, -- diff mode: Added line |diff.txt|
end GitSignsChange = { fg = cp.yellow, bg = bg_highlight }, -- diff mode: Changed line |diff.txt|
return ucolors.lighten(cp.surface0, dim_percentage, cp.base) GitSignsDelete = { fg = cp.red, bg = bg_highlight }, -- diff mode: Deleted line |diff.txt|
}
end end
return M return M

@ -52,7 +52,7 @@ local function get_base()
Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base }, -- normal text Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base }, -- normal text
NormalNC = { NormalNC = {
fg = cp.text, fg = cp.text,
bg = (cnf.transparent_background and cnf.dim_inactive.enable and cp.dim) bg = (cnf.transparent_background and cnf.dim_inactive.enable and lui.dim())
or (cnf.dim_inactive.enable and cp.dim) or (cnf.dim_inactive.enable and cp.dim)
or (cnf.transparent_background and cp.none) or (cnf.transparent_background and cp.none)
or cp.base, or cp.base,

@ -32,7 +32,6 @@ local color_palette = {
base = "#303446", base = "#303446",
mantle = "#292C3C", mantle = "#292C3C",
crust = "#232634", crust = "#232634",
dim = "#444858",
} }
return color_palette return color_palette

@ -30,9 +30,8 @@ local color_palette = {
surface0 = "#CCD0DA", surface0 = "#CCD0DA",
base = "#EFF1F5", base = "#EFF1F5",
crust = "#DCE0E8",
mantle = "#E6E9EF", mantle = "#E6E9EF",
dim = "#D7D8DC", crust = "#DCE0E8",
} }
return color_palette return color_palette

@ -32,7 +32,6 @@ local color_palette = {
base = "#24273A", base = "#24273A",
mantle = "#1E2030", mantle = "#1E2030",
crust = "#181926", crust = "#181926",
dim = "#393C4D",
} }
return color_palette return color_palette

@ -3,9 +3,6 @@ local udata = require("catppuccin.utils.data")
local g = vim.g local g = vim.g
local util = {} local util = {}
util.bg = "#000000"
util.fg = "#ffffff"
util.day_brightness = 0.3
local has_nvim07 = vim.fn.has("nvim-0.7") local has_nvim07 = vim.fn.has("nvim-0.7")

Loading…
Cancel
Save