mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
rplugin: let the python host identify packages
This commit is contained in:
parent
1c066e671d
commit
6c4d3362c5
@ -149,7 +149,9 @@ function! s:RegistrationCommands(host) abort
|
|||||||
endfor
|
endfor
|
||||||
let channel = remote#host#Require(host_id)
|
let channel = remote#host#Require(host_id)
|
||||||
let lines = []
|
let lines = []
|
||||||
|
let registered = []
|
||||||
for path in paths
|
for path in paths
|
||||||
|
unlet! specs
|
||||||
let specs = rpcrequest(channel, 'specs', path)
|
let specs = rpcrequest(channel, 'specs', path)
|
||||||
if type(specs) != type([])
|
if type(specs) != type([])
|
||||||
" host didn't return a spec list, indicates a failure while loading a
|
" 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).",")
|
call add(lines, " \\ ".string(spec).",")
|
||||||
endfor
|
endfor
|
||||||
call add(lines, " \\ ])")
|
call add(lines, " \\ ])")
|
||||||
|
call add(registered, path)
|
||||||
endfor
|
endfor
|
||||||
echomsg printf("remote/host: %s host registered plugins %s",
|
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
|
" Delete the temporary host clone
|
||||||
call rpcstop(s:hosts[host_id].channel)
|
call rpcstop(s:hosts[host_id].channel)
|
||||||
@ -207,7 +210,7 @@ endfunction
|
|||||||
" Registration of standard hosts
|
" Registration of standard hosts
|
||||||
|
|
||||||
" Python/Python3
|
" Python/Python3
|
||||||
call remote#host#Register('python', '*.py',
|
call remote#host#Register('python', '*',
|
||||||
\ function('provider#pythonx#Require'))
|
\ function('provider#pythonx#Require'))
|
||||||
call remote#host#Register('python3', '*.py',
|
call remote#host#Register('python3', '*',
|
||||||
\ function('provider#pythonx#Require'))
|
\ function('provider#pythonx#Require'))
|
||||||
|
Loading…
Reference in New Issue
Block a user