From 182f25640f85a3da2f1f22b088848d896a50fcce Mon Sep 17 00:00:00 2001 From: Mongkonchai Priyachiwa Date: Wed, 8 May 2024 18:26:50 +0700 Subject: [PATCH] feat(diffview): add diffview integrations (#700) * feat: add diffview integrations * chore: fix docs Documentation should have same value as in `init.lua` defaults :) * refactor: remove linked highlight --------- Co-authored-by: mrtnvgr --- README.md | 14 +++++++ doc/catppuccin.txt | 4 ++ .../groups/integrations/diffview.lua | 41 +++++++++++++++++++ lua/catppuccin/init.lua | 1 + lua/catppuccin/types.lua | 1 + 5 files changed, 61 insertions(+) create mode 100644 lua/catppuccin/groups/integrations/diffview.lua diff --git a/README.md b/README.md index 05d5f48c..afe32b39 100644 --- a/README.md +++ b/README.md @@ -489,6 +489,20 @@ dashboard = true + + + + diffview.nvim + + +```lua +diffview = false +``` + + + + + diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index fb8f27e8..4d27ec6e 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -390,6 +390,10 @@ dashboard-nvim>lua dashboard = true < +diffview.nvim>lua + diffview = false + + dropbar.nvim>lua dropbar = { enabled = false, diff --git a/lua/catppuccin/groups/integrations/diffview.lua b/lua/catppuccin/groups/integrations/diffview.lua new file mode 100644 index 00000000..b14b482d --- /dev/null +++ b/lua/catppuccin/groups/integrations/diffview.lua @@ -0,0 +1,41 @@ +local M = {} + +function M.get() + return { + DiffviewDim1 = { link = "Comment" }, + DiffviewPrimary = { fg = C.blue }, + DiffviewSecondary = { fg = C.green }, + DiffviewNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, + DiffviewWinSeparator = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + DiffviewFilePanelTitle = { fg = C.blue, style = { "bold" } }, + DiffviewFilePanelCounter = { fg = C.text }, + DiffviewFilePanelRootPath = { fg = C.lavender, style = { "bold" } }, + DiffviewFilePanelFileName = { fg = C.text }, + DiffviewFilePanelSelected = { fg = C.yellow }, + DiffviewFilePanelPath = { link = "Comment" }, + DiffviewFilePanelInsertions = { fg = C.green }, + DiffviewFilePanelDeletions = { fg = C.red }, + DiffviewFilePanelConflicts = { fg = C.yellow }, + DiffviewFolderName = { fg = C.blue, style = { "bold" } }, + DiffviewFolderSign = { fg = C.blue }, + DiffviewHash = { fg = C.flamingo }, + DiffviewReference = { fg = C.blue, style = { "bold" } }, + DiffviewReflogSelector = { fg = C.pink }, + DiffviewStatusAdded = { fg = C.green }, + DiffviewStatusUntracked = { fg = C.green }, + DiffviewStatusModified = { fg = C.yellow }, + DiffviewStatusRenamed = { fg = C.yellow }, + DiffviewStatusCopied = { fg = C.yellow }, + DiffviewStatusTypeChange = { fg = C.yellow }, + DiffviewStatusUnmerged = { fg = C.yellow }, + DiffviewStatusUnknown = { fg = C.red }, + DiffviewStatusDeleted = { fg = C.red }, + DiffviewStatusBroken = { fg = C.red }, + DiffviewStatusIgnored = { fg = C.overlay0 }, + } +end + +return M diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 8c0db2de..ad205f95 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -43,6 +43,7 @@ local M = { dap = true, dap_ui = true, dashboard = true, + diffview = false, flash = true, gitsigns = true, markdown = true, diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index e876fc9d..8b98a293 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -133,6 +133,7 @@ ---@field dap boolean? ---@field dap_ui boolean? ---@field dashboard boolean? +---@field diffview boolean? ---@field dropbar CtpIntegrationDropbar | boolean? ---@field fern boolean? -- Set `notification.window.winblend` to `0` in your `fidget` config: