主题
VS Code 扩展
🌐 VS Code Extension
- 匹配工具的装饰和工具提示
- 自动加载配置
- 匹配工具的计数
命令
🌐 Commands
| 命令 | 标题 |
|---|---|
unocss.reload | UnoCSS: 重新加载 UnoCSS |
unocss.insert-skip-annotation | UnoCSS: 为所选内容插入 @unocss-skip |
配置
🌐 Configurations
| 键 | 描述 | 类型 | 默认 |
|---|---|---|---|
unocss.disable | 禁用 UnoCSS 扩展 | boolean | false |
unocss.languageIds | array | `` | |
unocss.root | 包含 UnoCSS 配置文件的项目根目录 | array,string | `` |
unocss.include | 要检测的文件目录 | array,string | `` |
unocss.exclude | 不被检测的文件目录 | array,string | `` |
unocss.underline | 为类名启用/禁用下划线装饰 | boolean | true |
unocss.colorPreview | 启用/禁用颜色预览装饰 | boolean | true |
unocss.colorPreviewRadius | 颜色预览的半径 | string | "50%" |
unocss.remToPxPreview | 在悬停时启用/禁用 rem 转 px 预览 | boolean | true |
unocss.remToPxRatio | rem 与 px 的比例 | number | 16 |
unocss.selectionStyle | 启用/禁用选择样式装饰 | boolean | true |
unocss.strictAnnotationMatch | 对注释显示位置严格把关 | boolean | false |
unocss.autocomplete.matchType | 自动补齐的匹配类型 | string | "prefix" |
unocss.autocomplete.strict | 对显示自动补齐的位置严格把关 | boolean | false |
unocss.autocomplete.maxItems | 自动补齐中显示的最大项目数 | 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.