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

32 lines
769 B
Lua
Raw Normal View History

2023-09-06 00:26:45 +02:00
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', {
2023-09-06 01:26:46 +02:00
group = vim.api.nvim_create_augroup('rafi_fugitive', {}),
2023-09-06 00:26:45 +02:00
pattern = 'fugitiveblame',
callback = function()
vim.schedule(function()
vim.cmd.normal('A')
end)
end,
})
end,
},
-----------------------------------------------------------------------------
{
'junegunn/gv.vim',
dependencies = { 'tpope/vim-fugitive' },
cmd = 'GV',
},
}