Install the language server
The extension for VS Code and the plugin for the IDEs of JetBrains come with the server. Install it yourself for any other editor.
Every release comes with the server, built for each platform. The native executables need nothing else installed:
| Platform | File |
|---|---|
| Linux x64 | dsl-lsp-linux-x64 |
| Linux arm64 | dsl-lsp-linux-arm64 |
| macOS arm64 (Apple silicon) | dsl-lsp-macos-arm64 |
| Windows x64 | dsl-lsp-windows-x64.exe |
| Any, with Java 17 or later | dsl-lsp.jar |
| Any, with Node.js | dsl-lsp.js |
checksums.txt has the SHA-256 of each file.
Linux and macOS
Download the file of your platform, make it executable and put it on your PATH:
curl -fL -o dsl-lsp https://github.com/flock-community/dsl-lang/releases/latest/download/dsl-lsp-linux-x64
chmod +x dsl-lsp
sudo mv dsl-lsp /usr/local/bin/
On a Mac, a file downloaded with a browser instead of curl is held back by Gatekeeper until you run
xattr -d com.apple.quarantine dsl-lsp.
Windows
Download dsl-lsp-windows-x64.exe, rename it to dsl-lsp.exe and put it in a folder that is on your PATH.
Start it
The server takes no arguments and speaks the language server protocol over stdin and stdout, so you do not start it yourself: the editor starts it, and stops it again, with one of these commands.
dsl-lsp
java -jar dsl-lsp.jar
node dsl-lsp.js
Started in a terminal, it waits for a message from an editor and prints nothing; Ctrl+C stops it.
See that it works
To see that it works without an editor, let the smoke test of the
repository talk to it. It opens samples/example.dsl and checks the
highlighting, the outline, the folding, the syntax errors and what the server makes of the schema of the sample:
node tools/lsp-smoke-test.mjs -- dsl-lsp
Editors shows how to tell an editor to start the server for .dsl files.