mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
docs: add CodeCompanion.nvim integration instructions (#5079)
This commit is contained in:
parent
668d5a76d5
commit
48dc520fb8
1 changed files with 21 additions and 0 deletions
|
|
@ -100,6 +100,27 @@ If you need to pass environment variables:
|
|||
|
||||
---
|
||||
|
||||
### CodeCompanion.nvim
|
||||
|
||||
To use OpenCode as an ACP agent in [CodeCompanion.nvim](https://github.com/olimorris/codecompanion.nvim), add the following to your Neovim config:
|
||||
|
||||
```lua
|
||||
require("codecompanion").setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = {
|
||||
name = "opencode",
|
||||
model = "claude-sonnet-4",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
This config sets up CodeCompanion to use OpenCode as the ACP agent for chat.
|
||||
|
||||
If you need to pass environment variables (like `OPENCODE_API_KEY`), refer to [Configuring Adapters: Environment Variables](https://codecompanion.olimorris.dev/configuration/adapters#environment-variables-setting-an-api-key) in the CodeCompanion.nvim documentation for full details.
|
||||
|
||||
## Support
|
||||
|
||||
OpenCode works the same via ACP as it does in the terminal. All features are supported:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue