mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-08 00:05:57 +01:00
28 lines
568 B
Nix
28 lines
568 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib;
|
|
with builtins; let
|
|
cfg = config.vim.assistant.copilot;
|
|
in {
|
|
options.vim.assistant.copilot = {
|
|
enable = mkEnableOption "Enable GitHub Copilot";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
vim.startPlugins = [
|
|
"copilot-lua"
|
|
pkgs.nodejs-slim-16_x
|
|
];
|
|
|
|
vim.luaConfigRC.copilot = nvim.dag.entryAnywhere ''
|
|
require("copilot").setup({
|
|
-- available options: https://github.com/zbirenbaum/copilot.lua
|
|
copilot_node_command = "${lib.getExe pkgs.nodejs-slim-16_x}",
|
|
})
|
|
'';
|
|
};
|
|
}
|