mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-02 21:34:33 +02:00
plugins/cmp: add cmp_ai source
This commit is contained in:
parent
582641a639
commit
3834c4e0db
5 changed files with 138 additions and 1 deletions
37
tests/test-sources/plugins/completion/cmp-ai.nix
Normal file
37
tests/test-sources/plugins/completion/cmp-ai.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
empty = {
|
||||
# We do not provide the required HF_API_KEY environment variable.
|
||||
tests.dontRun = true;
|
||||
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
settings.sources = [ { name = "cmp_ai"; } ];
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
# We do not provide the required HF_API_KEY environment variable.
|
||||
tests.dontRun = true;
|
||||
|
||||
plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings.sources = [ { name = "cmp_ai"; } ];
|
||||
};
|
||||
cmp-ai.settings = {
|
||||
max_lines = 1000;
|
||||
provider = "HF";
|
||||
notify = true;
|
||||
notify_callback = ''
|
||||
function(msg)
|
||||
vim.notify(msg)
|
||||
end
|
||||
'';
|
||||
run_on_every_keystroke = true;
|
||||
ignored_file_types = {
|
||||
lua = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue