dashboard/dashboard-nvim: add setupOpts

This commit is contained in:
NotAShelf 2024-09-28 22:18:28 +03:00
parent ab9a7c1600
commit ccea1a6159
No known key found for this signature in database
GPG key ID: AF26552424E53993
2 changed files with 9 additions and 6 deletions

View file

@ -5,16 +5,17 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.dashboard.dashboard-nvim;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"dashboard-nvim"
];
vim = {
startPlugins = ["dashboard-nvim"];
vim.pluginRC.dashboard-nvim = entryAnywhere ''
require("dashboard").setup{}
'';
pluginRC.dashboard-nvim = entryAnywhere ''
require("dashboard").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}

View file

@ -1,7 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.dashboard.dashboard-nvim = {
enable = mkEnableOption "Fancy and Blazing Fast start screen plugin of neovim [dashboard.nvim]";
setupOpts = mkPluginSetupOption "dashboard.nvim" {};
};
}