A Neovim plugin that provides buffer management with a clean, interactive UI.
- Interactive buffer list in a floating window
- Doom Emacs-like keybindings (
<leader>bb) - Support for buffer operations (select, delete, split)
- Customizable display options
- Integration with nvim-web-devicons for file icons
- Fuzzy finding with FZF integration (consistent UI with main buffer manager)
- Line position display showing current line number for active buffers
- Help menu showing all available keybindings
- Clean UI with hidden command execution (no status bar clutter)
Using packer.nvim
use {
'xsoder/buffer-manager',
requires = {
'MunifTanjim/nui.nvim',
'nvim-tree/nvim-web-devicons', -- optional
'ibhagwan/fzf-lua', -- optional
},
config = function()
require('buffer-manager').setup()
end
}Using lazy.nvim
return {
'xsoder/buffer-manager',
dependencies = {
'MunifTanjim/nui.nvim',
'nvim-tree/nvim-web-devicons', -- optional
'ibhagwan/fzf-lua', -- optional
},
config = function()
require('buffer-manager').setup()
end
}Using vim-plug
Plug 'xsoder/buffer-manager'Then in your Lua config:
require('buffer-manager').setup()The plugin comes with sensible defaults but is fully customizable. Here's an example with all default options:
require('buffer-manager').setup({
icons = true,
use_devicons = true,
default_mappings = true,
mappings = {
open = "<leader>bb",
vertical = "<leader>bv",
horizontal = "<leader>bs"
},
window = {
width_ratio = 0.3,
height_ratio = 0.3,
border = "rounded",
position = "center", -- Options: "center", "left", "right", "top", "bottom"
},
display = {
show_numbers = true,
show_modified = true,
show_flags = true,
path_display = "shortened", -- Options: "filename", "relative", "absolute", "shortened"
},
search = {
enabled = true,
keybinding = "/",
prompt = "Search: ",
live_update = true,
},
fzf = {
enabled = true,
keybinding = "", -- Empty since we use <Space>gf globally
prompt = "> ",
preview = true,
preview_window = "right:40%",
window_width = 0.3, -- Matches the main buffer manager window size
window_height = 0.3, -- Matches the main buffer manager window size
}
})<leader>bb: Open buffer manager<leader>bv: Open buffer manager in vertical split mode<leader>bs: Open buffer manager in horizontal split mode
j/kor<Down>/<Up>: Navigate through buffers<CR>or double-click: Select bufferdorD: Delete bufferv: Open in vertical splits: Open in horizontal splitqor<Esc>: Close buffer manager/: enter search mode- Type to filter the buffer list in real-time
- Press
<Enter>to apply the search filter or<Esc>to cancel <Space>gf: Open FZF fuzzy finder for buffers (global keybinding)?: Show help menu with all available keybindings
:BufferManager: Open the buffer manager
The plugin exposes several functions that can be used programmatically:
require('buffer-manager').open()
require('buffer-manager').open_vertical()
require('buffer-manager').open_horizontal()
require('buffer-manager').close()
require('buffer-manager').select_buffer()
require('buffer-manager').delete_buffer()- nvim-web-devicons (optional): For file icons
- fzf-lua (optional): For fuzzy finding functionality
- nui.nvim: For enhanced UI components
MIT


