File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
static/snapshots/tutorial Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 4444在文件` setting.json ` 的源码视图中,通过定义` "editor.tokenColorCustomizations" ` 字段来自定义您喜欢的主题颜色。[ 可自定义代码颜色的相关参数] ( /Tutorial/Other/themes_param#文本编辑区 )
4545
4646``` json
47- "editor.tokenColorCustomizations" : {//仅对新着色生效
47+ "editor.tokenColorCustomizations" : {
4848 "[Default]" : {//绿柔
4949 "rules" :[
5050 {
5353 "fontStyle" : " italic" ,
5454 "foreground" : " #248C85"
5555 }
56- },
57- {
58- "scope" : " punctuation.definition.comment" ,
59- "settings" : {
60- "fontStyle" : " italic" ,
61- "foreground" : " #248C85"
62- }
6356 }
6457 ]
6558 },
7669}
7770```
7871
72+ ** 目前可以采用以下步骤简便的自定义代码颜色:**
73+
74+ 1 . 在` settings.json ` 源码视图中加入` "editor.tokenColorCustomizations" ` 设置(** 必须执行该步骤才能看到后面步骤的菜单项** )
75+ 2 . 将光标放到要改颜色的代码位置,选择菜单` 工具 ` -` 主题 ` -` Inspect Tokens And Colors ` 查看当前代码着色信息
76+ 3 . 将上一步控制台输出的` Token Color Rule ` 内容拷贝到` settings.json ` 的` "editor.tokenColorCustomizations" ` 对应位置(** 注意:要放到对应的主题下** )
77+ 4 . 保存` settings.json ` 文件后即可看到修改后的效果
78+
79+ ** 完整的操作动画如下图** :
80+
81+ <img src =" /static/snapshots/tutorial/custom_token_color.gif " style =" border : 1px solid #eee ;border-radius : 5px ; " />
82+
7983注意:
8084
8185* 目前只能在现有的3个主题Default柔和、Monokai酷黑、Atom One Dark雅蓝的基础之上复写,不能完全更新新主题。
82- * 自定义编辑器代码颜色,目前只对` JavaScript(ES6+) ` 、` HTML(ES6+) ` 、` Vue ` 、` CSS ` 、` Less ` 、` SCSS ` 、` Stylus ` 、` Typescript ` 、` Markdown ` 语言生效。
86+ * 自定义编辑器代码颜色,目前只对` JavaScript(ES6+) ` 、` HTML(ES6+) ` 、` Vue ` 、` CSS ` 、` Less ` 、` SCSS ` 、` Stylus ` 、` Typescript ` 、` Markdown ` 、 ` JSON ` 语言生效。
8387
8488
8589## 文件图标
You can’t perform that action at this time.
0 commit comments