replace unnecessary git plugins with telescope functions

This commit is contained in:
Baipyrus 2024-11-21 15:10:49 +01:00
parent 47a56eca84
commit 88f27dbfe9
2 changed files with 5 additions and 12 deletions

View File

@ -2,14 +2,6 @@ return {
{ {
-- Git related plugins -- Git related plugins
'tpope/vim-fugitive', 'tpope/vim-fugitive',
dependencies = {
{
'rbong/vim-flog',
lazy = true,
cmd = { 'Flogsplit' },
},
'idanarye/vim-merginal',
},
config = function() config = function()
-- Switch in fugitive.vim status window with the current one -- Switch in fugitive.vim status window with the current one
vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' }) vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' })
@ -19,10 +11,6 @@ return {
vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' }) vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' })
-- Pull changes -- Pull changes
vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' }) vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' })
-- Open history graph
vim.keymap.set('n', '<leader>gl', '<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>', { desc = '[G]it [L]og' })
-- Open branch manager
vim.keymap.set('n', '<leader>gm', '<cmd>Merginal<cr>', { desc = '[G]it [M]erginal' })
end, end,
}, },
} }

View File

@ -191,6 +191,11 @@ return {
cwd = vim.fn.stdpath 'config', cwd = vim.fn.stdpath 'config',
} }
end, { desc = '[S]earch [N]eovim files' }) end, { desc = '[S]earch [N]eovim files' })
-- Telescope Git Pickers
vim.keymap.set('n', '<leader>gb', builtin.git_branches, { desc = '[G]it [B]ranches' })
vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = '[G]it [C]ommits' })
vim.keymap.set('n', '<leader>gC', builtin.git_bcommits, { desc = '[G]it Buffer [C]ommits' })
end, end,
}, },
} }