fix(nvim): fix staging bind

This commit is contained in:
matt1432 2023-11-23 01:15:32 -05:00
parent 36e9b90df6
commit a461d39d81
3 changed files with 9 additions and 10 deletions
common/home/neovim/plugins

View file

@ -4,11 +4,9 @@ local function visual_stage()
local first_line = vim.fn.line('v')
local last_line = vim.fn.getpos('.')[2]
gitsigns.stage_hunk({ first_line, last_line })
-- Switch back to normal mode, there may be a cleaner way to do this
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 't', false)
end
vim.keymap.set("v", "gbhs", function()
vim.keymap.set("v", "gs", function()
visual_stage()
end)