Closed TLSingh1 closed 1 year ago
Not sure if this is related, but it seems that the highlight group for the barbar background has been changed.
![]()
Not sure if this is related, but it seems that the highlight group for the barbar background has been changed.
Certain default values did change in https://github.com/romgrk/barbar.nvim/pull/486 to more accurately reflect the intended usage of the built-in highlight groups (which helped to ensure the preset feature looked correct with minimal configuration)
The old look can be restored with :highlight
or nvim_set_hl
; I can write a snippet for that if you'd like.
Certain default values did change in https://github.com/romgrk/barbar.nvim/pull/486 to more accurately reflect the intended usage of the built-in highlight groups (which helped to ensure the preset feature looked correct with minimal configuration)
Ahh no wonder
I can write a snippet for that if you'd like
Yes please, I'm sure that'll be helpful for many users :))
I didnt realize I opened this, im so sorry.
@Iron-E you were super helpful earlier and solved my problem :) I will close this.
Yes please, I'm sure that'll be helpful for many users :))
Hopefully this helps:
-- WARN: must go before your colorscheme is sourced
vim.api.nvim_create_autocmd('ColorScheme', {
callback = function()
-- WARN: `vim.api.nvim_get_hl` only works in 0.9+.
-- Use `nvim_get_hl_by_name for lower versions.
local tabline = vim.api.nvim_get_hl(0, {link = false, name = 'TabLine'})
for _, hl in ipairs(vim.fn.getcompletion('BufferDefaultCurrent*', 'highlight')) do
local definition = vim.api.nvim_get_hl(0, {link = false, name = hl:gsub('Default', '')})
definition.bg = tabline.bg
definition.ctermbg = tabline.ctermbg
vim.api.nvim_set_hl(0, hl, definition)
end
local tabline_fill = vim.api.nvim_get_hl(0, {link = false, name = 'TabLineFill'})
for _, activity in ipairs {'Alternate', 'Inactive', 'Visible'} do
for _, hl in ipairs(vim.fn.getcompletion('BufferDefault' .. activity .. '*', 'highlight')) do
local definition = vim.api.nvim_get_hl(0, {link = false, name = hl:gsub('Default', '')})
definition.bg = tabline_fill.bg
definition.ctermbg = tabline_fill.ctermbg
vim.api.nvim_set_hl(0, hl, definition)
end
end
local special = vim.api.nvim_get_hl(0, {link = false, name = 'Special'})
vim.api.nvim_set_hl(0, 'BufferScrollArrow', special)
vim.api.nvim_set_hl(0, 'BufferTabpagesSep', special)
vim.api.nvim_set_hl(0, 'BufferTabpages', special)
vim.api.nvim_set_hl(0, 'BufferTabpagesSep', special)
end,
group = vim.api.nvim_create_augroup('config', {clear = false})
})
Thanks for the snippet! However, it seems like it's still not targeting the grey bar in the screenshot :(
Thanks for the snippet! However, it seems like it's still not targeting the grey bar in the screenshot :(
But some colors did change, right (i.e. the snippet applied)? Can you do :echo &tabline
and report which highlight group is the one that's incorrect? I will try to make that snippet right for you if I can.
Hello, I also have the same problem. A grey bar appeared after I switched Neovim to 0.10-dev. I also tried the above snippet, and it doesn't work.
Here's the output of :echo &tabline
%1@barbar#events#main_click_handler@%#BufferCurrentSign#▎%#BufferCurrent# %#DevIconLuaCurrent# %1@barbar#events#main_click_handler@%#Buffe
rCurrent#pm.lua%#BufferCurrent# %1@barbar#events#close_click_handler@%#BufferCurrent#𝝬 %1@barbar#events#main_click_handler@%#BufferCurrentS
ignRight#%#BufferInactiveSign#▎%#BufferTabpageFill#
%0@barbar#events#main_click_handler@%#BufferTabpageFill#
@UrNightmaree @canvanaut does #500 help?
Any luck with solving this?
Any luck with solving this?
See https://github.com/romgrk/barbar.nvim/issues/491#issuecomment-1555973031. Otherwise, you can pin the latest stable version
@Iron-E Yes, it does fix it.
Merged to master. Thanks for confirming!
What is the issue? Please provide a description 🙂