diff --git a/configuration.nix b/configuration.nix index 424d7173..ac0ad32b 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; @@ -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; 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`. 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..d954d49f --- /dev/null +++ b/modules/plugins/utility/undotree/config.nix @@ -0,0 +1,12 @@ +{ + vim.lazy.plugins.undotree = { + package = "undotree"; + cmd = [ + "UndotreeToggle" + "UndotreeShow" + "UndotreeHide" + "UndotreePersistUndo" + "UndotreeFocus" + ]; + }; +} 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 new file mode 100644 index 00000000..70846737 --- /dev/null +++ b/modules/plugins/utility/undotree/undotree.nix @@ -0,0 +1,7 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.undotree = { + enable = mkEnableOption "undo history visualizer for Vim [undotree]"; + }; +} 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": {