Download Lombok support in the Cursor IDE extensions
Add the LomBok annotations in the Cursor IDE settings.json
1. Find your Lombok JAR path
If you installed Lombok via the extension, it’s usually somewhere like:
Or you can download the lombok.jar yourself manually and place it somewhere.
2. Configure Cursor settings for Java to load Lombok
In Cursor, open your settings.json (Ctrl/Cmd + Shift + P → "Preferences: Open Settings (JSON)") and add this line under Java settings:
Example:
Make sure:
-
The path is correct and points to your
lombok.jar. -
No extra spaces inside the path.
-
If your path has spaces, wrap it in quotes inside the argument, like:
-javaagent=\"/path/with space/lombok.jar\"
3. Reload the Java Language Server
After editing settings.json, do:
-
Ctrl+Shift+P →
Java: Clean Workspace -
Ctrl+Shift+P →
Developer: Reload Window -
Cursor should restart jdtls and pick up the Lombok agent correctly.
Summary:
Installing the Lombok extension alone isn't enough — you must manually tell the Java server to preload Lombok at JVM startup via
-javaagent.
No comments:
Post a Comment