feat(git): replace vim-fugitive with custom git module

This commit is contained in:
2026-04-27 12:41:38 +02:00
parent 5a3e39574d
commit f55d7ac11d
13 changed files with 837 additions and 145 deletions
+13
View File
@@ -0,0 +1,13 @@
local cr = vim.api.nvim_replace_termcodes("<CR>", true, false, true)
vim.keymap.set("n", "<CR>", function()
local worktree = vim.b.git_worktree
local sha = worktree
and vim.api.nvim_get_current_line():match("(%x%x%x%x%x%x%x+)")
if sha then
require("git.show").open_commit(worktree, sha)
else
-- "n" mode = no remap, so this doesn't recurse into our mapping.
vim.api.nvim_feedkeys(cr, "n", false)
end
end, { buffer = 0, silent = true, desc = "Open commit" })