Hi there. Trying to build a small helper with this, I failed miserably. The following code prints a client, but never reaches line 32. What could be wrong? Tried it with NVIM_LISTEN_ADDRESS=127.0.0.1:7777 and the respective changes, too, no success.
addr := os.Getenv("NVIM_LISTEN_ADDRESS")
if addr == "" {
log.Fatal("NVIM_LISTEN_ADDRESS is not set")
}
sock, err := net.ResolveUnixAddr("unix", addr)
if err != nil {
log.Fatal(err)
}
c, err := neovim.NewUnixClient(neovim.NullInitMethod, "unix", nil, sock, nil)
if err != nil {
log.Fatal(err)
}
log.Printf("got client: %s\n", c)
b, err := c.GetCurrentBuffer()
if err != nil {
log.Fatal(err)
}
log.Printf("got current buffer: %s\n", b)
Hi there. Trying to build a small helper with this, I failed miserably. The following code prints a client, but never reaches line 32. What could be wrong? Tried it with
NVIM_LISTEN_ADDRESS=127.0.0.1:7777
and the respective changes, too, no success.Thanks a lot :smiley: