Installation
Install Lumis for CLI, Rust, Elixir, JavaScript / TypeScript, Browsers / CDN, Edge / Workers, Java, and Python.
npm install @lumis-sh/lumis @lumis-sh/themes @lumis-sh/wasm-javascriptUse @lumis-sh/lumis for the per-language WASM runtime and
@lumis-sh/themes for bundled themes. A parser is an ordinary dependency too:
add one @lumis-sh/wasm-* package per language you highlight, or a bundle such
as @lumis-sh/wasm-bundle-web, and import the language from it:
import javascript from '@lumis-sh/wasm-javascript';Node.js, Bun, Deno, edge runtimes such as Supabase Edge Functions, Cloudflare Workers and Vercel, and browsers use the same imports. The packages include TypeScript declarations; JavaScript and TypeScript apps use the same imports. The language catalog has every npm package name. See Declaring parsers for package selection and Preloading languages to load them before highlighting.
Choose one of Lumis's 8 runtimes above. Lumis4J for Java and fastpylight for Python are community-maintained packages with their own APIs and releases.