jdtsmith / eglot-booster

Boost eglot using lsp-booster
GNU General Public License v3.0
165 stars 4 forks source link

Is Java jdtls supported? #3

Closed uqix closed 9 months ago

uqix commented 9 months ago

https://github.com/eclipse-jdtls/eclipse.jdt.ls?tab=readme-ov-file#managing-connection-types

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.

Is this relevant?

jdtsmith commented 9 months ago

No idea, but sounds like so; just give it a try.

uqix commented 9 months ago

https://github.com/jdtsmith/eglot-booster/blob/6fa5f04a70ecf40e942f647deaaf70ddd5f6d864/eglot-booster.el#L52

Here's the problem: my java elgot config contains :initializationOptions:


(add-to-list
 'eglot-server-programs
 '(java-ts-mode
   .
   ("jdtls"
    "--jvm-arg=-javaagent:/opt/lombok.jar"
    "--jvm-arg=-Xmx4G"
    "--jvm-arg=-XX:+UseStringDeduplication"
    :initializationOptions (:extendedClientCapabilities (:classFileContentsSupport t)))))

so it's not wrapped.

jdtsmith commented 9 months ago

I don't recall why I outlawed those. Can you try the allow-initialization-options branch and let me know how it works?

uqix commented 9 months ago

I don't recall why I outlawed those. Can you try the allow-initialization-options branch and let me know how it works?

It works now, thanks.

jdtsmith commented 9 months ago

Thanks merged.