massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver-protocol / lib / common / protocol.js
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.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.DocumentFilter = void 0;
8 exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = void 0;
9 const Is = require("./utils/is");
10 const messages_1 = require("./messages");
11 const protocol_implementation_1 = require("./protocol.implementation");
12 Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
13 const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
14 Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });
15 const protocol_workspaceFolders_1 = require("./protocol.workspaceFolders");
16 Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolders_1.WorkspaceFoldersRequest; } });
17 Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification; } });
18 const protocol_configuration_1 = require("./protocol.configuration");
19 Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });
20 const protocol_colorProvider_1 = require("./protocol.colorProvider");
21 Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });
22 Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });
23 const protocol_foldingRange_1 = require("./protocol.foldingRange");
24 Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });
25 const protocol_declaration_1 = require("./protocol.declaration");
26 Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });
27 const protocol_selectionRange_1 = require("./protocol.selectionRange");
28 Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });
29 const protocol_progress_1 = require("./protocol.progress");
30 Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });
31 Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });
32 Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });
33 const protocol_callHierarchy_1 = require("./protocol.callHierarchy");
34 Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });
35 Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
36 Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
37 const protocol_semanticTokens_1 = require("./protocol.semanticTokens");
38 Object.defineProperty(exports, "SemanticTokenTypes", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } });
39 Object.defineProperty(exports, "SemanticTokenModifiers", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } });
40 Object.defineProperty(exports, "SemanticTokens", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } });
41 Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
42 Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
43 Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
44 Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
45 Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
46 Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
47 const protocol_showDocument_1 = require("./protocol.showDocument");
48 Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
49 const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange");
50 Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
51 const protocol_fileOperations_1 = require("./protocol.fileOperations");
52 Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
53 Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
54 Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
55 Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
56 Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
57 Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
58 Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
59 const protocol_moniker_1 = require("./protocol.moniker");
60 Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
61 Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
62 Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
63 // @ts-ignore: to avoid inlining LocationLink as dynamic import
64 let __noDynamicImport;
65 /**
66  * The DocumentFilter namespace provides helper functions to work with
67  * [DocumentFilter](#DocumentFilter) literals.
68  */
69 var DocumentFilter;
70 (function (DocumentFilter) {
71     function is(value) {
72         const candidate = value;
73         return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
74     }
75     DocumentFilter.is = is;
76 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
77 /**
78  * The DocumentSelector namespace provides helper functions to work with
79  * [DocumentSelector](#DocumentSelector)s.
80  */
81 var DocumentSelector;
82 (function (DocumentSelector) {
83     function is(value) {
84         if (!Array.isArray(value)) {
85             return false;
86         }
87         for (let elem of value) {
88             if (!Is.string(elem) && !DocumentFilter.is(elem)) {
89                 return false;
90             }
91         }
92         return true;
93     }
94     DocumentSelector.is = is;
95 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
96 /**
97  * The `client/registerCapability` request is sent from the server to the client to register a new capability
98  * handler on the client side.
99  */
100 var RegistrationRequest;
101 (function (RegistrationRequest) {
102     RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
103 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
104 /**
105  * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
106  * handler on the client side.
107  */
108 var UnregistrationRequest;
109 (function (UnregistrationRequest) {
110     UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
111 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
112 var ResourceOperationKind;
113 (function (ResourceOperationKind) {
114     /**
115      * Supports creating new files and folders.
116      */
117     ResourceOperationKind.Create = 'create';
118     /**
119      * Supports renaming existing files and folders.
120      */
121     ResourceOperationKind.Rename = 'rename';
122     /**
123      * Supports deleting existing files and folders.
124      */
125     ResourceOperationKind.Delete = 'delete';
126 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
127 var FailureHandlingKind;
128 (function (FailureHandlingKind) {
129     /**
130      * Applying the workspace change is simply aborted if one of the changes provided
131      * fails. All operations executed before the failing operation stay executed.
132      */
133     FailureHandlingKind.Abort = 'abort';
134     /**
135      * All operations are executed transactional. That means they either all
136      * succeed or no changes at all are applied to the workspace.
137      */
138     FailureHandlingKind.Transactional = 'transactional';
139     /**
140      * If the workspace edit contains only textual file changes they are executed transactional.
141      * If resource changes (create, rename or delete file) are part of the change the failure
142      * handling strategy is abort.
143      */
144     FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
145     /**
146      * The client tries to undo the operations already executed. But there is no
147      * guarantee that this is succeeding.
148      */
149     FailureHandlingKind.Undo = 'undo';
150 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
151 /**
152  * The StaticRegistrationOptions namespace provides helper functions to work with
153  * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
154  */
155 var StaticRegistrationOptions;
156 (function (StaticRegistrationOptions) {
157     function hasId(value) {
158         const candidate = value;
159         return candidate && Is.string(candidate.id) && candidate.id.length > 0;
160     }
161     StaticRegistrationOptions.hasId = hasId;
162 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
163 /**
164  * The TextDocumentRegistrationOptions namespace provides helper functions to work with
165  * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
166  */
167 var TextDocumentRegistrationOptions;
168 (function (TextDocumentRegistrationOptions) {
169     function is(value) {
170         const candidate = value;
171         return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
172     }
173     TextDocumentRegistrationOptions.is = is;
174 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
175 /**
176  * The WorkDoneProgressOptions namespace provides helper functions to work with
177  * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
178  */
179 var WorkDoneProgressOptions;
180 (function (WorkDoneProgressOptions) {
181     function is(value) {
182         const candidate = value;
183         return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
184     }
185     WorkDoneProgressOptions.is = is;
186     function hasWorkDoneProgress(value) {
187         const candidate = value;
188         return candidate && Is.boolean(candidate.workDoneProgress);
189     }
190     WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
191 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
192 /**
193  * The initialize request is sent from the client to the server.
194  * It is sent once as the request after starting up the server.
195  * The requests parameter is of type [InitializeParams](#InitializeParams)
196  * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
197  * resolves to such.
198  */
199 var InitializeRequest;
200 (function (InitializeRequest) {
201     InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
202 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
203 /**
204  * Known error codes for an `InitializeError`;
205  */
206 var InitializeError;
207 (function (InitializeError) {
208     /**
209      * If the protocol version provided by the client can't be handled by the server.
210      * @deprecated This initialize error got replaced by client capabilities. There is
211      * no version handshake in version 3.0x
212      */
213     InitializeError.unknownProtocolVersion = 1;
214 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
215 /**
216  * The initialized notification is sent from the client to the
217  * server after the client is fully initialized and the server
218  * is allowed to send requests from the server to the client.
219  */
220 var InitializedNotification;
221 (function (InitializedNotification) {
222     InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
223 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
224 //---- Shutdown Method ----
225 /**
226  * A shutdown request is sent from the client to the server.
227  * It is sent once when the client decides to shutdown the
228  * server. The only notification that is sent after a shutdown request
229  * is the exit event.
230  */
231 var ShutdownRequest;
232 (function (ShutdownRequest) {
233     ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
234 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
235 //---- Exit Notification ----
236 /**
237  * The exit event is sent from the client to the server to
238  * ask the server to exit its process.
239  */
240 var ExitNotification;
241 (function (ExitNotification) {
242     ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
243 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
244 /**
245  * The configuration change notification is sent from the client to the server
246  * when the client's configuration has changed. The notification contains
247  * the changed configuration as defined by the language client.
248  */
249 var DidChangeConfigurationNotification;
250 (function (DidChangeConfigurationNotification) {
251     DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
252 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
253 //---- Message show and log notifications ----
254 /**
255  * The message type
256  */
257 var MessageType;
258 (function (MessageType) {
259     /**
260      * An error message.
261      */
262     MessageType.Error = 1;
263     /**
264      * A warning message.
265      */
266     MessageType.Warning = 2;
267     /**
268      * An information message.
269      */
270     MessageType.Info = 3;
271     /**
272      * A log message.
273      */
274     MessageType.Log = 4;
275 })(MessageType = exports.MessageType || (exports.MessageType = {}));
276 /**
277  * The show message notification is sent from a server to a client to ask
278  * the client to display a particular message in the user interface.
279  */
280 var ShowMessageNotification;
281 (function (ShowMessageNotification) {
282     ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
283 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
284 /**
285  * The show message request is sent from the server to the client to show a message
286  * and a set of options actions to the user.
287  */
288 var ShowMessageRequest;
289 (function (ShowMessageRequest) {
290     ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
291 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
292 /**
293  * The log message notification is sent from the server to the client to ask
294  * the client to log a particular message.
295  */
296 var LogMessageNotification;
297 (function (LogMessageNotification) {
298     LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
299 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
300 //---- Telemetry notification
301 /**
302  * The telemetry event notification is sent from the server to the client to ask
303  * the client to log telemetry data.
304  */
305 var TelemetryEventNotification;
306 (function (TelemetryEventNotification) {
307     TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
308 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
309 /**
310  * Defines how the host (editor) should sync
311  * document changes to the language server.
312  */
313 var TextDocumentSyncKind;
314 (function (TextDocumentSyncKind) {
315     /**
316      * Documents should not be synced at all.
317      */
318     TextDocumentSyncKind.None = 0;
319     /**
320      * Documents are synced by always sending the full content
321      * of the document.
322      */
323     TextDocumentSyncKind.Full = 1;
324     /**
325      * Documents are synced by sending the full content on open.
326      * After that only incremental updates to the document are
327      * send.
328      */
329     TextDocumentSyncKind.Incremental = 2;
330 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
331 /**
332  * The document open notification is sent from the client to the server to signal
333  * newly opened text documents. The document's truth is now managed by the client
334  * and the server must not try to read the document's truth using the document's
335  * uri. Open in this sense means it is managed by the client. It doesn't necessarily
336  * mean that its content is presented in an editor. An open notification must not
337  * be sent more than once without a corresponding close notification send before.
338  * This means open and close notification must be balanced and the max open count
339  * is one.
340  */
341 var DidOpenTextDocumentNotification;
342 (function (DidOpenTextDocumentNotification) {
343     DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
344     DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
345 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
346 var TextDocumentContentChangeEvent;
347 (function (TextDocumentContentChangeEvent) {
348     /**
349      * Checks whether the information describes a delta event.
350      */
351     function isIncremental(event) {
352         let candidate = event;
353         return candidate !== undefined && candidate !== null &&
354             typeof candidate.text === 'string' && candidate.range !== undefined &&
355             (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
356     }
357     TextDocumentContentChangeEvent.isIncremental = isIncremental;
358     /**
359      * Checks whether the information describes a full replacement event.
360      */
361     function isFull(event) {
362         let candidate = event;
363         return candidate !== undefined && candidate !== null &&
364             typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
365     }
366     TextDocumentContentChangeEvent.isFull = isFull;
367 })(TextDocumentContentChangeEvent = exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {}));
368 /**
369  * The document change notification is sent from the client to the server to signal
370  * changes to a text document.
371  */
372 var DidChangeTextDocumentNotification;
373 (function (DidChangeTextDocumentNotification) {
374     DidChangeTextDocumentNotification.method = 'textDocument/didChange';
375     DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
376 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
377 /**
378  * The document close notification is sent from the client to the server when
379  * the document got closed in the client. The document's truth now exists where
380  * the document's uri points to (e.g. if the document's uri is a file uri the
381  * truth now exists on disk). As with the open notification the close notification
382  * is about managing the document's content. Receiving a close notification
383  * doesn't mean that the document was open in an editor before. A close
384  * notification requires a previous open notification to be sent.
385  */
386 var DidCloseTextDocumentNotification;
387 (function (DidCloseTextDocumentNotification) {
388     DidCloseTextDocumentNotification.method = 'textDocument/didClose';
389     DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
390 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
391 /**
392  * The document save notification is sent from the client to the server when
393  * the document got saved in the client.
394  */
395 var DidSaveTextDocumentNotification;
396 (function (DidSaveTextDocumentNotification) {
397     DidSaveTextDocumentNotification.method = 'textDocument/didSave';
398     DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
399 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
400 /**
401  * Represents reasons why a text document is saved.
402  */
403 var TextDocumentSaveReason;
404 (function (TextDocumentSaveReason) {
405     /**
406      * Manually triggered, e.g. by the user pressing save, by starting debugging,
407      * or by an API call.
408      */
409     TextDocumentSaveReason.Manual = 1;
410     /**
411      * Automatic after a delay.
412      */
413     TextDocumentSaveReason.AfterDelay = 2;
414     /**
415      * When the editor lost focus.
416      */
417     TextDocumentSaveReason.FocusOut = 3;
418 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
419 /**
420  * A document will save notification is sent from the client to the server before
421  * the document is actually saved.
422  */
423 var WillSaveTextDocumentNotification;
424 (function (WillSaveTextDocumentNotification) {
425     WillSaveTextDocumentNotification.method = 'textDocument/willSave';
426     WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
427 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
428 /**
429  * A document will save request is sent from the client to the server before
430  * the document is actually saved. The request can return an array of TextEdits
431  * which will be applied to the text document before it is saved. Please note that
432  * clients might drop results if computing the text edits took too long or if a
433  * server constantly fails on this request. This is done to keep the save fast and
434  * reliable.
435  */
436 var WillSaveTextDocumentWaitUntilRequest;
437 (function (WillSaveTextDocumentWaitUntilRequest) {
438     WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
439     WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
440 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
441 /**
442  * The watched files notification is sent from the client to the server when
443  * the client detects changes to file watched by the language client.
444  */
445 var DidChangeWatchedFilesNotification;
446 (function (DidChangeWatchedFilesNotification) {
447     DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
448 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
449 /**
450  * The file event type
451  */
452 var FileChangeType;
453 (function (FileChangeType) {
454     /**
455      * The file got created.
456      */
457     FileChangeType.Created = 1;
458     /**
459      * The file got changed.
460      */
461     FileChangeType.Changed = 2;
462     /**
463      * The file got deleted.
464      */
465     FileChangeType.Deleted = 3;
466 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
467 var WatchKind;
468 (function (WatchKind) {
469     /**
470      * Interested in create events.
471      */
472     WatchKind.Create = 1;
473     /**
474      * Interested in change events
475      */
476     WatchKind.Change = 2;
477     /**
478      * Interested in delete events
479      */
480     WatchKind.Delete = 4;
481 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
482 /**
483  * Diagnostics notification are sent from the server to the client to signal
484  * results of validation runs.
485  */
486 var PublishDiagnosticsNotification;
487 (function (PublishDiagnosticsNotification) {
488     PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
489 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
490 /**
491  * How a completion was triggered
492  */
493 var CompletionTriggerKind;
494 (function (CompletionTriggerKind) {
495     /**
496      * Completion was triggered by typing an identifier (24x7 code
497      * complete), manual invocation (e.g Ctrl+Space) or via API.
498      */
499     CompletionTriggerKind.Invoked = 1;
500     /**
501      * Completion was triggered by a trigger character specified by
502      * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
503      */
504     CompletionTriggerKind.TriggerCharacter = 2;
505     /**
506      * Completion was re-triggered as current completion list is incomplete
507      */
508     CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
509 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
510 /**
511  * Request to request completion at a given text document position. The request's
512  * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
513  * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
514  * or a Thenable that resolves to such.
515  *
516  * The request can delay the computation of the [`detail`](#CompletionItem.detail)
517  * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
518  * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
519  * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
520  */
521 var CompletionRequest;
522 (function (CompletionRequest) {
523     CompletionRequest.method = 'textDocument/completion';
524     CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
525 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
526 /**
527  * Request to resolve additional information for a given completion item.The request's
528  * parameter is of type [CompletionItem](#CompletionItem) the response
529  * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
530  */
531 var CompletionResolveRequest;
532 (function (CompletionResolveRequest) {
533     CompletionResolveRequest.method = 'completionItem/resolve';
534     CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
535 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
536 /**
537  * Request to request hover information at a given text document position. The request's
538  * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
539  * type [Hover](#Hover) or a Thenable that resolves to such.
540  */
541 var HoverRequest;
542 (function (HoverRequest) {
543     HoverRequest.method = 'textDocument/hover';
544     HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
545 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
546 /**
547  * How a signature help was triggered.
548  *
549  * @since 3.15.0
550  */
551 var SignatureHelpTriggerKind;
552 (function (SignatureHelpTriggerKind) {
553     /**
554      * Signature help was invoked manually by the user or by a command.
555      */
556     SignatureHelpTriggerKind.Invoked = 1;
557     /**
558      * Signature help was triggered by a trigger character.
559      */
560     SignatureHelpTriggerKind.TriggerCharacter = 2;
561     /**
562      * Signature help was triggered by the cursor moving or by the document content changing.
563      */
564     SignatureHelpTriggerKind.ContentChange = 3;
565 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
566 var SignatureHelpRequest;
567 (function (SignatureHelpRequest) {
568     SignatureHelpRequest.method = 'textDocument/signatureHelp';
569     SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
570 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
571 /**
572  * A request to resolve the definition location of a symbol at a given text
573  * document position. The request's parameter is of type [TextDocumentPosition]
574  * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
575  * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
576  * to such.
577  */
578 var DefinitionRequest;
579 (function (DefinitionRequest) {
580     DefinitionRequest.method = 'textDocument/definition';
581     DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
582 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
583 /**
584  * A request to resolve project-wide references for the symbol denoted
585  * by the given text document position. The request's parameter is of
586  * type [ReferenceParams](#ReferenceParams) the response is of type
587  * [Location[]](#Location) or a Thenable that resolves to such.
588  */
589 var ReferencesRequest;
590 (function (ReferencesRequest) {
591     ReferencesRequest.method = 'textDocument/references';
592     ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
593 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
594 /**
595  * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
596  * text document position. The request's parameter is of type [TextDocumentPosition]
597  * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
598  * (#DocumentHighlight) or a Thenable that resolves to such.
599  */
600 var DocumentHighlightRequest;
601 (function (DocumentHighlightRequest) {
602     DocumentHighlightRequest.method = 'textDocument/documentHighlight';
603     DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
604 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
605 /**
606  * A request to list all symbols found in a given text document. The request's
607  * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
608  * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
609  * that resolves to such.
610  */
611 var DocumentSymbolRequest;
612 (function (DocumentSymbolRequest) {
613     DocumentSymbolRequest.method = 'textDocument/documentSymbol';
614     DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
615 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
616 /**
617  * A request to provide commands for the given text document and range.
618  */
619 var CodeActionRequest;
620 (function (CodeActionRequest) {
621     CodeActionRequest.method = 'textDocument/codeAction';
622     CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
623 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
624 /**
625  * Request to resolve additional information for a given code action.The request's
626  * parameter is of type [CodeAction](#CodeAction) the response
627  * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such.
628  */
629 var CodeActionResolveRequest;
630 (function (CodeActionResolveRequest) {
631     CodeActionResolveRequest.method = 'codeAction/resolve';
632     CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
633 })(CodeActionResolveRequest = exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {}));
634 /**
635  * A request to list project-wide symbols matching the query string given
636  * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
637  * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
638  * resolves to such.
639  */
640 var WorkspaceSymbolRequest;
641 (function (WorkspaceSymbolRequest) {
642     WorkspaceSymbolRequest.method = 'workspace/symbol';
643     WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
644 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
645 /**
646  * A request to provide code lens for the given text document.
647  */
648 var CodeLensRequest;
649 (function (CodeLensRequest) {
650     CodeLensRequest.method = 'textDocument/codeLens';
651     CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
652 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
653 /**
654  * A request to resolve a command for a given code lens.
655  */
656 var CodeLensResolveRequest;
657 (function (CodeLensResolveRequest) {
658     CodeLensResolveRequest.method = 'codeLens/resolve';
659     CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
660 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
661 /**
662  * A request to refresh all code actions
663  *
664  * @since 3.16.0
665  */
666 var CodeLensRefreshRequest;
667 (function (CodeLensRefreshRequest) {
668     CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
669     CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
670 })(CodeLensRefreshRequest = exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));
671 /**
672  * A request to provide document links
673  */
674 var DocumentLinkRequest;
675 (function (DocumentLinkRequest) {
676     DocumentLinkRequest.method = 'textDocument/documentLink';
677     DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
678 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
679 /**
680  * Request to resolve additional information for a given document link. The request's
681  * parameter is of type [DocumentLink](#DocumentLink) the response
682  * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
683  */
684 var DocumentLinkResolveRequest;
685 (function (DocumentLinkResolveRequest) {
686     DocumentLinkResolveRequest.method = 'documentLink/resolve';
687     DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
688 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
689 /**
690  * A request to to format a whole document.
691  */
692 var DocumentFormattingRequest;
693 (function (DocumentFormattingRequest) {
694     DocumentFormattingRequest.method = 'textDocument/formatting';
695     DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
696 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
697 /**
698  * A request to to format a range in a document.
699  */
700 var DocumentRangeFormattingRequest;
701 (function (DocumentRangeFormattingRequest) {
702     DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
703     DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
704 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
705 /**
706  * A request to format a document on type.
707  */
708 var DocumentOnTypeFormattingRequest;
709 (function (DocumentOnTypeFormattingRequest) {
710     DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
711     DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
712 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
713 //---- Rename ----------------------------------------------
714 var PrepareSupportDefaultBehavior;
715 (function (PrepareSupportDefaultBehavior) {
716     /**
717      * The client's default behavior is to select the identifier
718      * according the to language's syntax rule.
719      */
720     PrepareSupportDefaultBehavior.Identifier = 1;
721 })(PrepareSupportDefaultBehavior = exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));
722 /**
723  * A request to rename a symbol.
724  */
725 var RenameRequest;
726 (function (RenameRequest) {
727     RenameRequest.method = 'textDocument/rename';
728     RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
729 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
730 /**
731  * A request to test and perform the setup necessary for a rename.
732  *
733  * @since 3.16 - support for default behavior
734  */
735 var PrepareRenameRequest;
736 (function (PrepareRenameRequest) {
737     PrepareRenameRequest.method = 'textDocument/prepareRename';
738     PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
739 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
740 /**
741  * A request send from the client to the server to execute a command. The request might return
742  * a workspace edit which the client will apply to the workspace.
743  */
744 var ExecuteCommandRequest;
745 (function (ExecuteCommandRequest) {
746     ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
747 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
748 /**
749  * A request sent from the server to the client to modified certain resources.
750  */
751 var ApplyWorkspaceEditRequest;
752 (function (ApplyWorkspaceEditRequest) {
753     ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
754 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
755 //# sourceMappingURL=protocol.js.map