scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Promote `metals.trace.server` settings #381

Open angelozerr opened 7 months ago

angelozerr commented 7 months ago

Is your feature request related to a problem? Please describe.

I'm developping an LSP support client for IntelliJ and I'm playing with your Scala Metal LS and other LS.

Our LSP support provides an LSP console and vscode provide it too, so it is important (for me) to track the LSP request/responses notification to compare them.

In other words, I need to track the LSP request / responses notification of Metals in the vscode Output

Describe the solution you'd like

The vscode language client supports that out of the box, and if you add in your settings.json:

"metals.trace.server": "verbose"

You will see LSP requests, responses, notifications in the Output:

image

The settings appears "metals.trace.server": "verbose" as unkwonw, because you need to declare it in your package.json like we did for vscode-xml:

https://github.com/redhat-developer/vscode-xml/blob/main/package.json#L214-L224

It should be nice too in your documentation that you speak about this settings.

Describe alternatives you've considered

I'm declaring "metals.trace.server": "verbose" in my settings.json it is working but appears as unkwonw settings.

Additional context

No response

Search terms

lsp console traces

tgodzik commented 7 months ago

Thanks for reporting! Honestly, I wasn't aware we had this was possible and I am not sure how that setting takes effect :thinking:

We can dig into that at some point and maybe promote it.

angelozerr commented 7 months ago

Thanks for reporting!

You are welcome!

vscode language client does that without extra code and it is a very nice feature to understand the behavior of the Metals language server. Just expose the settings in the package.json.

Many thanks for your answer!