From 88f27dbfe932f6838e6fb19090d8d4b2074f2e68 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 21 Nov 2024 15:10:49 +0100 Subject: [PATCH] replace unnecessary git plugins with telescope functions --- lua/custom/plugins/fugitive.lua | 12 ------------ lua/kickstart/plugins/telescope.lua | 5 +++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lua/custom/plugins/fugitive.lua b/lua/custom/plugins/fugitive.lua index 1732799..7e547f6 100644 --- a/lua/custom/plugins/fugitive.lua +++ b/lua/custom/plugins/fugitive.lua @@ -2,14 +2,6 @@ return { { -- Git related plugins 'tpope/vim-fugitive', - dependencies = { - { - 'rbong/vim-flog', - lazy = true, - cmd = { 'Flogsplit' }, - }, - 'idanarye/vim-merginal', - }, config = function() -- Switch in fugitive.vim status window with the current one vim.keymap.set('n', 'gs', 'Gedit :', { desc = '[G]it [S]tatus' }) @@ -19,10 +11,6 @@ return { vim.keymap.set('n', 'gP', 'Git push', { desc = '[G]it [P]ush' }) -- Pull changes vim.keymap.set('n', 'gp', 'Git pull', { desc = '[G]it [P]ull' }) - -- Open history graph - vim.keymap.set('n', 'gl', 'Flogsplitwincmd kq', { desc = '[G]it [L]og' }) - -- Open branch manager - vim.keymap.set('n', 'gm', 'Merginal', { desc = '[G]it [M]erginal' }) end, }, } diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index 7e0eb68..1619702 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -191,6 +191,11 @@ return { cwd = vim.fn.stdpath 'config', } end, { desc = '[S]earch [N]eovim files' }) + + -- Telescope Git Pickers + vim.keymap.set('n', 'gb', builtin.git_branches, { desc = '[G]it [B]ranches' }) + vim.keymap.set('n', 'gc', builtin.git_commits, { desc = '[G]it [C]ommits' }) + vim.keymap.set('n', 'gC', builtin.git_bcommits, { desc = '[G]it Buffer [C]ommits' }) end, }, }