From b7b442737a8d81abaec087189a72776c2dc9976e Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sat, 19 Jul 2025 14:14:40 -0400 Subject: [PATCH 01/11] utility/undotree: init module --- modules/plugins/utility/undotree/undotree.nix | 25 +++++++++++++++++++ npins/sources.json | 13 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 modules/plugins/utility/undotree/undotree.nix diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix new file mode 100644 index 00000000..936253e5 --- /dev/null +++ b/modules/plugins/utility/undotree/undotree.nix @@ -0,0 +1,25 @@ +{ lib, ... }: +let + inherit (lib.types) bool int; + inherit (lib.options) mkEnableOption mkOption; + + inherit (lib.nvim.types) mkPluginSetupOption; +in +{ + options.vim.undotree = { + enable = mkEnableOption "undotree"; + setupOpts = mkPluginSetupOption "undotree" { + # enable_feature_a = mkOption { + # type = bool; + # default = false; + # # ... + # }; + # + # number_option = mkOption { + # type = int; + # default = 3; + # # ... + # }; + }; + }; +} diff --git a/npins/sources.json b/npins/sources.json index 00dcea83..3c3bc3c3 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2497,6 +2497,19 @@ "url": "https://github.com/chomosuke/typst-preview.nvim/archive/dea4525d5420b7c32eebda7de15a6beb9d6574fa.tar.gz", "hash": "0y658l2ibq0x4cwa4rl3lab7aw4ba68xcrdnxp81p2rsk0d60qq4" }, + "undotree": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mbbill", + "repo": "undotree" + }, + "branch": "master", + "submodules": false, + "revision": "28f2f54a34baff90ea6f4a735ef1813ad875c743", + "url": "https://github.com/mbbill/undotree/archive/28f2f54a34baff90ea6f4a735ef1813ad875c743.tar.gz", + "hash": "0k9qfp64rbwy1lc62x0vkwfl3qlx8633lfbhqxkf64yqwi81ysp5" + }, "vim-dirtytalk": { "type": "Git", "repository": { From 81d566ac39b8531ffc985e228684552851356720 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sat, 19 Jul 2025 14:44:47 -0400 Subject: [PATCH 02/11] utility/undotree: removed unimportant boilerplate --- configuration.nix | 9 ++++++--- modules/plugins/utility/default.nix | 1 + modules/plugins/utility/undotree/config.nix | 6 ++++++ modules/plugins/utility/undotree/default.nix | 6 ++++++ modules/plugins/utility/undotree/undotree.nix | 18 +----------------- 5 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 modules/plugins/utility/undotree/config.nix create mode 100644 modules/plugins/utility/undotree/default.nix diff --git a/configuration.nix b/configuration.nix index 424d7173..80a34157 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,7 +43,7 @@ isMaximal: { # This section does not include a comprehensive list of available language modules. # To list all available language module options, please visit the nvf manual. languages = { - enableFormat = true; # + enableFormat = true; enableTreesitter = true; enableExtraDiagnostics = true; @@ -184,6 +184,7 @@ isMaximal: { project-nvim.enable = isMaximal; }; + undotree.enable = isMaximal; utility = { ccc.enable = false; vim-wakatime.enable = false; @@ -194,7 +195,6 @@ isMaximal: { leetcode-nvim.enable = isMaximal; multicursors.enable = isMaximal; smart-splits.enable = isMaximal; - motion = { hop.enable = true; leap.enable = true; @@ -238,7 +238,10 @@ isMaximal: { nix = "110"; ruby = "120"; java = "130"; - go = ["90" "130"]; + go = [ + "90" + "130" + ]; }; }; fastaction.enable = true; diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 8069b6c1..79d7d924 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -26,5 +26,6 @@ ./wakatime ./yanky-nvim ./yazi-nvim + ./undotree ]; } diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix new file mode 100644 index 00000000..7f2ffeba --- /dev/null +++ b/modules/plugins/utility/undotree/config.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + vim.lazy.plugins.undotree = { + cmd = [ "UndotreeToggle" ]; + }; +} diff --git a/modules/plugins/utility/undotree/default.nix b/modules/plugins/utility/undotree/default.nix new file mode 100644 index 00000000..012d8454 --- /dev/null +++ b/modules/plugins/utility/undotree/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./undotree.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix index 936253e5..be9a92ab 100644 --- a/modules/plugins/utility/undotree/undotree.nix +++ b/modules/plugins/utility/undotree/undotree.nix @@ -1,25 +1,9 @@ { lib, ... }: let - inherit (lib.types) bool int; - inherit (lib.options) mkEnableOption mkOption; - - inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.options) mkEnableOption; in { options.vim.undotree = { enable = mkEnableOption "undotree"; - setupOpts = mkPluginSetupOption "undotree" { - # enable_feature_a = mkOption { - # type = bool; - # default = false; - # # ... - # }; - # - # number_option = mkOption { - # type = int; - # default = 3; - # # ... - # }; - }; }; } From b7191033376981a711c2fae18d904608cdb24096 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sat, 19 Jul 2025 18:57:31 -0400 Subject: [PATCH 03/11] formatted files --- configuration.nix | 9 +++------ modules/plugins/utility/undotree/config.nix | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configuration.nix b/configuration.nix index 80a34157..0d53fec9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,7 +43,7 @@ isMaximal: { # This section does not include a comprehensive list of available language modules. # To list all available language module options, please visit the nvf manual. languages = { - enableFormat = true; + enableFormat = true; # enableTreesitter = true; enableExtraDiagnostics = true; @@ -183,7 +183,6 @@ isMaximal: { projects = { project-nvim.enable = isMaximal; }; - undotree.enable = isMaximal; utility = { ccc.enable = false; @@ -195,6 +194,7 @@ isMaximal: { leetcode-nvim.enable = isMaximal; multicursors.enable = isMaximal; smart-splits.enable = isMaximal; + motion = { hop.enable = true; leap.enable = true; @@ -238,10 +238,7 @@ isMaximal: { nix = "110"; ruby = "120"; java = "130"; - go = [ - "90" - "130" - ]; + go = ["90" "130"]; }; }; fastaction.enable = true; diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index 7f2ffeba..9b7e4d6f 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -1,6 +1,7 @@ { ... }: { vim.lazy.plugins.undotree = { + package = "undotree"; cmd = [ "UndotreeToggle" ]; }; } From 861d6f3ed7d68b16381b9893ec6603e9e30ed6d3 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sat, 19 Jul 2025 19:10:30 -0400 Subject: [PATCH 04/11] updated release notes --- docs/release-notes/rl-0.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index e18c95fe..c4ad963c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -37,6 +37,7 @@ [snacks.nvim]: https://github.com/folke/snacks.nvim [oil.nvim]: https://github.com/stevearc/oil.nvim [hunk.nvim]: https://github.com/julienvincent/hunk.nvim +[undotree]: https://github.com/mbbill/undotree - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. From 1bb94549338942b11ee5e65dc185b0d762ef84ba Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sat, 19 Jul 2025 23:14:01 -0400 Subject: [PATCH 05/11] utility/undotree: added extra commands to lazy loader --- modules/plugins/utility/undotree/config.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index 9b7e4d6f..6a674d95 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -2,6 +2,12 @@ { vim.lazy.plugins.undotree = { package = "undotree"; - cmd = [ "UndotreeToggle" ]; + cmd = [ + "UndotreeToggle" + "UndotreeShow" + "UndotreeHide" + "UndotreePersistUndo" + "UndotreeFocus" + ]; }; } From 60dd59ecae3a0fe9981aaa6a0b8cd3a54b2f3ba3 Mon Sep 17 00:00:00 2001 From: Abhirath A <85126640+abhirath-a@users.noreply.github.com> Date: Sun, 20 Jul 2025 05:39:20 -0400 Subject: [PATCH 06/11] utility/undotree: removed unnecessary lazy inputs Co-authored-by: raf --- modules/plugins/utility/undotree/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index 6a674d95..d954d49f 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -1,4 +1,3 @@ -{ ... }: { vim.lazy.plugins.undotree = { package = "undotree"; From 4847c099ebceacb073b2cddfb0c0e41fe75ea84d Mon Sep 17 00:00:00 2001 From: Abhirath A <85126640+abhirath-a@users.noreply.github.com> Date: Sun, 20 Jul 2025 05:39:51 -0400 Subject: [PATCH 07/11] utility/undotree: added description to enable Co-authored-by: raf --- modules/plugins/utility/undotree/undotree.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix index be9a92ab..2483a1ec 100644 --- a/modules/plugins/utility/undotree/undotree.nix +++ b/modules/plugins/utility/undotree/undotree.nix @@ -4,6 +4,6 @@ let in { options.vim.undotree = { - enable = mkEnableOption "undotree"; + enable = mkEnableOption "undo history visualizer for Vim [undotree]"; }; } From 0a1dda51d0b548d960c0d6d344efeffede8af233 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sun, 20 Jul 2025 14:15:49 -0400 Subject: [PATCH 08/11] utility/undotree: formatted code --- modules/plugins/utility/undotree/undotree.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix index 2483a1ec..aac130fe 100644 --- a/modules/plugins/utility/undotree/undotree.nix +++ b/modules/plugins/utility/undotree/undotree.nix @@ -1,8 +1,6 @@ -{ lib, ... }: -let +{lib, ...}: let inherit (lib.options) mkEnableOption; -in -{ +in { options.vim.undotree = { enable = mkEnableOption "undo history visualizer for Vim [undotree]"; }; From cec4a941976b27cf9083d2be42d9fc3178fb7769 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:52:38 -0400 Subject: [PATCH 09/11] utility/undotree: moved undotree to utility object --- configuration.nix | 11 +++++++---- modules/plugins/utility/undotree/config.nix | 2 +- modules/plugins/utility/undotree/undotree.nix | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configuration.nix b/configuration.nix index 0d53fec9..1834f344 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,7 +43,7 @@ isMaximal: { # This section does not include a comprehensive list of available language modules. # To list all available language module options, please visit the nvf manual. languages = { - enableFormat = true; # + enableFormat = true; enableTreesitter = true; enableExtraDiagnostics = true; @@ -183,7 +183,7 @@ isMaximal: { projects = { project-nvim.enable = isMaximal; }; - undotree.enable = isMaximal; + utility = { ccc.enable = false; vim-wakatime.enable = false; @@ -194,7 +194,7 @@ isMaximal: { leetcode-nvim.enable = isMaximal; multicursors.enable = isMaximal; smart-splits.enable = isMaximal; - + undotree.enable = isMaximal; motion = { hop.enable = true; leap.enable = true; @@ -238,7 +238,10 @@ isMaximal: { nix = "110"; ruby = "120"; java = "130"; - go = ["90" "130"]; + go = [ + "90" + "130" + ]; }; }; fastaction.enable = true; diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index d954d49f..deecdbcc 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -1,5 +1,5 @@ { - vim.lazy.plugins.undotree = { + vim.lazy.plugins.utility.undotree = { package = "undotree"; cmd = [ "UndotreeToggle" diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix index aac130fe..70846737 100644 --- a/modules/plugins/utility/undotree/undotree.nix +++ b/modules/plugins/utility/undotree/undotree.nix @@ -1,7 +1,7 @@ {lib, ...}: let inherit (lib.options) mkEnableOption; in { - options.vim.undotree = { + options.vim.utility.undotree = { enable = mkEnableOption "undo history visualizer for Vim [undotree]"; }; } From 338577d9c9296beba0d0a31885490a2344687e03 Mon Sep 17 00:00:00 2001 From: Abhi <85126640+abhirath-a@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:15:13 -0400 Subject: [PATCH 10/11] utility/undotree: removed utility category from lazy loader --- modules/plugins/utility/undotree/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index deecdbcc..d954d49f 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -1,5 +1,5 @@ { - vim.lazy.plugins.utility.undotree = { + vim.lazy.plugins.undotree = { package = "undotree"; cmd = [ "UndotreeToggle" From 4437cc740abc4a5ebde6d94f153049fc259a340a Mon Sep 17 00:00:00 2001 From: raf Date: Mon, 21 Jul 2025 21:57:11 +0300 Subject: [PATCH 11/11] meta: undo nixfmt style hint --- configuration.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index 1834f344..ac0ad32b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -238,10 +238,7 @@ isMaximal: { nix = "110"; ruby = "120"; java = "130"; - go = [ - "90" - "130" - ]; + go = ["90" "130"]; }; }; fastaction.enable = true;