Skip to content

Show HN: Unified.nvim – A Neovim plugin for inline Git diffs

github.com/axkirillov
3 pointsaxkdevdiscuss
On HN

Hi HN,

I was looking for a way to view diff in a unified/github style in neovim and didn't find any satisfying solution. There are a couple of plugins that partially address like vgit.nvim, but all of them lacked some of the things I need, so I built unified.nvim.

The functionality is very basic. You just call :Unified command with a commit reference as first argument (for ex. HEAD). A tree window opens on the left listing all of the changed files and navigating the tree opens that file automatically in a buffer. It's just a normal buffer with highlights + virtual lines. You can modify it and the diff will update accordingly, also your normal LSP go to definition etc. will work, similarly to diffview. In fact I took a lot of inspiration (but no code) from diffview and it's UI. The reason why this woulld not work as a feature in diffview, is because diffview relies on build in neovim diffing.

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.