forked from VimPlug/jedi-vim
fix: CheckHealth doesn't work in neovim (#765)
Squashed:
* fix: CheckHealth doesn't work in neovim
CheckHealth calls display_debug_info().
However, error occured when loading jedi_vim.jedi.Script('')._evaluator.sys_path,
because Evaluator.sys_path is unavailable variable.
* handle the both the old and new API
Evaluator.project.sys_path is temporary fix, because Evaluator.sys_path is correct API.
So, we handle the both the old and new API in preparation for merging virtualenv branch.
This commit is contained in:
@@ -31,7 +31,13 @@ def display_debug_info():
|
|||||||
echo("printf(' - version: %s', {0!r})".format(
|
echo("printf(' - version: %s', {0!r})".format(
|
||||||
jedi_vim.jedi.__version__))
|
jedi_vim.jedi.__version__))
|
||||||
echo("' - sys_path:'")
|
echo("' - sys_path:'")
|
||||||
for p in jedi_vim.jedi.Script('')._evaluator.sys_path:
|
|
||||||
|
script_evaluator = jedi_vim.jedi.Script('')._evaluator
|
||||||
|
try:
|
||||||
|
sys_path = script_evaluator.project.sys_path
|
||||||
|
except AttributeError:
|
||||||
|
sys_path = script_evaluator.sys_path
|
||||||
|
for p in sys_path:
|
||||||
echo("printf(' - `%s`', {0!r})".format(p))
|
echo("printf(' - `%s`', {0!r})".format(p))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
echo("printf('There was an error accessing jedi_vim.jedi: %s', "
|
echo("printf('There was an error accessing jedi_vim.jedi: %s', "
|
||||||
|
|||||||
Reference in New Issue
Block a user