refactor: restructure

This commit is contained in:
2025-06-20 17:11:43 +02:00
parent 05b437dbf8
commit d3de8874bc
41 changed files with 212 additions and 172 deletions

View File

@@ -0,0 +1,34 @@
{ lib, config, ... }:
let
cfg = config.presets.undotree;
in
{
options.presets.undotree = {
enable = lib.mkEnableOption "Undotree";
};
config = lib.mkIf cfg.enable {
opts = {
undodir.__raw = # lua
"os.getenv('HOME') .. '/.config/nvim/undodir'";
undofile = true;
};
keymaps = [
{
key = "<leader>u";
mode = "n";
action = "<cmd>:UndotreeToggle<CR>";
}
];
plugins = {
undotree.enable = true;
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>u";
desc = "Undotree";
icon = "󰕌";
}
];
};
};
}