Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for sindrets/diffview.nvim #36

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

przepompownia
Copy link
Contributor

@przepompownia przepompownia commented Jun 20, 2023

At this moment it only changes highlights for file history panel.

@przepompownia
Copy link
Contributor Author

przepompownia commented Jun 20, 2023

Before:
image
After:
image

@przepompownia
Copy link
Contributor Author

For diff content diffview.nvim uses built-in highlight groups (DiffviewDiffAdd links to DiffAdd etc.). @gbprod what do you think about change Diff* to something more subtle? Currently built-in diff view looks like above:
image

@przepompownia przepompownia marked this pull request as ready for review June 20, 2023 14:23
@gbprod
Copy link
Owner

gbprod commented Jun 21, 2023

Hi @przepompownia, thanks for this PR, it seems nice.

What are you thinking about when you say something more subtle ?
You can configure diff colors using diff.mode option (I think that it looks better with the fg value :) )

@przepompownia
Copy link
Contributor Author

Hi @gbprod, I mean colors that stand out less from the palette. I have no suggestion at the moment.

diff = { mode = 'fg'} looks nice for me, but mixes with treesitter highlights:

image

but after

diff --git a/lua/nord/utils/init.lua b/lua/nord/utils/init.lua
index d6a4c5a..30585c3 100644
--- a/lua/nord/utils/init.lua
+++ b/lua/nord/utils/init.lua
@@ -13,7 +13,7 @@ end
 function utils.make_diff(color)
   local options = require("nord.config").options
 
-  return { fg = color, bg = c.none, reverse = options.diff.mode ~= "fg" }
+  return { fg = color, bg = c.polar_night.brighter, reverse = options.diff.mode ~= "fg" }
 end

diff.mode = fg looks more readable for me
image

and the default mode seems to be unchanged:
image

@gbprod
Copy link
Owner

gbprod commented Jun 21, 2023

Nice!
Can you create a PR with this change?

@gbprod gbprod merged commit 5b92f20 into gbprod:main Jun 21, 2023
@przepompownia przepompownia deleted the diffview-initial-support branch June 21, 2023 12:25
@przepompownia
Copy link
Contributor Author

Thanks for merging. Starting to look for practical use of this tool for myself I focused on file history panel only.

Nice! Can you create a PR with this change?

#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants