hardhackerlabs / theme-vim

🧑🏾‍🚀 HardHacker Theme for Vim/Neovim 🌈
Apache License 2.0
24 stars 2 forks source link

Plugin-specific colors are overridden #8

Open MisanthropicBit opened 1 year ago

MisanthropicBit commented 1 year ago

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:

skoowoo commented 1 year ago

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

skoowoo commented 1 year ago

I have optimized the colorscheme and fixed the issue about AfterHighlight

Thanks again, You can update and try it.

MisanthropicBit commented 1 year ago

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