From 7784c29a59d2509b7c3a57d3ca81d1a946a7cbed Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 14 Apr 2015 19:27:35 +0200 Subject: [PATCH] Optimize python check for Neovim: skip has() calls --- autoload/jedi.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index a2ceb08..d67e807 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -352,7 +352,9 @@ function! jedi#get_force_py_version() return g:jedi#force_py_version endfunction -if has('python') && has('python3') +" NOTE: nvim usually has both python providers. Skipping the `has` check +" avoids starting both of them. +if has('nvim') || (has('python') && has('python3')) " Use default python with Jedi. call jedi#force_py_version(jedi#get_force_py_version()) elseif has('python')