Class DiagnoseDocumentRequest
Request for rdcore/diagnostics/document: the language server hands a diagnostics-provider
extension everything it needs to analyze one document and asks for the diagnostics it finds.
[Method("rdcore/diagnostics/document", Direction.ClientToServer)]
public record DiagnoseDocumentRequest : IRequest, IRequest<Unit>, IRequest<DiagnoseDocumentResponse>, IBaseRequest, IEquatable<DiagnoseDocumentRequest>
- Inheritance
-
DiagnoseDocumentRequest
- Implements
-
IRequestIRequest<Unit>IRequest<DiagnoseDocumentResponse>IBaseRequest
- Inherited Members
Remarks
The language server is the orchestrator — it owns the workspace and the parser, so it pushes the parsed ModuleParseResult down rather than have each provider re-read and re-parse. The parse result's AST is polymorphic and the JSON-RPC transport's serializer cannot round-trip it (see PlatformJson), so the payload rides a System.Text.Json string in Json. The response is a plain DiagnoseDocumentResponse — an LSP Diagnostic is the transport serializer's own model. Only extensions whose manifest advertises the DiagnoseDocument capability receive this request.
Properties
Json
The System.Text.Json representation of a DiagnoseDocumentPayload.
public string Json { get; init; }