From a0bbbcf2797d3649166988168e0e21d0103706c1 Mon Sep 17 00:00:00 2001 From: Robby Bennett Date: Thu, 12 Oct 2023 09:43:13 -0600 Subject: [PATCH 1/4] add diagnostic dynamic long description --- _specifications/lsp/3.18/types/diagnostic.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/_specifications/lsp/3.18/types/diagnostic.md b/_specifications/lsp/3.18/types/diagnostic.md index 6c40d0958..7fd4fe1d5 100644 --- a/_specifications/lsp/3.18/types/diagnostic.md +++ b/_specifications/lsp/3.18/types/diagnostic.md @@ -151,8 +151,19 @@ export interface DiagnosticRelatedInformation { */ export interface CodeDescription { /** - * An URI to open with more information about the diagnostic error. + * An URI to open with general information about the diagnostic error (e.g. + * paragraphs of a description, code examples, exceptions, links to sources). + * The URI can start with "file:", "https:", or other. */ - href: URI; + href?: URI; + + /** + * A string with unique information about this particular instance of the + * diagnostic error (e.g. a warning that mentions your variable name + * specifcally and the function it was defined in). + * + * @since 3.18.0 + */ + dynamicDescription?: string; } -``` \ No newline at end of file +``` From d586f8414546411f5fd8e35bf11dcc000cc78d39 Mon Sep 17 00:00:00 2001 From: Robby Bennett Date: Mon, 16 Oct 2023 08:36:46 -0600 Subject: [PATCH 2/4] Revert "add diagnostic dynamic long description" This reverts commit a0bbbcf2797d3649166988168e0e21d0103706c1. --- _specifications/lsp/3.18/types/diagnostic.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/_specifications/lsp/3.18/types/diagnostic.md b/_specifications/lsp/3.18/types/diagnostic.md index 7fd4fe1d5..6c40d0958 100644 --- a/_specifications/lsp/3.18/types/diagnostic.md +++ b/_specifications/lsp/3.18/types/diagnostic.md @@ -151,19 +151,8 @@ export interface DiagnosticRelatedInformation { */ export interface CodeDescription { /** - * An URI to open with general information about the diagnostic error (e.g. - * paragraphs of a description, code examples, exceptions, links to sources). - * The URI can start with "file:", "https:", or other. + * An URI to open with more information about the diagnostic error. */ - href?: URI; - - /** - * A string with unique information about this particular instance of the - * diagnostic error (e.g. a warning that mentions your variable name - * specifcally and the function it was defined in). - * - * @since 3.18.0 - */ - dynamicDescription?: string; + href: URI; } -``` +``` \ No newline at end of file From 1348fc7c74f7427eb9376526725da673bd1e45ce Mon Sep 17 00:00:00 2001 From: Robby Bennett Date: Mon, 16 Oct 2023 09:00:21 -0600 Subject: [PATCH 3/4] add longMessage field to Diagnostic --- _specifications/lsp/3.18/types/diagnostic.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/_specifications/lsp/3.18/types/diagnostic.md b/_specifications/lsp/3.18/types/diagnostic.md index 6c40d0958..ec1c98cb3 100644 --- a/_specifications/lsp/3.18/types/diagnostic.md +++ b/_specifications/lsp/3.18/types/diagnostic.md @@ -34,10 +34,22 @@ export interface Diagnostic { source?: string; /** - * The diagnostic's message. + * The diagnostic's message, e.g. 'Unknown type name "int_8_t"'. */ message: string; + /** + * An optional property to describe this diagnostic's message with more + * details. For example: + * The type name "int_8_t" is unknown. Did you mean any of these types? + * - int + * - int8_t + * Read more about the built-in types [here](file:///path/to/docs.md). + * + * @since 3.18.0 + */ + longMessage?: string | MarkupContent; + /** * Additional metadata about the diagnostic. * @@ -155,4 +167,4 @@ export interface CodeDescription { */ href: URI; } -``` \ No newline at end of file +``` From b8f3763da8e02398a35740b17603f427b628c9ad Mon Sep 17 00:00:00 2001 From: Robby Bennett Date: Mon, 16 Oct 2023 13:42:12 -0600 Subject: [PATCH 4/4] rename longMessage to messageDetails to clarify the importance of message --- _specifications/lsp/3.18/types/diagnostic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_specifications/lsp/3.18/types/diagnostic.md b/_specifications/lsp/3.18/types/diagnostic.md index ec1c98cb3..c02a97cd0 100644 --- a/_specifications/lsp/3.18/types/diagnostic.md +++ b/_specifications/lsp/3.18/types/diagnostic.md @@ -48,7 +48,7 @@ export interface Diagnostic { * * @since 3.18.0 */ - longMessage?: string | MarkupContent; + messageDetails?: string | MarkupContent; /** * Additional metadata about the diagnostic.