Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>LashNew to Visual Studio Code? Get it now.
Lash

Lash

bosz

|
3 installs
| (0) | Free
Language support for the Lash shell — syntax highlighting, LSP diagnostics, completion, formatting, and script runner
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lash — VSCode Extension

Full IDE support for the Lash shell language.

Syntax highlighting, script runner, LSP diagnostics/completion/formatting, and DAP debugging — all native VSCode UI, no webviews, no JSON editing required.

Lash extension overview

Features

Syntax Highlighting

TextMate grammar with scopes for:

  • Keywords (let, mut, fn, if, for, match, usage, write to, unittest, ...)
  • Strings (double-quoted, single-quoted, backtick commands)
  • String interpolation ($var, ${var}, $(expr), $((arith)))
  • Escape sequences (\n, \t, \\, \$)
  • Numbers, booleans, operators, redirects, pipes
  • Function declarations, method calls, function calls
  • Assertion chains (.must.equal(), .must.contain(), etc.)
  • Comments (#)
Syntax highlighting

Script Runner (CodeLens)

Every .lash file shows CodeLens actions at line 1:

Run | Debug | Set Args                    <- no args
Run | Debug | Args: 8080 myapp | Clear    <- args configured
  • Run — executes the script in a VSCode integrated terminal
  • Debug — launches the DAP debugger with breakpoints
  • Set Args — native input box for space-separated arguments (supports quoted strings)
  • Clear — removes saved args

Arguments persist per-file in workspace state across restarts.

CodeLens actions

LSP Integration

Connects to lash-lsp when available on PATH. Provides:

  • Diagnostics (parse + semantic errors)
  • Completion (keywords, builtins, variables, functions, env vars)
  • Hover (type info, mutability, signatures)
  • Go to definition
  • Formatting (Shift+Alt+F / format-on-save)
LSP completion

Test Explorer

Integrated with VSCode's Test Explorer for unittest blocks in .lash files.

  • Tests auto-discovered from all .lash files in the workspace
  • Test names extracted from the # comment preceding each unittest block
  • Run individual tests or all tests at once from the Test Explorer sidebar
  • Inline run button next to each unittest block in the editor
  • Pass/fail results with failure messages displayed in the Test Explorer
  • Tests execute via lash <file> --test
# doubles a positive number
unittest {
    double(5).must.equal(10)
}
Test Explorer

Debugger (DAP)

Connects to lash-debug when available on PATH. Provides:

  • Breakpoints, stepping (over/into/out), continue
  • Variable inspection and stack traces
  • Hover evaluation during debug
  • F5 launches with zero config (no launch.json needed)
Debugger session

Formatter Settings

All settings under lash.formatter.*:

Setting Default Options
indentStyle spaces spaces, tabs
indentSize 4 1-8
braceStyle same-line same-line, next-line
pipelineStyle inline inline, split
pipelineThreshold 80 40-200
trailingNewline true bool
maxBlankLines 2 0-5
spaceAroundOperators true bool
spaceAfterComma true bool

Project-level overrides via .lashfmt in workspace root.

Configuration

Setting Default Description
lash.lashPath lash Path to the lash interpreter
lash.lspPath lash-lsp Path to the language server
lash.debugPath lash-debug Path to the debug adapter
lash.suppressToolCheck false Suppress missing tool notifications

Requirements

  • Syntax highlighting and script runner work standalone with no external tools
  • Test discovery works standalone (highlighting unittest blocks)
  • Running tests and scripts requires lash on PATH
  • LSP features require lash-lsp on PATH
  • Debugging requires lash-debug on PATH

Install lash from the releases page or build from source:

git clone https://gitlab.com/szabobogdan3/lash.git
cd lash
dub build --compiler=ldc2 --build=release --config=application

Build & Install

npm install
npm run compile

# Package as .vsix
npx vsce package

# Install locally
code --install-extension vscode-lash-0.1.0.vsix

Install on a Remote SSH Host

When using VS Code Remote-SSH, the extension must be installed on the remote machine:

  1. Build the .vsix as shown above.
  2. Copy it to the remote host:
    scp vscode-lash-0.1.0.vsix user@host:~/
    
  3. Connect to the remote host in VS Code (Remote-SSH).
  4. Open the Extensions sidebar, click ... > Install from VSIX..., and select the file.

Or from the remote terminal:

code --install-extension ~/vscode-lash-0.1.0.vsix

Make sure lash, lash-lsp, and lash-debug are also installed on the remote machine.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft