vscode-languageserver-protocol 3.17.0-next.15 → 3.17.0-next.18

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 (39) hide show
  1. package/lib/common/api.d.ts +0 -69
  2. package/lib/common/api.js +1 -26
  3. package/lib/common/connection.d.ts +26 -2
  4. package/lib/common/protocol.callHierarchy.d.ts +1 -1
  5. package/lib/common/protocol.colorProvider.d.ts +1 -1
  6. package/lib/common/protocol.configuration.d.ts +1 -14
  7. package/lib/common/protocol.configuration.js +1 -0
  8. package/lib/common/protocol.d.ts +326 -105
  9. package/lib/common/protocol.declaration.d.ts +2 -2
  10. package/lib/common/protocol.declaration.js +2 -2
  11. package/lib/common/{proposed.diagnostic.d.ts → protocol.diagnostic.d.ts} +79 -38
  12. package/lib/common/{proposed.diagnostic.js → protocol.diagnostic.js} +13 -8
  13. package/lib/common/protocol.foldingRange.d.ts +20 -26
  14. package/lib/common/protocol.foldingRange.js +1 -19
  15. package/lib/common/protocol.implementation.d.ts +2 -2
  16. package/lib/common/protocol.implementation.js +2 -2
  17. package/lib/common/protocol.inlayHint.d.ts +115 -0
  18. package/lib/common/protocol.inlayHint.js +44 -0
  19. package/lib/common/protocol.inlineValue.d.ts +91 -0
  20. package/lib/common/protocol.inlineValue.js +31 -0
  21. package/lib/common/protocol.js +88 -15
  22. package/lib/common/protocol.linkedEditingRange.d.ts +2 -2
  23. package/lib/common/protocol.moniker.d.ts +13 -11
  24. package/lib/common/protocol.moniker.js +8 -8
  25. package/lib/common/{proposed.notebooks.d.ts → protocol.notebook.d.ts} +57 -53
  26. package/lib/common/{proposed.notebooks.js → protocol.notebook.js} +9 -5
  27. package/lib/common/protocol.progress.d.ts +2 -14
  28. package/lib/common/protocol.progress.js +4 -2
  29. package/lib/common/protocol.selectionRange.d.ts +2 -2
  30. package/lib/common/protocol.semanticTokens.d.ts +1 -1
  31. package/lib/common/protocol.typeDefinition.d.ts +1 -1
  32. package/lib/common/{proposed.typeHierarchy.d.ts → protocol.typeHierarchy.d.ts} +19 -10
  33. package/lib/common/{proposed.typeHierarchy.js → protocol.typeHierarchy.js} +7 -4
  34. package/lib/common/{protocol.workspaceFolders.d.ts → protocol.workspaceFolder.d.ts} +11 -41
  35. package/lib/common/{protocol.workspaceFolders.js → protocol.workspaceFolder.js} +1 -1
  36. package/metaModel.schema.json +686 -0
  37. package/package.json +3 -3
  38. package/lib/common/proposed.inlineValue.d.ts +0 -84
  39. package/lib/common/proposed.inlineValue.js +0 -29
@@ -53,74 +53,5 @@ export declare namespace LSPErrorCodes {
53
53
  */
54
54
  const lspReservedErrorRangeEnd: integer;
55
55
  }
56
- import * as diag from './proposed.diagnostic';
57
- import * as typeh from './proposed.typeHierarchy';
58
- import * as iv from './proposed.inlineValue';
59
- import * as nb from './proposed.notebooks';
60
56
  export declare namespace Proposed {
61
- type DiagnosticClientCapabilities = diag.DiagnosticClientCapabilities;
62
- type $DiagnosticClientCapabilities = diag.$DiagnosticClientCapabilities;
63
- type DiagnosticOptions = diag.DiagnosticOptions;
64
- type DiagnosticRegistrationOptions = diag.DiagnosticRegistrationOptions;
65
- type $DiagnosticServerCapabilities = diag.$DiagnosticServerCapabilities;
66
- type DocumentDiagnosticParams = diag.DocumentDiagnosticParams;
67
- type DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
68
- const DiagnosticServerCancellationData: typeof diag.DiagnosticServerCancellationData;
69
- type DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
70
- const DocumentDiagnosticReportKind: typeof diag.DocumentDiagnosticReportKind;
71
- type FullDocumentDiagnosticReport = diag.FullDocumentDiagnosticReport;
72
- type RelatedFullDocumentDiagnosticReport = diag.RelatedFullDocumentDiagnosticReport;
73
- type UnchangedDocumentDiagnosticReport = diag.UnchangedDocumentDiagnosticReport;
74
- type RelatedUnchangedDocumentDiagnosticReport = diag.RelatedUnchangedDocumentDiagnosticReport;
75
- type DocumentDiagnosticReport = diag.DocumentDiagnosticReport;
76
- type DocumentDiagnosticReportPartialResult = diag.DocumentDiagnosticReportPartialResult;
77
- const DocumentDiagnosticRequest: typeof diag.DocumentDiagnosticRequest;
78
- type PreviousResultId = diag.PreviousResultId;
79
- type WorkspaceDiagnosticParams = diag.WorkspaceDiagnosticParams;
80
- type WorkspaceFullDocumentDiagnosticReport = diag.WorkspaceFullDocumentDiagnosticReport;
81
- type WorkspaceUnchangedDocumentDiagnosticReport = diag.WorkspaceUnchangedDocumentDiagnosticReport;
82
- type WorkspaceDocumentDiagnosticReport = diag.WorkspaceDocumentDiagnosticReport;
83
- type WorkspaceDiagnosticReport = diag.WorkspaceDiagnosticReport;
84
- type WorkspaceDiagnosticReportPartialResult = diag.WorkspaceDiagnosticReportPartialResult;
85
- const WorkspaceDiagnosticRequest: typeof diag.WorkspaceDiagnosticRequest;
86
- const DiagnosticRefreshRequest: typeof diag.DiagnosticRefreshRequest;
87
- type TypeHierarchyClientCapabilities = typeh.TypeHierarchyClientCapabilities;
88
- type TypeHierarchyOptions = typeh.TypeHierarchyOptions;
89
- type TypeHierarchyRegistrationOptions = typeh.TypeHierarchyRegistrationOptions;
90
- type TypeHierarchyPrepareParams = typeh.TypeHierarchyPrepareParams;
91
- type TypeHierarchySupertypesParams = typeh.TypeHierarchySupertypesParams;
92
- type TypeHierarchySubtypesParams = typeh.TypeHierarchySubtypesParams;
93
- const TypeHierarchyPrepareRequest: typeof typeh.TypeHierarchyPrepareRequest;
94
- const TypeHierarchySupertypesRequest: typeof typeh.TypeHierarchySupertypesRequest;
95
- const TypeHierarchySubtypesRequest: typeof typeh.TypeHierarchySubtypesRequest;
96
- type InlineValuesClientCapabilities = iv.InlineValuesClientCapabilities;
97
- type InlineValuesOptions = iv.InlineValuesOptions;
98
- type InlineValuesRegistrationOptions = iv.InlineValuesRegistrationOptions;
99
- type InlineValuesParams = iv.InlineValuesParams;
100
- const InlineValuesRequest: typeof iv.InlineValuesRequest;
101
- const InlineValuesRefreshRequest: typeof iv.InlineValuesRefreshRequest;
102
- type $NotebookDocumentClientCapabilities = nb.$NotebookDocumentClientCapabilities;
103
- type NotebookDocumentSyncClientCapabilities = nb.NotebookDocumentSyncClientCapabilities;
104
- type $NotebookDocumentSyncServerCapabilities = nb.$NotebookDocumentSyncServerCapabilities;
105
- type NotebookCellKind = nb.NotebookCellKind;
106
- const NotebookCellKind: typeof nb.NotebookCellKind;
107
- type NotebookCell = nb.NotebookCell;
108
- const NotebookCell: typeof nb.NotebookCell;
109
- type NotebookCellArrayChange = nb.NotebookCellArrayChange;
110
- type NotebookDocument = nb.NotebookDocument;
111
- const NotebookDocument: typeof nb.NotebookDocument;
112
- type NotebookDocumentChangeEvent = nb.NotebookDocumentChangeEvent;
113
- type NotebookDocumentIdentifier = nb.NotebookDocumentIdentifier;
114
- type VersionedNotebookDocumentIdentifier = nb.VersionedNotebookDocumentIdentifier;
115
- type NotebookDocumentSyncOptions = nb.NotebookDocumentSyncOptions;
116
- type NotebookDocumentSyncRegistrationOptions = nb.NotebookDocumentSyncRegistrationOptions;
117
- const NotebookDocumentSyncRegistrationType: typeof nb.NotebookDocumentSyncRegistrationType;
118
- type DidOpenNotebookDocumentParams = nb.DidOpenNotebookDocumentParams;
119
- const DidOpenNotebookDocumentNotification: typeof nb.DidOpenNotebookDocumentNotification;
120
- type DidChangeNotebookDocumentParams = nb.DidChangeNotebookDocumentParams;
121
- const DidChangeNotebookDocumentNotification: typeof nb.DidChangeNotebookDocumentNotification;
122
- type DidSaveNotebookDocumentParams = nb.DidSaveNotebookDocumentParams;
123
- const DidSaveNotebookDocumentNotification: typeof nb.DidSaveNotebookDocumentNotification;
124
- type DidCloseNotebookDocumentParams = nb.DidCloseNotebookDocumentParams;
125
- const DidCloseNotebookDocumentNotification: typeof nb.DidCloseNotebookDocumentNotification;
126
57
  }
package/lib/common/api.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Proposed = exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
17
+ exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
18
18
  __exportStar(require("vscode-jsonrpc"), exports);
19
19
  __exportStar(require("vscode-languageserver-types"), exports);
20
20
  __exportStar(require("./messages"), exports);
@@ -71,29 +71,4 @@ var LSPErrorCodes;
71
71
  */
72
72
  LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
73
73
  })(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
74
- const diag = require("./proposed.diagnostic");
75
- const typeh = require("./proposed.typeHierarchy");
76
- const iv = require("./proposed.inlineValue");
77
- const nb = require("./proposed.notebooks");
78
- var Proposed;
79
- (function (Proposed) {
80
- Proposed.DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
81
- Proposed.DocumentDiagnosticReportKind = diag.DocumentDiagnosticReportKind;
82
- Proposed.DocumentDiagnosticRequest = diag.DocumentDiagnosticRequest;
83
- Proposed.WorkspaceDiagnosticRequest = diag.WorkspaceDiagnosticRequest;
84
- Proposed.DiagnosticRefreshRequest = diag.DiagnosticRefreshRequest;
85
- Proposed.TypeHierarchyPrepareRequest = typeh.TypeHierarchyPrepareRequest;
86
- Proposed.TypeHierarchySupertypesRequest = typeh.TypeHierarchySupertypesRequest;
87
- Proposed.TypeHierarchySubtypesRequest = typeh.TypeHierarchySubtypesRequest;
88
- Proposed.InlineValuesRequest = iv.InlineValuesRequest;
89
- Proposed.InlineValuesRefreshRequest = iv.InlineValuesRefreshRequest;
90
- Proposed.NotebookCellKind = nb.NotebookCellKind;
91
- Proposed.NotebookCell = nb.NotebookCell;
92
- Proposed.NotebookDocument = nb.NotebookDocument;
93
- Proposed.NotebookDocumentSyncRegistrationType = nb.NotebookDocumentSyncRegistrationType;
94
- Proposed.DidOpenNotebookDocumentNotification = nb.DidOpenNotebookDocumentNotification;
95
- Proposed.DidChangeNotebookDocumentNotification = nb.DidChangeNotebookDocumentNotification;
96
- Proposed.DidSaveNotebookDocumentNotification = nb.DidSaveNotebookDocumentNotification;
97
- Proposed.DidCloseNotebookDocumentNotification = nb.DidCloseNotebookDocumentNotification;
98
- })(Proposed = exports.Proposed || (exports.Proposed = {}));
99
74
  //# sourceMappingURL=api.js.map
@@ -42,6 +42,7 @@ export interface ProtocolConnection {
42
42
  *
43
43
  * @param type The request type to install the handler for.
44
44
  * @param handler The actual handler.
45
+ * @returns A disposable to remove the handler.
45
46
  */
46
47
  onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable;
47
48
  onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable;
@@ -50,6 +51,7 @@ export interface ProtocolConnection {
50
51
  *
51
52
  * @param type The request type to install the handler for.
52
53
  * @param handler The actual handler.
54
+ * @returns A disposable to remove the handler.
53
55
  */
54
56
  onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable;
55
57
  onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable;
@@ -58,12 +60,20 @@ export interface ProtocolConnection {
58
60
  *
59
61
  * @param methods the message signature or the method name to install a handler for.
60
62
  * @param handler The actual handler.
63
+ * @returns A disposable to remove the handler.
61
64
  */
62
65
  onRequest<R, E>(method: MessageSignature | string, handler: GenericRequestHandler<R, E>): Disposable;
66
+ /**
67
+ * Returns true if the connection has a pending response.
68
+ * Otherwise false is returned.
69
+ */
70
+ hasPendingResponse(): boolean;
63
71
  /**
64
72
  * Sends a notification.
65
73
  *
66
74
  * @param type the notification's type to send.
75
+ * @returns A promise that resolves when the notification is written to the
76
+ * network layer.
67
77
  */
68
78
  sendNotification(type: NotificationType0): Promise<void>;
69
79
  sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
@@ -72,6 +82,8 @@ export interface ProtocolConnection {
72
82
  *
73
83
  * @param type the notification's type to send.
74
84
  * @param params the notification's parameters.
85
+ * @returns A promise that resolves when the notification is written to the
86
+ * network layer.
75
87
  */
76
88
  sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
77
89
  sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
@@ -79,6 +91,8 @@ export interface ProtocolConnection {
79
91
  * Sends a notification.
80
92
  *
81
93
  * @param method the notification's method signature or the method name.
94
+ * @returns A promise that resolves when the notification is written to the
95
+ * network layer.
82
96
  */
83
97
  sendNotification(method: MessageSignature | string): Promise<void>;
84
98
  /**
@@ -86,6 +100,8 @@ export interface ProtocolConnection {
86
100
  *
87
101
  * @param method the notification's method signature or the method name.
88
102
  * @param params the notification's parameters.
103
+ * @returns A promise that resolves when the notification is written to the
104
+ * network layer.
89
105
  */
90
106
  sendNotification(method: MessageSignature | string, params: any): Promise<void>;
91
107
  /**
@@ -93,6 +109,7 @@ export interface ProtocolConnection {
93
109
  *
94
110
  * @param type The notification type to install the handler for.
95
111
  * @param handler The actual handler.
112
+ * @returns A disposable to remove the handler.
96
113
  */
97
114
  onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable;
98
115
  onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable;
@@ -101,6 +118,7 @@ export interface ProtocolConnection {
101
118
  *
102
119
  * @param type The notification type to install the handler for.
103
120
  * @param handler The actual handler.
121
+ * @returns A disposable to remove the handler.
104
122
  */
105
123
  onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable;
106
124
  onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable;
@@ -109,6 +127,7 @@ export interface ProtocolConnection {
109
127
  *
110
128
  * @param methods The message signature or the method name to install the handler for.
111
129
  * @param handler The actual handler.
130
+ * @returns A disposable to remove the handler.
112
131
  */
113
132
  onNotification(method: MessageSignature | string, handler: GenericNotificationHandler): Disposable;
114
133
  /**
@@ -116,6 +135,7 @@ export interface ProtocolConnection {
116
135
  * @param type the progress type
117
136
  * @param token the token
118
137
  * @param handler the handler
138
+ * @returns A disposable to remove the handler.
119
139
  */
120
140
  onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable;
121
141
  /**
@@ -123,13 +143,17 @@ export interface ProtocolConnection {
123
143
  * @param type the progress type
124
144
  * @param token the token to use
125
145
  * @param value the progress value
146
+ * @returns A promise that resolves when the progress is written to the
147
+ * network layer.
126
148
  */
127
149
  sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
128
150
  /**
129
151
  * Enables tracing mode for the connection.
152
+ * @returns A promise that resolves when the trace value is written to the
153
+ * network layer.
130
154
  */
131
- trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;
132
- trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void;
155
+ trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise<void>;
156
+ trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise<void>;
133
157
  /**
134
158
  * An event emitter firing when an error occurs on the connection.
135
159
  */
@@ -1,7 +1,7 @@
1
1
  import { RequestHandler } from 'vscode-jsonrpc';
2
2
  import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } 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.16.0
7
7
  */
@@ -1,7 +1,7 @@
1
1
  import { RequestHandler } from 'vscode-jsonrpc';
2
2
  import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types';
3
3
  import { ProtocolRequestType } from './messages';
4
- import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
4
+ import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
5
  export interface DocumentColorClientCapabilities {
6
6
  /**
7
7
  * Whether implementation supports dynamic registration. If this is set to `true`
@@ -1,20 +1,7 @@
1
1
  import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
2
2
  import { LSPAny } from 'vscode-languageserver-types';
3
3
  import { ProtocolRequestType } from './messages';
4
- import { PartialResultParams } from './protocol';
5
- export interface ConfigurationClientCapabilities {
6
- /**
7
- * The workspace client capabilities
8
- */
9
- workspace?: {
10
- /**
11
- * The client supports `workspace/configuration` requests.
12
- *
13
- * @since 3.6.0
14
- */
15
- configuration?: boolean;
16
- };
17
- }
4
+ import type { PartialResultParams } from './protocol';
18
5
  /**
19
6
  * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
20
7
  * configuration setting.
@@ -6,6 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ConfigurationRequest = void 0;
8
8
  const messages_1 = require("./messages");
9
+ //---- Get Configuration request ----
9
10
  /**
10
11
  * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
11
12
  * configuration setting.