An open API service indexing awesome lists of open source software.

https://github.com/ttys3/nvim-blamer.lua

use https://github.com/lewis6991/gitsigns.nvim instead
https://github.com/ttys3/nvim-blamer.lua

Last synced: 12 months ago
JSON representation

use https://github.com/lewis6991/gitsigns.nvim instead

Awesome Lists containing this project

README

          

# A git blame plugin for neovim inspired by VS Code's GitLens plugin

![nvim-blamer-lua](nvim-blamer-lua.png)

## requirement

neovim version: >= 0.5.0-dev ( or nightly version )

the `git` cli must exists in your system and in `PATH` env

## features

- configuable message format
- delay auto hide feature
- dynamic toggle

## usage

just install the plugin and it should works automatically.

for example, use [vim-plug](https://github.com/junegunn/vim-plug)

```vim
Plug 'ttys3/nvim-blamer.lua'

""" must after plugin loaded, for example,
""" if you are using vim-plug, this should put after `call plug#end()`
""" enable auto show blame info when cursor move
call nvimblamer#auto()

""" config the plugin
lua <

you can find your favorite emoji using

here are some emoji candicates:

`\uE702` 

`\uF1D2` 

`\uF1D3` 

`\uE80D` 

`\uF417` 

## availabe template vars

you can use `filename`, `hash`, `summary`, `committer`, `committer-mail`, `committer-tz`, `committer-time` and `committer-time-human`

```json
{
"filename": "lua/blamer.lua",
"hash": "db43ae622dbec1ba3fd8172c2d4fed1b2980c39c",
"hash-short": "db43ae6",
"summary": "fix: bypass ft list: rename LuaTree to NvimTree. do not show Not Committed Yet msg",

"committer": "荒野無燈",
"committer-mail": "",
"committer-tz": "+0800",
"committer-time": "1610563580",

"author": "荒野無燈",
"author-mail": "
",
"author-time": "1610563580",
"author-tz": "+0800",
}
```

## available commands

```vim
""" auto show blame info when cursor move
:NvimBlamerAuto

""" toggle blame info display
:NvimBlamerToggle
```

## credits

thanks for the unicode emoji from

the idea and the init code come from https://www.reddit.com/r/neovim/comments/f1vxhl/replicate_the_basic_functionality_vscodes_gitlens/
https://teukka.tech/vimtip-gitlens.html

## related works