Open fenghourun opened 1 week ago
We generate the icon HL group here: https://github.com/romgrk/barbar.nvim/blob/31b6951c53a59bccfa91bf3984ed1510a940c836/lua/barbar/icons.lua#L22-L26
What's the output of :hi BufferCurrent
?
Alternatively, what's the output of :=require('barbar.utils.highlight').bg_or_default({'BufferCurrent'}, 'none')
?
We generate the icon HL group here:
What's the output of
:hi BufferCurrent
? Alternatively, what's the output of:=require('barbar.utils.highlight').bg_or_default({'BufferCurrent'}, 'none')
?
The output of :hi BufferCurrent
seems to be in line with what I would want (light background)
Here's the output of the second command
{
cterm = "none",
gui = 1974305
}
I should mentioned that I also have an OptionSet
autocmd that tries to re-apply my highlight groups when a background change is detected. Maybe this is part of the issue? Though I'm using other plugins that depend on nvim-devicons which doesn't seem to be affected by this issue
I should mentioned that I also have an OptionSet autocmd that tries to re-apply my highlight groups when a background change is detected. Maybe this is part of the issue?
Can you post a snippet? It might be related due to how ordering of autocmd's work. Or we might need to listen to OptionSet ourselves and set up the highlights again 🤔
I should mentioned that I also have an OptionSet autocmd that tries to re-apply my highlight groups when a background change is detected. Maybe this is part of the issue?
Can you post a snippet? It might be related due to how ordering of autocmd's work. Or we might need to listen to OptionSet ourselves and set up the highlights again 🤔
Sure thing!
vim.api.nvim_create_autocmd("OptionSet", {
pattern = "background",
callback = function()
set_colorscheme()
config_lualine()
config_ibl()
end
})
The function set_colorscheme()
is composed of a series of vim.api.nvim_set_hl(...)
calls for various plugins. I also have config_lualine()
here which does something along the lines of
require('lualine').setup {
-- setup colors here
}
which I found was needed for me to get highlights switching properly with the background
option for plugins which accepted theme options as part of the setup
function
The highlight groups for the background color of the file-type icons doesn't seem to be working for me, but only for the current tab for some reason.
I have the following highlight groups set using
{bg = some_color}
Here's the options I'm passing into barbar
Could this have something to do with
background=light
?