mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/blink-copilot: init
This commit is contained in:
parent
5281e8c583
commit
cf01c024af
2 changed files with 73 additions and 0 deletions
62
plugins/by-name/blink-copilot/default.nix
Normal file
62
plugins/by-name/blink-copilot/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "blink-copilot";
|
||||
package = "blink-copilot";
|
||||
|
||||
maintainers = [ lib.maintainers.khaneliman ];
|
||||
|
||||
description = ''
|
||||
This plugin should be configured through blink-cmp's `sources.providers` settings.
|
||||
|
||||
For example:
|
||||
|
||||
```nix
|
||||
plugins.blink-cmp = {
|
||||
enable = true;
|
||||
settings.sources.providers = {
|
||||
copilot = {
|
||||
async = true;
|
||||
module = "blink-copilot";
|
||||
name = "copilot";
|
||||
score_offset = 100;
|
||||
# Optional configurations
|
||||
opts = {
|
||||
max_completions = 3;
|
||||
max_attempts = 4;
|
||||
kind = "Copilot";
|
||||
debounce = 750;
|
||||
auto_refresh = {
|
||||
backward = true;
|
||||
forward = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
And then you can add it to blink-cmp's `sources.default` option:
|
||||
|
||||
```nix
|
||||
plugins.blink-cmp = {
|
||||
enable = true;
|
||||
settings.sources.default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"luasnip"
|
||||
"buffer"
|
||||
"copilot"
|
||||
];
|
||||
};
|
||||
```
|
||||
'';
|
||||
|
||||
# Configured through blink-cmp
|
||||
callSetup = false;
|
||||
hasLuaConfig = false;
|
||||
hasSettings = false;
|
||||
|
||||
extraConfig = {
|
||||
plugins.copilot-lua.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
11
tests/test-sources/plugins/by-name/blink-copilot/default.nix
Normal file
11
tests/test-sources/plugins/by-name/blink-copilot/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.blink-copilot.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.blink-copilot = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue