romgrk / barbar.nvim

The neovim tabline plugin.
2.16k stars 81 forks source link

Hiding the tabline on my start screen #542

Closed alyzmal closed 6 months ago

alyzmal commented 6 months ago

So I noticed while reviewing the settings that it's possible to hide the tabline if only a certain amount of tabs remain. However, I would like to still have a tabline when I open a singular file. Would it be possible to instead specifically hide the tabline for certain filetypes (namely the Alpha start screen I'm using)?

Iron-E commented 6 months ago

The exclude_ft option combined with auto_hide should be able to accomplish this.

Alternatively the FileType autocommand with :BarbarDisable

alyzmal commented 6 months ago

I'm struggling to figure out how the first option should be phrased. If it's not too much, could I ask for a snippet demonstrating what you mean?

Iron-E commented 6 months ago

With auto_hide = 0, you can set exclude_ft = {'<FILETYPE>'} where <FILETYPE> is the output of :echo &ft while inside the start screen you use. This should make the tabline:

  1. Disable when there are no visible buffers or tabs, and
  2. Not show the start screen (i.e. it is not visible)
alyzmal commented 6 months ago

That is exactly what I wanted. Thank you so much for your help!