Replies: 2 comments
-
@mauf3r Thanks for sharing it here. (I have edited log_level in the posted config which is supposed to be inside Wait!!! As I type this I find that your config is wrong 😶. Try this local llm = "openai"
return {
"olimorris/codecompanion.nvim",
opts = {
adapters = {
-- mlx_lm = function()
-- return require("plugins/codecompanion/mlx")
-- end,
openai = function()
return require("codecompanion.adapters").extend("openai", {
env = {
api_key = "MY_API_KEY",
-- api_key = "cmd:gpg --decrypt ~/.openai-api-key.gpg 2>/dev/null",
},
schema = {
model = {
default = "gpt-4o",
},
},
})
end,
lmstudio = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
url = "http://127.0.0.1:8001",
},
})
end,
},
strategies = {
chat = {
adapter = llm,
},
inline = {
adapter = llm,
},
cmd = {
adapter = llm,
},
},
extensions = {
mcphub = {
callback = "mcphub.extensions.codecompanion",
opts = {
show_result_in_chat = true, -- Show mcp tool results in chat
make_vars = true, -- Convert resources to #variables
make_slash_commands = true, -- Add prompts as /slash commands
},
},
},
opts = {
log_level = "TRACE",
},
},
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Seems I had an error in my config :-(
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am referring to a discussion I had with @ravitemer on the MCPHub discord channel.
I have CodeCompanion and MCPHub both configured and working in nvim, but I cannot access @mcp from the CodeCompanion chat.
Plattform: Mac PowerBook M4, MacOS 15.4.1 (will update now to 15.5!), vim 0.11.1 - plugins up to date
codecompanion.lua
mcphub.lua
If I start vim, with no file loaded, and invoke
:CodeCompanionChat
, the chat opens,@
shows me some items, e.g.@files
, bit@mcp
is not there. I can use@files
.If I open
codecompanion.lua
,@mcp
is there, but the AI has no access to any data. After I switch to another file, e.g.lazy.lua
,@mcp
is not available in the chat any more.From
:MCPHub
I can query data, from my calendar or ToDos usingapple-mcp
Any hints would be deeply appreceated.
Beta Was this translation helpful? Give feedback.
All reactions