文章目錄
- 1. 全局配置
- 2. 格式化單引
1. 全局配置
{
"vetur.ignoreProjectWarning": true,//配置Vetur插件,忽略提示
// 在方法括号之間插入空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"editor.tabSize": 2,//指定一個tab等于多少個空格,例如此處指定4就像等于4個空格,2就等于兩個空格
"editor.detectIndentation": false, //必須指定!!否則指定的tab大小将不起效果
"editor.formatOnSave": true,// 每次儲存的時候自動格式化
"editor.formatOnType": true, // 每次儲存的時候自動格式化
"editor.codeActionsOnSave": { // #每次儲存的時候将代碼按eslint格式進行修複
"source.fixAll.eslint": true
},
"workbench.iconTheme": "vscode-icons", //圖示主題
"vsicons.dontShowNewVersionMessage": true,//不顯示新版本提示資訊
"editor.fontSize": 18,//字型大小
// -------------------------Operator Mono字型設定 Start-----------------------------------
"editor.fontFamily": "Operator Mono",
"editor.fontLigatures": true, // 這個控制是否啟用字型連字,true啟用,false不啟用,這裡選擇啟用
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "italic font",
"scope": [
"comment",
"keyword",
"storage",
"keyword.control.import",
"keyword.control.default",
"keyword.control.from",
"keyword.operator.new",
"keyword.control.export",
"keyword.control.flow",
"storage.type.class",
"storage.type.function",
"storage.type",
"storage.type.class",
"variable.language",
"variable.language.super",
"variable.language.this",
"meta.class",
"meta.var.expr",
"constant.language.null",
"support.type.primitive",
"entity.name.method.js",
"entity.other.attribute-name",
"punctuation.definition.comment",
"text.html.basic entity.other.attribute-name.html",
"text.html.basic entity.other.attribute-name",
"tag.decorator.js entity.name.tag.js",
"tag.decorator.js punctuation.definition.tag.js",
"source.js constant.other.object.key.js string.unquoted.label.js",
],
"settings": {
"fontStyle": "italic",
}
},
]
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"tabnine.experimentalAutoImports": true,
"editor.quickSuggestions": {
"strings": true
}
// -------------------------Operator Mono字型設定 End-----------------------------------
}
2. 格式化單引
{
"singleQuote": true, //使用單引号, 預設false(在jsx中配置無效, 預設都是雙引号)
"semi": false // 是否使用分号, 預設true
}