# @catppuccin/vscode 中文文档

规范地址：https://npmcn.com/package/%40catppuccin/vscode/

版本：3\.18\.1
npm 元数据更新时间：2025-10-12T22:43:26.118Z
中文译文更新时间：2026-11-09T06:41:29.340Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40catppuccin/vscode
原文对照：https://npmcn.com/package/%40catppuccin/vscode/?lang=original
项目主页：https://github.com/catppuccin/vscode/tree/main/packages/catppuccin-vscode#readme
源码仓库：https://github.com/catppuccin/vscode

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.6 MB，16 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.0\.0
- 运行依赖：1 个
- 首次发布：2024-01-04T23:10:09.434Z
- 最新版本发布：2025-10-12T22:43:25.683Z
- 近 30 天下载量：4674（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：16（近 12 个月 0 个）

## 中文简介

\* 国家防范机制版本VSCode的贴心主题

## 安装

```sh
npm install @catppuccin/vscode
```

也可以使用：`pnpm add @catppuccin/vscode`、`yarn add @catppuccin/vscode`、`bun add @catppuccin/vscode`

## README

### ![Logo](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png)  
![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png) 产品 [虚拟系统](https://github.com/catppuccin/vscode) ![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png)

[![](https://img.shields.io/github/stars/catppuccin/vscode?colorA=363a4f&colorB=b7bdf8&style=for-the-badge)](https://github.com/catppuccin/vscode) [![](https://img.shields.io/github/issues/catppuccin/vscode?colorA=363a4f&colorB=f5a97f&style=for-the-badge)](https://github.com/catppuccin/vscode) [![](https://img.shields.io/github/contributors/catppuccin/vscode?colorA=363a4f&colorB=a6da95&style=for-the-badge)](https://github.com/catppuccin/vscode)

包含所有编译主题的简单国家防范机制包 [VSCode 的卡通](https://github.com/catppuccin/vscode)。 。 。 .

### 使用量

您可以使用这些定义与库类似 [志纪](https://github.com/shikijs/shiki)。 。 。 .

```console
npm install @catppuccin/vscode
pnpm add @catppuccin/vscode
yarn add @catppuccin/vscode
```

### API 密码

```ts
// the themes with default options
import { latte, frappe, macchiato, mocha } from "@catppuccin/vscode";

// alternatively, import the JSON files:
import latte from "@catppuccin/vscode/themes/latte.json" with { type: "json" };
import frappe from "@catppuccin/vscode/themes/frappe.json" with { type: "json" };
import macchiato from "@catppuccin/vscode/themes/macchiato.json" with { type: "json" };
import mocha from "@catppuccin/vscode/themes/mocha.json" with { type: "json" };
```

要自定义主题, 您可以使用 `compile()` 函数,可选通过 [vSCode 主题支持的选项](https://github.com/catppuccin/vscode/tree/main/packages/catppuccin-vsc#catppuccin-settings)。 。 。 .

```ts
import { compile } from "@catppuccin/vscode";

const myMocha = compile("mocha", {
  colorOverrides: {
    mocha: {
      base: "#000000",
      mantle: "#010101",
      crust: "#020202",
    },
  },
});
```

![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.png)

版权: 2021年至今 [猫头鹰](https://github.com/catppuccin)

[![](https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8)](https://github.com/catppuccin/catppuccin/blob/main/LICENSE)

## 常见问题

### @catppuccin/vscode 是什么？

\* 国家防范机制版本VSCode的贴心主题

### 如何安装 @catppuccin/vscode？

在项目目录运行 npm install @catppuccin/vscode，或使用 pnpm add / yarn add / bun add。

### @catppuccin/vscode 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @catppuccin/vscode 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @catppuccin/vscode 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.0\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @catppuccin/vscode 可以商用吗？

@catppuccin/vscode 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @catppuccin/vscode 的下载量有多少？

根据 npm 官方下载统计，@catppuccin/vscode 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,674 次，日均约 156 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @catppuccin/vscode 还在维护吗？

最新版本 3\.18\.1 发布于 2025/10/13（1\.1 年前）；至今共发布 16 个版本，其中过去 12 个月发布了 0 个；首次发布于 2024/01/05。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

