nixos-configs/common/home/neovim/git.nix
matt1432 6753c39ccd
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(nvim): move stuff to lua, fix windows depending on size of win, etc
2024-05-08 20:26:57 -04:00

35 lines
769 B
Nix

{pkgs, ...}: let
inherit (pkgs) vimPlugins;
in {
programs = {
neovim = {
plugins = [
vimPlugins.fugitive
{
plugin = 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();
'';
}
];
};
};
}