aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-03-11 11:31:09 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2016-03-11 11:31:09 +0100
commit6c4d3362c515002e00821ae10f16a16dcf2df8da (patch)
tree5360c998a6178f726d5ca04c71f65190bb3022aa
parent1c066e671d0ebd632071b87b4d0e15dcdc659535 (diff)
downloadrneovim-6c4d3362c515002e00821ae10f16a16dcf2df8da.tar.gz
rneovim-6c4d3362c515002e00821ae10f16a16dcf2df8da.tar.bz2
rneovim-6c4d3362c515002e00821ae10f16a16dcf2df8da.zip
rplugin: let the python host identify packages
-rw-r--r--runtime/autoload/remote/host.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index b9b167717a..b78ffab5b2 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -149,7 +149,9 @@ function! s:RegistrationCommands(host) abort
endfor
let channel = remote#host#Require(host_id)
let lines = []
+ let registered = []
for path in paths
+ unlet! specs
let specs = rpcrequest(channel, 'specs', path)
if type(specs) != type([])
" host didn't return a spec list, indicates a failure while loading a
@@ -162,9 +164,10 @@ function! s:RegistrationCommands(host) abort
call add(lines, " \\ ".string(spec).",")
endfor
call add(lines, " \\ ])")
+ call add(registered, path)
endfor
echomsg printf("remote/host: %s host registered plugins %s",
- \ a:host, string(map(copy(paths), "fnamemodify(v:val, ':t')")))
+ \ a:host, string(map(registered, "fnamemodify(v:val, ':t')")))
" Delete the temporary host clone
call rpcstop(s:hosts[host_id].channel)
@@ -207,7 +210,7 @@ endfunction
" Registration of standard hosts
" Python/Python3
-call remote#host#Register('python', '*.py',
+call remote#host#Register('python', '*',
\ function('provider#pythonx#Require'))
-call remote#host#Register('python3', '*.py',
+call remote#host#Register('python3', '*',
\ function('provider#pythonx#Require'))