使用vscode alt+shift+f格式vue代码,设置如下
template 用的时pug,请问怎么设置能够使pug的缩进都4个空格,
{
"editor.fontSize": 12,
"emmet.variables": {
"lang": "zh-cn",
"charset": "UTF-8"
},
"files.associations": {
"*.wpy": "vue"
},
"workbench.startupEditor": "newUntitledFile",
"todohighlight.isEnable": true,
"todohighlight.include": [
"**/*.js",
"**/*.jsx",
"**/*.ts",
"**/*.tsx",
"**/*.html",
"**/*.php",
"**/*.css",
"**/*.scss",
"**/*.wpy",
],
"stylusSupremacy.insertColons": false,
"stylusSupremacy.insertSemicolons": false,
"stylusSupremacy.insertBraces": false,
"stylusSupremacy.insertNewLineAroundImports": false,
"stylusSupremacy.insertNewLineAroundBlocks": false,
"editor.detectIndentation": false,
"editor.tabSize": 4,
"editor.formatOnSave": true,
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
}
每个格式化的插件都不一样。你要针对每个语言的插件配置格式化方案。