aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/pythonx.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/provider/pythonx.vim')
-rw-r--r--runtime/autoload/provider/pythonx.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim
index 06611377b1..59b1c27b72 100644
--- a/runtime/autoload/provider/pythonx.vim
+++ b/runtime/autoload/provider/pythonx.vim
@@ -35,6 +35,11 @@ endfunction
" Returns [path_to_python_executable, error_message]
function! provider#pythonx#Detect(major_version) abort
+ return provider#pythonx#DetectByModule('neovim', a:major_version)
+endfunction
+
+" Returns [path_to_python_executable, error_message]
+function! provider#pythonx#DetectByModule(module, major_version) abort
let python_exe = s:get_python_executable_from_host_var(a:major_version)
if !empty(python_exe)
@@ -45,7 +50,7 @@ function! provider#pythonx#Detect(major_version) abort
let errors = []
for exe in candidates
- let [result, error] = provider#pythonx#CheckForModule(exe, 'neovim', a:major_version)
+ let [result, error] = provider#pythonx#CheckForModule(exe, a:module, a:major_version)
if result
return [exe, error]
endif