From b275b3a3c382085fd47643997c43e05aa6000565 Mon Sep 17 00:00:00 2001 From: Heitor Augusto <44377258+HeitorAugustoLN@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:13:22 -0300 Subject: [PATCH] plugins/mini-completion: init --- plugins/by-name/mini-completion/default.nix | 40 +++++++++++++++++ .../by-name/mini-completion/default.nix | 44 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 plugins/by-name/mini-completion/default.nix create mode 100644 tests/test-sources/plugins/by-name/mini-completion/default.nix diff --git a/plugins/by-name/mini-completion/default.nix b/plugins/by-name/mini-completion/default.nix new file mode 100644 index 00000000..eee9dfb2 --- /dev/null +++ b/plugins/by-name/mini-completion/default.nix @@ -0,0 +1,40 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "mini-completion"; + moduleName = "mini.completion"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + delay = { + completion = 100; + info = 100; + signature = 50; + }; + window = { + info = { + height = 25; + width = 80; + border = lib.nixvim.nestedLiteralLua "nil"; + }; + signature = { + height = 25; + width = 80; + border = lib.nixvim.nestedLiteralLua "nil"; + }; + }; + lsp_completion = { + source_func = "completefunc"; + auto_setup = true; + process_items = lib.nixvim.nestedLiteralLua "nil"; + snippet_insert = lib.nixvim.nestedLiteralLua "nil"; + }; + fallback_action = ""; + mappings = { + force_twostep = ""; + force_fallback = ""; + scroll_down = ""; + scroll_up = ""; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/mini-completion/default.nix b/tests/test-sources/plugins/by-name/mini-completion/default.nix new file mode 100644 index 00000000..972f691f --- /dev/null +++ b/tests/test-sources/plugins/by-name/mini-completion/default.nix @@ -0,0 +1,44 @@ +{ lib, ... }: +{ + empty = { + plugins.mini-completion.enable = true; + }; + + defaults = { + plugins.mini-completion = { + enable = true; + settings = { + delay = { + completion = 100; + info = 100; + signature = 50; + }; + window = { + info = { + height = 25; + width = 80; + border = lib.nixvim.mkRaw "nil"; + }; + signature = { + height = 25; + width = 80; + border = lib.nixvim.mkRaw "nil"; + }; + }; + lsp_completion = { + source_func = "completefunc"; + auto_setup = true; + process_items = lib.nixvim.mkRaw "nil"; + snippet_insert = lib.nixvim.mkRaw "nil"; + }; + fallback_action = ""; + mappings = { + force_twostep = ""; + force_fallback = ""; + scroll_down = ""; + scroll_up = ""; + }; + }; + }; + }; +}