2023-06-22 09:48:17 +02:00
|
|
|
{
|
2023-11-06 15:04:08 +01:00
|
|
|
lib,
|
2023-06-22 09:48:17 +02:00
|
|
|
pkgs,
|
|
|
|
...
|
2024-01-07 11:18:25 +01:00
|
|
|
} @ args:
|
2024-02-08 16:18:40 +01:00
|
|
|
with lib; (
|
|
|
|
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
|
|
|
mkVimPlugin args {
|
|
|
|
name = "copilot-vim";
|
|
|
|
description = "copilot.vim";
|
|
|
|
package = pkgs.vimPlugins.copilot-vim;
|
|
|
|
globalPrefix = "copilot_";
|
2023-06-22 09:48:17 +02:00
|
|
|
|
2024-02-08 16:18:40 +01:00
|
|
|
options = {
|
|
|
|
nodeCommand = mkDefaultOpt {
|
|
|
|
global = "node_command";
|
|
|
|
type = types.str;
|
|
|
|
default = "${pkgs.nodejs-18_x}/bin/node";
|
|
|
|
description = "Tell Copilot what `node` binary to use.";
|
|
|
|
};
|
2023-06-22 09:48:17 +02:00
|
|
|
|
2024-02-08 16:18:40 +01:00
|
|
|
filetypes = mkDefaultOpt {
|
|
|
|
type = with types; attrsOf bool;
|
|
|
|
description = ''
|
|
|
|
A dictionary mapping file types to their enabled status
|
2023-06-22 09:48:17 +02:00
|
|
|
|
2024-02-08 16:18:40 +01:00
|
|
|
Default: `{}`
|
|
|
|
'';
|
|
|
|
example = {
|
|
|
|
"*" = false;
|
|
|
|
python = true;
|
2024-01-07 11:18:25 +01:00
|
|
|
};
|
2024-02-08 16:18:40 +01:00
|
|
|
};
|
2023-06-22 09:48:17 +02:00
|
|
|
|
2024-02-08 16:18:40 +01:00
|
|
|
proxy = mkDefaultOpt {
|
|
|
|
type = types.str;
|
|
|
|
description = "Tell Copilot what proxy server to use.";
|
|
|
|
example = "localhost:3128";
|
2024-01-07 11:18:25 +01:00
|
|
|
};
|
2024-02-08 16:18:40 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|