mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
tests/cmp: add a test that enables all sources
This commit is contained in:
parent
dc038244f8
commit
91e3bb0523
2 changed files with 39 additions and 0 deletions
|
@ -54,6 +54,7 @@
|
||||||
inherit pkgs lib helpers;
|
inherit pkgs lib helpers;
|
||||||
config = {};
|
config = {};
|
||||||
};
|
};
|
||||||
|
cmp-sources = import ../plugins/completion/cmp/sources.nix;
|
||||||
};
|
};
|
||||||
inherit namespace;
|
inherit namespace;
|
||||||
})
|
})
|
||||||
|
|
38
tests/test-sources/plugins/completion/cmp-all-sources.nix
Normal file
38
tests/test-sources/plugins/completion/cmp-all-sources.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
cmp-sources,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
all-sources = {
|
||||||
|
plugins = {
|
||||||
|
copilot-lua = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
panel.enabled = false;
|
||||||
|
suggestion.enabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings.sources = with pkgs.lib; let
|
||||||
|
disabledSources =
|
||||||
|
optional
|
||||||
|
(pkgs.stdenv.hostPlatform.system == "aarch64-linux")
|
||||||
|
"cmp_tabnine";
|
||||||
|
|
||||||
|
filterFunc = sourceName: !(elem sourceName disabledSources);
|
||||||
|
|
||||||
|
sourceNames =
|
||||||
|
filter
|
||||||
|
filterFunc
|
||||||
|
(attrNames cmp-sources);
|
||||||
|
in
|
||||||
|
map
|
||||||
|
(
|
||||||
|
sourceName: {name = sourceName;}
|
||||||
|
)
|
||||||
|
sourceNames;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue