Updating to latest ycmd

Related to Valloric/ycmd#171
This commit is contained in:
Strahinja Val Markovic 2015-07-01 17:43:09 -07:00
parent 9de61988ac
commit 98d687a5e0
2 changed files with 32 additions and 26 deletions

View File

@ -110,34 +110,40 @@ endfunction
function! s:SetUpPython() abort function! s:SetUpPython() abort
py import sys python << EOF
py import vim import sys
exe 'python sys.path.insert( 0, "' . s:script_folder_path . '/../python" )' import vim
exe 'python sys.path.insert( 0, "' . s:script_folder_path . import os
\ '/../third_party/ycmd" )' import subprocess
py from ycmd import utils
exe 'py utils.AddNearestThirdPartyFoldersToSysPath("'
\ . s:script_folder_path . '")'
" We need to import ycmd's third_party folders as well since we import and script_folder = vim.eval( 's:script_folder_path' )
" use ycmd code in the client. sys.path.insert( 0, os.path.join( script_folder, '../python' ) )
py utils.AddNearestThirdPartyFoldersToSysPath( utils.__file__ ) sys.path.insert( 0, os.path.join( script_folder, '../third_party/ycmd' ) )
py from ycm import base from ycmd import utils
py base.LoadJsonDefaultsIntoVim() utils.AddNearestThirdPartyFoldersToSysPath( script_folder )
py from ycmd import user_options_store
py user_options_store.SetAll( base.BuildServerConf() )
py from ycm import vimsupport
if !pyeval( 'base.CompatibleWithYcmCore()') # We need to import ycmd's third_party folders as well since we import and
echohl WarningMsg | # use ycmd code in the client.
\ echomsg "YouCompleteMe unavailable: YCM support libs too old, PLEASE RECOMPILE" | utils.AddNearestThirdPartyFoldersToSysPath( utils.__file__ )
\ echohl None from ycm import base
return 0 base.LoadJsonDefaultsIntoVim()
endif from ycmd import user_options_store
user_options_store.SetAll( base.BuildServerConf() )
from ycm import vimsupport
py from ycm.youcompleteme import YouCompleteMe popen_args = [ utils.PathToPythonInterpreter(),
py ycm_state = YouCompleteMe( user_options_store.GetAll() ) os.path.join( script_folder,
return 1 '../third_party/ycmd/check_core_version.py') ]
if utils.SafePopen( popen_args ).wait() == 2:
vimsupport.PostVimMessage(
'YouCompleteMe unavailable: YCM support libs too old, PLEASE RECOMPILE' )
vim.command( 'return 0')
from ycm.youcompleteme import YouCompleteMe
ycm_state = YouCompleteMe( user_options_store.GetAll() )
vim.command( 'return 1')
EOF
endfunction endfunction

2
third_party/ycmd vendored

@ -1 +1 @@
Subproject commit 58363b1e759c526d84f7d8a700394931293e778c Subproject commit 9ba85e7f0755dcc94aff19bba1634fe866f2cb0b