##vscode配置格式化
开始配置settings.json
{
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"git.ignoreMissingGitWarning": true,
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.vue": "vue",
"*.js": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"emmet.triggerExpansionOnTab": true,
"minapp-vscode.disableAutoConfig": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"diffEditor.ignoreTrimWhitespace": false,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"task.slowProviderWarning": [
"npm"
],
"workbench.iconTheme": "material-icon-theme",
"cSpell.userWords": [
"commercialtenant"
],
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"files.autoSave": "onWindowChange",
"editor.wordWrap": "on",
"fileheader.customMade": {
"Description": "文件介绍",
"version": "1.0.0",
"Author": "张三",
"Date": "",
"LastEditTime": "",
"LastEditors": "张三"
},
"fileheader.cursorMode": {
"description": "函数介绍",
"version": "1.0.0",
"param": "",
"return": "",
"author": "张三",
"Date": ""
},
"editor.quickSuggestions": {
"strings": true
},
"better-comments.tags": [
{
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "//",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "todo",
"color": "#D63B2A",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": true,
"italic": true
},
{
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
],
"emmet.extensionsPath": [
""
],
"workbench.startupEditor": "newUntitledFile",
"vetur.format.options.tabSize": 4,
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.cursorStyle": "line",
"editor.tokenColorCustomizations": {
"comments": "#43e2f7ef", // 注释
"keywords": "#d204fc", // 关键字
"variables": "#fa00bbde", // 变量名
"strings": "#f66925", // 字符串
"functions": "#efff0d", // 函数名
"numbers": "#da76ee" // 数字
},
// 选中高亮的颜色
"workbench.colorCustomizations": {
"editor.selectionHighlightBackground": "#ffe7921c",
"editor.selectionBackground": "#da7920c7", // 选中区域背景
// "editor.background": "#0f738005", // 编辑区域背景
// 侧边栏
// "sideBar.background": "#2b2b2b",
// "sideBar.foreground": "#b3b1b1",
// "sideBar.border": "#2b2b2b",
// 侧边栏列表
"list.inactiveSelectionBackground": "#bafd007a",
// "list.inactiveSelectionForeground": "#2825f6",
// "list.hoverBackground": "#f6d72585",
// "list.hoverForeground": "#dfdfdf",
// peek 窗口
"peekView.border": "#5b99fc9c",
// 顶部 tab 栏
// "tab.border": "#2e2e2e",
// "tab.activeBackground": "#c6df565b",
// "tab.activeForeground": "#cfcfcf",
// "tab.activeBorder": "#5b99fcb9",
// "tab.hoverBackground": "#2e2e2e",
// "tab.hoverBorder": "#5b99fcb9",
// "tab.inactiveForeground": "#8e8e8e",
// 最左侧工具栏
"activityBar.background": "#2e2e2e",
// 状态栏
"statusBar.background": "#2a2a2a",
// panel 窗口
"panelTitle.activeBorder": "#5b99fc5b",
"panelTitle.activeForeground": "#cfcfcf",
// 光标
"editorCursor.foreground": "#7bfc5bb9",
// 当前行
"editor.lineHighlightBackground": "#6180b65e",
// 行号栏的当前行
"editorLineNumber.activeForeground": "#0ef51a",
// 行号
"editorLineNumber.foreground": "#a53131",
// 标尺
"editorRuler.foreground": "#3f3f3f",
// 快捷提示窗口
// "editorSuggestWidget.highlightForeground": "#7bfc5ba2",
// "editorSuggestWidget.selectedBackground": "#333f5c",
// "editor.selectionHighlightBorder": "#90e97259",
// terminal 中的光标
"terminalCursor.foreground": "#7bfc5bb9",
// 侧边栏中一块区域的标题
"sideBarSectionHeader.background": "#32363d",
// 区域获取焦点时
"focusBorder": "#5b99fc36"
},
"fileheader.configObj": {
"createFileTime": true,
"language": {
"languagetest": {
"head": "/$$",
"middle": " $ @",
"end": " $/"
}
},
"autoAdd": true,
"autoAddLine": 100,
"autoAlready": true,
"annotationStr": {
"head": "/*",
"middle": " * @",
"end": " */",
"use": false
},
"headInsertLine": {
"php": 2,
"sh": 2
},
"beforeAnnotation": {
"文件后缀": "该文件后缀的头部注释之前添加某些内容"
},
"afterAnnotation": {
"文件后缀": "该文件后缀的头部注释之后添加某些内容"
},
"specialOptions": {
"特殊字段": "自定义比如LastEditTime/LastEditors"
},
"switch": {
"newlineAddAnnotation": true
},
"supportAutoLanguage": [],
"prohibitAutoAdd": [
"json"
],
"prohibitItemAutoAdd": [
"项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
],
"moveCursor": true,
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"atSymbol": [
"@",
"@"
],
"atSymbolObj": {
"文件后缀": [
"头部注释@符号",
"函数注释@符号"
]
},
"colon": [
": ",
": "
],
"colonObj": {
"文件后缀": [
"头部注释冒号",
"函数注释冒号"
]
},
"filePathColon": "路径分隔符替换",
"showErrorMessage": false,
"wideSame": false,
"wideNum": 13,
"functionWideNum": 0,
"CheckFileChange": false,
"createHeader": true,
"useWorker": false,
"designAddHead": false,
"headDesignName": "random",
"headDesign": false,
"cursorModeInternal": false
},
"javascript.updateImportsOnFileMove.enabled": "always",
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force"
},
"prettyhtml": {
"printWidth": 80,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"html.format.contentUnformatted": "",
"vsicons.dontShowNewVersionMessage": true,
"VSCodeCounter.languages": {},
"vetur.grammar.customBlocks": {
"docs": "md",
"i18n": "json"
},
"highlight.regexes": {
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *TODO(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#ffcc00",
"backgroundColor": "#ffcc00",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#ffcc00",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:FIXME|FIX|BUG|UGLY|DEBUG|HACK)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#cc0000",
"backgroundColor": "#cc0000",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#cc0000",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:REVIEW|OPTIMIZE|TSC)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#00ccff",
"backgroundColor": "#00ccff",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#00ccff",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:IDEA)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#cc00cc",
"backgroundColor": "#cc00cc",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#cc00cc",
"color": "#1f1f1f"
}
]
}
},
"[html]": {
"editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
},
"auto-close-tag.activationOnLanguage": [
"xml",
"php",
"blade",
"ejs",
"jinja",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"plaintext",
"markdown",
"vue",
"liquid",
"erb",
"lang-cfml",
"cfml",
"HTML (EEx)",
"HTML (Eex)",
"plist"
],
"auto-close-tag.disableOnLanguage": [],
"css.completion.triggerPropertyValueCompletion": false,
"html-to-css-autocompletion.folderNamesToBeExcluded": [
"node_modules"
],
"editor.parameterHints": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"workbench.colorTheme": "Atom One Dark",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"eslint.codeAction.showDocumentation": {
"enable": true
},
"editor.formatOnSave": true, //每次保存自动格式化
"vetur.format.defaultFormatter.js": "prettier-eslint",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
OK,配置完了,给自己点个赞赞