Let the "client" also be the "host". Eliminate the separate "host" concept and related modules.
Any node module that imports the "neovim" package and defines method handler(s) is a "remote module". It is loaded by Nvim same as any "node client".
TODO
[ ] setup() (placeholder name) attaches and calls nvim_set_client_info() with the methods defined by setHandler().
[ ] node scripts can't import globally-installed modules. So the rplugin script will need to be run with NODE_PATH=$(npm root --quiet -g) , or would need to npm install in the local plugin directory.
[ ] most reliabe: do npm install neovim at the root of stdpath('cache') (or wherever plugins are stored)
Problem:
The "remote plugin" concept is too complicated. https://github.com/neovim/neovim/issues/27949
Solution:
TODO
setup()
(placeholder name) attaches and callsnvim_set_client_info()
with themethods
defined bysetHandler()
.So the rplugin script will need to be run withNODE_PATH=$(npm root --quiet -g)
, or would need tonpm install
in the local plugin directory.npm install neovim
at the root ofstdpath('cache')
(or wherever plugins are stored)TEST CASE / DEMO:
Invocation
Result