Skip to content

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.

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.

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.

Add the following to your VS Code settings.json:

{
"lash.lsp.path": "lash_lsp",
"lash.lsp.args": [],
"files.associations": {
"*.lash": "lash"
}
}

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": []
}
]
}

Lash scripts use the .lash file extension. The VS Code extension registers this extension automatically for syntax highlighting, diagnostics, and debugging.

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.