This is an Example showing the Visual Studio Code Integration of Xtext using the Microsoft Language Server Protocol.
Requires Visual Studio Code (VS Code) with version 1.4.0 or greater to be on the path as code and Java 8+ available as java.
- Run
./gradlew startCode
This will start VS Code and after a few seconds load the demo folder of this repository.
vscode-extension(node based VS Code extension to run with a separate server using socket)vscode-extension-self-contained(node based VS Code extension to run with a embedded server using process io)org.xtext.example.mydsl(contains the dsl)org.xtext.example.mydsl.ide(contains the dsl specific customizations of the Xtext language server)org.xtext.example.mydsl.tests
- Make sure that
java -versionis executable and pointing to a Java 8+ JDK. - Type
code. If the command is not known, open VS Code and select View / Command Palette. Entercodeand select to installcodeon the path. - Run
./gradlew startCodeto build the DSL and the VS Code extensions.
- Install the self-contained extension into VS Code using
code --install-extension vscode-extension-self-contained/build/vscode/vscode-extension-self-contained-0.0.1.vsix - Run a second instance of vscode on the demo folder
code demo
- Run
./gradlew runor launch RunServer from Eclipse. - Open
vscode-extensionin VS Code andF5to launch new editor (you may need a Debug -> Start Debugging initally). - Open folder
demoin the new editor.
npm install vsce
cd vscode-extension
vsce package
cd ../vscode-extension-self-contained
vsce package