forked from VimPlug/jedi-vim
- 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.
21 lines
672 B
VimL
21 lines
672 B
VimL
if !jedi#init_python()
|
|
finish
|
|
endif
|
|
|
|
if g:jedi#auto_initialization
|
|
if g:jedi#completions_enabled
|
|
" We need our own omnifunc, so this overrides the omnifunc set by
|
|
" $VIMRUNTIME/ftplugin/python.vim.
|
|
setlocal omnifunc=jedi#completions
|
|
|
|
" map ctrl+space for autocompletion
|
|
if g:jedi#completions_command == "<C-Space>"
|
|
" in terminals, <C-Space> sometimes equals <Nul>
|
|
inoremap <expr> <Nul> jedi#complete_string(0)
|
|
endif
|
|
if g:jedi#completions_command != ""
|
|
execute "inoremap <expr> <buffer> ".g:jedi#completions_command." jedi#complete_string(0)"
|
|
endif
|
|
endif
|
|
endif
|