【vscode】本地配置和根据不同项目不同的vscode配置

1. .vscode项目配置

{
  "typescript.tsdk": "node_modules/typescript/lib",
  "prettier.enable": false,
  "god.tsconfig": "./tsconfig.json",
  // TODO: 文件默认配置
  "[css]": {},
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.codeActionsOnSave": {
      "source.fixAll.stylelint": true
    }
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },

  // eslint,stylelint自动修复
  "eslint.run": "onType",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
    "source.fixAll.stylelint": true
  },

  // 保存自动格式化
  "editor.formatOnSave": true,

  // 启动stylelint
  "stylelint.enable": true,
  "stylelint.validate": ["css", "less", "vue", "html"],
  "i18n-ally.localesPaths": ["src/locales"],
  "i18n-ally.keystyle": "nested",
  "i18n-ally.sortKeys": true,
  "i18n-ally.namespace": false,
  "i18n-ally.enabledParsers": ["ts"],
  "i18n-ally.sourceLanguage": "en",
  "i18n-ally.displayLanguage": "zh-CN",
  "i18n-ally.enabledFrameworks": ["vue", "react"],
  "volar.inlayHints.eventArgumentInInlineHandlers": false
}

2. vscode本地配置

{
  "workbench.iconTheme": "vscode-icons",
  "editor.wordWrap": "on",
  "editor.lineHeight": 0,
  "editor.fontWeight": "normal",
  "editor.fontFamily": "'Fira Code'",//后边的引号中写上要设置的字体类型,个人比较喜欢Fira Code

  "editor.fontLigatures": true, //设置是否多字符连体
  "html.format.wrapAttributes": "aligned-multiple",
  "files.eol": "\n",
  //保存的时候自动格式化, 这句话一定不能加上,不然和prettier冲突
  // "editor.formatOnSave": true, // TODO:自有项目打开,其他项目关闭
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // "eslint.format.enable": true,
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/target": true,
    "**/logs": true
  },
  // "vetur.format.defaultFormatterOptions": {
  //   "prettier": {
  //       "printWidth": 160,
  //       "singleQuote": true, // 使用单引号
  //       "semi": true, // 末尾使用分号
  //       "tabWidth": 4,
  //       "arrowParens": "avoid",
  //       "bracketSpacing": true,
  //       "proseWrap": "preserve" // 代码超出是否要换行 preserve保留
  //   }
  // },
  "files.exclude": {
    // "**/node_modules": true,
    // "**/package-lock.json": true
  },
  "editor.minimap.enabled": true,
  "files.associations": {
    "*.wxss": "css",
    "*.wxml": "wxml",
    "*.cjson": "jsonc",
    "*.wxs": "javascript",
    "*.json": "jsonc",
    "*.xtpl": "html",
    "*.tsx": "typescript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
  "workbench.startupEditor": "newUntitledFile",
"git.autofetch": false,
  "editor.accessibilityPageSize": 12,
  "sync.gist": "68836bf9f631400aea55045d66621ec6",
  "emmet.triggerExpansionOnTab": true,
  "todo-tree.tree.showScanModeButton": false,
  "cSpell.userWords": ["hhserp"],
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "todo-tree.general.tags": [
    "BUG",
    "HACK",
    "FIXME",
    "TODO",
    "XXX",
    "[ ]",
    "[x]"
  ],
  "todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
  "editor.codeActionsOnSave": null,
  "terminal.integrated.fontFamily": "consolas",
  "cSpell.enableFiletypes": ["!typescriptreact"],
  "security.workspace.trust.untrustedFiles": "open",
  "diffEditor.ignoreTrimWhitespace": false,
  "editor.detectIndentation": false,
  "editor.tabSize": 2,
  "editor.guides.bracketPairs": true,
  "editor.linkedEditing": true,
  "git.confirmSync": false,
  "eslint.codeActionsOnSave.rules": null,
  "eslint.format.enable": true,
  "workbench.editor.enablePreview": false,
  "prettier.bracketSameLine": true,
  "z-reader.fileDir": "D:\\webLearn",
  "editor.inlineSuggest.enabled": true,
  "tabnine.experimentalAutoImports": true,
  "github.copilot.enable": {
    "*": true,
    "plaintext": false,
    "markdown": false,
    "scminput": false
  }
}
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不停喝水

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值