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
2017-12-15 22:12:46 +01:00

16 lines
393 B
Swift

//: 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
guard let nvim = NvimApi(at: "/tmp/nvim.sock") else {
preconditionFailure("Could not connect to nvim")
}
try? nvim.connect()
nvim.rpc(method: "nvim_buf_get_option", params: [], expectsReturnValue: true)
nvim.listBufs()