neovim / go-client

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

Allow to perform naked RPC requests #42

Closed daskol closed 5 years ago

daskol commented 5 years ago

In order to avoid situation when NeoVim API is updated but there is no support in Golang client I propose the method Nvim.Invoke(). This allow everybody to use the newest API level as soon as possible. As example pull request #36 is under review about half a year.

daskol commented 5 years ago

@zchee @garyburd @justinmk Any feedback?

garyburd commented 5 years ago

Note the comment at the top of apiimp.go. Do not edit the file because it's automatically generated.

Move the methods to nvim.go near the Call methods as the methods are very similar.

I am uncertain about the name Invoke, but I cannot think of anything better. Because the Nvim and Batch types have method names derived from the Nvim API, the name should not be something that Nvim is likely to use in the future.

justinmk commented 5 years ago

Most Nvim clients would call this Request(). Is there a reason not to use that name?

justinmk commented 5 years ago

LGTM. Let's wait a day for further comments (ping me if I forget).

garyburd commented 5 years ago

LGTM