File tree 4 files changed +41
-1
lines changed
4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -885,6 +885,28 @@ interface ServerCapabilities {
885
885
*/
886
886
inlineCompletionProvider? : boolean | InlineCompletionOptions ;
887
887
888
+ /**
889
+ * Text document specific server capabilities.
890
+ *
891
+ * @since 3.18.0
892
+ */
893
+ textDocument? : {
894
+ /**
895
+ * Capabilities specific to the diagnostic pull model.
896
+ *
897
+ * @since 3.18.0
898
+ */
899
+ diagnostic? : {
900
+ /**
901
+ * Whether the server supports `MarkupContent` in diagnostic messages.
902
+ *
903
+ * @since 3.18.0
904
+ * @proposed
905
+ */
906
+ markupMessageSupport? : boolean ;
907
+ };
908
+ };
909
+
888
910
/**
889
911
* Workspace specific server capabilities
890
912
*/
Original file line number Diff line number Diff line change @@ -361,6 +361,9 @@ export interface CodeActionContext {
361
361
* for the given range. There is no guarantee that these accurately reflect
362
362
* the error state of the resource. The primary parameter
363
363
* to compute code actions is the provided range.
364
+ *
365
+ * Note that the client should check the `textDocument.diagnostic.markupMessageSupport`
366
+ * server capability before sending diagnostics with markup messages to a server.
364
367
*/
365
368
diagnostics: Diagnostic [];
366
369
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ export interface DiagnosticClientCapabilities {
30
30
* pulls.
31
31
*/
32
32
relatedDocumentSupport? : boolean ;
33
+
34
+ /**
35
+ * Whether the client supports `MarkupContent` in diagnostic messages.
36
+ *
37
+ * @since 3.18.0
38
+ * @proposed
39
+ */
40
+ markupMessageSupport? : boolean ;
33
41
}
34
42
```
35
43
Original file line number Diff line number Diff line change 1
1
#### <a href =" #diagnostic " name =" diagnostic " class =" anchor " > Diagnostic </a >
2
2
3
+ - New in version 3.18: support for markup content in diagnostic messages. The support is guarded by the
4
+ client capability ` textDocument.diagnostic.markupMessageSupport ` . If a client doesn't signal the capability,
5
+ servers shouldn't send ` MarkupContent ` diagnostic messages back to the client.
6
+
3
7
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
4
8
5
9
``` typescript
@@ -35,8 +39,11 @@ export interface Diagnostic {
35
39
36
40
/**
37
41
* The diagnostic's message.
42
+ *
43
+ * @since 3.18.0 - support for MarkupContent. This is guarded by the client
44
+ * capability `textDocument.diagnostic.markupMessageSupport`.
38
45
*/
39
- message: string ;
46
+ message: string | MarkupContent ;
40
47
41
48
/**
42
49
* Additional metadata about the diagnostic.
You can’t perform that action at this time.
0 commit comments