whatisgithub

What is gitsigns.nvim?

lewis6991/gitsigns.nvim — explained in plain English

Analysis updated 2026-06-24

6,819LuaAudience · developerComplexity · 2/5LicenseSetup · moderate

In one sentence

A Neovim plugin that shows which lines were added, changed, or deleted compared to the last Git commit, and lets you stage, reset, or preview individual change blocks without leaving the editor.

Mindmap

mindmap
  root((repo))
    Gutter Signs
      Added Lines
      Changed Lines
      Deleted Lines
    Hunk Actions
      Stage Hunk
      Reset Hunk
      Preview Hunk
    Blame
      Line Blame Popup
      Inline Blame
    Status Line
      Change Counts
    Quickfix
      Repo Changes List
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

See Git change indicators in the left gutter while editing code in Neovim.

USE CASE 2

Stage or reset individual hunks of changes without switching to a terminal.

USE CASE 3

Display inline or popup blame information to see who last changed a line and when.

USE CASE 4

Show a count of added, changed, and deleted lines in the Neovim status bar.

What is it built with?

LuaNeovimGit

How does it compare?

lewis6991/gitsigns.nvimfolke/trouble.nvimawesomewm/awesome
Stars6,8196,7836,882
LanguageLuaLuaLua
Setup difficultymoderatemoderatemoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Neovim 0.9.0 or later, installed via a Neovim plugin manager such as lazy.nvim.

MIT license, use freely for any purpose including commercial, as long as you keep the copyright notice.

So what is it?

Gitsigns.nvim is a plugin for Neovim, a text editor used by programmers, that shows Git change information directly inside the editor while you work on code. Git is the version control system that tracks changes to files over time. This plugin reads the Git history of whatever file you have open and displays small indicators in a column on the left side of the screen showing which lines were added, changed, or deleted compared to the last committed version. Beyond those visual indicators, the plugin lets you act on individual hunks, which are contiguous blocks of changes within a file. You can stage a hunk (mark it to be included in the next commit), reset it back to the last committed state, or preview what changed in a small popup window, all without leaving the editor. These actions also work on selections within a hunk, so you can stage only part of the changed block. The blame feature shows who last changed each line and when. It can display this information in a popup for a single line or show it inline at the end of every line as you move through a file. This is useful when you need to understand the history of a specific piece of code without switching to a terminal. The plugin also integrates with Neovim's status line so you can show a count of added, changed, and deleted lines in your editor's footer. It can open a quickfix list of all changes across the whole repository, making it easy to jump between modified locations. Installation uses whichever Neovim plugin manager you already have. No setup is required to get the basic indicators working, configuration is optional and done through a Lua setup call. The plugin requires Neovim version 0.9.0 or later and a reasonably recent version of Git. It is MIT licensed.

Copy-paste prompts

Prompt 1
I use Neovim and want to set up gitsigns.nvim. Show me the minimal Lua config to enable it with lazy.nvim, including keymaps for staging and resetting hunks.
Prompt 2
How do I configure gitsigns.nvim to show inline git blame on every line as I move my cursor, and how do I toggle it on and off?
Prompt 3
I want to add a gitsigns.nvim summary of added and deleted lines to my lualine status bar. Show me the exact lualine component configuration.
Prompt 4
Explain the difference between staging a hunk and staging a selection in gitsigns.nvim, and give me the keybindings for each.

Frequently asked questions

What is gitsigns.nvim?

A Neovim plugin that shows which lines were added, changed, or deleted compared to the last Git commit, and lets you stage, reset, or preview individual change blocks without leaving the editor.

What language is gitsigns.nvim written in?

Mainly Lua. The stack also includes Lua, Neovim, Git.

What license does gitsigns.nvim use?

MIT license, use freely for any purpose including commercial, as long as you keep the copyright notice.

How hard is gitsigns.nvim to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is gitsigns.nvim for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.