go-client icon indicating copy to clipboard operation
go-client copied to clipboard

Need a more detail tutorial .

Open glepnir opened this issue 5 years ago • 12 comments

@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 ..

glepnir avatar Jun 18 '20 15:06 glepnir

@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

zchee avatar Jun 26 '20 07:06 zchee

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

glepnir avatar Jun 26 '20 13:06 glepnir

+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:

alexaandru avatar Jul 06 '20 11:07 alexaandru

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

glepnir avatar Jul 09 '20 09:07 glepnir

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

zchee avatar Jul 09 '20 16:07 zchee

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

zchee avatar Jul 09 '20 16:07 zchee

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

glepnir avatar Jul 09 '20 17:07 glepnir

Much appreciated all for the pointers and the invite!

alexaandru avatar Jul 09 '20 17:07 alexaandru

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

zchee avatar Jul 09 '20 22:07 zchee

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

Where is the callback that I have to register?

ThreeFx avatar Mar 23 '21 21:03 ThreeFx

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

zchee avatar Mar 24 '21 05:03 zchee

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

filmil avatar Feb 08 '24 09:02 filmil

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

justinmk avatar May 08 '24 10:05 justinmk