fidget: lazy load

This commit is contained in:
Pei Yang Ching 2024-09-29 00:56:53 +02:00
parent d7de60603f
commit b9bea6edc8
2 changed files with 11 additions and 7 deletions

View file

@ -114,6 +114,7 @@ isMaximal: {
filetree = { filetree = {
nvimTree = { nvimTree = {
enable = true; enable = true;
openOnSetup = false;
}; };
}; };

View file

@ -4,16 +4,19 @@
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.visuals.fidget-nvim; cfg = config.vim.visuals.fidget-nvim;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.startPlugins = ["fidget-nvim"]; vim.lazy = {
plugins = [
vim.pluginRC.fidget-nvim = entryAnywhere '' {
require'fidget'.setup(${toLuaObject cfg.setupOpts}) package = "fidget-nvim";
''; setupModule = "fidget";
event = "LspAttach";
inherit (cfg) setupOpts;
}
];
};
}; };
} }