rhysd / neovim-component

<neovim-editor> WebComponent to embed Neovim to your app with great ease
https://github.com/rhysd/NyaoVim
MIT License
193 stars 18 forks source link

Separate Neovim process handler to remove Node.js dependency #9

Open rhysd opened 8 years ago

rhysd commented 8 years ago

Currently <neovim-editor> component requires child_process module to invoke Neovim process and communicate with msgpack-rpc API using stdio. However, the way to communicate with Neovim is not only stdio. It is also available to use network for communication with Neovim process. Web applications can communicate with remote Neovim process via WebSocket. If we connect to Neovim process via WebSocket, Neovim Chrome extension is feasible. Chrome extension can't invoke process because of sandbox but can communicate with external process via websocket. Web services can also do.

So I want to separate the module depending on child_process. Current process handler will be changed to use client interface (Nvim in 'promised-neovim-client'?) and users will be able to specify their original client (which may use WebSocket, HTTP, and so on).

This change doesn't affect public API because users get client instance via editor.getClient() API.