nixos-configs/homeManagerModules/neovim/git/default.nix
matt1432 054964fd66
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(nvim): clean up directory structure
2024-12-21 21:49:59 -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();
'';
}
];
}