artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim
Vim License
973 stars 82 forks source link

getter auto generated by lombok is not recognized #457

Closed NobodyXu closed 3 years ago

NobodyXu commented 3 years ago

Actual behavior

I am using lombok in my project, and the getters auto generated by it isn't recognized by vim-javacomplete2 at all and is treated as errors.

I've tried adding lombok.config to my project:

lombok.addLombokGeneratedAnnotation = true

but it doesn't help at all.

Expected behavior

vim-javacomplete2 shoulld preprocess annotation and let lombok auto generate these getters.

The steps to reproduce actual behavior (Required!)

project.zip

This is the a gradle project I generated on my machine that can reproduce this error.

Simply open app/src/main/java/tmp/A.java and the error is there.

However, gradle run succeeds wthout error.

Environment (Required!)

artur-shaik commented 3 years ago

I guess you have this error on startup because of subprojecting your source files. This should be fixed with last commit.

What about lombok, this is an extra feature that is not implemented yet.

artur-shaik commented 3 years ago

Actually, lombok should work, but you need to specify compiled classes directory to jc2 like this:

let JavaComplete_LibsPath = './app/build/classes/java/main/'
NobodyXu commented 3 years ago

Thx, would have a try if I need to use Java again.