neovim-confs/lua/rafi/plugins/extras/git/fugitive.lua

32 lines
769 B
Lua

return {
-----------------------------------------------------------------------------
{
'tpope/vim-fugitive',
cmd = { 'G', 'Git', 'Gfetch', 'Gpush', 'Gclog', 'Gdiffsplit' },
keys = {
{ '<leader>gd', '<cmd>Gdiffsplit<CR>', desc = 'Git diff' },
{ '<leader>gb', '<cmd>Git blame<CR>', desc = 'Git blame' },
},
config = function()
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('rafi_fugitive', {}),
pattern = 'fugitiveblame',
callback = function()
vim.schedule(function()
vim.cmd.normal('A')
end)
end,
})
end,
},
-----------------------------------------------------------------------------
{
'junegunn/gv.vim',
dependencies = { 'tpope/vim-fugitive' },
cmd = 'GV',
},
}