Skip to content

add method textDocument/publishDiagnosticLongDescriptions and add type DiagnosticLongDescription #1826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion _data/linkableTypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
link: '#diagnosticRelatedInformation'
- type: 'CodeDescription'
link: '#codeDescription'
- type: 'DiagnosticLongDescription'
link: '#diagnosticLongDescription'
- type: 'Command'
link: '#command'
- type: 'TextEdit'
Expand Down Expand Up @@ -342,6 +344,10 @@
link: '#publishDiagnosticsClientCapabilities'
- type: 'PublishDiagnosticsParams'
link: '#publishDiagnosticsParams'
- type: 'textDocument/publishDiagnosticLongDescriptions'
link: '#textDocument_publishDiagnosticLongDescriptions'
- type: 'PublishDiagnosticLongDescriptionsParams'
link: '#publishDiagnosticLongDescriptionsParams'
- type: 'textDocument/completion'
link: '#textDocument_completion'
- type: 'CompletionClientCapabilities'
Expand Down Expand Up @@ -895,4 +901,4 @@
- type: 'InlineCompletionList'
link: '#inlineCompletionList'
- type: 'InlineCompletionItem'
link: '#inlineCompletionItem'
link: '#inlineCompletionItem'
21 changes: 21 additions & 0 deletions _specifications/lsp/3.18/language/publishDiagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,24 @@ interface PublishDiagnosticsParams {
diagnostics: Diagnostic[];
}
```

#### <a href="#textDocument_publishDiagnosticLongDescriptions" name="textDocument_publishDiagnosticLongDescriptions" class="anchor">PublishDiagnosticLongDescriptions Notification (:arrow_left:)</a>

Diagnostic long descriptions notifications are sent from the server to the client to provide static descriptions of a particular diagnostic code.

These notifications can be sent before or after the `textDocument/publishDiagnostics` notifications.

_Notification_:
* method: `textDocument/publishDiagnosticLongDescriptions`
* params: `PublishDiagnosticLongDescriptionsParams` defined as follows:

<div class="anchorHolder"><a href="#publishDiagnosticLongDescriptionsParams" name="publishDiagnosticLongDescriptionsParams" class="linkableAnchor"></a></div>

```typescript
interface PublishDiagnosticLongDescriptionsParams {
/**
* An array of diagnostic long description items.
*/
diagnosticLongDescriptions: DiagnosticLongDescription[];
}
```
26 changes: 25 additions & 1 deletion _specifications/lsp/3.18/types/diagnostic.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,28 @@ export interface CodeDescription {
*/
href: URI;
}
```
```

`DiagnosticLongDescription` is defined as follows:

<div class="anchorHolder"><a href="#diagnosticLongDescription" name="diagnosticLongDescription" class="linkableAnchor"></a></div>

```typescript
/**
* Structure to capture a static long description for a diagnostic error.
*
* @since 3.18.0
*/
export interface DiagnosticLongDescription {
/**
* The diagnostic's code.
*/
code?: integer | string;

/**
* The content with more information about the diagnostic error (e.g.
* multiple paragraphs, code examples, exceptions, links to sources).
*/
description: string | MarkupContent;
}
```