feat(explorer): support position = "right"#336
Closed
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
Closed
feat(explorer): support position = "right"#336AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
Conversation
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.
b2ea0a5 to
f180d25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! I wanted to put my explorer panel on the right side. The config docs say "left" or "bottom", but I noticed
split.luaalready 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()checkspanel_position == "left"before callingset_width, so"right"falls through toset_heightinstead. This breaks the layout pretty badly withcmdheight=0(noice.nvim in my case).The fix just adds
"right"to the three width checks inarrange(), matching whatsplit.luaalready 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.)