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
|
@@ -0,0 +1,167 @@
|
|
|
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.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = 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
|
+
(candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));
|
|
41
|
+
}
|
|
42
|
+
NotebookCell.is = is;
|
|
43
|
+
function equals(one, other, compareMetaData = false) {
|
|
44
|
+
if (one.kind !== other.kind || one.document !== other.document) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return !compareMetaData || (compareMetaData && equalsMetadata(one.metadata, other.metadata));
|
|
48
|
+
}
|
|
49
|
+
NotebookCell.equals = equals;
|
|
50
|
+
function equalsMetadata(one, other) {
|
|
51
|
+
if (one === other) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (one === null || one === undefined || other === null || other === undefined) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (typeof one !== typeof other) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (typeof one !== 'object') {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const oneArray = Array.isArray(one);
|
|
64
|
+
const otherArray = Array.isArray(other);
|
|
65
|
+
if (oneArray !== otherArray) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (oneArray && otherArray) {
|
|
69
|
+
if (one.length !== other.length) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
for (let i = 0; i < one.length; i++) {
|
|
73
|
+
if (!equalsMetadata(one[i], other[i])) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (Is.objectLiteral(one) && Is.objectLiteral(other)) {
|
|
79
|
+
const oneKeys = Object.keys(one);
|
|
80
|
+
const otherKeys = Object.keys(other);
|
|
81
|
+
if (oneKeys.length !== otherKeys.length) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
oneKeys.sort();
|
|
85
|
+
otherKeys.sort();
|
|
86
|
+
if (!equalsMetadata(oneKeys, otherKeys)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
for (let i = 0; i < oneKeys.length; i++) {
|
|
90
|
+
const prop = oneKeys[i];
|
|
91
|
+
if (!equalsMetadata(one[prop], other[prop])) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));
|
|
99
|
+
var NotebookDocument;
|
|
100
|
+
(function (NotebookDocument) {
|
|
101
|
+
function create(uri, notebookType, version, cells) {
|
|
102
|
+
return { uri, notebookType, version, cells };
|
|
103
|
+
}
|
|
104
|
+
NotebookDocument.create = create;
|
|
105
|
+
function is(value) {
|
|
106
|
+
const candidate = value;
|
|
107
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is);
|
|
108
|
+
}
|
|
109
|
+
NotebookDocument.is = is;
|
|
110
|
+
})(NotebookDocument = exports.NotebookDocument || (exports.NotebookDocument = {}));
|
|
111
|
+
var NotebookDocumentSyncRegistrationType;
|
|
112
|
+
(function (NotebookDocumentSyncRegistrationType) {
|
|
113
|
+
NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync';
|
|
114
|
+
NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method);
|
|
115
|
+
})(NotebookDocumentSyncRegistrationType = exports.NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = {}));
|
|
116
|
+
/**
|
|
117
|
+
* A notification sent when a notebook opens.
|
|
118
|
+
*
|
|
119
|
+
* @since 3.17.0 - proposed state
|
|
120
|
+
*/
|
|
121
|
+
var DidOpenNotebookDocumentNotification;
|
|
122
|
+
(function (DidOpenNotebookDocumentNotification) {
|
|
123
|
+
DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';
|
|
124
|
+
DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);
|
|
125
|
+
})(DidOpenNotebookDocumentNotification = exports.DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = {}));
|
|
126
|
+
var NotebookCellArrayChange;
|
|
127
|
+
(function (NotebookCellArrayChange) {
|
|
128
|
+
function is(value) {
|
|
129
|
+
const candidate = value;
|
|
130
|
+
return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is));
|
|
131
|
+
}
|
|
132
|
+
NotebookCellArrayChange.is = is;
|
|
133
|
+
function create(start, deleteCount, cells) {
|
|
134
|
+
const result = { start, deleteCount };
|
|
135
|
+
if (cells !== undefined) {
|
|
136
|
+
result.cells = cells;
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
NotebookCellArrayChange.create = create;
|
|
141
|
+
})(NotebookCellArrayChange = exports.NotebookCellArrayChange || (exports.NotebookCellArrayChange = {}));
|
|
142
|
+
var DidChangeNotebookDocumentNotification;
|
|
143
|
+
(function (DidChangeNotebookDocumentNotification) {
|
|
144
|
+
DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';
|
|
145
|
+
DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);
|
|
146
|
+
})(DidChangeNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = {}));
|
|
147
|
+
/**
|
|
148
|
+
* A notification sent when a notebook document is saved.
|
|
149
|
+
*
|
|
150
|
+
* @since 3.17.0 - proposed state
|
|
151
|
+
*/
|
|
152
|
+
var DidSaveNotebookDocumentNotification;
|
|
153
|
+
(function (DidSaveNotebookDocumentNotification) {
|
|
154
|
+
DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave';
|
|
155
|
+
DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method);
|
|
156
|
+
})(DidSaveNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = {}));
|
|
157
|
+
/**
|
|
158
|
+
* A notification sent when a notebook closes.
|
|
159
|
+
*
|
|
160
|
+
* @since 3.17.0 - proposed state
|
|
161
|
+
*/
|
|
162
|
+
var DidCloseNotebookDocumentNotification;
|
|
163
|
+
(function (DidCloseNotebookDocumentNotification) {
|
|
164
|
+
DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';
|
|
165
|
+
DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);
|
|
166
|
+
})(DidCloseNotebookDocumentNotification = exports.DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = {}));
|
|
167
|
+
//# 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 });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
|
|
2
|
+
import { LSPAny } from 'vscode-languageserver-types';
|
|
2
3
|
import { ProtocolRequestType } from './messages';
|
|
3
4
|
import { PartialResultParams } from './protocol';
|
|
4
5
|
export interface ConfigurationClientCapabilities {
|
|
@@ -24,9 +25,9 @@ export interface ConfigurationClientCapabilities {
|
|
|
24
25
|
* change event and empty the cache if such an event is received.
|
|
25
26
|
*/
|
|
26
27
|
export declare namespace ConfigurationRequest {
|
|
27
|
-
const type: ProtocolRequestType<ConfigurationParams & PartialResultParams,
|
|
28
|
-
type HandlerSignature = RequestHandler<ConfigurationParams,
|
|
29
|
-
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<
|
|
28
|
+
const type: ProtocolRequestType<ConfigurationParams & PartialResultParams, LSPAny[], never, void, void>;
|
|
29
|
+
type HandlerSignature = RequestHandler<ConfigurationParams, LSPAny[], void>;
|
|
30
|
+
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<LSPAny[], void>;
|
|
30
31
|
}
|
|
31
32
|
export interface ConfigurationItem {
|
|
32
33
|
/**
|