Recipes
Recipes
Copy-paste Lumis recipes for common highlighting tasks across runtimes.
Copy-paste recipes for common tasks.
For runnable demos and full integration apps, see the package example directories in crates/lumis/examples, packages/elixir/lumis/examples, packages/javascript/lumis/examples, packages/javascript/react/examples, packages/javascript/rehype-lumis/examples, packages/javascript/markdown-it-lumis/examples, and packages/javascript/vite/examples.
- Minimal HTML
- Auto-detect language
- Linked HTML with CSS theme file
- Multi-theme HTML
- Terminal output
- Rainbow brackets
- Line Highlighting
- Line Numbers
- Wrap output with custom HTML
- Custom theme from JSON
- Injected languages (HTML + CSS + JS)
- Highlight diffs
- Phoenix LiveView rendering
- Stream output to a file (Rust)
- Generate CSS from a theme (Rust)
- List languages and themes
- Generate a theme from a Neovim colorscheme
- Warm up parsers across runtimes
- Repeated highlighting (JavaScript / TypeScript)
- Browsers / CDN
- Local WASM bundle