2024-04-20 13:42:06 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2023-07-30 03:56:41 +00:00
|
|
|
|
|
|
|
# Shows buffers in a VSCode-style tab layout
|
|
|
|
|
2022-11-28 00:21:18 +00:00
|
|
|
plugins = [
|
|
|
|
pkgs.vimPlugins.bufferline-nvim
|
|
|
|
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
2024-08-12 01:55:14 +00:00
|
|
|
pkgs.vimPlugins.snipe-nvim # Jump between open buffers
|
2022-11-28 00:21:18 +00:00
|
|
|
];
|
|
|
|
setup.bufferline = {
|
|
|
|
options = {
|
|
|
|
diagnostics = "nvim_lsp";
|
|
|
|
always_show_bufferline = false;
|
|
|
|
separator_style = "slant";
|
2024-04-20 13:42:06 +00:00
|
|
|
offsets = [ { filetype = "NvimTree"; } ];
|
2022-11-28 00:21:18 +00:00
|
|
|
};
|
|
|
|
};
|
2024-08-12 01:55:14 +00:00
|
|
|
setup.snipe = { };
|
2022-11-28 00:21:18 +00:00
|
|
|
lua = ''
|
|
|
|
-- Move buffers
|
|
|
|
vim.keymap.set("n", "L", ":BufferLineCycleNext<CR>", { silent = true })
|
|
|
|
vim.keymap.set("n", "H", ":BufferLineCyclePrev<CR>", { silent = true })
|
|
|
|
|
|
|
|
-- Kill buffer
|
|
|
|
vim.keymap.set("n", "<Leader>x", " :Bdelete<CR>", { silent = true })
|
2024-08-12 01:55:14 +00:00
|
|
|
|
|
|
|
-- Jump to buffer
|
|
|
|
vim.keymap.set("n", "gb", require("snipe").open_buffer_menu, { silent = true }) '';
|
2022-11-28 00:21:18 +00:00
|
|
|
}
|