-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to implement #1
Comments
@kirides I'll describe later :) |
@kirides BTW, Now I develop client side (still private) So I didn't checks server side code for now, sorry :( But I planned asm-language-server using this package, so I'll adding more testcase and checks server side code correctly. |
Did you get any further on developing this? I'm interested in developing a language server for a language that's implemented in Go. Having a base platform would be very useful. |
@a-h will reply, and write example as much as possible :) |
Thanks, I did find something that worked for me, so don't feel any pressure! I've put together an example here in case it's useful for you: https://github.com/a-h/qt-lsp It's my first attempt at getting an LSP going. |
@a-h for now, I'll invite you to my private repository which is lsp client side. |
You can take a look at my language server implementation for daedalus (a scripting language) the important code for initialization and handling of commands is in initialization: https://github.com/Kirides/DaedalusLanguageServer/blob/master/main.go This approach works fine for my current use case |
@kirides Hi! Will you continue to support a low-level interface I initialize the server like this. srv := &myServer{}
err := jsonrpc2.ListenAndServe(ctx, "tcp", "127.0.0.1:10001", jsonrpc2.HandlerServer(srv.Handler), 0)
...
type myServer struct {}
func (s *myServer) Handler(ctx context.Context, reply jsonrpc2.Replier, r jsonrpc2.Request) error { ... } But I has to convert into anything... I haven’t come up with a beautiful solution yet. |
@gebv in my current implementation, you could take |
How do you implement a language server using this repository?
I tried the following and it creates nilpointer exceptions because "Server" is empty
Initialized like this:
produces
which happens in
server_json.go
The text was updated successfully, but these errors were encountered: