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

GitSignsStagedxxx highlights not working #716

Closed
rockyzhang24 opened this issue Jan 11, 2023 · 7 comments
Closed

GitSignsStagedxxx highlights not working #716

rockyzhang24 opened this issue Jan 11, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@rockyzhang24
Copy link
Contributor

rockyzhang24 commented Jan 11, 2023

Description

After the newest commit (e272fcf) to refactor the highlight groups, all GitSignsStagedxxx highlights work abnormally. They become white instead of the fading colors.

Neovim version

NVIM v0.9.0-dev-663+ga09a0b6eb (built from the latest commit)

Operating system and version

macOS 13.1

Actual behavior

The colors of the signs for staged lines are white. They should be the colors with fading.

Thank you very much.

@rockyzhang24 rockyzhang24 added the bug Something isn't working label Jan 11, 2023
@gegoune
Copy link
Contributor

gegoune commented Jan 11, 2023

#453 (comment)

@rockyzhang24
Copy link
Contributor Author

@gegoune I know it. I mean the GitStaged related highlight groups (e.g., GitSignsStagedAdd), not the other normal ones. Even though you configure them, they still cannot come into effect. You can try to define GitSignsStagedAdd to test it. BTW, don't forget to set _signs_staged_enable to true.

@lewis6991
Copy link
Owner

Can reproduce. Will fix asap.

@lewis6991
Copy link
Owner

Should be fixed in 414aa7b

@guilty-p01nt3r
Copy link

Is this confirmed to be fixed ?
I'm on the latest commit : f29f0b2

image

May I do anything to help?

@lewis6991
Copy link
Owner

lewis6991 commented Feb 10, 2023

Yes, this should be fixed.

The screenshot doesn't provide any information. Why did you include it?

@lewis6991 lewis6991 changed the title GitSignsStagedxxx highlights do not working GitSignsStagedxxx highlights not working Feb 10, 2023
@guilty-p01nt3r
Copy link

My bad, it was a misconfiguration, I confirm it's fixed

The screenshot doesn't provide any information. Why did you include it?

I was showing the configuration of the highlight group and the problem of the signs column symbols appearing white

For anyone that encounters this problem with a transparent background configuration, I solved manually setting the default value for the highlight group :

local function get_color(group, attr)
    local fn = vim.fn
    return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr)
end

vim.api.nvim_set_hl(0, "GitSignsAdd", { fg = get_color("GitSignsAdd", "fg"), bg = color.base00 })
vim.api.nvim_set_hl(0, "GitSignsChange", { fg = get_color("GitSignsChange", "fg"), bg = color.base00 })
vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = get_color("GitSignsDelete", "fg"), bg = color.base00 })
vim.api.nvim_set_hl(0, "GitSignsChangeDelete", { fg = get_color("GitSignsChangeDelete", "fg"), bg = color.base00 })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants