Update lua/lazyvim/plugins/extras/ai/avante.lua

Co-authored-by: PatMulligan <43773168+PatMulligan@users.noreply.github.com>
This commit is contained in:
George Guimarães 2025-01-28 09:40:48 -03:00
parent c8195e748e
commit 91f5850c3c
No known key found for this signature in database
GPG key ID: 20E86F6F5FC22FA7

View file

@ -5,45 +5,27 @@ return {
dependencies = {
"stevearc/dressing.nvim",
},
opts = function(_, opts)
opts = {
-- Default configuration
opts.hints = { enabled = false }
hints = { enabled = false },
---@alias AvanteProvider "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
claude = {
endpoint = "https://api.anthropic.com",
model = "claude-3-5-sonnet-20241022",
temperature = 0,
max_tokens = 4096,
},
-- File selector configuration
--- @alias FileSelectorProvider "native" | "fzf" | "mini.pick" | "snacks" | "telescope" | string
opts.file_selector = {
provider = "fzf",
file_selector = {
provider = "fzf", -- Avoid native provider issues
provider_opts = {},
}
-- Blink.cmp integration
-- LSP score_offset is typically 60
opts.providers = {
avante_commands = {
name = "avante_commands",
module = "blink.compat.source",
score_offset = 90, -- show at a higher priority than lsp
opts = {},
},
avante_files = {
name = "avante_files",
module = "blink.compat.source",
score_offset = 100, -- show at a higher priority than lsp
opts = {},
},
avante_mentions = {
name = "avante_mentions",
module = "blink.compat.source",
score_offset = 1000, -- show at a higher priority than lsp
opts = {},
},
}
opts.compat = {
"avante_commands",
"avante_mentions",
"avante_files",
}
end,
},
},
build = LazyVim.is_win() and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" or "make",
},
{