修改VSCode默认的注释样式

VSCode默认的注释样式是斜体的,下面介绍怎么把斜体设置为正常字体。
1. 首先打开设置,搜索setting.json,然后点击在setting.json中编辑 修改VSCode默认的注释样式
文章图片

2. 在VSCode设置文件setting.json中,添加如下代码:

"editor.tokenColorCustomizations": { "textMateRules": [ { "name": "Comment", "scope": [ "comment", "comment.block", "comment.block.documentation", "comment.line", "comment.line.double-slash", "punctuation.definition.comment", ], "settings": { "fontStyle": "", //斜体 "fontStyle": "italic", //斜体下划线 "fontStyle": "italic underline", //斜体粗体下划线 "fontStyle": "italic bold underline", } }, ] },

【修改VSCode默认的注释样式】保存即可,注释默认斜体就没了。即使更换主题,也不会影响注释的设置。

    推荐阅读