Editor integrations
Editor integrations like Claude Code's VS Code extension or claudecode.nvim show diffs in the user's editor and sync context between the editor and agent.
I'm sure this is on the roadmap for opencode, but I couldn't find an existing issue so opening this as a feature request just to track it.
I don't think opencode ever needs to live inside say, neovim, but it would be nice if it could see what you have open and selected in neovim, and if it could display diffs in neovim.
With how decoupled the TUI is, these integrations (i.e session management, and embed access) are so easy to create and so incredibly useful that I won't even spend my time coming up with my own little setup, I already know some legend is working on it, and whoever you are, we love you.
I'd look into lazygit; it does a pristine job and even covers a similar issue to #101, where it can make the floating lazygit window embed the theme colors from your nvim config.
This would be a killer feature. With Claude Code implementing this and this neovim plugin existing, it is hard to go back to opencode :D
Hey all - an editor integration to show diffs in Jetbrains (Pycharm specifically) / VScode would be extremely helpful for driving adoption.
I'm responsible for AI enablement in engineering at our company and one of the major driving factors for Claude Code's grassroots adoption was that it had multi editor integration. This helped python users using Pycharm have a great experience.
Showing diffs, being able to easily highlight and add context to the running instance would make this a real competitor for any IDE based tool (Junie, Cursor, Copilot, etc)
starting on this next week
@thdxr If I may add one suggestion, expose a way for nvim to listen to events like the start and end of a response (here's some inspiration).
Why is this useful? There's a lot of times I instinctively prompt and immediately switch context, so a sound notification when the response/agent ends so that you can jump back in w/o having to constantly check it is a life changer.
For Neovim, y'all might like my https://github.com/NickvanDyke/opencode.nvim. Open to suggestions!
Re diffs, I use mini.diff, specifically its overlay. imo there is a fine line between integration and re-invention that requires users learn Yet Another Tool, that also may not fit their preferences.
Please consider a Zed integration
@thdxr Any updates on this? I saw an integration for VS Code, but nothing for Neovim yet.
@Keyruu one of our contributors has been working on a nvim extension: https://github.com/NickvanDyke/opencode.nvim
@rekram1-node Yeah I saw that and it is pretty cool, but not what I would want from an editor integration. I would want to see the diff of the changes opencode proposes and would want to approve them by saving the buffer. This also has the advantage of me making edits before opencode goes on. I am pretty satisfied with https://github.com/coder/claudecode.nvim.
@Keyruu I'm not sure we can "pause" opencode on each edit? In which case imo it's not much better than making all the edits and then reviewing them with your diff tool of choice. Which btw you could hook into OpencodeEvents to trigger π FWIW the entire edit is one entry in the undotree, so it's easy to revert if you don't like the changes.
People have such vast preferences in git/diff workflows and I didn't want to force Yet Another Tool on users. But I'm definitely open to ideas that would make them easier to integrate!
Check out https://github.com/sudo-tee/opencode.nvim, it lets you accept/reject diffs π
@Keyruu I'm not sure we can "pause" opencode on each edit? In which case imo it's not much better than making all the edits and then reviewing them with your diff tool of choice. Which btw you could hook into OpencodeEvents to trigger π FWIW the entire edit is one entry in the undotree, so it's easy to revert if you don't like the changes.
@NickvanDyke I haven't used opencode in a while, but I thought this would be what the permissions are for? So before the change is actually made, I had to approve it. And for the point of it, making all the changes is better: In my experience, it is way easier to steer the AI at the earliest point for a better result.
@Keyruu ah you're right, thanks! I've been so focused on the plugin that I haven't totally kept up with opencode itself π
I see that the opencode server has an endpoint for responding to permission requests. I could probably listen for the corresponding SSE to get the permission ID and proposed changes.
But what does that add over focusing the TUI to accept/reject there, besides a slight convenience? My goal is to supplement the TUI with the editor, not replace it π
@NickvanDyke This has multiple benefits:
- Biggest benefit is seeing the code in Neovim. With a small Chat window, I can't even see the whole change and it doesn't have the same syntax highlighting and LSP information.
- Changing the buffer directly and then accepting the change. Telling opencode what I changed there.
- Copying stuff out of the buffer and researching about the changes before they are made.
@Keyruu that's all fair! Right now I'm more excited about adding Next Edit Suggestions (including diff code that could help here), but I'll consider this π Thanks for your points!
Zed now allows bringing your own agents https://zed.dev/docs/ai/external-agents
Please consider adding documentation on how to configure it. Using the same config as the VS code extension did not help
@gt-solaris afaik that requires support of ACP and Dax mentioned they are in talks w/ Zed team on how to best approach this
Any updates on the vscode diff? It's the only feature from Claude Code I'm missing on opencode.
Any updates on the vscode diff? It's the only feature from Claude Code I'm missing on opencode.
totally agree with this sentiment.. being able to use this with VSCode diffs like CC, Gemini CLI, etc would be ace!
we should have some updates to the vscode extension soon
Is there anything planned for Jetbrains IDEs?
if we get enough demand then it could be prioritized sooner but right now thatβs not at the top of the list though eventually there will probably be one either by us or someone else will make one similarly to the neovim plugin that is mentioned above ^
Btw Jetbrains is adopting the ACP standard, we recently added this support.
Next week a Zed integration will be announced using ACP and this will make it really easy for us to do something similar for JetBrains or at least documenting how to use it @AbbasSrour
But to use opencode with acp, one needs to use it through editor's UI/UX which may not be ideal. We mostly need editor integration only to add recent/currently open files or selected lines to the context and to see the diff for confirmation.As an example, opencode over zed acp does not give the full experience of the opencode cli.
You might find a lot more people checking out OpenCode today, see https://github.com/anthropics/claude-code/issues/17118. Is the current status that there is no VS Code integration? I am trying to find out how close OpenCode is to replicating Claude Code's workflow with the IDE diffs and IDE diagnostics integration.
there is a vscode extension. it's fairly thin. i've made some notes and implemented most of this https://github.com/anomalyco/opencode/issues/7275 locally. we'll see if i can get a couple bug fixes merged to get familiar with the process here and build enough cred to work through features etc.
Hi everyone,
Inspired by the amazing work here, Iβve recently developed a JetBrains plugin for OpenCode to bring this powerful AI agent workflow into the JetBrains ecosystem (IntelliJ IDEA, PyCharm, WebStorm, etc.):
https://plugins.jetbrains.com/plugin/29744-opencode-ui
I wanted to share it with the community here in case anyone else is looking for a more integrated experience while using OpenCode.
Key Features:
-
Quick Launch: Instantly create or focus an "OpenCode" terminal session with a single shortcut (Cmd+Esc / Ctrl+Esc). The terminal only launches when you need it, keeping your workspace clean.
-
Context Sharing: Seamlessly send code selections or file references (including line numbers) from your editor or project view directly to the AI agent (Opt+Cmd+K).
-
Diff Review: Automatically review AI-generated code changes in chronological order using a native, multi-file diff viewer.
-
LocalHistory Protection: All "reject" operations automatically create recovery points, so you can always restore accidentally rejected changes.