From df373cb56058fc7a60b4520f1d029f6059093321 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Mon, 27 Nov 2023 01:55:56 -0500 Subject: [PATCH] Add fugitive.vim --- lazy-lock.json | 5 +++-- lua/plugins/colorscheme.lua | 1 - lua/plugins/fugitive.lua | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 lua/plugins/fugitive.lua diff --git a/lazy-lock.json b/lazy-lock.json index 54b612a..93029dc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -21,7 +21,7 @@ "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, "gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" }, "gruvbox.nvim": { "branch": "main", "commit": "517b012757fbe7a4d6e507baf5cc75837e62734f" }, "headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" }, @@ -56,7 +56,7 @@ "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, "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-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" }, "nvim-treesitter": { "branch": "master", "commit": "b056e4227b1c5d3ecfe96941352364c0c10668df" }, @@ -82,6 +82,7 @@ "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" }, "venv-selector.nvim": { "branch": "main", "commit": "c259dacb20a00fb84ec6006e9a24b4085b27120a" }, + "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "wezterm-types": { "branch": "main", "commit": "49f66ce40002f0ef881440c10f8854b02bb67c3f" }, diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 6a82c5c..d1668f3 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,5 +1,4 @@ return { - { "ellisonleao/gruvbox.nvim" }, { "LazyVim/LazyVim", opts = { diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua new file mode 100644 index 0000000..ae683c3 --- /dev/null +++ b/lua/plugins/fugitive.lua @@ -0,0 +1,33 @@ +return { + "tpope/vim-fugitive", + keys = { + { "gx", [[G]], { noremap = false, silent = true, desc = "Toggle [G]it status window" } }, + { "gs", [[Git]], { noremap = false, silent = true, desc = "Toggle [G]it [S]tatus window" } }, + { + "gfd", + [[Gdiffsplit]], + { noremap = false, silent = true, desc = "[G]it [D]iff current file against index with [F]ugitive" }, + }, + { "gc", [[Git commit]], { noremap = false, silent = true, desc = "[G]it [C]ommit" } }, + { "gb", [[Git blame -C]], { noremap = false, silent = true, desc = "[G]it [B]lame" } }, + { "gp", [[Git push]], { noremap = false, silent = true, desc = "[G]it [P]ush" } }, + { "gf", [[Git push --force]], { noremap = false, silent = true, desc = "[G]it [F]orce push" } }, + { "gu", [[Git pull]], { noremap = false, silent = true, desc = "[G]it p[U]ll" } }, + { + "gh", + [[Git diff --cached]], + { noremap = false, silent = true, desc = "[G]it diff current staged changes" }, + }, + { + "go", + [[GBrowse]], + { noremap = false, silent = true, desc = "[B]rowse [G]it URL for fugitive object under cursor" }, + }, + { + "v", + "go", + [['<,'>GBrowse]], + { noremap = false, silent = true, desc = "[B]rowse [G]it URL for selected lines" }, + }, + }, +}