diff --git a/lua/catppuccin/core/integrations/gitsigns.lua b/lua/catppuccin/core/integrations/gitsigns.lua index 90f48ff..1642107 100644 --- a/lua/catppuccin/core/integrations/gitsigns.lua +++ b/lua/catppuccin/core/integrations/gitsigns.lua @@ -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 diff --git a/lua/catppuccin/core/mapper.lua b/lua/catppuccin/core/mapper.lua index 7e5b711..c61bbce 100644 --- a/lua/catppuccin/core/mapper.lua +++ b/lua/catppuccin/core/mapper.lua @@ -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, diff --git a/lua/catppuccin/core/palettes/frappe.lua b/lua/catppuccin/core/palettes/frappe.lua index 100927a..fa8c218 100644 --- a/lua/catppuccin/core/palettes/frappe.lua +++ b/lua/catppuccin/core/palettes/frappe.lua @@ -32,7 +32,6 @@ local color_palette = { base = "#303446", mantle = "#292C3C", crust = "#232634", - dim = "#444858", } return color_palette diff --git a/lua/catppuccin/core/palettes/latte.lua b/lua/catppuccin/core/palettes/latte.lua index 2e3c967..f10d84b 100644 --- a/lua/catppuccin/core/palettes/latte.lua +++ b/lua/catppuccin/core/palettes/latte.lua @@ -30,9 +30,8 @@ local color_palette = { surface0 = "#CCD0DA", base = "#EFF1F5", - crust = "#DCE0E8", mantle = "#E6E9EF", - dim = "#D7D8DC", + crust = "#DCE0E8", } return color_palette diff --git a/lua/catppuccin/core/palettes/macchiato.lua b/lua/catppuccin/core/palettes/macchiato.lua index 9580896..39f40f3 100644 --- a/lua/catppuccin/core/palettes/macchiato.lua +++ b/lua/catppuccin/core/palettes/macchiato.lua @@ -32,7 +32,6 @@ local color_palette = { base = "#24273A", mantle = "#1E2030", crust = "#181926", - dim = "#393C4D", } return color_palette diff --git a/lua/catppuccin/utils/util.lua b/lua/catppuccin/utils/util.lua index e8a3ca7..daebd0d 100644 --- a/lua/catppuccin/utils/util.lua +++ b/lua/catppuccin/utils/util.lua @@ -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")