1
0
Fork 0
mirror of https://github.com/NotAShelf/neovim-flake.git synced 2024-12-27 08:19:48 +01:00
neovim-flake/modules/git/git.nix

36 lines
1.2 KiB
Nix
Raw Normal View History

2023-04-22 18:47:19 +02:00
{lib, ...}:
with lib;
2023-04-22 18:47:19 +02:00
with builtins; {
options.vim.git = {
2023-04-17 23:55:12 +02:00
enable = mkEnableOption "Git support";
2023-04-17 23:55:12 +02:00
gitsigns = {
enable = mkEnableOption "gitsigns";
2023-04-22 18:47:19 +02:00
mappings = {
nextHunk = mkMappingOption "Next hunk [Gitsigns]" "]c";
previousHunk = mkMappingOption "Previous hunk [Gitsigns]" "[c";
stageHunk = mkMappingOption "Stage hunk [Gitsigns]" "<leader>hs";
undoStageHunk = mkMappingOption "Undo stage hunk [Gitsigns]" "<leader>hu";
resetHunk = mkMappingOption "Reset hunk [Gitsigns]" "<leader>hr";
stageBuffer = mkMappingOption "Stage buffer [Gitsigns]" "<leader>hS";
resetBuffer = mkMappingOption "Reset buffer [Gitsigns]" "<leader>hR";
previewHunk = mkMappingOption "Preview hunk [Gitsigns]" "<leader>hP";
blameLine = mkMappingOption "Blame line [Gitsigns]" "<leader>hb";
toggleBlame = mkMappingOption "Toggle blame [Gitsigns]" "<leader>tb";
diffThis = mkMappingOption "Diff this [Gitsigns]" "<leader>hd";
diffProject = mkMappingOption "Diff project [Gitsigns]" "<leader>hD";
toggleDeleted = mkMappingOption "Toggle deleted [Gitsigns]" "<leader>td";
};
2023-04-17 23:55:12 +02:00
codeActions = mkEnableOption "gitsigns codeactions through null-ls";
2023-03-31 17:47:17 +02:00
};
2023-04-17 23:55:12 +02:00
};
}