nixos-configs/homeManagerModules/neovim/git.nix
matt1432 11adcacd6f
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(nvim): move to homeManagerModules
2024-11-22 02:48:41 -05:00

27 lines
605 B
Nix

{pkgs, ...}: {
programs.neovim.plugins = [
pkgs.vimPlugins.fugitive
{
plugin = pkgs.vimPlugins.gitsigns-nvim;
type = "lua";
config =
# lua
''
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();
'';
}
];
}