推荐插件 .vscode/extensions.json
{
"recommendations": [
"redhat.fabric8-analytics",
"ms-azuretools.vscode-docker",
"vscjava.vscode-java-pack",
"eamodio.gitlens",
"obkoro1.korofileheader",
"redhat.java",
"vscjava.vscode-lombok",
"vscjava.vscode-maven",
"vscjava.vscode-java-dependency",
"vscjava.vscode-java-test",
"gruntfuggly.todo-tree",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"humao.rest-client",
"vscjava.vscode-gradle",
"yzhang.markdown-all-in-one",
"cduruk.thrift",
"jebbs.plantuml"
]
}
一些项目中的参考配置
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable",
"java.debug.settings.onBuildFailureProceed": true,
"java.compile.nullAnalysis.mode": "automatic"
}
全局配置
我当前的配置,仅供参考,看着配,不写注释了
{
"java.jdt.ls.java.home": "/usr/local/jdk-17.0.2",
"spring-boot.ls.java.home": "/usr/local/jdk-17.0.2",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/usr/local/jdk1.8.0_371",
"default": true
},
{
"name": "JavaSE-17",
"path": "/usr/local/jdk-17.0.2"
}
],
"java.configuration.maven.globalSettings": "/usr/local/apache-maven-3.9.3/conf/settings.xml",
"java.configuration.maven.userSettings": "/usr/local/apache-maven-3.9.3/conf/settings.xml",
"maven.executable.path": "/usr/local/apache-maven-3.9.3/bin/mvn",
"editor.fontFamily": "Ubuntu Mono derivative Powerline, Consolas, 'Courier New', monospace",
"editor.fontWeight": "normal",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"markdown-preview-enhanced.previewTheme": "github-dark.css",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.formatOnSave": false,
"editor.formatOnSaveMode": "modificationsIfAvailable"
},
"boot-java.rewrite.reconcile": true,
"maven.excludedFolders": [
"**/.*",
"**/node_modules",
"**/target",
"**/bin",
"**/archetype-resources"
],
"maven.executable.preferMavenWrapper": false,
"redhat.telemetry.enabled": false,
"vscode-spring-boot.rewrite.reconcile-prompt": false,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"git.enableSmartCommit": true,
"fileheader.customMade": {
"Author": "git config user.name && git config user.email",
"Date": "Do not edit",
"LastEditTime": "Do not edit",
"Description": "",
"custom_string_obkoro1": "",
"custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by anarckk, All Rights Reserved. "
},
"fileheader.cursorMode": {
"description": "",
"param": "",
"return": ""
},
"fileheader.configObj": {
"createFileTime": true,
"language": {
"languagetest": {
"head": "/$$",
"middle": " $ @",
"end": " $/",
"functionSymbol": {
"head": "/** ",
"middle": " * @",
"end": " */"
},
"functionParams": "js"
},
"java": {
"head": "/**",
"middle": " * ",
"end": " */",
"functionSymbol": {
"head": "/** ",
"middle": " * @",
"end": " */"
},
"functionParams": "java"
}
},
"autoAdd": false,
"autoAddLine": 100,
"autoAlready": true,
"annotationStr": {
"head": "/*",
"middle": " * @",
"end": " */",
"use": false
},
"headInsertLine": {
"php": 2,
"sh": 2
},
"beforeAnnotation": {
"文件后缀": "该文件后缀的头部注释之前添加某些内容"
},
"afterAnnotation": {
"文件后缀": "该文件后缀的头部注释之后添加某些内容"
},
"specialOptions": {
"特殊字段": "自定义比如LastEditTime/LastEditors"
},
"switch": {
"newlineAddAnnotation": true
},
"supportAutoLanguage": [],
"prohibitAutoAdd": [
"json"
],
"folderBlacklist": [
"node_modules",
"文件夹禁止自动添加头部注释"
],
"prohibitItemAutoAdd": [
"项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
],
"moveCursor": true,
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"atSymbol": [
"@",
"@"
],
"atSymbolObj": {
"文件后缀": [
"头部注释@符号",
"函数注释@符号"
]
},
"colon": [
": ",
": "
],
"colonObj": {
"文件后缀": [
"头部注释冒号",
"函数注释冒号"
]
},
"filePathColon": "路径分隔符替换",
"showErrorMessage": false,
"writeLog": false,
"wideSame": false,
"wideNum": 13,
"functionWideNum": 0,
"CheckFileChange": false,
"createHeader": false,
"useWorker": false,
"designAddHead": false,
"headDesignName": "random",
"headDesign": false,
"cursorModeInternalAll": {},
"openFunctionParamsCheck": true,
"functionParamsShape": "no type",
"functionBlankSpaceAll": {},
"functionTypeSymbol": "*",
"typeParamOrder": "type param",
"customHasHeadEnd": {},
"throttleTime": 60000,
"functionParamAddStr": "",
"NoMatchParams": "no show param"
},
"files.autoSave": "onFocusChange",
"editor.fontLigatures": false,
"editor.quickSuggestionsDelay": 0,
"java.format.comments.enabled": false,
"java.maven.downloadSources": true,
"window.title": "${rootName}${separator}${profileName}${separator}${appName}",
"debug.autoExpandLazyVariables": true,
"git.confirmSync": false,
"github.copilot.advanced": {
"debug.overrideEngine": "codegen",
"debug.testOverrideProxyUrl": "http://clash:7890",
"debug.overrideProxyUrl": "http://clash:7890"
},
"explorer.autoReveal": true,
"beancountFormatter.fixedCJKWidth": true,
"beancountFormatter.numWidth": 12,
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM, IndentWidth: 4, BreakBeforeBraces: Attach, ColumnLimit: 120}",
"spring.initializr.serviceUrl": "http://initializr.bee.anarckk.me/"
}