vim-node-rpc v0.1.34
vim-node-rpc
This module is made to make vim start a messagepack server as neovim does, so that neovim remote plugins could work for vim.
Tested on vim 8.1.150, could works, but still W.I.P.
Install
If you're using coc.nvim, you don't need this module any more.
How it works


Play with it
Install python-client (used for testing) by:
pip install pynvimStart testing service by:
./start.shNow you can control your vim with python-client from neovim.
Have fun.
API
nvim#rpc#start_server()start server.nvim#rpc#check_client({clientId})check if clientId available.nvim#rpc#request({clientId}, {method}, [{arguments}])send request.nvim#rpc#notify({clientId}, {method}, [{arguments}])send notification.
The clientId would be send to client on method nvim_api_get_info as
channelId of neovim.
A client can connect to exists RPC server by listen to $NVIM_LISTEN_ADDRESS
like neovim client.
Limitation
There're some methods that no clear way to implement for vim:
nvim_execute_luanvim_inputnvim_buf_attachnvim_buf_detachnvim_get_hl_by_namenvim_get_hl_by_idnvim_buf_get_keymapnvim_buf_get_commandsnvim_buf_add_highlightnvim_buf_clear_highlightnvim_replace_termcodesnvim_subscribenvim_unsubscribenvim_get_color_by_namenvim_get_color_mapnvim_get_keymapnvim_get_commandsnvim_get_chan_infonvim_list_chansnvim_parse_expressionnvim_get_proc_childrennvim_get_proc
Some methods requires python support of vim to work, you should either have
has('python') or has('python3') to 1 with vim.
Performance
Here's the performance data on my mac use CPU: 2.6 GHz Intel Core i7
Request data from vim:
1Mbaround 13ms100kb< 5ms10kb< 1ms
Request data from server:
1Mbaround 53ms100kb< 7ms10kb< 2ms
LICENSE
MIT
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago