Microsoft says there are no more “strange issues” with VS Code and Lombok’s popular Java library • DEVCLASS
Microsoft has taken over the maintenance of the vscode-lombok extension, originally created by Gabriel Basilio, which supports the use of Project Lombok in VS Code. Additionally, the Red Hat Java Language Extension for VS Code now supports Lombok by default, following a merge late last month.
Project Lombok allows developers to write more concise code using annotations. An example is the @Getter/@Setter annotation, which automatically generates a getter, a setter, and a matching field. Unlike IDE tools that generate code, the Lombok annotations are preserved as annotations, so the code stays concise. That @data annotation is another example of combining multiple Lombok annotations into one, allowing multiple fields, getters, and setters to be added to a class in one line of code.
Lombok is a long-established project and understandably popular with Java developers, but it has been problematic for those using VS Code. It’s a challenge for the IDE because Lombok works at compile time while static analysis tools look at the Java code in the editor. Problems included the Java language server crash, repeated out-of-memory errors, and incorrect code highlighting.
Senior Program Manager Nick Zhu has Posted Recent extension improvements mean that “you shouldn’t have any more weird problems with Lombok”. Basilio has moved away from the vcode-lombok extension, he added, and “Microsoft will maintain the extension from now on,” including adding new features as needed.
Other new features in VS Code’s Java support include the ability to drag and drop classes between packages, function breakpoints (break on specific methods without having to manually set multiple breakpoints), and additional “quick fix” code actions to generate code .