feat(config)!: split panel visibility for diff and file history views#165
Merged
dlyongemallo merged 1 commit intomainfrom May 7, 2026
Merged
feat(config)!: split panel visibility for diff and file history views#165dlyongemallo merged 1 commit intomainfrom
dlyongemallo merged 1 commit intomainfrom
Conversation
Add `file_history_panel.show` (default `true`) so `:DiffviewOpen` and `:DiffviewFileHistory` can be configured independently. Previously both views shared `file_panel.show`.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new configuration option, file_history_panel.show (default true), so the default panel visibility can be configured independently for :DiffviewOpen (diff view) and :DiffviewFileHistory (file history view), addressing #162.
Changes:
- Add
StandardView:should_show_panel()and use it during layout init to decide whether the panel opens by default. - Override
should_show_panel()inFileHistoryViewto readfile_history_panel.show. - Add functional tests and update help docs/defaults to document the new config key.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lua/diffview/tests/functional/standard_view_spec.lua | Adds coverage asserting diff views use file_panel.show and file history uses file_history_panel.show. |
| lua/diffview/scene/views/standard/standard_view.lua | Centralizes “open panel on init?” behind should_show_panel(). |
| lua/diffview/scene/views/file_history/file_history_view.lua | Overrides should_show_panel() to consult file_history_panel.show. |
| lua/diffview/config.lua | Adds file_history_panel.show to config types and defaults. |
| doc/diffview.txt | Documents file_history_panel.show. |
| doc/diffview_defaults.txt | Includes file_history_panel.show in the rendered default config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Add
file_history_panel.show(defaulttrue) so:DiffviewOpenand:DiffviewFileHistorycan be configured independently. Previously both views sharedfile_panel.show.Fixes #162.