text: (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{151:function(t,e,s){"use strict";s.r(e);var a=s(0),r=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._m(1),t._m(2),t._m(3),t._m(4),t._m(5),s("p",[t._v("Current default:")]),t._m(6),t._m(7),s("p",[t._v("Settings precedence:")]),s("ol",[t._m(8),s("li",[s("code",[t._v("prettier.*")]),t._v(". You can install "),s("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",target:"_blank",rel:"noopener noreferrer"}},[t._v("Prettier extension"),s("OutboundLink")],1),t._v(" to get IntelliSense for settings, but Vetur will work without it.")])]),t._m(9),t._m(10),s("p",[t._v("VS Code's js/ts formatter built on TypeScript language service.")]),t._m(11),t._m(12),t._m(13),s("p",[t._v("Alternative html formatter. Deprecated, turned off by default and will be removed soon.\njs-beautify is not actively maintained and has many long-standing bugs. Use at your own risk.")]),t._m(14),s("p",[t._v("Default settings are "),s("a",{attrs:{href:"https://github.com/vuejs/vetur/blob/master/server/src/modes/template/services/htmlFormat.ts",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(". You can override them by setting "),s("code",[t._v("vetur.format.defaultFormatterOptions.js-beautify-html")]),t._v(".")]),t._m(15),t._m(16),t._m(17),s("p",[t._v("Other settings are read from "),s("code",[t._v("stylusSupremacy.*")]),t._v(". You can install "),s("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=thisismanta.stylus-supremacy",target:"_blank",rel:"noopener noreferrer"}},[t._v("Stylus Supremacy extension"),s("OutboundLink")],1),t._v(" to get IntelliSense for settings, but Vetur will work without it. A useful default:")]),t._m(18),t._m(19),s("p",[t._v("I plan to contribute to "),s("a",{attrs:{href:"https://github.com/reshape/reshape",target:"_blank",rel:"noopener noreferrer"}},[t._v("reshape"),s("OutboundLink")],1),t._v(" formatter and drop js-beautify eventually.")])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"formatting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatting","aria-hidden":"true"}},[this._v("#")]),this._v(" Formatting")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Vetur has support for formatting embedded "),e("code",[this._v("html/css/scss/less/postcss/stylus/js/ts")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v('Vetur only has a "whole document formatter" and cannot format arbitrary ranges.')]),e("br"),e("strong",[this._v("As a result, only "),e("code",[this._v("Format Document")]),this._v(" command will be available.")]),e("br"),e("strong",[e("code",[this._v("Format Selection")]),this._v(" command wouldn't work.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("html formatting is disabled by default. See "),e("a",{attrs:{href:"#js-beautify-html-deprecated"}},[this._v("js-beautify-html")]),this._v(".")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"formatters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatters","aria-hidden":"true"}},[this._v("#")]),this._v(" Formatters")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Choose each language's default formatter in VS Code config, "),e("code",[this._v("vetur.format.defaultFormatter")]),this._v(".\n"),e("strong",[this._v("Setting a language's formatter to "),e("code",[this._v("none")]),this._v(" disables formatter for that language.")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.html"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"none"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.css"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.postcss"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.scss"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.less"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.stylus"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"stylus-supremacy"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.js"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatter.ts"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v('"prettier"')]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"prettier"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#prettier","aria-hidden":"true"}},[this._v("#")]),this._v(" prettier")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("code",[this._v(".prettierrc")]),this._v(" at project root. See format at https://prettier.io/docs/en/configuration.html")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("ESLint integration: "),e("code",[this._v('"prettier.eslintIntegration": true')]),this._v(". Settings are read from "),e("code",[this._v(".eslintrc")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"vscode-typescript"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vscode-typescript","aria-hidden":"true"}},[this._v("#")]),this._v(" vscode-typescript")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[s("code",[t._v("tabSize")]),t._v(" and "),s("code",[t._v("insertSpaces")]),t._v(" are read from "),s("code",[t._v("editor.tabSize")]),t._v(" and "),s("code",[t._v("editor.insertSpaces")]),t._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Other settings are read from "),e("code",[this._v("javascript.format.*")]),this._v(" and "),e("code",[this._v("typescript.format.*")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"js-beautify-html-deprecated"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#js-beautify-html-deprecated","aria-hidden":"true"}},[this._v("#")]),this._v(" js-beautify-html [deprecated]")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[s("code",[t._v("tabSize")]),t._v(" and "),s("code",[t._v("insertSpaces")]),t._v(" are read from "),s("code",[t._v("editor.tabSize")]),t._v(" and "),s("code",[t._v("editor.insertSpaces")]),t._v(".")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{attrs:{class:"token property"}},[t._v('"vetur.format.defaultFormatterOptions"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"js-beautify-html"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    // js-beautify-html settings here\n  "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"stylus-supremacy"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#stylus-supremacy","aria-hidden":"true"}},[this._v("#")]),this._v(" stylus-supremacy")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[s("code",[t._v("tabSize")]),t._v(" and "),s("code",[t._v("insertSpaces")]),t._v(" are read from "),s("code",[t._v("editor.tabSize")]),t._v(" and "),s("code",[t._v("editor.insertSpaces")]),t._v(".")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"stylusSupremacy.insertBraces"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token boolean"}},[t._v("false")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"stylusSupremacy.insertColons"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token boolean"}},[t._v("false")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n  "),s("span",{attrs:{class:"token property"}},[t._v('"stylusSupremacy.insertSemicolons"')]),s("span",{attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"plan"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#plan","aria-hidden":"true"}},[this._v("#")]),this._v(" Plan")])}],!1,null,null,null);e.default=r.exports}}]);