1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-22 13:11:55 +03:00
vimr/NvimMsgPack/NvimMsgPack.playground/Contents.swift

16 lines
393 B
Swift
Raw Normal View History

2017-11-26 22:25:25 +03:00
//: Playground - noun: a place where people can play
import Cocoa
import NvimMsgPack
// Start nvim as follows:
// $ NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim $SOME_FILES
2017-12-03 11:59:15 +03:00
guard let nvim = NvimApi(at: "/tmp/nvim.sock") else {
2017-11-26 22:25:25 +03:00
preconditionFailure("Could not connect to nvim")
}
2017-12-16 00:12:46 +03:00
try? nvim.connect()
2017-12-01 17:34:00 +03:00
2017-12-16 00:12:46 +03:00
nvim.rpc(method: "nvim_buf_get_option", params: [], expectsReturnValue: true)
nvim.listBufs()