use diffview.nvim public API instead of internal modules#1941
use diffview.nvim public API instead of internal modules#1941dlyongemallo wants to merge 2 commits intoNeogitOrg:masterfrom
diffview.nvim public API instead of internal modules#1941Conversation
There was a problem hiding this comment.
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.nvimtodlyongemallo/diffview.nvim. - Refactor the diffview integration to use
require("diffview").open(...)for most cases and replace the previous staged-files callback wiring with aUserautocmd.
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.
c6e6c1d to
1dd3fe2
Compare
There was a problem hiding this comment.
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.
1dd3fe2 to
4ed59a4
Compare
There was a problem hiding this comment.
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.
4ed59a4 to
98ea755
Compare
There was a problem hiding this comment.
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.
98ea755 to
1982deb
Compare
There was a problem hiding this comment.
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.
Neogit currently accesses
diffview.nviminternal 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.nvimthrough the public API. Requires v0.30 or higher of the maintained fork ofdiffview.nvim(so PR #1939 is a pre-requisite).