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

Plugin-specific colors are overridden #8

Open
MisanthropicBit opened this issue Jun 13, 2023 · 3 comments · May be fixed by #9
Open

Plugin-specific colors are overridden #8

MisanthropicBit opened this issue Jun 13, 2023 · 3 comments · May be fixed by #9

Comments

@MisanthropicBit
Copy link

First of all, thanks for a great colorscheme! 🙂

I have been having some issues with the signs used by vim-gitgutter. For some colorschemes the background is highlighted although I want only the foreground to be highlighted. I tried using let g:gitgutter_set_sign_backgrounds = 1 in my config without any luck.

I then noticed that for all the colorschemes with the "incorrect" background color, the plugin groups, e.g. GitGutterAdd, were last set by hardhacker in hardhacker/after/plugin/hardhacker.vim. This file calls s:AfterHighlight when sourced and links some plugin highlight groups using :hi! which forcibly overrides any existing links. For some reason, this happens for some colorschemes but not for others but the chosen colors might also just coincide with the sign column background color.

If I then run colo <current_colorscheme> for a colorscheme with overridden colors or switch to another colorscheme with the problem, then the background color disappears from the signs.

I've confirmed that the function runs every time I open a file as it should run after the main hardhacker plugin/colorscheme has been loaded. I also tried to disable all other plugins except colorschemes and vim-gitgutter but the issue persists. Uninstalling hardhacker fixes the issue.

I would imagine that the s:AfterHighlight should only be run after something like :colo hardhacker, include a check that the current colorscheme is hardhacker, or use an autocommand?

Here are two screenshots showing the issue:

Screenshot 2023-06-13 at 19 32 22 Screenshot 2023-06-13 at 19 32 52

If it's relevant:

  • neovim v0.9.0
  • Mac osx Big Sur 11.7.7
  • Installing hardhacker with Plug 'hardhackerlabs/theme-vim', { 'as': 'hardhacker' }
@skoowoo
Copy link
Member

skoowoo commented Jun 14, 2023

Thanks for your feedback, I will optimize the colorscheme and fix the issue about s:AfterHighlight.

@skoowoo
Copy link
Member

skoowoo commented Jun 18, 2023

I have optimized the colorscheme and fixed the issue about AfterHighlight

Thanks again, You can update and try it.

@skoowoo skoowoo closed this as completed Jun 18, 2023
@skoowoo skoowoo reopened this Jun 18, 2023
@MisanthropicBit
Copy link
Author

I assume you've already confirmed this since the issue was reopened but I tried updating but the issue still persists unfortunately.

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 a pull request may close this issue.

2 participants