309 lines
11 KiB
Markdown
309 lines
11 KiB
Markdown
# 总
|
|
|
|
```json
|
|
{
|
|
// --- 通用与外观 ---
|
|
"window.zoomLevel": 0.5,
|
|
"window.restoreWindows": "none",
|
|
"extensions.ignoreRecommendations": true,
|
|
"workbench.iconTheme": "vscode-icons",
|
|
"workbench.startupEditor": "none",
|
|
"workbench.editor.closeOnFileDelete": true,
|
|
"workbench.colorTheme": "Light 2026",
|
|
"security.workspace.trust.enabled": false,
|
|
"editor.fontFamily": "'JetBrainsMono Nerd Font 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.accessibilitySupport": "off",
|
|
"editor.stickyScroll.enabled": true,
|
|
"editor.codeLens": true,
|
|
"editor.detectIndentation": true,
|
|
"editor.linkedEditing": true,
|
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
"editor.formatOnSave": false,
|
|
"editor.formatOnSaveMode": "file",
|
|
"editor.aiStats.enabled": false,
|
|
"files.insertFinalNewline": true,
|
|
"explorer.confirmDragAndDrop": false,
|
|
// --- 搜索 ---
|
|
"search.exclude": {
|
|
"**/*.java": false,
|
|
},
|
|
// --- 版本控制 ---
|
|
"git.autofetch": true,
|
|
"git.enableSmartCommit": true,
|
|
"git.confirmSync": false,
|
|
// --- 终端 ---
|
|
"terminal.integrated.defaultProfile.windows": "PowerShell",
|
|
"terminal.integrated.cursorBlinking": true,
|
|
"terminal.integrated.cursorStyle": "line",
|
|
"terminal.integrated.cursorStyleInactive": "none",
|
|
"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",
|
|
},
|
|
// --- Toml ---
|
|
"evenBetterToml.schema.enabled": false,
|
|
"[toml]": {
|
|
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
|
},
|
|
// --- Xml ---
|
|
"[xml]": {
|
|
"editor.defaultFormatter": "redhat.vscode-xml",
|
|
},
|
|
// --- PowerShell ---
|
|
"[powershell]": {
|
|
"editor.defaultFormatter": "ms-vscode.powershell",
|
|
},
|
|
// --- Lua ---
|
|
"[lua]": {
|
|
"editor.defaultFormatter": "sumneko.lua",
|
|
},
|
|
// --- Rust ---
|
|
"[rust]": {
|
|
"editor.defaultFormatter": "rust-lang.rust-analyzer",
|
|
},
|
|
// --- Java ---
|
|
"java.jdt.ls.java.home": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1", // 显式指定 JDT.LS 运行的 JDK
|
|
"java.jdt.ls.vmargs": "-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Dsun.zip.disableMemoryMapping=true -Xmx8G -Xms2G -Xlog:disable -Dfile.encoding=UTF-8",
|
|
"java.jdt.ls.lombokSupport.enabled": true,
|
|
"java.sharedIndexes.enabled": "on",
|
|
"java.autobuild.enabled": true,
|
|
"java.references.includeDecompiledSources": true,
|
|
"java.trace.server": "off",
|
|
"java.inlayHints.parameterNames.enabled": "literals",
|
|
"java.inlayHints.variableTypes.enabled": true,
|
|
"java.signatureHelp.description.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",
|
|
},
|
|
{
|
|
"name": "JavaSE-25",
|
|
"path": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1",
|
|
"default": true,
|
|
},
|
|
],
|
|
"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 -T 1C",
|
|
"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",
|
|
},
|
|
{
|
|
"environmentVariable": "MAVEN_OPTS",
|
|
"value": "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true",
|
|
},
|
|
],
|
|
// --- 质测 ---
|
|
"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",
|
|
// --- AI ---
|
|
"claudeCode.preferredLocation": "sidebar",
|
|
"chat.viewSessions.orientation": "stacked",
|
|
// --- GitLens ---
|
|
"gitlens.ai.model": "vscode",
|
|
"gitlens.ai.vscode.model": "copilot:gpt-4.1",
|
|
"gitlens.ai.generateCommitMessage.customInstructions": "请用中文生成简洁明确的提交信息",
|
|
"gitlens.currentLine.enabled": false,
|
|
"gitlens.hovers.currentLine.over": "line",
|
|
"gitlens.hovers.avatars": false,
|
|
"gitlens.hovers.currentLine.enabled": false,
|
|
"gitlens.graph.avatars": false,
|
|
"gitlens.views.commitDetails.files.layout": "tree",
|
|
// --- 其他 ---
|
|
"json.schemaDownload.trustedDomains": {
|
|
"https://developer.microsoft.com/json-schemas/": true,
|
|
"https://json-schema.org/": true,
|
|
"https://json.schemastore.org/": true,
|
|
"https://raw.githubusercontent.com/devcontainers/spec/": true,
|
|
"https://raw.githubusercontent.com/microsoft/vscode/": true,
|
|
"https://schema.tauri.app": true,
|
|
"https://schemastore.azurewebsites.net/": true,
|
|
"https://www.schemastore.org/": true,
|
|
},
|
|
}
|
|
```
|
|
|
|
# Java
|
|
|
|
```json
|
|
// --- Java ---
|
|
"java.jdt.ls.java.home": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1", // 显式指定 JDT.LS 运行的 JDK
|
|
"java.jdt.ls.vmargs": "-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Dsun.zip.disableMemoryMapping=true -Xmx8G -Xms2G -Xlog:disable -Dfile.encoding=UTF-8",
|
|
"java.jdt.ls.lombokSupport.enabled": true,
|
|
"java.sharedIndexes.enabled": "on",
|
|
"java.autobuild.enabled": true,
|
|
"java.references.includeDecompiledSources": true,
|
|
"java.trace.server": "off",
|
|
"java.inlayHints.parameterNames.enabled": "literals",
|
|
"java.inlayHints.variableTypes.enabled": true,
|
|
"java.signatureHelp.description.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",
|
|
},
|
|
{
|
|
"name": "JavaSE-25",
|
|
"path": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1",
|
|
"default": true,
|
|
},
|
|
],
|
|
"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 -T 1C",
|
|
"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",
|
|
},
|
|
{
|
|
"environmentVariable": "MAVEN_OPTS",
|
|
"value": "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true",
|
|
},
|
|
],
|
|
```
|
|
|
|
# ibs-portal.code-workspace
|
|
|
|
```json
|
|
{
|
|
"folders": [
|
|
{
|
|
"path": "../Work/yd-hy/ibs-portal",
|
|
},
|
|
],
|
|
"settings": {
|
|
"maven.terminal.customEnv": [
|
|
{
|
|
"environmentVariable": "JAVA_TOOL_OPTIONS",
|
|
"value": "-Dfile.encoding=UTF-8",
|
|
},
|
|
{
|
|
"environmentVariable": "MAVEN_OPTS",
|
|
"value": "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true",
|
|
},
|
|
{
|
|
"environmentVariable": "JAVA_HOME",
|
|
"value": "E:\\Environment\\Jdks\\jdk-8u431-windows-x64\\jdk1.8.0_431",
|
|
},
|
|
],
|
|
},
|
|
}
|
|
|
|
```
|
|
|
|
Java 开发插件
|
|
|
|
```
|
|
Google Java Format for VS Code
|
|
Spring Boot Extension Pack
|
|
Extension Pack for Java
|
|
```
|