成都网站排名提升,优秀产品设计案例,内涵吧网站,站酷网素材一、插件要求
Prettier
Vetur
二、配置文件
{workbench.startupEditor: newUntitledFile,files.autoSave: off, // 关闭文件自动保存#xff0c;避免开发时候页面变化editor.tabSize: 2, // tab距离ve…一、插件要求
Prettier
Vetur
二、配置文件
{workbench.startupEditor: newUntitledFile,files.autoSave: off, // 关闭文件自动保存避免开发时候页面变化editor.tabSize: 2, // tab距离vetur.format.options.tabSize: 2, //editor.formatOnSave: true, // 在保存时自动格式化editor.minimap.enabled: true, // 关闭右侧快速预览files.eol: \n, // 设定文件的换行符,\nlinux模式或\r\n(win模式)editor.detectIndentation: false, // 关闭vscode的缩进检查editor.fontSize: 14, //设置文字大小editor.lineHeight: 0, //设置文字行高editor.lineNumbers: on, //开启行数提示editor.quickSuggestions: {//开启自动显示建议other: true,comments: true,strings: true},window.zoomLevel: 0, // 调整窗口的缩放级别//根据文件后缀名定义vue文件类型files.associations: {*.vue: vue},// 为各类文件制定Fatmatter插件[vue]: {// editor.defaultFormatter: esbenp.prettier-vscode // 采用prettier处理格式化editor.defaultFormatter: octref.vetur // 采用vetur来处理Fatmatter},[javascript]: {editor.defaultFormatter: esbenp.prettier-vscode},[json]: {editor.defaultFormatter: esbenp.prettier-vscode},[jsonc]: {editor.defaultFormatter: vscode.json-language-features},// Vetur 的各类设定,仅当上面[vue]的editor.defaultFormatter的值为octref.vetur的时候才起效vetur.format.options.tabSize: 4,vetur.format.defaultFormatter.html: js-beautify-html, // 针对vue中的template部分的风格模版也可以是prettiervetur.format.defaultFormatter.css: prettier, // 针对vue中的style部分的风格模版vetur.format.defaultFormatterOptions: {js-beautify-html: { // 给js-beautify-html设置属性隔断wrap_line_length: 200, //换行长度// 属性换行// 对属性进行换行。// - auto: 仅在超出行长度时才对属性进行换行。// - force: 对除第一个属性外的其他每个属性进行换行。// - force-aligned: 对除第一个属性外的其他每个属性进行换行并保持对齐。// - force-expand-multiline: 对每个属性进行换行。// - aligned-multiple: 当超出折行长度时将属性进行垂直对齐。wrap_attributes: aligned-multiple,// Maximum number of line breaks to be preserved in one chunk (0 disables)// max_preserve_newlines: 0,end_with_newline: false,singleQuote: true,},prettyhtml: {printWidth: 120,singleQuote: true,wrapAttributes: false,sortAttributes: false},prettier: {// Prettier option herewrap_attributes: auto,printWidth: 120,trailingComma: none, // 多行时尽可能打印尾随的逗号tabWidth: 4, // 会忽略vetur的tabSize配置useTabs: false, // 是否利用tab替代空格semi: true, // 句尾是否加;singleQuote: true, // 使用单引号而不是双引号arrowParens: avoid, // allow paren-less arrow functions 箭头函数的参数使用圆括号trailingComma: all,htmlWhitespaceSensitivity: ignore}},// 函数名后增加空格javascript.format.insertSpaceBeforeFunctionParenthesis: true,javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions: true,
}