COMPILER

Editor extension

Install AmoJS (amojs-dev.amojs) from the VS Code Marketplace or Open VSX. A scaffolded project recommends it through .vscode/extensions.json. There is no language server and there will not be one: an AmoJS file is standard JavaScript, so hover, go-to-definition, rename and type-checking already work. The extension fills the one gap — the inside of the template string.

Highlights the template as HTML

Tags, attributes and text inside html`…` are coloured like HTML instead of like one long string, and ${…} holes go back to being JavaScript — including attribute holes such as class=${x}.

Completes HTML in there too

Tag names, attributes, attribute values and closing tags, from the same HTML language service VS Code's own .html support is built on — scoped to the static parts of an AmoJS template. Inside a hole the extension stays out of the way and the built-in JS/TS completion is what you get.

Tells you when a template is wrong

The parser accepts a strict subset and refuses to guess, so the errors are specific and appear where the problem is — and they are the same parser amo build runs, reached through the compiler's diagnose entry, so the editor and the build cannot disagree.

you wrote → you get
html`<div><p>hi</p>`          unclosed <div>                                   on the <div>
html`<div/>`                   self-closing is only valid on void elements      on the />
html`<circle r=${n}/>`         the unquoted-hole trap                           on the />
html`<div ${x}>`               a hole may only be a child or a full attribute   on the ${x}

This is the part a lit-html plugin cannot do: the browser parses those templates permissively, so there is nothing to report. Files that do not import @amojs.dev/core are left alone, and JavaScript syntax errors are left to the built-in JS/TS support rather than reported twice.

TypeScript files included

The compiler's own template detector reads JavaScript only, so the extension locates templates itself — lexically, the way a tokenizer would — in .js and .ts alike, and hands each one to the compiler's parser for the verdict. Finding a template is the editor's job; deciding whether it is legal never is.

Two commands and some snippets

AmoJS: Build and AmoJS: Eject run the CLI as a task in your workspace folder (amojs.build.mode picks csr, ssg or ssr). Snippets cover the whole API — type amo and pick.

Which gallery your editor reads

VS Code reads the Microsoft Marketplace; VSCodium, Windsurf, Gitpod and Theia read Open VSX; Cursor mirrors the Marketplace on its own schedule, so a fresh release can take a while to appear there. The extension is published to both galleries from the same file.