aboutsummaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim')
-rw-r--r--.vim/plugin/init.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/.vim/plugin/init.vim b/.vim/plugin/init.vim
index a6f29cf..b7a06c4 100644
--- a/.vim/plugin/init.vim
+++ b/.vim/plugin/init.vim
@@ -14,13 +14,23 @@ function! s:load_settings()
endfor
endfunction
+function! BuildYCM(info)
+ let ycm_install_options=' --clangd-completer'
+
+ if !empty(glob("/usr/bin/go")) || !empty(glob("/usr/local/bin/go"))
+ let ycm_install_options = ycm_install_options . ' --go-completer'
+ endif
+
+ exec '!python3 ./install.py' . ycm_install_options
+endfunction
+
let g:ycm_language_server = []
call plug#begin('~/.vim/plugged')
" General
Plug 'Valloric/YouCompleteMe', {
- \ 'do': 'python3 ./install.py --clangd-completer',
+ \ 'do': function('BuildYCM'),
\ }
Plug 'prabirshrestha/vim-lsp'