tests/cmp: add a test that enables all sources

This commit is contained in:
Gaetan Lepage 2024-04-30 09:41:56 +02:00 committed by Gaétan Lepage
parent dc038244f8
commit 91e3bb0523
2 changed files with 39 additions and 0 deletions

View file

@ -54,6 +54,7 @@
inherit pkgs lib helpers;
config = {};
};
cmp-sources = import ../plugins/completion/cmp/sources.nix;
};
inherit namespace;
})

View 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;
};
};
};
}