vscode-languageserver-protocol 3.17.0-next.1 → 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/browser/main.js +1 -1
- package/lib/common/api.d.ts +94 -2
- package/lib/common/api.js +52 -1
- package/lib/common/connection.d.ts +19 -19
- package/lib/common/connection.js +1 -1
- package/lib/common/messages.js +0 -3
- package/lib/common/proposed.diagnostic.d.ts +299 -14
- package/lib/common/proposed.diagnostic.js +65 -7
- package/lib/common/proposed.inlineValue.d.ts +86 -0
- package/lib/common/proposed.inlineValue.js +29 -0
- package/lib/common/proposed.notebooks.d.ts +361 -0
- package/lib/common/proposed.notebooks.js +167 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.js +1 -1
- package/lib/common/protocol.configuration.d.ts +4 -3
- package/lib/common/protocol.d.ts +219 -22
- package/lib/common/protocol.declaration.d.ts +1 -1
- package/lib/common/protocol.fileOperations.d.ts +1 -1
- package/lib/common/protocol.implementation.d.ts +1 -1
- package/lib/common/protocol.js +56 -10
- package/lib/common/protocol.semanticTokens.d.ts +26 -1
- package/lib/common/protocol.typeDefinition.d.ts +1 -1
- package/lib/node/main.js +1 -1
- package/package.json +4 -4
|
@@ -1,14 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* --------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c)
|
|
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
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0;
|
|
8
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
|
+
const Is = require("./utils/is");
|
|
8
10
|
const messages_1 = require("./messages");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @since 3.17.0 - proposed state
|
|
13
|
+
*/
|
|
14
|
+
var DiagnosticServerCancellationData;
|
|
15
|
+
(function (DiagnosticServerCancellationData) {
|
|
16
|
+
function is(value) {
|
|
17
|
+
const candidate = value;
|
|
18
|
+
return candidate && Is.boolean(candidate.retriggerRequest);
|
|
19
|
+
}
|
|
20
|
+
DiagnosticServerCancellationData.is = is;
|
|
21
|
+
})(DiagnosticServerCancellationData = exports.DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = {}));
|
|
22
|
+
/**
|
|
23
|
+
* The document diagnostic report kinds.
|
|
24
|
+
*
|
|
25
|
+
* @since 3.17.0 - proposed state
|
|
26
|
+
*/
|
|
27
|
+
var DocumentDiagnosticReportKind;
|
|
28
|
+
(function (DocumentDiagnosticReportKind) {
|
|
29
|
+
/**
|
|
30
|
+
* A diagnostic report with a full
|
|
31
|
+
* set of problems.
|
|
32
|
+
*/
|
|
33
|
+
DocumentDiagnosticReportKind["full"] = "full";
|
|
34
|
+
/**
|
|
35
|
+
* A report indicating that the last
|
|
36
|
+
* returned report is still accurate.
|
|
37
|
+
*/
|
|
38
|
+
DocumentDiagnosticReportKind["unChanged"] = "unChanged";
|
|
39
|
+
})(DocumentDiagnosticReportKind = exports.DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = {}));
|
|
40
|
+
/**
|
|
41
|
+
* The document diagnostic request definition.
|
|
42
|
+
*
|
|
43
|
+
* @since 3.17.0 - proposed state
|
|
44
|
+
*/
|
|
45
|
+
var DocumentDiagnosticRequest;
|
|
46
|
+
(function (DocumentDiagnosticRequest) {
|
|
47
|
+
DocumentDiagnosticRequest.method = 'textDocument/diagnostic';
|
|
48
|
+
DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method);
|
|
49
|
+
DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();
|
|
50
|
+
})(DocumentDiagnosticRequest = exports.DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = {}));
|
|
51
|
+
/**
|
|
52
|
+
* The workspace diagnostic request definition.
|
|
53
|
+
*
|
|
54
|
+
* @since 3.17.0 - proposed state
|
|
55
|
+
*/
|
|
56
|
+
var WorkspaceDiagnosticRequest;
|
|
57
|
+
(function (WorkspaceDiagnosticRequest) {
|
|
58
|
+
WorkspaceDiagnosticRequest.method = 'workspace/diagnostic';
|
|
59
|
+
WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method);
|
|
60
|
+
WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();
|
|
61
|
+
})(WorkspaceDiagnosticRequest = exports.WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = {}));
|
|
62
|
+
/**
|
|
63
|
+
* The diagnostic refresh request definition.
|
|
64
|
+
*
|
|
65
|
+
* @since 3.17.0 - proposed state
|
|
66
|
+
*/
|
|
67
|
+
var DiagnosticRefreshRequest;
|
|
68
|
+
(function (DiagnosticRefreshRequest) {
|
|
69
|
+
DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`;
|
|
70
|
+
DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method);
|
|
71
|
+
})(DiagnosticRefreshRequest = exports.DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = {}));
|
|
14
72
|
//# sourceMappingURL=proposed.diagnostic.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { TextDocumentIdentifier, Range, InlineValue, InlineValuesContext } from 'vscode-languageserver-types';
|
|
2
|
+
import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc';
|
|
3
|
+
import { ProtocolRequestType, ProtocolRequestType0 } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Client capabilities specific to inline values.
|
|
7
|
+
*
|
|
8
|
+
* @since 3.17.0 - proposed state
|
|
9
|
+
*/
|
|
10
|
+
export interface InlineValuesClientCapabilities {
|
|
11
|
+
/**
|
|
12
|
+
* Whether implementation supports dynamic registration for inline value providers.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Client workspace capabilities specific to inline values.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.17.0 - proposed state
|
|
20
|
+
*/
|
|
21
|
+
export interface InlineValuesWorkspaceClientCapabilities {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the client implementation supports a refresh request sent from the
|
|
24
|
+
* server to the client.
|
|
25
|
+
*
|
|
26
|
+
* Note that this event is global and will force the client to refresh all
|
|
27
|
+
* inline values currently shown. It should be used with absolute care and is
|
|
28
|
+
* useful for situation where a server for example detect a project wide
|
|
29
|
+
* change that requires such a calculation.
|
|
30
|
+
*/
|
|
31
|
+
refreshSupport?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Inline values options used during static registration.
|
|
35
|
+
*
|
|
36
|
+
* @since 3.17.0 - proposed state
|
|
37
|
+
*/
|
|
38
|
+
export interface InlineValuesOptions extends WorkDoneProgressOptions {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Inline value options used during static or dynamic registration.
|
|
42
|
+
*
|
|
43
|
+
* @since 3.17.0 - proposed state
|
|
44
|
+
*/
|
|
45
|
+
export interface InlineValuesRegistrationOptions extends InlineValuesOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A parameter literal used in inline values requests.
|
|
49
|
+
*
|
|
50
|
+
* @since 3.17.0 - proposed state
|
|
51
|
+
*/
|
|
52
|
+
export interface InlineValuesParams extends WorkDoneProgressParams {
|
|
53
|
+
/**
|
|
54
|
+
* The text document.
|
|
55
|
+
*/
|
|
56
|
+
textDocument: TextDocumentIdentifier;
|
|
57
|
+
/**
|
|
58
|
+
* The visible document range for which inline values should be computed.
|
|
59
|
+
*/
|
|
60
|
+
viewPort: Range;
|
|
61
|
+
/**
|
|
62
|
+
* Additional information about the context in which inline values were
|
|
63
|
+
* requested.
|
|
64
|
+
*/
|
|
65
|
+
context: InlineValuesContext;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A request to provide inline values in a document. The request's parameter is of
|
|
69
|
+
* type [InlineValuesParams](#InlineValuesParams), the response is of type
|
|
70
|
+
* [InlineValue[]](#InlineValue[]) or a Thenable that resolves to such.
|
|
71
|
+
*
|
|
72
|
+
* @since 3.17.0 - proposed state
|
|
73
|
+
*/
|
|
74
|
+
export declare namespace InlineValuesRequest {
|
|
75
|
+
const method: 'textDocument/inlineValues';
|
|
76
|
+
const type: ProtocolRequestType<InlineValuesParams, InlineValue[] | null, InlineValue[], any, InlineValuesRegistrationOptions>;
|
|
77
|
+
type HandlerSignature = RequestHandler<InlineValuesParams, InlineValue[] | null, void>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @since 3.17.0 - proposed state
|
|
81
|
+
*/
|
|
82
|
+
export declare namespace InlineValuesRefreshRequest {
|
|
83
|
+
const method: `workspace/inlineValues/refresh`;
|
|
84
|
+
const type: ProtocolRequestType0<void, void, void, void>;
|
|
85
|
+
type HandlerSignature = RequestHandler0<void, void>;
|
|
86
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.InlineValuesRefreshRequest = exports.InlineValuesRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to provide inline values in a document. The request's parameter is of
|
|
11
|
+
* type [InlineValuesParams](#InlineValuesParams), the response is of type
|
|
12
|
+
* [InlineValue[]](#InlineValue[]) or a Thenable that resolves to such.
|
|
13
|
+
*
|
|
14
|
+
* @since 3.17.0 - proposed state
|
|
15
|
+
*/
|
|
16
|
+
var InlineValuesRequest;
|
|
17
|
+
(function (InlineValuesRequest) {
|
|
18
|
+
InlineValuesRequest.method = 'textDocument/inlineValues';
|
|
19
|
+
InlineValuesRequest.type = new messages_1.ProtocolRequestType(InlineValuesRequest.method);
|
|
20
|
+
})(InlineValuesRequest = exports.InlineValuesRequest || (exports.InlineValuesRequest = {}));
|
|
21
|
+
/**
|
|
22
|
+
* @since 3.17.0 - proposed state
|
|
23
|
+
*/
|
|
24
|
+
var InlineValuesRefreshRequest;
|
|
25
|
+
(function (InlineValuesRefreshRequest) {
|
|
26
|
+
InlineValuesRefreshRequest.method = `workspace/inlineValues/refresh`;
|
|
27
|
+
InlineValuesRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValuesRefreshRequest.method);
|
|
28
|
+
})(InlineValuesRefreshRequest = exports.InlineValuesRefreshRequest || (exports.InlineValuesRefreshRequest = {}));
|
|
29
|
+
//# sourceMappingURL=proposed.inlineValue.js.map
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { URI, integer, DocumentUri, uinteger, LSPObject, TextDocumentItem, TextDocumentIdentifier, VersionedTextDocumentIdentifier } from 'vscode-languageserver-types';
|
|
2
|
+
import { ProtocolNotificationType, RegistrationType } from './messages';
|
|
3
|
+
import { StaticRegistrationOptions, NotebookDocumentFilter, TextDocumentContentChangeEvent } 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
|
+
* 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
|
+
*
|
|
47
|
+
* @since 3.17.0 - proposed state
|
|
48
|
+
*/
|
|
49
|
+
export interface NotebookCell {
|
|
50
|
+
/**
|
|
51
|
+
* The cell's kind
|
|
52
|
+
*/
|
|
53
|
+
kind: NotebookCellKind;
|
|
54
|
+
/**
|
|
55
|
+
* The URI of the cell's text document
|
|
56
|
+
* content.
|
|
57
|
+
*/
|
|
58
|
+
document: DocumentUri;
|
|
59
|
+
/**
|
|
60
|
+
* Additional metadata stored with the cell.
|
|
61
|
+
*/
|
|
62
|
+
metadata?: LSPObject;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace NotebookCell {
|
|
65
|
+
function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell;
|
|
66
|
+
function is(value: any): value is NotebookCell;
|
|
67
|
+
function equals(one: NotebookCell, other: NotebookCell, compareMetaData?: boolean): boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A notebook document.
|
|
71
|
+
*
|
|
72
|
+
* @since 3.17.0 - proposed state
|
|
73
|
+
*/
|
|
74
|
+
export interface NotebookDocument {
|
|
75
|
+
/**
|
|
76
|
+
* The notebook document's uri.
|
|
77
|
+
*/
|
|
78
|
+
uri: URI;
|
|
79
|
+
/**
|
|
80
|
+
* The type of the notebook.
|
|
81
|
+
*/
|
|
82
|
+
notebookType: string;
|
|
83
|
+
/**
|
|
84
|
+
* The version number of this document (it will increase after each
|
|
85
|
+
* change, including undo/redo).
|
|
86
|
+
*/
|
|
87
|
+
version: integer;
|
|
88
|
+
/**
|
|
89
|
+
* Additional metadata stored with the notebook
|
|
90
|
+
* document.
|
|
91
|
+
*/
|
|
92
|
+
metadata?: LSPObject;
|
|
93
|
+
/**
|
|
94
|
+
* The cells of a notebook.
|
|
95
|
+
*/
|
|
96
|
+
cells: NotebookCell[];
|
|
97
|
+
}
|
|
98
|
+
export declare namespace NotebookDocument {
|
|
99
|
+
function create(uri: URI, notebookType: string, version: integer, cells: NotebookCell[]): NotebookDocument;
|
|
100
|
+
function is(value: any): value is NotebookDocument;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A literal to identify a notebook document in the client.
|
|
104
|
+
*
|
|
105
|
+
* @since 3.17.0 - proposed state
|
|
106
|
+
*/
|
|
107
|
+
export interface NotebookDocumentIdentifier {
|
|
108
|
+
/**
|
|
109
|
+
* The notebook document's uri.
|
|
110
|
+
*/
|
|
111
|
+
uri: URI;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A versioned notebook document identifier.
|
|
115
|
+
*
|
|
116
|
+
* @since 3.17.0 - proposed state
|
|
117
|
+
*/
|
|
118
|
+
export interface VersionedNotebookDocumentIdentifier {
|
|
119
|
+
/**
|
|
120
|
+
* The version number of this notebook document.
|
|
121
|
+
*/
|
|
122
|
+
version: integer;
|
|
123
|
+
/**
|
|
124
|
+
* The notebook document's uri.
|
|
125
|
+
*/
|
|
126
|
+
uri: URI;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Options specific to a notebook plus its cells
|
|
130
|
+
* to be synced to the server.
|
|
131
|
+
*
|
|
132
|
+
* If a selector provide a notebook document
|
|
133
|
+
* filter but no cell selector all cells of a
|
|
134
|
+
* matching notebook document will be synced.
|
|
135
|
+
*
|
|
136
|
+
* If a selector provides no notebook document
|
|
137
|
+
* filter but only a cell selector all notebook
|
|
138
|
+
* document that contain at least one matching
|
|
139
|
+
* cell will be synced.
|
|
140
|
+
*
|
|
141
|
+
* @since 3.17.0 - proposed state
|
|
142
|
+
*/
|
|
143
|
+
export declare type NotebookDocumentSyncOptions = {
|
|
144
|
+
/**
|
|
145
|
+
* The notebook document to be synced
|
|
146
|
+
*/
|
|
147
|
+
notebookDocumentSelector: ({
|
|
148
|
+
/** The notebook documents to be synced */
|
|
149
|
+
notebookDocumentFilter: NotebookDocumentFilter;
|
|
150
|
+
/** The cells of the matching notebook to be synced */
|
|
151
|
+
cellSelector?: {
|
|
152
|
+
language: string;
|
|
153
|
+
}[];
|
|
154
|
+
} | {
|
|
155
|
+
/** The notebook documents to be synced */
|
|
156
|
+
notebookDocumentFilter?: NotebookDocumentFilter;
|
|
157
|
+
/** The cells of the matching notebook to be synced */
|
|
158
|
+
cellSelector: {
|
|
159
|
+
language: string;
|
|
160
|
+
}[];
|
|
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;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Registration options specific to a notebook.
|
|
182
|
+
*
|
|
183
|
+
* @since 3.17.0 - proposed state
|
|
184
|
+
*/
|
|
185
|
+
export declare type NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncOptions & StaticRegistrationOptions;
|
|
186
|
+
export interface $NotebookDocumentSyncServerCapabilities {
|
|
187
|
+
notebookDocumentSync?: NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions;
|
|
188
|
+
}
|
|
189
|
+
export declare namespace NotebookDocumentSyncRegistrationType {
|
|
190
|
+
const method: 'notebookDocument/sync';
|
|
191
|
+
const type: RegistrationType<NotebookDocumentSyncRegistrationOptions>;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The params sent in a open notebook document notification.
|
|
195
|
+
*
|
|
196
|
+
* @since 3.17.0 - proposed state
|
|
197
|
+
*/
|
|
198
|
+
export interface DidOpenNotebookDocumentParams {
|
|
199
|
+
/**
|
|
200
|
+
* The notebook document that got opened.
|
|
201
|
+
*/
|
|
202
|
+
notebookDocument: NotebookDocument;
|
|
203
|
+
/**
|
|
204
|
+
* The text documents that represent the content
|
|
205
|
+
* of a notebook cell.
|
|
206
|
+
*/
|
|
207
|
+
cellTextDocuments: TextDocumentItem[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* A notification sent when a notebook opens.
|
|
211
|
+
*
|
|
212
|
+
* @since 3.17.0 - proposed state
|
|
213
|
+
*/
|
|
214
|
+
export declare namespace DidOpenNotebookDocumentNotification {
|
|
215
|
+
const method: 'notebookDocument/didOpen';
|
|
216
|
+
const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, void>;
|
|
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
|
+
*/
|
|
247
|
+
export interface NotebookDocumentChangeEvent {
|
|
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
|
+
}[];
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* The params sent in a change notebook document notification.
|
|
285
|
+
*
|
|
286
|
+
* @since 3.17.0 - proposed state
|
|
287
|
+
*/
|
|
288
|
+
export interface DidChangeNotebookDocumentParams {
|
|
289
|
+
/**
|
|
290
|
+
* The notebook document that did change. The version number points
|
|
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.
|
|
294
|
+
*/
|
|
295
|
+
notebookDocument: VersionedNotebookDocumentIdentifier;
|
|
296
|
+
/**
|
|
297
|
+
* The actual changes to the notebook document.
|
|
298
|
+
*
|
|
299
|
+
* The changes describe single state changes to the notebook document.
|
|
300
|
+
* So if there are two changes c1 (at array index 0) and c2 (at array
|
|
301
|
+
* index 1) for a notebook in state S then c1 moves the notebook from
|
|
302
|
+
* S to S' and c2 from S' to S''. So c1 is computed on the state S and
|
|
303
|
+
* c2 is computed on the state S'.
|
|
304
|
+
*
|
|
305
|
+
* To mirror the content of a notebook using change events use the following approach:
|
|
306
|
+
* - start with the same initial content
|
|
307
|
+
* - apply the 'notebookDocument/didChange' notifications in the order you receive them.
|
|
308
|
+
* - apply the `NotebookChangeEvent`s in a single notification in the order
|
|
309
|
+
* you receive them.
|
|
310
|
+
*/
|
|
311
|
+
change: NotebookDocumentChangeEvent;
|
|
312
|
+
}
|
|
313
|
+
export declare namespace DidChangeNotebookDocumentNotification {
|
|
314
|
+
const method: 'notebookDocument/didChange';
|
|
315
|
+
const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, void>;
|
|
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
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* The params sent in a close notebook document notification.
|
|
339
|
+
*
|
|
340
|
+
* @since 3.17.0 - proposed state
|
|
341
|
+
*/
|
|
342
|
+
export interface DidCloseNotebookDocumentParams {
|
|
343
|
+
/**
|
|
344
|
+
* The notebook document that got closed.
|
|
345
|
+
*/
|
|
346
|
+
notebookDocument: NotebookDocumentIdentifier;
|
|
347
|
+
/**
|
|
348
|
+
* The text documents that represent the content
|
|
349
|
+
* of a notebook cell that got closed.
|
|
350
|
+
*/
|
|
351
|
+
cellTextDocuments: TextDocumentIdentifier[];
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* A notification sent when a notebook closes.
|
|
355
|
+
*
|
|
356
|
+
* @since 3.17.0 - proposed state
|
|
357
|
+
*/
|
|
358
|
+
export declare namespace DidCloseNotebookDocumentNotification {
|
|
359
|
+
const method: 'notebookDocument/didClose';
|
|
360
|
+
const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, void>;
|
|
361
|
+
}
|