nichts/modules/editors/nixvim/plug/git/gitsigns.nix
2024-05-22 10:43:46 +02:00

76 lines
1.4 KiB
Nix

{
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = {
trouble = true;
current_line_blame = true;
signs = {
add = {
text = "";
};
change = {
text = "";
};
delete = {
text = "_";
};
topdelete = {
text = "";
};
changedelete = {
text = "~";
};
untracked = {
text = "";
};
};
};
};
keymaps = [
{
mode = ["n" "v"];
key = "<leader>gh";
action = "gitsigns";
options = {
silent = true;
desc = "+hunks";
};
}
{
mode = "n";
key = "<leader>ghb";
action = ":Gitsigns blame_line<CR>";
options = {
silent = true;
desc = "Blame line";
};
}
{
mode = "n";
key = "<leader>ghd";
action = ":Gitsigns diffthis<CR>";
options = {
silent = true;
desc = "Diff This";
};
}
{
mode = "n";
key = "<leader>ghR";
action = ":Gitsigns reset_buffer<CR>";
options = {
silent = true;
desc = "Reset Buffer";
};
}
{
mode = "n";
key = "<leader>ghS";
action = ":Gitsigns stage_buffer<CR>";
options = {
silent = true;
desc = "Stage Buffer";
};
}
];
}