1
0
Fork 0

git diff stuff + minor keys improvements

This commit is contained in:
zymon 2024-08-28 21:40:10 +02:00
parent 6943e3efc3
commit 966e52643d
2 changed files with 16 additions and 1 deletions

View file

@ -155,6 +155,9 @@ return {
spec = {
{ "<leader>b", group = "buffer" },
{ "<leader>g", group = "git" },
{ "<leader>gr", group = "reset" },
{ "<leader>gs", group = "stage" },
{ "<leader>gt", group = "toggle" },
{ "<leader>t", group = "telescope" },
{ "<leader>u", group = "ui" },
},

View file

@ -34,7 +34,7 @@ return {
map("n", "<leader>gB", function() gitsigns.blame_line({ full = true }) end, "full blame!")
map("n", "<leader>gp", gitsigns.preview_hunk, "look at hunk")
map("n", "<leader>gS", ":Gitsigns select_hunk<CR>", "select hunk")
map("n", "<leader>gd", gitsigns.diffthis, "diff this")
map("n", "<leader>gdd", gitsigns.diffthis, "diff this")
map("n", "<leader>gsb", gitsigns.stage_buffer, "stage buffer")
map("n", "<leader>gsh", ":Gitsigns stage_hunk<CR>", "stage hunk (toggle)")
@ -58,6 +58,15 @@ return {
end,
},
},
{ -- diffview
"https://github.com/sindrets/diffview.nvim",
event = "BufReadPre",
keys = {
{ "<leader>gdo", "<CMD>DiffviewOpen<CR>", desc = "open diffview", },
{ "<leader>gdc", "<CMD>DiffviewClose<CR>", desc = "close diffview", },
}
},
{ -- neogit
"https://github.com/NeogitOrg/neogit",
event = "BufReadPre",
@ -66,6 +75,9 @@ return {
"https://github.com/sindrets/diffview.nvim",
"https://github.com/nvim-telescope/telescope.nvim",
},
keys = {
{ "<leader>gn", "<CMD>Neogit<CR>", desc = "Neogit", },
},
config = true
},
{ -- git-worktree