-
Notifications
You must be signed in to change notification settings - Fork 39
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
Using Highlight Groups rather than load_colors #78
Comments
Hm as I opened this I am starting to think this is a problem with my |
I guess I'm still confused why changing a global highlight group from a manual definition to the |
I think this has to do with the colors not updating when you reload the colorscheme. For example, if I do this: hl = utils.get_highlight("StatusLine") I get the same results as but if I do hl = function() return utils.get_highlight("StatusLine") end it works as expected. |
When you use When you use As you found out, wrapping it into a function allows re-evaluation of 'get_highlight` and updates correctly on colorscheme changes (as long as the hlgroup exists in the new theme). The best way to ensure consistency on colorscheme changes is to never use the result of Is there anything you think I could do? |
Hm, I guess I'm wondering why it doesn't seem to work correctly when I use the |
The simplest example that illustrates this is require("heirline").setup({ hl = "StatusLine", provider = "Hello, World!" }) |
require("heirline").setup({ hl = "StatusLine", provider = "Hello, World!" }) gives me the expected result, unless I load heirline config before the intended colorscheme. this is what I get with The strange thing is that, for some reason, |
I have a quick question. I'm sure I must be doing something wrong... I am currently using
load_colors
to set up colors for Heirline and for a simple example, I am getting thefg
andbg
of theStatusLine
and setting that as thehl
variable manually with something like this:And then setting them as the topmost level
hl
withhl = { fg = "fg", bg = "bg" }
. This works great but I am trying to move this to using the highlight group notation with strings, but when I dohl = "StatusLine"
I am getting different results. I have verified that theStatusLine
highlight group I have in my theme only setsfg
andbg
and doesn't set anything likereverse = true
or anything, but this is what I'm getting:With
hl = { fg = "fg", bg = "bg" }
:With
hl = "StatusLine"
:It seems to me like for some reason when I use the
hlgroup
notation the colors get reversed as well as bolded. I did some testing and this is what I get when I dohl = { fg = "fg", bg = "bg", reverse = true }
:hl = { fg = "fg", bg = "bg", reverse = true, bold = true }
:Is there any reason for this to be happening or something I might be doing incorrectly?
The text was updated successfully, but these errors were encountered: