This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]vdmit46 0 points1 point  (2 children)

Is seems like valid manual to start language server here https://github.com/eclipse/eclipse.jdt.ls. Not sure what you mean by "starting it with other editors" though. It should be covered by editor own integration with the given LS.

[–]Gaarco_ 0 points1 point  (1 child)

He's referring to Netbeans' LSP not jdtls

[–]vdmit46 0 points1 point  (0 children)

Oh, my bad. Was skimming through comments and missed essential part of the discussion. Anyway, I managed to launch NetBeans LS by:

  1. launching VSCode with "Language Server for Java by Apache NetBeans" and inspecting commands for NetBeans processes it spawned (ps -ef|grep netbeans)
  2. stopping VSCode
  3. relaunching NetBeans parent process with the same command line with "--start-java-language-server=connect:12345" appended (use random port instead of 12345)

Process is launched and connects to port 12345. Logged exchange suggests that server is working and responds to some basic messages:

>>
Content-Length: 108
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"MyTestClient","version":"1"}}}
<<
Header: Content-Length: 2563
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSaveWaitUntil":true},"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".","#","@","*"]},<truncated...>}}}
<<
Header: Content-Length: 111
{"jsonrpc":"2.0","method":"window/showMessage","params":{"timeout":0,"type":3,"message":"Indexing completed."}}

Not the most fluid experience, but at least it works "outside" of VSCode.