vscode-languageserver-protocol 3.17.0-next.11 → 3.17.0-next.12
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 +23 -0
- package/lib/common/api.js +8 -0
- package/lib/common/proposed.notebooks.d.ts +254 -0
- package/lib/common/proposed.notebooks.js +105 -0
- package/lib/common/protocol.d.ts +89 -6
- package/lib/common/protocol.js +39 -9
- package/package.json +3 -3
package/lib/common/api.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare namespace LSPErrorCodes {
|
|
|
56
56
|
import * as diag from './proposed.diagnostic';
|
|
57
57
|
import * as typeh from './proposed.typeHierarchy';
|
|
58
58
|
import * as iv from './proposed.inlineValue';
|
|
59
|
+
import * as nb from './proposed.notebooks';
|
|
59
60
|
export declare namespace Proposed {
|
|
60
61
|
type DiagnosticClientCapabilities = diag.DiagnosticClientCapabilities;
|
|
61
62
|
type $DiagnosticClientCapabilities = diag.$DiagnosticClientCapabilities;
|
|
@@ -98,4 +99,26 @@ export declare namespace Proposed {
|
|
|
98
99
|
type InlineValuesParams = iv.InlineValuesParams;
|
|
99
100
|
const InlineValuesRequest: typeof iv.InlineValuesRequest;
|
|
100
101
|
const InlineValuesRefreshRequest: typeof iv.InlineValuesRefreshRequest;
|
|
102
|
+
type $NotebookDocumentClientCapabilities = nb.$NotebookDocumentClientCapabilities;
|
|
103
|
+
type NotebookDocumentSyncClientCapabilities = nb.NotebookDocumentSyncClientCapabilities;
|
|
104
|
+
type $NotebookDocumentServerCapabilities = nb.$NotebookDocumentServerCapabilities;
|
|
105
|
+
type NotebookCellKind = nb.NotebookCellKind;
|
|
106
|
+
const NotebookCellKind: typeof nb.NotebookCellKind;
|
|
107
|
+
type NotebookCell = nb.NotebookCell;
|
|
108
|
+
const NotebookCell: typeof nb.NotebookCell;
|
|
109
|
+
type NotebookCellChange = nb.NotebookCellChange;
|
|
110
|
+
type NotebookDocument = nb.NotebookDocument;
|
|
111
|
+
const NotebookDocument: typeof nb.NotebookDocument;
|
|
112
|
+
type NotebookDocumentChangeEvent = nb.NotebookDocumentChangeEvent;
|
|
113
|
+
type NotebookDocumentIdentifier = nb.NotebookDocumentIdentifier;
|
|
114
|
+
type VersionedNotebookDocumentIdentifier = nb.VersionedNotebookDocumentIdentifier;
|
|
115
|
+
type NotebookDocumentOptions = nb.NotebookDocumentOptions;
|
|
116
|
+
type NotebookDocumentRegistrationOptions = nb.NotebookDocumentRegistrationOptions;
|
|
117
|
+
const NotebookDocumentSyncRegistrationType: typeof nb.NotebookDocumentSyncRegistrationType;
|
|
118
|
+
type DidOpenNotebookDocumentParams = nb.DidOpenNotebookDocumentParams;
|
|
119
|
+
const DidOpenNotebookDocumentNotification: typeof nb.DidOpenNotebookDocumentNotification;
|
|
120
|
+
type DidChangeNotebookDocumentParams = nb.DidChangeNotebookDocumentParams;
|
|
121
|
+
const DidChangeNotebookDocumentNotification: typeof nb.DidChangeNotebookDocumentNotification;
|
|
122
|
+
type DidCloseNotebookDocumentParams = nb.DidCloseNotebookDocumentParams;
|
|
123
|
+
const DidCloseNotebookDocumentNotification: typeof nb.DidCloseNotebookDocumentNotification;
|
|
101
124
|
}
|
package/lib/common/api.js
CHANGED
|
@@ -74,6 +74,7 @@ var LSPErrorCodes;
|
|
|
74
74
|
const diag = require("./proposed.diagnostic");
|
|
75
75
|
const typeh = require("./proposed.typeHierarchy");
|
|
76
76
|
const iv = require("./proposed.inlineValue");
|
|
77
|
+
const nb = require("./proposed.notebooks");
|
|
77
78
|
var Proposed;
|
|
78
79
|
(function (Proposed) {
|
|
79
80
|
Proposed.DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
|
|
@@ -86,5 +87,12 @@ var Proposed;
|
|
|
86
87
|
Proposed.TypeHierarchySubtypesRequest = typeh.TypeHierarchySubtypesRequest;
|
|
87
88
|
Proposed.InlineValuesRequest = iv.InlineValuesRequest;
|
|
88
89
|
Proposed.InlineValuesRefreshRequest = iv.InlineValuesRefreshRequest;
|
|
90
|
+
Proposed.NotebookCellKind = nb.NotebookCellKind;
|
|
91
|
+
Proposed.NotebookCell = nb.NotebookCell;
|
|
92
|
+
Proposed.NotebookDocument = nb.NotebookDocument;
|
|
93
|
+
Proposed.NotebookDocumentSyncRegistrationType = nb.NotebookDocumentSyncRegistrationType;
|
|
94
|
+
Proposed.DidOpenNotebookDocumentNotification = nb.DidOpenNotebookDocumentNotification;
|
|
95
|
+
Proposed.DidChangeNotebookDocumentNotification = nb.DidChangeNotebookDocumentNotification;
|
|
96
|
+
Proposed.DidCloseNotebookDocumentNotification = nb.DidCloseNotebookDocumentNotification;
|
|
89
97
|
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
90
98
|
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { URI, integer, DocumentUri, uinteger } from 'vscode-languageserver-types';
|
|
2
|
+
import { ProtocolNotificationType, RegistrationType } from './messages';
|
|
3
|
+
import { StaticRegistrationOptions, NotebookDocumentFilter } from './protocol';
|
|
4
|
+
/**
|
|
5
|
+
* Notebook specific client capabilities.
|
|
6
|
+
*
|
|
7
|
+
* @since 3.17.0 - proposed state
|
|
8
|
+
*/
|
|
9
|
+
export interface NotebookDocumentSyncClientCapabilities {
|
|
10
|
+
/**
|
|
11
|
+
* Whether implementation supports dynamic registration. If this is
|
|
12
|
+
* set to `true` the client supports the new
|
|
13
|
+
* `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
14
|
+
* return value for the corresponding server capability as well.
|
|
15
|
+
*/
|
|
16
|
+
dynamicRegistration?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface $NotebookDocumentClientCapabilities {
|
|
19
|
+
notebookDocument?: {
|
|
20
|
+
synchronization: NotebookDocumentSyncClientCapabilities;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A notebook cell kind.
|
|
25
|
+
*
|
|
26
|
+
* @since 3.17.0 - proposed state
|
|
27
|
+
*/
|
|
28
|
+
export declare namespace NotebookCellKind {
|
|
29
|
+
/**
|
|
30
|
+
* A markup-cell is formatted source that is used for display.
|
|
31
|
+
*/
|
|
32
|
+
const Markup: 1;
|
|
33
|
+
/**
|
|
34
|
+
* A code-cell is source code.
|
|
35
|
+
*/
|
|
36
|
+
const Code: 2;
|
|
37
|
+
function is(value: any): value is NotebookCellKind;
|
|
38
|
+
}
|
|
39
|
+
export declare type NotebookCellKind = 1 | 2;
|
|
40
|
+
/**
|
|
41
|
+
* A notebook cell.
|
|
42
|
+
*
|
|
43
|
+
* @since 3.17.0 - proposed state
|
|
44
|
+
*/
|
|
45
|
+
export interface NotebookCell {
|
|
46
|
+
/**
|
|
47
|
+
* The cell's kind
|
|
48
|
+
*/
|
|
49
|
+
kind: NotebookCellKind;
|
|
50
|
+
/**
|
|
51
|
+
* The cell's text represented as a text document.
|
|
52
|
+
* The document's content is synced using the
|
|
53
|
+
* existing text document sync notifications.
|
|
54
|
+
*/
|
|
55
|
+
document: DocumentUri;
|
|
56
|
+
}
|
|
57
|
+
export declare namespace NotebookCell {
|
|
58
|
+
function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell;
|
|
59
|
+
function is(value: any): value is NotebookCell;
|
|
60
|
+
function equal(one: NotebookCell, two: NotebookCell): boolean;
|
|
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;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A notebook document.
|
|
88
|
+
*
|
|
89
|
+
* @since 3.17.0 - proposed state
|
|
90
|
+
*/
|
|
91
|
+
export interface NotebookDocument {
|
|
92
|
+
/**
|
|
93
|
+
* The notebook document's uri.
|
|
94
|
+
*/
|
|
95
|
+
uri: URI;
|
|
96
|
+
/**
|
|
97
|
+
* The type of the notebook.
|
|
98
|
+
*/
|
|
99
|
+
notebookType: string;
|
|
100
|
+
/**
|
|
101
|
+
* The version number of this document (it will increase after each
|
|
102
|
+
* change, including undo/redo).
|
|
103
|
+
*/
|
|
104
|
+
version: integer;
|
|
105
|
+
/**
|
|
106
|
+
* The cells of a notebook.
|
|
107
|
+
*/
|
|
108
|
+
cells: NotebookCell[];
|
|
109
|
+
}
|
|
110
|
+
export declare namespace NotebookDocument {
|
|
111
|
+
function create(uri: URI, notebookType: string, version: integer, cells: NotebookCell[]): NotebookDocument;
|
|
112
|
+
function is(value: any): value is NotebookDocument;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* A literal to identify a notebook document in the client.
|
|
116
|
+
*
|
|
117
|
+
* @since 3.17.0 - proposed state
|
|
118
|
+
*/
|
|
119
|
+
export interface NotebookDocumentIdentifier {
|
|
120
|
+
/**
|
|
121
|
+
* The notebook document's uri.
|
|
122
|
+
*/
|
|
123
|
+
uri: URI;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A versioned notebook document identifier.
|
|
127
|
+
*
|
|
128
|
+
* @since 3.17.0 - proposed state
|
|
129
|
+
*/
|
|
130
|
+
export interface VersionedNotebookDocumentIdentifier {
|
|
131
|
+
/**
|
|
132
|
+
* The version number of this notebook document.
|
|
133
|
+
*/
|
|
134
|
+
version: integer;
|
|
135
|
+
/**
|
|
136
|
+
* The notebook document's uri.
|
|
137
|
+
*/
|
|
138
|
+
uri: URI;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Options specific to a notebook plus its cells
|
|
142
|
+
* to be synced to the server.
|
|
143
|
+
*
|
|
144
|
+
* If a selector provider a notebook document
|
|
145
|
+
* filter but no cell selector all cells of a
|
|
146
|
+
* matching notebook document will be synced.
|
|
147
|
+
*
|
|
148
|
+
* If a selector provides no notebook document
|
|
149
|
+
* filter but only a cell selector all notebook
|
|
150
|
+
* document that contain at least one matching
|
|
151
|
+
* cell will be synced.
|
|
152
|
+
*
|
|
153
|
+
* @since 3.17.0 - proposed state
|
|
154
|
+
*/
|
|
155
|
+
export declare type NotebookDocumentOptions = {
|
|
156
|
+
notebookDocumentSelector?: ({
|
|
157
|
+
/** The notebook documents to be synced */
|
|
158
|
+
notebookDocumentFilter: NotebookDocumentFilter;
|
|
159
|
+
/** The cells of the matching notebook to be synced */
|
|
160
|
+
cellSelector?: {
|
|
161
|
+
language: string;
|
|
162
|
+
}[];
|
|
163
|
+
} | {
|
|
164
|
+
/** The notebook documents to be synced */
|
|
165
|
+
notebookDocumentFilter?: NotebookDocumentFilter;
|
|
166
|
+
/** The cells of the matching notebook to be synced */
|
|
167
|
+
cellSelector: {
|
|
168
|
+
language: string;
|
|
169
|
+
}[];
|
|
170
|
+
})[];
|
|
171
|
+
};
|
|
172
|
+
export interface $NotebookDocumentServerCapabilities {
|
|
173
|
+
notebookDocumentSync?: NotebookDocumentOptions | NotebookDocumentRegistrationOptions;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Registration options specific to a notebook.
|
|
177
|
+
*
|
|
178
|
+
* @since 3.17.0 - proposed state
|
|
179
|
+
*/
|
|
180
|
+
export declare type NotebookDocumentRegistrationOptions = NotebookDocumentOptions & StaticRegistrationOptions;
|
|
181
|
+
export declare namespace NotebookDocumentSyncRegistrationType {
|
|
182
|
+
const method: 'notebookDocument/sync';
|
|
183
|
+
const type: RegistrationType<NotebookDocumentRegistrationOptions>;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The params sent in a open notebook document notification.
|
|
187
|
+
*
|
|
188
|
+
* @since 3.17.0 - proposed state
|
|
189
|
+
*/
|
|
190
|
+
export interface DidOpenNotebookDocumentParams {
|
|
191
|
+
/**
|
|
192
|
+
* The notebook document that got opened.
|
|
193
|
+
*/
|
|
194
|
+
notebookDocument: NotebookDocument;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A notification sent when a notebook opens.
|
|
198
|
+
*
|
|
199
|
+
* @since 3.17.0 - proposed state
|
|
200
|
+
*/
|
|
201
|
+
export declare namespace DidOpenNotebookDocumentNotification {
|
|
202
|
+
const method: 'notebookDocument/didOpen';
|
|
203
|
+
const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, void>;
|
|
204
|
+
}
|
|
205
|
+
export interface NotebookDocumentChangeEvent {
|
|
206
|
+
cells: NotebookCellChange;
|
|
207
|
+
}
|
|
208
|
+
export interface DidChangeNotebookDocumentParams {
|
|
209
|
+
/**
|
|
210
|
+
* The notebook document that did change. The version number points
|
|
211
|
+
* to the version after all provided changes have been applied.
|
|
212
|
+
*/
|
|
213
|
+
notebookDocument: VersionedNotebookDocumentIdentifier;
|
|
214
|
+
/**
|
|
215
|
+
* The actual changes to the notebook document.
|
|
216
|
+
*
|
|
217
|
+
* The changes describe single state changes to the notebook document.
|
|
218
|
+
* So if there are two changes c1 (at array index 0) and c2 (at array
|
|
219
|
+
* index 1) for a notebook in state S then c1 moves the notebook from
|
|
220
|
+
* S to S' and c2 from S' to S''. So c1 is computed on the state S and
|
|
221
|
+
* c2 is computed on the state S'.
|
|
222
|
+
*
|
|
223
|
+
* To mirror the content of a notebook using change events use the following approach:
|
|
224
|
+
* - start with the same initial content
|
|
225
|
+
* - apply the 'notebookDocument/didChange' notifications in the order you receive them.
|
|
226
|
+
* - apply the `NotebookChangeEvent`s in a single notification in the order
|
|
227
|
+
* you receive them.
|
|
228
|
+
*/
|
|
229
|
+
changes: NotebookDocumentChangeEvent[];
|
|
230
|
+
}
|
|
231
|
+
export declare namespace DidChangeNotebookDocumentNotification {
|
|
232
|
+
const method: 'notebookDocument/didChange';
|
|
233
|
+
const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, void>;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The params sent in a close notebook document notification.
|
|
237
|
+
*
|
|
238
|
+
* @since 3.17.0 - proposed state
|
|
239
|
+
*/
|
|
240
|
+
export interface DidCloseNotebookDocumentParams {
|
|
241
|
+
/**
|
|
242
|
+
* The notebook document that got opened.
|
|
243
|
+
*/
|
|
244
|
+
notebookDocument: NotebookDocumentIdentifier;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* A notification sent when a notebook closes.
|
|
248
|
+
*
|
|
249
|
+
* @since 3.17.0 - proposed state
|
|
250
|
+
*/
|
|
251
|
+
export declare namespace DidCloseNotebookDocumentNotification {
|
|
252
|
+
const method: 'notebookDocument/didClose';
|
|
253
|
+
const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, void>;
|
|
254
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
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.DidCloseNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCellChange = exports.NotebookCell = exports.NotebookCellKind = void 0;
|
|
8
|
+
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
9
|
+
const Is = require("./utils/is");
|
|
10
|
+
const messages_1 = require("./messages");
|
|
11
|
+
/**
|
|
12
|
+
* A notebook cell kind.
|
|
13
|
+
*
|
|
14
|
+
* @since 3.17.0 - proposed state
|
|
15
|
+
*/
|
|
16
|
+
var NotebookCellKind;
|
|
17
|
+
(function (NotebookCellKind) {
|
|
18
|
+
/**
|
|
19
|
+
* A markup-cell is formatted source that is used for display.
|
|
20
|
+
*/
|
|
21
|
+
NotebookCellKind.Markup = 1;
|
|
22
|
+
/**
|
|
23
|
+
* A code-cell is source code.
|
|
24
|
+
*/
|
|
25
|
+
NotebookCellKind.Code = 2;
|
|
26
|
+
function is(value) {
|
|
27
|
+
return value === 1 || value === 2;
|
|
28
|
+
}
|
|
29
|
+
NotebookCellKind.is = is;
|
|
30
|
+
})(NotebookCellKind = exports.NotebookCellKind || (exports.NotebookCellKind = {}));
|
|
31
|
+
var NotebookCell;
|
|
32
|
+
(function (NotebookCell) {
|
|
33
|
+
function create(kind, document) {
|
|
34
|
+
return { kind, document };
|
|
35
|
+
}
|
|
36
|
+
NotebookCell.create = create;
|
|
37
|
+
function is(value) {
|
|
38
|
+
const candidate = value;
|
|
39
|
+
return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document);
|
|
40
|
+
}
|
|
41
|
+
NotebookCell.is = is;
|
|
42
|
+
function equal(one, two) {
|
|
43
|
+
return one.kind === two.kind && one.document === two.document;
|
|
44
|
+
}
|
|
45
|
+
NotebookCell.equal = equal;
|
|
46
|
+
})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));
|
|
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));
|
|
52
|
+
}
|
|
53
|
+
NotebookCellChange.is = is;
|
|
54
|
+
function create(start, deleteCount, cells) {
|
|
55
|
+
const result = { start, deleteCount };
|
|
56
|
+
if (cells !== undefined) {
|
|
57
|
+
result.cells = cells;
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
NotebookCellChange.create = create;
|
|
62
|
+
})(NotebookCellChange = exports.NotebookCellChange || (exports.NotebookCellChange = {}));
|
|
63
|
+
var NotebookDocument;
|
|
64
|
+
(function (NotebookDocument) {
|
|
65
|
+
function create(uri, notebookType, version, cells) {
|
|
66
|
+
return { uri, notebookType, version, cells };
|
|
67
|
+
}
|
|
68
|
+
NotebookDocument.create = create;
|
|
69
|
+
function is(value) {
|
|
70
|
+
const candidate = value;
|
|
71
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is);
|
|
72
|
+
}
|
|
73
|
+
NotebookDocument.is = is;
|
|
74
|
+
})(NotebookDocument = exports.NotebookDocument || (exports.NotebookDocument = {}));
|
|
75
|
+
var NotebookDocumentSyncRegistrationType;
|
|
76
|
+
(function (NotebookDocumentSyncRegistrationType) {
|
|
77
|
+
NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync';
|
|
78
|
+
NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method);
|
|
79
|
+
})(NotebookDocumentSyncRegistrationType = exports.NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = {}));
|
|
80
|
+
/**
|
|
81
|
+
* A notification sent when a notebook opens.
|
|
82
|
+
*
|
|
83
|
+
* @since 3.17.0 - proposed state
|
|
84
|
+
*/
|
|
85
|
+
var DidOpenNotebookDocumentNotification;
|
|
86
|
+
(function (DidOpenNotebookDocumentNotification) {
|
|
87
|
+
DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';
|
|
88
|
+
DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);
|
|
89
|
+
})(DidOpenNotebookDocumentNotification = exports.DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = {}));
|
|
90
|
+
var DidChangeNotebookDocumentNotification;
|
|
91
|
+
(function (DidChangeNotebookDocumentNotification) {
|
|
92
|
+
DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';
|
|
93
|
+
DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);
|
|
94
|
+
})(DidChangeNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = {}));
|
|
95
|
+
/**
|
|
96
|
+
* A notification sent when a notebook closes.
|
|
97
|
+
*
|
|
98
|
+
* @since 3.17.0 - proposed state
|
|
99
|
+
*/
|
|
100
|
+
var DidCloseNotebookDocumentNotification;
|
|
101
|
+
(function (DidCloseNotebookDocumentNotification) {
|
|
102
|
+
DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';
|
|
103
|
+
DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);
|
|
104
|
+
})(DidCloseNotebookDocumentNotification = exports.DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = {}));
|
|
105
|
+
//# sourceMappingURL=proposed.notebooks.js.map
|
package/lib/common/protocol.d.ts
CHANGED
|
@@ -33,8 +33,10 @@ import { InlineValuesClientCapabilities, InlineValuesOptions, InlineValuesRegist
|
|
|
33
33
|
*
|
|
34
34
|
* @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
|
|
35
35
|
* @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
|
|
36
|
+
*
|
|
37
|
+
* @since 3.17.0 - proposed state.
|
|
36
38
|
*/
|
|
37
|
-
export declare type
|
|
39
|
+
export declare type TextDocumentFilter = {
|
|
38
40
|
/** A language id, like `typescript`. */
|
|
39
41
|
language: string;
|
|
40
42
|
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
|
|
@@ -57,12 +59,93 @@ export declare type DocumentFilter = {
|
|
|
57
59
|
pattern: string;
|
|
58
60
|
};
|
|
59
61
|
/**
|
|
60
|
-
* The
|
|
61
|
-
* [
|
|
62
|
+
* The TextDocumentFilter namespace provides helper functions to work with
|
|
63
|
+
* [TextDocumentFilter](#TextDocumentFilter) literals.
|
|
64
|
+
*
|
|
65
|
+
* @since 3.17.0 - proposed state.
|
|
66
|
+
*/
|
|
67
|
+
export declare namespace TextDocumentFilter {
|
|
68
|
+
function is(value: any): value is TextDocumentFilter;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A notebook document filter denotes a notebook document by
|
|
72
|
+
* different properties.
|
|
73
|
+
*
|
|
74
|
+
* @since 3.17.0 - proposed state.
|
|
75
|
+
*/
|
|
76
|
+
export declare type NotebookDocumentFilter = {
|
|
77
|
+
/** The type of the enclosing notebook. */
|
|
78
|
+
notebookType: string;
|
|
79
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
80
|
+
* Will be matched against the URI of the notebook. */
|
|
81
|
+
scheme?: string;
|
|
82
|
+
/** A glob pattern, like `*.ipynb`.
|
|
83
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
84
|
+
pattern?: string;
|
|
85
|
+
} | {
|
|
86
|
+
/** The type of the enclosing notebook. */
|
|
87
|
+
notebookType?: string;
|
|
88
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
89
|
+
* Will be matched against the URI of the notebook. */
|
|
90
|
+
scheme: string;
|
|
91
|
+
/** A glob pattern, like `*.ipynb`.
|
|
92
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
93
|
+
pattern?: string;
|
|
94
|
+
} | {
|
|
95
|
+
/** The type of the enclosing notebook. */
|
|
96
|
+
notebookType?: string;
|
|
97
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
98
|
+
* Will be matched against the URI of the notebook. */
|
|
99
|
+
scheme?: string;
|
|
100
|
+
/** A glob pattern, like `*.ipynb`.
|
|
101
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
102
|
+
pattern: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The NotebookDocumentFilter namespace provides helper functions to work with
|
|
106
|
+
* [NotebookDocumentFilter](#NotebookDocumentFilter) literals.
|
|
107
|
+
*
|
|
108
|
+
* @since 3.17.0 - proposed state.
|
|
62
109
|
*/
|
|
63
|
-
export declare namespace
|
|
64
|
-
function is(value: any): value is
|
|
110
|
+
export declare namespace NotebookDocumentFilter {
|
|
111
|
+
function is(value: any): value is NotebookDocumentFilter;
|
|
65
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* A notebook cell text document filter denotes a cell text
|
|
115
|
+
* document by different properties.
|
|
116
|
+
*
|
|
117
|
+
* @since 3.17.0 - proposed state.
|
|
118
|
+
*/
|
|
119
|
+
export declare type NotebookCellTextDocumentFilter = {
|
|
120
|
+
/**
|
|
121
|
+
* A filter that matches against the notebook
|
|
122
|
+
* containing the notebook cell.
|
|
123
|
+
*/
|
|
124
|
+
notebookDocument: NotebookDocumentFilter;
|
|
125
|
+
/**
|
|
126
|
+
* A language id like `python`.
|
|
127
|
+
*
|
|
128
|
+
* Will be matched against the language id of the
|
|
129
|
+
* notebook cell document.
|
|
130
|
+
*/
|
|
131
|
+
cellLanguage?: string;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
|
135
|
+
* [NotebookCellTextDocumentFilter](#NotebookCellTextDocumentFilter) literals.
|
|
136
|
+
*
|
|
137
|
+
* @since 3.17.0 - proposed state.
|
|
138
|
+
*/
|
|
139
|
+
export declare namespace NotebookCellTextDocumentFilter {
|
|
140
|
+
function is(value: any): value is NotebookCellTextDocumentFilter;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* A document filter describes a top level text document or
|
|
144
|
+
* a notebook cell document.
|
|
145
|
+
*
|
|
146
|
+
* @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
|
|
147
|
+
*/
|
|
148
|
+
export declare type DocumentFilter = TextDocumentFilter | NotebookCellTextDocumentFilter;
|
|
66
149
|
/**
|
|
67
150
|
* A document selector is the combination of one or many document filters.
|
|
68
151
|
*
|
|
@@ -729,7 +812,7 @@ export interface _ServerCapabilities<T = any> {
|
|
|
729
812
|
*
|
|
730
813
|
* @since 3.17.0 - proposed state
|
|
731
814
|
*/
|
|
732
|
-
inlineValuesProvider?: boolean | InlineValuesOptions |
|
|
815
|
+
inlineValuesProvider?: boolean | InlineValuesOptions | InlineValuesRegistrationOptions;
|
|
733
816
|
/**
|
|
734
817
|
* Experimental server capabilities.
|
|
735
818
|
*/
|
package/lib/common/protocol.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
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.
|
|
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.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.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = void 0;
|
|
7
|
+
exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = 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.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.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = 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.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.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = void 0;
|
|
9
9
|
const messages_1 = require("./messages");
|
|
10
10
|
const Is = require("./utils/is");
|
|
11
11
|
const protocol_implementation_1 = require("./protocol.implementation");
|
|
@@ -60,17 +60,47 @@ Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: functi
|
|
|
60
60
|
// @ts-ignore: to avoid inlining LocationLink as dynamic import
|
|
61
61
|
let __noDynamicImport;
|
|
62
62
|
/**
|
|
63
|
-
* The
|
|
64
|
-
* [
|
|
63
|
+
* The TextDocumentFilter namespace provides helper functions to work with
|
|
64
|
+
* [TextDocumentFilter](#TextDocumentFilter) literals.
|
|
65
|
+
*
|
|
66
|
+
* @since 3.17.0 - proposed state.
|
|
65
67
|
*/
|
|
66
|
-
var
|
|
67
|
-
(function (
|
|
68
|
+
var TextDocumentFilter;
|
|
69
|
+
(function (TextDocumentFilter) {
|
|
68
70
|
function is(value) {
|
|
69
71
|
const candidate = value;
|
|
70
72
|
return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
|
|
71
73
|
}
|
|
72
|
-
|
|
73
|
-
})(
|
|
74
|
+
TextDocumentFilter.is = is;
|
|
75
|
+
})(TextDocumentFilter = exports.TextDocumentFilter || (exports.TextDocumentFilter = {}));
|
|
76
|
+
/**
|
|
77
|
+
* The NotebookDocumentFilter namespace provides helper functions to work with
|
|
78
|
+
* [NotebookDocumentFilter](#NotebookDocumentFilter) literals.
|
|
79
|
+
*
|
|
80
|
+
* @since 3.17.0 - proposed state.
|
|
81
|
+
*/
|
|
82
|
+
var NotebookDocumentFilter;
|
|
83
|
+
(function (NotebookDocumentFilter) {
|
|
84
|
+
function is(value) {
|
|
85
|
+
const candidate = value;
|
|
86
|
+
return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
|
|
87
|
+
}
|
|
88
|
+
NotebookDocumentFilter.is = is;
|
|
89
|
+
})(NotebookDocumentFilter = exports.NotebookDocumentFilter || (exports.NotebookDocumentFilter = {}));
|
|
90
|
+
/**
|
|
91
|
+
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
|
92
|
+
* [NotebookCellTextDocumentFilter](#NotebookCellTextDocumentFilter) literals.
|
|
93
|
+
*
|
|
94
|
+
* @since 3.17.0 - proposed state.
|
|
95
|
+
*/
|
|
96
|
+
var NotebookCellTextDocumentFilter;
|
|
97
|
+
(function (NotebookCellTextDocumentFilter) {
|
|
98
|
+
function is(value) {
|
|
99
|
+
const candidate = value;
|
|
100
|
+
return Is.objectLiteral(candidate) && NotebookDocumentFilter.is(candidate.notebookDocument) && (candidate.cellLanguage === undefined || Is.string(candidate.cellLanguage));
|
|
101
|
+
}
|
|
102
|
+
NotebookCellTextDocumentFilter.is = is;
|
|
103
|
+
})(NotebookCellTextDocumentFilter = exports.NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = {}));
|
|
74
104
|
/**
|
|
75
105
|
* The DocumentSelector namespace provides helper functions to work with
|
|
76
106
|
* [DocumentSelector](#DocumentSelector)s.
|
|
@@ -82,7 +112,7 @@ var DocumentSelector;
|
|
|
82
112
|
return false;
|
|
83
113
|
}
|
|
84
114
|
for (let elem of value) {
|
|
85
|
-
if (!Is.string(elem) && !
|
|
115
|
+
if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
|
|
86
116
|
return false;
|
|
87
117
|
}
|
|
88
118
|
}
|
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.12",
|
|
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.5",
|
|
22
|
+
"vscode-languageserver-types": "3.17.0-next.6"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test",
|