How can I write a NeoVim plugin with JavaScript?
<p>I heard that one of the advantages of NeoVim is a more flexible plugin architecture.
Is there an API for writing plugins in JS?</p>

<p>There are some projects which seem to be related to this:
<a href="https://github.com/neovim/node-host" rel="noreferrer">neovim/node-host</a>,
<a href="https://github.com/neovim/node-client" rel="noreferrer">neovim/node-client</a>, <a href="https://github.com/fritzy/node-neovim" rel="noreferrer">fritzy/node-neovim</a>, <a href="https://github.com/rhysd/promised-neovim-client" rel="noreferrer">rhysd/promised-neovim-client</a>
but I'm not sure how to use them.
How do I access <a href="http://vimdoc.sourceforge.net/htmldoc/eval.html#functions" rel="noreferrer">Vim functions</a> or commands, or equivalent functionality (and where is this documented)?</p>

<hr>

<p>promised-neovim-client interacts with a NeoVim process by attaching to its stdin and stdout.
So maybe from within NeoVim, I could start a promised-neovim-client script and pass it the pid of the running NeoVim process and the script could attach to its stdin and stdout?</p>