diff --git a/lua/cargdev/plugins/aicargdev.lua b/lua/cargdev/plugins/aicargdev.lua index 554e40d..46d4b39 100644 --- a/lua/cargdev/plugins/aicargdev.lua +++ b/lua/cargdev/plugins/aicargdev.lua @@ -9,9 +9,9 @@ return { vendors = { cargdev = { name = "cargdev", -- Optional - endpoint = "https://api-ai.cargdev.io/api/generate", -- API endpoint + endpoint = "https://api-ai.cargdev.io", -- API endpoint api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below - model = "codellama:7b", + model = "deepseek-r1:latest", __inherited_from = "ollama", -- ensures compatibility max_tokens = 8192, }, diff --git a/lua/cargdev/plugins/copilot.lua b/lua/cargdev/plugins/copilot.lua index e04fc2e..d8979e2 100644 --- a/lua/cargdev/plugins/copilot.lua +++ b/lua/cargdev/plugins/copilot.lua @@ -22,8 +22,8 @@ return { }, }, suggestion = { - enabled = true, - auto_trigger = true, + enabled = false, + auto_trigger = false, debounce = 75, trigger_on_accept = true, keymap = { diff --git a/lua/cargdev/plugins/mcphub.lua b/lua/cargdev/plugins/mcphub.lua new file mode 100644 index 0000000..4460bef --- /dev/null +++ b/lua/cargdev/plugins/mcphub.lua @@ -0,0 +1,53 @@ +return { + "ravitemer/mcphub.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + build = "npm install -g mcp-hub@latest", -- Installs `mcp-hub` node binary globally + config = function() + require("mcphub").setup({ + --- `mcp-hub` binary related options------------------- + config = vim.fn.expand("~/.config/mcphub/servers.json"), -- Absolute path to MCP Servers config file (will create if not exists) + port = 37373, -- The port `mcp-hub` server listens to + shutdown_delay = 60 * 10 * 000, -- Delay in ms before shutting down the server when last instance closes (default: 10 minutes) + use_bundled_binary = false, -- Use local `mcp-hub` binary (set this to true when using build = "bundled_build.lua") + mcp_request_timeout = 60000, --Max time allowed for a MCP tool or resource to execute in milliseconds, set longer for long running tasks + + ---Chat-plugin related options----------------- + auto_approve = false, -- Auto approve mcp tool calls + auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically + extensions = { + avante = { + make_slash_commands = true, -- make /slash commands from MCP server prompts + }, + }, + + --- Plugin specific options------------------- + native_servers = {}, -- add your custom lua native servers here + ui = { + window = { + width = 0.8, -- 0-1 (ratio); "50%" (percentage); 50 (raw number) + height = 0.8, -- 0-1 (ratio); "50%" (percentage); 50 (raw number) + relative = "editor", + zindex = 50, + border = "rounded", -- "none", "single", "double", "rounded", "solid", "shadow" + }, + wo = { -- window-scoped options (vim.wo) + winhl = "Normal:MCPHubNormal,FloatBorder:MCPHubBorder", + }, + }, + on_ready = function(hub) + -- Called when hub is ready + end, + on_error = function(err) + -- Called on errors + end, + log = { + level = vim.log.levels.WARN, + to_file = false, + file_path = nil, + prefix = "MCPHub", + }, + }) + end, +} diff --git a/lua/cargdev/plugins/nvim-cmp.lua b/lua/cargdev/plugins/nvim-cmp.lua index 0947011..5302e88 100644 --- a/lua/cargdev/plugins/nvim-cmp.lua +++ b/lua/cargdev/plugins/nvim-cmp.lua @@ -34,6 +34,7 @@ return { luasnip.lsp_expand(args.body) end, }, + mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_prev_item(), -- previous suggestion [""] = cmp.mapping.select_next_item(), -- next suggestion