User settings configured as follows: C: \ Users \ username \ AppData \ Roaming \ Code \ User \ settings.json
{ // Tab size of 2 spaces " editor.tabSize " : 2 , // Editor wrap " editor.wordWrap " : " OFF " , // when formatting saved " editor.formatOnSave " : to true , // open vscode file path navigation " breadcrumbs.enabled " : to true , // prettier set the end of the statement without a semicolon " prettier.semi " : false , // prettier setting forces the single quotation marks "prettier.singleQuote " : to true , // selected template file vue formatting tools " vetur.format.defaultFormatter.html " : " JS-the Beautify-HTML " , // vetur custom settings " vetur.format.defaultFormatterOptions " : { " JS-the Beautify-HTML " : { " wrap_attributes " : " the aligned-Multiple " }, " prettier " : { " singleQuote " :true, "semi": false, "printWidth": 100, "wrapAttributes": false, "sortAttributes": false } } }
After configuring the above code, vscode is provided automatically formatting code installed Vetur, prettier, extension