JDT.LS doesn't load Lombok annotation processor — no way to configure javaagent vmargs
Problem
Claude Code's built-in JDT.LS (Java Language Server) does not load the Lombok annotation processor, so all Lombok-generated methods (@Getter, @Setter, @Builder, @Data, etc.) show as errors in LSP diagnostics — e.g. The method getId() is undefined for the type User.
Build and compilation work fine (Maven/Gradle Lombok plugins handle annotation processing at build time). Only LSP diagnostics are affected, producing noisy false positives across any Lombok-annotated class.
Root Cause
JDT.LS requires the Lombok jar to be passed as a Java agent via -javaagent:/path/to/lombok.jar in its VM args. In VS Code this is configured via java.jdt.ls.vmargs in settings.json. Claude Code spawns its own JDT.LS instance and there is currently no way to pass custom VM args to it.
Expected Behavior
Lombok-generated methods should be recognized by the language server when Lombok is a project dependency.
Suggested Fix
Any of:
- Expose a configuration option (e.g. in
.claude/settings.jsonor project-level config) to pass custom VM args to the JDT.LS process - Auto-detect Lombok in the project's Maven/Gradle dependencies and add the
-javaagentflag automatically - Support reading
java.jdt.ls.vmargsfrom.vscode/settings.jsonif present
Environment
- Claude Code CLI
- Java 25, Spring Boot 4.x, Lombok (Maven dependency)
- macOS
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗