Override highlight groups by multiple colors of base46
AstrickHarren opened this issue · comments
Is your feature request related to a problem? Please describe.
I want to override the hl groups DiffAdd
to furnish a greenish bg and no fg. The green bg should vary
depending on if the theme is light or dark. My approach is to calculate the luminance of the Normal
(or base30.black)
color group and decide the current theme type.
Describe the solution you'd like
This require me to take in more than one color from base30 as an input calculate DiffAdd
Describe alternatives you've considered
It could also be useful to have a user-defined event under theme switch by base46 (which I have not found yet)
For those who are interested in how to change diffview colors based on theme type, I was able to do this with an autocmd on BufEnter the diffview buffers that changes the highlight groups dynamically with base46's type
.
There may be a more natural way to do this, perhaps customizing a theme integration like one in the base46.integration dir is most satisfying, but I was unable to figure out how even after reading related documentations and source codes.
why dynamically tho? most use red for diffremoved, green for added. So just use hl_override!