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

Option to render into winbar instead of tabline?

Open mrjones2014 opened this issue 3 years ago • 6 comments

I used Lualine for this but it's been giving me issues and crashing my entire Neovim so I switched to Feline.nvim.

Is there a way to use barbar.nvim in the winbar instead of tabline?

mrjones2014 avatar Sep 12 '22 13:09 mrjones2014

Wouldn't that disallow showing non-visible buffers? Or is that what you're looking for?

Iron-E avatar Sep 12 '22 22:09 Iron-E

No, it doesn't disallow showing non-visible buffers, why would it? Unless I'm missing something.

I've got a partial implementation of what I'm looking for as a feline.nvim component here: https://github.com/mrjones2014/dotfiles/blob/54280fd21301da42413d9a42926417ec2f5b4858/.config/nvim/lua/my/configure/feline/buffers.lua

The issue is I just can't figure out how to truncate it properly so that the current/active buffer is always visible, and it seems like this is a problem you've already solved?

mrjones2014 avatar Sep 12 '22 22:09 mrjones2014

Since winbar only renders above windows, and any buffer in a window is automatically visible (for all intents and purposes), it would make showing buffers not currently windowed impossible (AFAICT) unless we still put the invisibles in the &tabline.

Would the &tabline approach for invisible buffers be okay with you?

Iron-E avatar Sep 12 '22 22:09 Iron-E

Oh, gotcha, yeah I misunderstood what you meant.

Yes I would be okay with the tabline approach. tbh I would probably just turn off the tabline (can winbar support add an option to disable tabline entirely?) since I just use a fuzzy finder to jump to unlisted/unwindowed buffers.

mrjones2014 avatar Sep 12 '22 23:09 mrjones2014

can winbar support add an option to disable tabline entirely

Yeah, that shouldn't be a problem.


I'm holding on another PR before doing any big feature implementation, but it's good to hash out the details.

Iron-E avatar Sep 12 '22 23:09 Iron-E

Perfect. I think I can live with my kinda janky bespoke feline.nvim implementation until we can get winbar support in barbar.nvim, thanks!

mrjones2014 avatar Sep 12 '22 23:09 mrjones2014