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
{{ message }}
Repository navigation
bug: Lombok annotation @Accessors can not work #120
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.5
Operating system/version
MacOS 12.7.2
Describe the bug
In java project, when I use lombok annotation @Accessors(chain = true).
It shows Lombok annotation handler class lombok.eclipse.handlers.HandleAccessors failed - See error log, but I can't find the error log.
And In IJ IDEA, the project can works normal.
I don't know if this problem is relevant to nvim-java plugin, If I'm not asking the right question, I will close this issue.
Steps To Reproduce
Open a java project, add @Accessors(chain = true) to a model file like User.java;
It will show the error.
Expected Behavior
I wish this annotation can work normally, like the IJ IDEA.
I'm having the same issue on Linux and on the same Neovim Version. But in addition to the same message at the top of the file for the @Builder annotation in my case, the lsp says that The method builder() is undefined where I try to use .builder().
UPDATE: the @Builder annotation does work, but only when you don't call it with parameters. If you call the annotation with any parameters, like @Builder(setterPrefix = "with") you get the error.
I'm encountering similar issues with annotations such as @NoArgsConstructor, @AllArgsConstructor, @Data, and @Getter when trying to specify annotation parameters.
Interestingly, when using annotations like @Table(name = "some_name"), no errors appear, suggesting that the issue may be specific to Lombok.
Despite these errors, the project compiles and functions correctly, indicating that they might be related to the interaction between jdtls and Lombok. I've attempted manual configuration of jdtls, but the problem remains.
@buptlibo This looks like an issue with the lombok.jar version. I replaced the lombok jar downloaded from the mason registry with 1.18.0 but define the project dependency to 1.18.30.
All the newer properties that does not available in 1.18.0 like @Builder(setterPrefix = "test") are available without any errors. Unfortunately the lombok version at the moment cannot be controlled independently from jdtls in maven.
I have the same issue : the program does work, but I think annotation processing does not work. Neovim does dislay errors that getters and constructors created through lombok does not exist. Is there a way to fix this in the .lua plugin file ? or maybe init.lua ?
Activity
CyberDruga commentedon Feb 6, 2024
I'm having the same issue on Linux and on the same Neovim Version. But in addition to the same message at the top of the file for the
@Builderannotation in my case, the lsp says thatThe method builder() is undefinedwhere I try to use.builder().UPDATE: the
@Builderannotation does work, but only when you don't call it with parameters. If you call the annotation with any parameters, like@Builder(setterPrefix = "with")you get the error.radek-nowak commentedon Feb 8, 2024
I'm encountering similar issues with annotations such as
@NoArgsConstructor,@AllArgsConstructor,@Data, and@Getterwhen trying to specify annotation parameters.Interestingly, when using annotations like
@Table(name = "some_name"), no errors appear, suggesting that the issue may be specific to Lombok.Despite these errors, the project compiles and functions correctly, indicating that they might be related to the interaction between jdtls and Lombok. I've attempted manual configuration of jdtls, but the problem remains.
s1n7ax commentedon Feb 9, 2024
Logs:
s1n7ax commentedon Feb 9, 2024
@buptlibo This looks like an issue with the lombok.jar version. I replaced the lombok jar downloaded from the mason registry with 1.18.0 but define the project dependency to
1.18.30.All the newer properties that does not available in
1.18.0like@Builder(setterPrefix = "test")are available without any errors. Unfortunately the lombok version at the moment cannot be controlled independently fromjdtlsin maven.tokyramarozaka commentedon Feb 23, 2024
I have the same issue : the program does work, but I think annotation processing does not work. Neovim does dislay errors that getters and constructors created through lombok does not exist. Is there a way to fix this in the .lua plugin file ? or maybe init.lua ?
aeropagz commentedon Mar 1, 2024
downloading the nightly lombok release does also work, jdtls made same API changes where lombok breaks.
In nighly version lombok got fixed already.
download here and replace lombok.jar in
$HOME/.local/share/nvim/mason/packages/jdtls/s1n7ax commentedon Mar 1, 2024
Planing to create a separate package for lombok but I don't have time right now. May be next week.