vscode-languageserver-protocol 3.16.0 → 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/browser/main.js +1 -1
- package/lib/common/api.d.ts +98 -0
- package/lib/common/api.js +56 -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 +324 -0
- package/lib/common/proposed.diagnostic.js +72 -0
- package/lib/common/proposed.inlineValue.d.ts +86 -0
- package/lib/common/proposed.inlineValue.js +29 -0
- package/lib/common/proposed.notebooks.d.ts +254 -0
- package/lib/common/proposed.notebooks.js +105 -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 +250 -23
- 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 -13
- package/lib/common/protocol.semanticTokens.d.ts +27 -118
- package/lib/common/protocol.semanticTokens.js +1 -69
- package/lib/common/protocol.typeDefinition.d.ts +1 -1
- package/lib/node/main.js +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,72 @@
|
|
|
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.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");
|
|
10
|
+
const messages_1 = require("./messages");
|
|
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 = {}));
|
|
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,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
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { TypeHierarchyItem } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.17.0 - proposed state
|
|
7
|
+
*/
|
|
8
|
+
export interface TypeHierarchyClientCapabilities {
|
|
9
|
+
/**
|
|
10
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
11
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
12
|
+
* return value for the corresponding server capability as well.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Type hierarchy options used during static registration.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.17.0 - proposed state
|
|
20
|
+
*/
|
|
21
|
+
export interface TypeHierarchyOptions extends WorkDoneProgressOptions {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Type hierarchy options used during static or dynamic registration.
|
|
25
|
+
*
|
|
26
|
+
* @since 3.17.0 - proposed state
|
|
27
|
+
*/
|
|
28
|
+
export interface TypeHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, TypeHierarchyOptions, StaticRegistrationOptions {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The parameter of a `textDocument/prepareTypeHierarchy` request.
|
|
32
|
+
*
|
|
33
|
+
* @since 3.17.0 - proposed state
|
|
34
|
+
*/
|
|
35
|
+
export interface TypeHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A request to result a `TypeHierarchyItem` in a document at a given position.
|
|
39
|
+
* Can be used as an input to a subtypes or supertypes type hierarchy.
|
|
40
|
+
*
|
|
41
|
+
* @since 3.17.0 - proposed state
|
|
42
|
+
*/
|
|
43
|
+
export declare namespace TypeHierarchyPrepareRequest {
|
|
44
|
+
const method: 'textDocument/prepareTypeHierarchy';
|
|
45
|
+
const type: ProtocolRequestType<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, never, void, TypeHierarchyRegistrationOptions>;
|
|
46
|
+
type HandlerSignature = RequestHandler<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, void>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The parameter of a `typeHierarchy/supertypes` request.
|
|
50
|
+
*
|
|
51
|
+
* @since 3.17.0 - proposed state
|
|
52
|
+
*/
|
|
53
|
+
export interface TypeHierarchySupertypesParams extends WorkDoneProgressParams, PartialResultParams {
|
|
54
|
+
item: TypeHierarchyItem;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A request to resolve the supertypes for a given `TypeHierarchyItem`.
|
|
58
|
+
*
|
|
59
|
+
* @since 3.17.0 - proposed state
|
|
60
|
+
*/
|
|
61
|
+
export declare namespace TypeHierarchySupertypesRequest {
|
|
62
|
+
const method: 'typeHierarchy/supertypes';
|
|
63
|
+
const type: ProtocolRequestType<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
|
|
64
|
+
type HandlerSignature = RequestHandler<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, void>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The parameter of a `typeHierarchy/subtypes` request.
|
|
68
|
+
*
|
|
69
|
+
* @since 3.17.0 - proposed state
|
|
70
|
+
*/
|
|
71
|
+
export interface TypeHierarchySubtypesParams extends WorkDoneProgressParams, PartialResultParams {
|
|
72
|
+
item: TypeHierarchyItem;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A request to resolve the subtypes for a given `TypeHierarchyItem`.
|
|
76
|
+
*
|
|
77
|
+
* @since 3.17.0 - proposed state
|
|
78
|
+
*/
|
|
79
|
+
export declare namespace TypeHierarchySubtypesRequest {
|
|
80
|
+
const method: 'typeHierarchy/subtypes';
|
|
81
|
+
const type: ProtocolRequestType<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
|
|
82
|
+
type HandlerSignature = RequestHandler<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, void>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) TypeFox, Microsoft and others. 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.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to result a `TypeHierarchyItem` in a document at a given position.
|
|
11
|
+
* Can be used as an input to a subtypes or supertypes type hierarchy.
|
|
12
|
+
*
|
|
13
|
+
* @since 3.17.0 - proposed state
|
|
14
|
+
*/
|
|
15
|
+
var TypeHierarchyPrepareRequest;
|
|
16
|
+
(function (TypeHierarchyPrepareRequest) {
|
|
17
|
+
TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';
|
|
18
|
+
TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method);
|
|
19
|
+
})(TypeHierarchyPrepareRequest = exports.TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = {}));
|
|
20
|
+
/**
|
|
21
|
+
* A request to resolve the supertypes for a given `TypeHierarchyItem`.
|
|
22
|
+
*
|
|
23
|
+
* @since 3.17.0 - proposed state
|
|
24
|
+
*/
|
|
25
|
+
var TypeHierarchySupertypesRequest;
|
|
26
|
+
(function (TypeHierarchySupertypesRequest) {
|
|
27
|
+
TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';
|
|
28
|
+
TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method);
|
|
29
|
+
})(TypeHierarchySupertypesRequest = exports.TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = {}));
|
|
30
|
+
/**
|
|
31
|
+
* A request to resolve the subtypes for a given `TypeHierarchyItem`.
|
|
32
|
+
*
|
|
33
|
+
* @since 3.17.0 - proposed state
|
|
34
|
+
*/
|
|
35
|
+
var TypeHierarchySubtypesRequest;
|
|
36
|
+
(function (TypeHierarchySubtypesRequest) {
|
|
37
|
+
TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';
|
|
38
|
+
TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method);
|
|
39
|
+
})(TypeHierarchySubtypesRequest = exports.TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = {}));
|
|
40
|
+
//# sourceMappingURL=proposed.typeHierarchy.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* --------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) TypeFox and others. All rights reserved.
|
|
3
|
+
* Copyright (c) TypeFox, Microsoft and others. 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 });
|