vscode个性化配置settings.json(第二版)
{
"editor.fontSize": 18,
"editor.lineHeight": 24,
"workbench.colorTheme": "Monokai",
"editor.wordWrap": "on",
"editor.detectIndentation": false,
"workbench.colorCustomizations": {
"editor.selectionBackground": "#135564"
},
"workbench.sideBar.location": "left",
/* prettier格式化 */
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
/* prettier格式化的配置 start */
"prettier.printWidth": 800, // 超过最大值换行
"prettier.tabWidth": 4, // 缩进字节数
"prettier.useTabs": false, // 缩进不使用tab,使用空格
"prettier.semi": true, // 句尾添加分号
"prettier.singleQuote": true, // 使用单引号代替双引号
"prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
"prettier.arrowParens": "avoid", // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
"prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
"prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
"prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
"prettier.eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
"prettier.jsxBracketSameLine": false, // 在jsx中把'>' 是否单独放一行
"prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
"prettier.parser": "babylon", // 格式化的解析器,默认是babylon
"prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
"prettier.stylelintIntegration": false, //不让prettier使用stylelint的代码格式进行校验
/* prettier格式化的配置 end */
/* stylus配置 start */
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false, // 两个选择器中是否换行
"stylusSupremacy.insertSemicolons": false, //去掉分号
"stylusSupremacy.insertBraces": false, //去掉大括号
"stylusSupremacy.insertColons": false, //去掉冒号
/* stylus配置 end */
/* vue文件配置 start */
"vetur.validation.template": false,
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.options.useTabs": true,
"vetur.format.options.tabSize": 4, //去掉冒号
/* vue文件配置 end */
/* eslint配置 start */
"eslint.enable": true, // 是否开启eslint检测
"eslint.autoFixOnSave": false, // 文件保存时,是否自动根据eslint进行格式化
"eslint.options": {
"plugins": ["vue"]
},
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
}
],
/* eslint配置 end */
"fileheader.customMade": {
"Description": "",
"Author": "xiabing",
"Date": "Do not edit",
"LastEditors": "xiabing",
"LastEditTime": "Do not edit"
}, // 让函数(名)和后面的括号之间加个空格
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"window.zoomLevel": 0,
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.jsp": "html"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"editor.minimap.showSlider": "always",
"editor.mouseWheelZoom": true,
"files.autoSaveDelay": 3000,
"search.followSymlinks": false,
"workbench.iconTheme": "vscode-icons",
"vsicons.dontShowNewVersionMessage": true
}
本文作者:猫老板的豆
本文链接:https://www.cnblogs.com/bingcola/p/16499161.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步