Skip to content

VS Code 扩展

🌐 VS Code Extension

在市场中安装

  • 匹配工具的装饰和工具提示
  • 自动加载配置
  • 匹配工具的计数

命令

🌐 Commands

命令标题
unocss.reloadUnoCSS: 重新加载 UnoCSS
unocss.insert-skip-annotationUnoCSS: 为所选内容插入 @unocss-skip

配置

🌐 Configurations

描述类型默认
unocss.disable禁用 UnoCSS 扩展booleanfalse
unocss.languageIdsarray``
unocss.root包含 UnoCSS 配置文件的项目根目录array,string``
unocss.include要检测的文件目录array,string``
unocss.exclude不被检测的文件目录array,string``
unocss.underline为类名启用/禁用下划线装饰booleantrue
unocss.colorPreview启用/禁用颜色预览装饰booleantrue
unocss.colorPreviewRadius颜色预览的半径string"50%"
unocss.remToPxPreview在悬停时启用/禁用 rem 转 px 预览booleantrue
unocss.remToPxRatiorem 与 px 的比例number16
unocss.selectionStyle启用/禁用选择样式装饰booleantrue
unocss.strictAnnotationMatch对注释显示位置严格把关booleanfalse
unocss.autocomplete.matchType自动补齐的匹配类型string"prefix"
unocss.autocomplete.strict对显示自动补齐的位置严格把关booleanfalse
unocss.autocomplete.maxItems自动补齐中显示的最大项目数number1000

配置

🌐 Config

为了获得最佳的 IDE 体验,我们建议你 使用单独的 uno.config.ts 文件 来配置你的 UnoCSS。

🌐 To get the best IDE experience, we recommend you to use a separate uno.config.ts file for configuring your UnoCSS.

扩展将尝试在你的项目中查找 UnoCSS 配置。如果未找到配置,扩展将被禁用。

🌐 The extension will try to find the UnoCSS configurations under your project. When there is no config found, the extension will be disabled.

图标预设

🌐 Icons Preset

如果你正在使用 Icons Preset,你也可以安装 Iconify IntelliSense 来获得图标的内嵌预览、自动补全和悬停信息。

🌐 If you're using the Icons Preset, you can also install Iconify IntelliSense to get inlay preview, auto-completion, and hover information for your icons.