-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Connecting monaco with Yang language server #160
Comments
@OmReddy Have you tried connecting with other language servers? Do those work? |
@rcjsuen the examples given with the Monaco language server are working for me |
Perhaps you could try launching the YANG language server from the command line and sending things directly in from there or try connecting to it with a different language client? Or maybe not use web sockets? The VS Code extension for YANG doesn't seem very complicated so it seems like it shouldn't be hard to start the server. |
@cdietrich @tocjent |
either you can add/trim the header on the server. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi,
I am having trouble to use this in my example. I am trying to connect to Yang language server (via web socket based) . I just modified few things to connect to Yang-LSP.
In client.js harcoding my yang-lsp server
function createUrl(path: string): string {
const protocol = location.protocol === 'https:' ? 'wss' : 'ws';
return normalizeUrl(
${protocol}://localhost:5007
);}
languageclient does try to connect to my language server. However, the language server throwing below error...
`java.lang.IllegalStateException: Missing header Content-Length in input "GET / HTTP/1.1
Host: localhost:5007
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://localhost:3000
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Sec-WebSocket-Key: 0ssCC+n3Mw6RpB2c+3COYw==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
"
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)`
its asking for Content-Length
I have already gone through the whole discussion around HTTP and LSP protocol and stuff
I didn't find any fix or workaround mentioned any where.
Does it require some intermediate parser logic from yang file to stream?
Any help/guidance will be appreciated
Thank you
Om Reddy
The text was updated successfully, but these errors were encountered: