How I Built a Git Log Diff Workflow Plugin for Neovim
Source: Dev.to
Overview
When I switched fully to Neovim a while back, I missed the Git integration that JetBrains IDEs (like RubyMine) provide—especially the Git log view I used daily to inspect recent commits and diffs. In RubyMine I’d often ask, “What changed in the last three commits?” and get an instant interactive history view.
Neovim doesn’t have this UI built‑in. While there are many Git plugins (e.g., gitsigns.nvim for inline signs or Neogit for full interfaces), none gave me the exact workflow I wanted: a compact “pick commits, then diff them” experience.
So I built gitlogdiff.nvim, a tiny Neovim plugin for listing recent Git commits and quickly seeing their diffs.
Features
- Simple commit list – sourced from
git log, showing your recent history. - Easy navigation – use
j/kto move through the list and select commits. - Instant diff view – pressing “ opens a diff (via
diffview.nvim) comparing the selected commits.
Usage
The workflow mirrors the Git log explorer from JetBrains, but stays inside Neovim:
- Open the plugin’s commit list.
- Navigate with
j/k. - Press “ on a commit to view its diff side‑by‑side with the previous commit.
Contributing
The plugin is on GitHub – here. Feel free to drop issues, share ideas, or submit pull requests! It’s designed to stay lightweight yet extensible.
Future Plans
I hope to add support for alternative diff viewers beyond diffview.nvim in future releases.
Happy vim‑ing! 🧑💻