程序员

VSCode插件安装完成后的配置详解

作者:admin 2021-04-12 我要评论

VSCode插件安装完成后,有些插件如果你想要完整的使用其中的功能得在settings.json中就行配置,接下来是我常用的一些配置 { "workbench.iconTheme": "vscode-ico...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

VSCode插件安装完成后,有些插件如果你想要完整的使用其中的功能得在settings.json中就行配置,接下来是我常用的一些配置

{
  "workbench.iconTheme": "vscode-icons",
  "window.zoomLevel": 0,
  "files.autoSave": "off",
  "eslint.runtime": "",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.codeAction.disableRuleComment": {},
  "eslint.codeAction.showDocumentation": {},
  "editor.formatOnSave": true,
  "vetur.completion.scaffoldSnippetSources": {},
  "vetur.format.defaultFormatter.html": "prettier",
  // 是否允许自定义的snippet片段提示
  "editor.snippetSuggestions": "top",
  "editor.fontSize": 14,
  "editor.fontWeight": "400",
  "editor.formatOnType": true,
  "guides.enabled": false,
  "editor.tabSize": 2,
  "git.confirmSync": false,
  "editor.renderWhitespace": "boundary",
  "editor.cursorBlinking": "smooth",
  "editor.minimap.enabled": true,
  "editor.minimap.renderCharacters": false,
  "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
  "editor.codeLens": true,
  // 配置文件关联,以便启用对应的提示
  "files.associations": {
    "*.vue": "vue",
    "*.wxss": "css",
    "*.cjson": "jsonc",
    "*.wxs": "javascript"
  },
  // 配置emmet是否启用tab展开缩写
  "emmet.triggerExpansionOnTab": true,
  // 配置emmet对文件类型的支持
  "emmet.syntaxProfiles": {
    "javascript": "jsx",
    "vue": "html",
    "vue-html": "html"
  },
  // 是否开启eslint检测
  "eslint.enable": true,
  // eslint配置文件
  "eslint.options": {
    "extensions": [
      ".js",
      ".vue"
    ]
  },
  "git.autofetch": true,
  "workbench.colorTheme": "One Dark Pro",
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
}

这个配置能够直接让你ctrl+/注释代码,不管是vue的还是html的;也能ctrl+s时使用eslint格式化代码;输入for,forEach,map等的自动完成代码等一系列的快捷操作

到此这篇关于VSCode插件安装完成后的配置详解的文章就介绍到这了,更多相关VSCode插件安装后配置内容请搜索尊托云数以前的文章或继续浏览下面的相关文章希望大家以后多多支持尊托云数!


本文转载自网络,原文链接:https://m.jb51.net/article/194237.htm

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • 四两拨千斤——你不知道的VScode编码Ty

    四两拨千斤——你不知道的VScode编码Ty

  • 我是如何在 Vue 项目中做代码分割的

    我是如何在 Vue 项目中做代码分割的

  • position:sticky 粘性定位的几种巧妙应

    position:sticky 粘性定位的几种巧妙应

  • 从零到一搭建React组件库

    从零到一搭建React组件库