Repository navigation
Plugin ideas for OpenCode v2 #334
Replies: 2 comments 3 replies
To be honest, this is probably my biggest gripe with the Opencode TUI right now. I really miss the VIM motions and operators if I need to edit a prompt midway through writing it.
This appears to be the rub from what I've been gathering. Much of the TUI behavior support was changed or dropped at v2, which creates a lot of friction. To be clear though, at least for my usage pattern, I would still prefer this as I frequently run a Herdr pane with Opencode on one side, and another terminal on the other in which I may or may not be in Neovim. I would rather not be required to be in neovim to get the functionality I want. My opinion is that idea 2 is going to be more trouble than it's worth, and it looks like you already agree. However I also can't help but wonder if using an Opencode TUI from within a shell in Neovim would help capture the TUI client in an easier way, and similarly if the Neovim shell might help standardize the target in any way and make option 2 more realistic. |
Option 1 research (custom OpenCode plugin to re-instate TUI endpoints)How it'd work
So we'd need two plugins - one for the server, one for the CLI/TUI. What it could doLikely restore most TUI endpoints, but not prompt append. Cost
Sooo seems like a bad option. Lots of work and maintenance, and still can't give us everything we want. I'll brainstorm on Option 3 next. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Spun out of #322.
Good paraphrased summary by @nikfp of OpenCode v2 and how it affects opencode.nvim:
We already have https://github.com/sudo-tee/opencode.nvim as a Neovim-native client, and it looks to be under active development still. So I'd like to focus on maximizing this plugin's "bridge" philosophy within OpenCode v2's constraints. It minimizes maintenance burden/feature creep and the barrier to entry.
My high-level ideas:
send-keysto imitate the/tui/*endpoints. Similar issues as the OG Providers: finnicky, super high-maintenance, doesn't support every workflow. Although this text-only solution would have less surface area than Providers, which managedopencode's entire lifecycle. Restores functionality and reliable targeting.main. See this commit for functionality consequences. Then improve the opencode.nvim prompting experience rather than rely on the TUI. Multi-line input, append to an in-memory prompt, agent selection, filesystem completions, (custom command completions to replace the commands section inselect()?), etc. Restores functionality, just in a different way. And maybe even a better way, because I'm sure Neovim users would prefer to write their prompts in Neovim. However this leaves correct-session targeting. Some ideas there are to create new sessions ourselves so we know the ID to then send to. And a session picker that controls which session we send to (as opposed to selecting a session in the TUI like it used to). Display selected session in statusline component for visibility. Probably some other stuff I'm missing.Open to feedback and other ideas!
Related issues:
All reactions