diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index a9c796f1..ea0f7d50 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -64,6 +64,7 @@ - `mini.clue` - `mini.colors` - `mini.comment` + - `mini.completion` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 9a0a76b1..86ca362b 100644 --- a/flake.lock +++ b/flake.lock @@ -1096,6 +1096,22 @@ "type": "github" } }, + "plugin-mini-completion": { + "flake": false, + "locked": { + "lastModified": 1732271068, + "narHash": "sha256-dlQCfHUQX9rPiSYZSRipezHX0CG/redbV2g7cpwwExY=", + "owner": "echasnovski", + "repo": "mini.completion", + "rev": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.completion", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2302,6 +2318,7 @@ "plugin-mini-clue": "plugin-mini-clue", "plugin-mini-colors": "plugin-mini-colors", "plugin-mini-comment": "plugin-mini-comment", + "plugin-mini-completion": "plugin-mini-completion", "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 ef61bd9c..87b54693 100644 --- a/flake.nix +++ b/flake.nix @@ -795,5 +795,10 @@ url = "github:echasnovski/mini.comment"; flake = false; }; + + plugin-mini-completion = { + url = "github:echasnovski/mini.completion"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/completion/completion.nix b/modules/plugins/mini/completion/completion.nix new file mode 100644 index 00000000..a5f8caa5 --- /dev/null +++ b/modules/plugins/mini/completion/completion.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.completion = { + enable = mkEnableOption "mini.completion"; + setupOpts = mkPluginSetupOption "mini.completion" {}; + }; +} diff --git a/modules/plugins/mini/completion/config.nix b/modules/plugins/mini/completion/config.nix new file mode 100644 index 00000000..e0d0b904 --- /dev/null +++ b/modules/plugins/mini/completion/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.completion; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-completion"]; + + pluginRC.mini-completion = entryAnywhere '' + require("mini.completion").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/completion/default.nix b/modules/plugins/mini/completion/default.nix new file mode 100644 index 00000000..1251f751 --- /dev/null +++ b/modules/plugins/mini/completion/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./completion.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index dd3bbf58..0564a46a 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -10,5 +10,6 @@ ./clue ./colors ./comment + ./completion ]; }