diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1d76bfa2..5c0fb555 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -69,6 +69,7 @@ - `mini.doc` - `mini.extra` - `mini.files` + - `mini.fuzzy` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index c8652ec2..7ac9b0e5 100644 --- a/flake.lock +++ b/flake.lock @@ -1176,6 +1176,22 @@ "type": "github" } }, + "plugin-mini-fuzzy": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-XvDkDfwPcBxySuz58f2mpWTeo8EsOnMvZUcNI8HNZg8=", + "owner": "echasnovski", + "repo": "mini.fuzzy", + "rev": "faa5a6c0d29c28012c90bd011162963a58715428", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.fuzzy", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2387,6 +2403,7 @@ "plugin-mini-doc": "plugin-mini-doc", "plugin-mini-extra": "plugin-mini-extra", "plugin-mini-files": "plugin-mini-files", + "plugin-mini-fuzzy": "plugin-mini-fuzzy", "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 ea1d9e90..73eef497 100644 --- a/flake.nix +++ b/flake.nix @@ -820,5 +820,10 @@ url = "github:echasnovski/mini.files"; flake = false; }; + + plugin-mini-fuzzy = { + url = "github:echasnovski/mini.fuzzy"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 515b5cb4..69dd8ce6 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -15,5 +15,6 @@ ./doc ./extra ./files + ./fuzzy ]; } diff --git a/modules/plugins/mini/fuzzy/config.nix b/modules/plugins/mini/fuzzy/config.nix new file mode 100644 index 00000000..0397f4b9 --- /dev/null +++ b/modules/plugins/mini/fuzzy/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.fuzzy; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-fuzzy"]; + + pluginRC.mini-fuzzy = entryAnywhere '' + require("mini.fuzzy").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/fuzzy/default.nix b/modules/plugins/mini/fuzzy/default.nix new file mode 100644 index 00000000..126d348f --- /dev/null +++ b/modules/plugins/mini/fuzzy/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./fuzzy.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/fuzzy/fuzzy.nix b/modules/plugins/mini/fuzzy/fuzzy.nix new file mode 100644 index 00000000..c5c486fc --- /dev/null +++ b/modules/plugins/mini/fuzzy/fuzzy.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.fuzzy = { + enable = mkEnableOption "mini.fuzzy"; + setupOpts = mkPluginSetupOption "mini.fuzzy" {}; + }; +}