VSCode插件清单和配置推荐 - xw332/xw332.github.io GitHub Wiki
// 我的编辑器插件
-
Chinese (Simplified) Language Pack for Visual Studio Code:中文语言包
-
Vetur:智能提示引入vue组件
-
Npm Intellisense:智能提示import npm包引入
-
live Server:简单的http服务测试html
-
Document This:文档
扩展链接:
https://mp.weixin.qq.com/s/wL9gUOmQLGuH2sIw7OYd1w
https://mp.weixin.qq.com/s/02s5ZWLdJsThhQBpCT3A0w
// 我的编辑器配置
// setting.json
{
"window.zoomLevel": 0.7,
"editor.fontSize": 14,
"editor.tabSize": 2,
"files.encoding": "utf8",
"workbench.startupEditor": "welcomePage",
"search.smartCase": true,
// 搜索文件点击确定后,新tab打开页面,不覆盖当前页面
"workbench.editor.enablePreviewFromQuickOpen": false,
// 显示代码片段提示,并置于顶层
"emmet.showSuggestionsAsSnippets": true,
"editor.snippetSuggestions": "top",
"editor.tabCompletion": "on",
// 窗口title显示文件路径${appName}
"window.title": "${dirty}${activeEditorShort}${separator}${folderPath}${separator}${activeEditorLong}${separator}",
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.codeActionsOnSave": {
// For ESLint
"source.fixAll.eslint": true,
// For TSLint
"source.fixAll.tslint": true,
// For Stylelint
"source.fixAll.stylelint": true
},
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
/* prettier的配置 */
"prettier.printWidth": 120, // 超过最大值换行
"prettier.tabWidth": 2, // 缩进字节数
"prettier.trailingComma": "es5", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
"prettier.semi": true, // 句尾添加分号
"prettier.singleQuote": true, // 使用单引号代替双引号
"prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
"prettier.useTabs": false, // 缩进不使用tab,使用空格
"prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
"prettier.arrowParens": "avoid", // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
"prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
"prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
"prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
"prettier.jsxBracketSameLine": false, // 在jsx中把'>'是否单独放一行
"prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
// 设置doc this插件注释的内容,增加姓名,日期
"docthis.authorName": "wu",
"docthis.includeAuthorTag": true,
"docthis.includeDateTag": true,
"docthis.includeDescriptionTag": true,
// 不用jsDoc注释
"jsDocCompletion.enabled": false,
}
扩展链接:
https://github.com/xw332/xw332.github.io/wiki/前端开发工具箱