mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
Merge pull request #457 from blueyed/warn-auto-nvim-not-available
nvim: add a warning in case the auto-detected version is not functional
This commit is contained in:
@@ -88,6 +88,18 @@ function! s:init_python()
|
|||||||
if !has('nvim') || has('python'.(s:def_py == 2 ? '' : s:def_py))
|
if !has('nvim') || has('python'.(s:def_py == 2 ? '' : s:def_py))
|
||||||
return jedi#force_py_version(s:def_py)
|
return jedi#force_py_version(s:def_py)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Add a warning in case the auto-detected version is not available,
|
||||||
|
" usually because of a missing neovim module in a VIRTUAL_ENV.
|
||||||
|
if has('nvim')
|
||||||
|
echohl WarningMsg
|
||||||
|
echom "jedi-vim: the detected Python version (".s:def_py.")"
|
||||||
|
\ "is not functional."
|
||||||
|
\ "Is the 'neovim' module installed?"
|
||||||
|
\ "While jedi-vim will work, it might not use the"
|
||||||
|
\ "expected Python path."
|
||||||
|
echohl None
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('python')
|
if has('python')
|
||||||
|
|||||||
Reference in New Issue
Block a user