microsoft / microsoft/language-server-protocol

Clarify how to dynamically register for workspace/diagnostic requests

Open
#1,723 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification diagnostics
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

As far as I can tell, when a server wants to dynamically register for workspace/diagnostic requests, it needs to do so by registering for textDocument/diagnostic and setting DiagnosticOptions.workspaceDiagnostics to true. At least that is how the implementation in vscode-languageserver-node seems to handle it. If this is correct and intentional, it would be helpful to have a note in the spec for workspace/diagnostic for this counter-intuitive behavior for dynamic registration, i.e. that the Registration.method actually has to be textDocument/diagnostic instead of workspace/diagnostic.

Also, a registrationMethod field in definition for workspace/diagnostics in the meta-model may need to be added for this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workspace/diagnostic specification entry and the workspace/diagnostics definition in the meta-model, then compare their dynamic-registration behavior with the vscode-languageserver-node implementation mentioned in the issue. Done means the specification clearly documents the registration method and the need for a registrationMethod field is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.