-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Hello, I have a configuration that only display the bar for pinned buffers, and I would like to have a BufferNext & BufferPrevious command but only for pinned buffers.
This is my config:
return {
'romgrk/barbar.nvim',
init = function() vim.g.barbar_auto_setup = false end,
opts = {
auto_hide = 0,
hide = {
current = true, -- Hide the current buffer
visible = true, -- Hide visible (active) buffers
inactive = true, -- Hide inactive (hidden) buffers
alternate = true, -- Hide alternate buffers
},
icons = {
button = false,
diagnostics = {
[vim.diagnostic.severity.ERROR] = { enabled = false },
[vim.diagnostic.severity.WARN] = { enabled = false },
[vim.diagnostic.severity.INFO] = { enabled = false },
[vim.diagnostic.severity.HINT] = { enabled = false },
},
separator = { left = '', right = '' },
separator_at_end = false,
-- Configure the icons on the bufferline based on the visibility of a buffer.
-- Supports all the base icon options, plus `modified` and `pinned`.
pinned = { button = '', filename = true, extension = true },
},
},
keys = {
{ "<leader>`", "<cmd>BufferPin<cr>", desc = "Pin a buffer" },
{ "<F1>", "<cmd>BufferGotoPinned 1<cr>", desc = "Goto buffer 1" },
{ "<F2>", "<cmd>BufferGotoPinned 2<cr>", desc = "Goto buffer 2" },
{ "<F3>", "<cmd>BufferGotoPinned 3<cr>", desc = "Goto buffer 3" },
{ "<F4>", "<cmd>BufferGotoPinned 4<cr>", desc = "Goto buffer 4" },
{ "<F5>", "<cmd>BufferGotoPinned 5<cr>", desc = "Goto buffer 5" },
{ "<F6>", "<cmd>BufferGotoPinned 6<cr>", desc = "Goto buffer 6" },
{ "<F7>", "<cmd>BufferGotoPinned 7<cr>", desc = "Goto buffer 7" },
{ "<F8>", "<cmd>BufferGotoPinned 8<cr>", desc = "Goto buffer 8" },
{ "<F9>", "<cmd>BufferGotoPinned 9<cr>", desc = "Goto buffer 9" },
{ "<F10>", "<cmd>BufferGotoPinned 10<cr>", desc = "Goto buffer 10" },
{ "<F11>", "<cmd>BufferGotoPinned 11<cr>", desc = "Goto buffer 11" },
{ "<F12>", "<cmd>BufferGotoPinned 12<cr>", desc = "Goto buffer 12" },
}
}I would very much appreciate this feature
{ "]b", "<cmd>BufferNextPinned<cr>", desc = "Goto next pinned buffer" },
{ "[b", "<cmd>BufferPreviousPinned<cr>", desc = "Goto previous pinned buffer" },Metadata
Metadata
Assignees
Labels
No labels