Giter VIP home page Giter VIP logo

Comments (3)

natebosch avatar natebosch commented on May 15, 2024

In https://github.com/eclipse/eclipse.jdt.ls#managing-connection-types it says "To use standard streams(stdin, stdout) of the server process do not set any of the above environment variables and the server will fall back to standard streams." - This is what you'll want for vim-lsc

What OS are you on? My suggestion would be to write a shell script or batch file to wrap up the (apparently extremely lengthy) arguments you need to start the server described here: https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line

I'm afraid I can't help much with getting it running communicating of stdin/stdout beyond pointing to their documentation. You could file an issue there if you get stuck.

Once you have a command you can run which you believe is communicating over stdin/stdout you can try it by redirecting this file to stdin and seeing that it gives you some json output. (It will likely give an error since the root URI path is bogus - that's OK)

the_command_you_want_to_try < test/initialization_input

from vim-lsc.

cmpadden avatar cmpadden commented on May 15, 2024

@aiezue

I was able to get the Java language server that you referenced working. As Nate suggested, I created a wrapper script that I included on my PATH.

I downloaded the latest version of the server, and extracted the files. Be sure to update the jar and configuration properties in the wrapper script with the location that you extracted the server.

Wrapper script:

#!/bin/sh

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 \
     -noverify \
     -Xmx1G \
     -jar <UPDATE>/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar \
     -configuration <UPDATE>/config_linux \
     --add-modules=ALL-SYSTEM \
     --add-opens java.base/java.util=ALL-UNNAMED \
     --add-opens java.base/java.lang=ALL-UNNAMED

Reference in vimrc:

let g:lsc_server_commands = {'java': 'jdt_language_server'}

I'm using OpenJDK version 9, so your mileage may vary; Hope this helps!

from vim-lsc.

 avatar commented on May 15, 2024

@cmpadden @natebosch Thanks a lot, I have already got it working now. I guess my problem is with the starting script.

from vim-lsc.

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.