From 7d975e3598c94c8a75c605cfcfb65dd59741a8a2 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 5 Feb 2025 12:27:20 -0600 Subject: [PATCH] plugins/blink-cmp-spell: init --- plugins/by-name/blink-cmp-spell/default.nix | 48 +++++++++++++++++++ .../by-name/blink-cmp-spell/default.nix | 11 +++++ 2 files changed, 59 insertions(+) create mode 100644 plugins/by-name/blink-cmp-spell/default.nix create mode 100644 tests/test-sources/plugins/by-name/blink-cmp-spell/default.nix diff --git a/plugins/by-name/blink-cmp-spell/default.nix b/plugins/by-name/blink-cmp-spell/default.nix new file mode 100644 index 0000000000..dd29a75dbc --- /dev/null +++ b/plugins/by-name/blink-cmp-spell/default.nix @@ -0,0 +1,48 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "blink-cmp-spell"; + package = "blink-cmp-spell"; + + maintainers = [ lib.maintainers.khaneliman ]; + + description = '' + This plugin should be configured through blink-cmp's `sources.providers` settings. + + For example: + + ```nix + plugins.blink-cmp = { + enable = true; + settings.sources.providers = { + spell = { + module = "blink-cmp-spell"; + name = "Spell"; + score_offset = 100; + opts = { + }; + }; + }; + }; + ``` + + And then you can add it to blink-cmp's `sources.default` option: + + ```nix + plugins.blink-cmp = { + enable = true; + settings.sources.default = [ + "lsp" + "path" + "luasnip" + "buffer" + "spell" + ]; + }; + ``` + ''; + + # Configured through blink-cmp + callSetup = false; + hasLuaConfig = false; + hasSettings = false; +} diff --git a/tests/test-sources/plugins/by-name/blink-cmp-spell/default.nix b/tests/test-sources/plugins/by-name/blink-cmp-spell/default.nix new file mode 100644 index 0000000000..a23c97c3ae --- /dev/null +++ b/tests/test-sources/plugins/by-name/blink-cmp-spell/default.nix @@ -0,0 +1,11 @@ +{ + empty = { + plugins.blink-cmp-spell.enable = true; + }; + + defaults = { + plugins.blink-cmp-spell = { + enable = true; + }; + }; +}