vscode-languageserver-protocol 3.15.0-next.8 → 3.15.2

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/protocol.js CHANGED
@@ -6,6 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const Is = require("./utils/is");
8
8
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
9
+ const messages_1 = require("./messages");
9
10
  const protocol_implementation_1 = require("./protocol.implementation");
10
11
  exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
11
12
  const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
@@ -24,6 +25,10 @@ const protocol_declaration_1 = require("./protocol.declaration");
24
25
  exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
25
26
  const protocol_selectionRange_1 = require("./protocol.selectionRange");
26
27
  exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
28
+ const protocol_progress_1 = require("./protocol.progress");
29
+ exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
30
+ exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
31
+ exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
27
32
  // @ts-ignore: to avoid inlining LocatioLink as dynamic import
28
33
  let __noDynamicImport;
29
34
  /**
@@ -63,7 +68,7 @@ var DocumentSelector;
63
68
  */
64
69
  var RegistrationRequest;
65
70
  (function (RegistrationRequest) {
66
- RegistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/registerCapability');
71
+ RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
67
72
  })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
68
73
  /**
69
74
  * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
@@ -71,7 +76,7 @@ var RegistrationRequest;
71
76
  */
72
77
  var UnregistrationRequest;
73
78
  (function (UnregistrationRequest) {
74
- UnregistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/unregisterCapability');
79
+ UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
75
80
  })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
76
81
  var ResourceOperationKind;
77
82
  (function (ResourceOperationKind) {
@@ -108,32 +113,10 @@ var FailureHandlingKind;
108
113
  FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
109
114
  /**
110
115
  * The client tries to undo the operations already executed. But there is no
111
- * guaruntee that this is succeeding.
116
+ * guarantee that this is succeeding.
112
117
  */
113
118
  FailureHandlingKind.Undo = 'undo';
114
119
  })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
115
- /**
116
- * Defines how the host (editor) should sync
117
- * document changes to the language server.
118
- */
119
- var TextDocumentSyncKind;
120
- (function (TextDocumentSyncKind) {
121
- /**
122
- * Documents should not be synced at all.
123
- */
124
- TextDocumentSyncKind.None = 0;
125
- /**
126
- * Documents are synced by always sending the full content
127
- * of the document.
128
- */
129
- TextDocumentSyncKind.Full = 1;
130
- /**
131
- * Documents are synced by sending the full content on open.
132
- * After that only incremental updates to the document are
133
- * send.
134
- */
135
- TextDocumentSyncKind.Incremental = 2;
136
- })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
137
120
  /**
138
121
  * The StaticRegistrationOptions namespace provides helper functions to work with
139
122
  * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
@@ -184,7 +167,7 @@ var WorkDoneProgressOptions;
184
167
  */
185
168
  var InitializeRequest;
186
169
  (function (InitializeRequest) {
187
- InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');
170
+ InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
188
171
  })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
189
172
  /**
190
173
  * Known error codes for an `InitializeError`;
@@ -205,7 +188,7 @@ var InitializeError;
205
188
  */
206
189
  var InitializedNotification;
207
190
  (function (InitializedNotification) {
208
- InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');
191
+ InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
209
192
  })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
210
193
  //---- Shutdown Method ----
211
194
  /**
@@ -216,7 +199,7 @@ var InitializedNotification;
216
199
  */
217
200
  var ShutdownRequest;
218
201
  (function (ShutdownRequest) {
219
- ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');
202
+ ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
220
203
  })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
221
204
  //---- Exit Notification ----
222
205
  /**
@@ -225,9 +208,8 @@ var ShutdownRequest;
225
208
  */
226
209
  var ExitNotification;
227
210
  (function (ExitNotification) {
228
- ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');
211
+ ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
229
212
  })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
230
- //---- Configuration notification ----
231
213
  /**
232
214
  * The configuration change notification is sent from the client to the server
233
215
  * when the client's configuration has changed. The notification contains
@@ -235,7 +217,7 @@ var ExitNotification;
235
217
  */
236
218
  var DidChangeConfigurationNotification;
237
219
  (function (DidChangeConfigurationNotification) {
238
- DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');
220
+ DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
239
221
  })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
240
222
  //---- Message show and log notifications ----
241
223
  /**
@@ -266,7 +248,7 @@ var MessageType;
266
248
  */
267
249
  var ShowMessageNotification;
268
250
  (function (ShowMessageNotification) {
269
- ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');
251
+ ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
270
252
  })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
271
253
  /**
272
254
  * The show message request is sent from the server to the client to show a message
@@ -274,7 +256,7 @@ var ShowMessageNotification;
274
256
  */
275
257
  var ShowMessageRequest;
276
258
  (function (ShowMessageRequest) {
277
- ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');
259
+ ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
278
260
  })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
279
261
  /**
280
262
  * The log message notification is sent from the server to the client to ask
@@ -282,7 +264,7 @@ var ShowMessageRequest;
282
264
  */
283
265
  var LogMessageNotification;
284
266
  (function (LogMessageNotification) {
285
- LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');
267
+ LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
286
268
  })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
287
269
  //---- Telemetry notification
288
270
  /**
@@ -291,8 +273,30 @@ var LogMessageNotification;
291
273
  */
292
274
  var TelemetryEventNotification;
293
275
  (function (TelemetryEventNotification) {
294
- TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');
276
+ TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
295
277
  })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
278
+ /**
279
+ * Defines how the host (editor) should sync
280
+ * document changes to the language server.
281
+ */
282
+ var TextDocumentSyncKind;
283
+ (function (TextDocumentSyncKind) {
284
+ /**
285
+ * Documents should not be synced at all.
286
+ */
287
+ TextDocumentSyncKind.None = 0;
288
+ /**
289
+ * Documents are synced by always sending the full content
290
+ * of the document.
291
+ */
292
+ TextDocumentSyncKind.Full = 1;
293
+ /**
294
+ * Documents are synced by sending the full content on open.
295
+ * After that only incremental updates to the document are
296
+ * send.
297
+ */
298
+ TextDocumentSyncKind.Incremental = 2;
299
+ })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
296
300
  /**
297
301
  * The document open notification is sent from the client to the server to signal
298
302
  * newly opened text documents. The document's truth is now managed by the client
@@ -305,7 +309,8 @@ var TelemetryEventNotification;
305
309
  */
306
310
  var DidOpenTextDocumentNotification;
307
311
  (function (DidOpenTextDocumentNotification) {
308
- DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');
312
+ DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
313
+ DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
309
314
  })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
310
315
  /**
311
316
  * The document change notification is sent from the client to the server to signal
@@ -313,7 +318,8 @@ var DidOpenTextDocumentNotification;
313
318
  */
314
319
  var DidChangeTextDocumentNotification;
315
320
  (function (DidChangeTextDocumentNotification) {
316
- DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');
321
+ DidChangeTextDocumentNotification.method = 'textDocument/didChange';
322
+ DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
317
323
  })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
318
324
  /**
319
325
  * The document close notification is sent from the client to the server when
@@ -326,7 +332,8 @@ var DidChangeTextDocumentNotification;
326
332
  */
327
333
  var DidCloseTextDocumentNotification;
328
334
  (function (DidCloseTextDocumentNotification) {
329
- DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');
335
+ DidCloseTextDocumentNotification.method = 'textDocument/didClose';
336
+ DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
330
337
  })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
331
338
  /**
332
339
  * The document save notification is sent from the client to the server when
@@ -334,15 +341,36 @@ var DidCloseTextDocumentNotification;
334
341
  */
335
342
  var DidSaveTextDocumentNotification;
336
343
  (function (DidSaveTextDocumentNotification) {
337
- DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');
344
+ DidSaveTextDocumentNotification.method = 'textDocument/didSave';
345
+ DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
338
346
  })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
347
+ /**
348
+ * Represents reasons why a text document is saved.
349
+ */
350
+ var TextDocumentSaveReason;
351
+ (function (TextDocumentSaveReason) {
352
+ /**
353
+ * Manually triggered, e.g. by the user pressing save, by starting debugging,
354
+ * or by an API call.
355
+ */
356
+ TextDocumentSaveReason.Manual = 1;
357
+ /**
358
+ * Automatic after a delay.
359
+ */
360
+ TextDocumentSaveReason.AfterDelay = 2;
361
+ /**
362
+ * When the editor lost focus.
363
+ */
364
+ TextDocumentSaveReason.FocusOut = 3;
365
+ })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
339
366
  /**
340
367
  * A document will save notification is sent from the client to the server before
341
368
  * the document is actually saved.
342
369
  */
343
370
  var WillSaveTextDocumentNotification;
344
371
  (function (WillSaveTextDocumentNotification) {
345
- WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');
372
+ WillSaveTextDocumentNotification.method = 'textDocument/willSave';
373
+ WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
346
374
  })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
347
375
  /**
348
376
  * A document will save request is sent from the client to the server before
@@ -354,16 +382,16 @@ var WillSaveTextDocumentNotification;
354
382
  */
355
383
  var WillSaveTextDocumentWaitUntilRequest;
356
384
  (function (WillSaveTextDocumentWaitUntilRequest) {
357
- WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');
385
+ WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
386
+ WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
358
387
  })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
359
- //---- File eventing ----
360
388
  /**
361
389
  * The watched files notification is sent from the client to the server when
362
390
  * the client detects changes to file watched by the language client.
363
391
  */
364
392
  var DidChangeWatchedFilesNotification;
365
393
  (function (DidChangeWatchedFilesNotification) {
366
- DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');
394
+ DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
367
395
  })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
368
396
  /**
369
397
  * The file event type
@@ -398,16 +426,14 @@ var WatchKind;
398
426
  */
399
427
  WatchKind.Delete = 4;
400
428
  })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
401
- //---- Diagnostic notification ----
402
429
  /**
403
430
  * Diagnostics notification are sent from the server to the client to signal
404
431
  * results of validation runs.
405
432
  */
406
433
  var PublishDiagnosticsNotification;
407
434
  (function (PublishDiagnosticsNotification) {
408
- PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');
435
+ PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
409
436
  })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
410
- //---- Completion Support --------------------------
411
437
  /**
412
438
  * How a completion was triggered
413
439
  */
@@ -441,7 +467,9 @@ var CompletionTriggerKind;
441
467
  */
442
468
  var CompletionRequest;
443
469
  (function (CompletionRequest) {
444
- CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion');
470
+ CompletionRequest.method = 'textDocument/completion';
471
+ CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
472
+ /** @deprecated Use CompletionRequest.type */
445
473
  CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
446
474
  })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
447
475
  /**
@@ -451,7 +479,8 @@ var CompletionRequest;
451
479
  */
452
480
  var CompletionResolveRequest;
453
481
  (function (CompletionResolveRequest) {
454
- CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');
482
+ CompletionResolveRequest.method = 'completionItem/resolve';
483
+ CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
455
484
  })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
456
485
  /**
457
486
  * Request to request hover information at a given text document position. The request's
@@ -460,11 +489,33 @@ var CompletionResolveRequest;
460
489
  */
461
490
  var HoverRequest;
462
491
  (function (HoverRequest) {
463
- HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');
492
+ HoverRequest.method = 'textDocument/hover';
493
+ HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
464
494
  })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
495
+ /**
496
+ * How a signature help was triggered.
497
+ *
498
+ * @since 3.15.0
499
+ */
500
+ var SignatureHelpTriggerKind;
501
+ (function (SignatureHelpTriggerKind) {
502
+ /**
503
+ * Signature help was invoked manually by the user or by a command.
504
+ */
505
+ SignatureHelpTriggerKind.Invoked = 1;
506
+ /**
507
+ * Signature help was triggered by a trigger character.
508
+ */
509
+ SignatureHelpTriggerKind.TriggerCharacter = 2;
510
+ /**
511
+ * Signature help was triggered by the cursor moving or by the document content changing.
512
+ */
513
+ SignatureHelpTriggerKind.ContentChange = 3;
514
+ })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
465
515
  var SignatureHelpRequest;
466
516
  (function (SignatureHelpRequest) {
467
- SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');
517
+ SignatureHelpRequest.method = 'textDocument/signatureHelp';
518
+ SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
468
519
  })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
469
520
  /**
470
521
  * A request to resolve the definition location of a symbol at a given text
@@ -475,7 +526,9 @@ var SignatureHelpRequest;
475
526
  */
476
527
  var DefinitionRequest;
477
528
  (function (DefinitionRequest) {
478
- DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition');
529
+ DefinitionRequest.method = 'textDocument/definition';
530
+ DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
531
+ /** @deprecated Use DefinitionRequest.type */
479
532
  DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
480
533
  })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
481
534
  /**
@@ -486,7 +539,9 @@ var DefinitionRequest;
486
539
  */
487
540
  var ReferencesRequest;
488
541
  (function (ReferencesRequest) {
489
- ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references');
542
+ ReferencesRequest.method = 'textDocument/references';
543
+ ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
544
+ /** @deprecated Use ReferencesRequest.type */
490
545
  ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
491
546
  })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
492
547
  /**
@@ -497,7 +552,9 @@ var ReferencesRequest;
497
552
  */
498
553
  var DocumentHighlightRequest;
499
554
  (function (DocumentHighlightRequest) {
500
- DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight');
555
+ DocumentHighlightRequest.method = 'textDocument/documentHighlight';
556
+ DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
557
+ /** @deprecated Use DocumentHighlightRequest.type */
501
558
  DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
502
559
  })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
503
560
  /**
@@ -508,9 +565,21 @@ var DocumentHighlightRequest;
508
565
  */
509
566
  var DocumentSymbolRequest;
510
567
  (function (DocumentSymbolRequest) {
511
- DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol');
568
+ DocumentSymbolRequest.method = 'textDocument/documentSymbol';
569
+ DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
570
+ /** @deprecated Use DocumentSymbolRequest.type */
512
571
  DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
513
572
  })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
573
+ /**
574
+ * A request to provide commands for the given text document and range.
575
+ */
576
+ var CodeActionRequest;
577
+ (function (CodeActionRequest) {
578
+ CodeActionRequest.method = 'textDocument/codeAction';
579
+ CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
580
+ /** @deprecated Use CodeActionRequest.type */
581
+ CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
582
+ })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
514
583
  /**
515
584
  * A request to list project-wide symbols matching the query string given
516
585
  * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
@@ -519,23 +588,18 @@ var DocumentSymbolRequest;
519
588
  */
520
589
  var WorkspaceSymbolRequest;
521
590
  (function (WorkspaceSymbolRequest) {
522
- WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol');
591
+ WorkspaceSymbolRequest.method = 'workspace/symbol';
592
+ WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
593
+ /** @deprecated Use WorkspaceSymbolRequest.type */
523
594
  WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
524
595
  })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
525
- /**
526
- * A request to provide commands for the given text document and range.
527
- */
528
- var CodeActionRequest;
529
- (function (CodeActionRequest) {
530
- CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');
531
- CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
532
- })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
533
596
  /**
534
597
  * A request to provide code lens for the given text document.
535
598
  */
536
599
  var CodeLensRequest;
537
600
  (function (CodeLensRequest) {
538
- CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');
601
+ CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
602
+ /** @deprecated Use CodeLensRequest.type */
539
603
  CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
540
604
  })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
541
605
  /**
@@ -543,72 +607,79 @@ var CodeLensRequest;
543
607
  */
544
608
  var CodeLensResolveRequest;
545
609
  (function (CodeLensResolveRequest) {
546
- CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');
610
+ CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
547
611
  })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
612
+ /**
613
+ * A request to provide document links
614
+ */
615
+ var DocumentLinkRequest;
616
+ (function (DocumentLinkRequest) {
617
+ DocumentLinkRequest.method = 'textDocument/documentLink';
618
+ DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
619
+ /** @deprecated Use DocumentLinkRequest.type */
620
+ DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
621
+ })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
622
+ /**
623
+ * Request to resolve additional information for a given document link. The request's
624
+ * parameter is of type [DocumentLink](#DocumentLink) the response
625
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
626
+ */
627
+ var DocumentLinkResolveRequest;
628
+ (function (DocumentLinkResolveRequest) {
629
+ DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
630
+ })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
548
631
  /**
549
632
  * A request to to format a whole document.
550
633
  */
551
634
  var DocumentFormattingRequest;
552
635
  (function (DocumentFormattingRequest) {
553
- DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');
636
+ DocumentFormattingRequest.method = 'textDocument/formatting';
637
+ DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
554
638
  })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
555
639
  /**
556
640
  * A request to to format a range in a document.
557
641
  */
558
642
  var DocumentRangeFormattingRequest;
559
643
  (function (DocumentRangeFormattingRequest) {
560
- DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');
644
+ DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
645
+ DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
561
646
  })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
562
647
  /**
563
648
  * A request to format a document on type.
564
649
  */
565
650
  var DocumentOnTypeFormattingRequest;
566
651
  (function (DocumentOnTypeFormattingRequest) {
567
- DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');
652
+ DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
653
+ DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
568
654
  })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
569
655
  /**
570
656
  * A request to rename a symbol.
571
657
  */
572
658
  var RenameRequest;
573
659
  (function (RenameRequest) {
574
- RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');
660
+ RenameRequest.method = 'textDocument/rename';
661
+ RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
575
662
  })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
576
663
  /**
577
664
  * A request to test and perform the setup necessary for a rename.
578
665
  */
579
666
  var PrepareRenameRequest;
580
667
  (function (PrepareRenameRequest) {
581
- PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');
668
+ PrepareRenameRequest.method = 'textDocument/prepareRename';
669
+ PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
582
670
  })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
583
- /**
584
- * A request to provide document links
585
- */
586
- var DocumentLinkRequest;
587
- (function (DocumentLinkRequest) {
588
- DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');
589
- DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
590
- })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
591
- /**
592
- * Request to resolve additional information for a given document link. The request's
593
- * parameter is of type [DocumentLink](#DocumentLink) the response
594
- * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
595
- */
596
- var DocumentLinkResolveRequest;
597
- (function (DocumentLinkResolveRequest) {
598
- DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');
599
- })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
600
671
  /**
601
672
  * A request send from the client to the server to execute a command. The request might return
602
673
  * a workspace edit which the client will apply to the workspace.
603
674
  */
604
675
  var ExecuteCommandRequest;
605
676
  (function (ExecuteCommandRequest) {
606
- ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');
677
+ ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
607
678
  })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
608
679
  /**
609
680
  * A request sent from the server to the client to modified certain resources.
610
681
  */
611
682
  var ApplyWorkspaceEditRequest;
612
683
  (function (ApplyWorkspaceEditRequest) {
613
- ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');
684
+ ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
614
685
  })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
@@ -1,11 +1,15 @@
1
- import { NotificationType, NotificationHandler, RequestType, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
1
+ import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
2
+ import { ProtocolRequestType, ProtocolNotificationType } from './messages';
2
3
  export interface WorkDoneProgressClientCapabilities {
3
4
  /**
4
5
  * Window specific client capabilities.
5
6
  */
6
7
  window?: {
7
8
  /**
8
- * Whether client supports handling progress notifications.
9
+ * Whether client supports handling progress notifications. If set servers are allowed to
10
+ * report in `workDoneProgress` property in the request specific server capabilities.
11
+ *
12
+ * Since 3.15.0
9
13
  */
10
14
  workDoneProgress?: boolean;
11
15
  };
@@ -71,8 +75,8 @@ export interface WorkDoneProgressReport {
71
75
  */
72
76
  percentage?: number;
73
77
  }
74
- export interface WorkDoneProgressDone {
75
- kind: 'done';
78
+ export interface WorkDoneProgressEnd {
79
+ kind: 'end';
76
80
  /**
77
81
  * Optional, a final message indicating to for example indicate the outcome
78
82
  * of the operation.
@@ -80,7 +84,7 @@ export interface WorkDoneProgressDone {
80
84
  message?: string;
81
85
  }
82
86
  export declare namespace WorkDoneProgress {
83
- const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressDone>;
87
+ const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd>;
84
88
  }
85
89
  export interface WorkDoneProgressCreateParams {
86
90
  /**
@@ -93,7 +97,7 @@ export interface WorkDoneProgressCreateParams {
93
97
  * reporting from the server.
94
98
  */
95
99
  export declare namespace WorkDoneProgressCreateRequest {
96
- const type: RequestType<WorkDoneProgressCreateParams, void, void, void>;
100
+ const type: ProtocolRequestType<WorkDoneProgressCreateParams, void, never, void, void>;
97
101
  type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
98
102
  }
99
103
  export interface WorkDoneProgressCancelParams {
@@ -107,6 +111,6 @@ export interface WorkDoneProgressCancelParams {
107
111
  * initiated on the server side.
108
112
  */
109
113
  export declare namespace WorkDoneProgressCancelNotification {
110
- const type: NotificationType<WorkDoneProgressCancelParams, void>;
114
+ const type: ProtocolNotificationType<WorkDoneProgressCancelParams, void>;
111
115
  type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>;
112
116
  }
@@ -5,6 +5,7 @@
5
5
  'use strict';
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
8
+ const messages_1 = require("./messages");
8
9
  var WorkDoneProgress;
9
10
  (function (WorkDoneProgress) {
10
11
  WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
@@ -15,7 +16,7 @@ var WorkDoneProgress;
15
16
  */
16
17
  var WorkDoneProgressCreateRequest;
17
18
  (function (WorkDoneProgressCreateRequest) {
18
- WorkDoneProgressCreateRequest.type = new vscode_jsonrpc_1.RequestType('window/workDoneProgress/create');
19
+ WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
19
20
  })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
20
21
  /**
21
22
  * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
@@ -23,5 +24,5 @@ var WorkDoneProgressCreateRequest;
23
24
  */
24
25
  var WorkDoneProgressCancelNotification;
25
26
  (function (WorkDoneProgressCancelNotification) {
26
- WorkDoneProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/workDoneProgress/cancel');
27
+ WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
27
28
  })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
@@ -1,33 +1,18 @@
1
- import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
2
  import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType } from './messages';
3
4
  import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol';
4
5
  export interface SelectionRangeClientCapabilities {
5
6
  /**
6
- * The text document client capabilities
7
+ * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
8
+ * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
9
+ * capability as well.
7
10
  */
8
- textDocument?: {
9
- /**
10
- * Capabilities specific to `textDocument/selectionRange` requests
11
- */
12
- selectionRange?: {
13
- /**
14
- * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
15
- * the client supports the new `(SelectionRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`
16
- * return value for the corresponding server capability as well.
17
- */
18
- dynamicRegistration?: boolean;
19
- };
20
- };
11
+ dynamicRegistration?: boolean;
21
12
  }
22
13
  export interface SelectionRangeOptions extends WorkDoneProgressOptions {
23
14
  }
24
- export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions {
25
- }
26
- export interface SelectionRangeServerCapabilities {
27
- /**
28
- * The server provides selection range support.
29
- */
30
- selectionRangeProvider?: boolean | SelectionRangeOptions | (SelectionRangeRegistrationOptions & StaticRegistrationOptions);
15
+ export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
31
16
  }
32
17
  /**
33
18
  * A parameter literal used in selection range requests.
@@ -49,7 +34,9 @@ export interface SelectionRangeParams extends WorkDoneProgressParams, PartialRes
49
34
  * that resolves to such.
50
35
  */
51
36
  export declare namespace SelectionRangeRequest {
52
- const type: RequestType<SelectionRangeParams, SelectionRange[] | null, any, SelectionRangeRegistrationOptions>;
37
+ const method: 'textDocument/selectionRange';
38
+ const type: ProtocolRequestType<SelectionRangeParams, SelectionRange[] | null, SelectionRange[], any, SelectionRangeRegistrationOptions>;
39
+ /** @deprecated Use SelectionRangeRequest.type */
53
40
  const resultType: ProgressType<SelectionRange[]>;
54
41
  type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
55
42
  }