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

fix(gitsign): improve gitsign inline add and delete colors #808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndreasNasman
Copy link
Contributor

This PR aims to improve the colors of changed text when running :Gitsigns preview_hunk with transparent_background = false (see the screenshot below).

For the dark themes, the cursor color seems to "conflict" with the diff colors, making it hard to track the cursor if focusing a hunk and, e.g., copying some text.

For GitSignsAddInline, it took the color of

DiffAdd = { bg = U.darken(C.green, 0.18, C.base) }, -- diff mode: Added line |diff.txt|
and doubled the amount from 18 to 36. I did the same with GitSignsDeleteInline and
DiffDelete = { bg = U.darken(C.red, 0.18, C.base) }, -- diff mode: Deleted line |diff.txt|

Latte

Before

image

After

image

Frappe

Before

image

After

image

Macchiato

Before

image

After

image

Mocha

Before

image

After

image

@AndreasNasman
Copy link
Contributor Author

I'm unsure if I should add some O.transparent_background checks. Since

if O.transparent_background then
already does an outer check for the truthiness of O.transparent_background, I don't follow why the inner checks like
GitSignsAddPreview = O.transparent_background and { fg = C.green, bg = C.none } or { link = "DiffAdd" },
are needed.

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.

1 participant