Annotate your code like PyCharm/IntelliJ — in Neovim.
Opens a sidebar showing git blame info with time-based gradient coloring: warm orange for recent commits, cold gray-blue for older ones — so you can spot recent changes at a glance.
中文文档:README_ZH.md
Using lazy.nvim:
{
"shenyfg/git-annotate.nvim",
config = function()
vim.keymap.set("n", "<leader>gb", require("git_annotate").annotate, { desc = "Git Annotate" })
end,
}Run :lua require("git_annotate").annotate() or use your keymap to toggle the sidebar on the left of the current file.
| Key | Description |
|---|---|
q / <Esc> |
Close the sidebar |
s |
Open git show for the commit under cursor in a vsplit |
d |
Show diff in Snacks picker (working tree diff for uncommitted lines) |
]] |
Jump to the start of the next commit block |
[[ |
Jump to the start of the previous commit block |
]c |
Jump to the next occurrence of the same commit in the file |
[c |
Jump to the previous occurrence of the same commit in the file |
drequires snacks.nvim. Usesif it's not installed.
- Neovim 0.10+
- Git available in
$PATH - snacks.nvim (optional, only for
d)