主题
VS Code 扩展
🌐 VS Code Extension
- 匹配工具的装饰和工具提示
- 自动加载配置
- 匹配工具的计数
命令
🌐 Commands
| 命令 | 标题 |
|---|---|
unocss.reload | UnoCSS:重新加载 UnoCSS |
unocss.insert-skip-annotation | UnoCSS:为所选内容插入 @unocss-skip |
配置
🌐 Configurations
| Key | Description | Type | Default |
|---|---|---|---|
unocss.disable | Disable the UnoCSS extension | boolean | false |
unocss.languageIds | array | `` | |
unocss.root | Project root that contains the UnoCSS configuration file | array,string | `` |
unocss.include | Directory of files to be detected | array,string | `` |
unocss.exclude | Directory of files not to be detected | array,string | `` |
unocss.underline | Enable/disable underline decoration for class names | boolean | true |
unocss.colorPreview | Enable/disable color preview decorations | boolean | true |
unocss.colorPreviewRadius | Radius for color preview | string | "50%" |
unocss.remToPxPreview | Enable/disable rem to px preview in hover | boolean | true |
unocss.remToPxRatio | Ratio of rem to px | number | 16 |
unocss.selectionStyle | Enable/disable selection style decorations | boolean | true |
unocss.strictAnnotationMatch | Be strict about where to show annotations | boolean | false |
unocss.autocomplete.matchType | The matching type for autocomplete | string | "prefix" |
unocss.autocomplete.strict | Be strict about where to show autocomplete | boolean | false |
unocss.autocomplete.maxItems | The maximum number of items to show in autocomplete | number | 1000 |
配置
🌐 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.