toothpick sops

This commit is contained in:
cnst
2024-08-25 20:21:01 +02:00
parent 4a5074ecde
commit abc7dcd382
9 changed files with 31 additions and 39 deletions

View File

@@ -0,0 +1,53 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.modules.devtools.nixvim.plugins.copilot;
in {
options = {
modules.devtools.nixvim.plugins.copilot.enable = mkEnableOption "Enables AI tools for nixvim";
};
config = mkIf cfg.enable {
programs.nixvim = {
plugins = {
copilot-chat = {
enable = true;
};
copilot-lua = {
enable = true;
suggestion = {
enabled = true;
autoTrigger = true;
keymap.accept = "<C-CR>";
};
panel.enabled = true;
};
};
keymaps = [
{
action = "<cmd>lua local input = vim.fn.input('Quick Chat: '); if input ~= '' then require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer }) end<CR>";
key = "<leader>qc";
options = {
desc = "CopilotChat - Quick chat";
};
mode = [
"n"
];
}
{
action = "<cmd>CopilotChatToggle<CR>";
key = "<leader>ac";
options = {
desc = "Toggle Coilot chat";
};
mode = [
"n"
];
}
];
};
};
}