From a1a0ab89b6d725f52f42efdcd86b27024afb651f Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 19:03:44 +0100 Subject: [PATCH] mini/animate: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/animate/animate.nix | 13 +++++++++++++ modules/plugins/mini/animate/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/animate/default.nix | 6 ++++++ modules/plugins/mini/default.nix | 1 + 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/animate/animate.nix create mode 100644 modules/plugins/mini/animate/config.nix create mode 100644 modules/plugins/mini/animate/default.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 28b9408a..969dfd45 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -56,6 +56,7 @@ - Add the following plugins from [mini.nvim](https://github.com/echasnovski/mini.nvim) - `mini.ai` - `mini.align` + - `mini.animate` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 5bcb6a8c..27777b4b 100644 --- a/flake.lock +++ b/flake.lock @@ -968,6 +968,22 @@ "type": "github" } }, + "plugin-mini-animate": { + "flake": false, + "locked": { + "lastModified": 1733078395, + "narHash": "sha256-ZePmJuHCCymTgaK46nSg5tRloxs+UKrVgVmT++rGKpc=", + "owner": "echasnovski", + "repo": "mini.animate", + "rev": "d14190ac3040116540889e2ebc25f488b195799e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.animate", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2166,6 +2182,7 @@ "plugin-mind-nvim": "plugin-mind-nvim", "plugin-mini-ai": "plugin-mini-ai", "plugin-mini-align": "plugin-mini-align", + "plugin-mini-animate": "plugin-mini-animate", "plugin-minimap-vim": "plugin-minimap-vim", "plugin-modes-nvim": "plugin-modes-nvim", "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", diff --git a/flake.nix b/flake.nix index 1586e384..36683e91 100644 --- a/flake.nix +++ b/flake.nix @@ -755,5 +755,10 @@ url = "github:echasnovski/mini.align"; flake = false; }; + + plugin-mini-animate = { + url = "github:echasnovski/mini.animate"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/animate/animate.nix b/modules/plugins/mini/animate/animate.nix new file mode 100644 index 00000000..6be633b5 --- /dev/null +++ b/modules/plugins/mini/animate/animate.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.animate = { + enable = mkEnableOption "mini.animate"; + setupOpts = mkPluginSetupOption "mini.animate" {}; + }; +} diff --git a/modules/plugins/mini/animate/config.nix b/modules/plugins/mini/animate/config.nix new file mode 100644 index 00000000..e9cf2813 --- /dev/null +++ b/modules/plugins/mini/animate/config.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.mini.animate; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-animate"]; + + pluginRC.mini-animate = entryAnywhere '' + require("mini.animate").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/animate/default.nix b/modules/plugins/mini/animate/default.nix new file mode 100644 index 00000000..5390fae1 --- /dev/null +++ b/modules/plugins/mini/animate/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./animate.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 051274cb..6a4e3720 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -2,5 +2,6 @@ imports = [ ./ai ./align + ./animate ]; }