/**
* @Description: ------ vscode setting.json config ------
* @Creater: snows_l
* @Date: 2022-07-26 21:17:28
* @LastEditors: snows_l [email protected]
* @LastEditTime: 2022-10-12 14:01:04
* @FilePath: /Users/snows_l/Library/Application Support/Code/User/settings.json
*/
{
/** @description 编辑器通用配置 */
"editor.detectIndentation": false, // 控制是否在打开文件时,基于文件内容自动检测 #editor.tabSize# 和 #editor.insertSpaces#。
"editor.tabSize": 2, // 默认编辑器字号
"editor.fontSize": 14,
"editor.formatOnSave": false, // 在保存时格式化文件。格式化程序必须可用,延迟后文件不能保存,并且编辑器不能关闭。
"editor.formatOnType": false, // 控制编辑器在键入一行后是否自动格式化该行。
"editor.minimap.enabled": false, // 控制是否显示右侧缩略图。
"editor.formatOnPaste": false, // 控制编辑器是否自动格式化粘贴的内容
// "editor.language.brackets": [], // ***注意这个方法放出来之后会导致 -- 方法及对象换行的时候没有换两行和缩进 --
"editor.wordWrap": "wordWrapColumn", // 超长代码一般出现在html中, 我不喜欢html属性换行, 但是又想看到全部, 那就只能设置编辑器视觉上的换行了.
"editor.wordWrapColumn": 160, // 同上
"editor.fontWeight": "200", // 控制字体粗细。接受关键字“正常”和“加粗”,或者接受介于 1 至 1000 之间的数字
"editor.multiCursorModifier": "alt", // 添加多个光标时候需要的快捷键
"editor.snippetSuggestions": "top", // 自定义代码片段显示的位置
"editor.renderControlCharacters": false, // 控制编辑器是否应呈现空白字符
"editor.rulers": [120], // 在一定数量的等宽字符后显示垂直标尺。 ==> 输入多个值,显示多个标尺。若数组为空,则不绘制标尺。
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.autoClosingOvertype": "always",
"editor.autoClosingQuotes": "always",
"editor.autoClosingBrackets": "always",
"editor.autoClosingDelete": "always",
"editor.autoIndent":"full",
"editor.codeLens": true,
"editor.comments.insertSpace": true, // 控制在注释时是否插入空格字符
"editor.bracketPairColorization.independentColorPoolPerBracketType": false, // 控制每个方括号类型是否具有自己的独立颜色池。
"editor.bracketPairColorization.enabled": true, // 控制是否启用括号对着色。请使用 #workbench.colorCustomizations# 重写括号突出显示颜色。
"workbench.colorCustomizations": { // 覆盖当前所选颜色主题的颜色。
"editorLineNumber.activeForeground": "#ff6200", // 编辑器活动行号的颜色
"editor.background": "#1f2222", // 编辑器背景色
"editor.findMatchBackground": "#3543ad", // 搜索匹配的颜色
"editor.lineHighlightBorder": "#706b6b", // 光标所在行四周边框的背景颜色
},
"editor.guides.bracketPairs":"active", // 控制是否启用括号对指南。active: 仅为活动括号对启用水平参考线
"editor.guides.bracketPairsHorizontal": "active", // 控制是否启用水平括号对指南。active: 仅为活动括号对启用水平参考线
"editor.guides.highlightActiveBracketPair": true, // 控制编辑器是否应突出显示活动的括号对
"editor.folding": true,
"editor.wordSeparators": "`~!@#$%^&*() =+[{]}\\|;:'\",.<>/?", // 执行单词相关的导航或操作时作为单词分隔符的字符。
/** @description 编辑器文件保存时的操作 */
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": false, // 文件保存时开启eslint自动修复程序
"source.fixAll.stylelint": false, // 文件保存时开启stylelint自动修复程序
"source.organizeImports": true, // 控制是否应在文件保存时运行"整理 import 语句"操作
},
/** @description 窗口通用配置 */
"window.menuBarVisibility": "classic", // 编辑器 控制菜单栏的可见性
"window.zoomLevel": 0.1, // 调整窗口的缩放级别
"window.titleBarStyle": "custom", // 调整窗口标题栏的外观
"window.doubleClickIconToClose": true, // 主题 -- 图标
"javascript.updateImportsOnFileMove.enabled": "always", // 启用或禁用在 VS Code 中重命名或移动文件时自动更新导入路径的功能。
/** @description 针对 ==> 特定语言设置格式化规则 */
// 这里的优先级高于通用的保存自动格式化
"[vue]": {
"editor.formatOnSave": true, // 开启保存自动格式化
"editor.defaultFormatter": "esbenp.prettier-vscode", // 格式化程序的方式
"editor.autoIndent":"full",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": false, // eslint对vue进行校验
"source.fixAll.stylelint": true // stylelint对vue进行校验
}
},
"[html]": {
"editor.formatOnSave": true,
"editor.defaultFormatter":"esbenp.prettier-vscode"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": false, // eslint对typescript进行校验
"source.fixAll.stylelint": true // stylelint对typescript进行校验
}
},
"[css]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
/** @description prettier的配置 --- 优先级没有根目录的(.prettierrc.js)高 */
"prettier.arrowParens": "avoid", // 当箭头函数仅有一个参数时去掉括号
"prettier.useTabs": false, // 使用制表符(tab)缩进
"prettier.tabWidth": 2, // 每个制表符占用的空格数
"prettier.printWidth": 120, // 指定每行代码的最佳长度,如果超出该长度则格式化
"prettier.singleQuote": true, // 使用单引号代替双引号
"prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHubcomment)而按照markdown文本样式进行折行
"prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
"prettier.endOfLine": "lf", // 结尾是 \n \r \n\r auto
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的prettierignore文件中
"prettier.bracketSameLine": true, // 在jsx中把'>' 单独放一行
"prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
"prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
"prettier.trailingComma": "none", // 在对象或数组最后一个元素后面是否加逗号
"prettier.semi": true, // 在所有代码语句的末尾添加分号
/**
*@description: trailingComma不生效可以在项目根路径添加 ==== .prettierrc.js ==== 配置文件
但是跟路径添加之后上面的很的不生效了 ===> 所以全部重新添加到根路径
||
||
||
||
arrowParens: "avoid", // 当箭头函数仅有一个参数时去掉括号
useTabs: false, // 使用制表符(tab)缩进
tabWidth: 2, // 每个制表符占用的空格数
printWidth: 200, // 指定每行代码的最佳长度, 如果超出长度则换行
semi: true, // 句尾添加分号 ==> 优先级没有根目录prettierrc.json里的配置高
singleQuote: true, // 使用单引号代替双引号
proseWrap: "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHubcomment)而按照markdown文本样式进行折行
bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
endOfLine: "lf", // 结尾是 \n \r \n\r auto
htmlWhitespaceSensitivity: "ignore",
ignorePath: ".prettierignore", // 不使用prettier格式化的文件填写在项目的prettierignore文件中
bracketSameLin: false, // 在jsx中把'>' 单独放一行
jsxSingleQuote: false, // 在jsx中使用单引号代替双引号
requireConfig: false, // Require a 'prettierconfig' to format prettier
trailingComma: "none", // 在对象或数组最后一个元素后面是否加逗号
};
*/
/** @description 在使用搜索功能时,将这些文件夹/文件排除在外 */
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/target": true,
"**/logs": true
},
"files.insertFinalNewline": true, // 启用后,保存文件时在文件末尾插入一个最终新行
"files.trimTrailingWhitespace": true, // 启用后,将在保存文件时删除行尾的空格。
"guides.enabled": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false, // 控制在资源管理器内拖放移动文件或文件夹时是否进行确认
"workbench.statusBar.visible": true, // 在资源管理器拖拽文件是否进行用户提醒
"breadcrumbs.enabled": true, // 启用/禁用导航路径
"terminal.integrated.fontSize": 14, // 终端cmd字号
"workbench.startupEditor": "newUntitledFile", // 编辑器初始界面
"emmet.triggerExpansionOnTab": true, // 启用后,按下 TAB 键,将展开 Emmet 缩写。
"problems.decorations.enabled": false, // 在文件和文件夹上显示错误和警告
/** koroFileheader -----begin----- */
"fileheader.configObj": {
"openFunctionParamsCheck": true // 默认开启
},
// 函数注释 -- 快捷键-- control+cmd+t
"fileheader.cursorMode": {
// "brief": "", // 函数注释生成之后,光标移动到这里
"description": "", // 描述
"param": "", // param 开启函数参数自动提取 需要将光标放在函数行或者函数上方的空白行
"return": "",
},
// 头部注释 -- 快捷键-- control+cmd+i
"fileheader.customMade": {
"Description": "------ 文件描述 ------", //
"Creater":"snows_l [email protected]",
"Date": "Do not edit", // 文件创建时间(不变)
// 文件最后编辑者
"LastEditors": "snows_l [email protected]",
"LastEditTime": "Do not edit", // 文件最后编辑时间
"FilePath": "Do not edit" // 文件在项目中的相对路径 自动更新
},
/** koroFileheader ----- end ----- */
/** 支付宝小程序开发助手 ----- begin ----- */
"liveServer.settings.donotShowInfoMsg": true,
"emmet.includeLanguages": {
"axml": "xml"
},
"Mini-Program.autoGeneratePageWhenAppJsonChanged": true, // 在 app.json 中新增小程序页面后自动创建对应代码文件
"security.workspace.trust.untrustedFiles": "open",
"css.format.spaceAroundSelectorSeparator": true,
"scss.format.spaceAroundSelectorSeparator": true,
"settingsSync.ignoredExtensions": [],
"git.ignoreMissingGitWarning": true,
/** 支付宝小程序开发助手 ----- end ----- */
/** Live Sass Compiler ----- start ----- */
"liveSassCompile.settings.formats": [
// This is Default.
{
"format": "expanded",
"extensionName": ".css",
"savePath": null
}
],
"liveSassCompile.settings.excludeList": ["/node_modules/**", "/**/node_modules/**", "/.vscode/**", "/.history/**"],
"liveSassCompile.settings.generateMap": false,
"liveSassCompile.settings.autoprefix": [
"> 1%",
"last 2 versions"
],
/** Live Sass Compiler ----- end ----- */
}
图一
图二
图三