aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-11-26 12:24:17 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-11-26 12:24:17 -0500
commitcc768bed6cabe1e47e9447e9ea04ef144fdbafe8 (patch)
tree41b1b69cfc07110ecf72bf886fa406749281e28a
parentf3e7314952723fdeeee1e0b762a27b4cfab7c7f0 (diff)
parent98c72305a96628ad31223c4d73228445090211ec (diff)
downloadrneovim-cc768bed6cabe1e47e9447e9ea04ef144fdbafe8.tar.gz
rneovim-cc768bed6cabe1e47e9447e9ea04ef144fdbafe8.tar.bz2
rneovim-cc768bed6cabe1e47e9447e9ea04ef144fdbafe8.zip
Merge pull request #1559 from fwalch/python-messages
Improve Python host messages.
-rw-r--r--runtime/autoload/remote/host.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index e81aa81665..b07593f39b 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -219,7 +219,9 @@ function! s:RequirePythonHost(name)
" In some distros, python3 is the default python
let python_host_prog = 'python2'
else
- throw 'No python interpreter found'
+ throw 'No python interpreter found.' .
+ \ " Try setting 'let g:python_host_prog=/path/to/python' in your '.nvimrc'" .
+ \ " or see ':help nvim-python'."
endif
" Make sure we pick correct python version on path.
@@ -231,7 +233,8 @@ function! s:RequirePythonHost(name)
let import_result = system(python_host_prog .
\ ' -c "import neovim, sys; sys.stdout.write(\"ok\")"')
if import_result != 'ok'
- throw 'No neovim module found for ' . python_version
+ throw 'No neovim module found for ' . python_version . '.' .
+ \ " Try installing it with 'pip install neovim' or see ':help nvim-python'."
endif
try
@@ -241,7 +244,9 @@ function! s:RequirePythonHost(name)
endif
catch
endtry
- throw 'Failed to load python host'
+ throw 'Failed to load python host.' .
+ \ " Try upgrading the Neovim python module with 'pip install --upgrade neovim'" .
+ \ " or see ':help nvim-python'."
endfunction
call remote#host#Register('python', function('s:RequirePythonHost'))