A basic example project for connecting the Monaco Editor with an own Xtext language server.
- Clone project
- Import as Gradle project into Eclipse
- Open command line in project folder and run following commands:
.\gradlew.bat clean build
cd monaco-editor-lsp-example
npm install- Run the
main-method in the classRunWebSocketServer3.xtendin the subproject in Eclipse. Alternatively,cdintocom.novomind.language.server.expression.websocketsand run..\gradlew.bat run. - On the command line start the frontend with the Monaco Editor:
npm run servAfter that your browser will open up localhost:8080 with a running Monaco Editor which is connected with the port 4389. See the network tab in the Chrome developer tools for more information regarding the messages which are sent between the client and the server.