diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 642dcc1b..1d2308ab 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -78,6 +78,7 @@ - `mini.jump` - `mini.jump2d` - `mini.map` + - `mini.misc` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 4e9aec66..39acee39 100644 --- a/flake.lock +++ b/flake.lock @@ -1320,6 +1320,22 @@ "type": "github" } }, + "plugin-mini-misc": { + "flake": false, + "locked": { + "lastModified": 1734103112, + "narHash": "sha256-qnYa4IZk14MGZArmVpn15l+P9cwtFWomBVxRuYHVyXc=", + "owner": "echasnovski", + "repo": "mini.misc", + "rev": "645fb9367c19bb485902e54e5451425981498601", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.misc", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2540,6 +2556,7 @@ "plugin-mini-jump": "plugin-mini-jump", "plugin-mini-jump2d": "plugin-mini-jump2d", "plugin-mini-map": "plugin-mini-map", + "plugin-mini-misc": "plugin-mini-misc", "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 75efb0d1..d6a57ee7 100644 --- a/flake.nix +++ b/flake.nix @@ -865,5 +865,10 @@ url = "github:echasnovski/mini.map"; flake = false; }; + + plugin-mini-misc = { + url = "github:echasnovski/mini.misc"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index f7c8cf8b..093ae3a4 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -24,5 +24,6 @@ ./jump ./jump2d ./map + ./misc ]; } diff --git a/modules/plugins/mini/misc/config.nix b/modules/plugins/mini/misc/config.nix new file mode 100644 index 00000000..9a9a6ae4 --- /dev/null +++ b/modules/plugins/mini/misc/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.misc; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-misc"]; + + pluginRC.mini-misc = entryAnywhere '' + require("mini.misc").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/misc/default.nix b/modules/plugins/mini/misc/default.nix new file mode 100644 index 00000000..9f64fd19 --- /dev/null +++ b/modules/plugins/mini/misc/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./misc.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/misc/misc.nix b/modules/plugins/mini/misc/misc.nix new file mode 100644 index 00000000..7b36e9fd --- /dev/null +++ b/modules/plugins/mini/misc/misc.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.misc = { + enable = mkEnableOption "mini.misc"; + setupOpts = mkPluginSetupOption "mini.misc" {}; + }; +}