nvim/lua/plugins/avante.lua

94 lines
2 KiB
Lua

return {
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false,
opts = {
provider = "claude",
auto_suggestions_provider = "claude",
providers = {
claude = {
endpoint = "https://api.anthropic.com/v1",
model = "claude-sonnet-4-20250514",
extra_request_body = {
temperature = 0,
max_tokens = 4096,
},
},
},
behaviour = {
auto_suggestions = false,
auto_set_highlight_group = true,
auto_set_keymaps = true,
auto_apply_diff_after_generation = false,
support_paste_from_clipboard = false,
},
mappings = {
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>",
},
},
hints = { enabled = true },
windows = {
position = "right",
wrap = true,
width = 30,
sidebar_header = {
align = "center",
rounded = true,
},
},
highlights = {
diff = {
current = "DiffText",
incoming = "DiffAdd",
},
},
diff = {
autojump = true,
list_opener = "copen",
},
},
build = "make",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
use_absolute_path = true,
},
},
},
},
}