diffview: lazy load

This commit is contained in:
Ching Pei Yang 2024-09-30 21:59:05 +02:00 committed by Ching Pei Yang
parent 127ae0200d
commit a9ce2fe101
No known key found for this signature in database
GPG key ID: 062FBBCE1D0C5DD9
2 changed files with 13 additions and 4 deletions

View file

@ -8,9 +8,16 @@
cfg = config.vim.utility.diffview-nvim;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"diffview-nvim"
"plenary-nvim"
vim = {
startPlugins = ["plenary-nvim"];
lazy.plugins = [
{
package = "diffview-nvim";
cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"];
setupModule = "diffview";
inherit (cfg) setupOpts;
}
];
};
};
}

View file

@ -1,7 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.diffview-nvim = {
enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev";
setupOpts = mkPluginSetupOption "Fidget" {};
};
}