Skip to content

Commit

Permalink
feat(avante): using builtins nxivim configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Oct 9, 2024
1 parent c1fb68f commit 55c55ff
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions nvim.nix/config/ai.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
{ pkgs, icons, ... }:
{ icons, ... }:

{
extraPlugins = with pkgs.vimPlugins; [
avante-nvim
# ChatGPT-nvim
];
extraConfigLuaPost = # lua
''
require('avante').setup({
provider = "claude",
claude = {
api_key_name = "cmd:pass show r17x/anthropic",
endpoint = "https://api.anthropic.com",
model = "claude-3-5-sonnet-20240620",
temperature = 0,
max_tokens = 4096,
},
})
'';
plugins.avante.enable = true;
plugins.avante.settings.provider = "claude";
plugins.avante.settings.claude.api_key_name = "cmd:pass show r17x/anthropic";
plugins.avante.settings.claude.endpoint = "https://api.anthropic.com";
plugins.avante.settings.claude.model = "claude-3-5-sonnet-20240620";
plugins.avante.settings.claude.temperature = 0;
plugins.avante.settings.claude.max_tokens = 4096;

plugins.which-key.settings.spec = [

{
__unkeyed-1 = "<leader>ca";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>AvanteAsk<cr>";
desc = "Open AI Ask";
}

{
__unkeyed-1 = "<leader>cc";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPT<cr>";
desc = "Open ChatGPT Prompt";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>AvanteChat<cr>";
desc = "Open AI Chat";
}

{
__unkeyed-1 = "<leader>ce";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTEditWithInstruction<cr>";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>AvanteEdit<cr>";
desc = "Edit with instruction";
}

Expand Down

0 comments on commit 55c55ff

Please sign in to comment.