Skip to content

bug: size (width) is not applied with zellij #215

@n-prat

Description

@n-prat

Did you check docs and existing issues?

  • I have read all the sidekick.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of sidekick.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.5 Build type: RelWithDebInfo LuaJIT 2.1.1764270282 Run "nvim -V1 -v" for more info

Operating system/version

Linux archvm 6.17.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 24 Nov 2025 15:21:09 +0000 x86_64 GNU/Linux

Describe the bug

I tried various ways to set mux.split.size with zellij backend but could not get it to work.

For now, after a bit of Claude, I went with this, which seems to work:

{
    'folke/sidekick.nvim',
    opts = {
      cli = {
        mux = {
          backend = 'zellij',
          enabled = true,
          split = {
            vertical = true,
            -- size = 0.3, -- default: 0.5 -- NOT WORKING with zellij
            -- size = 60, -- NOT WORKING either
          },
        },
        win = {
          layout = 'right',
          split = {
            width = 0, -- Set to 0 so the default logic ignores it initially
          },
          -- The Magic Hook
          config = function(terminal)
            -- terminal.opts is a deepcopy of Config.cli.win
            -- We can calculate the integer width here dynamically
            terminal.opts.split.width = math.floor(vim.o.columns * 0.40)
          end,
        },
      },
      -- NES = Next Edit Suggestions: requires Copilot
      nes = { enabled = false },
    },
  },

Steps To Reproduce

  1. (not sure if it has an impact) run Neovim inside Zellij session
  2. update/set mux.split.size
  3. quit or ctrl-c any active cli [double check with zellij list-sessions to make sure they are killed]
  4. restart nvim
  5. toggle a new cli

NOTE : my stack is Windowa host, running wezterm, which itself use SSHMUX to connect to a Linux guest VM, which is running zellij as a multiplexer. Inside which I start nvim

Expected Behavior

The size should be set based on the config value.

Repro

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