diff --git a/lua/znvim/plugins/editor.lua b/lua/znvim/plugins/editor.lua index e569065..d45699f 100644 --- a/lua/znvim/plugins/editor.lua +++ b/lua/znvim/plugins/editor.lua @@ -155,6 +155,9 @@ return { spec = { { "b", group = "buffer" }, { "g", group = "git" }, + { "gr", group = "reset" }, + { "gs", group = "stage" }, + { "gt", group = "toggle" }, { "t", group = "telescope" }, { "u", group = "ui" }, }, diff --git a/lua/znvim/plugins/git.lua b/lua/znvim/plugins/git.lua index 409c60a..86a2995 100644 --- a/lua/znvim/plugins/git.lua +++ b/lua/znvim/plugins/git.lua @@ -34,7 +34,7 @@ return { map("n", "gB", function() gitsigns.blame_line({ full = true }) end, "full blame!") map("n", "gp", gitsigns.preview_hunk, "look at hunk") map("n", "gS", ":Gitsigns select_hunk", "select hunk") - map("n", "gd", gitsigns.diffthis, "diff this") + map("n", "gdd", gitsigns.diffthis, "diff this") map("n", "gsb", gitsigns.stage_buffer, "stage buffer") map("n", "gsh", ":Gitsigns stage_hunk", "stage hunk (toggle)") @@ -58,6 +58,15 @@ return { end, }, }, + { -- diffview + "https://github.com/sindrets/diffview.nvim", + event = "BufReadPre", + keys = { + { "gdo", "DiffviewOpen", desc = "open diffview", }, + { "gdc", "DiffviewClose", 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 = { + { "gn", "Neogit", desc = "Neogit", }, + }, config = true }, { -- git-worktree