Skip to content

Dynamic height (09bc7d4) breaks edgy.nvim compatibility and causes hang on quit #253

Closed

Description

@turanmahmudov

Commit 09bc7d4 makes opencode.nvim unusable when using edgy.nvim for window management. The cursor jumps to the beginning of the line on every character typed, making it impossible to write prompts.
Additionally, after this commit, Neovim hangs for some time on quit even when not using edgy.nvim at all.

I used this snippet to "fix" edgy.nvim issue for me:

config = function(_, opts)
  require('opencode').setup(opts)

  local input_window = require 'opencode.ui.input_window'
  input_window.schedule_resize = function() end
end,

But I am not sure about the reason of the hanging.

Activity

  1. disrupted commented on Feb 9, 2026

    @disrupted
    Contributor

    could you provide a minimal config and perhaps a short screen recording of the issue? I am not that familiar with edgy but I just installed it for testing and so far could not reproduce the behavior you're describing

  2. turanmahmudov commented on Feb 10, 2026

    @turanmahmudov
    Author

    Hey @disrupted
    Here's a minimal lazy config for edgy and opencode plugins:

    return {
      {
        'folke/edgy.nvim',
        event = 'VeryLazy',
        opts = {
          right = {
            {
              ft = 'opencode_output',
              size = { width = 60 },
              wo = {
                winbar = false,
                winhighlight = 'Normal:OpencodeBackground',
              },
            },
            {
              ft = 'opencode',
              size = { height = 0.25 },
              wo = {
                winbar = false,
                winhighlight = 'Normal:OpencodeBackground',
              },
            },
          },
        },
      },
      {
        'sudo-tee/opencode.nvim',
        opts = {},
        dependencies = {
          'nvim-lua/plenary.nvim',
          {
            'MeanderingProgrammer/render-markdown.nvim',
            opts = {
              anti_conceal = { enabled = false },
              file_types = { 'markdown', 'opencode_output' },
            },
            ft = { 'markdown', 'Avante', 'copilot-chat', 'opencode_output' },
          },
          'hrsh7th/nvim-cmp',
          'ibhagwan/fzf-lua',
        },
      },
    }

    Please see in the screenshot, the text is reversed, because the cursors jumps to the beginning after each key press.

    Image
  3. disrupted commented on Feb 10, 2026

    @disrupted
    Contributor

    with your config I can reproduce the issue 👍🏻

  4. disrupted commented on Feb 10, 2026

    @disrupted
    Contributor

    @turanmahmudov could you give #260 a try?

    if you set equal values for min_height and max_height it sets a fixed height for the input window (completely disabling the dynamic size calculation). this should allow edgy to overwrite it without causing side-effects.

    {
      'sudo-tee/opencode.nvim',
      opts = {
        ui = {
          input = {
            min_height = 0.25,
            max_height = 0.25,
          }
       }
    }
  5. turanmahmudov commented on Feb 11, 2026

    @turanmahmudov
    Author

    @disrupted I have already tried this, makes no difference.

    {
      'sudo-tee/opencode.nvim',
      opts = {
        ui = {
          input = {
            min_height = 0.25,
            max_height = 0.25,
          }
       }
    }

    Edit: I think I misunderstood you. Now I am trying the PR #260

  6. turanmahmudov commented on Feb 11, 2026

    @turanmahmudov
    Author

    Huge thanks @disrupted. It worked with #260

  7. sudo-tee commented on Feb 11, 2026

    @sudo-tee
    Owner

    @disrupted thanks for looking at this. I will review your MR.

  8. disrupted commented on Feb 11, 2026

    @disrupted
    Contributor

    @turanmahmudov glad it's working for you! you got me adopting edgy for my setup too, it's pretty much what I needed all along 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions