配置:vscode 的setting.json 文件配置

个人配置文件,有需要可参照

{"breadcrumbs.enabled": true,// vscode默认启用了根据文件类型自动设置tabsize的选项"editor.detectIndentation": true,"editor.insertSpaces": true,// 重新设定tabsize// "editor.tabSize": 2,// 显示 markdown 中英文切换时产生的特殊字符"editor.renderControlCharacters": true,//编辑器默认的代码检查规则关闭"javascript.format.enable": false,//eslint检查是否启动"eslint.enable": true,"explorer.confirmDelete": true,// #每次保存的时候自动格式化"editor.formatOnSave": false,"editor.formatOnType": false, // 在键入一行后是否自动化格式// "editor.wordWrap": "wordWrapColumn", // 换行规则,off 永不换行// 120 列后换行// "editor.wordWrapColumn": 120,"editor.codeActionsOnSave": {// "source.fixAll.stylelint": true, //是否选择启用stylelint// "source.fixAll.eslint": true"source.fixAll": true},"editor.quickSuggestions": {"strings": true},// #每次保存的时候将代码按eslint格式进行修复"eslint.autoFixOnSave": true,"eslint.options": {"extensions": [".js", ".vue"]// "plugins": ["html"]},//"files.autoSave": "off","editor.formatOnPaste": true,"editor.multiCursorModifier": "ctrlCmd","editor.snippetSuggestions": "top","editor.fontSize": 14,"vsicons.dontShowNewVersionMessage": false,// 添加 vue 支持"eslint.validate": ["vue","html","javascript","typescript","javascriptreact","typescriptreact","jsx",{"language": "vue","autoFix": true},{"language": "html","autoFix": true},{"language": "javascript","autoFix": true},{"language": "typescript","autoFix": true},{"language": "jsx","autoFix": true}],"git.enableSmartCommit": true,"leek-fund.fundSort": -1,"editor.tabSize": 2,"editor.guides.indentation": false,"settingsSync.ignoredExtensions": [],"[typescript]": {"editor.defaultFormatter": "vscode.typescript-language-features"},"[typescriptreact]": {"editor.defaultFormatter": "vscode.typescript-language-features"},"leek-fund.fundGroups": ["我的基金", "南方证券", "004070"],"leek-fund.funds": [["001632","420009","320007","003096","001102","003885","001071","005963"],[],[]],"cSpell.languageSettings": [],/** 注释配置*/"fileheader.configObj": {"autoAdd": false, // 默认开启自动添加头部注释,},// 注释(mac 版本: ctrl + command + i)"fileheader.customMade": { // 此为文件头部注释"Author": "", // 创建人 写上自己的名字"Date": "Do not edit", // 创建时间"LastEditors": "your Name", // 最后一次编辑人 写上自己的名字"LastEditTime": "Do not edit", // 最后一次编辑时间"Description": "" // 文件描述 生成注释后在手动编辑},// 注释(mac 版本: ctrl + command + t)"fileheader.cursorMode": { //此为函数注释"description": "", // 函数功能描述 生成注释后在手动编辑"param": "", // 参数 生成注释后在手动编辑"return": "", // 返回值 生成注释后在手动编辑"author": "your Name" // 创建人 写上自己的名字},// #去掉代码结尾的分号"prettier.semi": false,//  #使用带引号替代双引号"prettier.singleQuote": true,"html.format.maxPreserveNewLines": 120,"html.format.enable": false,"prettier.bracketSpacing": true,"prettier.htmlWhitespaceSensitivity": "ignore","prettier.tabWidth": 2,//将>多行JSX元素放在最后一行的末尾,而不是单独放在下一行"prettier.jsxBracketSameLine": true,"prettier.printWidth": 120, //一行的代码数"vetur.format.defaultFormatter.html": "js-beautify-html","vetur.format.defaultFormatter.js": "vscode-typescript","vetur.format.defaultFormatter.css": "prettier","vetur.format.options.tabSize": 2,"vetur.format.options.useTabs": false,"vetur.format.defaultFormatterOptions": {"js-beautify-html": {// js-beautify-html settings here"wrap_attributes": "auto", // 属性强制折行对齐,也可以设置为“auto”,force-aligned,效果会不一样"wrap_line_length": 120, // 设置一行多少字符换行,设置为 0 表示不换行"end_with_newline": false,"semi": false, //"singleQuote": true, // 单引号// "max-preserve-newlines": 500, // 一次可保留的最大换行数// "indent-inner-html": true, //缩进 head body代码片段// "editorconfig": true //使用editorconfig设置选项},"prettyhtml": {"printWidth": 120,"singleQuote": false,"wrapAttributes": false,"sortAttributes": false},"prettier": {// Prettier option here// "trailingComma": "es5", // 多行时,尽可能打印尾随的逗号"printWidth": 120,"tabWidth": 2, // 会忽略vetur的tabSize配置"useTabs": false, // 是否利用tab替代空格"semi": false, // 句尾是否加;"singleQuote": true // 使用单引号而不是双引号// "arrowParens": "avoid" // allow paren-less arrow functions 箭头函数的参数使用圆括号}},"vetur.validation.template": false,// "vetur.experimental.templateInterpolationService": true,//  #让函数(名)和后面的括号之间加个空格"javascript.format.insertSpaceBeforeFunctionParenthesis": true,"javascript.updateImportsOnFileMove.enabled": "always",// "diffEditor.renderSideBySide": true,"diffEditor.ignoreTrimWhitespace": false,"[jsonc]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[javascript]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[javascriptreact]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[json]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[less]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[html]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"[vue]": {"editor.defaultFormatter": "octref.vetur"},
}


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部