dotfiles/hm/vim/git.nix

32 lines
864 B
Nix
Raw Permalink Normal View History

2024-01-18 22:49:46 +01:00
{ pkgs, lib, config, ... }:
{
config = {
programs.nixvim = {
2024-01-26 22:02:25 +01:00
keymaps = [
{
mode = [ "n" ];
key = "gG";
action = ''<cmd>lua require"gitlinker".get_buf_range_url("n")<cr>'';
}
{
mode = [ "v" ];
key = "gG";
action = ''<cmd>lua require"gitlinker".get_buf_range_url("v")<cr>'';
}
2024-01-18 22:49:46 +01:00
];
plugins = {
fugitive.enable = true; # Git basics
gitsigns.enable = true; # Show changed lines in the gutter
2024-01-26 22:02:25 +01:00
gitlinker = {
enable = true; # Copy URL of forge corresponding to cursor
callbacks = {
"code.techinc.nl" = "get_gitea_type_url";
"git.frogeye.fr" = "get_gitea_type_url";
};
mappings = null; # This option doesn't work, hence manual mappings
};
2024-01-18 22:49:46 +01:00
};
};
};
}