nixvim/config/plugins/ui/bufferline.nix
Roel de Cort 502d31e03c
feat: small improvements (#25)
- Renamed and moved settings in some plugins due to upstream changes
- Added comments to neovim settings
- Added cmdheight = 0 and mouse = "a" settings to config
2024-08-26 23:37:02 +02:00

109 lines
2 KiB
Nix

{
plugins = {
bufferline = {
enable = true;
settings = {
options = {
diagnostics = "nvim_lsp";
mode = "buffers";
close_icon = " ";
buffer_close_icon = "󰱝 ";
modified_icon = "󰔯 ";
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
};
};
};
};
keymaps = [
{
mode = "n";
key = "]b";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "[b";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<cr>";
options = {
desc = "Delete buffer";
};
}
{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}
{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}
{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
}