Add fugitive.vim

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:02 -05:00
parent 1bd905a6bf
commit f8c7f59faf
3 changed files with 36 additions and 3 deletions

View File

@ -21,7 +21,7 @@
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" }, "dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" }, "gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" },
"gruvbox.nvim": { "branch": "main", "commit": "517b012757fbe7a4d6e507baf5cc75837e62734f" }, "gruvbox.nvim": { "branch": "main", "commit": "517b012757fbe7a4d6e507baf5cc75837e62734f" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" }, "headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
@ -56,7 +56,7 @@
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-lint": { "branch": "master", "commit": "3a7c15331a57ba40a56f00f29173700af853fa03" }, "nvim-lint": { "branch": "master", "commit": "3a7c15331a57ba40a56f00f29173700af853fa03" },
"nvim-lspconfig": { "branch": "master", "commit": "e4a56adbc51c55964253dce4505cec55c82c1c04" }, "nvim-lspconfig": { "branch": "master", "commit": "daaf00a77805e113acf8ccc02dd8c3403d691683" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" }, "nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" },
"nvim-treesitter": { "branch": "master", "commit": "b056e4227b1c5d3ecfe96941352364c0c10668df" }, "nvim-treesitter": { "branch": "master", "commit": "b056e4227b1c5d3ecfe96941352364c0c10668df" },
@ -82,6 +82,7 @@
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" }, "true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" },
"venv-selector.nvim": { "branch": "main", "commit": "c259dacb20a00fb84ec6006e9a24b4085b27120a" }, "venv-selector.nvim": { "branch": "main", "commit": "c259dacb20a00fb84ec6006e9a24b4085b27120a" },
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"wezterm-types": { "branch": "main", "commit": "49f66ce40002f0ef881440c10f8854b02bb67c3f" }, "wezterm-types": { "branch": "main", "commit": "49f66ce40002f0ef881440c10f8854b02bb67c3f" },

View File

@ -1,5 +1,4 @@
return { return {
{ "ellisonleao/gruvbox.nvim" },
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
opts = { opts = {

33
lua/plugins/fugitive.lua Normal file
View File

@ -0,0 +1,33 @@
return {
"tpope/vim-fugitive",
keys = {
{ "<leader>gx", [[<Cmd>G<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it status window" } },
{ "<leader>gs", [[<Cmd>Git<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it [S]tatus window" } },
{
"<leader>gfd",
[[<Cmd>Gdiffsplit<CR>]],
{ noremap = false, silent = true, desc = "[G]it [D]iff current file against index with [F]ugitive" },
},
{ "<leader>gc", [[<Cmd>Git commit<CR>]], { noremap = false, silent = true, desc = "[G]it [C]ommit" } },
{ "<leader>gb", [[<Cmd>Git blame -C<CR>]], { noremap = false, silent = true, desc = "[G]it [B]lame" } },
{ "<leader>gp", [[<Cmd>Git push<CR>]], { noremap = false, silent = true, desc = "[G]it [P]ush" } },
{ "<leader>gf", [[<Cmd>Git push --force<CR>]], { noremap = false, silent = true, desc = "[G]it [F]orce push" } },
{ "<leader>gu", [[<Cmd>Git pull<CR>]], { noremap = false, silent = true, desc = "[G]it p[U]ll" } },
{
"<leader>gh",
[[<Cmd>Git diff --cached<CR>]],
{ noremap = false, silent = true, desc = "[G]it diff current staged changes" },
},
{
"<leader>go",
[[<Cmd>GBrowse<CR>]],
{ noremap = false, silent = true, desc = "[B]rowse [G]it URL for fugitive object under cursor" },
},
{
"v",
"<leader>go",
[[<Cmd>'<,'>GBrowse<CR>]],
{ noremap = false, silent = true, desc = "[B]rowse [G]it URL for selected lines" },
},
},
}