mirror of https://github.com/sgoudham/nvim.git
fix: dimming feature
parent
d2343a27f8
commit
3682671de4
@ -1,16 +1,15 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.get(cp)
|
local cp = require("catppuccin.core.palettes.init").get_palette()
|
||||||
local cnf = require("catppuccin.config").options
|
local cnf = require("catppuccin.config").options
|
||||||
local bg_highlight = (cnf.transparent_background and cnf.dim_inactive.enable and cp.dim)
|
local dim_percentage = cnf.dim_inactive.percentage
|
||||||
or (cnf.transparent_background and "NONE")
|
local ucolors = require("catppuccin.utils.colors")
|
||||||
or (cnf.dim_inactive.enable and cp.dim)
|
|
||||||
or cp.base
|
function M.dim()
|
||||||
return {
|
if cnf.dim_inactive.shade == "dark" then
|
||||||
GitSignsAdd = { fg = cp.green, bg = bg_highlight }, -- diff mode: Added line |diff.txt|
|
return ucolors.darken(cp.base, dim_percentage, cp.mantle)
|
||||||
GitSignsChange = { fg = cp.yellow, bg = bg_highlight }, -- diff mode: Changed line |diff.txt|
|
end
|
||||||
GitSignsDelete = { fg = cp.red, bg = bg_highlight }, -- diff mode: Deleted line |diff.txt|
|
return ucolors.lighten(cp.surface0, dim_percentage, cp.base)
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
if exists('g:loaded_catppuccin') | finish | endif
|
|
||||||
|
|
||||||
let g:loaded_catppuccin = 1
|
|
Loading…
Reference in New Issue