A fast, minimal buffer switcher for Neovim with MRU (Most Recently Used) ordering.
https://github.com/user-attachments/assets/placeholder
- Buffers ordered by most recently used
- Floating window appears in the bottom-right corner
- Single key activates the switcher; pressing again cycles through buffers
- Delete buffers directly from the list
- Existing keymaps are preserved and restored on dismiss
- Neovim >= 0.9.0
{
"aliazhar/anchor.nvim",
config = function()
require("anchor").setup()
end,
}use {
"aliazhar/anchor.nvim",
config = function()
require("anchor").setup()
end,
}Below is the default configuration. You only need to pass the values you want to override.
require("anchor").setup({
keymaps = {
activate = "'", -- activate / cycle to next buffer
hide = "<esc>", -- close the switcher
focus_next = "j", -- move down in the list
focus_previous = "k", -- move up in the list
confirm = "a", -- switch to the highlighted buffer
delete = "w", -- delete the highlighted buffer
},
bg = "#1e1e2e", -- floating window background
fg = "#cdd6f4", -- floating window foreground
})- Press
'to open the buffer switcher. - A floating window appears after a short delay showing your buffers in MRU order.
- Press
'again (orj/k) to cycle through the list. - Press
ato jump to the highlighted buffer, orwto delete it. - Press
<esc>to dismiss without switching.
| Key | Action |
|---|---|
' |
Activate switcher / cycle to next |
j |
Focus next buffer |
k |
Focus previous buffer |
a |
Confirm selection |
w |
Delete highlighted buffer |
<esc> |
Close switcher |
| Group | Default | Description |
|---|---|---|
AnchorNormal |
bg #1e1e2e fg #cdd6f4 |
Floating window text |
AnchorBorder |
fg #1e1e2e |
Floating window border |
Override these in your config or colorscheme to match your theme.
MIT