vscode setting

settings

json 复制代码
{
  "editor.linkedEditing": true,
  "editor.rulers": [
    {
      "column": 80,
      "color": "#00FF0010"
    },
    {
      "column": 100,
      "color": "#BDB76B15"
    },
    {
      "column": 120,
      "color": "#FA807219"
    }
  ],
  "editor.unicodeHighlight.includeComments": true,
  "workbench.editor.revealIfOpen": true,
  "files.eol": "\n",
  "[bat]": {
    "files.eol": "\r\n"
  },
  "emmet.variables": {
    "lang": "zh"
  },
  "cSpell.diagnosticLevel": "Hint",
  "trailing-spaces.backgroundColor": "rgba(255,0,0,0.1)",
  "trailing-spaces.includeEmptyLines": false,
  "terminal.integrated.tabs.hideCondition": "never",
  "terminal.integrated.enablePersistentSessions": false,
  "java.compile.nullAnalysis.mode": "automatic",
  "java.configuration.detectJdksAtStart": false,
  "java.configuration.updateBuildConfiguration": "automatic",
  "java.debug.settings.hotCodeReplace": "auto",
  "java.dependency.packagePresentation": "hierarchical",
  "java.maxConcurrentBuilds": 8,
  "java.sources.organizeImports.staticStarThreshold": 1,
  "terminal.integrated.automationProfile.windows": {
    "path": "cmd"
  },
  "java.test.config": {
    "vmArgs": [
      "-Dstdout.encoding=UTF-8",
      "-Dstderr.encoding=UTF-8"
    ]
  },
  "maven.executable.path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\maven\\latest\\bin\\mvn",
  "java.configuration.runtimes": [
    {
      "name": "JavaSE-1.8",
      "path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8",
      "default": true
    },
    {
      "name": "JavaSE-11",
      "path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\11"
    },
    {
      "name": "JavaSE-17",
      "path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\17"
    },
    {
      "name": "JavaSE-21",
      "path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\21"
    },
    {
      "name": "JavaSE-24",
      "path": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\latest"
    }
  ],
  "terminal.integrated.profiles.windows": {
    "JavaSE-1.8 LTS": {
      "overrideName": true,
      "env": {
        "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8\\bin;${env:PATH}",
        "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8"
      },
      "path": "cmd",
      "args": [
        "/k",
        "chcp",
        "65001"
      ]
    },
    "JavaSE-11 LTS": {
      "overrideName": true,
      "env": {
        "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\11\\bin;${env:PATH}",
        "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\11"
      },
      "path": "cmd"
    },
    "JavaSE-17 LTS": {
      "overrideName": true,
      "env": {
        "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\17\\bin;${env:PATH}",
        "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\17"
      },
      "path": "cmd"
    },
    "JavaSE-21 LTS": {
      "overrideName": true,
      "env": {
        "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\21\\bin;${env:PATH}",
        "JAVA_TOOL_OPTIONS": "-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8",
        "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\21"
      },
      "path": "cmd",
      "args": [
        "/k",
        "chcp",
        "65001"
      ]
    },
    "JavaSE-24": {
      "overrideName": true,
      "env": {
        "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\latest\\bin;${env:PATH}",
        "JAVA_TOOL_OPTIONS": "-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8",
        "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\latest"
      },
      "path": "cmd",
      "args": [
        "/k",
        "chcp",
        "65001"
      ]
    }
  },
  "terminal.integrated.defaultProfile.windows": "JavaSE-1.8 LTS",
  "java.import.gradle.home": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\gradle\\latest",
  "terminal.integrated.env.windows": {
    "JAVA_HOME": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8",
    "PATH": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8\\bin;${env:PATH}"
  },
  "maven.terminal.customEnv": [
    {
      "environmentVariable": "JAVA_HOME",
      "value": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8"
    }
  ],
  "java.import.gradle.java.home": "C:\\Users\\Jeremy\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\java\\8",
  "containers.containerClient": "com.microsoft.visualstudio.containers.docker",
  "editor.minimap.enabled": false,
  "workbench.colorCustomizations": {
    "[Default Dark Modern]": {
      "tab.activeBorderTop": "#00FF00",
      "tab.unfocusedActiveBorderTop": "#00FF0088",
      "textCodeBlock.background": "#00000055"
    },
    "editor.wordHighlightStrongBorder": "#FF6347",
    "editor.wordHighlightBorder": "#FFD700",
    "editor.selectionHighlightBorder": "#A9A9A9"
  },
  // 滚轮缩放
  "editor.mouseWheelZoom": true
}

extensions

Extension Pack for Java Auto Config

搞 java 的有福了, jdk,mvn,gradle 自动安装,可手动切换 jdk版本 1.8 ,11,17 ,21

Those who work with Java are in luck. JDK, Maven (mvn), and Gradle will be automatically installed, and you can manually switch between JDK versions 1.8, 11, 17, and 21.

java -version

gradle -v

mvn -v

可以设置终端的默认版本

could set the default version of terminal

java debug , launch.json

指定启动环境

bash 复制代码
            "env":{
                "SPRING_PROFILES_ACTIVE": "dev"
            },

完整版

json 复制代码
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "ServerApplication",
            "request": "launch",
            "mainClass": "com.xx.server.ServerApplication",
            "env":{
                "SPRING_PROFILES_ACTIVE": "dev"
            },
            "projectName": "server"
        }
    ]
}
相关推荐
cpuwolf13 小时前
CMake xcode编译器属性设置技巧
ide·macos·xcode
txwtech16 小时前
vscode修改插件默认安装目录
ide·vscode·编辑器
淮北49419 小时前
linux系统学习(15.启动管理)
运维·服务器·网络·c++·vscode·学习
未来之窗软件服务21 小时前
网页提示UI操作-适应提示,警告,信息——仙盟创梦IDE
javascript·ide·ui·仙盟创梦ide·东方仙盟
ahauedu1 天前
30分钟入门实战速成Cursor IDE(1)
ide·ai编程·cursor
ahauedu1 天前
30分钟入门实战速成Cursor IDE(2)
ide·ai编程·cursor
想文艺一点的程序员1 天前
ESP32S3:开发环境搭建、VSCODE 单步调试、Systemview 分析任务运行情况
ide·vscode·编辑器
johnny2331 天前
Vibe Coding、AI IDE/插件
ide·人工智能
何为xl2 天前
【VSCode】使用VSCode打开md文件以及转化为PDF
ide·vscode·pdf
卿·静2 天前
Node.js终极文本转图指南
前端·javascript·vscode·node.js