Files
nvim-config/lua/plugins/ai.lua
2026-01-06 16:23:10 +01:00

109 lines
2.7 KiB
Lua

return {
{
"ravitemer/mcphub.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
build = "npm install -g mcp-hub@latest",
opts = {},
},
{
"saghen/blink.cmp",
dependencies = {
"Kaiser-Yang/blink-cmp-avante",
},
opts = {
sources = {
default = { "avante", "lsp", "path", "snippets", "buffer" },
providers = {
avante = {
module = "blink-cmp-avante",
name = "Avante",
opts = {},
},
},
},
},
},
{
"yetone/avante.nvim",
build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
or "make",
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
opts = {
instructions_file = "AGENTS.md",
provider = "copilot",
providers = {
copilot = {
endpoint = "https://api.githubcopilot.com",
model = "gemini-3-pro-preview",
proxy = nil,
allow_insecure = false,
timeout = 30000,
context_window = 64000,
extra_request_body = {
temperature = 0.75,
max_tokens = 20480,
},
},
},
web_search_engine = {
provider = "tavily",
proxy = nil,
providers = {
tavily = {
api_key_name = "TAVILY_API_KEY",
extra_request_body = {
include_answer = "basic",
},
format_response_body = function(body)
return body.answer, nil
end,
},
},
},
system_prompt = function()
local hub = require("mcphub").get_hub_instance()
return hub and hub:get_active_servers_prompt() or ""
end,
custom_tools = function()
return {
require("mcphub.extensions.avante").mcp_tool(),
}
end,
},
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-mini/mini.pick",
"nvim-telescope/telescope.nvim",
"hrsh7th/nvim-cmp",
"ibhagwan/fzf-lua",
"stevearc/dressing.nvim",
"folke/snacks.nvim",
"nvim-tree/nvim-web-devicons",
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
use_absolute_path = true,
},
},
},
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
},
}