mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Update load condition for vim-fugitive
See https://stackoverflow.com/a/38088814/6064933 for how to check if we are inside a Git repository.
This commit is contained in:
parent
c8777db448
commit
3f0c6650f2
@ -178,7 +178,15 @@ require('packer').startup(
|
|||||||
-- use 'airblade/vim-gitgutter'
|
-- use 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
-- Git command inside vim
|
-- Git command inside vim
|
||||||
use {'tpope/vim-fugitive', cmd = {'Git', 'Gwrite'}}
|
use {'tpope/vim-fugitive', cond =
|
||||||
|
function()
|
||||||
|
local res = vim.fn.system('git rev-parse --is-inside-work-tree')
|
||||||
|
if string.find(res, 'true') then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end}
|
||||||
|
|
||||||
-- Better git log display
|
-- Better git log display
|
||||||
use {'rbong/vim-flog', require = 'tpope/vim-fugitive', cmd = {'Flog'}}
|
use {'rbong/vim-flog', require = 'tpope/vim-fugitive', cmd = {'Flog'}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user