vscode-languageserver-protocol 3.15.0-next.9 → 3.15.3

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.
Files changed (34) hide show
  1. package/.eslintignore +1 -0
  2. package/lib/main.d.ts +53 -31
  3. package/lib/main.js +34 -23
  4. package/lib/messages.d.ts +15 -0
  5. package/lib/messages.js +31 -0
  6. package/lib/protocol.callHierarchy.proposed.d.ts +133 -70
  7. package/lib/protocol.callHierarchy.proposed.js +26 -22
  8. package/lib/protocol.colorProvider.d.ts +6 -7
  9. package/lib/protocol.colorProvider.js +5 -2
  10. package/lib/protocol.configuration.d.ts +3 -2
  11. package/lib/protocol.configuration.js +2 -2
  12. package/lib/protocol.d.ts +149 -54
  13. package/lib/protocol.declaration.d.ts +6 -3
  14. package/lib/protocol.declaration.js +4 -1
  15. package/lib/protocol.foldingRange.d.ts +5 -2
  16. package/lib/protocol.foldingRange.js +4 -1
  17. package/lib/protocol.implementation.d.ts +6 -3
  18. package/lib/protocol.implementation.js +4 -1
  19. package/lib/protocol.js +96 -41
  20. package/lib/{protocol.progress.proposed.d.ts → protocol.progress.d.ts} +4 -3
  21. package/lib/{protocol.progress.proposed.js → protocol.progress.js} +3 -2
  22. package/lib/protocol.selectionRange.d.ts +5 -2
  23. package/lib/protocol.selectionRange.js +4 -1
  24. package/lib/protocol.sematicTokens.proposed.d.ts +240 -0
  25. package/lib/protocol.sematicTokens.proposed.js +93 -0
  26. package/lib/protocol.typeDefinition.d.ts +6 -3
  27. package/lib/protocol.typeDefinition.js +4 -1
  28. package/lib/protocol.workspaceFolders.d.ts +5 -4
  29. package/lib/protocol.workspaceFolders.js +3 -3
  30. package/lib/utils/is.d.ts +0 -1
  31. package/lib/utils/is.js +0 -4
  32. package/package.json +3 -3
  33. package/.eslintrc.json +0 -6
  34. package/vscode-languageserver-protocol.lsif +0 -18295
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,7 +113,7 @@ 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 = {}));
@@ -162,7 +167,7 @@ var WorkDoneProgressOptions;
162
167
  */
163
168
  var InitializeRequest;
164
169
  (function (InitializeRequest) {
165
- InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');
170
+ InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
166
171
  })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
167
172
  /**
168
173
  * Known error codes for an `InitializeError`;
@@ -183,7 +188,7 @@ var InitializeError;
183
188
  */
184
189
  var InitializedNotification;
185
190
  (function (InitializedNotification) {
186
- InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');
191
+ InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
187
192
  })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
188
193
  //---- Shutdown Method ----
189
194
  /**
@@ -194,7 +199,7 @@ var InitializedNotification;
194
199
  */
195
200
  var ShutdownRequest;
196
201
  (function (ShutdownRequest) {
197
- ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');
202
+ ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
198
203
  })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
199
204
  //---- Exit Notification ----
200
205
  /**
@@ -203,7 +208,7 @@ var ShutdownRequest;
203
208
  */
204
209
  var ExitNotification;
205
210
  (function (ExitNotification) {
206
- ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');
211
+ ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
207
212
  })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
208
213
  /**
209
214
  * The configuration change notification is sent from the client to the server
@@ -212,7 +217,7 @@ var ExitNotification;
212
217
  */
213
218
  var DidChangeConfigurationNotification;
214
219
  (function (DidChangeConfigurationNotification) {
215
- DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');
220
+ DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
216
221
  })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
217
222
  //---- Message show and log notifications ----
218
223
  /**
@@ -243,7 +248,7 @@ var MessageType;
243
248
  */
244
249
  var ShowMessageNotification;
245
250
  (function (ShowMessageNotification) {
246
- ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');
251
+ ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
247
252
  })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
248
253
  /**
249
254
  * The show message request is sent from the server to the client to show a message
@@ -251,7 +256,7 @@ var ShowMessageNotification;
251
256
  */
252
257
  var ShowMessageRequest;
253
258
  (function (ShowMessageRequest) {
254
- ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');
259
+ ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
255
260
  })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
256
261
  /**
257
262
  * The log message notification is sent from the server to the client to ask
@@ -259,7 +264,7 @@ var ShowMessageRequest;
259
264
  */
260
265
  var LogMessageNotification;
261
266
  (function (LogMessageNotification) {
262
- LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');
267
+ LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
263
268
  })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
264
269
  //---- Telemetry notification
265
270
  /**
@@ -268,7 +273,7 @@ var LogMessageNotification;
268
273
  */
269
274
  var TelemetryEventNotification;
270
275
  (function (TelemetryEventNotification) {
271
- TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');
276
+ TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
272
277
  })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
273
278
  /**
274
279
  * Defines how the host (editor) should sync
@@ -304,7 +309,8 @@ var TextDocumentSyncKind;
304
309
  */
305
310
  var DidOpenTextDocumentNotification;
306
311
  (function (DidOpenTextDocumentNotification) {
307
- DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');
312
+ DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
313
+ DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
308
314
  })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
309
315
  /**
310
316
  * The document change notification is sent from the client to the server to signal
@@ -312,7 +318,8 @@ var DidOpenTextDocumentNotification;
312
318
  */
313
319
  var DidChangeTextDocumentNotification;
314
320
  (function (DidChangeTextDocumentNotification) {
315
- DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');
321
+ DidChangeTextDocumentNotification.method = 'textDocument/didChange';
322
+ DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
316
323
  })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
317
324
  /**
318
325
  * The document close notification is sent from the client to the server when
@@ -325,7 +332,8 @@ var DidChangeTextDocumentNotification;
325
332
  */
326
333
  var DidCloseTextDocumentNotification;
327
334
  (function (DidCloseTextDocumentNotification) {
328
- DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');
335
+ DidCloseTextDocumentNotification.method = 'textDocument/didClose';
336
+ DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
329
337
  })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
330
338
  /**
331
339
  * The document save notification is sent from the client to the server when
@@ -333,15 +341,36 @@ var DidCloseTextDocumentNotification;
333
341
  */
334
342
  var DidSaveTextDocumentNotification;
335
343
  (function (DidSaveTextDocumentNotification) {
336
- DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');
344
+ DidSaveTextDocumentNotification.method = 'textDocument/didSave';
345
+ DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
337
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 = {}));
338
366
  /**
339
367
  * A document will save notification is sent from the client to the server before
340
368
  * the document is actually saved.
341
369
  */
342
370
  var WillSaveTextDocumentNotification;
343
371
  (function (WillSaveTextDocumentNotification) {
344
- WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');
372
+ WillSaveTextDocumentNotification.method = 'textDocument/willSave';
373
+ WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
345
374
  })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
346
375
  /**
347
376
  * A document will save request is sent from the client to the server before
@@ -353,7 +382,8 @@ var WillSaveTextDocumentNotification;
353
382
  */
354
383
  var WillSaveTextDocumentWaitUntilRequest;
355
384
  (function (WillSaveTextDocumentWaitUntilRequest) {
356
- WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');
385
+ WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
386
+ WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
357
387
  })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
358
388
  /**
359
389
  * The watched files notification is sent from the client to the server when
@@ -361,7 +391,7 @@ var WillSaveTextDocumentWaitUntilRequest;
361
391
  */
362
392
  var DidChangeWatchedFilesNotification;
363
393
  (function (DidChangeWatchedFilesNotification) {
364
- DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');
394
+ DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
365
395
  })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
366
396
  /**
367
397
  * The file event type
@@ -402,7 +432,7 @@ var WatchKind;
402
432
  */
403
433
  var PublishDiagnosticsNotification;
404
434
  (function (PublishDiagnosticsNotification) {
405
- PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');
435
+ PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
406
436
  })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
407
437
  /**
408
438
  * How a completion was triggered
@@ -437,7 +467,9 @@ var CompletionTriggerKind;
437
467
  */
438
468
  var CompletionRequest;
439
469
  (function (CompletionRequest) {
440
- 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 */
441
473
  CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
442
474
  })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
443
475
  /**
@@ -447,7 +479,8 @@ var CompletionRequest;
447
479
  */
448
480
  var CompletionResolveRequest;
449
481
  (function (CompletionResolveRequest) {
450
- CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');
482
+ CompletionResolveRequest.method = 'completionItem/resolve';
483
+ CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
451
484
  })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
452
485
  /**
453
486
  * Request to request hover information at a given text document position. The request's
@@ -456,7 +489,8 @@ var CompletionResolveRequest;
456
489
  */
457
490
  var HoverRequest;
458
491
  (function (HoverRequest) {
459
- HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');
492
+ HoverRequest.method = 'textDocument/hover';
493
+ HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
460
494
  })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
461
495
  /**
462
496
  * How a signature help was triggered.
@@ -480,7 +514,8 @@ var SignatureHelpTriggerKind;
480
514
  })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
481
515
  var SignatureHelpRequest;
482
516
  (function (SignatureHelpRequest) {
483
- SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');
517
+ SignatureHelpRequest.method = 'textDocument/signatureHelp';
518
+ SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
484
519
  })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
485
520
  /**
486
521
  * A request to resolve the definition location of a symbol at a given text
@@ -491,7 +526,9 @@ var SignatureHelpRequest;
491
526
  */
492
527
  var DefinitionRequest;
493
528
  (function (DefinitionRequest) {
494
- 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 */
495
532
  DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
496
533
  })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
497
534
  /**
@@ -502,7 +539,9 @@ var DefinitionRequest;
502
539
  */
503
540
  var ReferencesRequest;
504
541
  (function (ReferencesRequest) {
505
- 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 */
506
545
  ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
507
546
  })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
508
547
  /**
@@ -513,7 +552,9 @@ var ReferencesRequest;
513
552
  */
514
553
  var DocumentHighlightRequest;
515
554
  (function (DocumentHighlightRequest) {
516
- 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 */
517
558
  DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
518
559
  })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
519
560
  /**
@@ -524,7 +565,9 @@ var DocumentHighlightRequest;
524
565
  */
525
566
  var DocumentSymbolRequest;
526
567
  (function (DocumentSymbolRequest) {
527
- 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 */
528
571
  DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
529
572
  })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
530
573
  /**
@@ -532,7 +575,9 @@ var DocumentSymbolRequest;
532
575
  */
533
576
  var CodeActionRequest;
534
577
  (function (CodeActionRequest) {
535
- CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');
578
+ CodeActionRequest.method = 'textDocument/codeAction';
579
+ CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
580
+ /** @deprecated Use CodeActionRequest.type */
536
581
  CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
537
582
  })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
538
583
  /**
@@ -543,7 +588,9 @@ var CodeActionRequest;
543
588
  */
544
589
  var WorkspaceSymbolRequest;
545
590
  (function (WorkspaceSymbolRequest) {
546
- 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 */
547
594
  WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
548
595
  })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
549
596
  /**
@@ -551,7 +598,8 @@ var WorkspaceSymbolRequest;
551
598
  */
552
599
  var CodeLensRequest;
553
600
  (function (CodeLensRequest) {
554
- CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');
601
+ CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
602
+ /** @deprecated Use CodeLensRequest.type */
555
603
  CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
556
604
  })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
557
605
  /**
@@ -559,14 +607,16 @@ var CodeLensRequest;
559
607
  */
560
608
  var CodeLensResolveRequest;
561
609
  (function (CodeLensResolveRequest) {
562
- CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');
610
+ CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
563
611
  })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
564
612
  /**
565
613
  * A request to provide document links
566
614
  */
567
615
  var DocumentLinkRequest;
568
616
  (function (DocumentLinkRequest) {
569
- DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');
617
+ DocumentLinkRequest.method = 'textDocument/documentLink';
618
+ DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
619
+ /** @deprecated Use DocumentLinkRequest.type */
570
620
  DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
571
621
  })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
572
622
  /**
@@ -576,42 +626,47 @@ var DocumentLinkRequest;
576
626
  */
577
627
  var DocumentLinkResolveRequest;
578
628
  (function (DocumentLinkResolveRequest) {
579
- DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');
629
+ DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
580
630
  })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
581
631
  /**
582
632
  * A request to to format a whole document.
583
633
  */
584
634
  var DocumentFormattingRequest;
585
635
  (function (DocumentFormattingRequest) {
586
- DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');
636
+ DocumentFormattingRequest.method = 'textDocument/formatting';
637
+ DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
587
638
  })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
588
639
  /**
589
640
  * A request to to format a range in a document.
590
641
  */
591
642
  var DocumentRangeFormattingRequest;
592
643
  (function (DocumentRangeFormattingRequest) {
593
- DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');
644
+ DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
645
+ DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
594
646
  })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
595
647
  /**
596
648
  * A request to format a document on type.
597
649
  */
598
650
  var DocumentOnTypeFormattingRequest;
599
651
  (function (DocumentOnTypeFormattingRequest) {
600
- DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');
652
+ DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
653
+ DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
601
654
  })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
602
655
  /**
603
656
  * A request to rename a symbol.
604
657
  */
605
658
  var RenameRequest;
606
659
  (function (RenameRequest) {
607
- RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');
660
+ RenameRequest.method = 'textDocument/rename';
661
+ RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
608
662
  })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
609
663
  /**
610
664
  * A request to test and perform the setup necessary for a rename.
611
665
  */
612
666
  var PrepareRenameRequest;
613
667
  (function (PrepareRenameRequest) {
614
- PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');
668
+ PrepareRenameRequest.method = 'textDocument/prepareRename';
669
+ PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
615
670
  })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
616
671
  /**
617
672
  * A request send from the client to the server to execute a command. The request might return
@@ -619,12 +674,12 @@ var PrepareRenameRequest;
619
674
  */
620
675
  var ExecuteCommandRequest;
621
676
  (function (ExecuteCommandRequest) {
622
- ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');
677
+ ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
623
678
  })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
624
679
  /**
625
680
  * A request sent from the server to the client to modified certain resources.
626
681
  */
627
682
  var ApplyWorkspaceEditRequest;
628
683
  (function (ApplyWorkspaceEditRequest) {
629
- ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');
684
+ ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
630
685
  })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
@@ -1,4 +1,5 @@
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.
@@ -96,7 +97,7 @@ export interface WorkDoneProgressCreateParams {
96
97
  * reporting from the server.
97
98
  */
98
99
  export declare namespace WorkDoneProgressCreateRequest {
99
- const type: RequestType<WorkDoneProgressCreateParams, void, void, void>;
100
+ const type: ProtocolRequestType<WorkDoneProgressCreateParams, void, never, void, void>;
100
101
  type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
101
102
  }
102
103
  export interface WorkDoneProgressCancelParams {
@@ -110,6 +111,6 @@ export interface WorkDoneProgressCancelParams {
110
111
  * initiated on the server side.
111
112
  */
112
113
  export declare namespace WorkDoneProgressCancelNotification {
113
- const type: NotificationType<WorkDoneProgressCancelParams, void>;
114
+ const type: ProtocolNotificationType<WorkDoneProgressCancelParams, void>;
114
115
  type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>;
115
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,5 +1,6 @@
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
  /**
@@ -33,7 +34,9 @@ export interface SelectionRangeParams extends WorkDoneProgressParams, PartialRes
33
34
  * that resolves to such.
34
35
  */
35
36
  export declare namespace SelectionRangeRequest {
36
- 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 */
37
40
  const resultType: ProgressType<SelectionRange[]>;
38
41
  type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
39
42
  }
@@ -5,6 +5,7 @@
5
5
  *--------------------------------------------------------------------------------------------*/
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
  /**
9
10
  * A request to provide selection ranges in a document. The request's
10
11
  * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
@@ -13,6 +14,8 @@ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
13
14
  */
14
15
  var SelectionRangeRequest;
15
16
  (function (SelectionRangeRequest) {
16
- SelectionRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/selectionRange');
17
+ SelectionRangeRequest.method = 'textDocument/selectionRange';
18
+ SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
19
+ /** @deprecated Use SelectionRangeRequest.type */
17
20
  SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
18
21
  })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));