vscode setting.json配置

{
    "editor.tabSize": 6,
    "editor.wordWrap": "on",
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[jsonc]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[html]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
    "editor.codeLens": true,
    "editor.snippetSuggestions": "top",
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    // 修改js引号规则为单引号
    "prettier.singleQuote": true,
    "prettier.semi": false,
    "prettier.useTabs": true,
    "prettier.printWidth": 300, //一行的代码数
    // 配置 ESLint 检查的文件类型
    "eslint.validate": ["javascript", "vue", "html"],
    "javascript.format.insertSpaceAfterSemicolonInForStatements": false,
    "typescript.format.insertSpaceAfterSemicolonInForStatements": false,
    "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
    // ---------- vetur ----------
    "vetur.format.options.tabSize": 4,
    "vetur.format.options.useTabs": false,
    // "vetur.validation.template": false,
    "vetur.format.defaultFormatter.html": "js-beautify-html", // html 不换行
    "vetur.format.defaultFormatter.js": "vscode-typescript", // js 不换行
    "vetur.format.defaultFormatter.css": "prettier",
    "vetur.format.defaultFormatter.less": "prettier",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "aligned-multiple",
            "wrap_line_length": 160,
            "end_with_newline": false
        }
        // 对属性进行换行。
        // - auto: 仅在超出行长度时才对属性进行换行。
        // - force: 对除第一个属性外的其他每个属性进行换行。
        // - force-aligned: 对除第一个属性外的其他每个属性进行换行,并保持对齐。
        // - force-expand-multiline: 对每个属性进行换行。
        // - aligned-multiple: 当超出折行长度时,将属性进行垂直对齐。
    },
    "explorer.confirmDelete": false,
    "git.autofetch": true,
    "[css]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.preferredLightColorTheme": "Default Dark+",
"vetur.ignoreProjectWarning": true,
"mssql.connections": [
    {
        "server": "{{put-server-name-here}}",
        "database": "{{put-database-name-here}}",
        "user": "{{put-username-here}}",
        "password": ""
    }
],
"diffEditor.ignoreTrimWhitespace": false,
"vetur.validation.script": false
}
 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值