bartender.nvim is a plugin to help you manage your bars
A component is an atomic piece of your statusline.
A component is simply a function that returns a table with the following keys:
-
text
: stringString that the component should display
-
highlight
: string | table-
if the type is a string, it will act as the highlight-group name that this component will use for it's highlighting
-
if the type is a table, it with the same form as what
nvim_set_hl()
takes.If non-nil, a highlight group for
component.text
is created with provided attributes. The name of this new highlight group if prefixed with config'shighlight_prefix
.If nil, a new highlight group is not defined.
-
-
click
: function -> nilFunction that is run when you click on the component
A section is a group of components. Sections exist for the following reasons:
- semantic grouping of components
- easily setting accent colors
- lazily changing components
local section = {}
Sections and components are evaluated in the context of the window that the bar belongs to at the time of evaluation. Bartender stores the window id of the active window in
bartender.active_winid
.