nixos/pkgsets/nvim/fugitive.nix
2024-12-21 21:31:34 +01:00

52 lines
1 KiB
Nix

{
lib,
config,
...
}:
lib.mkIf (lib.elem "nvim::fugitive" config.machine.pkgs) {
programs.nvim-lazy.lazyPlugins = [
{
lazy = true;
dir = vPlug: vPlug.neogit;
dependencies = (
vPlug: with vPlug; [
plenary-nvim
diffview-nvim
telescope-nvim
]
);
cmd = [ "Neogit" ];
keys = [
{
bind = "<leader>gm";
cmd = "<Cmd>Neogit<CR>";
opts = {
desc = "Open Neogit.";
};
}
];
config = true;
}
{
lazy = true;
dir = vPlug: vPlug.diffview-nvim;
}
{
enabled = true;
lazy = true;
dir = vPlug: vPlug.fugitive;
cmd = [ "Git" ];
keys = [
{
bind = "<leader>gs";
cmd = "<Cmd>Git<CR>";
opts = {
desc = "Open fugitive (git status)";
};
}
# { bind = "<leader>ga"; cmd = "<Cmd>Git<CR>"; opts = { desc = "Open fugitive (git status)"; }; }
];
}
];
}