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

[Feature Request]: Toggle unique buffer name

Open CharaD7 opened this issue 2 years ago • 3 comments

What?

It would be great to be able to toggle on and off unique buffer name.

Why?

I tried to show unique buffer name but could not find a way to do this. However, I think sometimes. we want to see unique buffer names, other times, we don't so it won't hurt to have a feature to allow one to easily toggle unique buffer name.

CharaD7 avatar Jul 06 '22 05:07 CharaD7

@CharaD7 I'm not against this, so if you'd like to raise a PR for it, should quite straightforward. You will need to add (yet another) option to the config.lua which would default to true then. Where the duplicate is added you will need to add a check for that value and if it is empty don't add the duplicate. This should be in buffers.lua and tabpages.lua.

I don't really see this as critical since after almost 2 years this is the first time anyone has requested this, so I'm probably not going to do this myself anytime soon but maybe in the distant future. If you want it, it will be best for you to raise a PR.

akinsho avatar Jul 07 '22 07:07 akinsho

@CharaD7 I'm not against this, so if you'd like to raise a PR for it, should quite straightforward. You will need to add (yet another) option to the config.lua which would default to true then. Where the duplicate is added you will need to add a check for that value and if it is empty don't add the duplicate. This should be in buffers.lua and tabpages.lua.

I don't really see this as critical since after almost 2 years this is the first time anyone has requested this, so I'm probably not going to do this myself anytime soon but maybe in the distant future. If you want it, it will be best for you to raise a PR.

For me this is really useful, I am trying to replace tmux with neovim as a terminal, however the name of each terminal is the name of a shell, like zsh, so when I open as much as a terminal the bufferline gets ugly, so I would like to disable this feature when the buffer type is terminal, I tried to read the source code but it is a bit hard because my English is not very good, can you tell me a temporary solution?

Translated with www.DeepL.com/Translator (free version)

2022-07-31_19-04 2022-07-31_19-04_1

yyy33 avatar Jul 31 '22 11:07 yyy33

@CharaD7 the comment I made earlier still holds, PRs welcome 🙏🏿

akinsho avatar Jul 31 '22 11:07 akinsho

This is now fixed by #556 in dev and will be released soon

akinsho avatar Sep 18 '22 12:09 akinsho