https://github.com/OXY2DEV/bars.nvim
A starting point/guide for creating custom statusline, statuscolumn, tabline & winbar for Neovim.
https://github.com/OXY2DEV/bars.nvim
Last synced: about 1 month ago
JSON representation
A starting point/guide for creating custom statusline, statuscolumn, tabline & winbar for Neovim.
- Host: GitHub
- URL: https://github.com/OXY2DEV/bars.nvim
- Owner: OXY2DEV
- License: mit
- Created: 2024-07-13T14:29:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-15T12:40:34.000Z (about 1 month ago)
- Last Synced: 2025-03-15T13:33:08.551Z (about 1 month ago)
- Language: Lua
- Homepage:
- Size: 23.4 MB
- Stars: 66
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- my-neovim-pluginlist - OXY2DEV/bars.nvim - commit/OXY2DEV/bars.nvim)  (View)
- awesome-neovim-sorted - OXY2DEV/bars.nvim
- awesome-neovim-sorted - OXY2DEV/bars.nvim
- awesome-neovim - OXY2DEV/bars.nvim - A starting point/guide for creating custom statusline, statuscolumn, tabline & winbar. (Bars and Lines / Colorscheme Switchers)
README
# 🚀 bars.nvim
![]()
![]()
![]()
![]()
![]()
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.
## 📖 Table of contents
- [✨ Features](#-features)
- [📚 Requirements](#-requirements)
- [💡 Guide](#-guide)
- [📐 Installation](#-installation)
- [🧭 Configuration](#-configuration)
- [🧰 Commands](#-commands)## ✨ Features
- Actually fast,
- Termux: average: `7ms`, lowest: `5ms`.
- MacOS: average: `2ms`, lowest: `1.8ms`.- Fully customisable.
- Per-window configuration.
- Ability to toggle various bars/lines via commands.## 📚 Requirements
- 0.10.4 or higher recommended.
>[!NOTE]
> The version requirement varies for different parts of `bars.nvim`.- Nerd font >= 3.0.0
- Git(`branch` in statusline).
- Tree-sitter parser(`node` in winbar).## 💡 Guide
Guide for creating your own custom statusline, statuscolumn, tabline & winbar are given below,
- [Statuscolumn](https://github.com/OXY2DEV/bars.nvim/wiki/Guide_Statuscolumn)
- [Statusline](https://github.com/OXY2DEV/bars.nvim/wiki/Guide_Statusline)
- [Winbar](https://github.com/OXY2DEV/bars.nvim/wiki/Guide_Winbar)
- [Tabline](https://github.com/OXY2DEV/bars.nvim/wiki/Guide_Tabline)## 📐 Installation
### 🧩 Vim-plug
Add this to your plugin list.
```vim
Plug "OXY2DEV/bars.nvim"
```### 💤 lazy.nvim
>[!NOTE]
> Lazy loading is NOT needed for this!For `plugins.lua` users,
```lua
{
"OXY2DEV/bars.nvim",
},
```For `plugins/bars.lua`,
```lua
return {
"OXY2DEV/bars.nvim",
};
```## 🦠 mini.deps
```lua
local MiniDeps = require("mini.deps");MiniDeps.add({
source = "OXY2DEV/bars.nvim"
});
```### 🌒 Rocks.nvim
>[!WARNING]
> `luarocks package` may sometimes be a bit behind `main`.```vim
:Rocks install bars.nvim
```### 📥 GitHub release
Tagged releases can be found in the [release page](https://github.com/OXY2DEV/bars.nvim/releases).
>[!NOTE]
> `Github releases` may sometimes be slightly behind `main`.## 🧭 Configuration
`bars.nvim` can be configured in 2 ways,
1. Via the `setup()` function.
```lua
require("bars").setup({
global = false
});
```2. Via the modules own setup function.
```lua
require("bars.statusline").setup({
ignore_filwtypes = { "help" }
});
```Check the [wiki](https://github.com/OXY2DEV/bars.nvim/wiki/Home) to learn about all the configuration options!
Usage instructions for different modules,
- [Statuscolumn](https://github.com/OXY2DEV/bars.nvim/wiki/Usage_Statuscolumn)
- [Statusline](https://github.com/OXY2DEV/bars.nvim/wiki/Usage_Statusline)
- [Winbar](https://github.com/OXY2DEV/bars.nvim/wiki/Usage_Winbar)
- [Tabline](https://github.com/OXY2DEV/bars.nvim/wiki/Usage_Tabline)## 🧰 Commands
`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.
>
> ```vim
> " 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!## 🎨 Highlight groups
`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