How can I attach to an existing Nvim instance via named pipe? #164
Answered
by
ziontee113
ziontee113
asked this question in
Q&A
-
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.
Answered by
ziontee113
Mar 2, 2024
Replies: 1 comment
-
Sorry my bad, should have used |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
justinmk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.