File tree Expand file tree Collapse file tree 1 file changed +24
-46
lines changed
plugins/by-name/blink-copilot Expand file tree Collapse file tree 1 file changed +24
-46
lines changed Original file line number Diff line number Diff line change 11{ lib , ... } :
2- lib . nixvim . plugins . mkNeovimPlugin {
2+ let
33 name = "blink-copilot" ;
4- package = "blink-copilot" ;
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- copilot = {
18- async = true;
19- module = "blink-copilot";
20- name = "copilot";
21- score_offset = 100;
22- # Optional configurations
23- opts = {
24- max_completions = 3;
25- max_attempts = 4;
26- kind = "Copilot";
27- debounce = 750;
28- auto_refresh = {
29- backward = true;
30- forward = true;
31- };
32- };
33- };
10+ imports = [
11+ ( lib . nixvim . modules . mkBlinkPluginModule {
12+ pluginName = name ;
13+ # TODO: compute a sane-default
14+ sourceName = "copilot" ;
15+ settingsExample = {
16+ async = true ;
17+ score_offset = 100 ;
3418 } ;
19+ } )
20+ ] ;
21+
22+ settingsExample = {
23+ max_completions = 3 ;
24+ max_attempts = 4 ;
25+ kind = "Copilot" ;
26+ debounce = 750 ;
27+ auto_refresh = {
28+ backward = true ;
29+ forward = true ;
3530 } ;
36- ```
37-
38- And then you can add it to blink-cmp's `sources.default` option:
39-
40- ```nix
41- plugins.blink-cmp = {
42- enable = true;
43- settings.sources.default = [
44- "lsp"
45- "path"
46- "luasnip"
47- "buffer"
48- "copilot"
49- ];
50- };
51- ```
52- '' ;
31+ } ;
5332
5433 # Configured through blink-cmp
5534 callSetup = false ;
5635 hasLuaConfig = false ;
57- hasSettings = false ;
5836
5937 extraConfig = {
6038 plugins . copilot-lua . enable = lib . mkDefault true ;
You can’t perform that action at this time.
0 commit comments