neovim / go-client

Nvim Go client
https://pkg.go.dev/github.com/neovim/go-client
Apache License 2.0
561 stars 37 forks source link

How to quit neovim properly #139

Closed hismailbulut closed 2 years ago

hismailbulut commented 2 years ago

I am currently closing neovim by executing a "qa" command and it works fine. But the same command returns an error about closed session. I looked neovim documentation about any way to quit all programmatically but I couldn't found a way to do it. Is there a way to do it programmatically like an api call or am I already doing this right? If I am doing this right why Command returns an error? This question may seem strange and I am sorry for that but error message is really annoying. The error is: msgpack/rpc: session closed

justinmk commented 2 years ago

There is no formal "quit" API yet, though you could request it at https://github.com/neovim/neovim .

You could also try closing the pipe instead, if you have setup RPC over stdio, then nvim will exit itself.