A starting point/guide for creating custom statusline, statuscolumn, tabline & winbar for Neovim.
bars.nvim
is NOT a plugin, if it wasn't clear. It's just a reference manual.
Actually fast,
7ms
, lowest: 5ms
.2ms
, lowest: 1.8ms
.Fully customisable.
Per-window configuration.
Ability to toggle various bars/lines via commands.
[!NOTE] The version requirement varies for different parts of
bars.nvim
.
branch
in statusline).node
in winbar).Guide for creating your own custom statusline, statuscolumn, tabline & winbar are given below,
Add this to your plugin list.
Plug "OXY2DEV/bars.nvim"
[!NOTE] Lazy loading is NOT needed for this!
For plugins.lua
users,
{
"OXY2DEV/bars.nvim",
},
For plugins/bars.lua
,
return {
"OXY2DEV/bars.nvim",
};
local MiniDeps = require("mini.deps");
MiniDeps.add({
source = "OXY2DEV/bars.nvim"
});
[!WARNING]
luarocks package
may sometimes be a bit behindmain
.
:Rocks install bars.nvim
Tagged releases can be found in the release page.
[!NOTE]
Github releases
may sometimes be slightly behindmain
.
bars.nvim
can be configured in 2 ways,
setup()
function.require("bars").setup({
global = false
});
require("bars.statusline").setup({
ignore_filwtypes = { "help" }
});
Check the wiki to learn about all the configuration options!
Usage instructions for different modules,
bars.nvim
provides a single command :Bars
which has sub-commands that can be used to do different things.
USAGE,
:Bars
:Bars [sub-command]
:Bars [sub-command] [modifier]
:Bars [sub-command] [modifier] [window_1] [window_2] ..
EXAMPLE,
:Bars toggle ? 1000
The sub-commands are given below,
Sub-command | Description |
---|---|
Toggle | Used to toggle statusline, statuscolumn etc. globally. |
Enable | Used to enable statusline, statuscolumn etc. globally. |
Disable | Used to disable statusline, statuscolumn etc. globally. |
toggle | Used to toggle statusline, statuscolumn etc. of given window(s). |
enable | Used to enable statusline, statuscolumn etc. of given window(s). |
disable | Used to disable statusline, statuscolumn etc. of given window(s). |
clean | Cleans up cached values of deleted windows. |
update | Updates the module's configuration ID of given window. |
All the sub-commands support modifier to specify which modules should be affected by the command.
[!TIP] If you want to run a sub-command on the current window then you can ignore the modifier.
" Toggles all bars & lines for the current window. :Bars toggle
Modifiers are given below,
Modifier | Description |
---|---|
all | Affects all modules. |
? | Prompt which module(s) to affect. |
statusline | Self-explanatory. |
statuscolumn | Self-explanatory. |
tabline | Self-explanatory. |
winbar | Self-explanatory. |
You can add any number of windows after the modifier to specify which windows to run the command on.
[!TIP] Cmdline completion are provided for all sub-commands/modifiers/windows!
bars.nvim
comes with the following highlight groups,
BarsFoldClose1
BarsFoldOpen1
BarsFoldClose2
BarsFoldOpen2
BarsFoldClose3
BarsFoldOpen3
BarsFoldClose4
BarsFoldOpen4
BarsFoldClose5
BarsFoldOpen5
BarsFoldClose6
BarsFoldOpen6
BarsLineNr
BarsWrap1<1..10>
BarsVirtual2<1..10>
BarsNormal<1..10>
BarsInsert<1..10>
BarsVisual<1..10>
BarsVisualLine<1..10>
BarsVisualBlock<1..10>
BarsCommand<1..10>
BarsNormal
BarsInsert
BarsVisual
BarsVisualLine
BarsVisualBlock
BarsCommand
BarsFt
BarsFt0
BarsFt1
BarsFt2
BarsFt3
BarsFt4
BarsFt5
BarsFt6
BarsGit
BarsRuler
BarsRulerVisual