vscode 首选项 用户配置

{

  "editor.tabSize": 2,

  "editor.formatOnSave": true,

  "files.encoding": "utf8",

  "files.eol": "\n",

  "files.exclude": {

    "**/node_modules": true,

    "**/dist": true,

    "**/.*": true,

    "babel.config.js": true,

    "jsconfig.json": true,

    "postcss.config.js": true,

    "yarn.lock": true,

    "LICENSE": true

  },

  "html.format.endWithNewline": true,

  "html.format.indentHandlebars": true,

  "html.format.indentInnerHtml": true,

  "html.format.wrapAttributes": "force-aligned",

  "less.lint.duplicateProperties": "warning",

  "less.lint.idSelector": "warning",

  "less.lint.zeroUnits": "warning",

  "psi-header.variables": [

    /* 以下注释掉的配置请放到vscode的用户设置里 */

    ["author", "zhang xu"],

    ["initials", "zxu"],

    ["authoremail", "openight@outlook.com"],

    ["projectname", ""]

  ],

  "psi-header.config": {

    "forceToTop": true,

    "blankLinesAfter": 1,

    "license": "MIT"

  },

  "psi-header.changes-tracking": {

    "isActive": true,

    "autoHeader": "autoSave",

    "include": ["vue", "js", "javascript", "less", "scss", "yml", "yaml"],

    "exclude": ["markdown", "md", "gql", "graphql"],

    "excludeGlob": ["dist/**"]

  },

  "psi-header.lang-config": [

    {

      "language": "html",

      "begin": "<!--",

      "end": "-->",

      "prefix": "  "

    },

    {

      "language": "javascript",

      "begin": "/*",

      "end": " */",

      "prefix": " * "

    },

    {

      "language": "yaml",

      "begin": "#",

      "end": "#",

      "prefix": "# "

    },

    {

      "language": "js",

      "mapTo": "javascript"

    },

    {

      "language": "vue",

      "mapTo": "html"

    },

    {

      "language": "scss",

      "mapTo": "javascript"

    },

    {

      "language": "less",

      "mapTo": "javascript"

    },

    {

      "language": "ts",

      "mapTo": "javascript"

    },

    {

      "language": "typescript",

      "mapTo": "javascript"

    },

    {

      "language": "yml",

      "mapTo": "yaml"

    },

    {

      "language": "dotenv",

      "mapTo": "yaml"

    }

  ],

  "psi-header.templates": [

    {

      "language": "*",

      "template": [

        "FilePath: <<filerelativepath>>",

        "Project: <<projectname>>",

        "CreatedAt: <<filecreated('YYYY-MM-DD HH:mm:ss')>>",

        "CreatedBy: <<initials>> (<<<authorEmail>>>)",

        "Copyright: (c) <<year>>",

        "Task: #1",

        "Write a description of the code here."

      ]

    }

  ],

  "vetur.validation.template": false,

  "vetur.format.defaultFormatter.html": "prettyhtml",

  "vetur.format.defaultFormatter.css": "prettier",

  "vetur.format.defaultFormatter.postcss": "prettier",

  "vetur.format.defaultFormatter.scss": "prettier",

  "vetur.format.defaultFormatter.less": "prettier",

  "vetur.format.defaultFormatter.stylus": "stylus-supremacy",

  "vetur.format.defaultFormatter.js": "prettier",

  "vetur.format.defaultFormatter.ts": "prettier",

  "vetur.format.options.tabSize": 2,

  "vetur.format.options.useTabs": false,

  "vetur.format.defaultFormatterOptions": {

    "js-beautify-html": {

      "wrap_attributes": "force-aligned"

    },

    "prettyhtml": {

      "printWidth": 80,

      "singleQuote": false,

      "wrapAttributes": true,

      "sortAttributes": true,

      "tabWidth": 2,

      "useTabs": false

    }

  },

  "eslint.validate": [

    "javascript",

    "javascriptreact",

    {

      "language": "vue",

      "autoFix": true

    }

  ],

  "eslint.packageManager": "yarn",

  "todohighlight.include": [

    "**/*.js",

    "**/*.html",

    "**/*.css",

    "**/*.vue",

    "**/*.less",

    "**/*.markdown",

    "**/*.md",

    "**/*.graphql",

    "**/*.gql"

  ],

  "npm.packageManager": "yarn",

  "editor.codeActionsOnSave": {

    "source.fixAll.eslint": true

  },

  "[vue]": {

    "editor.defaultFormatter": "octref.vetur"

  },

  "[javascript]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "git.confirmSync": false,

  "editor.unicodeHighlight.ambiguousCharacters": false,

  "editor.unicodeHighlight.invisibleCharacters": false,

  "[jsonc]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[scss]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[css]": {

    "editor.defaultFormatter": "vscode.css-language-features"

  }

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值