A simple, minimalistic, easily navigated and anti-bloat buffer statusline.
Standard statusline
nvim-statusline statusline
- Neovim 0.X
git
If you want to set your own colors, you also need
set termguicolors
in your config
Use your favorite package manager, e.g., packer
:
use {'phdah/nvim-statusline'}
and in your init.lua
, put
require('nvim-statusline').setup()
For adding configs, copy these default
require('nvim-statusline').setup({
enable = true, -- Enables the entire statusline
git = true, -- Enables the git status
filename = true, -- Enables showing the filename
buffers = true, -- Enables showing the buffers
lines = true, -- Enables showing line details
keymaps = true, -- Enables the keymaps for buffer switching
-- Colors can be set for each object, and both foreground and background
-- using hex colors
colors = {
git = {
fg = "#D8DEE9",
bg = "#4C566A",
},
filename = {
fg = "#D8DEE9",
bg = "#4C566A",
},
buffers = {
fg = "#D8DEE9",
bg = "#4C566A",
},
lines = {
fg = "#D8DEE9",
bg = "#4C566A",
},
clear = {
fg = "#D8DEE9",
bg = "#2E3440",
},
},
-- }
})
For moving between buffers, use the default <leader>1
to jump to buffer 1
in the buffer list. For setting own keymaps, disable them in the setup()
, and set them to what you want using
vim.api.nvim_set_keymap('n', '<leader><THE_BUFFER_NR>', ':Cbuffernumber <THE_BUFFER_NR><CR>')
for each buffer number.