Skip to content

Neovim plugin for displaying and exploring diffs in a pop-out floating window with side-by-side view

Notifications You must be signed in to change notification settings

JoshuaFurman/diffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffy.nvim

A Neovim plugin for displaying git diffs in a side-by-side floating window, similar to Gitsigns diffthis but with a more visual interface.

Features

  • Side-by-side diff display in floating windows
  • Synchronized scrolling between original and modified content
  • Syntax highlighting for the current file type
  • Easy to close with q, <Esc>, or <C-c>
  • Support for different diff targets (HEAD, staged, specific commits)

Installation

Using lazy.nvim:

{
  'JoshuaFurman/diffy',
  dependencies = { 'nvim-lua/plenary.nvim' },
  config = function()
    require('diffy').setup()
  end
}

Using packer.nvim:

use {
  'JoshuaFurman/diffy',
  requires = { 'nvim-lua/plenary.nvim' },
  config = function()
    require('diffy').setup()
  end
}

Usage

Commands

  • :Diffy - Show diff for current file against HEAD
  • :Diffy staged - Show diff for staged changes
  • :Diffy <commit> - Show diff for current file at specific commit

Key Mappings

When the diff window is open:

  • q - Close the diff window
  • <Esc> - Close the diff window
  • <C-c> - Close the diff window

Configuration

require('diffy').setup({
  width = 0.8,      -- Window width as fraction of screen
  height = 0.8,     -- Window height as fraction of screen
  border = 'rounded', -- Border style
  winblend = 10,    -- Window transparency
})

Requirements

Similar Projects

About

Neovim plugin for displaying and exploring diffs in a pop-out floating window with side-by-side view

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages