Write HoloML in VS Code

This guide sets up VS Code, or an editor built on it, for writing HoloML pages: installing the HoloML extension from the holoml repository, what it does while you type, and what it leaves to the browser.

Install the extension

The extension is not in the VS Code Marketplace; it is built from the holoml repository and installed from a file. You need Node 24 or newer, pnpm 12, and VS Code 1.96 or newer.

  1. In a copy of the repository, install its packages and make the extension:

    pnpm install --frozen-lockfile
    pnpm --filter holoml-vscode package

    This makes packages/vscode/holoml-vscode.vsix, the file an extension is installed from.

  2. In VS Code, open the Extensions view, choose "..." at its top, then "Install from VSIX...", and pick the file. Or, from a terminal:

    code --install-extension packages/vscode/holoml-vscode.vsix
  3. Open any .holoml file. "HoloML" shows in the status bar, at the right, as the file's language.

To update it, make the file again from a newer copy of the repository and install it the same way.

While you type

Start a page by typing holoml and choosing the "New page" snippet: a title, a place to stand, and two lights.

<holoml version="0.2">
  <head>
    <title>My page</title>
  </head>
  <scene background="#101820">
    <viewpoint position="0 1.6 6" look-at="0 1 0" mode="orbit" />
    <light type="ambient" intensity="0.4" />
    <light type="directional" position="3 6 4" intensity="1.2" />
  </scene>
</holoml>

Then, as you write:

What it leaves to the browser

The extension shows no preview. To see a page, open it in HyperSpace 3D: choose "Open a HoloML file…" in its menu, or drop the file on its window. With the page open in both, save in VS Code and reload in the browser.

It also never goes on the network. It sends nothing anywhere, collects nothing, and does not fetch the files a page names, even those on the web; it runs no code from the files it opens.

Settings

Other editors

Editors that speak the Language Server Protocol (Neovim, Zed, Helix, Sublime Text, and others) can use the same checks and suggestions: after making the extension, start node packages/vscode/dist/server.js --stdio as the language server for .holoml files, as each editor's settings describe. The syntax colours are VS Code's own format (a TextMate grammar, packages/vscode/syntaxes/holoml.tmLanguage.json), which some other editors read too.