-
Notifications
You must be signed in to change notification settings - Fork 19
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
Erlang LSP errs without message. #21
Comments
I will look at that. The stdio transport is not tested as well. My guess is that something gets stuck in decoding the messages (some silly detail like not having a newline at the very end, or something like that). I hope I will be able to reproduce it - what client are you using in the editor? |
I use this client. |
The client might not be the easiest to set up. Did you run into any issue while trying so? Also, how do I print the error message, so that I have more insight into this issue, in case you might not have time to take on this issue at the moment? Thanks! |
Sorry for the delay, I had answered but shut down the PC before sending, then I forgot. Yes, I have trouble setting up the client. I haven't checked the code for a while, will have to look myself. Please feel free to persist asking how it goes, I am a little too thinly spread between different projects. |
Thanks @vladdu! Really looking forward to getting this up and going. |
Ping :) Did you have some opportunity to revisit this issue? Thanks! |
Sorry, no, I didn't. It's in the top three on my to-do list, though. |
Hi, I took a look at this and it looks like there are a few things at play. I tested this with the lsp-mode for emacs.
I've tried with some hacks to see how far I'd get:
With that in place erlang_ls starts OK but I then get some errors in the Messages buffer, like this one: eldoc error: (void-variable capability). That's where I'm at right now... Will see when I get to dig more. (FYI: I noticed some problems with the lsp-mode for TCP -- looks like it tries to connect to the TCP server before it's been successfully started and therefore gets a connection refused) Cheers, |
Klas, thanks for sharing your findings here. Would really like to get this up to a point where it's sort of usable in this regard. |
Thank you very much, Klas. I will try to get this fixed this year :-) and your detailed info helps a lot! |
Hi again! I've pushed yet another change to #22 which I hope fixes the stdio reader: bullet 1 (binaries instead of strings) and bullet 2 (accepts non-newline terminated jsonrpc text). I didn't see any problems with bullet 4 (<<>>) this time so I left that out. With this change I'm at Cheers, |
FYI: with an upgraded lsp-mode I don't get the capability errors anymore. |
@klajo, this sounds great -- how can I test your changes? |
@shoorlyne The easiest is probably to clone my fork of the repo:
check out the You can also add my fork as a remote and go from there if you want. |
I am connecting with sourcer via --transport stdio, from Microsoft's Monaco editor. After the client sends the initialize request, the language server never sends a response, causing the client to fail.
Here are the args passed to the language server when starting up:
--transport stdio -v
The request sent from the client looks like:
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"rootPath":null,"rootUri":"file:///home","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true}},"textDocument":{"synchronization":{"dynamicRegistration":true},"completion":{"completionItem":{"snippetSupport":true},"dynamicRegistration":true},"hover":{"dynamicRegistration":true},"signatureHelp":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"definition":{"dynamicRegistration":true},"codeAction":{"dynamicRegistration":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true}}},"trace":"off"}}
And the error I am seeing from the language server's output when it processes the request is:
Erlang Server: Logger - error:
And that's all it prints -- not telling what the actually error is.
Could you kindly let me know how I can print the actual error message, so that I can dig further?
Or maybe let me know why it fails, if it's possible to tell from the above info.
Thanks!
The text was updated successfully, but these errors were encountered: