adding changes
This commit is contained in:
@@ -9,9 +9,9 @@ return {
|
|||||||
vendors = {
|
vendors = {
|
||||||
cargdev = {
|
cargdev = {
|
||||||
name = "cargdev", -- Optional
|
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
|
api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below
|
||||||
model = "codellama:7b",
|
model = "deepseek-r1:latest",
|
||||||
__inherited_from = "ollama", -- ensures compatibility
|
__inherited_from = "ollama", -- ensures compatibility
|
||||||
max_tokens = 8192,
|
max_tokens = 8192,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
suggestion = {
|
suggestion = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
auto_trigger = true,
|
auto_trigger = false,
|
||||||
debounce = 75,
|
debounce = 75,
|
||||||
trigger_on_accept = true,
|
trigger_on_accept = true,
|
||||||
keymap = {
|
keymap = {
|
||||||
|
|||||||
53
lua/cargdev/plugins/mcphub.lua
Normal file
53
lua/cargdev/plugins/mcphub.lua
Normal file
@@ -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,
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ return {
|
|||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
||||||
|
|||||||
Reference in New Issue
Block a user