Files
TheaninovOS/modules/home-manager/programs/nixvim/presets/undotree.nix
2024-06-10 17:17:13 +02:00

23 lines
428 B
Nix

{ lib, config, ... }:
let
cfg = config.presets.undotree;
in
{
options.presets.undotree = {
enable = lib.mkEnableOption "Undotree";
};
config = lib.mkIf cfg.enable {
opts = {
undodir = {
__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";
};
undofile = true;
};
plugins = {
undotree.enable = true;
which-key.registrations."<leader>u" = "Undotree";
};
};
}