Add barbar again using old config, set comment to load on buffer
This commit is contained in:
parent
4cf8db8e73
commit
c34b29c222
28
lua/plugins/barbar.lua
Normal file
28
lua/plugins/barbar.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
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 = "" } },
|
||||
},
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
keys = { "gcc", "gcb" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = true,
|
||||
opts = { ignore = "^$" },
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue