2023-11-27 06:55:56 +00:00
|
|
|
return {
|
|
|
|
"tpope/vim-fugitive",
|
2023-11-27 07:39:42 +00:00
|
|
|
dependencies = {
|
|
|
|
"tpope/vim-rhubarb",
|
|
|
|
},
|
2023-11-27 06:55:56 +00:00
|
|
|
keys = {
|
2023-11-27 20:47:40 +00:00
|
|
|
{ "<leader>gx", [[<Cmd>G<CR>]], desc = "Toggle [G]it status window" },
|
|
|
|
{ "<leader>gs", [[<Cmd>Git<CR>]], desc = "Toggle [G]it [S]tatus window" },
|
2023-11-27 06:55:56 +00:00
|
|
|
{
|
|
|
|
"<leader>gfd",
|
|
|
|
[[<Cmd>Gdiffsplit<CR>]],
|
2023-11-27 20:47:40 +00:00
|
|
|
desc = "[G]it [D]iff current file against index with [F]ugitive",
|
2023-11-27 06:55:56 +00:00
|
|
|
},
|
2023-11-27 20:47:40 +00:00
|
|
|
{ "<leader>gc", [[<Cmd>Git commit<CR>]], desc = "[G]it [C]ommit" },
|
|
|
|
{ "<leader>gb", [[<Cmd>Git blame -C<CR>]], desc = "[G]it [B]lame" },
|
|
|
|
{ "<leader>gp", [[<Cmd>Git push<CR>]], desc = "[G]it [P]ush" },
|
|
|
|
{ "<leader>gf", [[<Cmd>Git push --force<CR>]], desc = "[G]it [F]orce push" },
|
|
|
|
{ "<leader>gu", [[<Cmd>Git pull<CR>]], desc = "[G]it p[U]ll" },
|
2023-11-27 06:55:56 +00:00
|
|
|
{
|
|
|
|
"<leader>gh",
|
|
|
|
[[<Cmd>Git diff --cached<CR>]],
|
2023-11-27 20:47:40 +00:00
|
|
|
desc = "[G]it diff current staged changes",
|
2023-11-27 06:55:56 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"<leader>go",
|
2023-11-27 07:39:42 +00:00
|
|
|
"<cmd>GBrowse<CR>",
|
2023-11-27 20:47:40 +00:00
|
|
|
desc = "[B]rowse [G]it URL for fugitive object under cursor",
|
2023-11-27 06:55:56 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"<leader>go",
|
2023-11-27 07:39:42 +00:00
|
|
|
":'<,'>GBrowse<CR>",
|
|
|
|
mode = "v",
|
2023-11-27 20:47:40 +00:00
|
|
|
desc = "[B]rowse [G]it URL for selected lines",
|
|
|
|
silent = true,
|
2023-11-27 06:55:56 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|