nixos-configs/common/home/neovim/plugins/gitsigns.lua

14 lines
288 B
Lua
Raw Normal View History

2023-10-30 20:24:47 -04:00
local gitsigns = require("gitsigns")
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 })
end
2023-11-23 01:15:32 -05:00
vim.keymap.set("v", "gs", function()
2023-10-30 20:24:47 -04:00
visual_stage()
end)
gitsigns.setup();