LazyVim.LazyVim/lua/lazyvim/plugins/extras/ai/avante.lua
2025-06-23 11:48:21 -03:00

68 lines
1.8 KiB
Lua

return {
{
"yetone/avante.nvim",
event = "VeryLazy",
dependencies = {
"stevearc/dressing.nvim",
},
opts = function(_, opts)
-- Default configuration
opts.hints = { enabled = false }
-- File selector configuration
--- @alias FileSelectorProvider "native" | "fzf" | "mini.pick" | "snacks" | "telescope" | string
opts.file_selector = {
provider = "fzf",
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",
},
{
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
ft = function(_, ft)
vim.list_extend(ft, { "Avante" })
end,
opts = function(_, opts)
opts.file_types = vim.list_extend(opts.file_types or {}, { "Avante" })
end,
},
{
"folke/which-key.nvim",
optional = true,
opts = {
spec = {
{ "<leader>a", group = "ai" },
},
},
},
}