You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local function load_extensions()
vim.api.nvim_call_function('CursorlessLoadExtension', {})
vim.api.nvim_call_function('CommandServerLoadExtension', {})
this worked fine.
Now I want to split the 2 node clients into 2 different neovim node plugins.
The first node plugin will register the CommandServer* node functions and call the node function fine (CommandServerLoadExtension).
All of the remote#host#RegisterPlugin and "remote plugin" garbage will be removed, with the idea being to support exactly what you have requested here: any module can simply call setHandler() to define handlers for incoming requests. Then a "remote plugin" is simply a node module that imports the neovim node-client and defines handlers.
problems
I am encountering this error https://github.com/neovim/neovim/blob/3a8265266e0c0fe31f34b7c0192e8ae7d83ae950/runtime/autoload/remote/host.vim#L81 when trying to register a node function after the node host has already been started.
it would be nice to support registering node functions after the node host has started to allow easy deployment of node plugins.
details
I currently have a single neovim plugin which contains 2 node clients.
I am registering functions for both node clients myself from my own vim/lua scripts (instead of using
rplugins.vim
) to avoid having the user to call:UpdateRemotePlugins
https://github.com/hands-free-vim/cursorless.nvim/blob/7165f98896affa68f38ebe6f6402ce7819078193/vim/cursorless.vim :Then I call
CommandServerLoadExtension
andCursorlessLoadExtension
when my neovim plugin is initialized https://github.com/hands-free-vim/cursorless.nvim/blob/7165f98896affa68f38ebe6f6402ce7819078193/lua/cursorless/init.lua#L41 :this worked fine.
Now I want to split the 2 node clients into 2 different neovim node plugins.
The first node plugin will register the
CommandServer*
node functions and call the node function fine (CommandServerLoadExtension
).However, from calling this function, the node host is started and it is impossible to register any other node function (
CursorlessLoadExtension
) in my second node plugin due to https://github.com/neovim/neovim/blob/3a8265266e0c0fe31f34b7c0192e8ae7d83ae950/runtime/autoload/remote/host.vim#L81The text was updated successfully, but these errors were encountered: