vscode-languageserver-protocol 3.17.0-next.12 → 3.17.0-next.13
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 +6 -4
- package/lib/common/api.js +1 -0
- package/lib/common/proposed.notebooks.d.ts +149 -42
- package/lib/common/proposed.notebooks.js +82 -20
- package/lib/common/protocol.d.ts +13 -0
- package/lib/common/protocol.js +1 -1
- package/package.json +3 -3
package/lib/common/api.d.ts
CHANGED
|
@@ -101,24 +101,26 @@ export declare namespace Proposed {
|
|
|
101
101
|
const InlineValuesRefreshRequest: typeof iv.InlineValuesRefreshRequest;
|
|
102
102
|
type $NotebookDocumentClientCapabilities = nb.$NotebookDocumentClientCapabilities;
|
|
103
103
|
type NotebookDocumentSyncClientCapabilities = nb.NotebookDocumentSyncClientCapabilities;
|
|
104
|
-
type $
|
|
104
|
+
type $NotebookDocumentSyncServerCapabilities = nb.$NotebookDocumentSyncServerCapabilities;
|
|
105
105
|
type NotebookCellKind = nb.NotebookCellKind;
|
|
106
106
|
const NotebookCellKind: typeof nb.NotebookCellKind;
|
|
107
107
|
type NotebookCell = nb.NotebookCell;
|
|
108
108
|
const NotebookCell: typeof nb.NotebookCell;
|
|
109
|
-
type
|
|
109
|
+
type NotebookCellArrayChange = nb.NotebookCellArrayChange;
|
|
110
110
|
type NotebookDocument = nb.NotebookDocument;
|
|
111
111
|
const NotebookDocument: typeof nb.NotebookDocument;
|
|
112
112
|
type NotebookDocumentChangeEvent = nb.NotebookDocumentChangeEvent;
|
|
113
113
|
type NotebookDocumentIdentifier = nb.NotebookDocumentIdentifier;
|
|
114
114
|
type VersionedNotebookDocumentIdentifier = nb.VersionedNotebookDocumentIdentifier;
|
|
115
|
-
type
|
|
116
|
-
type
|
|
115
|
+
type NotebookDocumentSyncOptions = nb.NotebookDocumentSyncOptions;
|
|
116
|
+
type NotebookDocumentSyncRegistrationOptions = nb.NotebookDocumentSyncRegistrationOptions;
|
|
117
117
|
const NotebookDocumentSyncRegistrationType: typeof nb.NotebookDocumentSyncRegistrationType;
|
|
118
118
|
type DidOpenNotebookDocumentParams = nb.DidOpenNotebookDocumentParams;
|
|
119
119
|
const DidOpenNotebookDocumentNotification: typeof nb.DidOpenNotebookDocumentNotification;
|
|
120
120
|
type DidChangeNotebookDocumentParams = nb.DidChangeNotebookDocumentParams;
|
|
121
121
|
const DidChangeNotebookDocumentNotification: typeof nb.DidChangeNotebookDocumentNotification;
|
|
122
|
+
type DidSaveNotebookDocumentParams = nb.DidSaveNotebookDocumentParams;
|
|
123
|
+
const DidSaveNotebookDocumentNotification: typeof nb.DidSaveNotebookDocumentNotification;
|
|
122
124
|
type DidCloseNotebookDocumentParams = nb.DidCloseNotebookDocumentParams;
|
|
123
125
|
const DidCloseNotebookDocumentNotification: typeof nb.DidCloseNotebookDocumentNotification;
|
|
124
126
|
}
|
package/lib/common/api.js
CHANGED
|
@@ -93,6 +93,7 @@ var Proposed;
|
|
|
93
93
|
Proposed.NotebookDocumentSyncRegistrationType = nb.NotebookDocumentSyncRegistrationType;
|
|
94
94
|
Proposed.DidOpenNotebookDocumentNotification = nb.DidOpenNotebookDocumentNotification;
|
|
95
95
|
Proposed.DidChangeNotebookDocumentNotification = nb.DidChangeNotebookDocumentNotification;
|
|
96
|
+
Proposed.DidSaveNotebookDocumentNotification = nb.DidSaveNotebookDocumentNotification;
|
|
96
97
|
Proposed.DidCloseNotebookDocumentNotification = nb.DidCloseNotebookDocumentNotification;
|
|
97
98
|
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
98
99
|
//# sourceMappingURL=api.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { URI, integer, DocumentUri, uinteger } from 'vscode-languageserver-types';
|
|
1
|
+
import { URI, integer, DocumentUri, uinteger, LSPObject, TextDocumentItem, TextDocumentIdentifier, VersionedTextDocumentIdentifier } from 'vscode-languageserver-types';
|
|
2
2
|
import { ProtocolNotificationType, RegistrationType } from './messages';
|
|
3
|
-
import { StaticRegistrationOptions, NotebookDocumentFilter } from './protocol';
|
|
3
|
+
import { StaticRegistrationOptions, NotebookDocumentFilter, TextDocumentContentChangeEvent } from './protocol';
|
|
4
4
|
/**
|
|
5
5
|
* Notebook specific client capabilities.
|
|
6
6
|
*
|
|
@@ -40,6 +40,10 @@ export declare type NotebookCellKind = 1 | 2;
|
|
|
40
40
|
/**
|
|
41
41
|
* A notebook cell.
|
|
42
42
|
*
|
|
43
|
+
* A cell's document URI must be unique across ALL notebook
|
|
44
|
+
* cells and can therefore be used to uniquely identify a
|
|
45
|
+
* notebook cell or the cell's text document.
|
|
46
|
+
*
|
|
43
47
|
* @since 3.17.0 - proposed state
|
|
44
48
|
*/
|
|
45
49
|
export interface NotebookCell {
|
|
@@ -48,40 +52,19 @@ export interface NotebookCell {
|
|
|
48
52
|
*/
|
|
49
53
|
kind: NotebookCellKind;
|
|
50
54
|
/**
|
|
51
|
-
* The cell's text
|
|
52
|
-
*
|
|
53
|
-
* existing text document sync notifications.
|
|
55
|
+
* The URI of the cell's text document
|
|
56
|
+
* content.
|
|
54
57
|
*/
|
|
55
58
|
document: DocumentUri;
|
|
59
|
+
/**
|
|
60
|
+
* Additional metadata stored with the cell.
|
|
61
|
+
*/
|
|
62
|
+
metadata?: LSPObject;
|
|
56
63
|
}
|
|
57
64
|
export declare namespace NotebookCell {
|
|
58
65
|
function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell;
|
|
59
66
|
function is(value: any): value is NotebookCell;
|
|
60
|
-
function
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* A change describing how to move a `NotebookCell`
|
|
64
|
-
* array from state S' to S''.
|
|
65
|
-
*
|
|
66
|
-
* @since 3.17.0 - proposed state
|
|
67
|
-
*/
|
|
68
|
-
export interface NotebookCellChange {
|
|
69
|
-
/**
|
|
70
|
-
* The start oftest of the cell that changed.
|
|
71
|
-
*/
|
|
72
|
-
start: uinteger;
|
|
73
|
-
/**
|
|
74
|
-
* The deleted cells
|
|
75
|
-
*/
|
|
76
|
-
deleteCount: uinteger;
|
|
77
|
-
/**
|
|
78
|
-
* The new cells, if any
|
|
79
|
-
*/
|
|
80
|
-
cells?: NotebookCell[];
|
|
81
|
-
}
|
|
82
|
-
export declare namespace NotebookCellChange {
|
|
83
|
-
function is(value: any): value is NotebookCellChange;
|
|
84
|
-
function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellChange;
|
|
67
|
+
function equals(one: NotebookCell, other: NotebookCell, compareMetaData?: boolean): boolean;
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* A notebook document.
|
|
@@ -102,6 +85,11 @@ export interface NotebookDocument {
|
|
|
102
85
|
* change, including undo/redo).
|
|
103
86
|
*/
|
|
104
87
|
version: integer;
|
|
88
|
+
/**
|
|
89
|
+
* Additional metadata stored with the notebook
|
|
90
|
+
* document.
|
|
91
|
+
*/
|
|
92
|
+
metadata?: LSPObject;
|
|
105
93
|
/**
|
|
106
94
|
* The cells of a notebook.
|
|
107
95
|
*/
|
|
@@ -141,7 +129,7 @@ export interface VersionedNotebookDocumentIdentifier {
|
|
|
141
129
|
* Options specific to a notebook plus its cells
|
|
142
130
|
* to be synced to the server.
|
|
143
131
|
*
|
|
144
|
-
* If a selector
|
|
132
|
+
* If a selector provide a notebook document
|
|
145
133
|
* filter but no cell selector all cells of a
|
|
146
134
|
* matching notebook document will be synced.
|
|
147
135
|
*
|
|
@@ -152,8 +140,11 @@ export interface VersionedNotebookDocumentIdentifier {
|
|
|
152
140
|
*
|
|
153
141
|
* @since 3.17.0 - proposed state
|
|
154
142
|
*/
|
|
155
|
-
export declare type
|
|
156
|
-
|
|
143
|
+
export declare type NotebookDocumentSyncOptions = {
|
|
144
|
+
/**
|
|
145
|
+
* The notebook document to be synced
|
|
146
|
+
*/
|
|
147
|
+
notebookDocumentSelector: ({
|
|
157
148
|
/** The notebook documents to be synced */
|
|
158
149
|
notebookDocumentFilter: NotebookDocumentFilter;
|
|
159
150
|
/** The cells of the matching notebook to be synced */
|
|
@@ -168,19 +159,36 @@ export declare type NotebookDocumentOptions = {
|
|
|
168
159
|
language: string;
|
|
169
160
|
}[];
|
|
170
161
|
})[];
|
|
162
|
+
/**
|
|
163
|
+
* Determines how the notebook is synchronized.
|
|
164
|
+
*
|
|
165
|
+
* If set to 'notebook' the notebook document,
|
|
166
|
+
* its meta data, cell structure and the cell's
|
|
167
|
+
* text documents are synchronized.
|
|
168
|
+
*
|
|
169
|
+
* If set to 'cellContent' only the cell content
|
|
170
|
+
* is synchronized using the available
|
|
171
|
+
* `textDocument/did*` notifications.
|
|
172
|
+
*/
|
|
173
|
+
mode: 'notebook' | 'cellContent';
|
|
174
|
+
/**
|
|
175
|
+
* Whether save notification should be forwarded to
|
|
176
|
+
* the server. Will only be honored if mode === `notebook`.
|
|
177
|
+
*/
|
|
178
|
+
save?: boolean;
|
|
171
179
|
};
|
|
172
|
-
export interface $NotebookDocumentServerCapabilities {
|
|
173
|
-
notebookDocumentSync?: NotebookDocumentOptions | NotebookDocumentRegistrationOptions;
|
|
174
|
-
}
|
|
175
180
|
/**
|
|
176
181
|
* Registration options specific to a notebook.
|
|
177
182
|
*
|
|
178
183
|
* @since 3.17.0 - proposed state
|
|
179
184
|
*/
|
|
180
|
-
export declare type
|
|
185
|
+
export declare type NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncOptions & StaticRegistrationOptions;
|
|
186
|
+
export interface $NotebookDocumentSyncServerCapabilities {
|
|
187
|
+
notebookDocumentSync?: NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions;
|
|
188
|
+
}
|
|
181
189
|
export declare namespace NotebookDocumentSyncRegistrationType {
|
|
182
190
|
const method: 'notebookDocument/sync';
|
|
183
|
-
const type: RegistrationType<
|
|
191
|
+
const type: RegistrationType<NotebookDocumentSyncRegistrationOptions>;
|
|
184
192
|
}
|
|
185
193
|
/**
|
|
186
194
|
* The params sent in a open notebook document notification.
|
|
@@ -192,6 +200,11 @@ export interface DidOpenNotebookDocumentParams {
|
|
|
192
200
|
* The notebook document that got opened.
|
|
193
201
|
*/
|
|
194
202
|
notebookDocument: NotebookDocument;
|
|
203
|
+
/**
|
|
204
|
+
* The text documents that represent the content
|
|
205
|
+
* of a notebook cell.
|
|
206
|
+
*/
|
|
207
|
+
cellTextDocuments: TextDocumentItem[];
|
|
195
208
|
}
|
|
196
209
|
/**
|
|
197
210
|
* A notification sent when a notebook opens.
|
|
@@ -202,13 +215,82 @@ export declare namespace DidOpenNotebookDocumentNotification {
|
|
|
202
215
|
const method: 'notebookDocument/didOpen';
|
|
203
216
|
const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, void>;
|
|
204
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* A change describing how to move a `NotebookCell`
|
|
220
|
+
* array from state S to S'.
|
|
221
|
+
*
|
|
222
|
+
* @since 3.17.0 - proposed state
|
|
223
|
+
*/
|
|
224
|
+
export interface NotebookCellArrayChange {
|
|
225
|
+
/**
|
|
226
|
+
* The start oftest of the cell that changed.
|
|
227
|
+
*/
|
|
228
|
+
start: uinteger;
|
|
229
|
+
/**
|
|
230
|
+
* The deleted cells
|
|
231
|
+
*/
|
|
232
|
+
deleteCount: uinteger;
|
|
233
|
+
/**
|
|
234
|
+
* The new cells, if any
|
|
235
|
+
*/
|
|
236
|
+
cells?: NotebookCell[];
|
|
237
|
+
}
|
|
238
|
+
export declare namespace NotebookCellArrayChange {
|
|
239
|
+
function is(value: any): value is NotebookCellArrayChange;
|
|
240
|
+
function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellArrayChange;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* A change event for a notebook document.
|
|
244
|
+
*
|
|
245
|
+
* @since 3.17.0 - proposed state
|
|
246
|
+
*/
|
|
205
247
|
export interface NotebookDocumentChangeEvent {
|
|
206
|
-
|
|
248
|
+
/**
|
|
249
|
+
* The changed meta data if any.
|
|
250
|
+
*/
|
|
251
|
+
metadata?: LSPObject;
|
|
252
|
+
/**
|
|
253
|
+
* Changes to the cell structure to add or
|
|
254
|
+
* remove cells.
|
|
255
|
+
*/
|
|
256
|
+
cellStructure?: {
|
|
257
|
+
/**
|
|
258
|
+
* The change to the cell array.
|
|
259
|
+
*/
|
|
260
|
+
array: NotebookCellArrayChange;
|
|
261
|
+
/**
|
|
262
|
+
* Additional opened cell text documents.
|
|
263
|
+
*/
|
|
264
|
+
didOpen?: TextDocumentItem[];
|
|
265
|
+
/**
|
|
266
|
+
* Additional closed cell text documents.
|
|
267
|
+
*/
|
|
268
|
+
didClose?: TextDocumentIdentifier[];
|
|
269
|
+
};
|
|
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
|
+
}[];
|
|
207
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* The params sent in a change notebook document notification.
|
|
285
|
+
*
|
|
286
|
+
* @since 3.17.0 - proposed state
|
|
287
|
+
*/
|
|
208
288
|
export interface DidChangeNotebookDocumentParams {
|
|
209
289
|
/**
|
|
210
290
|
* The notebook document that did change. The version number points
|
|
211
|
-
* to the version after all provided changes have been applied.
|
|
291
|
+
* to the version after all provided changes have been applied. If
|
|
292
|
+
* only the text document content of a cell changes the notebook version
|
|
293
|
+
* doesn't necessarily have to change.
|
|
212
294
|
*/
|
|
213
295
|
notebookDocument: VersionedNotebookDocumentIdentifier;
|
|
214
296
|
/**
|
|
@@ -226,12 +308,32 @@ export interface DidChangeNotebookDocumentParams {
|
|
|
226
308
|
* - apply the `NotebookChangeEvent`s in a single notification in the order
|
|
227
309
|
* you receive them.
|
|
228
310
|
*/
|
|
229
|
-
|
|
311
|
+
change: NotebookDocumentChangeEvent;
|
|
230
312
|
}
|
|
231
313
|
export declare namespace DidChangeNotebookDocumentNotification {
|
|
232
314
|
const method: 'notebookDocument/didChange';
|
|
233
315
|
const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, void>;
|
|
234
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* The params sent in a save notebook document notification.
|
|
319
|
+
*
|
|
320
|
+
* @since 3.17.0 - proposed state
|
|
321
|
+
*/
|
|
322
|
+
export interface DidSaveNotebookDocumentParams {
|
|
323
|
+
/**
|
|
324
|
+
* The notebook document that got saved.
|
|
325
|
+
*/
|
|
326
|
+
notebookDocument: NotebookDocumentIdentifier;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* A notification sent when a notebook document is saved.
|
|
330
|
+
*
|
|
331
|
+
* @since 3.17.0 - proposed state
|
|
332
|
+
*/
|
|
333
|
+
export declare namespace DidSaveNotebookDocumentNotification {
|
|
334
|
+
const method: 'notebookDocument/didSave';
|
|
335
|
+
const type: ProtocolNotificationType<DidSaveNotebookDocumentParams, void>;
|
|
336
|
+
}
|
|
235
337
|
/**
|
|
236
338
|
* The params sent in a close notebook document notification.
|
|
237
339
|
*
|
|
@@ -239,9 +341,14 @@ export declare namespace DidChangeNotebookDocumentNotification {
|
|
|
239
341
|
*/
|
|
240
342
|
export interface DidCloseNotebookDocumentParams {
|
|
241
343
|
/**
|
|
242
|
-
* The notebook document that got
|
|
344
|
+
* The notebook document that got closed.
|
|
243
345
|
*/
|
|
244
346
|
notebookDocument: NotebookDocumentIdentifier;
|
|
347
|
+
/**
|
|
348
|
+
* The text documents that represent the content
|
|
349
|
+
* of a notebook cell that got closed.
|
|
350
|
+
*/
|
|
351
|
+
cellTextDocuments: TextDocumentIdentifier[];
|
|
245
352
|
}
|
|
246
353
|
/**
|
|
247
354
|
* A notification sent when a notebook closes.
|
|
@@ -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.DidChangeNotebookDocumentNotification = exports.
|
|
7
|
+
exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = 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");
|
|
@@ -36,30 +36,66 @@ var NotebookCell;
|
|
|
36
36
|
NotebookCell.create = create;
|
|
37
37
|
function is(value) {
|
|
38
38
|
const candidate = value;
|
|
39
|
-
return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document)
|
|
39
|
+
return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) &&
|
|
40
|
+
(candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));
|
|
40
41
|
}
|
|
41
42
|
NotebookCell.is = is;
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var NotebookCellChange;
|
|
48
|
-
(function (NotebookCellChange) {
|
|
49
|
-
function is(value) {
|
|
50
|
-
const candidate = value;
|
|
51
|
-
return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is));
|
|
43
|
+
function equals(one, other, compareMetaData = false) {
|
|
44
|
+
if (one.kind !== other.kind || one.document !== other.document) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return !compareMetaData || (compareMetaData && equalsMetadata(one.metadata, other.metadata));
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
result.cells = cells;
|
|
49
|
+
NotebookCell.equals = equals;
|
|
50
|
+
function equalsMetadata(one, other) {
|
|
51
|
+
if (one === other) {
|
|
52
|
+
return true;
|
|
58
53
|
}
|
|
59
|
-
|
|
54
|
+
if (one === null || one === undefined || other === null || other === undefined) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (typeof one !== typeof other) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (typeof one !== 'object') {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const oneArray = Array.isArray(one);
|
|
64
|
+
const otherArray = Array.isArray(other);
|
|
65
|
+
if (oneArray !== otherArray) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (oneArray && otherArray) {
|
|
69
|
+
if (one.length !== other.length) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
for (let i = 0; i < one.length; i++) {
|
|
73
|
+
if (!equalsMetadata(one[i], other[i])) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (Is.objectLiteral(one) && Is.objectLiteral(other)) {
|
|
79
|
+
const oneKeys = Object.keys(one);
|
|
80
|
+
const otherKeys = Object.keys(other);
|
|
81
|
+
if (oneKeys.length !== otherKeys.length) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
oneKeys.sort();
|
|
85
|
+
otherKeys.sort();
|
|
86
|
+
if (!equalsMetadata(oneKeys, otherKeys)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
for (let i = 0; i < oneKeys.length; i++) {
|
|
90
|
+
const prop = oneKeys[i];
|
|
91
|
+
if (!equalsMetadata(one[prop], other[prop])) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
60
97
|
}
|
|
61
|
-
|
|
62
|
-
})(NotebookCellChange = exports.NotebookCellChange || (exports.NotebookCellChange = {}));
|
|
98
|
+
})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));
|
|
63
99
|
var NotebookDocument;
|
|
64
100
|
(function (NotebookDocument) {
|
|
65
101
|
function create(uri, notebookType, version, cells) {
|
|
@@ -87,11 +123,37 @@ var DidOpenNotebookDocumentNotification;
|
|
|
87
123
|
DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';
|
|
88
124
|
DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);
|
|
89
125
|
})(DidOpenNotebookDocumentNotification = exports.DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = {}));
|
|
126
|
+
var NotebookCellArrayChange;
|
|
127
|
+
(function (NotebookCellArrayChange) {
|
|
128
|
+
function is(value) {
|
|
129
|
+
const candidate = value;
|
|
130
|
+
return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is));
|
|
131
|
+
}
|
|
132
|
+
NotebookCellArrayChange.is = is;
|
|
133
|
+
function create(start, deleteCount, cells) {
|
|
134
|
+
const result = { start, deleteCount };
|
|
135
|
+
if (cells !== undefined) {
|
|
136
|
+
result.cells = cells;
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
NotebookCellArrayChange.create = create;
|
|
141
|
+
})(NotebookCellArrayChange = exports.NotebookCellArrayChange || (exports.NotebookCellArrayChange = {}));
|
|
90
142
|
var DidChangeNotebookDocumentNotification;
|
|
91
143
|
(function (DidChangeNotebookDocumentNotification) {
|
|
92
144
|
DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';
|
|
93
145
|
DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);
|
|
94
146
|
})(DidChangeNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = {}));
|
|
147
|
+
/**
|
|
148
|
+
* A notification sent when a notebook document is saved.
|
|
149
|
+
*
|
|
150
|
+
* @since 3.17.0 - proposed state
|
|
151
|
+
*/
|
|
152
|
+
var DidSaveNotebookDocumentNotification;
|
|
153
|
+
(function (DidSaveNotebookDocumentNotification) {
|
|
154
|
+
DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave';
|
|
155
|
+
DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method);
|
|
156
|
+
})(DidSaveNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = {}));
|
|
95
157
|
/**
|
|
96
158
|
* A notification sent when a notebook closes.
|
|
97
159
|
*
|
package/lib/common/protocol.d.ts
CHANGED
|
@@ -129,6 +129,19 @@ export declare type NotebookCellTextDocumentFilter = {
|
|
|
129
129
|
* notebook cell document.
|
|
130
130
|
*/
|
|
131
131
|
cellLanguage?: string;
|
|
132
|
+
} | {
|
|
133
|
+
/**
|
|
134
|
+
* A filter that matches against the notebook
|
|
135
|
+
* containing the notebook cell.
|
|
136
|
+
*/
|
|
137
|
+
notebookDocument?: NotebookDocumentFilter;
|
|
138
|
+
/**
|
|
139
|
+
* A language id like `python`.
|
|
140
|
+
*
|
|
141
|
+
* Will be matched against the language id of the
|
|
142
|
+
* notebook cell document.
|
|
143
|
+
*/
|
|
144
|
+
cellLanguage: string;
|
|
132
145
|
};
|
|
133
146
|
/**
|
|
134
147
|
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
package/lib/common/protocol.js
CHANGED
|
@@ -97,7 +97,7 @@ var NotebookCellTextDocumentFilter;
|
|
|
97
97
|
(function (NotebookCellTextDocumentFilter) {
|
|
98
98
|
function is(value) {
|
|
99
99
|
const candidate = value;
|
|
100
|
-
return Is.objectLiteral(candidate) && NotebookDocumentFilter.is(candidate.notebookDocument)
|
|
100
|
+
return Is.objectLiteral(candidate) && (NotebookDocumentFilter.is(candidate.notebookDocument) || Is.string(candidate.cellLanguage));
|
|
101
101
|
}
|
|
102
102
|
NotebookCellTextDocumentFilter.is = is;
|
|
103
103
|
})(NotebookCellTextDocumentFilter = exports.NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-languageserver-protocol",
|
|
3
3
|
"description": "VSCode Language Server Protocol implementation",
|
|
4
|
-
"version": "3.17.0-next.
|
|
4
|
+
"version": "3.17.0-next.13",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"typings": "./lib/common/api.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode-jsonrpc": "8.0.0-next.
|
|
22
|
-
"vscode-languageserver-types": "3.17.0-next.
|
|
21
|
+
"vscode-jsonrpc": "8.0.0-next.6",
|
|
22
|
+
"vscode-languageserver-types": "3.17.0-next.7"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test",
|