javascript - 不允许使用属性字符串
问题描述
我正在更改我的主题属性,例如comment
VS Code 中的前景色。
editor.tokenColorCustomizations
在settings.json
文件中使用。
"editor.tokenColorCustomizations": {
"[Tinacious Design (legacy, 2016)]": {
"comments": "#797979",
"string": "#898989",
}
}
颜色已comments
完美更改,但是当我为该string
值分配颜色时,它显示错误:
“不允许使用属性字符串。”
错误图像
解决方案
“字符串”关键字是保留名称,不能用于定义属性。有点像为什么你自己的名字不能给别人。设置字符串颜色的正确方法是
"strings": "//color Hex"
推荐阅读
- javascript - 如何将 Bootstrap 4 轮播与一组控件同步?
- python - 使用 numpy reshape((-1,1)) 的替代方法
- python - cython vs python numpy 用于(简单地)添加数组
- android - Retrofit2,调试和发布版本的不同行为
- json - 如何在firebase实时数据库中向大JSON对象添加另一个属性
- ios - 如何从 Firebase 数据库中删除特定的子值
- javascript - 我正在尝试使用 javascript 从 Web 解析 JSON,但它不起作用
- svg - 使用 RSelenium 和 XPath 查找 SVG 元素
- php - 如何将值转换为数组 PHP
- vue-cli - 使用 vue-cli 时,jointjs 中的自定义元素错误