Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Lombok in vim with "Ale" ? ENV:oracle jdk8, maven #2242

Closed
GavinGuan24 opened this issue Jan 24, 2019 · 7 comments
Closed

How to use Lombok in vim with "Ale" ? ENV:oracle jdk8, maven #2242

GavinGuan24 opened this issue Jan 24, 2019 · 7 comments

Comments

@GavinGuan24
Copy link

No description provided.

@GavinGuan24
Copy link
Author

someone know it ?

@w0rp
Copy link
Member

w0rp commented Jan 25, 2019

Please add a description for your issue. It's not obvious what you are asking here. Then maybe someone who knows Java can help you. This is the first time I've ever heard of Lombok.

@w0rp w0rp added the triage label Jan 25, 2019
@GavinGuan24
Copy link
Author

ok. Let me explain briefly "Lombok". This is URL (https://projectlombok.org/).
Official description: Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, Automate your logging variables, and much more.

After I install oracle jdk8 on alpine linux, I found that ale is in effect on my vim. But, The function of the lombok annotation is marked as error by ale.

Actually, the Compile can pass, and "my_project.jar" can run.

@GavinGuan24
Copy link
Author

GavinGuan24 commented Jan 27, 2019

And I try to that.

let g:ale_java_javac_options = "-cp lombok.jar"

Or

#shell, Fake code.
g_javac="javac -cp lombok " $*
# vimL
let g:ale_java_javac_executable = "g_javac"

But, All Failed.

@GavinGuan24
Copy link
Author

Maybe "Lombok" is too new. Not many people are using this.

@Me1onRind
Copy link

let g:ale_java_javac_options = "-cp lombok.jar"

I think you can use absolute path, such as

let g:ale_java_javac_options = "-cp /home/xxx/.m2/xx/xxx/lombok.jar"

@andys8
Copy link
Contributor

andys8 commented Apr 2, 2019

Changing the java options broke the integration with maven. It looks like the classpath will be overwritten. Replacing the executable path instead seems to work for me:

let g:ale_java_javac_executable = "javac -cp ~/.m2/repository/org/projectlombok/lombok/1.18.6/lombok-1.18.6.jar"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants