Skip to content

Commit 835c6ac

Browse files
committed
plugins/blink-emoji: use mkBlinkPluginModule
1 parent f5339e9 commit 835c6ac

File tree

1 file changed

+18
-37
lines changed

1 file changed

+18
-37
lines changed
+18-37
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,31 @@
11
{ lib, ... }:
2-
lib.nixvim.plugins.mkNeovimPlugin {
2+
let
33
name = "blink-emoji";
4+
in
5+
lib.nixvim.plugins.mkNeovimPlugin {
6+
inherit name;
47
package = "blink-emoji-nvim";
58

69
maintainers = [ lib.maintainers.khaneliman ];
710

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-
emoji = {
18-
module = "blink-emoji";
19-
name = "Emoji";
20-
score_offset = 15;
21-
# Optional configurations
22-
opts = {
23-
insert = true;
24-
};
25-
};
11+
imports = [
12+
(lib.nixvim.modules.mkBlinkPluginModule {
13+
pluginName = name;
14+
# TODO: compute a sane-default
15+
key = "emoji";
16+
sourceName = "Emoji";
17+
module = "blink-emoji";
18+
settingsExample = {
19+
score_offset = 15;
2620
};
27-
};
28-
```
29-
30-
And then you can add it to blink-cmp's `sources.default` option:
21+
})
22+
];
3123

32-
```nix
33-
plugins.blink-cmp = {
34-
enable = true;
35-
settings.sources.default = [
36-
"lsp"
37-
"path"
38-
"luasnip"
39-
"buffer"
40-
"emoji"
41-
];
42-
};
43-
```
44-
'';
24+
settingsExample = {
25+
insert = true;
26+
};
4527

4628
# Configured through blink-cmp
4729
callSetup = false;
4830
hasLuaConfig = false;
49-
hasSettings = false;
5031
}

0 commit comments

Comments
 (0)