mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
dashboard.nvim: remove setup method
This commit is contained in:
parent
fc1308d767
commit
11a68d154c
1 changed files with 10 additions and 2 deletions
|
@ -107,7 +107,7 @@ in
|
|||
|
||||
config =
|
||||
let
|
||||
setupOptions = {
|
||||
options = {
|
||||
custom_header = cfg.header;
|
||||
custom_footer = cfg.footer;
|
||||
custom_center = cfg.center;
|
||||
|
@ -122,10 +122,18 @@ in
|
|||
|
||||
session_directory = cfg.sessionDirectory;
|
||||
};
|
||||
|
||||
filteredOptions = filterAttrs (_: v: !isNull v) options;
|
||||
in mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.dashboard-nvim ];
|
||||
extraConfigLua = ''require("dashboard").setup(${helpers.toLuaObject setupOptions})'';
|
||||
extraConfigLua = ''
|
||||
local dashboard = require("dashboard")
|
||||
|
||||
${toString (mapAttrsToList (n: v:
|
||||
"dashboard.${n} = ${helpers.toLuaObject v}\n")
|
||||
filteredOptions)}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue