vscode-languageserver-protocol 3.16.0 → 3.17.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ const browser_1 = require("vscode-jsonrpc/browser");
19
19
  __exportStar(require("vscode-jsonrpc/browser"), exports);
20
20
  __exportStar(require("../common/api"), exports);
21
21
  function createProtocolConnection(reader, writer, logger, options) {
22
- return browser_1.createMessageConnection(reader, writer, logger, options);
22
+ return (0, browser_1.createMessageConnection)(reader, writer, logger, options);
23
23
  }
24
24
  exports.createProtocolConnection = createProtocolConnection;
25
25
  //# sourceMappingURL=main.js.map
@@ -12,7 +12,38 @@ export declare namespace LSPErrorCodes {
12
12
  * @since 3.16.0
13
13
  */
14
14
  const lspReservedErrorRangeStart: integer;
15
+ /**
16
+ * A request failed but it was syntactically correct, e.g the
17
+ * method name was known and the parameters were valid. The error
18
+ * message should contain human readable information about why
19
+ * the request failed.
20
+ *
21
+ * @since 3.17.0
22
+ */
23
+ const RequestFailed: integer;
24
+ /**
25
+ * The server cancelled the request. This error code should
26
+ * only be used for requests that explicitly support being
27
+ * server cancellable.
28
+ *
29
+ * @since 3.17.0
30
+ */
31
+ const ServerCancelled: integer;
32
+ /**
33
+ * The server detected that the content of a document got
34
+ * modified outside normal conditions. A server should
35
+ * NOT send this error code if it detects a content change
36
+ * in it unprocessed messages. The result even computed
37
+ * on an older state might still be useful for the client.
38
+ *
39
+ * If a client decides that a result is not of any use anymore
40
+ * the client should cancel the request.
41
+ */
15
42
  const ContentModified: integer;
43
+ /**
44
+ * The client has canceled a request and a server as detected
45
+ * the cancel.
46
+ */
16
47
  const RequestCancelled: integer;
17
48
  /**
18
49
  * This is the end range of LSP reserved error codes.
@@ -22,5 +53,72 @@ export declare namespace LSPErrorCodes {
22
53
  */
23
54
  const lspReservedErrorRangeEnd: integer;
24
55
  }
56
+ import * as diag from './proposed.diagnostic';
57
+ import * as typeh from './proposed.typeHierarchy';
58
+ import * as iv from './proposed.inlineValue';
59
+ import * as nb from './proposed.notebooks';
25
60
  export declare namespace Proposed {
61
+ type DiagnosticClientCapabilities = diag.DiagnosticClientCapabilities;
62
+ type $DiagnosticClientCapabilities = diag.$DiagnosticClientCapabilities;
63
+ type DiagnosticOptions = diag.DiagnosticOptions;
64
+ type DiagnosticRegistrationOptions = diag.DiagnosticRegistrationOptions;
65
+ type $DiagnosticServerCapabilities = diag.$DiagnosticServerCapabilities;
66
+ type DocumentDiagnosticParams = diag.DocumentDiagnosticParams;
67
+ type DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
68
+ const DiagnosticServerCancellationData: typeof diag.DiagnosticServerCancellationData;
69
+ type DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
70
+ const DocumentDiagnosticReportKind: typeof diag.DocumentDiagnosticReportKind;
71
+ type FullDocumentDiagnosticReport = diag.FullDocumentDiagnosticReport;
72
+ type RelatedFullDocumentDiagnosticReport = diag.RelatedFullDocumentDiagnosticReport;
73
+ type UnchangedDocumentDiagnosticReport = diag.UnchangedDocumentDiagnosticReport;
74
+ type RelatedUnchangedDocumentDiagnosticReport = diag.RelatedUnchangedDocumentDiagnosticReport;
75
+ type DocumentDiagnosticReport = diag.DocumentDiagnosticReport;
76
+ type DocumentDiagnosticReportPartialResult = diag.DocumentDiagnosticReportPartialResult;
77
+ const DocumentDiagnosticRequest: typeof diag.DocumentDiagnosticRequest;
78
+ type PreviousResultId = diag.PreviousResultId;
79
+ type WorkspaceDiagnosticParams = diag.WorkspaceDiagnosticParams;
80
+ type WorkspaceFullDocumentDiagnosticReport = diag.WorkspaceFullDocumentDiagnosticReport;
81
+ type WorkspaceUnchangedDocumentDiagnosticReport = diag.WorkspaceUnchangedDocumentDiagnosticReport;
82
+ type WorkspaceDocumentDiagnosticReport = diag.WorkspaceDocumentDiagnosticReport;
83
+ type WorkspaceDiagnosticReport = diag.WorkspaceDiagnosticReport;
84
+ type WorkspaceDiagnosticReportPartialResult = diag.WorkspaceDiagnosticReportPartialResult;
85
+ const WorkspaceDiagnosticRequest: typeof diag.WorkspaceDiagnosticRequest;
86
+ const DiagnosticRefreshRequest: typeof diag.DiagnosticRefreshRequest;
87
+ type TypeHierarchyClientCapabilities = typeh.TypeHierarchyClientCapabilities;
88
+ type TypeHierarchyOptions = typeh.TypeHierarchyOptions;
89
+ type TypeHierarchyRegistrationOptions = typeh.TypeHierarchyRegistrationOptions;
90
+ type TypeHierarchyPrepareParams = typeh.TypeHierarchyPrepareParams;
91
+ type TypeHierarchySupertypesParams = typeh.TypeHierarchySupertypesParams;
92
+ type TypeHierarchySubtypesParams = typeh.TypeHierarchySubtypesParams;
93
+ const TypeHierarchyPrepareRequest: typeof typeh.TypeHierarchyPrepareRequest;
94
+ const TypeHierarchySupertypesRequest: typeof typeh.TypeHierarchySupertypesRequest;
95
+ const TypeHierarchySubtypesRequest: typeof typeh.TypeHierarchySubtypesRequest;
96
+ type InlineValuesClientCapabilities = iv.InlineValuesClientCapabilities;
97
+ type InlineValuesOptions = iv.InlineValuesOptions;
98
+ type InlineValuesRegistrationOptions = iv.InlineValuesRegistrationOptions;
99
+ type InlineValuesParams = iv.InlineValuesParams;
100
+ const InlineValuesRequest: typeof iv.InlineValuesRequest;
101
+ const InlineValuesRefreshRequest: typeof iv.InlineValuesRefreshRequest;
102
+ type $NotebookDocumentClientCapabilities = nb.$NotebookDocumentClientCapabilities;
103
+ type NotebookDocumentSyncClientCapabilities = nb.NotebookDocumentSyncClientCapabilities;
104
+ type $NotebookDocumentServerCapabilities = nb.$NotebookDocumentServerCapabilities;
105
+ type NotebookCellKind = nb.NotebookCellKind;
106
+ const NotebookCellKind: typeof nb.NotebookCellKind;
107
+ type NotebookCell = nb.NotebookCell;
108
+ const NotebookCell: typeof nb.NotebookCell;
109
+ type NotebookCellChange = nb.NotebookCellChange;
110
+ type NotebookDocument = nb.NotebookDocument;
111
+ const NotebookDocument: typeof nb.NotebookDocument;
112
+ type NotebookDocumentChangeEvent = nb.NotebookDocumentChangeEvent;
113
+ type NotebookDocumentIdentifier = nb.NotebookDocumentIdentifier;
114
+ type VersionedNotebookDocumentIdentifier = nb.VersionedNotebookDocumentIdentifier;
115
+ type NotebookDocumentOptions = nb.NotebookDocumentOptions;
116
+ type NotebookDocumentRegistrationOptions = nb.NotebookDocumentRegistrationOptions;
117
+ const NotebookDocumentSyncRegistrationType: typeof nb.NotebookDocumentSyncRegistrationType;
118
+ type DidOpenNotebookDocumentParams = nb.DidOpenNotebookDocumentParams;
119
+ const DidOpenNotebookDocumentNotification: typeof nb.DidOpenNotebookDocumentNotification;
120
+ type DidChangeNotebookDocumentParams = nb.DidChangeNotebookDocumentParams;
121
+ const DidChangeNotebookDocumentNotification: typeof nb.DidChangeNotebookDocumentNotification;
122
+ type DidCloseNotebookDocumentParams = nb.DidCloseNotebookDocumentParams;
123
+ const DidCloseNotebookDocumentNotification: typeof nb.DidCloseNotebookDocumentNotification;
26
124
  }
package/lib/common/api.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
17
+ exports.Proposed = exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
18
18
  __exportStar(require("vscode-jsonrpc"), exports);
19
19
  __exportStar(require("vscode-languageserver-types"), exports);
20
20
  __exportStar(require("./messages"), exports);
@@ -30,7 +30,38 @@ var LSPErrorCodes;
30
30
  * @since 3.16.0
31
31
  */
32
32
  LSPErrorCodes.lspReservedErrorRangeStart = -32899;
33
+ /**
34
+ * A request failed but it was syntactically correct, e.g the
35
+ * method name was known and the parameters were valid. The error
36
+ * message should contain human readable information about why
37
+ * the request failed.
38
+ *
39
+ * @since 3.17.0
40
+ */
41
+ LSPErrorCodes.RequestFailed = -32803;
42
+ /**
43
+ * The server cancelled the request. This error code should
44
+ * only be used for requests that explicitly support being
45
+ * server cancellable.
46
+ *
47
+ * @since 3.17.0
48
+ */
49
+ LSPErrorCodes.ServerCancelled = -32802;
50
+ /**
51
+ * The server detected that the content of a document got
52
+ * modified outside normal conditions. A server should
53
+ * NOT send this error code if it detects a content change
54
+ * in it unprocessed messages. The result even computed
55
+ * on an older state might still be useful for the client.
56
+ *
57
+ * If a client decides that a result is not of any use anymore
58
+ * the client should cancel the request.
59
+ */
33
60
  LSPErrorCodes.ContentModified = -32801;
61
+ /**
62
+ * The client has canceled a request and a server as detected
63
+ * the cancel.
64
+ */
34
65
  LSPErrorCodes.RequestCancelled = -32800;
35
66
  /**
36
67
  * This is the end range of LSP reserved error codes.
@@ -40,4 +71,28 @@ var LSPErrorCodes;
40
71
  */
41
72
  LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
42
73
  })(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
74
+ const diag = require("./proposed.diagnostic");
75
+ const typeh = require("./proposed.typeHierarchy");
76
+ const iv = require("./proposed.inlineValue");
77
+ const nb = require("./proposed.notebooks");
78
+ var Proposed;
79
+ (function (Proposed) {
80
+ Proposed.DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
81
+ Proposed.DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
82
+ Proposed.DocumentDiagnosticRequest = diag.DocumentDiagnosticRequest;
83
+ Proposed.WorkspaceDiagnosticRequest = diag.WorkspaceDiagnosticRequest;
84
+ Proposed.DiagnosticRefreshRequest = diag.DiagnosticRefreshRequest;
85
+ Proposed.TypeHierarchyPrepareRequest = typeh.TypeHierarchyPrepareRequest;
86
+ Proposed.TypeHierarchySupertypesRequest = typeh.TypeHierarchySupertypesRequest;
87
+ Proposed.TypeHierarchySubtypesRequest = typeh.TypeHierarchySubtypesRequest;
88
+ Proposed.InlineValuesRequest = iv.InlineValuesRequest;
89
+ Proposed.InlineValuesRefreshRequest = iv.InlineValuesRefreshRequest;
90
+ Proposed.NotebookCellKind = nb.NotebookCellKind;
91
+ Proposed.NotebookCell = nb.NotebookCell;
92
+ Proposed.NotebookDocument = nb.NotebookDocument;
93
+ Proposed.NotebookDocumentSyncRegistrationType = nb.NotebookDocumentSyncRegistrationType;
94
+ Proposed.DidOpenNotebookDocumentNotification = nb.DidOpenNotebookDocumentNotification;
95
+ Proposed.DidChangeNotebookDocumentNotification = nb.DidChangeNotebookDocumentNotification;
96
+ Proposed.DidCloseNotebookDocumentNotification = nb.DidCloseNotebookDocumentNotification;
97
+ })(Proposed = exports.Proposed || (exports.Proposed = {}));
43
98
  //# sourceMappingURL=api.js.map
@@ -1,4 +1,4 @@
1
- import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc';
1
+ import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType, MessageSignature } from 'vscode-jsonrpc';
2
2
  import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
3
3
  export interface ProtocolConnection {
4
4
  /**
@@ -23,20 +23,20 @@ export interface ProtocolConnection {
23
23
  /**
24
24
  * Sends a request and returns a promise resolving to the result of the request.
25
25
  *
26
- * @param method the request's method name.
26
+ * @param method the message signature or the method name.
27
27
  * @param token An optional cancellation token.
28
28
  * @returns A promise resolving to the request's result.
29
29
  */
30
- sendRequest<R>(method: string, token?: CancellationToken): Promise<R>;
30
+ sendRequest<R>(method: MessageSignature | string, token?: CancellationToken): Promise<R>;
31
31
  /**
32
32
  * Sends a request and returns a promise resolving to the result of the request.
33
33
  *
34
- * @param method the request's method name.
34
+ * @param method the message signature or the method name.
35
35
  * @param params The request's parameter.
36
36
  * @param token An optional cancellation token.
37
37
  * @returns A promise resolving to the request's result.
38
38
  */
39
- sendRequest<R>(method: string, param: any, token?: CancellationToken): Promise<R>;
39
+ sendRequest<R>(method: MessageSignature | string, param: any, token?: CancellationToken): Promise<R>;
40
40
  /**
41
41
  * Installs a request handler.
42
42
  *
@@ -56,38 +56,38 @@ export interface ProtocolConnection {
56
56
  /**
57
57
  * Installs a request handler.
58
58
  *
59
- * @param methods The method name to install the handler for.
59
+ * @param methods the message signature or the method name to install a handler for.
60
60
  * @param handler The actual handler.
61
61
  */
62
- onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable;
62
+ onRequest<R, E>(method: MessageSignature | string, handler: GenericRequestHandler<R, E>): Disposable;
63
63
  /**
64
64
  * Sends a notification.
65
65
  *
66
66
  * @param type the notification's type to send.
67
67
  */
68
- sendNotification(type: NotificationType0): void;
69
- sendNotification<RO>(type: ProtocolNotificationType0<RO>): void;
68
+ sendNotification(type: NotificationType0): Promise<void>;
69
+ sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
70
70
  /**
71
71
  * Sends a notification.
72
72
  *
73
73
  * @param type the notification's type to send.
74
74
  * @param params the notification's parameters.
75
75
  */
76
- sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): void;
77
- sendNotification<P>(type: NotificationType<P>, params?: P): void;
76
+ sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
77
+ sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
78
78
  /**
79
79
  * Sends a notification.
80
80
  *
81
- * @param method the notification's method name.
81
+ * @param method the notification's method signature or the method name.
82
82
  */
83
- sendNotification(method: string): void;
83
+ sendNotification(method: MessageSignature | string): Promise<void>;
84
84
  /**
85
85
  * Sends a notification.
86
86
  *
87
- * @param method the notification's method name.
87
+ * @param method the notification's method signature or the method name.
88
88
  * @param params the notification's parameters.
89
89
  */
90
- sendNotification(method: string, params: any): void;
90
+ sendNotification(method: MessageSignature | string, params: any): Promise<void>;
91
91
  /**
92
92
  * Installs a notification handler.
93
93
  *
@@ -107,10 +107,10 @@ export interface ProtocolConnection {
107
107
  /**
108
108
  * Installs a notification handler.
109
109
  *
110
- * @param methods The method name to install the handler for.
110
+ * @param methods The message signature or the method name to install the handler for.
111
111
  * @param handler The actual handler.
112
112
  */
113
- onNotification(method: string, handler: GenericNotificationHandler): Disposable;
113
+ onNotification(method: MessageSignature | string, handler: GenericNotificationHandler): Disposable;
114
114
  /**
115
115
  * Installs a progress handler for a given token.
116
116
  * @param type the progress type
@@ -124,7 +124,7 @@ export interface ProtocolConnection {
124
124
  * @param token the token to use
125
125
  * @param value the progress value
126
126
  */
127
- sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): void;
127
+ sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
128
128
  /**
129
129
  * Enables tracing mode for the connection.
130
130
  */
@@ -139,7 +139,7 @@ export interface ProtocolConnection {
139
139
  */
140
140
  onClose: Event<void>;
141
141
  /**
142
- * An event emiiter firing when the connection receives a notification that is not
142
+ * An event emitter firing when the connection receives a notification that is not
143
143
  * handled.
144
144
  */
145
145
  onUnhandledNotification: Event<NotificationMessage>;
@@ -10,7 +10,7 @@ function createProtocolConnection(input, output, logger, options) {
10
10
  if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
11
11
  options = { connectionStrategy: options };
12
12
  }
13
- return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
13
+ return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
14
14
  }
15
15
  exports.createProtocolConnection = createProtocolConnection;
16
16
  //# sourceMappingURL=connection.js.map
@@ -36,7 +36,4 @@ class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
36
36
  }
37
37
  }
38
38
  exports.ProtocolNotificationType = ProtocolNotificationType;
39
- // let x: ProtocolNotificationType<number, { value: number}>;
40
- // let y: ProtocolNotificationType<string, { value: number}>;
41
- // x = y;
42
39
  //# sourceMappingURL=messages.js.map
@@ -0,0 +1,324 @@
1
+ import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
+ import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType0, ProtocolRequestType } from './messages';
4
+ import { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, TextDocumentClientCapabilities } from './protocol';
5
+ /**
6
+ * @since 3.17.0 - proposed state
7
+ */
8
+ export interface DiagnosticClientCapabilities {
9
+ /**
10
+ * Whether implementation supports dynamic registration. If this is set to `true`
11
+ * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
12
+ * return value for the corresponding server capability as well.
13
+ */
14
+ dynamicRegistration?: boolean;
15
+ /**
16
+ * Whether the clients supports related documents for document diagnostic pulls.
17
+ */
18
+ relatedDocumentSupport?: boolean;
19
+ }
20
+ export interface $DiagnosticClientCapabilities {
21
+ textDocument?: TextDocumentClientCapabilities & {
22
+ diagnostic?: DiagnosticClientCapabilities;
23
+ };
24
+ }
25
+ /**
26
+ * Diagnostic options.
27
+ *
28
+ * @since 3.17.0 - proposed state
29
+ */
30
+ export interface DiagnosticOptions extends WorkDoneProgressOptions {
31
+ /**
32
+ * An optional identifier under which the diagnostics are
33
+ * managed by the client.
34
+ */
35
+ identifier?: string;
36
+ /**
37
+ * Whether the language has inter file dependencies meaning that
38
+ * editing code in one file can result in a different diagnostic
39
+ * set in another file. Inter file dependencies are common for
40
+ * most programming languages and typically uncommon for linters.
41
+ */
42
+ interFileDependencies: boolean;
43
+ /**
44
+ * The server provides support for workspace diagnostics as well.
45
+ */
46
+ workspaceDiagnostics: boolean;
47
+ }
48
+ /**
49
+ * Diagnostic registration options.
50
+ *
51
+ * @since 3.17.0 - proposed state
52
+ */
53
+ export interface DiagnosticRegistrationOptions extends TextDocumentRegistrationOptions, DiagnosticOptions, StaticRegistrationOptions {
54
+ }
55
+ export interface $DiagnosticServerCapabilities {
56
+ diagnosticProvider?: DiagnosticOptions;
57
+ }
58
+ /**
59
+ * Cancellation data returned from a diagnostic request.
60
+ *
61
+ * @since 3.17.0 - proposed state
62
+ */
63
+ export interface DiagnosticServerCancellationData {
64
+ retriggerRequest: boolean;
65
+ }
66
+ /**
67
+ * @since 3.17.0 - proposed state
68
+ */
69
+ export declare namespace DiagnosticServerCancellationData {
70
+ function is(value: any): value is DiagnosticServerCancellationData;
71
+ }
72
+ /**
73
+ * Parameters of the document diagnostic request.
74
+ *
75
+ * @since 3.17.0 - proposed state
76
+ */
77
+ export interface DocumentDiagnosticParams extends WorkDoneProgressParams, PartialResultParams {
78
+ /**
79
+ * The text document.
80
+ */
81
+ textDocument: TextDocumentIdentifier;
82
+ /**
83
+ * The additional identifier provided during registration.
84
+ */
85
+ identifier?: string;
86
+ /**
87
+ * The result id of a previous response if provided.
88
+ */
89
+ previousResultId?: string;
90
+ }
91
+ /**
92
+ * The document diagnostic report kinds.
93
+ *
94
+ * @since 3.17.0 - proposed state
95
+ */
96
+ export declare enum DocumentDiagnosticReportKind {
97
+ /**
98
+ * A diagnostic report with a full
99
+ * set of problems.
100
+ */
101
+ full = "full",
102
+ /**
103
+ * A report indicating that the last
104
+ * returned report is still accurate.
105
+ */
106
+ unChanged = "unChanged"
107
+ }
108
+ /**
109
+ * A diagnostic report with a full set of problems.
110
+ *
111
+ * @since 3.17.0 - proposed state
112
+ */
113
+ export interface FullDocumentDiagnosticReport {
114
+ /**
115
+ * A full document diagnostic report.
116
+ */
117
+ kind: DocumentDiagnosticReportKind.full;
118
+ /**
119
+ * An optional result id. If provided it will
120
+ * be sent on the next diagnostic request for the
121
+ * same document.
122
+ */
123
+ resultId?: string;
124
+ /**
125
+ * The actual items.
126
+ */
127
+ items: Diagnostic[];
128
+ }
129
+ /**
130
+ * A full diagnostic report with a set of related documents.
131
+ *
132
+ * @since 3.17.0 - proposed state
133
+ */
134
+ export interface RelatedFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
135
+ /**
136
+ * Diagnostics of related documents. This information is useful
137
+ * in programming languages where code in a file A can generate
138
+ * diagnostics in a file B which A depends on. An example of
139
+ * such a language is C/C++ where marco definitions in a file
140
+ * a.cpp and result in errors in a header file b.hpp.
141
+ *
142
+ * @since 3.17.0 - proposed state
143
+ */
144
+ relatedDocuments?: {
145
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
146
+ };
147
+ }
148
+ /**
149
+ * A diagnostic report indicating that the last returned
150
+ * report is still accurate.
151
+ *
152
+ * @since 3.17.0 - proposed state
153
+ */
154
+ export interface UnchangedDocumentDiagnosticReport {
155
+ /**
156
+ * A document diagnostic report indicating
157
+ * no changes to the last result. A server can
158
+ * only return `unchanged` if result ids are
159
+ * provided.
160
+ */
161
+ kind: DocumentDiagnosticReportKind.unChanged;
162
+ /**
163
+ * A result id which will be sent on the next
164
+ * diagnostic request for the same document.
165
+ */
166
+ resultId: string;
167
+ }
168
+ /**
169
+ * An unchanged diagnostic report with a set of related documents.
170
+ *
171
+ * @since 3.17.0 - proposed state
172
+ */
173
+ export interface RelatedUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
174
+ /**
175
+ * Diagnostics of related documents. This information is useful
176
+ * in programming languages where code in a file A can generate
177
+ * diagnostics in a file B which A depends on. An example of
178
+ * such a language is C/C++ where marco definitions in a file
179
+ * a.cpp and result in errors in a header file b.hpp.
180
+ *
181
+ * @since 3.17.0 - proposed state
182
+ */
183
+ relatedDocuments?: {
184
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
185
+ };
186
+ }
187
+ /**
188
+ * The result of a document diagnostic pull request. A report can
189
+ * either be a full report containing all diagnostics for the
190
+ * requested document or a unchanged report indicating that nothing
191
+ * has changed in terms of diagnostics in comparison to the last
192
+ * pull request.
193
+ *
194
+ * @since 3.17.0 - proposed state
195
+ */
196
+ export declare type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport;
197
+ /**
198
+ * A partial result for a document diagnostic report.
199
+ *
200
+ * @since 3.17.0 - proposed state
201
+ */
202
+ export interface DocumentDiagnosticReportPartialResult {
203
+ relatedDocuments: {
204
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
205
+ };
206
+ }
207
+ /**
208
+ * The document diagnostic request definition.
209
+ *
210
+ * @since 3.17.0 - proposed state
211
+ */
212
+ export declare namespace DocumentDiagnosticRequest {
213
+ const method: 'textDocument/diagnostic';
214
+ const type: ProtocolRequestType<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, DiagnosticRegistrationOptions>;
215
+ const partialResult: ProgressType<DocumentDiagnosticReportPartialResult>;
216
+ type HandlerSignature = RequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, void>;
217
+ }
218
+ /**
219
+ * A previous result id in a workspace pull request.
220
+ *
221
+ * @since 3.17.0 - proposed state
222
+ */
223
+ export declare type PreviousResultId = {
224
+ /**
225
+ * The URI for which the client knowns a
226
+ * result id.
227
+ */
228
+ uri: DocumentUri;
229
+ /**
230
+ * The value of the previous result id.
231
+ */
232
+ value: string;
233
+ };
234
+ /**
235
+ * Parameters of the workspace diagnostic request.
236
+ *
237
+ * @since 3.17.0 - proposed state
238
+ */
239
+ export interface WorkspaceDiagnosticParams extends WorkDoneProgressParams, PartialResultParams {
240
+ /**
241
+ * The additional identifier provided during registration.
242
+ */
243
+ identifier?: string;
244
+ /**
245
+ * The currently known diagnostic reports with their
246
+ * previous result ids.
247
+ */
248
+ previousResultIds: PreviousResultId[];
249
+ }
250
+ /**
251
+ * A full document diagnostic report for a workspace diagnostic result.
252
+ *
253
+ * @since 3.17.0 - proposed state
254
+ */
255
+ export interface WorkspaceFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
256
+ /**
257
+ * The URI for which diagnostic information is reported.
258
+ */
259
+ uri: DocumentUri;
260
+ /**
261
+ * The version number for which the diagnostics are reported.
262
+ * If the document is not marked as open `null` can be provided.
263
+ */
264
+ version: integer | null;
265
+ }
266
+ /**
267
+ * An unchanged document diagnostic report for a workspace diagnostic result.
268
+ *
269
+ * @since 3.17.0 - proposed state
270
+ */
271
+ export interface WorkspaceUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
272
+ /**
273
+ * The URI for which diagnostic information is reported.
274
+ */
275
+ uri: DocumentUri;
276
+ /**
277
+ * The version number for which the diagnostics are reported.
278
+ * If the document is not marked as open `null` can be provided.
279
+ */
280
+ version: integer | null;
281
+ }
282
+ /**
283
+ * A workspace diagnostic document report.
284
+ *
285
+ * @since 3.17.0 - proposed state
286
+ */
287
+ export declare type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport;
288
+ /**
289
+ * A workspace diagnostic report.
290
+ *
291
+ * @since 3.17.0 - proposed state
292
+ */
293
+ export interface WorkspaceDiagnosticReport {
294
+ items: WorkspaceDocumentDiagnosticReport[];
295
+ }
296
+ /**
297
+ * A partial result for a workspace diagnostic report.
298
+ *
299
+ * @since 3.17.0 - proposed state
300
+ */
301
+ export interface WorkspaceDiagnosticReportPartialResult {
302
+ items: WorkspaceDocumentDiagnosticReport[];
303
+ }
304
+ /**
305
+ * The workspace diagnostic request definition.
306
+ *
307
+ * @since 3.17.0 - proposed state
308
+ */
309
+ export declare namespace WorkspaceDiagnosticRequest {
310
+ const method: 'workspace/diagnostic';
311
+ const type: ProtocolRequestType<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData, void>;
312
+ const partialResult: ProgressType<WorkspaceDiagnosticReportPartialResult>;
313
+ type HandlerSignature = RequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport | null, void>;
314
+ }
315
+ /**
316
+ * The diagnostic refresh request definition.
317
+ *
318
+ * @since 3.17.0 - proposed state
319
+ */
320
+ export declare namespace DiagnosticRefreshRequest {
321
+ const method: `workspace/diagnostic/refresh`;
322
+ const type: ProtocolRequestType0<void, void, void, void>;
323
+ type HandlerSignature = RequestHandler0<void, void>;
324
+ }