Files
notes/resource/配置/VSCode 配置文件.md
T
2026-03-01 01:43:46 +08:00

5.4 KiB

{
  // --- 通用与外观 ---
  "window.zoomLevel": 0.3,
  "window.restoreWindows": "none",
  "extensions.ignoreRecommendations": true,
  "workbench.colorTheme": "One Dark Pro",
  "workbench.iconTheme": "vscode-icons",
  "workbench.startupEditor": "none",
  "workbench.editor.closeOnFileDelete": true,
  "security.workspace.trust.enabled": false,
  "editor.fontFamily": "JetBrainsMono Nerd Font Mono, JetBrains Mono, Consolas, 'Courier New', monospace",
  "editor.fontSize": 16,
  "editor.lineNumbers": "interval",
  "editor.cursorBlinking": "smooth",
  "editor.cursorSmoothCaretAnimation": "on",
  "editor.renderWhitespace": "boundary",
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": "active",
  "editor.stickyScroll.enabled": true,
  "editor.codeLens": true,
  "editor.detectIndentation": true,
  "editor.linkedEditing": true,
  "editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file",
  "files.insertFinalNewline": true,
  "explorer.confirmDragAndDrop": false,
  // --- 搜索 ---
  "search.exclude": {
    "**/*.java": false
  },
  // --- 版本控制 ---
  "git.autofetch": true,
  "git.enableSmartCommit": true,
  "git.confirmSync": false,
  // --- 终端 ---
  "terminal.integrated.windowsEnableConpty": true,
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.cursorBlinking": true,
  "terminal.integrated.cursorStyle": "line",
  "terminal.integrated.cursorStyleInactive": "line",
  "terminal.integrated.enablePersistentSessions": false,
  "terminal.integrated.persistentSessionReviveProcess": "never",
  "terminal.integrated.copyOnSelection": true,
  "terminal.integrated.stickyScroll.enabled": false,
  "terminal.integrated.lineHeight": 1.2,
  // --- Go ---
  "go.toolsGopath": "D:\\MyGo\\go-tools",
  "go.toolsManagement.autoUpdate": true,
  "[go]": {
    "editor.defaultFormatter": "golang.go"
  },
  // --- Python ---
  "[python]": {
    "editor.defaultFormatter": "ms-python.autopep8"
  },
  //  --- Java ---
  "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable -Dfile.encoding=UTF-8",
  "java.jdt.ls.lombokSupport.enabled": true,
  "java.configuration.maven.userSettings": "E:\\Environment\\Mavens\\settings.xml",
  "java.configuration.updateBuildConfiguration": "automatic",
  "java.configuration.runtimes": [
    {
      "name": "JavaSE-1.8",
      "path": "E:\\Environment\\Jdks\\jdk-8u431-windows-x64\\jdk1.8.0_431"
    },
    {
      "name": "JavaSE-11",
      "path": "E:\\Environment\\Jdks\\jdk-11.0.25_windows-x64_bin\\jdk-11.0.25"
    },
    {
      "name": "JavaSE-17",
      "path": "E:\\Environment\\Jdks\\jdk-17.0.13_windows-x64_bin\\jdk-17.0.13"
    },
    {
      "name": "JavaSE-21",
      "path": "E:\\Environment\\Jdks\\jdk-21_windows-x64_bin\\jdk-21.0.6",
      "default": true
    },
    {
      "name": "JavaSE-25",
      "path": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1"
    }
  ],
  "java.maven.downloadSources": true,
  "java.completion.matchCase": "off",
  "java.completion.importOrder": ["", "javax", "java", "#"],
  "java.compile.nullAnalysis.mode": "disabled",
  "java.sources.organizeImports.starThreshold": 999,
  "java.sources.organizeImports.staticStarThreshold": 999,
  "java.referencesCodeLens.enabled": true,
  "java.implementationCodeLens": "all",
  "java.signatureHelp.enabled": true,
  "java.debug.settings.onBuildFailureProceed": false,
  "java.debug.settings.showLogicalStructure": true,
  "[java]": {
    "editor.defaultFormatter": "josevseb.google-java-format-for-vs-code",
    "editor.codeActionsOnSave": {
      "source.removeUnusedImports": "always"
    }
  },
  //  --- Spring Boot ---
  "boot-java.embedded-syntax-highlighting": true,
  "boot-java.highlight-codelens.on": true,
  "boot-java.jpql": true,
  //  --- Maven ---
  "maven.executable.path": "E:\\Environment\\Mavens\\apache-maven-3.9.9-bin\\apache-maven-3.9.9\\bin\\mvn.cmd",
  "maven.executable.options": "-DskipTests",
  "maven.settingsFile": "E:\\Environment\\Mavens\\settings.xml",
  "maven.showInExplorerContextMenu": true,
  "maven.view": "hierarchical",
  "maven.terminal.useJavaHome": true,
  // 解决 Maven SSL 问题,自 3.9.0 起默认 不再使用 Wagon 做 HTTPS
  // -Dmaven.resolver.transport=wagon
  "maven.terminal.customEnv": [
    {
      "environmentVariable": "JAVA_TOOL_OPTIONS",
      "value": "-Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
    },
    {
      "environmentVariable": "MAVEN_OPTS",
      "value": "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
    }
  ],
  // --- Toml ---
  "[toml]": {
    "editor.defaultFormatter": "tamasfe.even-better-toml"
  },
  // --- Xml ---
  "[xml]": {
    "editor.defaultFormatter": "redhat.vscode-xml"
  },
  // --- PowerShell ---
  "[powershell]": {
    "editor.defaultFormatter": "ms-vscode.powershell"
  },
  // --- 质测 ---
  "sonarlint.focusOnNewCode": false,
  "sonarlint.automaticAnalysis": true,
  "sonarlint.ls.javaHome": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1",
  "sonarlint.pathToNodeExecutable": "E:\\Environment\\Nvm\\nodejs\\node.exe",
  // --- 联动 ---
  "liveServer.settings.CustomBrowser": "chrome"
}