【发布时间】:2020-04-07 12:30:54
【问题描述】:
我创建了一个简单的 VS Code 扩展,它提供了一组配置设置。这是来自package.json 的块的简化示例:
"configuration": {
"type": "object",
"title": "abc",
"properties": {
"xyz": {
"type": [
"array"
],
"items": {
"title": "Custom patterns to highlight.",
"type": "object",
"properties": {
"foreground": {
"pattern": "^[^$|^\\s]",
"type": "string",
"title": "The color.",
"description": "The foreground color that will be used for highlighting."
}
}
}
}
}
}
有没有办法将foreground 设置的类型设置为颜色而不是任何字符串?似乎没有颜色类型或类似的。
如果设置编辑器能够理解它是一种颜色并像本节一样显示颜色选择器,那就太好了:
【问题讨论】:
标签: visual-studio-code vscode-settings vscode-extensions