mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-16 20:34:39 +02:00
Update lua/lazyvim/plugins/extras/ai/avante.lua
Co-authored-by: PatMulligan <43773168+PatMulligan@users.noreply.github.com>
This commit is contained in:
parent
c8195e748e
commit
91f5850c3c
1 changed files with 16 additions and 34 deletions
|
@ -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",
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue