Skip to content

Commit 434b90c

Browse files
committed
plugins/blink-cmp-copilot: use mkBlinkPluginModule
1 parent 67e0477 commit 434b90c

File tree

1 file changed

+19
-37
lines changed

1 file changed

+19
-37
lines changed

plugins/by-name/blink-cmp-copilot/default.nix

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

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

8-
description = ''
9-
This plugin should be configured through blink-cmp's source settings.
10-
11-
For example:
10+
callSetup = false;
11+
hasLuaConfig = false;
1212

13-
```nix
14-
plugins.blink-cmp = {
15-
enable = true;
16-
settings.sources = {
17-
copilot = {
18-
async = true;
19-
module = "blink-cmp-copilot";
20-
name = "copilot";
21-
score_offset = 100;
22-
};
13+
imports = [
14+
(lib.nixvim.modules.mkBlinkPluginModule {
15+
pluginName = name;
16+
# TODO: compute a sane-default source name
17+
sourceName = "copilot";
18+
settingsExample = {
19+
async = true;
20+
score_offset = 100;
2321
};
24-
};
25-
```
26-
27-
And then you can add it as a source for blink-cmp:
22+
})
23+
];
2824

29-
```nix
30-
plugins.blink-cmp = {
31-
enable = true;
32-
settings.sources.default = [
33-
"lsp"
34-
"path"
35-
"luasnip"
36-
"buffer"
37-
"copilot"
38-
];
39-
};
40-
```
41-
'';
42-
43-
callSetup = false;
44-
hasLuaConfig = false;
45-
hasSettings = false;
25+
settingsExample = {
26+
max_completions = 3;
27+
};
4628

4729
extraConfig = {
4830
warnings =

0 commit comments

Comments
 (0)