summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2021-07-09 18:01:51 +0200
committerAhmed Abdelhalim <[email protected]>2021-07-09 18:01:51 +0200
commit2d68c43fcb0f8c99a50e9d3eb50cebc7fea0839b (patch)
tree083591e92cb5dffceec7c6d769b8c3dbc3c46c04
parentea0e3ac267aa1abb1d65389c914c06c06756d836 (diff)
Fix YCM setup and python auto-complete
-rw-r--r--.vimrc12
1 files changed, 10 insertions, 2 deletions
diff --git a/.vimrc b/.vimrc
index 8c63b90..ab43df1 100644
--- a/.vimrc
+++ b/.vimrc
@@ -15,7 +15,8 @@ Plug 'junegunn/limelight.vim'
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'vim-scripts/bufexplorer.zip'
" Plug 'vim-scripts/indentpython.vim', { 'for': 'python' }
-Plug 'ycm-core/YouCompleteMe', { 'do': './install.py --racer-completer', 'commit': '4e480a317' }
+Plug 'ycm-core/YouCompleteMe', {
+ \ 'do': '/usr/local/bin/python3 ./install.py --clangd-completer --ts-completer --rust-completer' }
Plug 'Valloric/MatchTagAlways', { 'for': 'html' }
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree'
@@ -159,11 +160,18 @@ let &colorcolumn="80,".join(range(121,130),",")
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"YouCompleteMe
"=============
-let g:ycm_python_binary_path = '/usr/local/bin/python3'
let g:ycm_auto_hover=''
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
+" Python pipenv auto complete
+let pipenv_venv_path = system('pipenv --venv')
+if shell_error == 0
+ let venv_path = substitute(pipenv_venv_path, '\n', '', '')
+ let g:ycm_python_binary_path = venv_path . '/bin/python'
+else
+ let g:ycm_python_binary_path = '/usr/local/bin/python3'
+endif
"polyglot"
"=============