romgrk / barbar.nvim

The neovim tabline plugin.
2.33k stars 84 forks source link

How to make all tabs transparent? #628

Open dquevid opened 1 week ago

dquevid commented 1 week ago

I had wandered through issues about tabs background color, and the general solution was to change the color of the highlight group representing the tab. Even though, it's a quite twisted way to change tabs colors i have followed the instructions by adding these lines to the configuration:

vim.api.nvim_set_hl(0, 'BufferCurrent', { bg = '' })
vim.api.nvim_set_hl(0, 'BufferVisible', { bg = '' })
vim.api.nvim_set_hl(0, 'BufferAlternate', { bg = '' })
vim.api.nvim_set_hl(0, 'BufferInactive', { bg = '', fg = '#aaaaaa' })
vim.api.nvim_set_hl(0, 'BufferInactiveSign', { bg = '', fg = '' })

But it half solved the issue, cause there are some artifacts causing the background of the tabs to be black.

Here is the example: the .gitignore file was changed and it's background has become black when i selected the other tab. I suppose that's because the tab's highlight group has changed.

ezgif-7-874d36e674

So, is there a simpler way to just make all the tabs transparent, no matter which highlight groups they belong?

exzolink commented 1 week ago

bg = 'none'

dquevid commented 1 week ago

bg = 'none'

thank you for the answer! Should I set it to all the highlight groups above or a specific one?

Iron-E commented 4 days ago

bg = 'none'

thank you for the answer! Should I set it to all the highlight groups above or a specific one?

Try all, and then remove them as necessary 🙂