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.
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)
-- 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,
- :GitBlameDisable
- :GitBlameEnable
- :GitBlameToggle
- Initial git blame code: Taylor Thompson
- Initial view code: kessejones
- Inspiration: f-person
gitblame_delay
option, defaults to500
. This should help with flickering.ft_ignore
option, array of file type to disable on. default to something reasonable (man, term, etc).