Closed ghillb closed 1 year ago
I rewrite the config API in case to easily achieve this function. For example in setup, you can filter window like this:
line.wins_in_tab(line.api.get_current_tab()).foreach(function(win)
if string.find(win.buf_name(), "^index") then
return ''
end
...
end),
If return an empty string, this window label won't be rendered.
If you want filter by buffer type, for example, don't display all 'nofile' buffer:
line.wins_in_tab(line.api.get_current_tab()).foreach(function(win)
if win.buf().type == 'nofile' then
return ''
end
...
end),
If return an empty string, this window label won't be rendered.
You can check this for the detail of buf type: neovim help: buftype
A filter config key for certain windows to hide from the bar would be an useful addition.
An example would be the 'index' window label, when opening fugitives git status with
:G
or terminal window labels the user does not deem as valuable.On this pic, only the '[No name]' window label is useful to me.