{ pkgs, lib, ... }: { vim.keybindings = { keybindings = { "[" = { b = { command = "BufferLineCycleNext"; label = "Navigate to next buffer"; options.silent = true; }; }; "]" = { b = { command = "BufferLineCyclePrev"; label = "Navigate to previous buffer"; options.silent = true; }; }; "" = { b = { d = { command = "BufferLineSortByDirectory"; label = "Sort bufferline by directory"; options.silent = true; }; e = { command = "BufferLineSortByExtension"; label = "Sort bufferline by extension"; options.silent = true; }; "$" = { command = "BufferLineGoToBuffer -1"; label = "Go to last buffer"; options.silent = true; }; } // (lib.attrsets.genAttrs ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"] (n: { command = "BufferLineGoToBuffer ${n}"; label = "Go to buffer ${n}"; options.silent = true; })); }; g = { b = { command = "BufferLinePick"; label = "Go to buffer"; options.silent = true; }; }; }; }; output.plugins = with pkgs.vimPlugins; [ bufferline-nvim ]; output.extraConfig = '' set termguicolors set tabline= lua << EOF require("bufferline").setup{ diagnostics = "nvim_lsp", diagnostics_indicator = function(count, level, diagnostics_dict, context) local s = " " for e, n in pairs(diagnostics_dict) do local sym = e == "error" and " " or (e == "warning" and " " or "" ) s = s .. n .. sym end return s end } EOF ''; }