Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .config/nvim/lua/plugins/codecompanion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ return {
local layout = vim.env.CC_LAYOUT_OVERRIDE or "vertical"
return {
adapters = {
acp = {
opencode = function()
return require("codecompanion.adapters").extend("acp", {
name = "opencode",
url = "http://localhost:3210/acp",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you even checked the existing implementations?

https://github.com/olimorris/codecompanion.nvim/blob/main/lua/codecompanion/adapters/acp/gemini_cli.lua

There is no URL. Also would make much sense. You have to invoke the introduces cli command 'opencode acp'

Try again...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 3cf5d12. Removed the url parameter and added commands to invoke opencode acp CLI command, following the same pattern as gemini_cli.

schema = {
model = {
default = "claude-3-5-sonnet-20241022",
},
},
})
end,
},
http = {
azure_openai = function()
return require("codecompanion.adapters").extend("azure_openai", {
Expand Down