zil-language README
This extension adds editing support for ZIL—the Zork Implementation Language—as well as MDL, which ZIL is based on. It associates itself with .zil and .mud files.
Features
This extension implements:
- Syntax highlighting
- Semantic highlighting
- Formatting
- Snippets
- Hover help
- Signature help
- Go to definition
- Go to symbol (per file or per workspace)
- Find references
- Highlight occurrences of a symbol
- Rename symbol
- Compiler diagnostics
- ZILF REPL terminal
- ZILF/ZAPF build tasks
- Source-level debugging
Requirements
ZILF
Some features require an installation of ZILF (the ZIL compiler and assembler).
The extension can automatically download and install the latest ZILF release when needed. If ZILF is not found, you'll be prompted to download it automatically, or you can use the "ZIL: Download ZILF" command from the Command Palette.
Alternatively, you can manually download the latest release (e.g. zilf-0.10.0-win-x64.zip), extract it somewhere, and set the zil.compiler.path and zil.assembler.path settings to point to those files.
ZLR (optional)
Debugging requires a recent build of ZLR, a Z-machine interpreter.
A compatible build (ConsoleZLR) is included with this extension, so no additional setup is required for debugging. If you have another ZLR build you prefer to use, you can configure the extension to use it by setting zil.debugger.path.
NOTE: The debugger has only been tested on Windows so far.
Extension Settings
This extension contributes the following settings, which can be customized per folder:
zil.autoDetect: enable/disable the ZIL build tasks
zil.mainFile: the name of the main .zil file, or null to use the name of the folder with .zil added
zil.glulx: use Glulx mode for background compilations/diagnostics (true for --glulx, or "glulx16" for --glulx16, or an object mapping main-file paths to those values). Glulx projects do not get build/debug tasks.
zil.compiler.path: path to zilf.exe
zil.assembler.path: path to zapf.exe
zil.debugger.path: path to ConsoleZLR.exe (optional)
Known Issues
IntelliSense
- Definitions in ZIL code are only reindexed when the file is saved.
Debugger
- The debugger has only been tested on Windows.
- Breakpoints can't be set while the game is running.
- Workaround: Pause the game, set the breakpoint, resume.
- Source line breakpoints can't be set in some cases where the extension and ZILF calculate different
relative paths for the source file.
- Workaround: Set a named function breakpoint.
Acknowledgements
This project's ongoing development is made possible by the hosting services generously provided by Octobus and Clever Cloud.