How can I attach to an existing Nvim instance via named pipe? #164
-
Since the project doesn't support import (
"log"
"net"
"github.com/neovim/go-client/nvim"
)
func WriteToPipe() {
pipePath := "/mydir/nvim.pipe"
conn, _ := net.Dial("unix", pipePath)
defer conn.Close()
nvim, _ := nvim.New(conn, conn, conn, log.Printf)
nvim.Command("echo 'Hello, world!'") // the program freezes here
nvim.Command("vsplit") // this line is never reached
} Since neovim/go-client doesn't have an attach method, I tried to implement it myself, but the program just stuck. Is there a way that I can ttach to an existing Nvim instance via named pipe? thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry my bad, should have used |
Beta Was this translation helpful? Give feedback.
Sorry my bad, should have used
Dial
instead ofNew
. I skimmed passed it because it was a strange term and the clients in Python and JS usesattach()
as the method name.