LSP: Universal language server plugin

Hi Arin,

I haven’t seen reports of other people using the java language server yet. It is in use in the Atom IDE project and sounds like a complete implementation.

The installation steps for eclipse.jdt.ls sound a bit Eclipse-focused. Atom’s ide-java package provides some of the details you need (see their code here: https://github.com/atom/ide-java/blob/master/lib/main.js)

Download and uncompress this package

Try launching it manually first (see “command” below, or the ide-java code).
Be sure to set the config parameter to the relevant “config_win/”, “config_mac/” or “config_linux/” path within the language server you unpacked.

The LSP client config (add to your LSP Settings) should then look approximately like this:

"jdtls": {
	"command": ["java", "-jar", "PATH_TO_JDT_SERVER/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar", "-configuration", "PATH_TO_CONFIG_DIR"],
	"scopes": ["source.java"],
	"syntaxes": ["Packages/Java/Java.sublime-syntax"],
	"languageId": "java"
},

I’m keen to get documentation and default config for this added to the LSP project, please feel free to share your findings on GitHub! (https://github.com/tomv564/LSP)

2 Likes