From 54fd92d4436ac3af30177b57ca18801a7126bbc6 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Sun, 29 Aug 2021 11:10:09 -0500 Subject: [PATCH] dev (refactor): siplified git and diff relation in the integrations --- lua/catppuccino/core/integrations/gitgutter.lua | 6 +++--- lua/catppuccino/core/integrations/gitsigns.lua | 7 ++++--- lua/catppuccino/core/integrations/neogit.lua | 6 +++--- lua/catppuccino/core/integrations/nvimtree.lua | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lua/catppuccino/core/integrations/gitgutter.lua b/lua/catppuccino/core/integrations/gitgutter.lua index fed2940..d972750 100644 --- a/lua/catppuccino/core/integrations/gitgutter.lua +++ b/lua/catppuccino/core/integrations/gitgutter.lua @@ -2,9 +2,9 @@ local M = {} function M.get(cpt) return { - GitGutterAdd = { fg = cpt.gitSigns.add }, -- diff mode: Added line |diff.txt| - GitGutterChange = { fg = cpt.gitSigns.change }, -- diff mode: Changed line |diff.txt| - GitGutterDelete = { fg = cpt.gitSigns.delete }, -- diff mode: Deleted line |diff.txt| + GitGutterAdd = { fg = cpt.diff.add }, + GitGutterChange = { fg = cpt.diff.change }, + GitGutterDelete = { fg = cpt.diff.delete }, } end return M diff --git a/lua/catppuccino/core/integrations/gitsigns.lua b/lua/catppuccino/core/integrations/gitsigns.lua index 929a825..972aef1 100644 --- a/lua/catppuccino/core/integrations/gitsigns.lua +++ b/lua/catppuccino/core/integrations/gitsigns.lua @@ -1,10 +1,11 @@ local M = {} +local util = require("catppuccino.utils.util") function M.get(cpt) return { - GitSignsAdd = { fg = cpt.diff.add, bg = cpt.bg }, -- diff mode: Added line |diff.txt| - GitSignsChange = { fg = cpt.diff.change, bg = cpt.bg }, -- diff mode: Changed line |diff.txt| - GitSignsDelete = { fg = cpt.diff.delete, bg = cpt.bg }, -- diff mode: Deleted line |diff.txt| + GitSignsAdd = { fg = util.darken(cpt.diff.add, 0.50), bg = cpt.bg }, -- diff mode: Added line |diff.txt| + GitSignsChange = { fg = util.darken(cpt.diff.change, 0.50), bg = cpt.bg }, -- diff mode: Changed line |diff.txt| + GitSignsDelete = { fg = util.darken(cpt.diff.delete, 0.50), bg = cpt.bg }, -- diff mode: Deleted line |diff.txt| } end diff --git a/lua/catppuccino/core/integrations/neogit.lua b/lua/catppuccino/core/integrations/neogit.lua index 9b2913c..aa465b1 100644 --- a/lua/catppuccino/core/integrations/neogit.lua +++ b/lua/catppuccino/core/integrations/neogit.lua @@ -1,5 +1,5 @@ -local util = require("catppuccino.utils.util") local M = {} +local util = require("catppuccino.utils.util") function M.get(cpt) return { @@ -8,8 +8,8 @@ function M.get(cpt) NeogitHunkHeader = { bg = cpt.bg_highlight, fg = cpt.fg }, NeogitHunkHeaderHighlight = { bg = cpt.fg_gutter, fg = cpt.blue }, NeogitDiffContextHighlight = { bg = util.darken(cpt.fg_gutter, 0.5), fg = cpt.fg_alt }, - NeogitDiffDeleteHighlight = { fg = cpt.git.delete, bg = cpt.diff.delete }, - NeogitDiffAddHighlight = { fg = cpt.git.add, bg = cpt.diff.add }, + NeogitDiffDeleteHighlight = { fg = cpt.diff.delete, bg = cpt.bg }, + NeogitDiffAddHighlight = { fg = cpt.diff.add, bg = cpt.bg }, } end diff --git a/lua/catppuccino/core/integrations/nvimtree.lua b/lua/catppuccino/core/integrations/nvimtree.lua index dd0610c..31935e1 100644 --- a/lua/catppuccino/core/integrations/nvimtree.lua +++ b/lua/catppuccino/core/integrations/nvimtree.lua @@ -20,9 +20,9 @@ function M.get(cpt) NvimTreeRootFolder = { fg = root_dir_color, style = "bold" }, NvimTreeSymlink = { fg = cpt.magenta }, NvimTreeStatuslineNc = { fg = cpt.black, bg = cpt.black }, - NvimTreeGitDirty = { fg = cpt.git.change }, - NvimTreeGitNew = { fg = cpt.git.add }, - NvimTreeGitDeleted = { fg = cpt.git.delete }, + NvimTreeGitDirty = { fg = cpt.diff.change }, + NvimTreeGitNew = { fg = cpt.diff.add }, + NvimTreeGitDeleted = { fg = cpt.diff.delete }, NvimTreeSpecialFile = { fg = cpt.cyan }, NvimTreeImageFile = { fg = cpt.fg_sidebar }, NvimTreeOpenedFile = { fg = cpt.magenta },