Skip to content

bug: rendering issue when toggling opencode #192

@diegoulloao

Description

@diegoulloao

Did you check docs and existing issues?

  • I have read the plugin docs
  • I have read the opencode docs
  • I have searched the existing plugin issues
  • I have searched the existing opencode issues

:checkhealth opencode output

============================================================================== opencode: 2 ⚠️ opencode.nvim ~ - OS: Darwin 25.3.0 (arm64) - nvim version: 0.11.4. - opencode.nvim git commit hash: 68ad02666cf050a79ae16e1b3a4df2766e0c012f. - vim.g.opencode_opts: nil opencode.nvim [binaries] ~ - ✅ OK opencode available with version 1.2.15. - ✅ OK curl available. - ✅ OK pgrep available. - ✅ OK lsof available. opencode.nvim [snacks] ~ - ⚠️ WARNING snacks.input is disabled: ask() will not be enhanced. - ⚠️ WARNING snacks.picker is disabled: select() will not be enhanced.

Ignore the warnings about snack. I added the input and picker opts.

Describe the bug

The TUI is broken when toggling opencode.

Kitty.mp4
return {
  "nickjvandyke/opencode.nvim",
  version = "*", -- latest stable release
  dependencies = {
    {
      "folke/snacks.nvim",
      opts = {
        input = { enabled = true },
        picker = { enabled = true },
      },
    },
  },
  keys = {
    {
      "<leader>as",
      function()
        require("opencode").ask("@this: ", { submit = true })
      end,
      desc = "Ask opencode",
      mode = { "n", "x" },
    },
    {
      "<leader>at",
      function()
        require("opencode").toggle()
      end,
      desc = "Toggle opencode",
      mode = { "n", "t" },
    },
  },
}

Idk why this could be happening.
Very weird.

NVIM v0.11.4
Build type: Release
LuaJIT 2.1.1760617492
Run "nvim -V1 -v" for more info
Kitty Terminal
Version 0.45.0 (0.45.0)

Steps To Reproduce

  1. Init with minimal config
  2. Just toggle opencode

Expected Behavior

TUI shouldn't break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions