Refactor init method: add jedi#init_python

- jedi#init_python is used to init the Python environment.
 - jedi#setup_py_version is the single point where PythonJedi is
   defined, and will configure `PythonJedi` to output an error in case
   initialization failed.
 - jedi#force_py_version_switch will throw an error when
   g:jedi#force_py_version is not handled (e.g. invalid or "auto" and
   unresolved).
 - When g:jedi#force_py_version is provided, it will be used always.
 - Use WarningMsg highlight for errors, which are centralized and
   handled through exceptions.
This commit is contained in:
Daniel Hahler
2015-04-14 22:36:11 +02:00
parent 2d74fe6c51
commit e43012afc8
4 changed files with 79 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
if !has('python') && !has('python3')
if !jedi#init_python()
finish
endif
" ------------------------------------------------------------------------