{ /* ================================================================= VS Code 配置文件分类说明 ================================================================= ### 主要分类: 1. 编辑器基础设置 控制字体、光标、格式化、滚动、代码提示、自动换行等编辑器行为 2. 工作台和窗口设置 自定义主题、图标、窗口布局、侧边栏、活动栏、菜单等界面元素 3. 文件和编码设置 设置文件自动保存、默认编码、换行符、文件关联、排除不需要的文件等 4. 终端配置 配置集成终端的默认Shell、字体、颜色和多个PowerShell版本的路径 5. Code Runner 配置 为不同编程语言(如C, C++, Python)自定义编译和运行命令 6. C/C++ 开发配置 设置C/C++编译器路径、智能感知模式、代码格式化和调试选项 7. Python 开发配置 指定Python解释器路径、Linter工具、代码格式化和调试配置 8. Java 开发配置 配置JDK路径、Maven/Gradle设置、代码补全和调试环境 9. Rust 开发配置 配置rust-analyzer语言服务器、代码检查、格式化选项和LLDB调试器 10. MATLAB 配置 关联MATLAB安装路径,并配置MATLAB语言服务器和编辑器集成 11. 嵌入式开发配置 配置EIDE(Embedded IDE)和Keil C51/MDK的工具链路径和项目设置 12. LaTeX 配置 设置LaTeX编译工具链(如pdfLaTeX, XeLaTeX)、编译配方和反向同步 13. LeetCode 配置 配置LeetCode插件的节点路径、登录凭据和代码提交端点 14. 洛谷配置 配置洛谷插件的用户身份标识(CID)和题目提交设置 15. Git 配置 设置Git可执行文件路径、启用/禁用Git功能以及其他版本控制相关选项 16. 调试配置 配置调试器的行为,如断点命中时的行为、错误显示方式等 17. 资源管理器配置 控制资源管理器中文件和文件夹操作(如删除)的确认提示 18. 搜索配置 自定义搜索功能,如默认排除某些文件和文件夹 19. 更新配置 设置VS Code和扩展的自动更新检查和下载行为 20. 安全配置 管理工作区信任、遥测数据收集和安全相关的设置 21. AI 助手配置 配置各种AI编程助手(如GitHub Copilot、Trae等)的行为和集成 22. 扩展插件配置 管理和配置各种第三方扩展插件的特定选项 23. 特效配置 启用或禁用编辑器中的特效,如"彩虹屁"和打字特效,视觉效果和背景图片等 24. CMake 配置 配置CMake工具链、预设文件和调试选项 ================================================================= */ // ================================ 编辑器基础设置 ================================ "editor.acceptSuggestionOnEnter": "smart", "editor.bracketPairColorization.enabled": true, "editor.cursorBlinking": "smooth", "editor.cursorSmoothCaretAnimation": "on", "editor.fontFamily": "JetBrains Mono,STKaiti,Consolas, 'Courier New', monospace", "editor.fontSize": 17, "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.formatOnType": true, "editor.guides.bracketPairs": true, "editor.largeFileOptimizations": false, "editor.mouseWheelZoom": true, "editor.smoothScrolling": true, "editor.suggest.snippetsPreventQuickSuggestions": false, "editor.suggestSelection": "first", "editor.unicodeHighlight.nonBasicASCII": false, "editor.wordWrap": "on", // ================================ 工作台和窗口设置 ================================ "window.confirmSaveUntitledWorkspace": false, "window.dialogStyle": "custom", "workbench.colorTheme": "One Dark Pro Night Flat", "workbench.editor.centeredLayoutFixedWidth": true, "workbench.colorCustomizations": { "tree.indentGuidesStroke": "#bf751bdc" }, "workbench.editorAssociations": { "*.copilotmd": "vscode.markdown.preview.editor", "{hexdiff}:/**/*.*": "hexEditor.hexedit", "*.xmind": "cweijan.xmindViewer" }, "workbench.iconTheme": "vscode-jetbrains-icon-theme-2023-dark", "workbench.list.smoothScrolling": true, "workbench.tree.indent": 12, "workbench.tree.renderIndentGuides": "always", // ================================ 文件和编码设置 ================================ // 配合GBK扩展自动识别 "files.associations": { "*.gbk": "cpp", "*.json": "c" }, "files.autoGuessEncoding": true, "files.autoSave": "afterDelay", // 辅助兼容 GBK 等历史编码文件 "files.candidateGuessEncodings": [ "utf8", "gb2312" ], // ================================ 终端配置 ================================ "terminal.external.windowsExec": "D:\\PowerShell\\PowerShell\\PowerShell.exe", "terminal.integrated.automationProfile.windows": { "path": "D:\\PowerShell\\PowerShell\\PowerShell.exe" }, "terminal.integrated.commandsToSkipShell": [ "matlab.interrupt" ], "terminal.integrated.defaultProfile.windows": "PowerShell 7.6.1", "terminal.integrated.enableMultiLinePasteWarning": "never", "terminal.integrated.fontSize": 17, "terminal.integrated.mouseWheelZoom": true, "terminal.integrated.persistentSessionReviveProcess": "never", "terminal.integrated.profiles.windows": { "PowerShell 5.1": { "path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "icon": "terminal-powershell", "args": [ "-NoExit" ], "env": { "LANG": "zh_CN.UTF-8" } }, "PowerShell 7.6.1": { "path": "D:\\PowerShell\\PowerShell\\PowerShell.exe", "icon": "terminal-powershell", "args": [ "-NoExit" ], "env": { "LANG": "zh_CN.UTF-8" } }, "Anaconda PowerShell": { "path": "D:\\PowerShell\\PowerShell\\PowerShell.exe", "icon": "terminal-powershell", // 显式添加conda初始化命令,确保conda可用 "args": [ "-ExecutionPolicy", "ByPass", "-NoExit", "-Command", "& 'D:\\ProgramData\\anaconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate 'D:\\ProgramData\\anaconda3'" ], "env": { "LANG": "zh_CN.UTF-8" } }, "Command Prompt": { "path": [ "${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe" ], "args": [ "-NoExit" ], "icon": "terminal-cmd" }, "Git Bash": { "path": "D:\\settings\\Git\\bin\\bash.exe" } }, "terminal.integrated.smoothScrolling": true, "terminal.integrated.initialHint": false, // ================================ Code Runner 配置 ================================ "code-runner.executorMap": { "javascript": "node", "php": "C:\\php\\php.exe", "python": "D:\\settings\\Language\\Python\\python.exe", "perl": "perl", "ruby": "C:\\Ruby23-x64\\bin\\ruby.exe", "go": "go run", "html": "\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"", "java": "cd $dir && javac $fileName && java $fileNameWithoutExt", "c": "chcp 65001 && cd $dir && gcc -std=c17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "matlab": "& \"D:\\settings\\Language\\MATLAB\\R2024a\\bin\\matlab.exe\" -nosplash -nodesktop -r \"run('${file}'); exit;\"" }, "code-runner.languageIdToFileExtensionMap": { "bat": ".bat", "powershell": ".ps1", "typescript": ".ts" }, "code-runner.runInTerminal": true, "code-runner.saveAllFilesBeforeRun": true, "code-runner.saveFileBeforeRun": true, // ================================ C/C++ 开发配置 ================================ "c-cpp-compile-run.c-compiler": "D:\\settings\\Language\\C\\mingw64\\bin\\gcc.exe", "c-cpp-compile-run.cpp-compiler": "D:\\settings\\Language\\C\\mingw64\\bin\\g++.exe", "c-cpp-compile-run.run-in-external-terminal": true, "C_Cpp.autoAddFileAssociations": false, "C_Cpp.autocompleteAddParentheses": true, "C_Cpp.default.includePath": [ "${workspaceFolder}/**" ], "C_Cpp.inlayHints.autoDeclarationTypes.enabled": true, "C_Cpp.inlayHints.autoDeclarationTypes.showOnLeft": true, "C_Cpp.inlayHints.referenceOperator.enabled": true, "C_Cpp.inlayHints.referenceOperator.showSpace": true, "C_Cpp.intelliSenseCacheSize": 1024, "C_Cpp.intelliSenseEngine": "Tag Parser", "C_Cpp_Runner.cppStandard": "c++17", "C_Cpp_Runner.cStandard": "c17", "C_Cpp_Runner.msvcBatchPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat", "clangd.detectExtensionConflicts": false, // ================================ Python 开发配置 ================================ "python.defaultInterpreterPath": "D:\\settings\\Language\\Python\\python.exe", "python.venvPath": "D:\\ProgramData\\anaconda3\\envs", "python.analysis.autoImportCompletions": true, "python.analysis.completeFunctionParens": true, // ================================ Java 开发配置 ================================ "java.home": "D:\\settings\\Language\\Java\\jdk-25.0.1", "java.import.gradle.java.home": "D:\\settings\\Language\\Java\\jdk-25.0.1", "java.jdt.ls.java.home": "D:\\settings\\Language\\Java\\jdk-25.0.1", "maven.excludedFolders": [ "**/.*", "**/node_modules", "**/target", "**/bin", "**/archetype-resources", "**/build", "**/.git", "**/.vscode" ], "maven.executable.path": "D:\\settings\\settings\\apache-maven-3.9.6\\bin\\mvn.cmd", "maven.terminal.useJavaHome": true, // ================================ Rust配置 ================================ // rust-analyzer 基础配置 "rust-analyzer.server.path": null, "rust-analyzer.checkOnSave.command": "clippy", "rust-analyzer.lens.enable": true, "rust-analyzer.inlayHints.enable": true, // 代码格式化 "[rust]": { "editor.defaultFormatter": "rust-lang.rust-analyzer", "editor.formatOnSave": true }, // 调试配置 "lldb.executable": "lldb", // 其他优化 "editor.suggest.snippetsPreventQuickSuggestions": false, "editor.quickSuggestions": { "strings": true } // ================================ MATLAB 开发配置 ================================ "MATLAB.installPath": "D:\\settings\\Language\\MATLAB\\R2024a", "MATLAB.defaultEditor": "vscode", // ================================ 嵌入式开发配置 (EIDE/Keil) ================================ "EIDE.ARM.ARMCC5.InstallDirectory": "D:\\Keil5\\ARM\\ARMCC", "EIDE.ARM.ARMCC6.InstallDirectory": "D:\\Keil5\\ARM\\ARMCLANG", "EIDE.ARM.GCC.InstallDirectory": "D:\\settings\\14.2 rel1", "EIDE.ARM.INI.Path": "D:\\Keil5\\UV4\\UV4.exe", "EIDE.C51.INI.Path": "D:\\Keil5\\UV4\\UV4.exe", "EIDE.DisplayLanguage": "zh-cn", "KeilAssistant.MDK.Uv4Path": "D:\\Keil5\\UV4\\UV4.exe", // ================================ LaTeX 配置 ================================ // 从使用的包中自动补全命令和环境 "latex-workshop.intellisense.package.enabled": true, // 设置是否自动编译 "latex-workshop.latex.autoBuild.run": "never", // 设置为onFaild 在构建失败后清除辅助文件 "latex-workshop.latex.autoClean.run": "onFailed", // 文件清理。此属性必须是字符串数组 "latex-workshop.latex.clean.fileTypes": [ "*.aux", "*.bbl", "*.blg", "*.idx", "*.ind", "*.lof", "*.lot", "*.out", "*.toc", "*.acn", "*.acr", "*.alg", "*.glg", "*.glo", "*.gls", "*.ist", "*.fls", "*.log", "*.fdb_latexmk" ], // 用于配置编译链 "latex-workshop.latex.recipes": [ { "name": "XeLaTeX", "tools": [ "xelatex" ] }, { "name": "PDFLaTeX", "tools": [ "pdflatex" ] }, { "name": "BibTeX", "tools": [ "bibtex" ] }, { "name": "LaTeXmk", "tools": [ "latexmk" ] }, { "name": "xelatex -> bibtex -> xelatex*2", "tools": [ "xelatex", "bibtex", "xelatex", "xelatex" ] }, { "name": "pdflatex -> bibtex -> pdflatex*2", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] } ], // 使用上次的recipe编译组合 "latex-workshop.latex.recipe.default": "lastUsed", // 编译工具和命令 "latex-workshop.latex.tools": [ { "name": "xelatex", "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOCFILE%" ] }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOCFILE%" ] }, { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "-outdir=%OUTDIR%", "%DOCFILE%" ] }, { "name": "bibtex", "command": "bibtex", "args": [ "%DOCFILE%" ] } ], // 编译出错时设置是否弹出气泡设置 "latex-workshop.message.error.show": false, "latex-workshop.message.warning.show": false, // 右键菜单 "latex-workshop.showContextMenu": true, // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击 "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", // ================================ LeetCode 配置 ================================ "leetcode.defaultLanguage": "c", "leetcode.endpoint": "leetcode-cn", "leetcode.hint.commentDescription": false, "leetcode.hint.commandShortcut": false, "leetcode.hint.configWebviewMarkdown": false, "leetcode.workspaceFolder": "D:\\Code\\doing_exercises", // ================================ 洛谷配置 ================================ "[luogu]": { "files.encoding": "utf8", "files.autoGuessEncoding": true }, "luogu.alwaysUseDefaultLanguageVersion": true, "luogu.defaultLanguageVersion": { "C": "C", "Python": "Python 3" }, // ================================ Git 配置 ================================ "git.autofetch": true, "git.confirmSync": false, "git.enableSmartCommit": true, "git.openRepositoryInParentFolders": "never", "gitlens.ai.model": "vscode", "gitlens.ai.vscode.model": "copilot:gpt-4.1", "projectManager.git.baseFolders": [ "D:\\Code" ], "remoteHub.commitDirectlyWarning": "off", // ================================ 调试配置 ================================ "debug.onTaskErrors": "debugAnyway", "debug.showBreakpointsInOverviewRuler": true, "lldb.suppressUpdateNotifications": true, // ================================ 资源管理器配置 ================================ "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, "explorer.confirmPasteNative": false, // ================================ 搜索配置 ================================ "search.followSymlinks": false, // ================================ 更新配置 ================================ "update.enableWindowsBackgroundUpdates": false, "update.mode": "none", "update.showReleaseNotes": false, // ================================ 安全配置 ================================ "security.allowedUNCHosts": [ "192.168.5.8" ], "security.workspace.trust.untrustedFiles": "open", "telemetry.telemetryLevel": "off", // ================================ AI 助手配置 ================================ "AI.toolcall.confirmMode": "autoRun", "AI.toolcall.v2.ide.mcp.autoRun": "alwaysRun", "chat.commandCenter.enabled": false, "codingcopilot.enableCodelens": false, "codingcopilot.enableCompletionLanguage": { "scminput": false, "c": true, "python": true }, "codingcopilot.modelDocumentLanguage": "中文", "codingcopilot.planModeFirst": true, "github.copilot.nextEditSuggestions.enabled": true, "trae.chatLanguage": "cn", "chat.viewSessions.orientation": "stacked", "vsintellicode.modify.editor.suggestSelection": "choseToUpdateConfiguration", // ================================ 扩展插件配置 ================================ "better-comments.highlightPlainText": true, "codesnap.backgroundColor": "#2d2d2d", "codesnap.showWindowTitle": true, "errorLens.codeLensEnabled": true, "hediet.vscode-drawio.appearance": "automatic", "hediet.vscode-drawio.resizeImages": null, "makefile.configureOnOpen": true, "markdown.extension.preview.autoShowPreviewToSide": true, "prettier.useTabs": true, "remote.SSH.remotePlatform": { "192.168.186.131": "linux", "192.168.5.8": "linux" }, "vscode-edge-devtools.webhintInstallNotification": true, "vsicons.dontShowNewVersionMessage": true, "z-reader.fileDir": "E:\\小说目录", "z-reader.onlineSite": "笔趣阁", "novelReading.defaultTheme": "dark", // ================================ 特效配置 ================================ "backgroundCover.autoStatus": false, "backgroundCover.blur": 0, "backgroundCover.imagePath": "d:\\settings\\鬼刀\\跪坐在神像旁.jpg", "backgroundCover.opacity": 0.4, "backgroundCover.randomImageFolder": "d:\\settings\\鬼刀", "backgroundCover.sizeModel": "cover", "powermode.combo.counterSize": 1, "powermode.enabled": true, "powermode.shake.enabled": false, "lsby_gitee_vscode_plugin.personal_access_tokens": "***", "gitlens.rebaseEditor.ordering": "asc", "workbench.startupEditor": "none", // ================================ CMake 配置 =============================== "cmake.allowCommentsInPresetsFile": true, "cmake.showConfigureWithDebuggerNotification": false, // ================================ 新增配置 ================================ }