Open paradoxsupreme opened 3 years ago
Hmm there has nvim-bufferline.lua and barbar.nvim. they are both awesome. so no reason to achieve this feature.
@glepnir allow me to contradict you. I think the strength of your plugin is the approach with the description of components and all their properties. This is a pretty cool modular architecture and the reason I'm about to switch to this plugin on a new branch of my dotfiles. Sure you have a nice set of providers
included as well. But (at least for me) that isn't the appealing part of this plugin.
The tabline
is nothing different than the statusline
from how Vim interprets it. I only had a glance on your code. But it looks like adding support for tabline
is very easy. Its basically just about a new section table and setting this to the according Vim option with the complete same logic.
So what is the advantage of this plugin in advanced to all other plugins like those you suggested? Simple: full control, but with the gain of your nice architecture that let the user focus on the details. I mean sure, if you want a to actually have a loop of components that draw the tabs or buffers for you, then this would be way more work to add to this plugin. But what if that is not needed?
After many years of using Vim, I realized that having all your buffers listed in the tabline
makes barely sense to me. I open way too many buffers in a session as they could all get displayed there. And the hardware is too fast and cheap as it would be worth to remove buffers regularely. So what is their purpose in this tabline
then? I don't use them to switch buffers. That would be simply to inefficient, especially when I can't see all of them. So after all they just look pretty at best.
Listing your open tabs makes way more sense. But personally I never became familiar with them in Vim and barely use them expect from getting temporally full-screen for special situations or plugins from time to time. After all they are again just a good indicator at which tab you are and if there is something "ongoing" in another tab. It's like your workspaces of the window mangers. It is helpful to see them and get highlights for events. But that's it. Anyway, there are simple ways to use your component logic to write one that displays all tabs. If someone needs a more loop based approach, they should select a different plugin.
Afterall, Vim lacks in a global statusline as many other editors have. But there actually is the tabline
. Although it is named like that, it must not be used this way. I mean people display their buffers there... So I don't want to clutter my statusline
for every single window with information that are global and do not relate to the displayed buffer. Take the git branch as an example (kinda depends on your workflow). The LSP server status or asynchronous indicators for a done background job. Eventually even the Vi mode itself, since it is kinda global as well. I would love to have this tabline
at the bottom, but well you can't have everything I guess.
After all, there are use-cases for using your plugins cool features to allow users define their tabline
as they want in a nice programmatic manner. And since the changes appear to be so marginal, I barely see a reason to not consider supporting it. Thank you very much for reading! :pray:
@weilbith Thanks for the detailed explanation, let me think about it
Maybe there could be a provider for those plugins (barbar.nvim
/nvim-bufferline
/ vim-crystalline
) and then anyone can customize the tabline by including plugins as a component of a galaxyline
section.
vim-crystalline
is a fast, modular tabline plugin (for reference). I used to use it before barbar.nvim
.Right now I do something like that to integrate my plugin libmodal
with galaxyline
.
@glepnir did you had time to think about it?
@weilbith I am going to implement it, but recently I don't have much time, the company has a troublesome project, so sorry, it may take a while. PR Welcome.
That is great! :partying_face: Alright, I'll look into it and gonna prepare a PR. At least that is the plan. :grimacing: But here the same at work. We have a big main release about to come. So also not too much time atm.
I suggest adding only support for tabs (not buffers), like this is done in lightline. bufferline/barbar is intended for displaying buffer list
I suggest adding only support for tabs (not buffers), like this is done in lightline. bufferline/barbar is intended for displaying buffer list
I second that. I'm trying to move away from non-lua plugins at the moment and the lack of a proper tabline is odd. Sadly i don't have the knowledge/skills to help out.
I was using airline before and the overall integration and configuration was cool. Tabs worked as expected. Working with buffers and tabs seems odd to me.
Regards
It would be nice if it had support for tabline/bufferline.