Skip to content

VS Code 扩展

🌐 VS Code Extension

在市场中安装

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

命令

🌐 Commands

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

配置

🌐 Configurations

KeyDescriptionTypeDefault
unocss.disableDisable the UnoCSS extensionbooleanfalse
unocss.languageIdsarray``
unocss.rootProject root that contains the UnoCSS configuration filearray,string``
unocss.includeDirectory of files to be detectedarray,string``
unocss.excludeDirectory of files not to be detectedarray,string``
unocss.underlineEnable/disable underline decoration for class namesbooleantrue
unocss.colorPreviewEnable/disable color preview decorationsbooleantrue
unocss.colorPreviewRadiusRadius for color previewstring"50%"
unocss.remToPxPreviewEnable/disable rem to px preview in hoverbooleantrue
unocss.remToPxRatioRatio of rem to pxnumber16
unocss.selectionStyleEnable/disable selection style decorationsbooleantrue
unocss.strictAnnotationMatchBe strict about where to show annotationsbooleanfalse
unocss.autocomplete.matchTypeThe matching type for autocompletestring"prefix"
unocss.autocomplete.strictBe strict about where to show autocompletebooleanfalse
unocss.autocomplete.maxItemsThe maximum number of items to show in autocompletenumber1000

配置

🌐 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.