-
-
Notifications
You must be signed in to change notification settings - Fork 182
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 the Monaco Editor with an own Xtext language server #162
Comments
i am not sure what you are exactly testing but there is no server side highlighting in this scenario. |
My initial goal is to get a complete vertical connection between all components. My expectation was just that I would get to see anything in the frontend like the highlighting (or anything else, just like an indicator for a running connection). I start the |
no the 3 is correct. better
|
you may also have a look at (requires lsp 0.8.0 snapshot) |
I changed the URI and tried to connect the editor with the web socket server in xtext-languageserver-example ( Eclipse:
Browser console:
Okay I will have a look at your suggested links. Thank you very much for your help so far. |
Please debug your server |
BTW this seems as you explicitly call the stuff so you may restart everything / close the editors. This code is not working with more than one client also make sure that all the versions of monaco, languageclient, vscode etc match |
you use "monaco-editor": "^0.17.1", |
Sorry for the late reply. I was on vacation last week. After some local testing and debugging I managed to get the smallest example running. The current state is pushed into my personal project. The main issues were firstly the wrong URI and lastly I had a typo in the language id... Nethertheless thank you very much for your help. Now I can continue on my main task. |
I'm trying to connect the Monaco Editor with a language server where my own Xtext language is loaded. Before I start to build the dsl, I wanted to get a basic communication between the language server and the editor running. So therefore I'm testing with the
Hello World
basic example model. I was able to get the web socket connection running thanks to following examples:cdietrich/xtext-languageserver-example
TypeFox/monaco-languageclient
Also I was able to reproduce the JSON example successfully on the fontend side, so frontend wise everything should be fine.
Nethertheless I am failing to connect the Monaco Editor to a language server with a self defined Xtext language. My current state is pushed at nmaoez/composer-language-server where I describe how to get both sides (client/server) running for further investigation. In the Chrome network tab and in my Eclipse console I can see all messages, which are sent between server and client but the editor doesn't show anything regarding i.e. highlighting:
It seems that the client and the server are connected through the web sockets, but the messages are not forwarded to the language server.
I've been analyzing a lot of different projects, like theia-ide/sprotty or the OpenKieler/elkgraph-web project, but unfortunatly I wasn't able to figure it out. Has anyone been able to connect the Monaco Editor with their own language server and/or provide me an example? Is there maybe another approach on the backend side to get the connection running?
I am happy about any help and thanks!
The text was updated successfully, but these errors were encountered: