Skip to content

feat(config)!: split panel visibility for diff and file history views#165

Merged
dlyongemallo merged 1 commit intomainfrom
panel_visibility
May 7, 2026
Merged

feat(config)!: split panel visibility for diff and file history views#165
dlyongemallo merged 1 commit intomainfrom
panel_visibility

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

Add file_history_panel.show (default true) so :DiffviewOpen and :DiffviewFileHistory can be configured independently. Previously both views shared file_panel.show.

Fixes #162.

Add `file_history_panel.show` (default `true`) so `:DiffviewOpen` and
`:DiffviewFileHistory` can be configured independently. Previously both
views shared `file_panel.show`.
Copilot AI review requested due to automatic review settings May 7, 2026 18:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() in FileHistoryView to read file_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.

Comment thread lua/diffview/config.lua
@dlyongemallo dlyongemallo merged commit 269e3dc into main May 7, 2026
11 checks passed
@dlyongemallo dlyongemallo deleted the panel_visibility branch May 7, 2026 18:44
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.

[Feature] Allow configuring default panel visibility separately for diff views and file history views

2 participants