mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +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 =
|
config =
|
||||||
let
|
let
|
||||||
setupOptions = {
|
options = {
|
||||||
custom_header = cfg.header;
|
custom_header = cfg.header;
|
||||||
custom_footer = cfg.footer;
|
custom_footer = cfg.footer;
|
||||||
custom_center = cfg.center;
|
custom_center = cfg.center;
|
||||||
|
@ -122,10 +122,18 @@ in
|
||||||
|
|
||||||
session_directory = cfg.sessionDirectory;
|
session_directory = cfg.sessionDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
filteredOptions = filterAttrs (_: v: !isNull v) options;
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
extraPlugins = [ pkgs.vimPlugins.dashboard-nvim ];
|
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