You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] /editor command fails silently when using neovim-remote in Neovim terminal #1213
Description:
When running OpenCode within a Neovim terminal session and having the EDITOR environment variable configured to use neovim-remote (nvr), attempting to use the /editor command results in silent failure. The command appears to execute but no buffer/editor instance opens, and no error message is displayed to indicate what went wrong.
Environment:
OpenCode version: 0.3.9
Neovim version: 0.11.2
Neovim Remote version: 2.5.1
Terminal: Neovim terminal (:terminal or similar)
Editor: EDITOR environment variable set to neovim-remote (nvr)
Platform: MacOS/Linux
Expected Behavior:
The /editor command should either:
Successfully open the file in the existing Neovim instance via neovim-remote, or
Display a clear error message explaining why it cannot open the editor
Actual Behavior:
The /editor command fails silently with no feedback to the user about what went wrong.
Steps to Reproduce:
Set EDITOR environment variable to neovim-remote (e.g., export EDITOR=nvr --servername SERVER_NAME --remote-tab-wait +'setl bh=delete')
Open Neovim
Start a terminal session within Neovim (:terminal)
Run OpenCode in the terminal
Attempt to use the /editor command
Observe that nothing happens and no error is reported
Workaround:
Spawn a neovim instance inside the existing one.
EDIT: Upon executing opencode with the --print-logs flags, I managed to see an error entry in the logs but it is obfuscated.
@vinicius507 i found the issue to be caused by +'setl bh=delete'. The ' quotes get lost when the command is executed which causes nvr to error out and opencode can't handle it correctly.
The way i solved it was defining a seperate command that sets the bufhidden option so that you don't need a space and quotes with the nvr command.
@brianhuster i like your plugin as an alternative. My tip is using it with $EDITOR="nvim --headless" for opencode.
Activity
brianhuster commentedon Aug 25, 2025
I don't know why
nvrdoesn't work with OpenCode, but you can try using my plugin unnest.nvim, which just works with OpenCode/editorHippo0o commentedon Sep 2, 2025
@vinicius507 i found the issue to be caused by
+'setl bh=delete'. The'quotes get lost when the command is executed which causes nvr to error out and opencode can't handle it correctly.The way i solved it was defining a seperate command that sets the bufhidden option so that you don't need a space and quotes with the nvr command.
@brianhuster i like your plugin as an alternative. My tip is using it with
$EDITOR="nvim --headless"for opencode.rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!