Closed
Description
I'm trying to figure out why UpdateRemotePlugins
is not finding any plugins. I hacked in some printf debugging into runtime/autoload/remote/host.vim
and it seems like when function! s:RegistrationCommands
calls rpcrequest(channel, 'specs', path)
it doesn't seem to come back with any specs.
paths: ['C:/Users/<user>/AppData/Local/nvim/rplugin/python3/__pycache__',
'C:/Users/<user>/AppData/Local/nvim/rplugin/python3/example.py',
'C:/Users/<user>/AppData/Local/nvim/rplugin/python3/limit.py']
no spec found: 0
no spec found: 0
no spec found: 0
remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: C:\Users\<user>\AppData\Local\nvim-data/rplugin.vim
example.py
is the example from the pynvim docslimit.py
is the example from the neovim docs on remote plugins
Modified function for my printf debug
function! s:RegistrationCommands(host) abort
" Register a temporary host clone for discovering specs
let host_id = a:host.'-registration-clone'
call remote#host#RegisterClone(host_id, a:host)
let pattern = s:plugin_patterns[a:host]
let paths = nvim_get_runtime_file('rplugin/'.a:host.'/'.pattern, 1)
let paths = map(paths, 'tr(resolve(v:val),"\\","/")') " Normalize slashes #4795
let paths = uniq(sort(paths))
if empty(paths)
return []
endif
for path in paths
call remote#host#RegisterPlugin(host_id, path, [])
endfor
let channel = remote#host#Require(host_id)
let lines = []
let registered = []
echomsg printf("paths: %s", paths)
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
" plugin
echomsg printf("no spec found: %s", specs)
continue
endif
echomsg printf("found spec: %s", specs)
call add(lines, "call remote#host#RegisterPlugin('".a:host
\ ."', '".path."', [")
for spec in specs
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(registered, "fnamemodify(v:val, ':t')")))
" Delete the temporary host clone
call jobstop(s:hosts[host_id].channel)
call remove(s:hosts, host_id)
call remove(s:plugins_for_host, host_id)
return lines
endfunction
Neovim version
% nvim --version
NVIM v0.10.0-dev-2830+g541c2d381
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
OS
Windows 11 Pro
Metadata
Metadata
Assignees
Labels
No labels