首页 > 其他分享 >vscode配置文件

vscode配置文件

时间:2022-08-22 00:14:55浏览次数:71  
标签:vue false 配置文件 vscode defaultFormatter prettier true editor

{
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation": false,
  // 重新设定tabsize
  "editor.tabSize": 4,
  // #值设置为true时,每次保存的时候自动格式化;值设置为false时,代码格式化请按shift+alt+F
  "editor.formatOnSave": false,
  // #每次保存的时候将代码按eslint格式进行修复
  "eslint.autoFixOnSave": true,
  // 添加 vue 支持
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  //  #让prettier使用eslint的代码格式进行校验
  "prettier.eslintIntegration": true,
  //  #去掉代码结尾的分号
  "prettier.semi": false,
  //  #使用带引号替代双引号
  "prettier.singleQuote": true,
  "prettier.tabWidth": 4,
  //  #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // #这个按用户自身习惯选择
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  // #让vue中的js按"prettier"格式进行格式化
  "vetur.format.defaultFormatter.js": "prettier",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      // #vue组件中html代码格式化样式
      "wrap_attributes": "force-aligned", //也可以设置为“auto”,效果会不一样
      "wrap_line_length": 200,
      "end_with_newline": false,
      "semi": false,
      "singleQuote": true
    },
    "prettier": {
      "semi": false,
      "singleQuote": true
    }
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // 格式化stylus, 需安装Manta's Stylus Supremacy插件
  "stylusSupremacy.insertColons": false, // 是否插入冒号
  "stylusSupremacy.insertSemicolons": false, // 是否插入分号
  "stylusSupremacy.insertBraces": false, // 是否插入大括号
  "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
  "stylusSupremacy.insertNewLineAroundBlocks": false,
  "prettier.useTabs": true,
  "files.autoSave": "off",
  "explorer.confirmDelete": false,
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "diffEditor.ignoreTrimWhitespace": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[vue]": {
    "editor.defaultFormatter": "octref.vetur"
},
"files.associations": {
    "*.vue": "vue"
} // 两个选择器中是否换行
}

  转自https://www.cnblogs.com/dehao/p/13370290.html

标签:vue,false,配置文件,vscode,defaultFormatter,prettier,true,editor
From: https://www.cnblogs.com/evemen/p/16611472.html

相关文章

  • vscode中react标签自动补全
    在vscode中编写react时,发现标签没有自动补全,写起来不太灵活,查资料发现:默认在js文件中JSX语法无法自动补全,解决方法如下:文件=》首选项=》设置搜索"emmet.includeLanguages"......
  • Maven中xml配置文件导出到target失败问题解决方案
    Maven中xml配置文件导出到target失败问题解决方案在pom.xml中加入下面代码<!--在build中配置resources,来防止我们资源导出失败的问题--><build><resources>......
  • mybatis核心配置文件
    Mybatis核心配置文件习惯上命名mybatis-config.xml,整合Spring之后,整个配置文件可以省略核心配置文件主要用于配置连接数据库的环境以及MyBatis的全局配置信息标签顺序......
  • vscode加速下载
    网上找的解决方法复制vscode下载链接将域名部分替换为亚马逊的cdnhttps://vscode.cdn.azure.cn;比如https://vscode.cdn.azure.cn/stable/e4503b30fc78200f846c62c......
  • nginx.conf 配置文件
     一、位置vim/usr/local/nginx/conf/nginx.conf 二、配置文件中的内容(包含三部分) 1、全局块:配置服务器整体运行的配置指令从配置文件开始到events块之间的内......
  • Mybatis核心配置文件中的标签介绍
    0.标签顺序Mybatis核心配置文件中有很多标签,它们谁谁写在前写在后其实是......
  • springBoot配置文件properties和yml数组写法
    springBoot配置文件properties和yml数组写法springBoot配置文件properties和yml数组写法这里介绍一下springBoot中的两种文件配置方式中数组的使用,也就是集合。以下是......
  • MyBatis核心配置文件详解、添加properties文件
    1.mybatis-config.xml文件详解<environmentsdefault="development">environments:配置连接数据库的环境属性:default:设置默认使用环境的id。可以有多个环境,像开......
  • http配置文件说明--站点访问控制常见机制
    8、站点访问控制常见机制可基于两种机制指明对哪些资源进行何种访问控制访问控制机制有两种:客户端来源地址,用户账号文件系统路径: <Directory“/path">...</Directo......
  • VSCode安装过程记录Win10
    @recommended:languages ......