{ pkgs, config, lib, ... }: with lib; with builtins; let cfg = config.vim.dashboard.dashboard-nvim; in { options.vim.dashboard.dashboard-nvim = { enable = mkEnableOption "dashboard-nvim"; }; config = mkIf cfg.enable { vim.startPlugins = [ "dashboard-nvim" ]; vim.nnoremap = { "bn" = ":BufferLineCycleNext"; "bp" = ":BufferLineCyclePrev"; "bc" = ":BufferLinePick"; "bse" = ":BufferLineSortByExtension"; "bsd" = ":BufferLineSortByDirectory"; "bsi" = ":lua require'bufferline'.sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end)"; "bmn" = ":BufferLineMoveNext"; "bmp" = ":BufferLineMovePrev"; "b1" = "BufferLineGoToBuffer 1"; "b2" = "BufferLineGoToBuffer 2"; "b3" = "BufferLineGoToBuffer 3"; "b4" = "BufferLineGoToBuffer 4"; "b5" = "BufferLineGoToBuffer 5"; "b6" = "BufferLineGoToBuffer 6"; "b7" = "BufferLineGoToBuffer 7"; "b8" = "BufferLineGoToBuffer 8"; "b9" = "BufferLineGoToBuffer 9"; }; vim.luaConfigRC.dashboard-nvim = nvim.dag.entryAnywhere '' require("dashboard-nvim").setup{ hide = { statusline -- hide statusline default is true tabline -- hide the tabline winbar -- hide winbar }, preview = { command -- preview command file_path -- preview file path file_height -- preview file height file_width -- preview file width }, } ''; }; }