-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat: make invert_diff configurable #291
Conversation
This should close #290 |
DiffDelete = config.invert_diff and { fg = colors.bg0, bg = colors.red } or { bg = colors.dark_red }, | ||
DiffAdd = config.invert_diff and { fg = colors.bg0, bg = colors.green } or { bg = colors.dark_green }, | ||
DiffChange = config.invert_diff and { fg = colors.bg0, bg = colors.aqua } or { bg = colors.dark_aqua }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style not quite a revert of the style, if the user has config.inverse = true
.
DiffDelete = config.invert_diff and { fg = colors.bg0, bg = colors.red } or { bg = colors.dark_red }, | |
DiffAdd = config.invert_diff and { fg = colors.bg0, bg = colors.green } or { bg = colors.dark_green }, | |
DiffChange = config.invert_diff and { fg = colors.bg0, bg = colors.aqua } or { bg = colors.dark_aqua }, | |
DiffDelete = config.invert_diff and { fg = colors.bg0, bg = colors.red, reverse = config.inverse } or { bg = colors.dark_red }, | |
DiffAdd = config.invert_diff and { fg = colors.bg0, bg = colors.green, reverse = config.inverse } or { bg = colors.dark_green }, | |
DiffChange = config.invert_diff and { fg = colors.bg0, bg = colors.aqua, reverse = config.inverse } or { bg = colors.dark_aqua }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmh, I think there are actually two things happening in the new configuration:
- The colors changed.
- And the
reverse
is unconditionally false.
I want both the old colours and reverse = true
.
Whereas you only want the old colours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right
I dislike the new style of diff [1]. Thankfully somebody wrote a patch to configure it [2] (though not completely to my liking, so the local patch here is a bit different). I used it as a basis, but made it always revert, rather than configurable. [1]: ellisonleao/gruvbox.nvim#290 [2]: ellisonleao/gruvbox.nvim#291
I dislike the new style of diff [1]. Thankfully somebody wrote a patch to configure it [2] (though not completely to my liking, so the local patch here is a bit different). I used it as a basis, but made it always revert, rather than configurable. [1]: ellisonleao/gruvbox.nvim#290 [2]: ellisonleao/gruvbox.nvim#291
hey @eeeXun thanks for the PR but this seems like a personal preference choice. Have you tried just using the |
Hi @ellisonleao, I don't think it's a personal preference. Although I use the new diff style. But there are many sounds #239 (comment) and #290. Not everybody like the new style. |
It is impossible to please everyone
because it's a setting for only one highlight which IMO doesn't make sense. Imagine if everyone creates a settings for a small group or single highlights? With the overrides function we can basically give you the ability to use your own personal preference, together with override_colors, if they also don't make sense four your choice. |
I dislike the new style of diff [1]. After somebody wrote a patch [2] I finally started experimenting with what looked best to me. This is using the old vibrant colours, which I like better. And avoids using `reverse = true` to not break high-lighting during visual selection. This is using an overlay as it is _much_ easier to refer to the internal colours in a `dark`/`light` agnostic way that way instead of the intended "use the palette way" (due to breaking changes in [3] which, incidentally, is the MR which changed diff high-lighting). [1]: ellisonleao/gruvbox.nvim#290 [2]: ellisonleao/gruvbox.nvim#291 [3]: ellisonleao/gruvbox.nvim#280
I'm not sure if I misunderstand the |
@eeeXun i guess you didn't read the entire sentence, but let me quote it again:
Excatly. But in the meantime |
Some user may still need old style of diff. #239 (comment)