Skip to content

feat(explorer): support position = "right"#336

Closed
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
AJamesyD:fix/layout-right-panel
Closed

feat(explorer): support position = "right"#336
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
AJamesyD:fix/layout-right-panel

Conversation

@AJamesyD
Copy link

@AJamesyD AJamesyD commented Mar 19, 2026

Hey! I wanted to put my explorer panel on the right side. The config docs say "left" or "bottom", but I noticed split.lua already handles "right" in its position map and does the right width/height logic for it, so I figured it was worth a shot.

It mostly works! The panel opens on the right side correctly. The only issue is in layout.lua: arrange() checks panel_position == "left" before calling set_width, so "right" falls through to set_height instead. This breaks the layout pretty badly with cmdheight=0 (noice.nvim in my case).

The fix just adds "right" to the three width checks in arrange(), matching what split.lua already does. I also updated the config comments to document that "right" is a valid option for both explorer and history panels.

Happy to adjust anything if you'd prefer a different approach. Thanks for the great plugin!

(AI tooling helped me trace the layout issue. Fix verified manually.)

split.lua already maps "right" correctly and handles width vs height
for it. layout.lua was the one gap: arrange() only checked for "left"
before calling set_width, so "right" fell through to set_height.

Adds "right" to the width checks in arrange() (3 sites) and updates
the config comments to document the option.
@AJamesyD AJamesyD force-pushed the fix/layout-right-panel branch from b2ea0a5 to f180d25 Compare March 19, 2026 13:30
@AJamesyD AJamesyD changed the title fix(layout): use set_width for right-positioned panels feat(explorer): support position = "right" Mar 19, 2026
@AJamesyD AJamesyD closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant