question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Correct way to initialize language server

See original GitHub issue

I am trying to initialize the language server using the below parameters but the ‘settings’ are ignored since the logs are the same even when the trace is changed, not sure if this is the correct approach to do so.

json.put("params", new JSONObject()
                .put("rootPath", path)
                .put("rootUri", "file:///" + path)
                .put("initializationOptions",
                        new JSONObject()
                                .put("settings", 
                                        new JSONObject().put("java", 
                                                new JSONObject()
                                                        .put("referenceCodeLens", 
                                                                new JSONObject().put("enabled", true))
                                                        .put("configuration", new JSONObject()
                                                                .put("updateBuildConfiguration", "automatic"))
                                                        .put("trace", new JSONObject()
                                                                 .put("server", "verbose"))))));

Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rgrunbercommented, Jun 3, 2021

Yeah, but I’ve got this after trying to attach Eclipse Debug Adapter Launcher to the language server:

Instead of “Eclipse Debug Adapter Launcher”, can you try using the “Remote Java Application” launcher ? It should be visible from debug configurations. In fact, if you have the JDT-LS launch folder also checked out in the workspace, you should see an option there called ‘jdt.ls.remote.launch’

0reactions
rgrunbercommented, Jun 29, 2021

Closing this, as it’s probably easier now to diagnose any issues when you’re able to debug the language server itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vivado 2021.1 stuck initializing language server - Xilinx Support
1) Delete the manifest.tcl file. 2) Start Vivado and open a project. 3) Let it freeze trying to open a source file. 4)...
Read more >
Language Server Extension Guide - Visual Studio Code
Learn how to create Language Servers to provide rich language features in Visual Studio Code.
Read more >
Implementing a Language Server…How Hard Can It Be??
To connect language server to a plugin first you have to import the language server launcher or create a launcher inside your plugin...
Read more >
Language Server Protocol Specification - 3.17
If appropriate the value set of an enumeration is announced by the defining side (e.g. client or server) and transmitted to the other...
Read more >
Cannot Initialize Language Server Protocol - Stack Overflow
It seems that your code confirms it, but how to generate the valid json for LSP? Can you give me some instructions? –...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found