ofseed/nvim

bufferline does not work as expected

fangying opened this issue · 2 comments

It is found that only one bufferline tab will show up, so there must be something wrong with the bufferline config.
AFAIK if bufferline is enabled, nvim can show multiple tab windows and we can use shortcuts to navigate between
theses opened tab windows.

Nothing unexpected. I wrote a filter function to filter buffers, which makes only buffers on the current tab or that are modified but not saved to files will be shown up.

If you are familiar with many popular IDEs before, you may want to interact with bufferline just like the tab bar of IDEs. However, buffers are not tabs, even though many users treat them the same. Vim has its own concept of tabs, totally different from the tabs of IDEs, which is more like a window layout or workspace.

The reason I wrote the filter is that the most efficient way to open a file in the current workspace is to search it by a fuzzy finder, rather than check if it already exists in the bufferline and jumps again and again.

This setting is indeed very personal, but it is true that many people who are more familiar with Vim have this habit. If you are interested in the concepts of buffers and tabs in Vim, you can read some articles about it, or you can fork this repository and modify the configuration file and delete the filter function.

Thanks for your reply. Well I have read through the doc of bufflerline.lua and now realize that it is the custom_filter function that makes a set of filter buffers show up there. And this is surely a very personal taste. I usually open lots of files
and jumps around when I am doing my job. So I think I should write own filter here as suggested.
Thanks for your help.