prettier-plugin-zhfmt weekly downloads statistics
By lxl66566 · npm · Prettier plugins
Prettier plugin that adds spaces between CJK and Latin characters, powered by the zhfmt WASM engine
prettier-plugin-zhfmt has 1 recorded weekly downloads on npm, a decrease of 93.3% over the past 30 days, ranking #2194 of 2,256 tracked listings.
About prettier-plugin-zhfmt
prettier-plugin-zhfmt
简体中文 | English
Prettier 插件:在中文与英文/数字之间自动添加空格(盘古之白),补上 Prettier 3 移除该功能后的空缺。格式化引擎是 zhfmt 编译的 WebAssembly,与 CLI 行为完全一致。
安装
要求 Prettier >= 3.6 (peer dependency)。更早的版本不会 await parser 的 preprocess,会导致输出为空。
使用
.prettierrc:
无需其他配置。插件会包装 Prettier 内置的 markdown / mdx parser:先用 zhfmt 加空格,再交给 Prettier 自己的解析与打印。因此 Markdown 文件仍保留 Prettier 全部原生格式化能力(列表、表格、proseWrap、嵌入代码格式化等),只是额外获得中英文空格:
纯文本模式
对不想要 Prettier 重排、只要加空格的文件(.txt、.rst 等无内置 parser 的扩展名自动推断;其他文件可显式指定),使用独立 parser zhfmt:除插入空格外输出与输入逐字节一致(不增删换行、不改列表标记):
行为说明
• 只插入单个空格,从不删除任何内容;幂等。 • 代码块、inline code、链接 URL、HTML 标签内部不加空格。 • zhfmtWhitelist 选项可指定分词白名单:每条恰好两个字符,表示这两个字符之间不插入空格(如 "B站" 保持 B站 不加空格): • 详见 zhfmt 引擎边界规则。
License
MIT OR Apache-2.0
Description from the npm listing.
- prettier
- prettier-plugin
- chinese
- cjk
- pangu
- spacing
- formatter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm Prettier plugins plugins
All 20 prettier-plugin-zhfmt alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-zhfmt. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.