bufferline.nvim icon indicating copy to clipboard operation
bufferline.nvim copied to clipboard

[HELP]: How to set transparency

Open Schiz0idCat opened this issue 8 months ago • 7 comments

Is there a way to set the bufferline to be transparent?

I'm talking about the part in white blue:

Image

(I put it in light blue intentionally to make it clear what I mean.)

Schiz0idCat avatar May 11 '25 20:05 Schiz0idCat

@Schiz0idCat is this helpful?

    bufferline.setup({
        highlights = {
            fill = { fg = "..." , bg = "none" } ...

For me, I don't know why it works on Neovim 0.10 but not in 0.11.

GiuseppeMP avatar May 16 '25 18:05 GiuseppeMP

it really is. I thought I was crazy, but now I know it just doesn't work on my neovim version. 😐

Schiz0idCat avatar May 17 '25 22:05 Schiz0idCat

Things used to just work automatically based on my theme settings, which was set to transparent, now it's not transparent by default

sairajchouhan avatar May 24 '25 18:05 sairajchouhan

Let me know if anyone finds a solution to this

RazoBeckett avatar Jun 30 '25 16:06 RazoBeckett

Seems like neovim version 11 causes this, the transparent no bufferline no longer works with any themes.

Vanny2000 avatar Jul 04 '25 09:07 Vanny2000

having the same issue here, macos, all terminals, nvim 11, it used to work well in 10

diegoulloao avatar Aug 17 '25 01:08 diegoulloao

It is really fun to get a transparent bufferline. You have to do the following:

require('bufferline').setup({
    highlights = {
        background = { bg = 'none' },
        fill = { bg = 'none' },
        buffer_selected = { bg = 'none', fg = '#fab387' },
        buffer_visible = { bg = 'none', fg = '#a6adc8' },
        close_button = { bg = 'none' },
        close_button_selected = { bg = 'none' },
        close_button_visible = { bg = 'none' },
        duplicate = { bg = 'none' },
        duplicate_selected = { bg = 'none' },
        duplicate_visible = { bg = 'none' },
        error = { bg = 'none' },
        error_selected = { bg = 'none' },
        error_visible = { bg = 'none' },
        hint = { bg = 'none' },
        hint_selected = { bg = 'none' },
        hint_visible = { bg = 'none' },
        indicator_selected = { bg = 'none' },
        indicator_visible = { bg = 'none' },
        info = { bg = 'none' },
        info_selected = { bg = 'none' },
        info_visible = { bg = 'none' },
        modified = { bg = 'none' },
        modified_selected = { bg = 'none' },
        modified_visible = { bg = 'none' },
        numbers = { bg = 'none' },
        numbers_selected = { bg = 'none' },
        numbers_visible = { bg = 'none' },
        offset_separator = { bg = 'none' },
        pick = { bg = 'none' },
        pick_selected = { bg = 'none' },
        pick_visible = { bg = 'none' },
        separator = { bg = 'none' },
        separator_selected = { bg = 'none' },
        separator_visible = { bg = 'none' },
        tab = { bg = 'none' },
        tab_close = { bg = 'none' },
        tab_selected = { bg = 'none' },
        tab_separator = { bg = 'none' },
        tab_separator_selected = { bg = 'none' },
        trunc_marker = { bg = 'none' },
        warning = { bg = 'none' },
        warning_selected = { bg = 'none' },
        warning_visible = { bg = 'none' },
    },
    options = {
        indicator = {
            icon = '',
            style = 'none',
        },
        separator_style = { '', '' },
    },
})

Unfortunately, even if you want the buffer_selected to have a background colour, the filetype icon has no background. I haven't found a way to fix that, though.

onaforeignshore avatar Oct 04 '25 13:10 onaforeignshore