feat(git): add blame side window with synced scroll

This commit is contained in:
2026-05-26 15:35:11 +02:00
parent ebfa15c276
commit db0b2d2527
4 changed files with 309 additions and 0 deletions
+6
View File
@@ -322,6 +322,9 @@ vim.api.nvim_create_user_command("GitDiffOverlay", function()
require("git.hunks").toggle_overlay()
end, { desc = "Toggle the git diff overlay in the current buffer" })
vim.keymap.set("n", "<Plug>(git-blame-view)", function()
require("git.blame").toggle_view()
end, { silent = true, desc = "Toggle the git blame side window" })
vim.keymap.set("n", "<Plug>(git-blame-line)", function()
require("git.blame").toggle_inline()
end, { silent = true, desc = "Toggle inline git blame" })
@@ -341,6 +344,9 @@ end, {
desc = "Open this file at the parent of the line's commit",
})
vim.api.nvim_create_user_command("GitBlame", function()
require("git.blame").toggle_view()
end, { desc = "Toggle the git blame side window" })
vim.api.nvim_create_user_command("GitBlameLine", function()
require("git.blame").toggle_inline()
end, { desc = "Toggle inline git blame in the current buffer" })