nvim: Diff against branch
This commit is contained in:
@@ -43,6 +43,17 @@ return {
|
||||
gs.diffthis("~")
|
||||
end, "Diff this ~")
|
||||
|
||||
map("n", "<leader>hc", function()
|
||||
Snacks.picker.git_branches({
|
||||
confirm = function(picker, item)
|
||||
picker:close()
|
||||
if item and item.branch then
|
||||
gs.diffthis(item.branch)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end, "Diff against branch")
|
||||
|
||||
-- Text object
|
||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Gitsigns select hunk")
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user