29 lines
1.7 KiB
Lua
29 lines
1.7 KiB
Lua
return {
|
|
"romgrk/barbar.nvim",
|
|
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
|
dependencies = "nvim-tree/nvim-web-devicons",
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
init = function()
|
|
vim.g.barbar_auto_setup = false
|
|
vim.keymap.set("n", "<A-,>", "<Cmd>BufferPrevious<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A-.>", "<Cmd>BufferNext<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A-<>", "<Cmd>BufferMovePrevious<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A->>", "<Cmd>BufferMoveNext<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A-p>", "<Cmd>BufferPin<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A-c>", "<Cmd>BufferClose<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<A-C>", "<Cmd>BufferCloseAllButCurrentOrPinned<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<C-p>", "<Cmd>BufferPick<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<Space>bb", "<Cmd>BufferOrderByBufferNumber<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<Space>bd", "<Cmd>BufferOrderByDirectory<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<Space>bl", "<Cmd>BufferOrderByLanguage<CR>", { noremap = true, silent = true })
|
|
vim.keymap.set("n", "<Space>bw", "<Cmd>BufferOrderByWindowNumber<CR>", { noremap = true, silent = true })
|
|
end,
|
|
config = true,
|
|
opts = {
|
|
auto_hide = false,
|
|
hide = { extensions = true },
|
|
modified = { button = "●" },
|
|
pinned = { button = "車", filename = true, separator = { right = "" } },
|
|
},
|
|
}
|