neovim / go-client

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

Need a more detail tutorial . #73

Closed glepnir closed 5 months ago

glepnir commented 4 years ago

@zchee I think we need a more usage tutorial . I want use this lib to write a plugin. but there is only a easy example ..

zchee commented 4 years ago

@glepnir okay, I'll write a full example of how to write neovim plugin written in Go. including https://github.com/neovim/go-client/issues/68#issuecomment-609034423 and #75.

/cc @DenLilleMand

glepnir commented 4 years ago

@zchee That‘s sounds great, I am referring to yournvim-go to write the plugin. It is very useful for me.

alexaandru commented 4 years ago

+1 from me :) Trying to figure out how can I use signs (set/unset) from Go client as well as how can I read the quickfix list (or rather/better - how can I "subscribe" to it to be notified about changes, without having to re-read it over and over).

I found nothing about sings in the API though: https://neovim.io/doc/user/api.html but I know they are supported since other plugins are using them :) so :shrug:

glepnir commented 4 years ago

@alexaandru For now, you can refer to nvim-go to implement your ideas. Thanks @zchee. nvim-go gave me a lot of inspiration.

zchee commented 4 years ago

invited https://github.com/zchee/nvim-lsp which is almost for me, so internal repo. but might be more helped you

zchee commented 4 years ago

FYI: sign is https://github.com/zchee/nvim-lsp/blob/master/pkg/runtime/sign.go event is https://github.com/zchee/nvim-lsp/blob/master/pkg/runtime/event.go

glepnir commented 4 years ago

@zchee wow I accepted the invitation, and I will read it tomorrow, hoping to get more used methods.

alexaandru commented 4 years ago

Much appreciated all for the pointers and the invite!

zchee commented 4 years ago

also https://github.com/zchee/nvim-lsp/blob/master/pkg/lsp/lsp.go#L112-L133

ThreeFx commented 3 years ago

I'm currently also stuck trying to make sense of how nvim.Subscribe works.

Where is the callback that I have to register?

zchee commented 3 years ago

@ThreeFx okay, I’ll write test code. Maybe it helped you.

filmil commented 8 months ago

Hi folks. If you wonder how nvim.Subscribe works, or how to use it to get notified of autocmd events, I just figured it out using go-client, without the plugin API:

https://github.com/neovim/neovim/discussions/27371

justinmk commented 5 months ago

Remote plugins will be greatly simplified by https://github.com/neovim/neovim/issues/27949 , and we will update the docs then.