fix: get command

dev
Pocco81 2 years ago
parent 3682671de4
commit c9422b4157

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

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

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

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

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

Loading…
Cancel
Save