I have recently been trying to separate my neovim config into multiple files. After moving everything involving vim-fugitive and vim-gitgutter into a separate file, git-gutter is not loading and I cant perform any fugitive actions. I imagine this is a problem caused by how I used vim-plug here. Could anyone help me resolve this error?
here is my init.vim:
source $HOME/.config/nvim/default.vim
source $HOME/.config/nvim/fugitive.vim
call plug#begin()
Plug 'morhetz/gruvbox'
Plug 'mbbill/undotree'
Plug 'vim-airline/vim-airline'
Plug 'junegunn/vim-slash'
Plug 'preservim/nerdcommenter'
Plug 'tpope/vim-surround'
Plug 'Shougo/deoplete.nvim', { 'do': 'UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi'
Plug 'jiangmiao/auto-pairs'
Plug 'davidhalter/jedi-vim'
Plug 'junegunn/fzf', { 'do': { ->fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'airblade/vim-rooter'
"Plug 'stsewd/fzf-checkout.vim'
call plug#end()
"Plugin specific configuration
colorscheme gruvbox
set background=dark
let g:airline_powerline_fonts = 1
let g:fzf_layout = { 'window': {'width': 0.8, 'height': 0.8 }}
let $FZF_DEFAULT_OPS='--reverse'
" plugin key mappings
nmap <leader>c <plug>NERDCommenterToggle<SPACE>
nnoremap <leader>u :UndotreeShow<CR>
nnoremap <leader>pv :wincmd v<bar> :Ex <bar> :vertical resize 30<CR>
nnoremap <leader>ps :Rg<SPACE>
let g:deoplete#enable_at_startup = 1
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
" disable autocompletion, cause we use deoplete for completion
let g:jedi#completions_enabled = 0
" open the go-to function in split, not another buffer
let g:jedi#use_splits_not_buffers = "right"4
and here is my fugitive.vim
call plug#begin()
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
call plug#end()
"key mappings for fugitive
nmap <leader>gs :G<CR>
nmap <leader>gj :diffget //3<CR>
nmap <leader>gf :diffget //2<CR>
nnoremap <leader>gc :GCheckout<CR>
--noplugin
. My own setup places lots of files in~/.vim/plugin
source fugitive.vim
?