Xtext-based tool support for the Metafacture Flux language
The project org.metafacture.flux.vsc
provides an extension for Visual Studio Code / Codium for flux
via the language server protocol (LSP). In the current state the extension supports auto completion, simple syntax highlighting and auto closing brackets and quotes. This project was created using the tutorial and the corrresponding example.
Build extension:
Important
There is a problem when building the extension on Windows and installing the extension on a Linux system afterwards. In some cases the Xtext Server won't start. So if you want to use the extension not only on Windows, build the extension on a Linux system or on a Linux Subsystem on Windows.
- Install Visual Studio Code / alternative: VS Codium
- Install Node.js (including npm)
- Clone metafacture-flux project and change directory
git clone https://github.com/metafacture/metafacture-flux.git
cd metafacture-flux
- In metafacture-flux execute:
Unix:
./gradlew installServer
Windows:.\gradlew.bat installServer
- In org.metafacture.flux.vsc execute (tip: if you use windows, install cygwin to execute npm commands):
npm install
To start the extension in development mode, follow A. To create an vsix file to install the extension permanently follow B.
A) Run in dev mode:
- Open org.metafacture.flux.vsc in Visual Studio Code / Codium
- Launch vscode extension by pressing F5 (opens new window of Visual Studio Code)
- Open new file (file-ending .flux) or open existing flux-file
B) Install vsix file:
- Install vsce:
npm install -g vsce
- In org.metafacture.flux.vsc execute:
vsce package
vsce will create a vsix file in the vsc directory which can be used for installation: - Open VS Code / Codium
- Click 'Extensions' section
- Click menu bar and choose 'Install from VSIX...'