Skip to content

Logging support unknown langId to enable trace setting #268

@gastonmorixe

Description

@gastonmorixe

To enable vscode language server client tracing we need the langId. I couldn't find it.

Without it the "Ruby Language Server" doesn't show up on Output tab unless there's some warn/error and it's hard to debug.

{
  "solargraph.trace.server": "verbose",
}

Logging Support for Language Server
If you are using vscode-languageclient to implement the client, you can specify a setting [langId].trace.server that instructs the Client to log communications between Language Client / Server to a channel of the Language Client's name.
For lsp-sample, you can set this setting: "languageServerExample.trace.server": "verbose". Now head to the channel "Language Server Example". You should see the logs:

I think we should add the langId as first param here:

let client = new LanguageClient('Ruby Language Server', serverOptions, clientOptions);

After adding 'solargraph' as first argument, tracing setting works

let client = new LanguageClient('solargraph', 'Ruby Language Server', serverOptions, clientOptions);
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions