114 lines
3.4 KiB
Lua
114 lines
3.4 KiB
Lua
return {
|
|
{
|
|
"yetone/avante.nvim",
|
|
event = "VeryLazy",
|
|
dependencies = {
|
|
"stevearc/dressing.nvim",
|
|
"ibhagwan/fzf-lua",
|
|
},
|
|
init = function()
|
|
local anthropic = require("lib").get_secret("anthropic")
|
|
local openai = require("lib").get_secret("openai")
|
|
local google = require("lib").get_secret("google")
|
|
vim.fn.setenv("ANTHROPIC_API_KEY", anthropic)
|
|
vim.fn.setenv("OPENAI_API_KEY", openai)
|
|
vim.fn.setenv("GOOGLE_SEARCH_API_KEY", google)
|
|
end,
|
|
opts = {
|
|
hints = { enabled = false },
|
|
provider = "claude",
|
|
-- auto_suggestions_provider = "claude",
|
|
claude = {
|
|
endpoint = "https://api.anthropic.com",
|
|
model = "claude-3-7-sonnet-latest",
|
|
temperature = 0,
|
|
max_tokens = 4096,
|
|
},
|
|
web_search_engine = { provider = "google" },
|
|
file_selector = {
|
|
provider = "fzf",
|
|
provider_opts = {},
|
|
},
|
|
},
|
|
build = "make",
|
|
},
|
|
{
|
|
"saghen/blink.cmp",
|
|
lazy = true,
|
|
dependencies = { "saghen/blink.compat" },
|
|
opts = {
|
|
sources = {
|
|
default = { "avante_commands", "avante_mentions", "avante_files" },
|
|
compat = {
|
|
"avante_commands",
|
|
"avante_mentions",
|
|
"avante_files",
|
|
},
|
|
-- LSP score_offset is typically 60
|
|
providers = {
|
|
avante_commands = {
|
|
name = "avante_commands",
|
|
module = "blink.compat.source",
|
|
score_offset = 90,
|
|
opts = {},
|
|
},
|
|
avante_files = {
|
|
name = "avante_files",
|
|
module = "blink.compat.source",
|
|
score_offset = 100,
|
|
opts = {},
|
|
},
|
|
avante_mentions = {
|
|
name = "avante_mentions",
|
|
module = "blink.compat.source",
|
|
score_offset = 1000,
|
|
opts = {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"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,
|
|
},
|
|
{
|
|
"zbirenbaum/copilot.lua",
|
|
optional = true,
|
|
opts = {
|
|
filetypes = {
|
|
yaml = true,
|
|
[""] = false,
|
|
},
|
|
},
|
|
keys = {
|
|
{ "<leader>a", group = "ai" },
|
|
{
|
|
"<leader>aT",
|
|
"<CMD>Copilot toggle<CR>",
|
|
desc = "copilot: toggle",
|
|
},
|
|
},
|
|
},
|
|
{ -- temporary fix
|
|
"nvim-lualine/lualine.nvim",
|
|
opts = function(_, opts)
|
|
table.remove(opts.sections.lualine_x, 2)
|
|
end,
|
|
},
|
|
{
|
|
"folke/which-key.nvim",
|
|
optional = true,
|
|
opts = {
|
|
spec = {
|
|
{ "<leader>a", group = "ai" },
|
|
},
|
|
},
|
|
},
|
|
}
|