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
neovim nvim embedded terminal support request #445
I encountered the same issue, but not as severe.
When trying to run opencode in floating terminal (toggleterm.nvim), the layout seems to be shifted up a bit:
After some investication and comparison with lazygit (which works correctly), it seems that the bottom bar is overflowing because opencode read the width of the current app, not the terminal itself.
It's affected by this bug, unless I'm missing some way to work around it.
Related, it'd be helpful to expose a --theme CLI option so I can default to 'system' in the plugin rather than instruct users to manually modify their opencode config 😀
Reacted by Adam, Derrek, Umut Topuzoğlu, John Mutuma and zien
It's affected by this bug, unless I'm missing some way to work around it.
Related, it'd be helpful to expose a --theme CLI option so I can default to 'system' in the plugin rather than instruct users to manually modify their opencode config 😀
will add this flag
Reacted by Nick van Dyke, Tobias S, Derrek, Christian Kreiling, Joshua Dorenkamp and Walter
I just migrated https://github.com/NickvanDyke/opencode.nvim to call opencode's server API rather than send text to the necessarily embedded TUI, so --theme is now much lower priority from my perspective 🙂
@NickvanDyke thanks for responding. I see. I guess this is a result of fundamental design/architecture decisions with regard to the TUI.
I was comparing it to Claude Code, which appears to just output to stdout in the terminal, sequentially appending. Whereas Opencode is rendering "fullscreen" and scrolling has to be accomplished through opencode, by sending keybindings that do not conflict with the environment, whether that is the parent terminal itself, or in this case neovim. Is this an accurate assessment?
This is somewhat disappointing to me, because the primary reason I use embedded terminal buffers in neovim is so that I can hit escape to switch to normal mode, and navigate terminal output the same way I navigate normal buffer contents, with all the same keybindings I am accustomed to in neovim, e.g. gg to go to start of session, G to go to bottom, navigating to specific lines, marks, etc.
I wonder if this is something worth accommodating for in opencode? Or am I just ignorant of the justifications for these choices?
Maybe offer some sort of configuration layout option, that is either "fullscreen" (current layout) or "append" (more like Claude Code, in that output is just appended to stdout)?
That could be one way to address/workaround this issue, as well as a whole class of other TUI layout bugs...
Reacted by Nick van Dyke, Nikhil Maddirala, 汐, Marc Ferradou, Pavlo Fesenko, Alexandre, Mateus Ito, Derrek, Mikkel Svartveit, madsr2d2 and 6 more
Reacted by Derrek, Mikkel Svartveit, Gennaro Tedesco and Rom888
This is somewhat disappointing to me, because the primary reason I use embedded terminal buffers in neovim is so that I can hit escape to switch to normal mode, and navigate terminal output the same way I navigate normal buffer contents, with all the same keybindings I am accustomed to in neovim, e.g. gg to go to start of session, G to go to bottom, navigating to specific lines, marks, etc.
I agree 💯
Reacted by Derrek, madsr2d2, Rom888 and Tobias Gårdhus
Seems like nvim terminal may not support passing through OSC 4 like tmux does. Only briefly looking through #3688; seems like nvim may need a similar PR to fix it unless I'm missing something.
Activity
Hippo0o commentedon Jun 30, 2025
setting the theme to
systemseems to fix this issue for me.kbnopro commentedon Jul 7, 2025
I encountered the same issue, but not as severe.
When trying to run opencode in floating terminal (toggleterm.nvim), the layout seems to be shifted up a bit:
After some investication and comparison with lazygit (which works correctly), it seems that the bottom bar is overflowing because opencode read the width of the current app, not the terminal itself.
nickjvandyke commentedon Jul 14, 2025
Initially this didn't work for me, but after upgrading to
v0.3.5, it looks correct so far! Other themes still get messy but not a big deal.adamdotdevin commentedon Jul 14, 2025
i think someone was working on an opencode.nvim plugin, too, which will be another solution
nickjvandyke commentedon Jul 14, 2025
@adamdotdevin that might be me haha https://github.com/NickvanDyke/opencode.nvim
It's affected by this bug, unless I'm missing some way to work around it.
Related, it'd be helpful to expose a
--themeCLI option so I can default to 'system' in the plugin rather than instruct users to manually modify their opencode config 😀adamdotdevin commentedon Jul 14, 2025
will add this flag
kbnopro commentedon Jul 15, 2025
Just want to let you guys know the new version
0.3.5is now working for me when setting theme tosystemnickjvandyke commentedon Jul 15, 2025
oops, I just noticed there is also https://github.com/sudo-tee/opencode.nvim - did not mean to steal any thunder 😀
It seems to work around this limitation by making its own UI over
opencode rungeekmdtravis commentedon Jul 15, 2025
I was having the same issue. Using
ghostty, on macOS, with Neovim running the TokyoNight theme.I can confirm that the problem resolves by setting the theme to system, which is a reasonable workaround for now.
nickjvandyke commentedon Jul 22, 2025
I just migrated https://github.com/NickvanDyke/opencode.nvim to call opencode's server API rather than send text to the necessarily embedded TUI, so
--themeis now much lower priority from my perspective 🙂robcmills commentedon Jul 23, 2025
Update:
Thanks to Hippo0o for suggesting switching to
systemtheme which did improve things for me.However, it appears I am unable to scroll back/up to see the full session output?
Maybe this is a personal config issue? Any ideas?
nickjvandyke commentedon Jul 23, 2025
@robcmills it looks like you're in Normal mode - you have to be in Terminal mode (Insert mode, essentially) to send inputs like scrolling to the TUI
robcmills commentedon Jul 23, 2025
@NickvanDyke thanks for responding. I see. I guess this is a result of fundamental design/architecture decisions with regard to the TUI.
I was comparing it to Claude Code, which appears to just output to stdout in the terminal, sequentially appending. Whereas Opencode is rendering "fullscreen" and scrolling has to be accomplished through opencode, by sending keybindings that do not conflict with the environment, whether that is the parent terminal itself, or in this case neovim. Is this an accurate assessment?
This is somewhat disappointing to me, because the primary reason I use embedded terminal buffers in neovim is so that I can hit escape to switch to normal mode, and navigate terminal output the same way I navigate normal buffer contents, with all the same keybindings I am accustomed to in neovim, e.g.
ggto go to start of session,Gto go to bottom, navigating to specific lines, marks, etc.I wonder if this is something worth accommodating for in opencode? Or am I just ignorant of the justifications for these choices?
Maybe offer some sort of configuration layout option, that is either "fullscreen" (current layout) or "append" (more like Claude Code, in that output is just appended to stdout)?
That could be one way to address/workaround this issue, as well as a whole class of other TUI layout bugs...
blaadje commentedon Aug 26, 2025
I agree 💯
blaadje commentedon Sep 10, 2025
@adamdotdevin (sorry to ping), any thought on that ☝️ ?
uloco commentedon Sep 11, 2025
I also cannot use shift+enter for linebreaks in the embedded terminal. Does anybody else have this issue?
Hippo0o commentedon Sep 11, 2025
@uloco i had the same issue. I solved it by binding:
tnoremap <S-CR> <M-CR>/vim.keymap.set("t", "<S-CR>", "<M-CR>")and bindingalt+enterin opencode.Depending on your terminal you might have to make S-CR work in vim/neovim first tho.
In alacritty i needed:
hope it helps.
Muizzyranking commentedon Nov 2, 2025
I just installed opencode and the system theme does not come installed, do i have to install it separately??
rekram1-node commentedon Nov 2, 2025
@Muizzyranking #3688 we are gonna fix that, we just shipped v1 and it has some behavior changes
garrett-hopper commentedon Nov 9, 2025
Seems like nvim terminal may not support passing through OSC 4 like tmux does. Only briefly looking through #3688; seems like nvim may need a similar PR to fix it unless I'm missing something.
uloco commentedon Jan 28, 2026
would be really cool to be able to scroll by just going to normal mode and
<c-u>/<c-d>and also visual select then etc.github-actions commentedon Mar 30, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
Merge pull request anomalyco#445 from different-ai/task/ci-sidecars