You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Report Issue: lombok.config not loaded in single-folder Maven project
Describe the bug
When opening a Maven multi-module project via VSCode's "Open Folder" (single-folder mode), the lombok.config file at the project root is completely ignored. Lombok annotations work (e.g., @Data, @Getter), but all settings in lombok.config (such as lombok.accessors.chain=true, lombok.tostring.callsuper=CALL) are not applied. The editor shows errors where it shouldn't, e.g., setter methods not returning this for chaining, or toString() not calling super.toString().
The project compiles fine from command line (mvn clean compile passes without errors), which confirms the lombok.config file itself is correct and Maven picks it up properly. The issue is exclusively within the JDT Language Server's handling of lombok.config in VSCode's single-folder mode.
Notably, opening the same project via .code-workspace file (workspace mode) works correctly — lombok.config is loaded and all settings take effect.
To Reproduce
Create or open a Maven multi-module project with a lombok.config file at the project root directory
Open the project via VSCode's "Open Folder" (single-folder mode, NOT workspace mode)
Configure lombok.config with non-default settings, e.g.:
Setters should return this (chain = true) but they return void (default behavior)
toString() should call super.toString() but it doesn't
Run mvn clean compile from terminal — this works correctly, confirming the config file is valid
Expected behavior
lombok.config at the project root should be discovered and applied by JDT LS, even in single-folder mode. All configured settings (chain, callsuper, etc.) should take effect in the editor's language features.
Copying lombok.config to src/main/java/: No effect
Removing config.stopBubbling: No effect
Java: Clean Java Language Server Workspace after each change: No effect
Suspected root cause
Based on Lombok source code analysis (FileSystemSourceCache.forUri() and EclipseAST.getAbsoluteFileLocation()), the issue likely lies in how JDT LS resolves the source file URI in single-folder mode. In workspace mode, the .code-workspace file provides a clear project root context, allowing JDT LS to pass correct absolute file paths to Lombok. In single-folder mode, the Invisible Project mechanism may resolve URIs differently, causing Lombok's lombok.config discovery (which walks up from the source file's parent directory) to never reach the actual project root directory where lombok.config resides.
Related issues
#2887 — lombok.config ignored in 1.14.0 (fixed in Lombok 1.18.28 for Eclipse 4.27 compatibility)
Bug Report Issue: lombok.config not loaded in single-folder Maven project
Describe the bug
When opening a Maven multi-module project via VSCode's "Open Folder" (single-folder mode), the
lombok.configfile at the project root is completely ignored. Lombok annotations work (e.g.,@Data,@Getter), but all settings inlombok.config(such aslombok.accessors.chain=true,lombok.tostring.callsuper=CALL) are not applied. The editor shows errors where it shouldn't, e.g., setter methods not returningthisfor chaining, ortoString()not callingsuper.toString().The project compiles fine from command line (
mvn clean compilepasses without errors), which confirms thelombok.configfile itself is correct and Maven picks it up properly. The issue is exclusively within the JDT Language Server's handling oflombok.configin VSCode's single-folder mode.Notably, opening the same project via
.code-workspacefile (workspace mode) works correctly —lombok.configis loaded and all settings take effect.To Reproduce
lombok.configfile at the project root directorylombok.configwith non-default settings, e.g.:@Dataannotation and verify:this(chain = true) but they returnvoid(default behavior)toString()should callsuper.toString()but it doesn'tmvn clean compilefrom terminal — this works correctly, confirming the config file is validExpected behavior
lombok.configat the project root should be discovered and applied by JDT LS, even in single-folder mode. All configured settings (chain, callsuper, etc.) should take effect in the editor's language features.Environment
Additional Information
What works
.code-workspacefile (workspace mode):lombok.configloads correctlymvn clean compilefrom command line: compiles correctly with all lombok.config settings appliedWhat does NOT work (all attempted and failed)
-javaagentinjection: Settingjava.jdt.ls.vmargsto-javaagent:<path>/lombok-1.18.46.jarin.vscode/settings.json— no effectjava.jdt.ls.lombokSupport.enabled: false+ manual javaagent — no effectlombok.configtosrc/main/java/: No effectconfig.stopBubbling: No effectJava: Clean Java Language Server Workspaceafter each change: No effectSuspected root cause
Based on Lombok source code analysis (
FileSystemSourceCache.forUri()andEclipseAST.getAbsoluteFileLocation()), the issue likely lies in how JDT LS resolves the source file URI in single-folder mode. In workspace mode, the.code-workspacefile provides a clear project root context, allowing JDT LS to pass correct absolute file paths to Lombok. In single-folder mode, the Invisible Project mechanism may resolve URIs differently, causing Lombok'slombok.configdiscovery (which walks up from the source file's parent directory) to never reach the actual project root directory wherelombok.configresides.Related issues
lombok.config ignored in 1.14.0(fixed in Lombok 1.18.28 for Eclipse 4.27 compatibility)lombok.config content