{
  lib,
  config,
  ...
}:

lib.mkIf (lib.elem "nvim::undotree" config.machine.pkgs) {
  programs.nvim-lazy.lazyPlugins = [
    {
      lazy = true;
      dir = vPlug: vPlug.undotree;
      keys = [
        {
          bind = "<leader>u";
          cmd = "<Cmd>UndotreeToggle<CR>";
          opts = {
            desc = "Toggle Undotree";
          };
        }
      ];
    }
  ];
}