A statusline plugin for the pragmatic.
Do you want a statusline that looks like the default one but can show more info, is async and
easy to configure?
Then this plugins is for you.
Window state | Appearance |
---|---|
Active | |
Inactive | |
Plugin |
Default config. Color scheme (Neovim built-in): lunaperche
- No timer. Autocmds and file watchers are used to update the statusline immediately as changes happen.
- Sensible defaults.
- Simple configuration.
- Built-in statusline components.
- Support for global statusline (
laststatus=3
).
- Fancy coloring: Currently the colors of the statusline depend on your color scheme.
- Fancy section separators: Currently components are separated by whitespace.
- Works on Neovim 0.10.1. Not tested on other versions.
Use your favorite package manager. For example, Lazy.nvim:
{
"hernancerm/bareline.nvim",
opts = {}
},
The function require("barelilne").setup()
needs to be called for Bareline to draw the statusline.
Lazy.nvim does this automatically using the snippet above.
local bareline = require("bareline")
bareline.setup()
Is equivalent to:
local bareline = require("bareline")
bareline.setup({
statuslines = {
-- Active window.
active = {
{ -- Section 1: Left.
bareline.components.vim_mode,
bareline.components.file_path_relative_to_cwd,
bareline.components.lsp_servers,
"%m",
"%h",
"%r",
},
{ -- Section 2: Right.
bareline.components.diagnostics,
bareline.components.indent_style,
bareline.components.end_of_line,
bareline.components.git_head,
bareline.components.cwd,
bareline.components.position,
},
},
-- Inactive windows.
inactive = {
{ -- Section 1: Left.
bareline.components.vim_mode:mask(" "),
bareline.components.file_path_relative_to_cwd,
bareline.components.lsp_servers,
"%m",
"%h",
"%r",
},
{ -- Section 2: Right.
bareline.components.diagnostics,
bareline.components.indent_style,
bareline.components.end_of_line,
bareline.components.cwd,
bareline.components.position,
},
},
-- Plugin windows.
plugin = {
{ -- Section 1: Left.
bareline.components.plugin_name,
"%m",
},
{ -- Section 2: Right.
bareline.components.position,
},
},
},
})
Please refer to the help file: bareline.txt.
In "Love Story," why do the two characters fall madly in love with each other? No reason. In Oliver Stone's "JFK," why is the President suddenly assassinated by some stranger? No reason. In the excellent "Chain Saw Massacre" by Tobe Hooper, why don't we ever see the characters go to the bathroom or wash their hands like people do in real life? Absolutely no reason. — Rubber (2010).
No reason.
You gotta have a reason. Everything has a reason. — Dr. House, from House M.D. (2004-2012).
I know people like to meme about how vim enthusiasts are always trying to convince people to learn vim keybindings but I truly believe that learning it will not only make you faster but also rekindle your love for programming, it did for me. — Nexxel (2023).
The latter.