local function qwen(model) return { __inherited_from = "openai", api_key_name = "QWEN_API_KEY", endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/", model = model, } end return { { "yetone/avante.nvim", build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" or "make", event = "VeryLazy", dependencies = { "stevearc/dressing.nvim", "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", { "MeanderingProgrammer/render-markdown.nvim", opts = { file_types = { "markdown", "Avante" }, }, ft = { "markdown", "Avante" }, }, }, opts = { file_selector = { provider = "fzf-lua", provider_opts = {}, }, provider = "qwen3coder", auto_suggestions_provider = "qwen332b", providers = { qwen3coder = qwen("qwen3-coder-480b-a35b-instruct"), qwen332b = qwen("qwen3-32b"), }, -- Key mappings for diff functionality mappings = { diff = { theirs = "", ours = "", }, }, }, }, { "nvim-neo-tree/neo-tree.nvim", config = function() require("neo-tree").setup({ filesystem = { commands = { avante_add_files = function(state) local node = state.tree:get_node() local filepath = node:get_id() local relative_path = require("avante.utils").relative_path(filepath) local sidebar = require("avante").get() local open = sidebar:is_open() -- ensure avante sidebar is open if not open then require("avante.api").ask() sidebar = require("avante").get() end sidebar.file_selector:add_selected_file(relative_path) -- remove neo tree buffer if not open then sidebar.file_selector:remove_selected_file("neo-tree filesystem [1]") end end, }, window = { mappings = { ["oa"] = "avante_add_files", }, }, }, }) end, }, { "saghen/blink.cmp", dependencies = { "Kaiser-Yang/blink-cmp-avante", -- ... Other dependencies }, opts = { sources = { -- Add 'avante' to the list default = { "avante", "lsp", "path", "snippets", "buffer" }, providers = { avante = { module = "blink-cmp-avante", name = "Avante", opts = { -- options for blink-cmp-avante }, }, minuet = { name = "minuet", module = "minuet.blink", score_offset = 100, }, }, }, }, }, { "milanglacier/minuet-ai.nvim", event = "InsertEnter", config = function() require("minuet").setup({ virtualtext = { auto_trigger_ft = { "*" }, keymap = { accept = "", accept_line = "", next = "", prev = "", dismiss = "", }, }, provider = "openai_fim_compatible", provider_options = { openai_fim_compatible = { end_point = "https://dashscope.aliyuncs.com/compatible-mode/v1/completions", api_key = "QWEN_API_KEY", model = "qwen2.5-coder-32b-instruct", name = "qwen2.5-coder-32b-instruct", optional = { max_tokens = 256, top_p = 0.9, }, }, }, }) end, }, }