Git Product home page Git Product logo

Comments (6)

GustavoPrietoP avatar GustavoPrietoP commented on June 27, 2024 1

@ChristianChiarulli @jemag @GustavoPrietoP @alanjjenkins I've merged support for Java + Lombok (with great help from @alanjjenkins). Could you try and tell me if this works for you?

hey, i just tested it out and it seems like it works :)

from nvim-lspinstall.

kabouzeid avatar kabouzeid commented on June 27, 2024

I'll look into it. What is the preferred language server for Java these days?

from nvim-lspinstall.

ChristianChiarulli avatar ChristianChiarulli commented on June 27, 2024

@kabouzeid This should be all you need to get started. Ping me if you want to discuss anything there, I've setup the langserver with Lombok a few times already.

In the wiki there is a in depth config.

from nvim-lspinstall.

jemag avatar jemag commented on June 27, 2024

I think Christian forgot to paste a link.
Either way, https://github.com/mfussenegger/nvim-jdtls has a good guide on setting up the java language-server (you can check both the README and wiki). For lombok, the launch script can be modified like so by adding -javaagent -Xbootclasspath/a for your lombok jar path, e.g.:

 #!/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 "$1" \
  --add-modules=ALL-SYSTEM \
  --add-opens java.base/java.util=ALL-UNNAMED \
  --add-opens java.base/java.lang=ALL-UNNAMED

from nvim-lspinstall.

kabouzeid avatar kabouzeid commented on June 27, 2024

I don't think any of this will work in a way that fits with this plugin (install servers with one command).

I can't assume the location of gradle, jdk and workspace. Since you have to manually configure this server anyways, I don't think :LspInstall java would buy you much.

from nvim-lspinstall.

kabouzeid avatar kabouzeid commented on June 27, 2024

@ChristianChiarulli @jemag @GustavoPrietoP @alanjjenkins I've merged support for Java + Lombok (with great help from @alanjjenkins). Could you try and tell me if this works for you?

from nvim-lspinstall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.