问题描述
我想像这张图片一样更改参数字体样式。我怎样才能做到这一点? my image another image
解决方法
请参考Working with themes in vscode & Working with javascript in vscode
文件应该是jsconfig.json 在json中更改字体如下
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.parameter.function","settings": {
"fontStyle": "","foreground":"#d15a32"
}
}
]
}
,
如果您想应用自己的自定义,只需输入您的 settings.json
"editor.fontFamily": "Consolas,'Courier New',monospace"
您也可以在编辑器中更改某些规则:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"variable.parameter"
],"settings": {
"fontStyle": "italic"
}
}
]
}
在我上面做的例子中,它会为所有参数加下划线。 但是,更改字体不起作用。
有没有办法做到这一点?当然,但我不知道。 我知道一些 vscode 主题发生了变化,我可以引用的是 DarkMono。