Created
July 12, 2020 19:35
-
-
Save nagolove/351f79dd55eec8f9351ff43f0432d05e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local socket = require "socket" | |
| local conn = socket.connect("127.0.0.1", "6666") | |
| local mpack = require "mpack" | |
| local packer = mpack.Packer() | |
| local unpacker = mpack.Unpacker() | |
| --local inspect = require "inspect" | |
| if conn then | |
| conn:settimeout(0.1) | |
| local r1, r2 = conn:send(packer({'nvim_get_api_info()'})) | |
| r1, r2 = conn:receive("*a") | |
| print(r1, r2) | |
| conn:close() | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment