Skip to main content

highlights

Use when an app uses @pierre/highlights to generate syntax-highlighted HTML or tokens, stream code, incrementally tokenize edits, or apply Zed-compatible themes and CSS variables.

来源信息

仓库
pierrecomputer/pierre
最近来源活动
2026年9月15日 19:40
检测到的 SKILL.md 语言
英语
星标
6,257
分支
228

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
5 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
highlights
description
Use when an app uses @pierre/highlights to generate syntax-highlighted HTML or tokens, stream code, incrementally tokenize edits, or apply Zed-compatible themes and CSS variables.
# `@pierre/highlights` Use `@pierre/highlights` for standalone syntax highlighting with built-in WebAssembly lexers. Choose HTML for a complete code block, tokens for a custom renderer, `StreamTokenizer` for append-only input, or `LiveTokenizer` for an editable document. ## Install ```bash pnpm add @pierre/highlights ``` Import from `@pierre/highlights`. Conditional exports initialize WebAssembly automatically for Node.js, browsers, and Cloudflare Workers. Highlighting is synchronous after import; ordinary usage needs no `init()` or language registration. ## Select a reference | Task | Reference | | -------------------------------------------------------------------------- | ----------------------------------------- | | Generate HTML or tokens, validate a language, or manage a Wasm module | [Rendering](references/rendering.md) | | Load or customize themes, switch CSS variables, or render multiple schemes | [Themes](references/themes.md) | | Tokenize streamed strings or bytes | [Streaming](references/streaming.md) | | Apply edits, prioritize a viewport, or read packed token records | [Incremental editing](references/live.md) | For file, diff, or editor components, read the [diffs skill](../diffs/SKILL.md).
在 GitHub 查看