Don't load YCM in a virtualenv.

This commit is contained in:
David Tomaschik
2021-07-04 21:39:25 -07:00
parent ba0c734b06
commit 4ec8f22ab8

View File

@@ -143,7 +143,9 @@ let g:syntastic_xslt_checkers=['']
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
" Load vim-ycm if installed on the system level
if isdirectory("/usr/share/vim-youcompleteme")
" Currently only works on debian-based systems...
" It also does not play nicely with virtual envs, so we skip it then
if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV)
let g:ycm_gopls_binary_path='gopls'
let g:ycm_autoclose_preview_window_after_insertion=1
set runtimepath+=/usr/share/vim-youcompleteme