[nvim] Fix YCM python path
This commit is contained in:
@@ -1,20 +1,6 @@
|
|||||||
set nocompatible
|
set nocompatible
|
||||||
filetype off
|
filetype off
|
||||||
|
|
||||||
|
|
||||||
" Plugins
|
|
||||||
" Note: on most systems, this will make the plugins reside in \
|
|
||||||
" ~/.local/share/nvim/plugged/
|
|
||||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : expand('~/.vim')
|
|
||||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
||||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
|
||||||
let &runtimepath = &runtimepath
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Disable Perl
|
|
||||||
let g:loaded_perl_provider = 0
|
|
||||||
|
|
||||||
" Find python
|
" Find python
|
||||||
if has("macunix")
|
if has("macunix")
|
||||||
" Required for virtualenvs
|
" Required for virtualenvs
|
||||||
@@ -27,6 +13,20 @@ if has("macunix")
|
|||||||
else
|
else
|
||||||
let g:python_interpreter = 'python3'
|
let g:python_interpreter = 'python3'
|
||||||
endif
|
endif
|
||||||
|
let g:python3_host_prog=g:python_interpreter
|
||||||
|
|
||||||
|
" Plugins
|
||||||
|
" Note: on most systems, this will make the plugins reside in \
|
||||||
|
" ~/.local/share/nvim/plugged/
|
||||||
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : expand('~/.vim')
|
||||||
|
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||||
|
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
let &runtimepath = &runtimepath
|
||||||
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Disable Perl
|
||||||
|
let g:loaded_perl_provider = 0
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
|
||||||
@@ -245,8 +245,9 @@ let g:ycm_collect_identifiers_from_tags_files = 1 " Read from tag files
|
|||||||
let g:ycm_global_ycm_extra_conf = expand('~/.config/nvim/.ycm_extra_conf.py') " Standard conf
|
let g:ycm_global_ycm_extra_conf = expand('~/.config/nvim/.ycm_extra_conf.py') " Standard conf
|
||||||
let g:ycm_enable_diagnostic_signs = 0 " Do not show semantic error bar
|
let g:ycm_enable_diagnostic_signs = 0 " Do not show semantic error bar
|
||||||
let g:ycm_server_python_interpreter=g:python_interpreter
|
let g:ycm_server_python_interpreter=g:python_interpreter
|
||||||
|
let g:ycm_python_interpreter_path=g:python_interpreter
|
||||||
" Enable virtualenv autocompletion
|
" Enable virtualenv autocompletion
|
||||||
let g:ycm_python_binary_path = 'python'
|
let g:ycm_python_binary_path = 'python3'
|
||||||
let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>']
|
let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>']
|
||||||
let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
|
let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
|
||||||
|
|
||||||
@@ -310,4 +311,3 @@ catch
|
|||||||
endtry
|
endtry
|
||||||
let g:tex_flavor = "latex"
|
let g:tex_flavor = "latex"
|
||||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||||
let g:python3_host_prog=g:python_interpreter
|
|
||||||
|
|||||||
Reference in New Issue
Block a user