mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-18 09:44:50 +02:00
feat(ai): add avante.nvim for a better AI experience
This commit is contained in:
parent
25abbf546d
commit
c8195e748e
1 changed files with 68 additions and 0 deletions
68
lua/lazyvim/plugins/extras/ai/avante.lua
Normal file
68
lua/lazyvim/plugins/extras/ai/avante.lua
Normal file
|
@ -0,0 +1,68 @@
|
|||
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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue