Skip to content

Commit

Permalink
feat(diffview): add diffview integrations (#700)
Browse files Browse the repository at this point in the history
* 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 <root@unixis.fun>
  • Loading branch information
m00p1ng and mrtnvgr authored May 8, 2024
1 parent 6af9167 commit 182f256
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,20 @@ dashboard = true
</tr>
<!-- dashboard-nvim -->

<!-- diffview.nvim -->
</tr>
<tr>
<td> <a href="https://github.com/sindrets/diffview.nvim">diffview.nvim</a> </td>
<td>

```lua
diffview = false
```

</td>
</tr>
<!-- diffview.nvim -->

<!-- dropbar.nvim -->
</tr>
<tr>
Expand Down
4 changes: 4 additions & 0 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ dashboard-nvim>lua
dashboard = true
<

diffview.nvim>lua
diffview = false


dropbar.nvim>lua
dropbar = {
enabled = false,
Expand Down
41 changes: 41 additions & 0 deletions lua/catppuccin/groups/integrations/diffview.lua
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ local M = {
dap = true,
dap_ui = true,
dashboard = true,
diffview = false,
flash = true,
gitsigns = true,
markdown = true,
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 182f256

Please sign in to comment.