vscode设置 settings.json

我的个人VSCode设置项,包括代码格式化配置、todo-tree配置和power mode配置

{
  // 控制字体大小(像素)
  "editor.fontSize": 16,
  // 一个制表符等于的空格数。
  "editor.tabSize": 2,
  // 在 #editor.wordWrap# 为 wordWrapColumn 或 bounded 时,控制编辑器的折行列。100 列后换行
  "editor.wordWrapColumn": 100,
  // 在保存时格式化文件。
  "editor.formatOnSave": false,
  // 开启 vscode 文件路径导航
  "breadcrumbs.enabled": true,
  // prettier 是否在每行末尾添加分号
  "prettier.semi": false,
  // prettier 设置强制单引号
  "prettier.singleQuote": true,
  // 尽可能控制尾随逗号的输出。 有效选项: 'none' - 无尾随逗号 ' es5' - 在ES5中有效的尾随逗号(对象,数组等) 'all' - 尾随逗号 尽可能(函数参数)
  "prettier.trailingComma": "none",
  // 定义函数参数括号前的空格处理方式。
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // 选择 vue 文件中 template 的格式化工具
  "vetur.format.defaultFormatter.html": "prettyhtml",
  // 控制编辑器是否显示控制字符。显示 markdown 中英文切换时产生的特殊字符
  "editor.renderControlCharacters": true,
  // vetur 的自定义设置
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatterOptions": {
    "prettier": {
      // 用单引号
      "singleQuote": true,
      // 不加分号
      "semi": false,
      // 禁止随时添加逗号
      "trailingComma": "none",
      // 函数括号前是否加空格
      "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
      "typescript.format.insertSpaceBeforeFunctionParenthesis": true,
    }
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[javascript]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[json]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[jsonc]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[vue]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "octref.vetur"
  },
  "[html]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[markdown]": {
    // 定义一个默认格式化程序, 该格式化程序优先于所有其他格式化程序设置。必须是提供格式化程序的扩展的标识符。
    "editor.defaultFormatter": "mervin.markdown-formatter"
  },
  "markdownFormatter.formatOpt": {},
  // px-to-rem 每rem对应的像素
  "px-to-rem.px-per-rem": 20,
  // 标记列表(用逗号隔开),其中内容不应重新格式化。"null" 默认为 "pre" 标记。
  "html.format.contentUnformatted": "",
  // 调整窗口的缩放级别。原始大小是 0,每次递增(例如 1)或递减(例如 -1)表示放大或缩小 20%。也可以输入小数以便以更精细的粒度调整缩放级别。
  "window.zoomLevel": 0,
  // todo-tree 设置
  "todo-tree.tree.showScanModeButton": false,
  "todo-tree.general.tagGroups": {},
  // 代码输入特效设置
  "powermode.enabled": true, // 开启 Power Mode
  "powermode.shakeIntensity": 0, // 关闭抖动
  "powermode.presets": "particles",
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // stylus 设置
  "stylusSupremacy.insertColons": true, // 是否插入冒号
  "stylusSupremacy.insertSemicolons": false, // 是否插入分好
  "stylusSupremacy.insertBraces": false, // 是否插入大括号
  "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
  "stylusSupremacy.insertNewLineAroundBlocks": false // 两个选择器中是否换行
}
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值