Skip to content

Commit

Permalink
diffview: lazy load
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Sep 29, 2024
1 parent 54f4d71 commit fe87110
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 11 additions & 4 deletions modules/plugins/utility/diffview/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
];
};
};
}
2 changes: 2 additions & 0 deletions modules/plugins/utility/diffview/diffview.nix
Original file line number Diff line number Diff line change
@@ -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" {};
};
}

0 comments on commit fe87110

Please sign in to comment.