如何在vscode中更改React应用程序的对象键颜色



这个链接展示了如何编辑json对象键,但问题是它在我的React应用程序中不起作用。我用create-react-app做的。以下将更改json对象的颜色:

{
"name": "JSON Key - Level 0",
"scope": [
"source.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#b379a1"
}
}
}

这适用于settings.json文件,但不适用于React应用程序。

function mapAppStateToProps(appState) {
return {
currentUser: appState.user.currentUser
}
}

currentUser密钥不会更改,即使settings.json文件更改了所有json密钥的颜色。我甚至把上面链接中的所有代码都添加到了样式8层json键中,但都没有用。如何在vscode中的React应用程序中设置json键的样式?

尝试使用

{
"scope": "meta.object-literal.key",
"settings": {
"foreground": "#FF0000"
}
}

最新更新