Recipes
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, and packages/javascript/markdown-it-lumis/examples.
- Minimal HTML
- Auto-detect language
- Linked HTML with CSS theme file
- Multi-theme HTML
- Terminal output
- Line Highlighting
- Wrap output with custom HTML
- Custom theme from JSON
- Injected languages (HTML + CSS + JS)
- 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
- Pre-download parsers (CLI)
- Repeated highlighting (JavaScript)
- Browsers / CDN
- Local WASM bundle