VS Code Extension
Lash provides full editor integration for VS Code through two protocol servers that follow standard specifications. Both communicate over stdin/stdout and work with any editor that supports the respective protocols.
LSP Server
Section titled “LSP Server”The lash_lsp binary implements the Language Server Protocol using JSON-RPC
over stdin/stdout. It provides:
- Diagnostics — real-time errors and warnings from the semantic analyzer as you type.
- Hover — type information and documentation for variables, functions, and built-in methods.
- Go-to-definition — scope-aware resolution for variables and user-defined functions.
- Code completion — context-aware suggestions including variables, functions, built-in methods, and file paths.
- Document sync — incremental document synchronization so the server stays up to date with every edit.
DAP Debug Adapter
Section titled “DAP Debug Adapter”The lash_debug binary implements the Debug Adapter Protocol over stdin/stdout.
It provides:
- Breakpoints — set breakpoints by source file and line number.
- Step execution — continue, next, stepIn, stepOut, and pause commands.
- Variable inspection — inspect variables, scopes, and the full stack trace at any breakpoint.
VS Code Configuration
Section titled “VS Code Configuration”Language Server
Section titled “Language Server”Add the following to your VS Code settings.json:
{ "lash.lsp.path": "lash_lsp", "lash.lsp.args": [], "files.associations": { "*.lash": "lash" }}Debug Adapter
Section titled “Debug Adapter”Create or update .vscode/launch.json in your project:
{ "version": "0.2.0", "configurations": [ { "type": "lash", "request": "launch", "name": "Debug lash script", "program": "${file}", "debugServer": null, "runtimeExecutable": "lash_debug", "args": [] } ]}File Extension
Section titled “File Extension”Lash scripts use the .lash file extension. The VS Code extension registers
this extension automatically for syntax highlighting, diagnostics, and
debugging.
Installation
Section titled “Installation”Search for lash in the VS Code marketplace to install the extension
directly. For manual installation or to build from source, visit the
GitLab repository and follow the
instructions in the vscode-extension/ directory.