Git Product home page Git Product logo

git-blame.nvim's Introduction

git-blame.nvim

This project has been archived. Use f-person/git-blame.nvim instead. All major features are supported. The only unsupported feature is prefix and left_padding, but they can be made with vim.g.gitblame_message_template

Neovim plugin to show git blame on the current line using virtual text. Not the first, not the last. I suggest you don't use this repo. Here's some alternatives:

If you really want to use it, here's some docs:

Warning: Using this plugin on large files can result in NeoVim freezing.

Usage

require("git-blame").setup({
  -- Pass your options here - or don't
})

If config.enable_on_move is set to true, then autocomands will be created to show the blame on cursor move, otherwise, manage it yourself using gitblame.blame() (show the blame) and gitblame.clear() (remove the blame)

Options and defaults:

  -- Passed to git --pretty=format
  blame_format = "%an | %ar | %s",
  -- Highlight group for the output virtual text
  hl_group = "GitBlame",
  -- Highlight to apply to the output virtual text
  hl = { link = "Comment" },
  -- Whether to update on cursor move
  enable_on_move = true,
  -- String to show before the blame
  prefix = "",
  -- How many spaces to place before the blame
  left_padding = 1,
  -- Message to display if the line hasn't been committed yet
  default_message = "No commit",
  -- Whether to enable when setup called. Can be disabled
  -- with :GitBlameDisable
  enabled = true,

Commands

  • :GitBlameDisable
  • :GitBlameEnable
  • :GitBlameToggle

Thanks:

Todo (if I have time):

  • gitblame_delay option, defaults to 500. This should help with flickering.
  • ft_ignore option, array of file type to disable on. default to something reasonable (man, term, etc).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.