Skip to content

Commit

Permalink
add markup diagnostic message spec
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaSolOs committed Mar 1, 2024
1 parent fbb32f4 commit 5542e25
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions _specifications/lsp/3.18/language/pullDiagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,14 @@ export interface DiagnosticWorkspaceClientCapabilities {
* wide change that requires such a calculation.
*/
refreshSupport?: boolean;

/**
* Whether the client supports `MarkupContent` in diagnostic messages.
*
* @since 3.18.0
* @proposed
*/
markupMessageSupport?: boolean;
}
```

Expand Down
9 changes: 8 additions & 1 deletion _specifications/lsp/3.18/types/diagnostic.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#### <a href="#diagnostic" name="diagnostic" class="anchor"> Diagnostic </a>

- New in version 3.18: support for markup content in diagnostic messages. The support is guarded by the
client capability `workspace.diagnostic.markupMessageSupport`. If a client doesn't signal the capability,
servers shouldn't send `MarkupContent` diagnostic messages back to the client.

Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

```typescript
Expand Down Expand Up @@ -35,8 +39,11 @@ export interface Diagnostic {

/**
* The diagnostic's message.
*
* @since 3.18.0 - support for MarkupContent. This is guarded by the client
* capability `workspace.diagnostic.markupMessageSupport`.
*/
message: string;
message: string | MarkupContent;

/**
* Additional metadata about the diagnostic.
Expand Down

0 comments on commit 5542e25

Please sign in to comment.