From 549a9a69fd914fc2e24840eb86cc4098186722ce Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 29 Aug 2024 09:29:52 +0200 Subject: [PATCH] feat(nvim): avante --- nvim-fredrik/lua/config/keymaps.lua | 6 ++++++ nvim-fredrik/lua/plugins/avante.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 nvim-fredrik/lua/plugins/avante.lua diff --git a/nvim-fredrik/lua/config/keymaps.lua b/nvim-fredrik/lua/config/keymaps.lua index 4fe1d946..b83555b0 100644 --- a/nvim-fredrik/lua/config/keymaps.lua +++ b/nvim-fredrik/lua/config/keymaps.lua @@ -930,4 +930,10 @@ function M.setup_codecompanion_keymaps() } end +function M.setup_avante_keymaps() + return { + { "aa", ":AvanteAsk", desc = "Avante" }, + } +end + return M diff --git a/nvim-fredrik/lua/plugins/avante.lua b/nvim-fredrik/lua/plugins/avante.lua new file mode 100644 index 00000000..7757bbe4 --- /dev/null +++ b/nvim-fredrik/lua/plugins/avante.lua @@ -0,0 +1,27 @@ +return { + { + "yetone/avante.nvim", + enabled = true, + event = "VeryLazy", + build = "make", -- This is Optional, only if you want to use tiktoken_core to calculate tokens count + opts = { + claude = { + api_key_name = "cmd:op read op://Personal/Anthropic/tokens/neovim --no-newline", + }, + }, + dependencies = { + "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + --- The below is optional, make sure to setup it properly if you have lazy=true + { + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, + }, +}