vscode-languageserver-protocol 3.17.0-next.2 → 3.17.0-next.20

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.
Files changed (47) hide show
  1. package/lib/browser/main.js +1 -1
  2. package/lib/common/api.d.ts +31 -10
  3. package/lib/common/api.js +32 -7
  4. package/lib/common/connection.d.ts +45 -21
  5. package/lib/common/connection.js +1 -1
  6. package/lib/common/messages.js +0 -3
  7. package/lib/common/protocol.$.d.ts +8 -0
  8. package/lib/common/protocol.$.js +19 -0
  9. package/lib/common/protocol.callHierarchy.d.ts +1 -1
  10. package/lib/common/protocol.callHierarchy.js +1 -1
  11. package/lib/common/protocol.colorProvider.d.ts +1 -1
  12. package/lib/common/protocol.configuration.d.ts +5 -17
  13. package/lib/common/protocol.configuration.js +1 -0
  14. package/lib/common/protocol.d.ts +488 -70
  15. package/lib/common/protocol.declaration.d.ts +3 -3
  16. package/lib/common/protocol.declaration.js +2 -2
  17. package/lib/common/protocol.diagnostic.d.ts +364 -0
  18. package/lib/common/protocol.diagnostic.js +77 -0
  19. package/lib/common/protocol.fileOperations.d.ts +1 -1
  20. package/lib/common/protocol.foldingRange.d.ts +43 -27
  21. package/lib/common/protocol.foldingRange.js +1 -19
  22. package/lib/common/protocol.implementation.d.ts +3 -3
  23. package/lib/common/protocol.implementation.js +2 -2
  24. package/lib/common/protocol.inlayHint.d.ts +115 -0
  25. package/lib/common/protocol.inlayHint.js +44 -0
  26. package/lib/common/protocol.inlineValue.d.ts +91 -0
  27. package/lib/common/protocol.inlineValue.js +31 -0
  28. package/lib/common/protocol.js +137 -18
  29. package/lib/common/protocol.linkedEditingRange.d.ts +2 -2
  30. package/lib/common/protocol.moniker.d.ts +13 -11
  31. package/lib/common/protocol.moniker.js +8 -8
  32. package/lib/common/protocol.notebook.d.ts +402 -0
  33. package/lib/common/protocol.notebook.js +210 -0
  34. package/lib/common/protocol.progress.d.ts +2 -14
  35. package/lib/common/protocol.progress.js +4 -2
  36. package/lib/common/protocol.selectionRange.d.ts +2 -2
  37. package/lib/common/protocol.semanticTokens.d.ts +27 -2
  38. package/lib/common/protocol.typeDefinition.d.ts +2 -2
  39. package/lib/common/protocol.typeHierarchy.d.ts +89 -0
  40. package/lib/common/protocol.typeHierarchy.js +43 -0
  41. package/lib/common/{protocol.workspaceFolders.d.ts → protocol.workspaceFolder.d.ts} +11 -41
  42. package/lib/common/{protocol.workspaceFolders.js → protocol.workspaceFolder.js} +1 -1
  43. package/lib/node/main.js +1 -1
  44. package/metaModel.schema.json +705 -0
  45. package/package.json +4 -4
  46. package/lib/common/proposed.diagnostic.d.ts +0 -46
  47. package/lib/common/proposed.diagnostic.js +0 -23
@@ -1,7 +1,7 @@
1
1
  import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
2
2
  import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
3
3
  import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
4
- import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
4
+ import type { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
5
5
  /**
6
6
  * @since 3.16.0
7
7
  */
@@ -76,6 +76,28 @@ export interface SemanticTokensClientCapabilities {
76
76
  * Whether the client supports tokens that can span multiple lines.
77
77
  */
78
78
  multilineTokenSupport?: boolean;
79
+ /**
80
+ * Whether the client allows the server to actively cancel a
81
+ * semantic token request, e.g. supports returning
82
+ * LSPErrorCodes.ServerCancelled. If a server does the client
83
+ * needs to retrigger the request.
84
+ *
85
+ * @since 3.17.0
86
+ */
87
+ serverCancelSupport?: boolean;
88
+ /**
89
+ * Whether the client uses semantic tokens to augment existing
90
+ * syntax tokens. If set to `true` client side created syntax
91
+ * tokens and semantic tokens are both used for colorization. If
92
+ * set to `false` the client only uses the returned semantic tokens
93
+ * for colorization.
94
+ *
95
+ * If the value is `undefined` then the client behavior is not
96
+ * specified.
97
+ *
98
+ * @since 3.17.0
99
+ */
100
+ augmentsSyntaxTokens?: boolean;
79
101
  }
80
102
  /**
81
103
  * @since 3.16.0
@@ -169,6 +191,9 @@ export declare namespace SemanticTokensRangeRequest {
169
191
  const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
170
192
  type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
171
193
  }
194
+ /**
195
+ * @since 3.16.0
196
+ */
172
197
  export interface SemanticTokensWorkspaceClientCapabilities {
173
198
  /**
174
199
  * Whether the client implementation supports a refresh request sent from
@@ -176,7 +201,7 @@ export interface SemanticTokensWorkspaceClientCapabilities {
176
201
  *
177
202
  * Note that this event is global and will force the client to refresh all
178
203
  * semantic tokens currently shown. It should be used with absolute care
179
- * and is useful for situation where a server for example detect a project
204
+ * and is useful for situation where a server for example detects a project
180
205
  * wide change that requires such a calculation.
181
206
  */
182
207
  refreshSupport?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { RequestHandler } from 'vscode-jsonrpc';
2
2
  import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
3
3
  import { ProtocolRequestType } from './messages';
4
- import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
4
+ import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
5
  /**
6
6
  * Since 3.6.0
7
7
  */
@@ -33,6 +33,6 @@ export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDo
33
33
  */
34
34
  export declare namespace TypeDefinitionRequest {
35
35
  const method: 'textDocument/typeDefinition';
36
- const type: ProtocolRequestType<TypeDefinitionParams, Location | Location[] | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
36
+ const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
37
37
  type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
38
38
  }
@@ -0,0 +1,89 @@
1
+ import { RequestHandler } from 'vscode-jsonrpc';
2
+ import { TypeHierarchyItem } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType } from './messages';
4
+ import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
+ /**
6
+ * @since 3.17.0
7
+ * @proposed
8
+ */
9
+ export declare type TypeHierarchyClientCapabilities = {
10
+ /**
11
+ * Whether implementation supports dynamic registration. If this is set to `true`
12
+ * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
13
+ * return value for the corresponding server capability as well.
14
+ */
15
+ dynamicRegistration?: boolean;
16
+ };
17
+ /**
18
+ * Type hierarchy options used during static registration.
19
+ *
20
+ * @since 3.17.0
21
+ * @proposed
22
+ */
23
+ export declare type TypeHierarchyOptions = WorkDoneProgressOptions;
24
+ /**
25
+ * Type hierarchy options used during static or dynamic registration.
26
+ *
27
+ * @since 3.17.0
28
+ * @proposed
29
+ */
30
+ export declare type TypeHierarchyRegistrationOptions = TextDocumentRegistrationOptions & TypeHierarchyOptions & StaticRegistrationOptions;
31
+ /**
32
+ * The parameter of a `textDocument/prepareTypeHierarchy` request.
33
+ *
34
+ * @since 3.17.0
35
+ * @proposed
36
+ */
37
+ export declare type TypeHierarchyPrepareParams = TextDocumentPositionParams & WorkDoneProgressParams;
38
+ /**
39
+ * A request to result a `TypeHierarchyItem` in a document at a given position.
40
+ * Can be used as an input to a subtypes or supertypes type hierarchy.
41
+ *
42
+ * @since 3.17.0
43
+ * @proposed
44
+ */
45
+ export declare namespace TypeHierarchyPrepareRequest {
46
+ const method: 'textDocument/prepareTypeHierarchy';
47
+ const type: ProtocolRequestType<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, never, void, TypeHierarchyRegistrationOptions>;
48
+ type HandlerSignature = RequestHandler<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, void>;
49
+ }
50
+ /**
51
+ * The parameter of a `typeHierarchy/supertypes` request.
52
+ *
53
+ * @since 3.17.0
54
+ * @proposed
55
+ */
56
+ export declare type TypeHierarchySupertypesParams = WorkDoneProgressParams & PartialResultParams & {
57
+ item: TypeHierarchyItem;
58
+ };
59
+ /**
60
+ * A request to resolve the supertypes for a given `TypeHierarchyItem`.
61
+ *
62
+ * @since 3.17.0
63
+ * @proposed
64
+ */
65
+ export declare namespace TypeHierarchySupertypesRequest {
66
+ const method: 'typeHierarchy/supertypes';
67
+ const type: ProtocolRequestType<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
68
+ type HandlerSignature = RequestHandler<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, void>;
69
+ }
70
+ /**
71
+ * The parameter of a `typeHierarchy/subtypes` request.
72
+ *
73
+ * @since 3.17.0
74
+ * @proposed
75
+ */
76
+ export declare type TypeHierarchySubtypesParams = WorkDoneProgressParams & PartialResultParams & {
77
+ item: TypeHierarchyItem;
78
+ };
79
+ /**
80
+ * A request to resolve the subtypes for a given `TypeHierarchyItem`.
81
+ *
82
+ * @since 3.17.0
83
+ * @proposed
84
+ */
85
+ export declare namespace TypeHierarchySubtypesRequest {
86
+ const method: 'typeHierarchy/subtypes';
87
+ const type: ProtocolRequestType<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
88
+ type HandlerSignature = RequestHandler<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, void>;
89
+ }
@@ -0,0 +1,43 @@
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
14
+ * @proposed
15
+ */
16
+ var TypeHierarchyPrepareRequest;
17
+ (function (TypeHierarchyPrepareRequest) {
18
+ TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';
19
+ TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method);
20
+ })(TypeHierarchyPrepareRequest = exports.TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = {}));
21
+ /**
22
+ * A request to resolve the supertypes for a given `TypeHierarchyItem`.
23
+ *
24
+ * @since 3.17.0
25
+ * @proposed
26
+ */
27
+ var TypeHierarchySupertypesRequest;
28
+ (function (TypeHierarchySupertypesRequest) {
29
+ TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';
30
+ TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method);
31
+ })(TypeHierarchySupertypesRequest = exports.TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = {}));
32
+ /**
33
+ * A request to resolve the subtypes for a given `TypeHierarchyItem`.
34
+ *
35
+ * @since 3.17.0
36
+ * @proposed
37
+ */
38
+ var TypeHierarchySubtypesRequest;
39
+ (function (TypeHierarchySubtypesRequest) {
40
+ TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';
41
+ TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method);
42
+ })(TypeHierarchySubtypesRequest = exports.TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = {}));
43
+ //# sourceMappingURL=protocol.typeHierarchy.js.map
@@ -1,3 +1,4 @@
1
+ import { WorkspaceFolder } from 'vscode-languageserver-types';
1
2
  import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
2
3
  import { ProtocolRequestType0, ProtocolNotificationType } from './messages';
3
4
  export interface WorkspaceFoldersInitializeParams {
@@ -6,52 +7,21 @@ export interface WorkspaceFoldersInitializeParams {
6
7
  */
7
8
  workspaceFolders: WorkspaceFolder[] | null;
8
9
  }
9
- export interface WorkspaceFoldersClientCapabilities {
10
- /**
11
- * The workspace client capabilities
12
- */
13
- workspace?: {
14
- /**
15
- * The client has support for workspace folders
16
- *
17
- * @since 3.6.0
18
- */
19
- workspaceFolders?: boolean;
20
- };
21
- }
22
10
  export interface WorkspaceFoldersServerCapabilities {
23
11
  /**
24
- * The workspace server capabilities
25
- */
26
- workspace?: {
27
- workspaceFolders?: {
28
- /**
29
- * The Server has support for workspace folders
30
- */
31
- supported?: boolean;
32
- /**
33
- * Whether the server wants to receive workspace folder
34
- * change notifications.
35
- *
36
- * If a strings is provided the string is treated as a ID
37
- * under which the notification is registered on the client
38
- * side. The ID can be used to unregister for these events
39
- * using the `client/unregisterCapability` request.
40
- */
41
- changeNotifications?: string | boolean;
42
- };
43
- };
44
- }
45
- export interface WorkspaceFolder {
46
- /**
47
- * The associated URI for this workspace folder.
12
+ * The Server has support for workspace folders
48
13
  */
49
- uri: string;
14
+ supported?: boolean;
50
15
  /**
51
- * The name of the workspace folder. Used to refer to this
52
- * workspace folder in the user interface.
16
+ * Whether the server wants to receive workspace folder
17
+ * change notifications.
18
+ *
19
+ * If a strings is provided the string is treated as a ID
20
+ * under which the notification is registered on the client
21
+ * side. The ID can be used to unregister for these events
22
+ * using the `client/unregisterCapability` request.
53
23
  */
54
- name: string;
24
+ changeNotifications?: string | boolean;
55
25
  }
56
26
  /**
57
27
  * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
@@ -21,4 +21,4 @@ var DidChangeWorkspaceFoldersNotification;
21
21
  (function (DidChangeWorkspaceFoldersNotification) {
22
22
  DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
23
23
  })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
24
- //# sourceMappingURL=protocol.workspaceFolders.js.map
24
+ //# sourceMappingURL=protocol.workspaceFolder.js.map
package/lib/node/main.js CHANGED
@@ -19,7 +19,7 @@ const node_1 = require("vscode-jsonrpc/node");
19
19
  __exportStar(require("vscode-jsonrpc/node"), exports);
20
20
  __exportStar(require("../common/api"), exports);
21
21
  function createProtocolConnection(input, output, logger, options) {
22
- return node_1.createMessageConnection(input, output, logger, options);
22
+ return (0, node_1.createMessageConnection)(input, output, logger, options);
23
23
  }
24
24
  exports.createProtocolConnection = createProtocolConnection;
25
25
  //# sourceMappingURL=main.js.map