Skip to content

Commit 802e289

Browse files
committed
plugins/blink-emoji: use mkBlinkPluginModule
1 parent 2b3e511 commit 802e289

File tree

2 files changed

+20
-37
lines changed

2 files changed

+20
-37
lines changed
Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,32 @@
11
{ lib, ... }:
2-
lib.nixvim.plugins.mkNeovimPlugin {
2+
let
33
name = "blink-emoji";
4+
in
5+
lib.nixvim.plugins.mkNeovimPlugin {
6+
inherit name;
47
packPathName = "blink-emoji.nvim";
58
package = "blink-emoji-nvim";
69

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

9-
description = ''
10-
This plugin should be configured through blink-cmp's `sources.providers` settings.
11-
12-
For example:
13-
14-
```nix
15-
plugins.blink-cmp = {
16-
enable = true;
17-
settings.sources.providers = {
18-
emoji = {
19-
module = "blink-emoji";
20-
name = "Emoji";
21-
score_offset = 15;
22-
# Optional configurations
23-
opts = {
24-
insert = true;
25-
};
26-
};
12+
imports = [
13+
(lib.nixvim.modules.mkBlinkPluginModule {
14+
pluginName = name;
15+
# TODO: compute a sane-default
16+
key = "emoji";
17+
sourceName = "Emoji";
18+
module = "blink-emoji";
19+
settingsExample = {
20+
score_offset = 15;
2721
};
28-
};
29-
```
30-
31-
And then you can add it to blink-cmp's `sources.default` option:
22+
})
23+
];
3224

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

4729
# Configured through blink-cmp
4830
callSetup = false;
4931
hasLuaConfig = false;
50-
hasSettings = false;
5132
}

tests/test-sources/plugins/by-name/blink-emoji/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-emoji.enable = true;
45
};
56

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

0 commit comments

Comments
 (0)