Skip to content

use diffview.nvim public API instead of internal modules#1941

Open
dlyongemallo wants to merge 2 commits intoNeogitOrg:masterfrom
dlyongemallo:fix_diffview_api_calls
Open

use diffview.nvim public API instead of internal modules#1941
dlyongemallo wants to merge 2 commits intoNeogitOrg:masterfrom
dlyongemallo:fix_diffview_api_calls

Conversation

@dlyongemallo
Copy link
Copy Markdown

Neogit currently accesses diffview.nvim internal implementation details, which leads to bugs when the code changes, such as happened in dlyongemallo/diffview.nvim#93.

This changes fixes the problem by using diffview.nvim through the public API. Requires v0.30 or higher of the maintained fork of diffview.nvim (so PR #1939 is a pre-requisite).

Copilot AI review requested due to automatic review settings April 9, 2026 12:17
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

Updates Neogit’s diffview integration to avoid relying on diffview.nvim internals by switching to the maintained fork and using the fork’s exposed APIs for opening diff views.

Changes:

  • Switch dependency references (docs, CI, specs, issue template) from sindrets/diffview.nvim to dlyongemallo/diffview.nvim.
  • Refactor the diffview integration to use require("diffview").open(...) for most cases and replace the previous staged-files callback wiring with a User autocmd.

Reviewed changes

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

Show a summary per file
File Description
spec/support/dependencies.rb Updates the spec dependency to the maintained diffview fork.
README.md Updates installation/config docs to reference the maintained diffview fork.
lua/neogit/integrations/diffview.lua Refactors integration to open diffview via the public entrypoint and changes refresh wiring.
doc/neogit.txt Updates help docs to reference the maintained diffview fork.
.github/workflows/test.yml Updates CI to clone the maintained diffview fork.
.github/ISSUE_TEMPLATE/bug_report.yml Updates bug report template dependency URL to the maintained diffview fork.

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

Comment thread lua/neogit/integrations/diffview.lua Outdated
Comment thread lua/neogit/integrations/diffview.lua Outdated
Comment thread README.md Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread doc/neogit.txt Outdated
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

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


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

Comment thread lua/neogit/integrations/diffview.lua
Comment thread lua/neogit/integrations/diffview.lua Outdated
Comment thread lua/neogit/integrations/diffview.lua Outdated
Comment thread spec/support/dependencies.rb Outdated
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


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

Comment thread lua/neogit/integrations/diffview.lua
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


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

Comment thread lua/neogit/integrations/diffview.lua Outdated
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


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

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