Visual Studio Code 配置
扩展插件推荐
主题相关
One Dark Pro- 黑色主题
- 插件地址
Shades of Purple- 紫色主题(来自彤姐的推荐:没有什么比骚更重要)
- 插件地址
Dracula Official- 黑色主题
- 插件地址
Bluloco Dark- 黑色主题
- 插件地址
Material Icon Theme- 文件图标美化
- 插件地址
background- 自定义背景
- 插件地址
HTML 相关
Auto Close Tag- 自动添加 HTML / XML 关闭标签
- 插件地址
Auto Rename Tag- 自动重命名配对的 HTML / XML 标签
- 插件地址
Highlight Matching Tag- Tag 高亮匹配标记
- 插件地址
React 相关
ES7 React/Redux/GraphQL/React-Native snippets- 提供 ES7 中的 JavaScript 和 React / Redux 片段,以及针对 VS Code 的 Babel 插件功能
- 插件地址
Vue 相关
CSS 相关
AI 代码提示和生成
Markdown 相关
markdownlint- Markdown / CommonMark 标记和样式检查
- 插件地址
Markdown Preview Enhanced
Git 相关
GitLens — Git supercharged- 增强构建在 VS Code 中的
Git功能 - 插件地址
- 增强构建在 VS Code 中的
格式和代码检查相关
ESLint- 将 ESLint JavaScript 集成到 VS Code 中
- 插件地址
Prettier - Code formatter- 代码格式化
- 插件地址
Code Spell Checker- 代码拼写检查
- 插件地址
Error Lens- 突出显示代码错误和警告
- 插件地址
Sort package.json- 对
package.json文件进行排序 - 插件地址
- 对
调试相关
Live Server- 启动具有实时重新加载功能的本地开发服务,以处理静态和动态页面
- 插件地址
语法支持
开发体验提升
Auto Import- 自动查找,解析并提供所有可用导入的代码操作和代码完成。 与
Typescript和TSX一起使用 - 插件地址
- 自动查找,解析并提供所有可用导入的代码操作和代码完成。 与
Import Cost- 在编辑器中显示导入/需要包的大小(PS:小内存用户不建议使用,说的就是你这个用 8G 的)
- 插件地址
Image preview- 在行号边上、悬停时显示图像预览
- 插件地址
Path Intellisense- 自动补全文件名
- 插件地址
npm Intellisense- 可自动完成导入语句中的 npm 模块
- 插件地址
Chinese (Simplified) Language Pack for Visual Studio Code- 适用于 VS Code 的中文(简体)语言包
- 插件地址
es6-string-html- ES6 模板字符串高亮
- 插件地址
Todo Tree- 在树视图中显示 TODO FIXME 等注释标记
- 插件地址
FnMap - 函数地图- 函数列表、位置标记、快速跳转、符号置顶、关键词搜索
- 插件地址
微信小程序相关
WXML - Language Service- 微信小程序标签、属性的智能补全(同时支持原生小程序、
mpvue和wepy框架,并提供 snippets) - 插件地址
- 微信小程序标签、属性的智能补全(同时支持原生小程序、
其他
韭菜盒子- 看股票、基金实时数据
- 插件地址
使用小技巧
删除空行
- 打开替换
Alt + ⌘ + F - 输入
^\s*(?=\r?$)\n - 勾选使用正则表达式
Alt + ⌘ + R - 全部替换
⌘ + Enter
安装 code 命令
code 命令可以直接打开一个文件或者文件目录
- 使用
shift + command + p打开命令面板 - 输入
shell command进行搜索 - 点击
Shell 命令:在 PATH 中安装 “code” 命令
sh
# 在 vscode 中编辑当前目录下的文件
code .
# 在 vscode 中编辑该文件(当文件不存在时会先创建该文件)
code [文件名]1
2
3
4
5
2
3
4
5
webpack 项目识别 alias
- 在项目根目录新建
jsconfig.json或tsconfig.json - 添加以下代码,其中
paths字段的值要与你项目配置的alias一致
json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src"]
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
快捷键
json
// 对于 行 的操作:
// 重开一行:光标在行尾的话,回车即可;不在行尾,ctrl + enter 向下重开一行;ctrl+shift + enter 则是在上一行重开一行
// 删除一行:光标没有选择内容时,ctrl + x 剪切一行;ctrl +shift + k 直接删除一行
// 移动一行:alt + ↑ 向上移动一行;alt + ↓ 向下移动一行
// 复制一行:shift + alt + ↓ 向下复制一行;shift + alt + ↑ 向上复制一行
// ctrl + z 回退
// 对于 词 的操作:
// 选中一个词:ctrl + d
// 搜索或者替换:
// ctrl + f :搜索
// ctrl + alt + f: 替换
// ctrl + shift + f:在项目内搜索
// 通过Ctrl + ` 可以打开或关闭终端
// Ctrl+P 快速打开最近打开的文件
// Ctrl+Shift+N 打开新的编辑器窗口
// Ctrl+Shift+W 关闭编辑器
// Home 光标跳转到行头
// End 光标跳转到行尾
// Ctrl + Home 跳转到页头
// Ctrl + End 跳转到页尾
// Ctrl + Shift + [ 折叠区域代码
// Ctrl + Shift + ] 展开区域代码
// Ctrl + / 添加关闭行注释
// Shift + Alt +A 块区域注释1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
推荐配置
json
{
"individualEmoji.specified.enable": true,
"individualEmoji.specified.typeConfig": [
[
"begin",
[
"🎉"
]
], //:tada: Begin a project. 开始一个项目
[
"work",
[
"🚧"
]
], //:construction: Work in progress. 工作进行中
[
"feat",
[
"✨"
]
], //:sparkles: Introduce new features. 添加新功能
[
"docs",
[
"📝"
]
], //:memo: Add or update documentation. 增加或更新文档
[
"config",
[
"🔧"
]
], //:wrench: Add or update configuration files.
[
"comment",
[
"💡"
]
], //:bulb: Add or update comments in source code. 增加/更新源代码中的注释
[
"rename",
[
"🚚"
]
], //:truck: Move or rename resources (e.g.: files, paths, routes). 移动/重命名文件/路径
[
"chore",
[
"🔥"
]
], //:fire: Remove code or files.
[
"fix",
[
"🐛"
]
], //:bug: Fix a bug. 修复bug
[
"revert",
[
"⏪️"
]
], //:rewind: Revert changes. 回退
[
"typos",
[
"✏️"
]
], //:pencil2: Fix typos. 修改错别字
[
"merge",
[
"🔀"
]
], //:twisted_rightwards_arrows: Merge branches. 合并分支
[
"pref",
[
"⚡️"
]
], //:zap: Improve performance. 性能优化
[
"style",
[
"🎨"
]
], //:art: Improve structure / format of the code. 改进代码结构或格式
[
"test",
[
"✅"
]
], //:white_check_mark: Add, update, or pass tests. 增加/更新测试用例
[
"package",
[
"📦️"
]
], //:package: Add or update compiled files or packages. 增加/更新编译后文件/包
[
"log",
[
"🔊"
]
], //:loud_sound: Add or update logs. 增加/更新日志
[
"contributor",
[
"👥"
]
], //:busts_in_silhouette: Add or update contributor(s). 增加/更新贡献者
[
"refactor",
[
"♻️"
]
], //:recycle: Refactor code. 重构代码
[
"build",
[
"🚀"
]
], //:rocket: Deploy stuff. 构建和部署功能
[
"release",
[
"🔖"
]
] //:bookmark: Release / Version tags. 发行版本标签
// # ====常用颜文字====
// # 🐭 🐁 🤡 🐶
// # 🎉 :tada: Begin a project. 开始一个项目
// # 🚧 :construction: Work in progress. 工作进行中
// # ✨ :sparkles: Introduce new features. 添加新功能
// # 📝 :memo: Add or update documentation. 增加或更新文档
// # 🔧 :wrench: Add or update configuration files. 增加/更新配置文件
// # 💄 :lipstick: Add or update the UI and style files. 增加/更新UI和样式文件
// # 💡 :bulb: Add or update comments in source code. 增加/更新源代码中的注释
// # 🚚 :truck: Move or rename resources (e.g.: files, paths, routes). 移动/重命名文件/路径
// # 🔥 :fire: Remove code or files. 移除代码/文件
// # 🐛 🦖 :bug: Fix a bug. 修复bug
// # 🚑️ :ambulance: Critical hotfix. 紧急修复
// # ⏪️ :rewind: Revert changes. 回退
// # ✏️ :pencil2: Fix typos. 修改错别字
// # 🔀 :twisted_rightwards_arrows: Merge branches. 合并分支
// # ⚡️ :zap: Improve performance. 性能优化
// # 🎨 :art: Improve structure / format of the code. 改进代码结构或格式
// # ✅ :white_check_mark: Add, update, or pass tests. 增加/更新测试用例
// # 📦️ :package: Add or update compiled files or packages. 增加/更新编译后文件/包
// # 🙈 :see_no_evil: Add or update a .gitignore file. 增加/更新.gitignore文件
// # 📄 :page_facing_up: Add or update license. 增加/更新LICENSE
// # 🔊 :loud_sound: Add or update logs. 增加/更新日志
// # 🔇 :mute: Remove logs. 移除日志
// # 👥 :busts_in_silhouette: Add or update contributor(s). 增加/更新贡献者
// # ♻️ :recycle: Refactor code. 重构代码
// # 📈 :chart_with_upwards_trend: Add or update analytics or track code. 增加/更新分析/跟踪代码
// # 🚸 :children_crossing: Improve user experience / usability. 增强用户体验/可用性
// # 🛂 :passport_control: Work on code related to authorization, roles and permissions. 处理与授权、身份和权限相关的代码
// # ====附加颜文字====
// # ➕ :heavy_plus_sign: Add a dependency. 增加一个依赖
// # ➖ :heavy_minus_sign: Remove a dependency. 移除一个依赖
// # ⬇️ :arrow_down: Downgrade dependencies. 降级依赖
// # ⬆️ :arrow_up: Upgrade dependencies. 升级依赖
// # 📌 :pushpin: Pin dependencies to specific versions. 固定依赖到特定版本
// # 🚀 :rocket: Deploy stuff. 部署功能
// # 👽️ :alien: Update code due to external API changes. 由于外部API更改而更新代码
// # 🔖 :bookmark: Release / Version tags. 发布/版本标签
// # 🔍️ :mag: Improve SEO. 提高SEO
// # 🥅 :goal_net: Catch errors. 捕捉错误
// # 🔒️ :lock: Fix security issues. 修复安全问题
// # 🗑️ :wastebasket: Deprecate code that needs to be cleaned up. 废弃代码,需要清理
// # ⚰️ :coffin: Remove dead code. 移除无用代码
// # 🧪 :test_tube: Add a failing test. 增加一个失败的测试
// # 🏷️ :label: Add or update types. 增加/更新类型
// # 💫 :dizzy: Add or update animations and transitions. 增加/更新动画和过渡
// # 🚩 :triangular_flag_on_post: Add, update, or remove feature flags.增加/更新/移除功能标识
// # 🔨 :hammer: Add or update development scripts. 增加/更新开发脚本
// # 👔 :necktie: Add or update business logic 增加/更新业务逻辑
// # 🍱 :bento: Add or update assets. 增加/更新assets
// # 🌱 :seedling: Add or update seed files. 增加/更新种子文件
// # 📸 :camera_flash: Add or update snapshots. 增加/更新快照
// # 👷 :construction_worker: Add or update CI build system. 增加/更新CI构建系统
// # 💚 :green_heart: Fix CI Build. 修复CI构建系统
// # 💩 :poop: Write bad code that needs to be improved. 代码很烂需要改进
// # 🚨 :rotating_light: Fix compiler / linter warnings. 修复compiler/linter的警告
// # ♿️ :wheelchair: Improve accessibility. 改善可访问性
// # ⚗️ :alembic: Perform experiments. 进行实验
// # 💥 :boom: Introduce breaking changes. 引入破坏性改变
// # 🗃️ :card_file_box: Perform database related changes. 执行数据库相关的改变
// # 🏗️ :building_construction: Make architectural changes. 执行架构层次的改变
// # 🩹 :adhesive_bandage: Simple fix for a non-critical issue. 非关键问题的简单修复
// # 🧐 :monocle_face: Data exploration/inspection. 数据探查/检查
// # ====其他颜文字====
// # 🌐 :globe_with_meridians: Internationalization and localization. 国际化与本地化
// # 🍻 :beers: Write code drunkenly. 醉酒写码
// # 💬 :speech_balloon: Add or update text and literals. 增加/更新文本和文字
// # 📱 :iphone: Work on responsive design. 致力于响应式设计
// # 🥚 :egg: Add or update an easter egg. 增加/更新复活节蛋
// # 🤡 :clown_face: Mock things.
],
"liveServer.settings.port": 63343,
"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.NoBrowser": false,
"liveServer.settings.host": "localhost",
// "liveServer.settings.AdvanceCustomBrowserCmdLine": "C:\\Users\\QSKJ-00330\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --disable-web-security --allow-file-access-from-files --allow-file-access --user-data-dir='D:\\userData'",
// #editor
"editor.tabSize": 2,
"editor.fontSize": 16,
// vscode默认启用了根据文件类型自动设置tabsize的选项
// "editor.wordWrap": "on",
// "editor.fontFamily": "Input Mono, Fira Code, monospace",
// "editor.renderControlCharacters": true,
// "editor.renderWhitespace": "all",
// "editor.renderWhitespace": "boundary",
// "editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss06', 'zero'",
// "editor.find.addExtraSpaceOnTop": false,
// "editor.lineNumbers": "interval",
// "editor.tabCompletion": "off",
// "editor.suggestSelection": "first",
// "editor.unicodeHighlight.invisibleCharacters": false,
// "editor.unicodeHighlight.allowedLocales": {
// "zh-hans": true
// },
// "editor.minimap.enabled": false, // 消除链接提示
// "editor.colorDecorators": true,
// "editor.unicodeHighlight.ambiguousCharacters": false,
// "editor.mouseWheelZoom": true,
// "editor.foldingStrategy": "indentation",
// 禁用快速修复
"editor.quickSuggestions": {
"strings": "on",
"other": true,
"comments": true
},
"editor.suggestOnTriggerCharacters": true,
"editor.multiCursorModifier": "ctrlCmd", // 修改多行编辑快捷键
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", // 配置单词的分割规则
// "editor.wordSeparators": "`~#!@$%^&*()-=+[{]}\\|;:'\",<>/?.",
"editor.lineHeight": 22,
// "editor.cursorBlinking": "expand",
// bug控制缩进不关tabSize修改无用
"editor.detectIndentation": false,
// "editor.largeFileOptimizations": false,
// "editor.accessibilitySupport": "off",
// "editor.cursorSmoothCaretAnimation": "on",
// "editor.guides.bracketPairs": "active",
// "editor.guides.bracketPairs": true,
// "editor.inlineSuggest.enabled": true,
// "editor.suggestSelection": "recentlyUsedByPrefix",
// "editor.acceptSuggestionOnEnter": "smart",
// "editor.suggest.snippetsPreventQuickSuggestions": false,
// "editor.stickyScroll.enabled": true,
// "editor.hover.sticky": true,
// "editor.suggest.insertMode": "replace",
// "editor.bracketPairColorization.enabled": true,
// "editor.autoClosingBrackets": "beforeWhitespace",
// "editor.autoClosingDelete": "always",
// "editor.autoClosingOvertype": "always",
// "editor.autoClosingQuotes": "beforeWhitespace",
// 默认禁用自动格式化(手动格式化快捷键:Shift + Alt + F)
"editor.formatOnSave": true, // 保存的时候自动格式化
"editor.formatOnPaste": false,
// 启用自动代码修复功能,保存时触发 eslint 和 stylelint 的自动修复。
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit",
"source.fixAll.markdownlint": "explicit",
// "source.addMissingImports.ts": "explicit",
// 在保存时,自动调整 import 语句相关顺序
"source.organizeImports": "never"
},
// 设置默认格式化工具为 Prettier
// 如需要开发微信小程序,需要注释这段代码,不然会和 minapp-vscode 插件冲突
"editor.defaultFormatter": "esbenp.prettier-vscode",
// "[snippets]": {
// "editor.defaultFormatter": "vscode.json-language-features"
// },
"[scss]": {
"editor.formatOnSave": false
},
"[html]": {
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// volar 可以处理 vue 文件的格式化
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
// "editor.defaultFormatter": "Vue.volar"
},
// json、yaml 等配置文件保存时自动格式化
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.json-language-features"
},
"[yaml]": {
"editor.formatOnSave": true
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"[wxml]": {
"editor.defaultFormatter": "qiu8310.minapp-vscode"
},
// Extension configs
"emmet.showSuggestionsAsSnippets": true,
"emmet.triggerExpansionOnTab": false,
// "emmet.showAbbreviationSuggestions": true,
// "emmet.showExpandedAbbreviation": "always",
// "emmet.includeLanguages": {
// "wxml": "html"
// },
// "extensions.autoUpdate": "onlyEnabledExtensions",
"extensions.ignoreRecommendations": true,
// search
"search.searchEditor.singleClickBehaviour": "peekDefinition",
"search.followSymlinks": false,
// 在使用搜索功能时,将这些文件夹/文件排除在外
"search.exclude": {
// 配置文件
"**/.git": true,
"**/.github": true,
"**/.gitignore": true,
"**/.svn": true,
"**/.vscode": false,
"**/.vitepress/cache": true,
"**/.idea": true,
"*.xml": true,
"**/.DS_Store": true,
// 依赖文件
"**/node_modules": true,
"node_modules": true,
"**/bower_components": true,
"**/miniprogram_npm": true,
"**/*.log": true,
"**/*.log*": true,
// 打包文件
"**/dist/**": true,
"**/elehukouben": true,
"**/.yarn": true,
"**/tmp": true,
"out": true,
"dist": true,
"CHANGELOG.md": true,
"**/.nuxt": true,
"**/.output": true,
"**/.pnpm": true,
"**/logs": true,
"**/out/**": true,
// lock 文件
"**/package-lock.json": true,
"**/pnpm-lock.yaml": true,
"**/yarn.lock": true
},
// "javascript.validate.enable": false,
"javascript.updateImportsOnFileMove.enabled": "always", // 设置缩放级别
// "diffEditor.ignoreTrimWhitespace": false,
// "diffEditor.hideUnchangedRegions.enabled": true,
"debug.onTaskErrors": "debugAnyway",
"debug.allowBreakpointsEverywhere": true,
"debug.javascript.autoAttachFilter": "disabled",
"update.mode": "manual",
// "update.enableWindowsBackgroundUpdates": false,
// workbench
"workbench.iconTheme": "vscode-icons",
"workbench.startupEditor": "welcomePage",
"workbench.preferredLightColorTheme": "Dracula Theme Soft",
"workbench.preferredDarkColorTheme": "Vitesse Dark",
"workbench.colorTheme": "Vitesse Dark Soft",
// "workbench.editor.closeOnFileDelete": true,
// "workbench.editor.highlightModifiedTabs": true,
// "workbench.editor.tabCloseButton": "left",
// "workbench.editor.limit.enabled": true,
// "workbench.editor.limit.perEditorGroup": true,
// "workbench.editor.limit.value": 7,
// "workbench.list.smoothScrolling": true,
// "workbench.sideBar.location": "left",
// "workbench.tree.expandMode": "singleClick",
// "workbench.tree.indent": 10,
// "workbench.productIconTheme": "icons-carbon",
// "workbench.editor.tabActionLocation": "left",
// https://glitchbone.github.io/vscode-base16-term/#/dracula
"workbench.colorCustomizations": {
// "terminal.background": "#282936",
// "terminal.foreground": "#E9E9F4",
// "terminalCursor.background": "#E9E9F4",
// "terminalCursor.foreground": "#E9E9F4",
// "terminal.ansiBlack": "#282936",
// "terminal.ansiBlue": "#62D6E8",
// "terminal.ansiBrightBlack": "#626483",
// "terminal.ansiBrightBlue": "#62D6E8",
// "terminal.ansiBrightCyan": "#A1EFE4",
// "terminal.ansiBrightGreen": "#EBFF87",
// "terminal.ansiBrightMagenta": "#B45BCF",
// "terminal.ansiBrightRed": "#EA51B2",
// "terminal.ansiBrightWhite": "#F7F7FB",
// "terminal.ansiBrightYellow": "#00F769",
// "terminal.ansiCyan": "#A1EFE4",
// "terminal.ansiGreen": "#EBFF87",
// "terminal.ansiMagenta": "#B45BCF",
// "terminal.ansiRed": "#EA51B2",
// "terminal.ansiWhite": "#E9E9F4",
// "terminal.ansiYellow": "#00F769"
},
"window.zoomLevel": 1,
"window.autoDetectColorScheme": true,
// "window.dialogStyle": "custom",
// "window.titleBarStyle": "custom",
"window.nativeTabs": true, // this is great, macOS only
// files
"files.eol": "\n",
// "files.eol": "auto", // 默认行尾字符LF
"files.insertFinalNewline": true,
"files.simpleDialog.enable": true, // 默认使用系统文件对话框
"files.associations": {
"*.ejs": "html",
"*.art": "html",
"**/tsconfig.json": "jsonc",
"*.json": "jsonc",
"package.json": "json",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.vue": "vue",
"*.wxml": "html",
"*.env.*": "env",
"*.css": "tailwindcss"
},
"files.exclude": {
"**/.eslintcache": true,
"**/bower_components": true,
"**/.turbo": true,
"**/.idea": true,
"**/tmp": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.stylelintcache": true,
"**/.DS_Store": true,
"**/vite.config.mts.*": true,
"**/tea.yaml": true,
"**/node_modules": true
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/.vscode/**": true,
"**/node_modules/**": true,
"**/tmp/**": true,
"**/bower_components/**": true,
"**/dist/**": true,
"**/yarn.lock": true
},
// teminal
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
// "Git-Bash": {
// "path": "D:\\Software:\\Git\\bin\\bash.exe",
// "args": ["--login", "-i"],
// // 编码
// "encoding": "utf8",
// "icon": "terminal-bash"
// },
"PowerShell -NoProfile": {
"source": "PowerShell",
"args": [
"-NoProfile"
],
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
}
},
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.persistentSessionReviveProcess": "never",
"terminal.integrated.tabs.enabled": true,
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.scrollback": 10000,
"terminal.integrated.stickyScroll.enabled": true,
// "terminal.integrated.defaultProfile.windows": "PowerShell",
// "terminal.integrated.cursorStyle": "line",
// "terminal.integrated.fontWeight": "300",
// "terminal.integrated.copyOnSelection": true,
"security.workspace.trust.untrustedFiles": "open",
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.untrackedChanges": "separate",
"git.ignoreRebaseWarning": true, // 颜色标记警告
"vscode-live2d.enable": false,
// "path-intellisense.mappings": {
// "@": "${workspaceRoot}/src"
// },
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
// "explorer": {
// "clipboard": true,
// "compare": true,
// "history": true,
// "remote": true
// },
// 折叠配置文件
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"tsconfig.json": "tsconfig.*.json, env.d.ts",
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json,package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig",
"pubspec.yaml": ".packages, pubspec.lock, .flutter-plugins, .flutter-plugins-dependencies, .metadata, analysis_options.yaml, dartdoc_options.yaml",
"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx, $(capture).d.ts",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx,$(capture).d.ts",
"*.env": "$(capture).env.*",
"README.md": "README*,CHANGELOG*,LICENSE,CNAME,Todo*",
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,prettier.config.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json"
},
// extension
"background.enabled": false,
"background.panel": {
"images": [],
"opacity": 0.6,
"size": "cover",
"position": "center",
"interval": 0,
"random": false
},
"background.fullscreen": {
"images": [
// "file:///D:/Picture/background-image/1.jpg",
"file:///D:/Picture/background-image/girl_kimono_flowers_1072618_1600x900.jpg"
// "file:///D:/Picture/background-image/2.png@1052w_!web-dynamic.avif"
], // urls of your images
"opacity": 0.01,
// "opacity": 0.95, // 0.85 ~ 0.95 recommended
"size": "cover", // also css, `cover` to self-adaption (recommended),or `contain`、`200px 200px`
"position": "center", // alias to `background-position`, default `center`
"interval": 0 // seconds of interval for carousel, default `0` to disabled.
},
// "background.editor": {
// "style": {
// "background-position": "center center",
// "background-size": "cover",
// "opacity": 0.15,
// "interval": 0
// },
// "images": ["file:///D:/Picture/background-image/1.jpg"]
// },
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"javascript.inlayHints.parameterTypes.enabled": true,
"javascript.inlayHints.variableTypes.enabled": true,
"prisma.showPrismaDataPlatformNotification": false,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.inlayHints.enumMemberValues.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.parameterTypes.enabled": true,
"typescript.inlayHints.parameterNames.enabled": "literals",
"typescript.inlayHints.variableTypes.enabled": true,
"typescript.preferences.preferTypeOnlyAutoImports": false,
"typescript.preferences.includePackageJsonAutoImports": "on",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.suggest.autoImports": true,
"typescript.updateImportsOnFileMove.enabled": "always",
// "typescript.tsserver.maxTsServerMemory": 2048,
// #eslint
// 设置编辑器保存文件时自动执行 eslint --fix 命令进行代码风格修复,并且仍然具有格式和快速修复功能
// eslint 会在检查出错误时,给出对应的文档链接地址
"eslint.codeAction.showDocumentation": {
"enable": true
},
"eslint.enable": true, // 开启eslint检查
// "eslint.format.enable": true, // 启用 eslint 的格式化能力
// Silent the stylistic rules in you IDE, but still auto fix them
// "eslint.rules.customizations": [
// { "rule": "style/*", "severity": "off", "fixable": true },
// { "rule": "format/*", "severity": "off", "fixable": true },
// { "rule": "*-indent", "severity": "off", "fixable": true },
// { "rule": "*-spacing", "severity": "off", "fixable": true },
// { "rule": "*-spaces", "severity": "off", "fixable": true },
// { "rule": "*-order", "severity": "off", "fixable": true },
// { "rule": "*-dangle", "severity": "off", "fixable": true },
// { "rule": "*-newline", "severity": "off", "fixable": true },
// { "rule": "*quotes", "severity": "off", "fixable": true },
// { "rule": "*semi", "severity": "off", "fixable": true }
// ],
// 红色波浪提示
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
// 允许注释的 JSON 格式
"jsonc",
"json5",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"svelte",
"css",
"less",
"scss",
"pcss",
"postcss"
],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.enable": true,
"stylelint.packageManager": "pnpm",
"stylelint.validate": [
"css",
"less",
"postcss",
"scss",
"html",
"vue"
],
"stylelint.customSyntax": "postcss-html",
"stylelint.snippet": [
"css",
"less",
"postcss",
"scss",
"vue"
],
"less.compile": {
"compress": false,
"sourceMap": false,
"out": true, //是否开启
"outExt": ".wxss"
},
// prettier
"prettier.enable": true, // I only use Prettier for manually formatting
// "prettier.printWidth": 200,
// "prettier.tabWidth": 2,
"prettier.semi": false, // 行尾是否需要有分号
"prettier.singleQuote": true, // 使用单引号
"prettier.arrowParens": "always", // 箭头函数尽量简写
"prettier.endOfLine": "auto", // 行位换行符
// "prettier.useTabs": false, // 不使用缩进符,而使用空格
"prettier.trailingComma": "none", // 末尾是否需要有逗号
/** vetur 配置 */
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatter.js": "prettier-eslint",
"vetur.format.defaultFormatterOptions": {
"prettyhtml": {
"printWidth": 80, // No line exceeds 100 characters
"singleQuote": false // Prefer double quotes over single quotes
},
"prettier": {
// 是否添加分号
"semi": false,
// 是否使用单引号
"singleQuote": true,
"eslintIntegration": true,
"parser": "babylon"
}
},
"vue.codeActions.enabled": true,
"vue.inlayHints.missingProps": true,
"vue.autoInsert.dotValue": true,
"vue.server.maxOldSpaceSize": 2048,
"vue.server.hybridMode": true,
"nuxt.isNuxtApp": false,
"remote.SSH.remotePlatform": {
"0": "l",
"1": "i",
"2": "n",
"3": "u",
"4": "x",
"47.119.114.107": "linux"
},
// go 插件配置
"go.goroot": "D:\\Software\\Go",
"go.gopath": "D:\\Project\\Go",
"go.toolsGopath": "D:\\Project\\Go",
"go.lintOnSave": "file",
// "go.buildOnSave": true,
// "go.buildFlags": [],
// "go.buildTags": "",
// "go.formatOnSave": true,
// "go.inferGopath": true,
// "go.autocompleteUnimportedPackages": true,
// "go.gocodePackageLookupMode": "go",
// "go.gotoSymbol.includeImports": true,
// "go.useCodeSnippetsOnFunctionSuggest": true,
// "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
// "go.docsTool": "gogetdoc",
// "go.formatTool": "goimports",
"go.lintTool": "golangci-lint",
"gopls": {
"formatting.gofumpt": true
},
"rust-analyzer.enableCargoWatchOnStartup": "true", // 打开项目时自动开启 cargo watch
"rust-analyzer.highlightingOn": true, // 覆盖内建语法高亮
"rust-analyzer.lruCapacity": 1000, // 分析器最大缓存深度
// "rust-analyzer.inlayHints.typeHints.enable": false,// 消除变量数据类型提示
// "rust-analyzer.inlayHints.closingBraceHints.enable": false,// 消除右大括号后面的提示
// "rust-analyzer.inlayHints.parameterHints.enable": false, // 消除括号内提示
// "rust-analyzer.inlayHints.chainingHints.enable": false,
"dart.flutterSdkPath": "D:\\Software\\flutter",
// gitlens 插件配置
// "gitlens.codeLens.authors.enabled": false,
// "gitlens.codeLens.recentChange.enabled": false,
// "gitlens.ai.experimental.provider": "openai",
// "gitlens.ai.experimental.openai.model": "gpt-4",
// "gitlens.codeLens.enabled": false,
// "gitlens.menus": {
// "editor": {
// "blame": false,
// "clipboard": true,
// "compare": true,
// "history": false,
// "remote": false
// },
// "editorGroup": {
// "blame": true,
// "compare": true // 查看gitlens文件的历史提交记录
// },
// "editorTab": {
// "clipboard": true,
// "compare": true,
// "history": true,
// "remote": true
// },
// },
"gitlens.views.repositories.showTags": false,
"gitlens.views.repositories.showStashes": true,
"gitlens.views.repositories.showWorktrees": false,
"gitlens.views.repositories.showContributors": false, // 在滚动中固定类名和方法名
"gitlens.views.repositories.showBranchComparison": false,
"gitlens.views.repositories.showUpstreamStatus": false,
"gitlens.keymap": "alternate",
// 标签高亮
"highlight-matching-tag.styles": {
"opening": {
"left": {
"custom": {
"borderWidth": "0 0 0 4px",
"borderStyle": "solid",
"borderColor": "LightSkyBlue",
"borderRadius": "5px"
}
},
"right": {
"custom": {
"borderWidth": "0 4px 0 0",
"borderStyle": "solid",
"borderColor": "LightSkyBlue",
"borderRadius": "5px"
}
}
}
},
"markdown-preview-enhanced.codeBlockTheme": "one-dark.css",
"markdown-preview-enhanced.previewTheme": "one-dark.css",
"markdownlint.config": {
"MD001": false,
"MD004": {
"style": "dash"
},
"MD024": false,
// 内联 HTML
"MD033": false
},
"errorLens.enabledDiagnosticLevels": [
"warning",
"error"
],
"errorLens.excludeBySource": [
"cSpell",
"Grammarly",
"eslint"
],
// "cSpell.allowCompoundWords": true,
"cSpell.words": [
"cssr"
],
// "cSpell.language": "en,en-US",
// Google Translate plugin configuration
"google-translate.firstLanguage": "zh-cn",
"google-translate.secondLanguage": "en",
"googleTranslateExt.replaceText": true,
"commentTranslate.targetLanguage": "zh-CN",
"commentTranslate.source": "Google",
"commentTranslate.googleTranslate.mirror": "https://gtranslate.cdn.haah.net",
// translation
"varTranslation.translationEngine": "google",
// "css.lint.hexColorLength": "ignore",
"windicss.enableCodeFolding": false,
"tailwindCSS.includeLanguages": {
"plaintext": "html",
"vue-html": "html",
"razor": "html"
},
/** 微信小程序配置 */
"minapp-vscode.disableAutoConfig": true,
// "github.copilot.advanced": {
// "authProvider": "github-enterprise"
// },
// "github-enterprise.uri": "https://daima666.top"
"hediet.vscode-drawio.resizeImages": null,
"marscode.codeCompletionPro": {},
"trae.chatLanguage": "cn",
"Lingma.LocalStoragePath": "C:\\Users\\mengxi\\.lingma",
"codeium.enableConfig": {
"*": true,
"html": false
},
"Codegeex.Privacy": true,
"github.copilot.enable": {
"*": false,
"plaintext": false,
"markdown": false,
"scminput": false,
"typescript": false
}
// "Codegeex.Privacy": true
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
代码片段
json
{
/********** markdown 相关 **********/
"markdown code block": {
"scope": "markdown",
"prefix": "code",
"body": ["```${1:js}", "$2", "```"],
"description": "markdown 块级代码"
},
"markdown code inline": {
"scope": "markdown",
"prefix": "code",
"body": ["`$1`"],
"description": "markdown 行内代码"
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
其他
扩展插件开发
下载小技巧
- 打开 Visual Studio Code 官网进行下载
- 打开下载管理,复制下载链接
- 将链接中的域名
az764295.vo.msecnd.net替换为vscode.cdn.azure.cn
sh
# 示例
https://az764295.vo.msecnd.net/stable/74b1f979648cc44d385a2286793c226e611f59e7/VSCode-darwin-universal.zip
# 替换如下
https://vscode.cdn.azure.cn/stable/74b1f979648cc44d385a2286793c226e611f59e7/VSCode-darwin-universal.zip1
2
3
4
2
3
4
