mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 10:59:49 +01:00
feat: make Copilot node package configurable
This commit is contained in:
parent
2164d78f09
commit
b996c123e6
2 changed files with 11 additions and 3 deletions
|
@ -23,7 +23,7 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim.startPlugins = [
|
vim.startPlugins = [
|
||||||
"copilot-lua"
|
"copilot-lua"
|
||||||
pkgs.nodejs-slim-16_x
|
cfg.copilotNodePackage
|
||||||
];
|
];
|
||||||
|
|
||||||
vim.luaConfigRC.copilot = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.copilot = nvim.dag.entryAnywhere ''
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
with builtins; {
|
with builtins; let
|
||||||
|
cfg = config.vim.assistant.copilot;
|
||||||
|
in {
|
||||||
options.vim.assistant.copilot = {
|
options.vim.assistant.copilot = {
|
||||||
enable = mkEnableOption "Enable GitHub Copilot";
|
enable = mkEnableOption "Enable GitHub Copilot";
|
||||||
|
|
||||||
|
@ -91,8 +93,14 @@ with builtins; {
|
||||||
|
|
||||||
copilot_node_command = mkOption {
|
copilot_node_command = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "${lib.getExe pkgs.nodejs-slim-16_x}";
|
default = "${lib.getExe cfg.copilotNodePackage}";
|
||||||
description = "Path to nodejs";
|
description = "Path to nodejs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
copilotNodePackage = mkOption {
|
||||||
|
type = with types; nullOr package;
|
||||||
|
default = pkgs.nodejs-slim-16_x;
|
||||||
|
description = "The package that will be used for Copilot. NodeJS v16 is recommended.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue