Add a config option for which side panel is focused on startup - #5878
Open
alcroito wants to merge 2 commits into
Open
Add a config option for which side panel is focused on startup#5878alcroito wants to merge 2 commits into
alcroito wants to merge 2 commits into
Conversation
The status context is a plain types.Context rather than a list context, so it can't be returned as an IListContext. Widening the return type lets a later change resolve the initial context from any side panel name. The only caller assigns it to a types.Context and does its own IListContext assertion where it needs one.
Add a new option that allows the user to choose which side panel is focused when lazygit starts or when switching repositories. The new option takes the same values as the gui.sidePanels setting. The default "files" value is kept when the option is not set. Setting a hidden panel as the value is rejected at config validation time. Passing a path filter or a git subcommand still overrides the option. Closes: jesseduffield#5877
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.
PR Description
Adds a new option that allows the user to choose which side panel is
focused when lazygit starts or when switching repositories.
The new option takes the same values as the gui.sidePanels setting.
The default "files" value is kept when the option is not set.
Setting a hidden panel as the value is rejected at config validation
time.
Passing a path filter or a git subcommand still overrides the option.
Full disclosure, I wrote this using AI, but I tested that it works locally.
Closes: #5877
Please check if the PR fulfills these requirements
go generate ./...)