Skip to content

[FEATURE] Toggle between split and float when using Snacks #225

@3dyuval

Description

@3dyuval

Feature Description

More often then note, UI preferences change over time. You start with float, then change to side. Why not have both?

Proposed Solution

Add ClaudeCodeTogglePosition to say what the title says

If you have ideas about how to implement the feature, share them here.
Add a reposition method to lua/claudecode/terminal/snacks.lua that hides the window, then reopens the existing buffer in a new snacks win with different position opts.

Additional Context

The Good is closing just the window (close({ buf = false })) and reopening it with a new Snacks.win that reuses the existing buffer

This is snacks-only - the reposition path in Native/external providers are not affected.

This is snacks only thing.

Alternatives Considered

The naive approach of mutating snacks_win_opts and calling terminal.setup() again doesn't work (snacks caches the terminal instance), so position changes only on fresh terminal. Calling terminal:update() only works for repositioning within the same window type (float → float via nvim_win_set_config), not for switching between float and split

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions