2024-08-31 19:16:06 -04:00
|
|
|
{pkgs, ...}: {
|
2024-05-08 20:26:57 -04:00
|
|
|
programs = {
|
|
|
|
neovim = {
|
|
|
|
plugins = [
|
2024-08-31 19:16:06 -04:00
|
|
|
pkgs.vimPlugins.fugitive
|
2024-05-08 20:26:57 -04:00
|
|
|
|
|
|
|
{
|
2024-08-31 19:16:06 -04:00
|
|
|
plugin = pkgs.vimPlugins.gitsigns-nvim;
|
2024-05-08 20:26:57 -04:00
|
|
|
type = "lua";
|
|
|
|
config =
|
2024-06-09 22:49:30 -04:00
|
|
|
# lua
|
2024-05-08 20:26:57 -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
|
|
|
|
|
|
|
|
vim.keymap.set("v", "gs", function()
|
|
|
|
visual_stage()
|
|
|
|
end);
|
|
|
|
|
|
|
|
gitsigns.setup();
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|