mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 13:22:13 +02:00
93 lines
2.5 KiB
Lua
93 lines
2.5 KiB
Lua
return {
|
|
"yetone/avante.nvim",
|
|
opts = {
|
|
---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string
|
|
provider = "claude", -- Recommend using Claude
|
|
auto_suggestions_provider = "claude", -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot
|
|
providers = {
|
|
claude = {
|
|
endpoint = "https://api.anthropic.com",
|
|
api_key_name = "ANTHROPIC_API_KEY",
|
|
extra_request_body = {
|
|
temperature = 0,
|
|
max_tokens = 8192,
|
|
},
|
|
},
|
|
},
|
|
behaviour = {
|
|
auto_suggestions = false, -- Experimental stage
|
|
auto_set_highlight_group = true,
|
|
auto_set_keymaps = true,
|
|
auto_apply_diff_after_generation = false,
|
|
support_paste_from_clipboard = true,
|
|
},
|
|
input = {
|
|
provider = "snacks", -- Use folke/snacks.nvim already installed by LazyVim
|
|
provider_opts = {
|
|
title = "Avante — API Key",
|
|
icon = " ",
|
|
placeholder = "sk-ant-...",
|
|
},
|
|
},
|
|
mappings = {
|
|
--- @class AvanteConflictMappings
|
|
ask = "<leader>aa",
|
|
edit = "<leader>ae",
|
|
refresh = "<leader>ar",
|
|
diff = {
|
|
ours = "co",
|
|
theirs = "ct",
|
|
all_theirs = "ca",
|
|
both = "cb",
|
|
cursor = "cc",
|
|
next = "]x",
|
|
prev = "[x",
|
|
},
|
|
suggestion = {
|
|
accept = "<M-l>",
|
|
next = "<M-]>",
|
|
prev = "<M-[>",
|
|
dismiss = "<C-]>",
|
|
},
|
|
jump = {
|
|
next = "]]",
|
|
prev = "[[",
|
|
},
|
|
submit = {
|
|
normal = "<CR>",
|
|
insert = "<C-s>",
|
|
},
|
|
sidebar = {
|
|
apply_all = "A",
|
|
apply_cursor = "a",
|
|
switch_windows = "<Tab>",
|
|
reverse_switch_windows = "<S-Tab>",
|
|
},
|
|
},
|
|
hints = { enabled = true },
|
|
windows = {
|
|
---@type "right" | "left" | "top" | "bottom"
|
|
position = "right", -- the position of the sidebar
|
|
wrap = true, -- similar to vim.o.wrap
|
|
width = 30, -- default % based on available width
|
|
sidebar_header = {
|
|
align = "center", -- left, center, right for title
|
|
rounded = true,
|
|
},
|
|
},
|
|
highlights = {
|
|
---@type AvanteConflictHighlights
|
|
diff = {
|
|
current = "DiffText",
|
|
incoming = "DiffAdd",
|
|
},
|
|
},
|
|
--- @class AvanteConflictUserConfig
|
|
diff = {
|
|
autojump = true,
|
|
---@type string | fun(): any
|
|
list_opener = "copen",
|
|
},
|
|
},
|
|
}
|