artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getter auto generated by lombok is not recognized

NobodyXu opened this issue · comments

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!)

  • OS: gentoo
  • Neovim version: nvim v0.4.4
  • java version: openjdk 11.0.11
  • gradle version: 6.8.3, installed via sdk

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.

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

let JavaComplete_LibsPath = './app/build/classes/java/main/'

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