From 77107c3d6bba970add4a756dc9fd430637c5c235 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 19 Nov 2025 17:02:14 +0900 Subject: modified plugins/git.lua, modified plugins/git.lua --- ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ar') diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua index 9c549d2..cc8b747 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua @@ -112,8 +112,10 @@ return { end, "Previous hunk") map("n", "]H", function() gs.nav_hunk("last") end, "Last hunk") map("n", "[H", function() gs.nav_hunk("first") end, "First hunk") - map({ "n", "v" }, "gs", ":Gitsigns stage_hunk", "Stage hunk") - map({ "n", "v" }, "gr", ":Gitsigns reset_hunk", "Reset hunk") + map("n", "gs", gs.stage_hunk, "Stage hunk") + map("v", "gs", function() gs.stage_hunk({ vim.fn.line('.'), vim.fn.line('v')}) end, "Stage hunk") + map("n", "gr", gs.reset_hunk, "Reset hunk") + map("v", "gr", function() gs.reset_hunk({ vim.fn.line('.'), vim.fn.line('v')}) end, "Reset hunk") map("n", "gS", gs.stage_buffer, "Stage buffer") map("n", "gu", gs.undo_stage_hunk, "Undo stage hunk") map("n", "gR", gs.reset_buffer, "Reset buffer") @@ -122,8 +124,7 @@ return { map("n", "gB", function() gs.blame() end, "Blame buffer") map("n", "gd", gs.diffthis, "Diff this") map("n", "gD", function() gs.diffthis("~") end, "Diff this ~") - -- map("n", "gD", function() gs.diffthis("@") end, "Diff this @") - map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns select hunk") + map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "Select hunk") map("n", "gtb", gs.toggle_current_line_blame, "Toggle line blame") map("n", "gtd", gs.toggle_deleted, "Toggle delete") end, -- cgit v1.2.3