Language support for LeekScript in Visual Studio Code: syntax highlighting, diagnostics, hover (inferred types), go to definition, find references, and more via the leekscript-lsp language server.
This extension is part of the parsing workspace. Build and run from the repo root for the full stack; see CONTRIBUTING.md and ARCHITECTURE.md for where to edit what.
- leekscript-lsp available in your
$PATHor specified in a parameter. You can download it here:
cargo install leekscript-lsp-
Build the VSIX (from the
leekscript-vscodefolder):npm install && npm run compile && npx vsce package --no-dependencies
This creates
leekscript-0.1.0.vsix. -
In VS Code:
- Press Ctrl+Shift+P (Mac: Cmd+Shift+P) to open the Command Palette.
- Run “Extensions: Install from VSIX…”.
- Choose the
leekscript-0.1.0.vsixfile. - Reload the window if prompted.
Alternatively, drag
leekscript-0.1.0.vsixonto the Extensions sidebar.
- Open the extension folder:
File > Open Folder→ selectleekscript-vscode. - Press F5 to launch a new window with the extension loaded (Development Host).
- Open a
.leekfile to activate; you should get diagnostics and hover if the LSP is running.
| Setting | Description | Default |
|---|---|---|
leekscript.server.path |
Path to the leekscript-lsp executable. Use a full path if the binary is not on PATH. |
leekscript-lsp |
leekscript.loadStdlibSignatures |
Load the bundled standard library .sig files so built-in functions and constants are recognized (completion, hover, diagnostics). |
true |
leekscript.signatureFiles |
Additional paths to .sig files (e.g. custom API definitions). Paths are resolved relative to the workspace root. |
[] |
leekscript.inlayHints.enabled |
Show inlay hints for variable types (e.g. ": integer"). Requires Editor: Inlay Hints to be on. | true |
leekscript.codeLens.references |
Show “N references” code lens above functions, classes, and methods. Requires Editor: Code Lens to be enabled. | true |
For local development, set a full path for the server, for example:
{
"leekscript.server.path": "/path/to/parsing/target/debug/leekscript-lsp"
}- Syntax highlighting for
.leekfiles (keywords, strings, numbers, comments). - Diagnostics from the language server (parse errors, type errors, deprecations).
- Hover showing inferred types for expressions and variables.
- Go to Definition (F12): jump to the definition of variables, functions, and classes.
- Find References (Shift+F12): list all references to the symbol under the cursor.
- Code Lens: reference count above functions, classes, and methods (e.g. “3 references”); click to run Find All References. Enable with
leekscript.codeLens.referencesand ensure Editor: Code Lens is on.
From the leekscript-vscode folder:
npm install && npm run compile && npx vsce package --no-dependenciesPress F5 in VS Code to launch the extension in a Development Host. See CONTRIBUTING.md for extension-specific setup and the root CONTRIBUTING.md and cursor.md for workspace conventions.
Same as the leekscript-rs / leekscript-lsp project.