vscode-languageserver-protocol 3.17.0-next.13 → 3.17.0-next.14
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/common/api.d.ts
CHANGED
|
@@ -123,4 +123,8 @@ export declare namespace Proposed {
|
|
|
123
123
|
const DidSaveNotebookDocumentNotification: typeof nb.DidSaveNotebookDocumentNotification;
|
|
124
124
|
type DidCloseNotebookDocumentParams = nb.DidCloseNotebookDocumentParams;
|
|
125
125
|
const DidCloseNotebookDocumentNotification: typeof nb.DidCloseNotebookDocumentNotification;
|
|
126
|
+
type NotebookController = nb.NotebookController;
|
|
127
|
+
const NotebookController: typeof nb.NotebookController;
|
|
128
|
+
type DidSelectNotebookControllerParams = nb.DidSelectNotebookControllerParams;
|
|
129
|
+
const DidSelectNotebookControllerNotification: typeof nb.DidSelectNotebookControllerNotification;
|
|
126
130
|
}
|
package/lib/common/api.js
CHANGED
|
@@ -95,5 +95,7 @@ var Proposed;
|
|
|
95
95
|
Proposed.DidChangeNotebookDocumentNotification = nb.DidChangeNotebookDocumentNotification;
|
|
96
96
|
Proposed.DidSaveNotebookDocumentNotification = nb.DidSaveNotebookDocumentNotification;
|
|
97
97
|
Proposed.DidCloseNotebookDocumentNotification = nb.DidCloseNotebookDocumentNotification;
|
|
98
|
+
Proposed.NotebookController = nb.NotebookController;
|
|
99
|
+
Proposed.DidSelectNotebookControllerNotification = nb.DidSelectNotebookControllerNotification;
|
|
98
100
|
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
99
101
|
//# sourceMappingURL=api.js.map
|
|
@@ -14,6 +14,10 @@ export interface NotebookDocumentSyncClientCapabilities {
|
|
|
14
14
|
* return value for the corresponding server capability as well.
|
|
15
15
|
*/
|
|
16
16
|
dynamicRegistration?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The client supports sending execution summary data per cell.
|
|
19
|
+
*/
|
|
20
|
+
executionSummarySupport?: boolean;
|
|
17
21
|
}
|
|
18
22
|
export interface $NotebookDocumentClientCapabilities {
|
|
19
23
|
notebookDocument?: {
|
|
@@ -37,6 +41,24 @@ export declare namespace NotebookCellKind {
|
|
|
37
41
|
function is(value: any): value is NotebookCellKind;
|
|
38
42
|
}
|
|
39
43
|
export declare type NotebookCellKind = 1 | 2;
|
|
44
|
+
export declare type ExecutionSummary = {
|
|
45
|
+
/**
|
|
46
|
+
* A strict monotonically increasing value
|
|
47
|
+
* indicating the execution order of a cell
|
|
48
|
+
* inside a notebook.
|
|
49
|
+
*/
|
|
50
|
+
executionOrder: uinteger;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the execution was successful or
|
|
53
|
+
* not if known by the client.
|
|
54
|
+
*/
|
|
55
|
+
success?: boolean;
|
|
56
|
+
};
|
|
57
|
+
export declare namespace ExecutionSummary {
|
|
58
|
+
function create(executionOrder: number, success?: boolean): ExecutionSummary;
|
|
59
|
+
function is(value: any): value is ExecutionSummary;
|
|
60
|
+
function equals(one: ExecutionSummary | undefined, other: ExecutionSummary | undefined): boolean;
|
|
61
|
+
}
|
|
40
62
|
/**
|
|
41
63
|
* A notebook cell.
|
|
42
64
|
*
|
|
@@ -60,11 +82,17 @@ export interface NotebookCell {
|
|
|
60
82
|
* Additional metadata stored with the cell.
|
|
61
83
|
*/
|
|
62
84
|
metadata?: LSPObject;
|
|
85
|
+
/**
|
|
86
|
+
* Additional execution summary information
|
|
87
|
+
* if supported by the client.
|
|
88
|
+
*/
|
|
89
|
+
executionSummary?: ExecutionSummary;
|
|
63
90
|
}
|
|
64
91
|
export declare namespace NotebookCell {
|
|
65
92
|
function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell;
|
|
66
93
|
function is(value: any): value is NotebookCell;
|
|
67
94
|
function equals(one: NotebookCell, other: NotebookCell, compareMetaData?: boolean): boolean;
|
|
95
|
+
function diff(one: NotebookCell, two: NotebookCell): Set<keyof NotebookCell>;
|
|
68
96
|
}
|
|
69
97
|
/**
|
|
70
98
|
* A notebook document.
|
|
@@ -250,35 +278,40 @@ export interface NotebookDocumentChangeEvent {
|
|
|
250
278
|
*/
|
|
251
279
|
metadata?: LSPObject;
|
|
252
280
|
/**
|
|
253
|
-
* Changes to
|
|
254
|
-
* remove cells.
|
|
281
|
+
* Changes to cells
|
|
255
282
|
*/
|
|
256
|
-
|
|
283
|
+
cells?: {
|
|
257
284
|
/**
|
|
258
|
-
*
|
|
285
|
+
* Changes to the cell structure to add or
|
|
286
|
+
* remove cells.
|
|
259
287
|
*/
|
|
260
|
-
|
|
288
|
+
structure?: {
|
|
289
|
+
/**
|
|
290
|
+
* The change to the cell array.
|
|
291
|
+
*/
|
|
292
|
+
array: NotebookCellArrayChange;
|
|
293
|
+
/**
|
|
294
|
+
* Additional opened cell text documents.
|
|
295
|
+
*/
|
|
296
|
+
didOpen?: TextDocumentItem[];
|
|
297
|
+
/**
|
|
298
|
+
* Additional closed cell text documents.
|
|
299
|
+
*/
|
|
300
|
+
didClose?: TextDocumentIdentifier[];
|
|
301
|
+
};
|
|
261
302
|
/**
|
|
262
|
-
*
|
|
303
|
+
* Changes to notebook cells properties like its
|
|
304
|
+
* kind, execution summary or metadata.
|
|
263
305
|
*/
|
|
264
|
-
|
|
306
|
+
data?: NotebookCell[];
|
|
265
307
|
/**
|
|
266
|
-
*
|
|
308
|
+
* Changes to the text content of notebook cells.
|
|
267
309
|
*/
|
|
268
|
-
|
|
310
|
+
textContent?: {
|
|
311
|
+
document: VersionedTextDocumentIdentifier;
|
|
312
|
+
changes: TextDocumentContentChangeEvent[];
|
|
313
|
+
}[];
|
|
269
314
|
};
|
|
270
|
-
/**
|
|
271
|
-
* Changes to notebook cells properties like its
|
|
272
|
-
* kind or metadata.
|
|
273
|
-
*/
|
|
274
|
-
cellData?: NotebookCell[];
|
|
275
|
-
/**
|
|
276
|
-
* Changes to the text content of notebook cells.
|
|
277
|
-
*/
|
|
278
|
-
cellTextDocuments?: {
|
|
279
|
-
textDocument: VersionedTextDocumentIdentifier;
|
|
280
|
-
contentChanges: TextDocumentContentChangeEvent[];
|
|
281
|
-
}[];
|
|
282
315
|
}
|
|
283
316
|
/**
|
|
284
317
|
* The params sent in a change notebook document notification.
|
|
@@ -359,3 +392,52 @@ export declare namespace DidCloseNotebookDocumentNotification {
|
|
|
359
392
|
const method: 'notebookDocument/didClose';
|
|
360
393
|
const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, void>;
|
|
361
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* A notebook controller represents an entity that can execute
|
|
397
|
+
* notebook cells. This is often referred to as a kernel.
|
|
398
|
+
*
|
|
399
|
+
* There can be multiple controllers and the editor will let
|
|
400
|
+
* users choose which controller to use for a certain notebook.
|
|
401
|
+
*/
|
|
402
|
+
export interface NotebookController {
|
|
403
|
+
/**
|
|
404
|
+
* The identifier of this notebook controller.
|
|
405
|
+
*
|
|
406
|
+
* _Note_ that controllers are usually remembered
|
|
407
|
+
* by their identifier and that clients should use
|
|
408
|
+
* stable identifiers.
|
|
409
|
+
*/
|
|
410
|
+
id: string;
|
|
411
|
+
/**
|
|
412
|
+
* Additional metadata associated with
|
|
413
|
+
* this controller.
|
|
414
|
+
*/
|
|
415
|
+
metadata?: LSPObject;
|
|
416
|
+
}
|
|
417
|
+
export declare namespace NotebookController {
|
|
418
|
+
function create(id: string, metadata?: LSPObject): NotebookController;
|
|
419
|
+
function is(value: any): value is NotebookController;
|
|
420
|
+
}
|
|
421
|
+
export interface DidSelectNotebookControllerParams {
|
|
422
|
+
/**
|
|
423
|
+
* The notebook document
|
|
424
|
+
*/
|
|
425
|
+
notebookDocument: NotebookDocumentIdentifier;
|
|
426
|
+
/**
|
|
427
|
+
* The selected controller
|
|
428
|
+
*/
|
|
429
|
+
controller: NotebookController;
|
|
430
|
+
/**
|
|
431
|
+
* Whether the controller has been selected
|
|
432
|
+
* or unselected.
|
|
433
|
+
*/
|
|
434
|
+
selected: boolean;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* A notification send when a controller got selected
|
|
438
|
+
* for a specific notebook.
|
|
439
|
+
*/
|
|
440
|
+
export declare namespace DidSelectNotebookControllerNotification {
|
|
441
|
+
const method: 'notebookDocument/didSelectNotebookController';
|
|
442
|
+
const type: ProtocolNotificationType<DidSelectNotebookControllerParams, void>;
|
|
443
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.NotebookCellKind = void 0;
|
|
7
|
+
exports.DidSelectNotebookControllerNotification = exports.NotebookController = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0;
|
|
8
8
|
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
9
9
|
const Is = require("./utils/is");
|
|
10
10
|
const messages_1 = require("./messages");
|
|
@@ -28,6 +28,32 @@ var NotebookCellKind;
|
|
|
28
28
|
}
|
|
29
29
|
NotebookCellKind.is = is;
|
|
30
30
|
})(NotebookCellKind = exports.NotebookCellKind || (exports.NotebookCellKind = {}));
|
|
31
|
+
var ExecutionSummary;
|
|
32
|
+
(function (ExecutionSummary) {
|
|
33
|
+
function create(executionOrder, success) {
|
|
34
|
+
const result = { executionOrder };
|
|
35
|
+
if (success === true || success === false) {
|
|
36
|
+
result.success = success;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
ExecutionSummary.create = create;
|
|
41
|
+
function is(value) {
|
|
42
|
+
const candidate = value;
|
|
43
|
+
return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success));
|
|
44
|
+
}
|
|
45
|
+
ExecutionSummary.is = is;
|
|
46
|
+
function equals(one, other) {
|
|
47
|
+
if (one === other) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (one === null || one === undefined || other === null || other === undefined) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return one.executionOrder === other.executionOrder && one.success === other.success;
|
|
54
|
+
}
|
|
55
|
+
ExecutionSummary.equals = equals;
|
|
56
|
+
})(ExecutionSummary = exports.ExecutionSummary || (exports.ExecutionSummary = {}));
|
|
31
57
|
var NotebookCell;
|
|
32
58
|
(function (NotebookCell) {
|
|
33
59
|
function create(kind, document) {
|
|
@@ -40,7 +66,7 @@ var NotebookCell;
|
|
|
40
66
|
(candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));
|
|
41
67
|
}
|
|
42
68
|
NotebookCell.is = is;
|
|
43
|
-
function equals(one, other, compareMetaData =
|
|
69
|
+
function equals(one, other, compareMetaData = true) {
|
|
44
70
|
if (one.kind !== other.kind || one.document !== other.document) {
|
|
45
71
|
return false;
|
|
46
72
|
}
|
|
@@ -95,6 +121,26 @@ var NotebookCell;
|
|
|
95
121
|
}
|
|
96
122
|
return true;
|
|
97
123
|
}
|
|
124
|
+
function diff(one, two) {
|
|
125
|
+
const result = new Set();
|
|
126
|
+
if (one.document !== two.document) {
|
|
127
|
+
result.add('document');
|
|
128
|
+
}
|
|
129
|
+
if (one.kind !== two.kind) {
|
|
130
|
+
result.add('kind');
|
|
131
|
+
}
|
|
132
|
+
if (one.executionSummary !== two.executionSummary) {
|
|
133
|
+
result.add('executionSummary');
|
|
134
|
+
}
|
|
135
|
+
if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) {
|
|
136
|
+
result.add('metadata');
|
|
137
|
+
}
|
|
138
|
+
if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) {
|
|
139
|
+
result.add('executionSummary');
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
NotebookCell.diff = diff;
|
|
98
144
|
})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));
|
|
99
145
|
var NotebookDocument;
|
|
100
146
|
(function (NotebookDocument) {
|
|
@@ -164,4 +210,29 @@ var DidCloseNotebookDocumentNotification;
|
|
|
164
210
|
DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';
|
|
165
211
|
DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);
|
|
166
212
|
})(DidCloseNotebookDocumentNotification = exports.DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = {}));
|
|
213
|
+
var NotebookController;
|
|
214
|
+
(function (NotebookController) {
|
|
215
|
+
function create(id, metadata) {
|
|
216
|
+
const result = { id };
|
|
217
|
+
if (metadata !== undefined) {
|
|
218
|
+
result.metadata = metadata;
|
|
219
|
+
}
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
NotebookController.create = create;
|
|
223
|
+
function is(value) {
|
|
224
|
+
const candidate = value;
|
|
225
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.id) && (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));
|
|
226
|
+
}
|
|
227
|
+
NotebookController.is = is;
|
|
228
|
+
})(NotebookController = exports.NotebookController || (exports.NotebookController = {}));
|
|
229
|
+
/**
|
|
230
|
+
* A notification send when a controller got selected
|
|
231
|
+
* for a specific notebook.
|
|
232
|
+
*/
|
|
233
|
+
var DidSelectNotebookControllerNotification;
|
|
234
|
+
(function (DidSelectNotebookControllerNotification) {
|
|
235
|
+
DidSelectNotebookControllerNotification.method = 'notebookDocument/didSelectNotebookController';
|
|
236
|
+
DidSelectNotebookControllerNotification.type = new messages_1.ProtocolNotificationType(DidSelectNotebookControllerNotification.method);
|
|
237
|
+
})(DidSelectNotebookControllerNotification = exports.DidSelectNotebookControllerNotification || (exports.DidSelectNotebookControllerNotification = {}));
|
|
167
238
|
//# sourceMappingURL=proposed.notebooks.js.map
|
package/package.json
CHANGED