forked from VimPlug/jedi-vim
Merge pull request #658 from blueyed/debug-info-improved
Improve :JediDebugInfo: verify that JediPython works / sys_path
This commit is contained in:
@@ -168,10 +168,22 @@ function! jedi#debug_info()
|
|||||||
endif
|
endif
|
||||||
echo 'Using Python version:' s:python_version
|
echo 'Using Python version:' s:python_version
|
||||||
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
|
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
|
||||||
PythonJedi print(' - sys.version: {0}'.format(', '.join([x.strip() for x in __import__('sys').version.split("\n")])))
|
let s:pythonjedi_called = 0
|
||||||
PythonJedi print(' - site module: {0}'.format(__import__('site').__file__))
|
PythonJedi import vim; vim.command('let s:pythonjedi_called = 1')
|
||||||
PythonJedi print('Jedi path: {0}'.format(jedi_vim.jedi.__file__))
|
if !s:pythonjedi_called
|
||||||
PythonJedi print('Jedi version: {}'.format(jedi_vim.jedi.__version__))
|
echohl WarningMsg
|
||||||
|
echom 'PythonJedi failed to run, likely a Python config issue.'
|
||||||
|
if exists(':CheckHealth') == 2
|
||||||
|
echom 'Try :CheckHealth for more information.'
|
||||||
|
endif
|
||||||
|
echohl None
|
||||||
|
else
|
||||||
|
PythonJedi print(' - sys.version: {0}'.format(', '.join([x.strip() for x in __import__('sys').version.split("\n")])))
|
||||||
|
PythonJedi print(' - site module: {0}'.format(__import__('site').__file__))
|
||||||
|
PythonJedi print('Jedi path: {0}'.format(jedi_vim.jedi.__file__))
|
||||||
|
PythonJedi print(' - version: {}'.format(jedi_vim.jedi.__version__))
|
||||||
|
PythonJedi print(' - sys_path:\n - {}'.format("\n - ".join(jedi_vim.jedi.Script('')._evaluator.sys_path)))
|
||||||
|
endif
|
||||||
echo 'jedi-vim git version: '
|
echo 'jedi-vim git version: '
|
||||||
echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '')
|
echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '')
|
||||||
echo 'jedi git submodule status: '
|
echo 'jedi git submodule status: '
|
||||||
|
|||||||
Reference in New Issue
Block a user