热搜:m1 nginx 代理 前端

vscode settings.json配置文件

2024-03-05 02:04:16

好多小伙伴一直问我要我的vscode的sittings.json相关设置,直接覆盖你的文件就可以了,相关配置里面已经有了详细的注释,喜欢的收藏一下吧

vscode settings.json配置文件 1

vscode settings.json配置文件 2

{
"git.enableSmartCommit": true, // 启用智能提交
"editor.linkedEditing": true, // 启用联动编辑
"emmet.showSuggestionsAsSnippets": true, // 将 Emmet 建议作为代码片段显示
"emmet.useInlineCompletions": true, // 在代码中使用 Emmet 完成
"update.mode": "none", // 禁用更新模式
// 配置文件类型识别
"files.associations": {
"*.js": "javascript", // 将 *.js 文件关联到 JavaScript
"*.json": "jsonc", // 将 *.json 文件关联到 JSON
"*.cjson": "jsonc", // 将 *.cjson 文件关联到 JSON
"*.wxss": "css", // 将 *.wxss 文件关联到 CSS
"*.wxs": "javascript", // 将 *.wxs 文件关联到 JavaScript
"*.nvue": "vue" // 将 *.nvue 文件关联到 Vue
},
"extensions.ignoreRecommendations": false, // 不忽略扩展插件推荐
"files.exclude": {
"**/.DS_Store": true, // 排除 .DS_Store 文件
"**/.git": true, // 排除 .git 文件夹
"**/.hg": true, // 排除 .hg 文件夹
"**/.svn": true, // 排除 .svn 文件夹
"**/CVS": true, // 排除 CVS 文件夹
"**/node_modules": false, // 不排除 node_modules 文件夹
"**/tmp": true // 排除 tmp 文件夹
},
// "javascript.implicitProjectConfig.experimentalDecorators": true, // 启用实验性装饰器
"liveServer.settings.root": "./", // 设置 Live Server 根目录
"liveServer.settings.donotShowInfoMsg": true, // 不显示 Live Server 的信息提示
"liveServer.settings.port": 5800, // 设置 Live Server 端口
"liveServer.settings.ignoreFiles": [
".vscode/**", // 忽略 .vscode 文件夹
"**/*.mov" // 忽略所有 .mov 文件
],
"liveServer.settings.CustomBrowser": "chrome", // 设置自定义浏览器为 Chrome
"liveServer.settings.proxy": {
"enable": false, // 禁用代理
"baseUri": "/", // 代理基本路径
"proxyUri": "http://113.106.54.176:8080/" // 代理地址
},
"explorer.confirmDragAndDrop": false, // 禁用拖放确认提示
"typescript.updateImportsOnFileMove.enabled": "prompt", // 移动文件时更新导入的模块
"git.confirmSync": false, // 不确认同步
"editor.tabSize": 2, // 设置制表符宽度为 2
"editor.fontWeight": "500", // 设置字体粗细为 500
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features" // JSON 文件默认格式化器
},
"gitlens.views.repositories.files.layout": "list", // GitLens 仓库文件视图布局设置为列表
"editor.tabCompletion": "on", // 开启选项卡完成
"vsicons.projectDetection.autoReload": true, // 自动重新加载项目图标
"docker.attachShellCommand.linuxContainer": "/bin/sh -c "[ -e /bin/zsh ] && /bin/zsh || /bin/sh"", // Docker 使用的 Linux 容器 shell 命令
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace, Meslo LG M for Powerline", // 设置字体族
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features" // HTML 文件默认格式化器
},
"editor.fontSize": 17, // 设置编辑器字体大小为 17
"debug.console.fontSize": 14, // 设置调试控制台字体大小为 14
"vsicons.dontShowNewVersionMessage": true, // 不显示 VSCode Icons 的新版本消息
"gitlens.advanced.messages": {
"suppressGitMissingWarning": true, // 抑制 Git 丢失警告
"suppressLineUncommittedWarning": true // 抑制未提交行警告
},
"editor.minimap.enabled": true, // 启用缩略图
"minapp-vscode.disableAutoConfig": true, // 禁用自动配置
"todo-tree.tree.showScanModeButton": false, // 不显示扫描模式按钮
// eslint配置项,保存时自动修复错误
"editor.codeActionsOnSave": {
"source.fixAll": "explicit" // 在保存时自动修复所有错误
},
// new end
// 指定 *.js 文件的格式化工具为vscode自带
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features" // JavaScript 文件默认格式化器
},
// 指定 *.ts 文件的格式化工具为vscode自带
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features" // TypeScript 文件默认格式化器
},
// // 默认使用prettier格式化支持的文件
"editor.defaultFormatter": "esbenp.prettier-vscode", // 默认格式化器为 Prettier
"prettier.jsxBracketSameLine": true, // JSX 括号与标签在同一行
// 函数前面是否加空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": false, // 在函数前插入空格
// 单引号
"prettier.singleQuote": true, // 使用单引号
// eslint end
// react
// 当按tab键的时候,会自动提示
"emmet.triggerExpansionOnTab": true, // 按下 Tab 键时触发 Emmet
"emmet.showAbbreviationSuggestions": true, // 显示 Emmet 缩写建议
"emmet.includeLanguages": {
// jsx的提示
"javascript": "javascriptreact", // 设置 JavaScript 的文件为 JavaScript React
"vue-html": "html", // 设置 Vue HTML 文件为 HTML
"vue": "html", // 设置 Vue 文件为 HTML
"wxml": "html" // 设置 Wxml 文件为 HTML
},
// end
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"API",
"FN",
"[ ]",
"[x]"
],
"todo-tree.highlights.customHighlight": {
"TODO": {
"foreground": "black",
"background": "green",
"rulerColour": "green",
"iconColour": "green"
},
"BUG": {
"foreground": "black",
"background": "#fd1800",
"icon": "bug",
"rulerColour": "#fd1800",
"iconColour": "#fd1800"
},
"FIXME": {
"icon": "flame"
},
"FN": {
"foreground": "black",
"background": "#f0a500",
"icon": "rocket",
"rulerColour": "#f0a500",
"iconColour": "#f0a500"
}
},
"tabnine.experimentalAutoImports": true, // 实验性自动导入
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features" // JSONC 文件默认格式化器
},
"todo-tree.regex.regex": "(//|#|<!--|;|/\*|^|^\s*(-|\d+.))\s*($TAGS)", // Todo Tree 的正则表达式匹配规则
// @路径提示
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src" // 将 "@" 映射到项目根目录的 "src" 文件夹
},
"security.workspace.trust.untrustedFiles": "open", // 对不受信任的文件采取的措施为打开
"git.ignoreMissingGitWarning": true, // 忽略缺失的 Git 警告
"bracket-pair-colorizer-2.depreciation-notice": false, // 不显示 Bracket Pair Colorizer 2 的弃用通知
"leetcode.endpoint": "leetcode-cn", // LeetCode 终端设置为中国站点
"editor.inlineSuggest.enabled": true, // 启用内联建议
"explorer.confirmDelete": false, // 禁用删除确认提示
"git.autofetch": true, // 自动获取 Git
"files.autoSave": "afterDelay", // 延时自动保存文件
"prettier.vueIndentScriptAndStyle": true, // Vue 模板中的脚本和样式缩进
"editor.insertSpaces": false, // 不使用空格缩进
"files.refactoring.autoSave": false, // 不自动保存重构文件
"testing.saveBeforeTest": false, // 测试前不保存文件
"editor.language.brackets": [], // 禁用括号匹配
"less.compile": {
"out": "../css/" // Less 文件输出路径
},
"cSpell.languageSettings": [], // 拼写校正语言设置为空
"editor.tokenColorCustomizations": {
"comments": "#9d9d24ee" // 注释颜色设置为特定颜色
},
"gitHistory.includeRemoteBranches": true, // 包含远程分支的 Git 历史记录
"gitHistory.editorTitleButtonOpenRepo": true, // 在编辑器标题栏中显示 "打开仓库" 按钮
"gitHistory.hideCommitViewExplorer": true, // 隐藏 Git 提交视图资源管理器
"prettier.printWidth": 120, // Prettier 的打印宽度设置为 120
//微信小程序
"[wxml]": {
"editor.defaultFormatter": "qiu8310.minapp-vscode" // Wxml 文件默认格式化器
},
"minapp-vscode.wxmlFormatter": "prettyHtml", // 指定格式化工具
"minapp-vscode.prettyHtml": { // prettyHtml 默认配置
"useTabs": true, // 使用 Tab
"tabWidth": 2, // Tab 宽度为 2
"printWidth": 100, // 打印宽度为 100
"singleQuote": false, // 不使用单引号
"usePrettier": true, // 使用 Prettier
"wrapAttributes": false, // 不强制属性换行
"sortAttributes": false // 不排序属性
},
//微信小程序end

"workbench.editor.splitInGroupLayout": "vertical", // 设置编辑器分组布局为垂直
"workbench.iconTheme": "vscode-icons", // 设置图标主题为 vscode-icons
// 控制当超出可用空间时,选项卡是否应在多行之间换行,或者是否应显示滚动条。
// 当 "#workbench.editor.showTabs#" 处于禁用状态时,将忽略此值。
"workbench.editor.wrapTabs": true, // 在多行之间换行选项卡
//js html... 保存时自动格式化
"editor.formatOnSave": true, // 在保存时格式化
//文件夹折叠
"explorer.compactFolders": false, // 不折叠文件夹
"workbench.preferredHighContrastColorTheme": "One Dark Pro Mix", // 高对比度颜色主题
"workbench.preferredDarkColorTheme": "Default Light+", // 首选暗色主题
"workbench.colorCustomizations": {}, // 自定义工作台颜色
"workbench.colorTheme": "One Dark Pro Mix", // 颜色主题设置为 One Dark Pro Mix
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features" // CSS 文件默认格式化器
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features" // TypeScript React 文件默认格式化器
},
"typescript.format.semicolons": "insert", // 在 TypeScript 中插入分号
"editor.acceptSuggestionOnCommitCharacter": false, // 在提交字符上不接受建议
"typescript.format.insertSpaceAfterSemicolonInForStatements": false, // 在 for 语句中不插入分号后的空格
"prettier.semi": false, // 不使用分号
"github.copilot.enable": { // 启用 GitHub Copilot
"*": true,
"plaintext": false,
"markdown": false,
"scminput": false,
"vue": true // 在 Vue 文件中启用 GitHub Copilot
},
"merge-conflict.autoNavigateNextConflict.enabled": true, // 启用自动导航到下一个冲突
"oneDarkPro.vivid": true, // 使用 One Dark Pro 鲜亮配色方案
"editor.inlayHints.enabled": "offUnlessPressed", //默认情况下隐藏内嵌提示$event=>,并在按住 Ctrl+Alt 时显示
//或者使用以下配置关闭内嵌提示
// "editor.inlayHints.enabled":"off",// 已禁用内嵌提示
}