Language support for SDL, a structured declarative modelling language on top of Answer Set Programming, in VS Code, Cursor, VSCodium and compatible editors. It applies to .sdl files.
Syntax errors, undeclared records, unknown attributes, duplicate record declarations
Go to Definition
Jump to the definition of a symbol
Hover
Information about the symbol under the cursor
Completion
Suggestions while typing
Formatting
Format Document (Shift+Alt+F) normalises spaces and indents continuation lines by four spaces; line breaks, comments and strings are kept, and statements that do not parse are left as they are
File icon
.sdl files show the sdlls rook in the Explorer when the icon theme has no icon of its own for SDL
Requirements
Python 3.10 or later, available on the PATH or configured through sdlAsp.pythonPath.
The language server runs in a private virtual environment that the extension creates automatically on first start. This step installs the server dependencies with pip and therefore needs network access.
Settings
Setting
Default
Description
sdlAsp.pythonPath
""
Path to the Python 3 interpreter used to create the server's virtual environment. Empty uses python3 or python from the PATH. User settings only: a workspace cannot set it, because it names an executable to run.
Credits
SDL is by Mario Alviano, Carmine Dodaro and Ilaria R. Vasile (CILC 2024). The language server parses SDL with a copy of the MIT-licensed grammar published at github.com/dodaro/SDL, bundled as server/grammar/sdl.lark together with its licence (LICENSE-SDL).