问题描述
在Dart中编程时,我想在VSCode中更改我声明的类型的颜色(并可能添加粗体,斜体和其他样式)。这可能吗?我认为这将有助于提高可读性。
I want to change the colour of my declared types (and possibly add bold, italics and other styling) in VSCode when programming in Dart. Is this possible? I think it would aid readability.
例如,我希望Widget,BuildContext和Loading Container使用不同的颜色(可能是灰色)。关键字当前为蓝色。
For example, I would like Widget, BuildContext and Loading Container to be in a different colour (maybe a grey). The keywords are in currently in blue.
@override
Widget build(BuildContext context) {
return new LoadingContainer(
推荐答案
要选择其他主题,请选择 ctrl + shft + p
键入颜色主题,然后选择一个。您还可以通过在扩展程序中输入主题来从市场中安装新主题:市场搜索栏
To select a different theme select ctrl + shft + p
type 'color theme' then choose one. You can also install new themes from the marketplace by typing 'theme' in the extensions:marketplace search bar
以获得更有限的控制力。 ..在所选颜色主题的用户设置文件中添加以下
For more finite control...in your user settings file for the selected color theme add the following
"editor.tokenColorCustomizations": {
"[Visual Studio Light]": {
"types": "#aaaaaa",
"comments": "#00dd00",
"functions": "#f00",
...也可以定义斜体,也用粗体和下划线
...can also define italics, bold and underlined too
"variables": "#f00",
"strings": "#FF5555",
"textMateRules": [
{
"scope": "keyword",
"settings": {
"fontStyle": "italic ",
}
},
这篇关于编程Dart时如何在VSCode中为我的类型着色并添加样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!