Skip to content

refactor(config): pull out shared default keymaps#55

Merged
dlyongemallo merged 1 commit intomainfrom
pull_out_shared_default_keymaps
Mar 28, 2026
Merged

refactor(config): pull out shared default keymaps#55
dlyongemallo merged 1 commit intomainfrom
pull_out_shared_default_keymaps

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 11:07
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 refactors diffview.config’s default keymap definitions by extracting shared mappings into common tables and composing per-section keymap lists from those shared defaults. It also adds functional tests to ensure shared and section-specific mappings are present (and don’t leak across sections).

Changes:

  • Added common_nav_keymaps and common_panel_keymaps and used a composition helper to build view, file_panel, and file_history_panel defaults.
  • Updated view defaults to include actions.compat.fold_cmds via composition rather than unpack().
  • Added functional tests validating shared/section-specific keymaps distribution across sections.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lua/diffview/config.lua Extracts shared default keymaps into common lists and composes section keymaps from them.
lua/diffview/tests/functional/config_spec.lua Adds functional tests asserting shared keymaps exist in expected sections and section-only mappings don’t leak.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/config.lua Outdated
Comment thread lua/diffview/tests/functional/config_spec.lua Outdated
@dlyongemallo dlyongemallo force-pushed the pull_out_shared_default_keymaps branch from 0627437 to 4349f2b Compare March 25, 2026 09:32
@dlyongemallo dlyongemallo merged commit 873a00d into main Mar 28, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the pull_out_shared_default_keymaps branch April 8, 2026 01:30
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.

2 participants