diff --git a/lua/plugins.lua b/lua/plugins.lua index 1f86932..4f9a58a 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -178,7 +178,15 @@ require('packer').startup( -- use 'airblade/vim-gitgutter' -- 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 use {'rbong/vim-flog', require = 'tpope/vim-fugitive', cmd = {'Flog'}}