2024-06-29 08:26:56 +01:00
|
|
|
{ pkgs, ... }:
|
2024-04-30 09:41:56 +02:00
|
|
|
{
|
2024-08-20 00:54:50 +01:00
|
|
|
all-sources =
|
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
plugins = {
|
|
|
|
copilot-lua = {
|
|
|
|
enable = true;
|
2024-04-30 09:41:56 +02:00
|
|
|
|
2024-12-25 07:34:33 -03:00
|
|
|
settings = {
|
|
|
|
panel.enabled = false;
|
|
|
|
suggestion.enabled = false;
|
|
|
|
};
|
2024-08-20 00:54:50 +01:00
|
|
|
};
|
2024-04-30 09:41:56 +02:00
|
|
|
|
2024-08-20 00:54:50 +01:00
|
|
|
cmp = {
|
|
|
|
enable = true;
|
|
|
|
settings.sources =
|
|
|
|
with pkgs.lib;
|
|
|
|
let
|
|
|
|
disabledSources = [
|
|
|
|
# We do not provide the required HF_API_KEY environment variable.
|
|
|
|
"cmp_ai"
|
|
|
|
# Triggers the warning complaining about treesitter highlighting being disabled
|
|
|
|
"otter"
|
2024-10-15 22:33:42 +02:00
|
|
|
# Invokes the `nix` command at startup which is not available in the sandbox
|
|
|
|
"nixpkgs_maintainers"
|
2025-04-12 22:51:08 +02:00
|
|
|
# Needs internet access to download `sm-agent`
|
|
|
|
"supermaven"
|
2024-08-20 00:54:50 +01:00
|
|
|
] ++ optional (pkgs.stdenv.hostPlatform.system == "aarch64-linux") "cmp_tabnine";
|
|
|
|
in
|
|
|
|
pipe config.cmpSourcePlugins [
|
|
|
|
# All known source names
|
|
|
|
attrNames
|
|
|
|
# Filter out disabled sources
|
|
|
|
(filter (name: !(elem name disabledSources)))
|
|
|
|
# Convert names to source attributes
|
|
|
|
(map (name: {
|
|
|
|
inherit name;
|
|
|
|
}))
|
|
|
|
];
|
2024-06-29 08:26:56 +01:00
|
|
|
};
|
2024-04-30 09:41:56 +02:00
|
|
|
};
|
2024-08-20 00:54:50 +01:00
|
|
|
};
|
2024-04-30 09:41:56 +02:00
|
|
|
}
|