Skip to content

Commit 2e2f606

Browse files
committed
plugins/blink-cmp-spell: use mkBlinkPluginModule
1 parent dc60cff commit 2e2f606

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed
Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,25 @@
11
{ lib, ... }:
2-
lib.nixvim.plugins.mkNeovimPlugin {
2+
let
33
name = "blink-cmp-spell";
4-
package = "blink-cmp-spell";
4+
in
5+
lib.nixvim.plugins.mkNeovimPlugin {
6+
inherit name;
57

68
maintainers = [ lib.maintainers.khaneliman ];
79

8-
description = ''
9-
This plugin should be configured through blink-cmp's `sources.providers` settings.
10-
11-
For example:
12-
13-
```nix
14-
plugins.blink-cmp = {
15-
enable = true;
16-
settings.sources.providers = {
17-
spell = {
18-
module = "blink-cmp-spell";
19-
name = "Spell";
20-
score_offset = 100;
21-
opts = {
22-
};
23-
};
10+
imports = [
11+
(lib.nixvim.modules.mkBlinkPluginModule {
12+
pluginName = name;
13+
# TODO: compute a sane-default
14+
key = "spell";
15+
sourceName = "Spell";
16+
settingsExample = {
17+
score_offset = 100;
2418
};
25-
};
26-
```
27-
28-
And then you can add it to blink-cmp's `sources.default` option:
29-
30-
```nix
31-
plugins.blink-cmp = {
32-
enable = true;
33-
settings.sources.default = [
34-
"lsp"
35-
"path"
36-
"luasnip"
37-
"buffer"
38-
"spell"
39-
];
40-
};
41-
```
42-
'';
19+
})
20+
];
4321

4422
# Configured through blink-cmp
4523
callSetup = false;
4624
hasLuaConfig = false;
47-
hasSettings = false;
4825
}

tests/test-sources/plugins/by-name/blink-cmp-spell/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
empty = {
3+
plugins.blink-cmp.enable = true;
34
plugins.blink-cmp-spell.enable = true;
45
};
56

67
defaults = {
8+
plugins.blink-cmp.enable = true;
79
plugins.blink-cmp-spell = {
810
enable = true;
911
};

0 commit comments

Comments
 (0)