vscode-languageserver-protocol 3.17.0-next.1 → 3.17.0-next.10
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.
- package/lib/browser/main.js +1 -1
- package/lib/common/api.d.ts +69 -2
- package/lib/common/api.js +43 -1
- package/lib/common/connection.d.ts +19 -19
- package/lib/common/connection.js +1 -1
- package/lib/common/messages.js +0 -3
- package/lib/common/proposed.diagnostic.d.ts +299 -14
- package/lib/common/proposed.diagnostic.js +65 -7
- package/lib/common/proposed.inlineValue.d.ts +86 -0
- package/lib/common/proposed.inlineValue.js +29 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.js +1 -1
- package/lib/common/protocol.configuration.d.ts +4 -3
- package/lib/common/protocol.d.ts +118 -17
- package/lib/common/protocol.declaration.d.ts +1 -1
- package/lib/common/protocol.fileOperations.d.ts +1 -1
- package/lib/common/protocol.implementation.d.ts +1 -1
- package/lib/common/protocol.js +19 -3
- package/lib/common/protocol.semanticTokens.d.ts +26 -1
- package/lib/common/protocol.typeDefinition.d.ts +1 -1
- package/lib/node/main.js +1 -1
- package/package.json +4 -4
package/lib/browser/main.js
CHANGED
|
@@ -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
|
package/lib/common/api.d.ts
CHANGED
|
@@ -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.
|
|
@@ -23,12 +54,48 @@ export declare namespace LSPErrorCodes {
|
|
|
23
54
|
const lspReservedErrorRangeEnd: integer;
|
|
24
55
|
}
|
|
25
56
|
import * as diag from './proposed.diagnostic';
|
|
57
|
+
import * as typeh from './proposed.typeHierarchy';
|
|
58
|
+
import * as iv from './proposed.inlineValue';
|
|
26
59
|
export declare namespace Proposed {
|
|
27
60
|
type DiagnosticClientCapabilities = diag.DiagnosticClientCapabilities;
|
|
28
61
|
type $DiagnosticClientCapabilities = diag.$DiagnosticClientCapabilities;
|
|
29
|
-
type DiagnosticParams = diag.DiagnosticParams;
|
|
30
62
|
type DiagnosticOptions = diag.DiagnosticOptions;
|
|
31
63
|
type DiagnosticRegistrationOptions = diag.DiagnosticRegistrationOptions;
|
|
32
64
|
type $DiagnosticServerCapabilities = diag.$DiagnosticServerCapabilities;
|
|
33
|
-
|
|
65
|
+
type DocumentDiagnosticParams = diag.DocumentDiagnosticParams;
|
|
66
|
+
type DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
|
|
67
|
+
const DiagnosticServerCancellationData: typeof diag.DiagnosticServerCancellationData;
|
|
68
|
+
type DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
|
|
69
|
+
const DocumentDiagnosticReportKind: typeof diag.DocumentDiagnosticReportKind;
|
|
70
|
+
type FullDocumentDiagnosticReport = diag.FullDocumentDiagnosticReport;
|
|
71
|
+
type RelatedFullDocumentDiagnosticReport = diag.RelatedFullDocumentDiagnosticReport;
|
|
72
|
+
type UnchangedDocumentDiagnosticReport = diag.UnchangedDocumentDiagnosticReport;
|
|
73
|
+
type RelatedUnchangedDocumentDiagnosticReport = diag.RelatedUnchangedDocumentDiagnosticReport;
|
|
74
|
+
type DocumentDiagnosticReport = diag.DocumentDiagnosticReport;
|
|
75
|
+
type DocumentDiagnosticReportPartialResult = diag.DocumentDiagnosticReportPartialResult;
|
|
76
|
+
const DocumentDiagnosticRequest: typeof diag.DocumentDiagnosticRequest;
|
|
77
|
+
type PreviousResultId = diag.PreviousResultId;
|
|
78
|
+
type WorkspaceDiagnosticParams = diag.WorkspaceDiagnosticParams;
|
|
79
|
+
type WorkspaceFullDocumentDiagnosticReport = diag.WorkspaceFullDocumentDiagnosticReport;
|
|
80
|
+
type WorkspaceUnchangedDocumentDiagnosticReport = diag.WorkspaceUnchangedDocumentDiagnosticReport;
|
|
81
|
+
type WorkspaceDocumentDiagnosticReport = diag.WorkspaceDocumentDiagnosticReport;
|
|
82
|
+
type WorkspaceDiagnosticReport = diag.WorkspaceDiagnosticReport;
|
|
83
|
+
type WorkspaceDiagnosticReportPartialResult = diag.WorkspaceDiagnosticReportPartialResult;
|
|
84
|
+
const WorkspaceDiagnosticRequest: typeof diag.WorkspaceDiagnosticRequest;
|
|
85
|
+
const DiagnosticRefreshRequest: typeof diag.DiagnosticRefreshRequest;
|
|
86
|
+
type TypeHierarchyClientCapabilities = typeh.TypeHierarchyClientCapabilities;
|
|
87
|
+
type TypeHierarchyOptions = typeh.TypeHierarchyOptions;
|
|
88
|
+
type TypeHierarchyRegistrationOptions = typeh.TypeHierarchyRegistrationOptions;
|
|
89
|
+
type TypeHierarchyPrepareParams = typeh.TypeHierarchyPrepareParams;
|
|
90
|
+
type TypeHierarchySupertypesParams = typeh.TypeHierarchySupertypesParams;
|
|
91
|
+
type TypeHierarchySubtypesParams = typeh.TypeHierarchySubtypesParams;
|
|
92
|
+
const TypeHierarchyPrepareRequest: typeof typeh.TypeHierarchyPrepareRequest;
|
|
93
|
+
const TypeHierarchySupertypesRequest: typeof typeh.TypeHierarchySupertypesRequest;
|
|
94
|
+
const TypeHierarchySubtypesRequest: typeof typeh.TypeHierarchySubtypesRequest;
|
|
95
|
+
type InlineValuesClientCapabilities = iv.InlineValuesClientCapabilities;
|
|
96
|
+
type InlineValuesOptions = iv.InlineValuesOptions;
|
|
97
|
+
type InlineValuesRegistrationOptions = iv.InlineValuesRegistrationOptions;
|
|
98
|
+
type InlineValuesParams = iv.InlineValuesParams;
|
|
99
|
+
const InlineValuesRequest: typeof iv.InlineValuesRequest;
|
|
100
|
+
const InlineValuesRefreshRequest: typeof iv.InlineValuesRefreshRequest;
|
|
34
101
|
}
|
package/lib/common/api.js
CHANGED
|
@@ -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.
|
|
@@ -41,8 +72,19 @@ var LSPErrorCodes;
|
|
|
41
72
|
LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
|
|
42
73
|
})(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
|
|
43
74
|
const diag = require("./proposed.diagnostic");
|
|
75
|
+
const typeh = require("./proposed.typeHierarchy");
|
|
76
|
+
const iv = require("./proposed.inlineValue");
|
|
44
77
|
var Proposed;
|
|
45
78
|
(function (Proposed) {
|
|
46
|
-
Proposed.
|
|
79
|
+
Proposed.DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
|
|
80
|
+
Proposed.DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
|
|
81
|
+
Proposed.DocumentDiagnosticRequest = diag.DocumentDiagnosticRequest;
|
|
82
|
+
Proposed.WorkspaceDiagnosticRequest = diag.WorkspaceDiagnosticRequest;
|
|
83
|
+
Proposed.DiagnosticRefreshRequest = diag.DiagnosticRefreshRequest;
|
|
84
|
+
Proposed.TypeHierarchyPrepareRequest = typeh.TypeHierarchyPrepareRequest;
|
|
85
|
+
Proposed.TypeHierarchySupertypesRequest = typeh.TypeHierarchySupertypesRequest;
|
|
86
|
+
Proposed.TypeHierarchySubtypesRequest = typeh.TypeHierarchySubtypesRequest;
|
|
87
|
+
Proposed.InlineValuesRequest = iv.InlineValuesRequest;
|
|
88
|
+
Proposed.InlineValuesRefreshRequest = iv.InlineValuesRefreshRequest;
|
|
47
89
|
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
48
90
|
//# 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
|
|
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
|
|
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
|
|
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
|
|
142
|
+
* An event emitter firing when the connection receives a notification that is not
|
|
143
143
|
* handled.
|
|
144
144
|
*/
|
|
145
145
|
onUnhandledNotification: Event<NotificationMessage>;
|
package/lib/common/connection.js
CHANGED
|
@@ -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
|
package/lib/common/messages.js
CHANGED
|
@@ -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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
-
import { TextDocumentIdentifier, Diagnostic } from 'vscode-languageserver-types';
|
|
3
|
-
import { ProtocolRequestType } from './messages';
|
|
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
4
|
import { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, TextDocumentClientCapabilities } from './protocol';
|
|
5
5
|
/**
|
|
6
|
-
* @since 3.17.0
|
|
6
|
+
* @since 3.17.0 - proposed state
|
|
7
7
|
*/
|
|
8
8
|
export interface DiagnosticClientCapabilities {
|
|
9
9
|
/**
|
|
@@ -12,28 +12,313 @@ export interface DiagnosticClientCapabilities {
|
|
|
12
12
|
* return value for the corresponding server capability as well.
|
|
13
13
|
*/
|
|
14
14
|
dynamicRegistration?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the clients supports related documents for document diagnostic pulls.
|
|
17
|
+
*/
|
|
18
|
+
relatedDocumentSupport?: boolean;
|
|
15
19
|
}
|
|
16
20
|
export interface $DiagnosticClientCapabilities {
|
|
17
21
|
textDocument?: TextDocumentClientCapabilities & {
|
|
18
|
-
diagnostic
|
|
22
|
+
diagnostic?: DiagnosticClientCapabilities;
|
|
19
23
|
};
|
|
20
24
|
}
|
|
21
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Diagnostic options.
|
|
27
|
+
*
|
|
28
|
+
* @since 3.17.0 - proposed state
|
|
29
|
+
*/
|
|
30
|
+
export interface DiagnosticOptions extends WorkDoneProgressOptions {
|
|
22
31
|
/**
|
|
23
|
-
*
|
|
32
|
+
* An optional identifier under which the diagnostics are
|
|
33
|
+
* managed by the client.
|
|
24
34
|
*/
|
|
25
|
-
textDocument: TextDocumentIdentifier;
|
|
26
|
-
}
|
|
27
|
-
export interface DiagnosticOptions extends WorkDoneProgressOptions {
|
|
28
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;
|
|
29
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Diagnostic registration options.
|
|
50
|
+
*
|
|
51
|
+
* @since 3.17.0 - proposed state
|
|
52
|
+
*/
|
|
30
53
|
export interface DiagnosticRegistrationOptions extends TextDocumentRegistrationOptions, DiagnosticOptions, StaticRegistrationOptions {
|
|
31
54
|
}
|
|
32
55
|
export interface $DiagnosticServerCapabilities {
|
|
33
|
-
diagnosticProvider?:
|
|
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
|
+
};
|
|
34
206
|
}
|
|
35
|
-
|
|
207
|
+
/**
|
|
208
|
+
* The document diagnostic request definition.
|
|
209
|
+
*
|
|
210
|
+
* @since 3.17.0 - proposed state
|
|
211
|
+
*/
|
|
212
|
+
export declare namespace DocumentDiagnosticRequest {
|
|
36
213
|
const method: 'textDocument/diagnostic';
|
|
37
|
-
const type: ProtocolRequestType<
|
|
38
|
-
|
|
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>;
|
|
39
324
|
}
|