Skip to content

feat(view): add :DiffviewDiffFiles command#65

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

feat(view): add :DiffviewDiffFiles command#65
dlyongemallo merged 1 commit intomainfrom
add_diff_files

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 07:22
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

Adds support for opening a Diffview tab that compares two arbitrary files on disk (not tied to a VCS repo) via a new :DiffviewDiffFiles user command.

Changes:

  • Register :DiffviewDiffFiles command + completion, and route it through diffview.diff_files().
  • Introduce a NullAdapter/NullRev VCS adapter implementation and a FileDiffView specialized view for comparing two local file paths.
  • Add functional tests and update docs/README/TIPS to document the new command.

Reviewed changes

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

Show a summary per file
File Description
plugin/diffview.lua Registers the new :DiffviewDiffFiles user command.
lua/diffview/init.lua Adds diff_files() entrypoint + command-line completion handler.
lua/diffview/lib.lua Implements lib.diffview_diff_files() that validates paths and constructs a FileDiffView.
lua/diffview/scene/views/diff/file_diff_view.lua New view type that populates a single file entry comparing two local files.
lua/diffview/vcs/adapters/null/init.lua Adds a “null” adapter used for non-repo diffs.
lua/diffview/vcs/adapters/null/rev.lua Adds a corresponding NullRev implementation.
lua/diffview/tests/functional/null_adapter_spec.lua Functional coverage for NullAdapter / NullRev.
lua/diffview/tests/functional/file_diff_view_spec.lua Functional coverage for FileDiffView + lib.diffview_diff_files().
doc/diffview.txt Documents :DiffviewDiffFiles.
TIPS.md Adds a usage tip and shell function example.
README.md Mentions the new command in usage and lazy-loading examples.

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

Comment thread plugin/diffview.lua Outdated
Comment thread lua/diffview/vcs/adapters/null/init.lua Outdated
Comment thread lua/diffview/scene/views/diff/file_diff_view.lua Outdated
@dlyongemallo dlyongemallo merged commit c041156 into main Mar 28, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the add_diff_files branch March 28, 2026 08:33
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