vscode-languageserver-protocol 3.15.0-next.2 → 3.15.0-next.6

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/License.txt CHANGED
@@ -1,11 +1,11 @@
1
- Copyright (c) Microsoft Corporation
2
-
3
- All rights reserved.
4
-
5
- MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
-
9
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
-
11
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) Microsoft Corporation
2
+
3
+ All rights reserved.
4
+
5
+ MIT License
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- # VSCode Language Server - Protocol Module
2
-
3
- [![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient)
4
- [![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient)
5
- [![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)
6
-
7
- This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application.
8
-
9
- See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol.
10
-
11
- ## History
12
-
13
- For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
14
-
15
- ## License
16
- [MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
1
+ # VSCode Language Server - Protocol Module
2
+
3
+ [![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient)
4
+ [![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient)
5
+ [![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)
6
+
7
+ This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application.
8
+
9
+ See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol.
10
+
11
+ ## History
12
+
13
+ For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
14
+
15
+ ## License
16
+ [MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
package/lib/main.d.ts CHANGED
@@ -1,146 +1,183 @@
1
- import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc';
2
- export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, };
3
- export * from 'vscode-languageserver-types';
4
- export * from './protocol';
5
- export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
6
- export declare namespace Proposed {
7
- }
8
- export interface ProtocolConnection {
9
- /**
10
- * Sends a request and returns a promise resolving to the result of the request.
11
- *
12
- * @param type The type of request to sent.
13
- * @param token An optional cancellation token.
14
- * @returns A promise resolving to the request's result.
15
- */
16
- sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Thenable<R>;
17
- /**
18
- * Sends a request and returns a promise resolving to the result of the request.
19
- *
20
- * @param type The type of request to sent.
21
- * @param params The request's parameter.
22
- * @param token An optional cancellation token.
23
- * @returns A promise resolving to the request's result.
24
- */
25
- sendRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P, token?: CancellationToken): Thenable<R>;
26
- /**
27
- * Sends a request and returns a promise resolving to the result of the request.
28
- *
29
- * @param method the request's method name.
30
- * @param token An optional cancellation token.
31
- * @returns A promise resolving to the request's result.
32
- */
33
- sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>;
34
- /**
35
- * Sends a request and returns a promise resolving to the result of the request.
36
- *
37
- * @param method the request's method name.
38
- * @param params The request's parameter.
39
- * @param token An optional cancellation token.
40
- * @returns A promise resolving to the request's result.
41
- */
42
- sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>;
43
- /**
44
- * Installs a request handler.
45
- *
46
- * @param type The request type to install the handler for.
47
- * @param handler The actual handler.
48
- */
49
- onRequest<R, E, RO>(type: RequestType0<R, E, RO>, handler: RequestHandler0<R, E>): void;
50
- /**
51
- * Installs a request handler.
52
- *
53
- * @param type The request type to install the handler for.
54
- * @param handler The actual handler.
55
- */
56
- onRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, handler: RequestHandler<P, R, E>): void;
57
- /**
58
- * Installs a request handler.
59
- *
60
- * @param methods The method name to install the handler for.
61
- * @param handler The actual handler.
62
- */
63
- onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): void;
64
- /**
65
- * Sends a notification.
66
- *
67
- * @param type the notification's type to send.
68
- */
69
- sendNotification<RO>(type: NotificationType0<RO>): void;
70
- /**
71
- * Sends a notification.
72
- *
73
- * @param type the notification's type to send.
74
- * @param params the notification's parameters.
75
- */
76
- sendNotification<P, RO>(type: NotificationType<P, RO>, params?: P): void;
77
- /**
78
- * Sends a notification.
79
- *
80
- * @param method the notification's method name.
81
- */
82
- sendNotification(method: string): void;
83
- /**
84
- * Sends a notification.
85
- *
86
- * @param method the notification's method name.
87
- * @param params the notification's parameters.
88
- */
89
- sendNotification(method: string, params: any): void;
90
- /**
91
- * Installs a notification handler.
92
- *
93
- * @param type The notification type to install the handler for.
94
- * @param handler The actual handler.
95
- */
96
- onNotification<RO>(type: NotificationType0<RO>, handler: NotificationHandler0): void;
97
- /**
98
- * Installs a notification handler.
99
- *
100
- * @param type The notification type to install the handler for.
101
- * @param handler The actual handler.
102
- */
103
- onNotification<P, RO>(type: NotificationType<P, RO>, handler: NotificationHandler<P>): void;
104
- /**
105
- * Installs a notification handler.
106
- *
107
- * @param methods The method name to install the handler for.
108
- * @param handler The actual handler.
109
- */
110
- onNotification(method: string, handler: GenericNotificationHandler): void;
111
- /**
112
- * Enables tracing mode for the connection.
113
- */
114
- trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;
115
- trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void;
116
- /**
117
- * An event emitter firing when an error occurs on the connection.
118
- */
119
- onError: Event<[Error, Message | undefined, number | undefined]>;
120
- /**
121
- * An event emitter firing when the connection got closed.
122
- */
123
- onClose: Event<void>;
124
- /**
125
- * An event emiiter firing when the connection receives a notification that is not
126
- * handled.
127
- */
128
- onUnhandledNotification: Event<NotificationMessage>;
129
- /**
130
- * An event emitter firing when the connection got disposed.
131
- */
132
- onDispose: Event<void>;
133
- /**
134
- * Actively disposes the connection.
135
- */
136
- dispose(): void;
137
- /**
138
- * Turns the connection into listening mode
139
- */
140
- listen(): void;
141
- }
142
- /**
143
- * @deprecated Use ProtocolConnection instead.
144
- */
145
- export declare type ProtocolConnetion = ProtocolConnection;
146
- export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger: Logger, strategy?: ConnectionStrategy): ProtocolConnection;
1
+ import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc';
2
+ export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, };
3
+ export * from 'vscode-languageserver-types';
4
+ export * from './protocol';
5
+ export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
6
+ import * as callHierarchy from './protocol.callHierarchy.proposed';
7
+ import * as progress from './protocol.progress.proposed';
8
+ export declare namespace Proposed {
9
+ type CallHierarchyClientCapabilities = callHierarchy.CallHierarchyClientCapabilities;
10
+ type CallHierarchyServerCapabilities = callHierarchy.CallHierarchyServerCapabilities;
11
+ namespace CallHierarchyRequest {
12
+ const type: RequestType<callHierarchy.CallHierarchyParams, callHierarchy.CallHierarchyCall[], void, import("./protocol").TextDocumentRegistrationOptions>;
13
+ type HandlerSignature = callHierarchy.CallHierarchyRequest.HandlerSignature;
14
+ }
15
+ namespace CallHierarchyDirection {
16
+ const CallsFrom: 1;
17
+ const CallsTo: 2;
18
+ }
19
+ type CallHierarchyParams = callHierarchy.CallHierarchyParams;
20
+ type CallHierarchyDirection = callHierarchy.CallHierarchyDirection;
21
+ type CallHierarchyItem = callHierarchy.CallHierarchyItem;
22
+ type CallHierarchyCall = callHierarchy.CallHierarchyCall;
23
+ type ProgressClientCapabilities = progress.ProgressClientCapabilities;
24
+ type ProgressStartParams = progress.ProgressStartParams;
25
+ namespace ProgressStartNotification {
26
+ const type: NotificationType<progress.ProgressStartParams, void>;
27
+ type HandlerSignature = progress.ProgressStartNotification.HandlerSignature;
28
+ }
29
+ type ProgressReportParams = progress.ProgressReportParams;
30
+ namespace ProgressReportNotification {
31
+ const type: NotificationType<progress.ProgressReportParams, void>;
32
+ type HandlerSignature = progress.ProgressReportNotification.HandlerSignature;
33
+ }
34
+ type ProgressDoneParams = progress.ProgressDoneParams;
35
+ namespace ProgressDoneNotification {
36
+ const type: NotificationType<progress.ProgressDoneParams, void>;
37
+ type HandlerSignature = progress.ProgressDoneNotification.HandlerSignature;
38
+ }
39
+ type ProgressCancelParams = progress.ProgressCancelParams;
40
+ namespace ProgressCancelNotification {
41
+ const type: NotificationType<progress.ProgressCancelParams, void>;
42
+ type HandlerSignature = progress.ProgressCancelNotification.HandlerSignature;
43
+ }
44
+ }
45
+ export interface ProtocolConnection {
46
+ /**
47
+ * Sends a request and returns a promise resolving to the result of the request.
48
+ *
49
+ * @param type The type of request to sent.
50
+ * @param token An optional cancellation token.
51
+ * @returns A promise resolving to the request's result.
52
+ */
53
+ sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Thenable<R>;
54
+ /**
55
+ * Sends a request and returns a promise resolving to the result of the request.
56
+ *
57
+ * @param type The type of request to sent.
58
+ * @param params The request's parameter.
59
+ * @param token An optional cancellation token.
60
+ * @returns A promise resolving to the request's result.
61
+ */
62
+ sendRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P, token?: CancellationToken): Thenable<R>;
63
+ /**
64
+ * Sends a request and returns a promise resolving to the result of the request.
65
+ *
66
+ * @param method the request's method name.
67
+ * @param token An optional cancellation token.
68
+ * @returns A promise resolving to the request's result.
69
+ */
70
+ sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>;
71
+ /**
72
+ * Sends a request and returns a promise resolving to the result of the request.
73
+ *
74
+ * @param method the request's method name.
75
+ * @param params The request's parameter.
76
+ * @param token An optional cancellation token.
77
+ * @returns A promise resolving to the request's result.
78
+ */
79
+ sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>;
80
+ /**
81
+ * Installs a request handler.
82
+ *
83
+ * @param type The request type to install the handler for.
84
+ * @param handler The actual handler.
85
+ */
86
+ onRequest<R, E, RO>(type: RequestType0<R, E, RO>, handler: RequestHandler0<R, E>): void;
87
+ /**
88
+ * Installs a request handler.
89
+ *
90
+ * @param type The request type to install the handler for.
91
+ * @param handler The actual handler.
92
+ */
93
+ onRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, handler: RequestHandler<P, R, E>): void;
94
+ /**
95
+ * Installs a request handler.
96
+ *
97
+ * @param methods The method name to install the handler for.
98
+ * @param handler The actual handler.
99
+ */
100
+ onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): void;
101
+ /**
102
+ * Sends a notification.
103
+ *
104
+ * @param type the notification's type to send.
105
+ */
106
+ sendNotification<RO>(type: NotificationType0<RO>): void;
107
+ /**
108
+ * Sends a notification.
109
+ *
110
+ * @param type the notification's type to send.
111
+ * @param params the notification's parameters.
112
+ */
113
+ sendNotification<P, RO>(type: NotificationType<P, RO>, params?: P): void;
114
+ /**
115
+ * Sends a notification.
116
+ *
117
+ * @param method the notification's method name.
118
+ */
119
+ sendNotification(method: string): void;
120
+ /**
121
+ * Sends a notification.
122
+ *
123
+ * @param method the notification's method name.
124
+ * @param params the notification's parameters.
125
+ */
126
+ sendNotification(method: string, params: any): void;
127
+ /**
128
+ * Installs a notification handler.
129
+ *
130
+ * @param type The notification type to install the handler for.
131
+ * @param handler The actual handler.
132
+ */
133
+ onNotification<RO>(type: NotificationType0<RO>, handler: NotificationHandler0): void;
134
+ /**
135
+ * Installs a notification handler.
136
+ *
137
+ * @param type The notification type to install the handler for.
138
+ * @param handler The actual handler.
139
+ */
140
+ onNotification<P, RO>(type: NotificationType<P, RO>, handler: NotificationHandler<P>): void;
141
+ /**
142
+ * Installs a notification handler.
143
+ *
144
+ * @param methods The method name to install the handler for.
145
+ * @param handler The actual handler.
146
+ */
147
+ onNotification(method: string, handler: GenericNotificationHandler): void;
148
+ /**
149
+ * Enables tracing mode for the connection.
150
+ */
151
+ trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;
152
+ trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void;
153
+ /**
154
+ * An event emitter firing when an error occurs on the connection.
155
+ */
156
+ onError: Event<[Error, Message | undefined, number | undefined]>;
157
+ /**
158
+ * An event emitter firing when the connection got closed.
159
+ */
160
+ onClose: Event<void>;
161
+ /**
162
+ * An event emiiter firing when the connection receives a notification that is not
163
+ * handled.
164
+ */
165
+ onUnhandledNotification: Event<NotificationMessage>;
166
+ /**
167
+ * An event emitter firing when the connection got disposed.
168
+ */
169
+ onDispose: Event<void>;
170
+ /**
171
+ * Actively disposes the connection.
172
+ */
173
+ dispose(): void;
174
+ /**
175
+ * Turns the connection into listening mode
176
+ */
177
+ listen(): void;
178
+ }
179
+ /**
180
+ * @deprecated Use ProtocolConnection instead.
181
+ */
182
+ export declare type ProtocolConnetion = ProtocolConnection;
183
+ export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger: Logger, strategy?: ConnectionStrategy): ProtocolConnection;
package/lib/main.js CHANGED
@@ -1,43 +1,73 @@
1
- /* --------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- * ------------------------------------------------------------------------------------------ */
5
- 'use strict';
6
- function __export(m) {
7
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
8
- }
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const vscode_jsonrpc_1 = require("vscode-jsonrpc");
11
- exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
12
- exports.ResponseError = vscode_jsonrpc_1.ResponseError;
13
- exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
14
- exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
15
- exports.Disposable = vscode_jsonrpc_1.Disposable;
16
- exports.Event = vscode_jsonrpc_1.Event;
17
- exports.Emitter = vscode_jsonrpc_1.Emitter;
18
- exports.Trace = vscode_jsonrpc_1.Trace;
19
- exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
20
- exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
21
- exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
22
- exports.RequestType = vscode_jsonrpc_1.RequestType;
23
- exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
24
- exports.NotificationType = vscode_jsonrpc_1.NotificationType;
25
- exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
26
- exports.MessageReader = vscode_jsonrpc_1.MessageReader;
27
- exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
28
- exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
29
- exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
30
- exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
31
- exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
32
- exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
33
- exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
34
- exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
35
- exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
36
- exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
37
- exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
38
- __export(require("vscode-languageserver-types"));
39
- __export(require("./protocol"));
40
- function createProtocolConnection(reader, writer, logger, strategy) {
41
- return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
42
- }
43
- exports.createProtocolConnection = createProtocolConnection;
1
+ /* --------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ * ------------------------------------------------------------------------------------------ */
5
+ 'use strict';
6
+ function __export(m) {
7
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
8
+ }
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
11
+ exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
12
+ exports.ResponseError = vscode_jsonrpc_1.ResponseError;
13
+ exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
14
+ exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
15
+ exports.Disposable = vscode_jsonrpc_1.Disposable;
16
+ exports.Event = vscode_jsonrpc_1.Event;
17
+ exports.Emitter = vscode_jsonrpc_1.Emitter;
18
+ exports.Trace = vscode_jsonrpc_1.Trace;
19
+ exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
20
+ exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
21
+ exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
22
+ exports.RequestType = vscode_jsonrpc_1.RequestType;
23
+ exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
24
+ exports.NotificationType = vscode_jsonrpc_1.NotificationType;
25
+ exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
26
+ exports.MessageReader = vscode_jsonrpc_1.MessageReader;
27
+ exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
28
+ exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
29
+ exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
30
+ exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
31
+ exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
32
+ exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
33
+ exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
34
+ exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
35
+ exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
36
+ exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
37
+ exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
38
+ __export(require("vscode-languageserver-types"));
39
+ __export(require("./protocol"));
40
+ const callHierarchy = require("./protocol.callHierarchy.proposed");
41
+ const progress = require("./protocol.progress.proposed");
42
+ var Proposed;
43
+ (function (Proposed) {
44
+ let CallHierarchyRequest;
45
+ (function (CallHierarchyRequest) {
46
+ CallHierarchyRequest.type = callHierarchy.CallHierarchyRequest.type;
47
+ })(CallHierarchyRequest = Proposed.CallHierarchyRequest || (Proposed.CallHierarchyRequest = {}));
48
+ let CallHierarchyDirection;
49
+ (function (CallHierarchyDirection) {
50
+ CallHierarchyDirection.CallsFrom = callHierarchy.CallHierarchyDirection.CallsFrom;
51
+ CallHierarchyDirection.CallsTo = callHierarchy.CallHierarchyDirection.CallsTo;
52
+ })(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {}));
53
+ let ProgressStartNotification;
54
+ (function (ProgressStartNotification) {
55
+ ProgressStartNotification.type = progress.ProgressStartNotification.type;
56
+ })(ProgressStartNotification = Proposed.ProgressStartNotification || (Proposed.ProgressStartNotification = {}));
57
+ let ProgressReportNotification;
58
+ (function (ProgressReportNotification) {
59
+ ProgressReportNotification.type = progress.ProgressReportNotification.type;
60
+ })(ProgressReportNotification = Proposed.ProgressReportNotification || (Proposed.ProgressReportNotification = {}));
61
+ let ProgressDoneNotification;
62
+ (function (ProgressDoneNotification) {
63
+ ProgressDoneNotification.type = progress.ProgressDoneNotification.type;
64
+ })(ProgressDoneNotification = Proposed.ProgressDoneNotification || (Proposed.ProgressDoneNotification = {}));
65
+ let ProgressCancelNotification;
66
+ (function (ProgressCancelNotification) {
67
+ ProgressCancelNotification.type = progress.ProgressCancelNotification.type;
68
+ })(ProgressCancelNotification = Proposed.ProgressCancelNotification || (Proposed.ProgressCancelNotification = {}));
69
+ })(Proposed = exports.Proposed || (exports.Proposed = {}));
70
+ function createProtocolConnection(reader, writer, logger, strategy) {
71
+ return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
72
+ }
73
+ exports.createProtocolConnection = createProtocolConnection;
@@ -0,0 +1,108 @@
1
+ import { RequestType, RequestHandler } from 'vscode-jsonrpc';
2
+ import { SymbolKind, Range } from 'vscode-languageserver-types';
3
+ import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol';
4
+ export interface CallHierarchyClientCapabilities {
5
+ /**
6
+ * The text document client capabilities
7
+ */
8
+ textDocument?: {
9
+ /**
10
+ * Capabilities specific to the `textDocument/callHierarchy`
11
+ */
12
+ callHierarchy?: {
13
+ /**
14
+ * Whether implementation supports dynamic registration. If this is set to `true`
15
+ * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
16
+ * return value for the corresponding server capability as well.
17
+ */
18
+ dynamicRegistration?: boolean;
19
+ };
20
+ };
21
+ }
22
+ export interface CallHierarchyServerCapabilities {
23
+ /**
24
+ * The server provides Call Hierarchy support.
25
+ */
26
+ callHierarchyProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions);
27
+ }
28
+ /**
29
+ * The parameter of a `textDocument/callHierarchy` request extends the `TextDocumentPositionParams` with the direction of calls to resolve.
30
+ */
31
+ export interface CallHierarchyParams extends TextDocumentPositionParams {
32
+ /**
33
+ * The direction of calls to provide.
34
+ */
35
+ direction: CallHierarchyDirection;
36
+ }
37
+ /**
38
+ * The direction of a call hierarchy request.
39
+ */
40
+ export declare namespace CallHierarchyDirection {
41
+ /**
42
+ * The callers
43
+ */
44
+ const CallsFrom: 1;
45
+ /**
46
+ * The callees
47
+ */
48
+ const CallsTo: 2;
49
+ }
50
+ export declare type CallHierarchyDirection = 1 | 2;
51
+ export interface CallHierarchyItem {
52
+ /**
53
+ * The name of the symbol targeted by the call hierarchy request.
54
+ */
55
+ name: string;
56
+ /**
57
+ * More detail for this symbol, e.g the signature of a function.
58
+ */
59
+ detail?: string;
60
+ /**
61
+ * The kind of this symbol.
62
+ */
63
+ kind: SymbolKind;
64
+ /**
65
+ * URI of the document containing the symbol.
66
+ */
67
+ uri: string;
68
+ /**
69
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
70
+ * like comments. This information is typically used to determine if the the clients cursor is
71
+ * inside the symbol to reveal in the symbol in the UI.
72
+ */
73
+ range: Range;
74
+ /**
75
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
76
+ * Must be contained by the the `range`.
77
+ */
78
+ selectionRange: Range;
79
+ }
80
+ /**
81
+ * The result of a `textDocument/callHierarchy` request.
82
+ */
83
+ export interface CallHierarchyCall {
84
+ /**
85
+ * The source range of the reference. The range is a sub range of the `from` symbol range.
86
+ */
87
+ range: Range;
88
+ /**
89
+ * The symbol that contains the reference.
90
+ */
91
+ from: CallHierarchyItem;
92
+ /**
93
+ * The symbol that is referenced.
94
+ */
95
+ to: CallHierarchyItem;
96
+ }
97
+ /**
98
+ * Request to provide the call hierarchy at a given text document position.
99
+ *
100
+ * The request's parameter is of type [CallHierarchyParams](#CallHierarchyParams). The response
101
+ * is of type [CallHierarchyCall[]](#CallHierarchyCall) or a Thenable that resolves to such.
102
+ *
103
+ * Evaluates the symbol defined (or referenced) at the given position, and returns all incoming or outgoing calls to the symbol(s).
104
+ */
105
+ export declare namespace CallHierarchyRequest {
106
+ const type: RequestType<CallHierarchyParams, CallHierarchyCall[], void, TextDocumentRegistrationOptions>;
107
+ type HandlerSignature = RequestHandler<CallHierarchyParams, CallHierarchyCall[] | null, void>;
108
+ }