Before we can go into any exercises we need to make sure that you have the repository cloned and that your machine is setup properly. Specifically you need to have the following installed:
Make sure you have a local copy of this repository.
To build it, please go into org.xtext.calc.parent
and run:
./gradlew build
Make sure you have a Java 8 JDK installed on your machine. Also we need to install an Eclipse Oxygen distribution with Xtext at buildship installed. You can find a distribution that includes everything you need below:
Please unzip and start the downloaded Eclipse.
You can now import the eclipse projects, by using the Import Existing Projects
-Wizard.
You might need to do a clean build after importing.
The LSP4E plug.in needs additional plugins on the classpath, which you need to add to the target platform.
To do so, open the Preferences
and therein Plug-in Development/Target Platform
.
You should see an entry called LSP4E Target Platform
. Please activate and apply.
We have configured all the clients to connect to the language server via a socket.
You can launch the server by running the Run Language Server
launch config from within Eclipse.
The project org.xtext.calc.lsp4e
contains a plug-in fro LSP4E that registers a language server for our calculator example.
You can run it using the launch config Run LSP4E plug-in
.
To see the language server running in Theia, you need to execute a gradle task:
./gradlew startTheia
Please make sure the Language Server is running by using the Run Language Server
launch config from within Eclipse if not already done.
VSCode needs to be installed in advance from here.
After that execute the following task in the parent project.
./gradlew startCode
VSCode will come up with the extension already installed.