vscode-languageserver-protocol 3.17.6-next.1 → 3.17.6-next.11

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.
@@ -1,13 +1,13 @@
1
1
  import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
2
  import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types';
3
3
  import { MessageDirection, ProtocolRequestType0, ProtocolRequestType } from './messages';
4
- import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions } from './protocol';
4
+ import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, DiagnosticsCapabilities } from './protocol';
5
5
  /**
6
6
  * Client capabilities specific to diagnostic pull requests.
7
7
  *
8
8
  * @since 3.17.0
9
9
  */
10
- export type DiagnosticClientCapabilities = {
10
+ export type DiagnosticClientCapabilities = DiagnosticsCapabilities & {
11
11
  /**
12
12
  * Whether implementation supports dynamic registration. If this is set to `true`
13
13
  * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
@@ -3,10 +3,33 @@
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  * ------------------------------------------------------------------------------------------ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0;
8
31
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
9
- const Is = require("./utils/is");
32
+ const Is = __importStar(require("./utils/is"));
10
33
  const messages_1 = require("./messages");
11
34
  /**
12
35
  * @since 3.17.0
@@ -4,9 +4,8 @@ import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './m
4
4
  import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
5
  /**
6
6
  * @since 3.18.0
7
- * @proposed
8
7
  */
9
- export interface ClientFoldingRangeKindOptions {
8
+ export type ClientFoldingRangeKindOptions = {
10
9
  /**
11
10
  * The folding range kind values the client supports. When this
12
11
  * property exists the client also guarantees that it will
@@ -14,12 +13,11 @@ export interface ClientFoldingRangeKindOptions {
14
13
  * to a default value when unknown.
15
14
  */
16
15
  valueSet?: FoldingRangeKind[];
17
- }
16
+ };
18
17
  /**
19
18
  * @since 3.18.0
20
- * @proposed
21
19
  */
22
- export interface ClientFoldingRangeOptions {
20
+ export type ClientFoldingRangeOptions = {
23
21
  /**
24
22
  * If set, the client signals that it supports setting collapsedText on
25
23
  * folding ranges to display custom labels instead of the default text.
@@ -27,7 +25,7 @@ export interface ClientFoldingRangeOptions {
27
25
  * @since 3.17.0
28
26
  */
29
27
  collapsedText?: boolean;
30
- }
28
+ };
31
29
  export interface FoldingRangeClientCapabilities {
32
30
  /**
33
31
  * Whether implementation supports dynamic registration for folding range
@@ -67,7 +65,7 @@ export interface FoldingRangeClientCapabilities {
67
65
  * @since 3.18.0
68
66
  * @proposed
69
67
  */
70
- export interface FoldingRangeWorkspaceClientCapabilities {
68
+ export type FoldingRangeWorkspaceClientCapabilities = {
71
69
  /**
72
70
  * Whether the client implementation supports a refresh request sent from the
73
71
  * server to the client.
@@ -81,7 +79,7 @@ export interface FoldingRangeWorkspaceClientCapabilities {
81
79
  * @proposed
82
80
  */
83
81
  refreshSupport?: boolean;
84
- }
82
+ };
85
83
  export interface FoldingRangeOptions extends WorkDoneProgressOptions {
86
84
  }
87
85
  export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
@@ -4,14 +4,13 @@ import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './m
4
4
  import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';
5
5
  /**
6
6
  * @since 3.18.0
7
- * @proposed
8
7
  */
9
- export interface ClientInlayHintResolveOptions {
8
+ export type ClientInlayHintResolveOptions = {
10
9
  /**
11
10
  * The properties that a client can resolve lazily.
12
11
  */
13
12
  properties: string[];
14
- }
13
+ };
15
14
  /**
16
15
  * Inlay hint client capabilities.
17
16
  *
@@ -3,13 +3,36 @@
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  * ------------------------------------------------------------------------------------------ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
8
- exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;
9
- exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
30
+ exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.GlobPattern = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.RegularExpressionEngineKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
31
+ exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = void 0;
32
+ exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = exports.MonikerKind = void 0;
10
33
  const messages_1 = require("./messages");
11
34
  const vscode_languageserver_types_1 = require("vscode-languageserver-types");
12
- const Is = require("./utils/is");
35
+ const Is = __importStar(require("./utils/is"));
13
36
  const protocol_implementation_1 = require("./protocol.implementation");
14
37
  Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
15
38
  const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
@@ -90,6 +113,9 @@ Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerab
90
113
  Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });
91
114
  const protocol_inlineCompletion_1 = require("./protocol.inlineCompletion");
92
115
  Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } });
116
+ const protocol_textDocumentContent_1 = require("./protocol.textDocumentContent");
117
+ Object.defineProperty(exports, "TextDocumentContentRequest", { enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRequest; } });
118
+ Object.defineProperty(exports, "TextDocumentContentRefreshRequest", { enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRefreshRequest; } });
93
119
  // @ts-ignore: to avoid inlining LocationLink as dynamic import
94
120
  let __noDynamicImport;
95
121
  /**
@@ -102,7 +128,7 @@ var TextDocumentFilter;
102
128
  (function (TextDocumentFilter) {
103
129
  function is(value) {
104
130
  const candidate = value;
105
- return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
131
+ return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || GlobPattern.is(candidate.pattern));
106
132
  }
107
133
  TextDocumentFilter.is = is;
108
134
  })(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {}));
@@ -146,7 +172,7 @@ var DocumentSelector;
146
172
  if (!Array.isArray(value)) {
147
173
  return false;
148
174
  }
149
- for (let elem of value) {
175
+ for (const elem of value) {
150
176
  if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
151
177
  return false;
152
178
  }
@@ -214,6 +240,16 @@ var FailureHandlingKind;
214
240
  */
215
241
  FailureHandlingKind.Undo = 'undo';
216
242
  })(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {}));
243
+ /**
244
+ * Regular Expression Engines
245
+ *
246
+ * @since 3.18.0
247
+ * @proposed
248
+ */
249
+ var RegularExpressionEngineKind;
250
+ (function (RegularExpressionEngineKind) {
251
+ RegularExpressionEngineKind.ES2020 = 'ES2020';
252
+ })(RegularExpressionEngineKind || (exports.RegularExpressionEngineKind = RegularExpressionEngineKind = {}));
217
253
  /**
218
254
  * A set of predefined position encoding kinds.
219
255
  *
@@ -380,6 +416,7 @@ var MessageType;
380
416
  * A debug message.
381
417
  *
382
418
  * @since 3.18.0
419
+ * @proposed
383
420
  */
384
421
  MessageType.Debug = 5;
385
422
  })(MessageType || (exports.MessageType = MessageType = {}));
@@ -468,7 +505,7 @@ var TextDocumentContentChangeEvent;
468
505
  * Checks whether the information describes a delta event.
469
506
  */
470
507
  function isIncremental(event) {
471
- let candidate = event;
508
+ const candidate = event;
472
509
  return candidate !== undefined && candidate !== null &&
473
510
  typeof candidate.text === 'string' && candidate.range !== undefined &&
474
511
  (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
@@ -478,7 +515,7 @@ var TextDocumentContentChangeEvent;
478
515
  * Checks whether the information describes a full replacement event.
479
516
  */
480
517
  function isFull(event) {
481
- let candidate = event;
518
+ const candidate = event;
482
519
  return candidate !== undefined && candidate !== null &&
483
520
  typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
484
521
  }
@@ -598,6 +635,14 @@ var RelativePattern;
598
635
  }
599
636
  RelativePattern.is = is;
600
637
  })(RelativePattern || (exports.RelativePattern = RelativePattern = {}));
638
+ var GlobPattern;
639
+ (function (GlobPattern) {
640
+ function is(value) {
641
+ const candidate = value;
642
+ return Is.string(candidate) || RelativePattern.is(candidate);
643
+ }
644
+ GlobPattern.is = is;
645
+ })(GlobPattern || (exports.GlobPattern = GlobPattern = {}));
601
646
  var WatchKind;
602
647
  (function (WatchKind) {
603
648
  /**
@@ -153,16 +153,14 @@ export type VersionedNotebookDocumentIdentifier = {
153
153
  };
154
154
  /**
155
155
  * @since 3.18.0
156
- * @proposed
157
156
  */
158
- export interface NotebookCellLanguage {
157
+ export type NotebookCellLanguage = {
159
158
  language: string;
160
- }
159
+ };
161
160
  /**
162
161
  * @since 3.18.0
163
- * @proposed
164
162
  */
165
- export interface NotebookDocumentFilterWithNotebook {
163
+ export type NotebookDocumentFilterWithNotebook = {
166
164
  /**
167
165
  * The notebook to be synced If a string
168
166
  * value is provided it matches against the
@@ -173,12 +171,11 @@ export interface NotebookDocumentFilterWithNotebook {
173
171
  * The cells of the matching notebook to be synced.
174
172
  */
175
173
  cells?: NotebookCellLanguage[];
176
- }
174
+ };
177
175
  /**
178
176
  * @since 3.18.0
179
- * @proposed
180
177
  */
181
- export interface NotebookDocumentFilterWithCells {
178
+ export type NotebookDocumentFilterWithCells = {
182
179
  /**
183
180
  * The notebook to be synced If a string
184
181
  * value is provided it matches against the
@@ -189,7 +186,7 @@ export interface NotebookDocumentFilterWithCells {
189
186
  * The cells of the matching notebook to be synced.
190
187
  */
191
188
  cells: NotebookCellLanguage[];
192
- }
189
+ };
193
190
  /**
194
191
  * Options specific to a notebook plus its cells
195
192
  * to be synced to the server.
@@ -251,7 +248,7 @@ export type DidOpenNotebookDocumentParams = {
251
248
  export declare namespace DidOpenNotebookDocumentNotification {
252
249
  const method: 'notebookDocument/didOpen';
253
250
  const messageDirection: MessageDirection;
254
- const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, void>;
251
+ const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
255
252
  const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
256
253
  }
257
254
  /**
@@ -282,9 +279,8 @@ export declare namespace NotebookCellArrayChange {
282
279
  * Structural changes to cells in a notebook document.
283
280
  *
284
281
  * @since 3.18.0
285
- * @proposed
286
282
  */
287
- export interface NotebookDocumentCellChangeStructure {
283
+ export type NotebookDocumentCellChangeStructure = {
288
284
  /**
289
285
  * The change to the cell array.
290
286
  */
@@ -297,24 +293,22 @@ export interface NotebookDocumentCellChangeStructure {
297
293
  * Additional closed cell text documents.
298
294
  */
299
295
  didClose?: TextDocumentIdentifier[];
300
- }
296
+ };
301
297
  /**
302
298
  * Content changes to a cell in a notebook document.
303
299
  *
304
300
  * @since 3.18.0
305
- * @proposed
306
301
  */
307
- export interface NotebookDocumentCellContentChanges {
302
+ export type NotebookDocumentCellContentChanges = {
308
303
  document: VersionedTextDocumentIdentifier;
309
304
  changes: TextDocumentContentChangeEvent[];
310
- }
305
+ };
311
306
  /**
312
307
  * Cell changes to a notebook document.
313
308
  *
314
309
  * @since 3.18.0
315
- * @proposed
316
310
  */
317
- export interface NotebookDocumentCellChanges {
311
+ export type NotebookDocumentCellChanges = {
318
312
  /**
319
313
  * Changes to the cell structure to add or
320
314
  * remove cells.
@@ -329,7 +323,7 @@ export interface NotebookDocumentCellChanges {
329
323
  * Changes to the text content of notebook cells.
330
324
  */
331
325
  textContent?: NotebookDocumentCellContentChanges[];
332
- }
326
+ };
333
327
  /**
334
328
  * A change event for a notebook document.
335
329
  *
@@ -380,7 +374,7 @@ export type DidChangeNotebookDocumentParams = {
380
374
  export declare namespace DidChangeNotebookDocumentNotification {
381
375
  const method: 'notebookDocument/didChange';
382
376
  const messageDirection: MessageDirection;
383
- const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, void>;
377
+ const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
384
378
  const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
385
379
  }
386
380
  /**
@@ -402,7 +396,7 @@ export type DidSaveNotebookDocumentParams = {
402
396
  export declare namespace DidSaveNotebookDocumentNotification {
403
397
  const method: 'notebookDocument/didSave';
404
398
  const messageDirection: MessageDirection;
405
- const type: ProtocolNotificationType<DidSaveNotebookDocumentParams, void>;
399
+ const type: ProtocolNotificationType<DidSaveNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
406
400
  const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
407
401
  }
408
402
  /**
@@ -429,6 +423,6 @@ export type DidCloseNotebookDocumentParams = {
429
423
  export declare namespace DidCloseNotebookDocumentNotification {
430
424
  const method: 'notebookDocument/didClose';
431
425
  const messageDirection: MessageDirection;
432
- const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, void>;
426
+ const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
433
427
  const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
434
428
  }
@@ -3,10 +3,33 @@
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  * ------------------------------------------------------------------------------------------ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0;
8
31
  const vscode_languageserver_types_1 = require("vscode-languageserver-types");
9
- const Is = require("./utils/is");
32
+ const Is = __importStar(require("./utils/is"));
10
33
  const messages_1 = require("./messages");
11
34
  /**
12
35
  * A notebook cell kind.
@@ -20,20 +20,18 @@ export declare namespace TokenFormat {
20
20
  export type TokenFormat = 'relative';
21
21
  /**
22
22
  * @since 3.18.0
23
- * @proposed
24
23
  */
25
- export interface ClientSemanticTokensRequestFullDelta {
24
+ export type ClientSemanticTokensRequestFullDelta = {
26
25
  /**
27
26
  * The client will send the `textDocument/semanticTokens/full/delta` request if
28
27
  * the server provides a corresponding handler.
29
28
  */
30
29
  delta?: boolean;
31
- }
30
+ };
32
31
  /**
33
32
  * @since 3.18.0
34
- * @proposed
35
33
  */
36
- export interface ClientSemanticTokensRequestOptions {
34
+ export type ClientSemanticTokensRequestOptions = {
37
35
  /**
38
36
  * The client will send the `textDocument/semanticTokens/range` request if
39
37
  * the server provides a corresponding handler.
@@ -44,7 +42,7 @@ export interface ClientSemanticTokensRequestOptions {
44
42
  * the server provides a corresponding handler.
45
43
  */
46
44
  full?: boolean | ClientSemanticTokensRequestFullDelta;
47
- }
45
+ };
48
46
  /**
49
47
  * @since 3.16.0
50
48
  */
@@ -113,14 +111,13 @@ export interface SemanticTokensClientCapabilities {
113
111
  * Semantic tokens options to support deltas for full documents
114
112
  *
115
113
  * @since 3.18.0
116
- * @proposed
117
114
  */
118
- export interface SemanticTokensFullDelta {
115
+ export type SemanticTokensFullDelta = {
119
116
  /**
120
117
  * The server supports deltas for full documents.
121
118
  */
122
119
  delta?: boolean;
123
- }
120
+ };
124
121
  /**
125
122
  * @since 3.16.0
126
123
  */
@@ -1,4 +1,4 @@
1
- import { HandlerResult, RequestHandler } from 'vscode-jsonrpc';
1
+ import { CancellationToken, HandlerResult, RequestHandler } from 'vscode-jsonrpc';
2
2
  import { Range, URI } from 'vscode-languageserver-types';
3
3
  import { MessageDirection, ProtocolRequestType } from './messages';
4
4
  /**
@@ -68,5 +68,5 @@ export declare namespace ShowDocumentRequest {
68
68
  const messageDirection: MessageDirection;
69
69
  const type: ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>;
70
70
  type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
71
- type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
71
+ type MiddlewareSignature = (params: ShowDocumentParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
72
72
  }
@@ -0,0 +1,100 @@
1
+ import type { DocumentUri } from 'vscode-languageserver-types';
2
+ import type { RequestHandler } from 'vscode-jsonrpc';
3
+ import { MessageDirection, ProtocolRequestType } from './messages';
4
+ import type { StaticRegistrationOptions } from './protocol';
5
+ /**
6
+ * Client capabilities for a text document content provider.
7
+ *
8
+ * @since 3.18.0
9
+ * @proposed
10
+ */
11
+ export type TextDocumentContentClientCapabilities = {
12
+ /**
13
+ * Text document content provider supports dynamic registration.
14
+ */
15
+ dynamicRegistration?: boolean;
16
+ };
17
+ /**
18
+ * Text document content provider options.
19
+ *
20
+ * @since 3.18.0
21
+ * @proposed
22
+ */
23
+ export type TextDocumentContentOptions = {
24
+ /**
25
+ * The schemes for which the server provides content.
26
+ */
27
+ schemes: string[];
28
+ };
29
+ /**
30
+ * Text document content provider registration options.
31
+ *
32
+ * @since 3.18.0
33
+ * @proposed
34
+ */
35
+ export type TextDocumentContentRegistrationOptions = TextDocumentContentOptions & StaticRegistrationOptions;
36
+ /**
37
+ * Parameters for the `workspace/textDocumentContent` request.
38
+ *
39
+ * @since 3.18.0
40
+ * @proposed
41
+ */
42
+ export interface TextDocumentContentParams {
43
+ /**
44
+ * The uri of the text document.
45
+ */
46
+ uri: DocumentUri;
47
+ }
48
+ /**
49
+ * Result of the `workspace/textDocumentContent` request.
50
+ *
51
+ * @since 3.18.0
52
+ * @proposed
53
+ */
54
+ export interface TextDocumentContentResult {
55
+ /**
56
+ * The text content of the text document. Please note, that the content of
57
+ * any subsequent open notifications for the text document might differ
58
+ * from the returned content due to whitespace and line ending
59
+ * normalizations done on the client
60
+ */
61
+ text: string;
62
+ }
63
+ /**
64
+ * The `workspace/textDocumentContent` request is sent from the client to the
65
+ * server to request the content of a text document.
66
+ *
67
+ * @since 3.18.0
68
+ * @proposed
69
+ */
70
+ export declare namespace TextDocumentContentRequest {
71
+ const method: 'workspace/textDocumentContent';
72
+ const messageDirection: MessageDirection;
73
+ const type: ProtocolRequestType<TextDocumentContentParams, TextDocumentContentResult, void, void, TextDocumentContentRegistrationOptions>;
74
+ type HandlerSignature = RequestHandler<TextDocumentContentParams, TextDocumentContentResult, void>;
75
+ }
76
+ /**
77
+ * Parameters for the `workspace/textDocumentContent/refresh` request.
78
+ *
79
+ * @since 3.18.0
80
+ * @proposed
81
+ */
82
+ export interface TextDocumentContentRefreshParams {
83
+ /**
84
+ * The uri of the text document to refresh.
85
+ */
86
+ uri: DocumentUri;
87
+ }
88
+ /**
89
+ * The `workspace/textDocumentContent` request is sent from the server to the client to refresh
90
+ * the content of a specific text document.
91
+ *
92
+ * @since 3.18.0
93
+ * @proposed
94
+ */
95
+ export declare namespace TextDocumentContentRefreshRequest {
96
+ const method: `workspace/textDocumentContent/refresh`;
97
+ const messageDirection: MessageDirection;
98
+ const type: ProtocolRequestType<TextDocumentContentRefreshParams, void, void, void, void>;
99
+ type HandlerSignature = RequestHandler<TextDocumentContentRefreshParams, void, void>;
100
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /* --------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ * ------------------------------------------------------------------------------------------ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = void 0;
8
+ const messages_1 = require("./messages");
9
+ /**
10
+ * The `workspace/textDocumentContent` request is sent from the client to the
11
+ * server to request the content of a text document.
12
+ *
13
+ * @since 3.18.0
14
+ * @proposed
15
+ */
16
+ var TextDocumentContentRequest;
17
+ (function (TextDocumentContentRequest) {
18
+ TextDocumentContentRequest.method = 'workspace/textDocumentContent';
19
+ TextDocumentContentRequest.messageDirection = messages_1.MessageDirection.clientToServer;
20
+ TextDocumentContentRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRequest.method);
21
+ })(TextDocumentContentRequest || (exports.TextDocumentContentRequest = TextDocumentContentRequest = {}));
22
+ /**
23
+ * The `workspace/textDocumentContent` request is sent from the server to the client to refresh
24
+ * the content of a specific text document.
25
+ *
26
+ * @since 3.18.0
27
+ * @proposed
28
+ */
29
+ var TextDocumentContentRefreshRequest;
30
+ (function (TextDocumentContentRefreshRequest) {
31
+ TextDocumentContentRefreshRequest.method = `workspace/textDocumentContent/refresh`;
32
+ TextDocumentContentRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
33
+ TextDocumentContentRefreshRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRefreshRequest.method);
34
+ })(TextDocumentContentRefreshRequest || (exports.TextDocumentContentRefreshRequest = TextDocumentContentRefreshRequest = {}));