nvim/lua/pika/plugins/bufferline.lua

22 lines
690 B
Lua

return {
"akinsho/bufferline.nvim",
dependencies = { "echasnovski/mini.icons" },
version = "*",
opts = {
options = {
show_buffer_icons = true,
diagnostics = "nvim_lsp",
offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory" } },
buffers = {
-- You can set buffer_mode to "list" or "tabbed" based on your preference.
buffer_mode = "list",
},
},
},
config = function(_, opts)
require("bufferline").setup(opts)
-- Remap the tab key for buffer navigation (you can adjust the keys as needed)
vim.keymap.set("n", "<Tab>", "<cmd>BufferLineCycleNext<CR>")
vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
end,
}