Closed aleprovencio closed 2 years ago
@lewis6991 is this code working for you?
On my side I had to do something like (for nvim
0.6):
map('v', '<leader>hs', '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>')
map('v', '<leader>hr', '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>')
Yes, that appears to work for me.
Description
The visual mode versions of
stage_hunk
andreset_hunk
commands should have ranges as arguments, otherwise they won't work.Neovim version
0.6.1
Operating system and version
Archlinux
Steps to reproduce
nvim -nu minimal.lua
Expected behavior
Only the selected range should be staged
Actual behavior
Whole hunk is staged
Gitsigns debug messages
No response
Minimal config