左键单击文件–首选项–设置–点击标记的按钮
setting.json文件代码如下(直接复制进去保存就可):
{
"workbench.iconTheme": "vscode-icons",
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"editor.renderIndentGuides": false,
"window.zoomLevel": 0,
"editor.autoClosingBrackets": "always",
"editor.autoClosingQuotes": "always",
"files.autoSave": "afterDelay",
"editor.minimap.enabled": true,
"breadcrumbs.enabled": true,
"editor.mouseWheelZoom": true,
"update.enableWindowsBackgroundUpdates":true,
"background.enabled":true,
"background.customImages": [""],
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "100% 100%",
"background-repeat": "no-repeat",
"opacity": 0.2
},
"background.useFront": true,
"background.useDefault": false,
"git.ignoreMissingGitWarning": true,
"editor.fontFamily": "Consolas, mononoki,'Courier New', monospace",
"editor.renderLineHighlight": "none",
"editor.lineHeight": 18,
"editor.roundedSelection": false,
"editor.fontSize": 16,
"workbench.colorCustomizations": {
"[Quiet Light]":{
"editor.foreground": "#201515",
"editor.selectionHighlightBorder": "#94767c00",
"editor.selectionHighlightBackground": "#ff000078",
"editorIndentGuide.activeBackground":"#81868d",
"editorBracketMatch.background": "#ca9fdb5e",
"editorBracketMatch.border": "#ff0000",
"tab.activeBackground": "#ad9cd4b2",
"textLink.foreground": "#d6561ac4",
"descriptionForeground": "#ff0000",
"selection.background": "#b98cd693",
"textBlockQuote.background":"#b89a9a",
"textSeparator.foreground": "#86c2df"
},
},
"editor.tokenColorCustomizations": {
"[Quiet Light]":{
/* "comments": "#82e0aa",
"strings": "#519657",
"functions": "#7e57c2",
"keywords": "#8e1da1",
"variables":"#e57373",
"numbers": "#e62020", */
"comments": "#82e0aa", // 注释
"keywords": "#0a0", // 关键字
"variables": "#f00", // 变量名
"strings": "#e2d75dbd", // 字符串
"functions": "#5b99fcc9", // 函数名
"numbers": "#AE81FF", // 数字
"textMateRules": [
{
"name": "Comment",
"scope":[
"comment"
],
"settings": {
"foreground": "#a7cca8",
"fontStyle": ""
}
},
{
"name": "[VSCODE-CUSTOM] PHP Punctuation Variable Definition",
"scope": "punctuation.definition.variable.php",
"settings": {
"foreground": "#e57373"
}
},
{
"name": "String",
"scope":[
"string"
],
"settings": {
"foreground": "#32a504",
"fontStyle": ""
}
},
{
"name": "HTML:Tags",
"scope":[
"meta.tag",
"punctuation.definition.tag.html",
"punctuation.definition.tag.begin.html",
"punctuation.definition.tag.end.html"
],
"settings": {
"foreground": "#4b4444",
"fontStyle": ""
}
},
{
"name": "HTML:Tag Names",
"scope":"entity.name.tag",
"settings": {
"foreground": "#a617e9",
"fontStyle": ""
}
},
{
"name": "HTML: Attribute Names",
"scope": [
"meta.tag entity.other.attribute-name",
"entity.other.attribute-name.html"
],
"settings": {
"fontStyle": "italic",
"foreground": "#f31616"
}
},
{
"name": "Operator",
"scope":"keyword.operator",
"settings": {
"foreground": "#e21d1d",
"fontStyle": ""
}
}
]
}
},
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"editor.quickSuggestions": {
"strings": true
},
"editor.wordWrap": "on"
}
ps:其实vscode自带的几个主题样式不错的,我比较喜欢的暗黑系列的,比如 深色 、Monokai,浅色系列的比如 Quiet Light,我之前还加过背景图片、设置透明度,但现在使用的都是vscode默认的设置,其实没必要搞那么花里胡哨的,自己看着舒服,好好敲代码就完事了,加油加油~