eclipse-jdtls / eclipse.jdt.ls

Java language server
1.74k stars 388 forks source link

Can the transport protocol use the websocket port #3213

Open liwenkai199702 opened 1 month ago

liwenkai199702 commented 1 month ago

I am currently using online code editing and Manoco Editor. I would like to use WebSocket to request LSP for code association. How do I implement this?

rgrunber commented 1 month ago

We use LSP4J for our communication and that does seem to support websockets, https://github.com/eclipse-lsp4j/lsp4j/issues/203 . The classes are under https://github.com/eclipse-lsp4j/lsp4j/tree/main/org.eclipse.lsp4j.websocket.jakarta/src/main/java/org/eclipse/lsp4j/websocket/jakarta .

I don't think we bundle this, so it's probably not supported for JDT-LS, but I would think if you built your own JDT-LS with that bundle present, it should be possible to communicate with some other client.