toothpick sops
This commit is contained in:
@@ -4,23 +4,18 @@
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.nixvim.plugins.ai;
|
||||
cfg = config.modules.devtools.nixvim.plugins.copilot;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.nixvim.plugins.ai.enable = mkEnableOption "Enables AI tools for nixvim";
|
||||
modules.devtools.nixvim.plugins.copilot.enable = mkEnableOption "Enables AI tools for nixvim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
chatgpt = {
|
||||
copilot-chat = {
|
||||
enable = true;
|
||||
settings = {
|
||||
api_key_cmd = "cat ${config.sops.secrets.openai_api_key.path}";
|
||||
};
|
||||
};
|
||||
copilot-chat.enable = true;
|
||||
|
||||
copilot-lua = {
|
||||
enable = true;
|
||||
suggestion = {
|
||||
@@ -28,10 +23,20 @@ in {
|
||||
autoTrigger = true;
|
||||
keymap.accept = "<C-CR>";
|
||||
};
|
||||
panel.enabled = false;
|
||||
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";
|
||||
@@ -42,16 +47,6 @@ in {
|
||||
"n"
|
||||
];
|
||||
}
|
||||
{
|
||||
action = "<cmd>ChatGPT<CR>";
|
||||
key = "<leader>ag";
|
||||
options = {
|
||||
desc = "Toggle ChatGPT";
|
||||
};
|
||||
mode = [
|
||||
"n"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
{userModules, ...}: {
|
||||
imports = [
|
||||
"${userModules}/devtools/nixvim/plugins/ai.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/barbar.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/comment.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/conform.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/copilot.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/efm.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/floaterm.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/harpoon.nix"
|
||||
@@ -12,12 +12,12 @@
|
||||
"${userModules}/devtools/nixvim/plugins/markdown-preview.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/neo-tree.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/nonels.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/rustaceanvim.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/startify.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/tagbar.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/telescope.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/treesitter.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/vimtex.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/yanky.nix"
|
||||
"${userModules}/devtools/nixvim/plugins/rustaceanvim.nix"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
nixvim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = false;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
copilot.enable = false;
|
||||
efm.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
nixvim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = true;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
copilot.enable = true;
|
||||
efm.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
|
||||
@@ -11,25 +11,25 @@
|
||||
nixvim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = false;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
copilot.enable = false;
|
||||
efm.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
lsp.enable = true;
|
||||
lualine.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
neo-tree.enable = true;
|
||||
none-ls.enable = true;
|
||||
rustaceanvim.enable = true;
|
||||
startify.enable = true;
|
||||
tagbar.enable = false;
|
||||
telescope.enable = true;
|
||||
treesitter.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
tagbar.enable = false;
|
||||
vimtex.enable = false;
|
||||
yanky.enable = false;
|
||||
rustaceanvim.enable = true;
|
||||
lsp.enable = true;
|
||||
};
|
||||
};
|
||||
vscode.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user