opencode.nvim requires the V1 CLI (--port was removed in v2). Use the
pinned V1 binary at ~/.opencode/bin/opencode explicitly for both the
server spawn (ai.lua) and the <leader>at toggle (keymaps.lua), so the
interactive shell keeps resolving 'opencode' (v2) from its normal PATH.
Scope OPENCODE_DISABLE_AUTOUPDATE=1 to the spawned V1 process via
snacks.terminal env (jobstart merges env over the parent environment) so
the pinned binary cannot replace itself with v2, without freezing the
terminal's v2 updates.
opencode.nvim drives the HTTP API that `opencode --port` exposes, but the
installed OpenCode v2.0.11 CLI removed the --port flag and replaced the server
API (pairing auth, new endpoints). opencode.nvim does not support v2 yet
(upstream issue nickjvandyke/opencode.nvim#322), so:
- Bump opencode.nvim to v1.0.2 (latest V1-compatible release)
- Migrate to its current API: snacks `opencode_send` picker action now uses
format()/prompt() (snacks_picker_send was removed in v0.12.0), drop the
opencode.terminal on_win hook and the removed server.stop/server.toggle and
lsp opts
- Move <leader>at toggling to snacks.terminal.toggle (opencode.toggle() was
removed in v1.0.2)
- Fix the session.half.page.up typo (sesion -> session) in the scroll-up keymap
- Document the V1 CLI requirement and pin instructions in the README