mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 05:11:45 +00:00
replace unnecessary git plugins with telescope functions
This commit is contained in:
parent
47a56eca84
commit
88f27dbfe9
@ -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', '<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' })
|
||||
-- Pull changes
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
@ -191,6 +191,11 @@ return {
|
||||
cwd = vim.fn.stdpath 'config',
|
||||
}
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user