-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Lombok and jvm_args #28
Comments
You could try using
|
Thanks for the tips. So apparently -javaagent must always come before the -jar flag, once I did that change in my java-lsp.sh file, it started working properly. So basically: #!/bin/bash
JAR="$HOME/dev/eclipse/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_*.jar"
export GRADLE_HOME=/usr/bin/gradle
java \
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
-Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.protocol=true \
-Dlog.level=ALL \
-Xms1g \
-Xmx2G \
-javaagent:/home/jemag/.config/nvim/dependencies/lombok.jar \
-Xbootclasspath/a:/home/jemag/.config/nvim/dependencies/lombok.jar \
-jar $(echo "$JAR") \
-configuration "$HOME/dev/eclipse/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/config_linux" \
-data "$HOME/dev/eclipse/workspace" \
--add-modules=ALL-SYSTEM \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED
|
Just adding some extra info on top of @jemag's post... |
Thank you very much my friend. You solved my problem 🥇 |
I have been trying to make Lombok work with nvim-jdtls with no success.
Previously, I was using coc-java and would have the following setting in my coc-settings.json:
This allowed me to use Lombok in my java projects.
Right now, I am unsure how to achieve the same behavior. I have attempted to put it through jvm_args in init_options in a couple of different ways (I am not the best with lua):
But none of the commented jvm_args would work. I then tried to modify my java-lsp.sh by adding it there:
This also did not seem to work. Both methods resulted in me still getting Lombok errors in my projects.
I was wondering if you had any ideas how this could be achieved properly with nvim-jdtls?
The text was updated successfully, but these errors were encountered: