From 2fbcc5b991c46437733d132e433af6431f61d61e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 19 Aug 2015 23:49:11 +0200 Subject: [PATCH] nvim: add a warning in case the auto-detected version is not functional This usually means that the `neovim` module is not installed, which commonly happens in a virtualenv. --- autoload/jedi.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index eff65e0..42c7232 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -88,6 +88,18 @@ function! s:init_python() if !has('nvim') || has('python'.(s:def_py == 2 ? '' : s:def_py)) return jedi#force_py_version(s:def_py) 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 if has('python')