Sand for VS Code
The official VS Code / Cursor extension for the Sand language. It provides
language support for .sand files using the Sand LSP
language server (the sand binary), which it can download and install.
Features
- Syntax highlighting for
.sand files and for Sand code blocks embedded
in Markdown.
- Language server features powered by the
sand LSP — diagnostics,
hovers, completions, inlay hints, and more. The client also attaches to
JavaScript/TypeScript files so the server can surface Sand-related
information there.
- Automatic binary management. On activation the extension installs the
latest
sand binary if it is missing, and polls for updates every hour.
Updates install and restart the language server automatically by default
(configurable via sand.autoInstallSandBinaryUpdates). The current LSP
version is shown in the status bar.
- Dev mode for pointing the extension at a locally built
sand binary
instead of a published release.
- Test Explorer integration (opt in via
sand.testing.enable) for running
Sand tests from the editor.
- Crash reporting via Sentry (opt out via
sand.telemetry.enabled).
Authentication is handled through the Forge API. The extension fetches the
sand binary from authenticated release endpoints, so you must be signed in
with Forge Desktop to have a local credential for installation and updates to work.
Commands
All commands are available from the command palette under the Sand: prefix:
- Restart Language Server — restart the Sand LSP.
- Show Server Logs — open the Sand Language Server output channel.
- Install Latest Sand Binary — force-install the latest
sand binary.
- Check for Sand Updates — manually trigger an update check.
- Toggle Dev Mode — switch between the published binary and a local build.
- Add Sand to Path — make the
sand binary available on your shell PATH.
- Install Project Docs — run
sand docs install in the current workspace.
- Run Test / Run Tests in File / Run All Tests / Re-run Last Test /
Cancel Running Tests / Show Test Output / Open Run URL — Test Explorer
actions (require
sand.testing.enable).
Configuration
| Setting |
Default |
Description |
sand.maxNumberOfProblems |
100 |
Maximum number of problems reported by the server. |
sand.trace.server |
off |
Trace communication between VS Code and the language server. |
sand.artifactsPath |
~/Library/Application Support/sand |
Directory for installed Sand artifacts. |
sand.tmpPath |
/tmp |
Directory for temporary artifacts (e.g. archives). |
sand.devMode.enabled |
unset |
Whether developer mode is enabled. |
sand.devMode.artifactsPath |
~/Library/Application Support/sand |
Directory to check for the sand binary in dev mode. |
sand.autoInstallSandBinaryUpdates |
true |
Automatically install Sand binary updates. |
sand.credentialFilePath |
~/.iris/credentials.json |
Path to the Forge credentials file. |
sand.telemetry.enabled |
true |
Enable anonymous crash reporting. No personal data is collected. |
sand.testing.enable |
false |
Enable Test Explorer integration for Sand tests. |
Local Development
Build the extension and install it into Cursor in one step (run from the
monorepo root):
yarn install:sand-cursor-extension
This runs build:sand-vscode-extension (which bun installs and packages the
extension into sand_vscode/_extension_build/sand.vsix) and then installs the
.vsix into Cursor.
From within sand_vscode/ you can also use the package scripts directly:
bun build:client # bundle the extension with esbuild
bun watch:client # rebundle on change
bun build:extension # build + package into _extension_build/sand.vsix
bun run install:extension:cursor # install the packaged .vsix into Cursor
bun run install:extension:vscode # install the packaged .vsix into VS Code
To debug the extension, open sand_vscode/ in VS Code and run the Extension
launch configuration (.vscode/launch.json), which opens a new Extension
Development Host window.
Publishing
bun build:extension --package builds the production bundle, uploads its source
maps to Sentry, and packages _extension_build/sand.vsix. bun build:extension --publish publishes that package, unchanged, to both the
Open VSX Registry and the Visual Studio Marketplace. The
sand-vscode release smokes the package between the two.
Publishing requires the OPEN_VSX_ACCESS_TOKEN and
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN environment variables, which exist in the
appropriate CI pipeline.