Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>L^(Lhat) Language SupportNew to Visual Studio Code? Get it now.
L^(Lhat) Language Support

L^(Lhat) Language Support

Osamu Takasugi

| (0) | Free
Real-time type-check diagnostics for the L^ (lhat) language, via lhatls
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

L^ Language Support

English | 日本語

Language support for L^ (lhat) in Visual Studio Code. Open a .lh or .lton file to receive diagnostics and language features from lhatls, L^'s language server.

Symbol Highlight

Visual Scripting(WIP)

Install

Install L^ Language Support from the Visual Studio Marketplace, then open an L^ workspace. Marketplace installs the platform-specific extension package for your machine; it already contains the matching lhatls binary. No separate language-server installation or network download at editor startup is needed.

The extension supports VS Code 1.85 and newer.

If you install a generic VSIX or build the extension from source, provide a server yourself with lhat.serverPath, or put lhatls on PATH.

{
  "lhat.serverPath": "/absolute/path/to/lhatls"
}

Use lhatls.exe on Windows. An explicit setting always takes precedence over the bundled server, so it is also the way to try a locally built server.

Features

  • Syntax and semantic highlighting for L^ and LTON (.lton) files
  • Live type-checking diagnostics
  • Completion, hover information, go to definition, find references, and rename
  • Document symbols and a graph-specific outline
  • Copy Signature for copying the full inferred type of the name at the cursor
  • A read-only graph view of an L^ source file
  • Debugging through the L^ Debug Adapter Protocol implementation

Open the Command Palette and run L^: Show Graph View to switch a .lh file to its graph view. Run L^: Show Source to switch back. Set lhat.graph.openBeside to true when the graph should open in a split editor.

Debug L^ programs

The language server is included with the extension; the runtime is deliberately not. Running or debugging a program requires the standalone lhat executable from the L^ releases, either on PATH or named by lhat.runtimePath.

{
  "lhat.runtimePath": "C:\\path\\to\\lhat.exe"
}

With a .lh file active, press F5 to run it under the debugger. Breakpoints, stepping, variables, expression evaluation, conditional breakpoints, and program output are available in VS Code's normal debug views. For a repeatable configuration, use a launch.json entry such as:

{
  "type": "lhat",
  "request": "launch",
  "name": "Run current L^ program",
  "program": "${file}",
  "cwd": "${workspaceFolder}",
  "args": [],
  "stopOnEntry": false,
  "relaxed": false
}

Workspace configuration

By default, lhatls checks L^ files in the workspace. Add an lhat-lsp.json file at the workspace root to exclude generated or vendored trees, retain specific generated sources, or show relaxed-only diagnostics as warnings:

{
  "exclude": ["build/", "**/node_modules/"],
  "force_include_files": ["build/generated/api.lh"],
  "strict": false
}

If your embedding host registers its own L^ API, generate lhat-host.json at the workspace root so the language server can type-check against that API:

lhat --dump-host-api lhat-host.json

The generated file describes registrations for analysis only; it does not run host callbacks. Regenerate it whenever the host API changes.

Settings

Setting Default Purpose
lhat.serverPath empty Override the bundled language server with a path, or use lhatls from PATH when no bundled server exists.
lhat.serverAutoRestart true Restart an unexpectedly stopped server. Disable it temporarily while repeatedly rebuilding a local server on Windows.
lhat.runtimePath empty Path to the standalone lhat runtime used by Run and Debug.
lhat.graph.openBeside false Open the graph in an editor split instead of replacing the current editor.

Development

The extension itself is a TypeScript project. To run it in an Extension Development Host:

npm ci
npm run compile

Open this repository in VS Code and press F5. Build lhatls from the L^ repository and set lhat.serverPath to that executable. While rebuilding a server on Windows, set lhat.serverAutoRestart to false to keep the extension from restarting the old process before the linker can replace it.

To create a local generic VSIX:

npm run package

That generic package intentionally contains no native binary. The release workflow produces the platform-specific packages that bundle lhatls.

License

Apache-2.0. See LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft