1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4// this file was generated by the generate.ts script
5
6#ifndef QLANGUAGESERVERSPEC_P_H
7#define QLANGUAGESERVERSPEC_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtLanguageServer/qtlanguageserverglobal.h>
21#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace QLspSpecification {
26namespace ClientCapabilitiesInfo {
27constexpr auto GeneralRegularExpressions = "general.regularExpressions";
28using GeneralRegularExpressionsType = RegularExpressionsClientCapabilities;
29constexpr auto WorkspaceWorkspaceEdit = "workspace.workspaceEdit";
30using WorkspaceWorkspaceEditType = WorkspaceEditClientCapabilities;
31constexpr auto WindowShowMessage = "window.showMessage";
32using WindowShowMessageType = ShowMessageRequestClientCapabilities;
33constexpr auto WindowShowDocument = "window.showDocument";
34using WindowShowDocumentType = ShowDocumentClientCapabilities;
35constexpr auto WorkspaceWorkspaceFolders = "workspace.workspaceFolders";
36using WorkspaceWorkspaceFoldersType = bool;
37constexpr auto WorkspaceDidChangeConfiguration = "workspace.didChangeConfiguration";
38using WorkspaceDidChangeConfigurationType = DidChangeConfigurationClientCapabilities;
39constexpr auto WorkspaceConfiguration = "workspace.configuration";
40using WorkspaceConfigurationType = bool;
41constexpr auto WorkspaceDidChangeWatchedFiles = "workspace.didChangeWatchedFiles";
42using WorkspaceDidChangeWatchedFilesType = DidChangeWatchedFilesClientCapabilities;
43constexpr auto WorkspaceSymbol = "workspace.symbol";
44using WorkspaceSymbolType = WorkspaceSymbolClientCapabilities;
45constexpr auto WorkspaceExecuteCommand = "workspace.executeCommand";
46using WorkspaceExecuteCommandType = ExecuteCommandClientCapabilities;
47constexpr auto WorkspaceApplyEdit = "workspace.applyEdit";
48using WorkspaceApplyEditType = bool;
49constexpr auto WorkspaceFileOperationsWillCreate = "workspace.fileOperations.willCreate";
50using WorkspaceFileOperationsWillCreateType = bool;
51constexpr auto WorkspaceFileOperationsDidCreate = "workspace.fileOperations.didCreate";
52using WorkspaceFileOperationsDidCreateType = bool;
53constexpr auto WorkspaceFileOperationsWillRename = "workspace.fileOperations.willRename";
54using WorkspaceFileOperationsWillRenameType = bool;
55constexpr auto WorkspaceFileOperationsDidRename = "workspace.fileOperations.didRename";
56using WorkspaceFileOperationsDidRenameType = bool;
57constexpr auto WorkspaceFileOperationsWillDelete = "workspace.fileOperations.willDelete";
58using WorkspaceFileOperationsWillDeleteType = bool;
59constexpr auto WorkspaceFileOperationsDidDelete = "workspace.fileOperations.didDelete";
60using WorkspaceFileOperationsDidDeleteType = bool;
61constexpr auto TextDocumentSynchronizationDynamicRegistration =
62 "textDocument.synchronization.dynamicRegistration";
63using TextDocumentSynchronizationDynamicRegistrationType = bool;
64constexpr auto TextDocumentSynchronizationWillSave = "textDocument.synchronization.willSave";
65using TextDocumentSynchronizationWillSaveType = bool;
66constexpr auto TextDocumentSynchronizationWillSaveWaitUntil =
67 "textDocument.synchronization.willSaveWaitUntil";
68using TextDocumentSynchronizationWillSaveWaitUntilType = bool;
69constexpr auto TextDocumentSynchronizationDidSave = "textDocument.synchronization.didSave";
70using TextDocumentSynchronizationDidSaveType = bool;
71constexpr auto TextDocumentPublishDiagnostics = "textDocument.publishDiagnostics";
72using TextDocumentPublishDiagnosticsType = PublishDiagnosticsClientCapabilities;
73constexpr auto TextDocumentCompletion = "textDocument.completion";
74using TextDocumentCompletionType = CompletionClientCapabilities;
75constexpr auto TextDocumentHover = "textDocument.hover";
76using TextDocumentHoverType = HoverClientCapabilities;
77constexpr auto TextDocumentSignatureHelp = "textDocument.signatureHelp";
78using TextDocumentSignatureHelpType = SignatureHelpClientCapabilities;
79constexpr auto TextDocumentDeclaration = "textDocument.declaration";
80using TextDocumentDeclarationType = DeclarationClientCapabilities;
81constexpr auto TextDocumentDefinition = "textDocument.definition";
82using TextDocumentDefinitionType = DefinitionClientCapabilities;
83constexpr auto TextDocumentTypeDefinition = "textDocument.typeDefinition";
84using TextDocumentTypeDefinitionType = TypeDefinitionClientCapabilities;
85constexpr auto TextDocumentImplementation = "textDocument.implementation";
86using TextDocumentImplementationType = ImplementationClientCapabilities;
87constexpr auto TextDocumentReferences = "textDocument.references";
88using TextDocumentReferencesType = ReferenceClientCapabilities;
89constexpr auto TextDocumentDocumentHighlight = "textDocument.documentHighlight";
90using TextDocumentDocumentHighlightType = DocumentHighlightClientCapabilities;
91constexpr auto TextDocumentDocumentSymbol = "textDocument.documentSymbol";
92using TextDocumentDocumentSymbolType = DocumentSymbolClientCapabilities;
93constexpr auto TextDocumentCodeAction = "textDocument.codeAction";
94using TextDocumentCodeActionType = CodeActionClientCapabilities;
95constexpr auto TextDocumentCodeActionResolveSupport = "textDocument.codeAction.resolveSupport";
96using TextDocumentCodeActionResolveSupportType = QJsonObject;
97constexpr auto TextDocumentCodeLens = "textDocument.codeLens";
98using TextDocumentCodeLensType = CodeLensClientCapabilities;
99constexpr auto WorkspaceCodeLens = "workspace.codeLens";
100using WorkspaceCodeLensType = CodeLensWorkspaceClientCapabilities;
101constexpr auto TextDocumentDocumentLink = "textDocument.documentLink";
102using TextDocumentDocumentLinkType = DocumentLinkClientCapabilities;
103constexpr auto TextDocumentColorProvider = "textDocument.colorProvider";
104using TextDocumentColorProviderType = DocumentColorClientCapabilities;
105constexpr auto TextDocumentFormatting = "textDocument.formatting";
106using TextDocumentFormattingType = DocumentFormattingClientCapabilities;
107constexpr auto TextDocumentRangeFormatting = "textDocument.rangeFormatting";
108using TextDocumentRangeFormattingType = DocumentRangeFormattingClientCapabilities;
109constexpr auto TextDocumentOnTypeFormatting = "textDocument.onTypeFormatting";
110using TextDocumentOnTypeFormattingType = DocumentOnTypeFormattingClientCapabilities;
111constexpr auto TextDocumentRename = "textDocument.rename";
112using TextDocumentRenameType = RenameClientCapabilities;
113constexpr auto TextDocumentFoldingRange = "textDocument.foldingRange";
114using TextDocumentFoldingRangeType = FoldingRangeClientCapabilities;
115constexpr auto TextDocumentSelectionRange = "textDocument.selectionRange";
116using TextDocumentSelectionRangeType = SelectionRangeClientCapabilities;
117constexpr auto TextDocumentCallHierarchy = "textDocument.callHierarchy";
118using TextDocumentCallHierarchyType = CallHierarchyClientCapabilities;
119constexpr auto TextDocumentSemanticTokens = "textDocument.semanticTokens";
120using TextDocumentSemanticTokensType = SemanticTokensClientCapabilities;
121constexpr auto WorkspaceSemanticTokens = "workspace.semanticTokens";
122using WorkspaceSemanticTokensType = SemanticTokensWorkspaceClientCapabilities;
123}
124
125namespace ServerCapabilitiesInfo {
126constexpr auto WorkspaceWorkspaceFolders = "workspace.workspaceFolders";
127using WorkspaceWorkspaceFoldersType = WorkspaceFoldersServerCapabilities;
128constexpr auto WorkspaceSymbolProvider = "workspaceSymbolProvider";
129using WorkspaceSymbolProviderType = std::variant<bool, WorkspaceSymbolOptions>;
130constexpr auto ExecuteCommandProvider = "executeCommandProvider";
131using ExecuteCommandProviderType = ExecuteCommandOptions;
132constexpr auto WorkspaceFileOperationsWillCreate = "workspace.fileOperations.willCreate";
133using WorkspaceFileOperationsWillCreateType = FileOperationRegistrationOptions;
134constexpr auto WorkspaceFileOperationsDidCreate = "workspace.fileOperations.didCreate";
135using WorkspaceFileOperationsDidCreateType = FileOperationRegistrationOptions;
136constexpr auto WorkspaceFileOperationsWillRename = "workspace.fileOperations.willRename";
137using WorkspaceFileOperationsWillRenameType = FileOperationRegistrationOptions;
138constexpr auto WorkspaceFileOperationsDidRename = "workspace.fileOperations.didRename";
139using WorkspaceFileOperationsDidRenameType = FileOperationRegistrationOptions;
140constexpr auto WorkspaceFileOperationsWillDelete = "workspace.fileOperations.willDelete";
141using WorkspaceFileOperationsWillDeleteType = FileOperationRegistrationOptions;
142constexpr auto WorkspaceFileOperationsDidDelete = "workspace.fileOperations.didDelete";
143using WorkspaceFileOperationsDidDeleteType = FileOperationRegistrationOptions;
144constexpr auto TextDocumentSync = "textDocumentSync";
145using TextDocumentSyncType = std::variant<TextDocumentSyncKind, TextDocumentSyncOptions>;
146constexpr auto TextDocumentSyncWillSave = "textDocumentSync.willSave";
147using TextDocumentSyncWillSaveType = bool;
148constexpr auto TextDocumentSyncWillSaveWaitUntil = "textDocumentSync.willSaveWaitUntil";
149using TextDocumentSyncWillSaveWaitUntilType = bool;
150constexpr auto TextDocumentSyncSave = "textDocumentSync.save";
151using TextDocumentSyncSaveType = std::variant<bool, SaveOptions>;
152constexpr auto CompletionProvider = "completionProvider";
153using CompletionProviderType = CompletionOptions;
154constexpr auto HoverProvider = "hoverProvider";
155using HoverProviderType = std::variant<bool, HoverOptions>;
156constexpr auto SignatureHelpProvider = "signatureHelpProvider";
157using SignatureHelpProviderType = SignatureHelpOptions;
158constexpr auto DeclarationProvider = "declarationProvider";
159using DeclarationProviderType =
160 std::variant<bool, DeclarationOptions, DeclarationRegistrationOptions>;
161constexpr auto DefinitionProvider = "definitionProvider";
162using DefinitionProviderType = std::variant<bool, DefinitionOptions>;
163constexpr auto TypeDefinitionProvider = "typeDefinitionProvider";
164using TypeDefinitionProviderType =
165 std::variant<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>;
166constexpr auto ImplementationProvider = "implementationProvider";
167using ImplementationProviderType =
168 std::variant<bool, ImplementationOptions, ImplementationRegistrationOptions>;
169constexpr auto ReferencesProvider = "referencesProvider";
170using ReferencesProviderType = std::variant<bool, ReferenceOptions>;
171constexpr auto DocumentHighlightProvider = "documentHighlightProvider";
172using DocumentHighlightProviderType = std::variant<bool, DocumentHighlightOptions>;
173constexpr auto DocumentSymbolProvider = "documentSymbolProvider";
174using DocumentSymbolProviderType = std::variant<bool, DocumentSymbolOptions>;
175constexpr auto CodeActionProvider = "codeActionProvider";
176using CodeActionProviderType = std::variant<bool, CodeActionOptions>;
177constexpr auto CodeLensProvider = "codeLensProvider";
178using CodeLensProviderType = CodeLensOptions;
179constexpr auto DocumentLinkProvider = "documentLinkProvider";
180using DocumentLinkProviderType = DocumentLinkOptions;
181constexpr auto ColorProvider = "colorProvider";
182using ColorProviderType =
183 std::variant<bool, DocumentColorOptions, DocumentColorRegistrationOptions>;
184constexpr auto DocumentFormattingProvider = "documentFormattingProvider";
185using DocumentFormattingProviderType = std::variant<bool, DocumentFormattingOptions>;
186constexpr auto DocumentRangeFormattingProvider = "documentRangeFormattingProvider";
187using DocumentRangeFormattingProviderType = std::variant<bool, DocumentRangeFormattingOptions>;
188constexpr auto DocumentOnTypeFormattingProvider = "documentOnTypeFormattingProvider";
189using DocumentOnTypeFormattingProviderType = DocumentOnTypeFormattingOptions;
190constexpr auto RenameProvider = "renameProvider";
191using RenameProviderType = std::variant<bool, RenameOptions>;
192constexpr auto FoldingRangeProvider = "foldingRangeProvider";
193using FoldingRangeProviderType =
194 std::variant<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>;
195constexpr auto SelectionRangeProvider = "selectionRangeProvider";
196using SelectionRangeProviderType =
197 std::variant<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>;
198constexpr auto CallHierarchyProvider = "callHierarchyProvider";
199using CallHierarchyProviderType =
200 std::variant<bool, CallHierarchyOptions, CallHierarchyRegistrationOptions>;
201constexpr auto SemanticTokensProvider = "semanticTokensProvider";
202using SemanticTokensProviderType =
203 std::variant<SemanticTokensOptions, SemanticTokensRegistrationOptions>;
204constexpr auto LinkedEditingRangeProvider = "linkedEditingRangeProvider";
205using LinkedEditingRangeProviderType =
206 std::variant<bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions>;
207constexpr auto MonikerProvider = "monikerProvider";
208using MonikerProviderType = std::variant<bool, MonikerOptions, MonikerRegistrationOptions>;
209}
210
211namespace Requests {
212constexpr auto InitializeMethod = "initialize";
213using InitializeParamsType = InitializeParams;
214constexpr auto ShutdownMethod = "shutdown";
215using ShutdownParamsType = std::nullptr_t;
216constexpr auto ShowMessageRequestMethod = "window/showMessageRequest";
217using ShowMessageRequestParamsType = ShowMessageRequestParams;
218constexpr auto ShowDocumentMethod = "window/showDocument";
219using ShowDocumentParamsType = ShowDocumentParams;
220constexpr auto WorkDoneProgressCreateMethod = "window/workDoneProgress/create";
221using WorkDoneProgressCreateParamsType = WorkDoneProgressCreateParams;
222constexpr auto RegistrationMethod = "client/registerCapability";
223using RegistrationParamsType = RegistrationParams;
224constexpr auto UnregistrationMethod = "client/unregisterCapability";
225using UnregistrationParamsType = UnregistrationParams;
226constexpr auto WorkspaceWorkspaceFoldersMethod = "workspace/workspaceFolders";
227using WorkspaceWorkspaceFoldersParamsType = std::nullptr_t;
228constexpr auto ConfigurationMethod = "workspace/configuration";
229using ConfigurationParamsType = ConfigurationParams;
230constexpr auto WorkspaceSymbolMethod = "workspace/symbol";
231using WorkspaceSymbolParamsType = WorkspaceSymbolParams;
232constexpr auto ExecuteCommandMethod = "workspace/executeCommand";
233using ExecuteCommandParamsType = ExecuteCommandParams;
234constexpr auto ApplyWorkspaceEditMethod = "workspace/applyEdit";
235using ApplyWorkspaceEditParamsType = ApplyWorkspaceEditParams;
236constexpr auto CreateFilesMethod = "workspace/willCreateFiles";
237using CreateFilesParamsType = CreateFilesParams;
238constexpr auto RenameFilesMethod = "workspace/willRenameFiles";
239using RenameFilesParamsType = RenameFilesParams;
240constexpr auto DeleteFilesMethod = "workspace/willDeleteFiles";
241using DeleteFilesParamsType = DeleteFilesParams;
242constexpr auto WillSaveTextDocumentMethod = "textDocument/willSaveWaitUntil";
243using WillSaveTextDocumentParamsType = WillSaveTextDocumentParams;
244constexpr auto CompletionMethod = "textDocument/completion";
245using CompletionParamsType = CompletionParams;
246constexpr auto CompletionItemResolveMethod = "completionItem/resolve";
247using CompletionItemResolveParamsType = CompletionItem;
248constexpr auto HoverMethod = "textDocument/hover";
249using HoverParamsType = HoverParams;
250constexpr auto SignatureHelpMethod = "textDocument/signatureHelp";
251using SignatureHelpParamsType = SignatureHelpParams;
252constexpr auto DeclarationMethod = "textDocument/declaration";
253using DeclarationParamsType = DeclarationParams;
254constexpr auto DefinitionMethod = "textDocument/definition";
255using DefinitionParamsType = DefinitionParams;
256constexpr auto TypeDefinitionMethod = "textDocument/typeDefinition";
257using TypeDefinitionParamsType = TypeDefinitionParams;
258constexpr auto ImplementationMethod = "textDocument/implementation";
259using ImplementationParamsType = ImplementationParams;
260constexpr auto ReferenceMethod = "textDocument/references";
261using ReferenceParamsType = ReferenceParams;
262constexpr auto DocumentHighlightMethod = "textDocument/documentHighlight";
263using DocumentHighlightParamsType = DocumentHighlightParams;
264constexpr auto DocumentSymbolMethod = "textDocument/documentSymbol";
265using DocumentSymbolParamsType = DocumentSymbolParams;
266constexpr auto CodeActionMethod = "textDocument/codeAction";
267using CodeActionParamsType = CodeActionParams;
268constexpr auto CodeActionResolveMethod = "codeAction/resolve";
269using CodeActionResolveParamsType = CodeAction;
270constexpr auto CodeLensMethod = "textDocument/codeLens";
271using CodeLensParamsType = CodeLensParams;
272constexpr auto CodeLensResolveMethod = "codeLens/resolve";
273using CodeLensResolveParamsType = CodeLens;
274constexpr auto CodeLensRefreshMethod = "workspace/codeLens/refresh";
275using CodeLensRefreshParamsType = std::nullptr_t;
276constexpr auto DocumentLinkMethod = "textDocument/documentLink";
277using DocumentLinkParamsType = DocumentLinkParams;
278constexpr auto DocumentLinkResolveMethod = "documentLink/resolve";
279using DocumentLinkResolveParamsType = DocumentLink;
280constexpr auto DocumentColorMethod = "textDocument/documentColor";
281using DocumentColorParamsType = DocumentColorParams;
282constexpr auto ColorPresentationMethod = "textDocument/colorPresentation";
283using ColorPresentationParamsType = ColorPresentationParams;
284constexpr auto DocumentFormattingMethod = "textDocument/formatting";
285using DocumentFormattingParamsType = DocumentFormattingParams;
286constexpr auto DocumentRangeFormattingMethod = "textDocument/rangeFormatting";
287using DocumentRangeFormattingParamsType = DocumentRangeFormattingParams;
288constexpr auto DocumentOnTypeFormattingMethod = "textDocument/onTypeFormatting";
289using DocumentOnTypeFormattingParamsType = DocumentOnTypeFormattingParams;
290constexpr auto RenameMethod = "textDocument/rename";
291using RenameParamsType = RenameParams;
292constexpr auto PrepareRenameMethod = "textDocument/prepareRename";
293using PrepareRenameParamsType = PrepareRenameParams;
294constexpr auto FoldingRangeMethod = "textDocument/foldingRange";
295using FoldingRangeParamsType = FoldingRangeParams;
296constexpr auto SelectionRangeMethod = "textDocument/selectionRange";
297using SelectionRangeParamsType = SelectionRangeParams;
298constexpr auto CallHierarchyPrepareMethod = "textDocument/prepareCallHierarchy";
299using CallHierarchyPrepareParamsType = CallHierarchyPrepareParams;
300constexpr auto CallHierarchyIncomingCallsMethod = "callHierarchy/incomingCalls";
301using CallHierarchyIncomingCallsParamsType = CallHierarchyIncomingCallsParams;
302constexpr auto CallHierarchyOutgoingCallsMethod = "callHierarchy/outgoingCalls";
303using CallHierarchyOutgoingCallsParamsType = CallHierarchyOutgoingCallsParams;
304constexpr auto SemanticTokensMethod = "textDocument/semanticTokens/full";
305using SemanticTokensParamsType = SemanticTokensParams;
306constexpr auto SemanticTokensDeltaMethod = "textDocument/semanticTokens/full/delta";
307using SemanticTokensDeltaParamsType = SemanticTokensDeltaParams;
308constexpr auto SemanticTokensRangeMethod = "textDocument/semanticTokens/range";
309using SemanticTokensRangeParamsType = SemanticTokensRangeParams;
310constexpr auto RequestingARefreshOfAllSemanticTokensMethod = "workspace/semanticTokens/refresh";
311using RequestingARefreshOfAllSemanticTokensParamsType = std::nullptr_t;
312constexpr auto LinkedEditingRangeMethod = "textDocument/linkedEditingRange";
313using LinkedEditingRangeParamsType = LinkedEditingRangeParams;
314constexpr auto MonikerMethod = "textDocument/moniker";
315using MonikerParamsType = MonikerParams;
316}
317
318namespace Responses {
319using InitializeResultType = InitializeResult;
320using InitializeResponseType = LSPResponse<InitializeResultType>;
321using ShutdownResultType = std::nullptr_t;
322using ShutdownResponseType = LSPResponse<ShutdownResultType>;
323using ShowMessageRequestResultType = std::variant<MessageActionItem, std::nullptr_t>;
324using ShowMessageRequestResponseType = LSPResponse<ShowMessageRequestResultType>;
325using ShowDocumentResultType = ShowDocumentResult;
326using ShowDocumentResponseType = LSPResponse<ShowDocumentResultType>;
327using WorkDoneProgressCreateResultType = std::nullptr_t;
328using WorkDoneProgressCreateResponseType = LSPResponse<WorkDoneProgressCreateResultType>;
329using RegistrationResultType = std::nullptr_t;
330using RegistrationResponseType = LSPResponse<RegistrationResultType>;
331using UnregistrationResultType = std::nullptr_t;
332using UnregistrationResponseType = LSPResponse<UnregistrationResultType>;
333using WorkspaceWorkspaceFoldersResultType = std::variant<QList<WorkspaceFolder>, std::nullptr_t>;
334using WorkspaceWorkspaceFoldersResponseType = LSPResponse<WorkspaceWorkspaceFoldersResultType>;
335using ConfigurationResultType = QList<QJsonValue>;
336using ConfigurationResponseType = LSPResponse<ConfigurationResultType>;
337using WorkspaceSymbolResultType = std::variant<QList<SymbolInformation>, std::nullptr_t>;
338using WorkspaceSymbolPartialResultType = QList<SymbolInformation>;
339using WorkspaceSymbolResponseType =
340 LSPPartialResponse<WorkspaceSymbolResultType, WorkspaceSymbolPartialResultType>;
341using ExecuteCommandResultType = std::variant<QJsonValue, std::nullptr_t>;
342using ExecuteCommandResponseType = LSPResponse<ExecuteCommandResultType>;
343using ApplyWorkspaceEditResultType = ApplyWorkspaceEditResponse;
344using ApplyWorkspaceEditResponseType = LSPResponse<ApplyWorkspaceEditResultType>;
345using CreateFilesResultType = std::variant<WorkspaceEdit, std::nullptr_t>;
346using CreateFilesResponseType = LSPResponse<CreateFilesResultType>;
347using RenameFilesResultType = std::variant<WorkspaceEdit, std::nullptr_t>;
348using RenameFilesResponseType = LSPResponse<RenameFilesResultType>;
349using DeleteFilesResultType = std::variant<WorkspaceEdit, std::nullptr_t>;
350using DeleteFilesResponseType = LSPResponse<DeleteFilesResultType>;
351using WillSaveTextDocumentResultType = std::variant<QList<TextEdit>, std::nullptr_t>;
352using WillSaveTextDocumentResponseType = LSPResponse<WillSaveTextDocumentResultType>;
353using CompletionResultType = std::variant<QList<CompletionItem>, CompletionList, std::nullptr_t>;
354using CompletionPartialResultType = std::variant<CompletionList, QList<CompletionItem>>;
355using CompletionResponseType =
356 LSPPartialResponse<CompletionResultType, CompletionPartialResultType>;
357using CompletionItemResolveResultType = CompletionItem;
358using CompletionItemResolveResponseType = LSPResponse<CompletionItemResolveResultType>;
359using HoverResultType = std::variant<Hover, std::nullptr_t>;
360using HoverResponseType = LSPResponse<HoverResultType>;
361using SignatureHelpResultType = std::variant<SignatureHelp, std::nullptr_t>;
362using SignatureHelpResponseType = LSPResponse<SignatureHelpResultType>;
363using DeclarationResultType =
364 std::variant<Location, QList<Location>, QList<LocationLink>, std::nullptr_t>;
365using DeclarationPartialResultType = std::variant<QList<Location>, QList<LocationLink>>;
366using DeclarationResponseType =
367 LSPPartialResponse<DeclarationResultType, DeclarationPartialResultType>;
368using DefinitionResultType =
369 std::variant<Location, QList<Location>, QList<LocationLink>, std::nullptr_t>;
370using DefinitionPartialResultType = std::variant<QList<Location>, QList<LocationLink>>;
371using DefinitionResponseType =
372 LSPPartialResponse<DefinitionResultType, DefinitionPartialResultType>;
373using TypeDefinitionResultType =
374 std::variant<Location, QList<Location>, QList<LocationLink>, std::nullptr_t>;
375using TypeDefinitionPartialResultType = std::variant<QList<Location>, QList<LocationLink>>;
376using TypeDefinitionResponseType =
377 LSPPartialResponse<TypeDefinitionResultType, TypeDefinitionPartialResultType>;
378using ImplementationResultType =
379 std::variant<Location, QList<Location>, QList<LocationLink>, std::nullptr_t>;
380using ImplementationPartialResultType = std::variant<QList<Location>, QList<LocationLink>>;
381using ImplementationResponseType =
382 LSPPartialResponse<ImplementationResultType, ImplementationPartialResultType>;
383using ReferenceResultType = std::variant<QList<Location>, std::nullptr_t>;
384using ReferencePartialResultType = QList<Location>;
385using ReferenceResponseType = LSPPartialResponse<ReferenceResultType, ReferencePartialResultType>;
386using DocumentHighlightResultType = std::variant<QList<DocumentHighlight>, std::nullptr_t>;
387using DocumentHighlightPartialResultType = QList<DocumentHighlight>;
388using DocumentHighlightResponseType =
389 LSPPartialResponse<DocumentHighlightResultType, DocumentHighlightPartialResultType>;
390using DocumentSymbolResultType =
391 std::variant<QList<DocumentSymbol>, QList<SymbolInformation>, std::nullptr_t>;
392using DocumentSymbolPartialResultType =
393 std::variant<QList<DocumentSymbol>, QList<SymbolInformation>>;
394using DocumentSymbolResponseType =
395 LSPPartialResponse<DocumentSymbolResultType, DocumentSymbolPartialResultType>;
396using CodeActionResultType = std::variant<QList<std::variant<Command, CodeAction>>, std::nullptr_t>;
397using CodeActionPartialResultType = QList<std::variant<Command, CodeAction>>;
398using CodeActionResponseType =
399 LSPPartialResponse<CodeActionResultType, CodeActionPartialResultType>;
400using CodeActionResolveResultType = CodeAction;
401using CodeActionResolveResponseType = LSPResponse<CodeActionResolveResultType>;
402using CodeLensResultType = std::variant<QList<CodeLens>, std::nullptr_t>;
403using CodeLensPartialResultType = QList<CodeLens>;
404using CodeLensResponseType = LSPPartialResponse<CodeLensResultType, CodeLensPartialResultType>;
405using CodeLensResolveResultType = CodeLens;
406using CodeLensResolveResponseType = LSPResponse<CodeLensResolveResultType>;
407using CodeLensRefreshResultType = std::nullptr_t;
408using CodeLensRefreshResponseType = LSPResponse<CodeLensRefreshResultType>;
409using DocumentLinkResultType = std::variant<QList<DocumentLink>, std::nullptr_t>;
410using DocumentLinkPartialResultType = QList<DocumentLink>;
411using DocumentLinkResponseType =
412 LSPPartialResponse<DocumentLinkResultType, DocumentLinkPartialResultType>;
413using DocumentLinkResolveResultType = DocumentLink;
414using DocumentLinkResolveResponseType = LSPResponse<DocumentLinkResolveResultType>;
415using DocumentColorResultType = QList<ColorInformation>;
416using DocumentColorPartialResultType = QList<ColorInformation>;
417using DocumentColorResponseType =
418 LSPPartialResponse<DocumentColorResultType, DocumentColorPartialResultType>;
419using ColorPresentationResultType = QList<ColorPresentation>;
420using ColorPresentationPartialResultType = QList<ColorPresentation>;
421using ColorPresentationResponseType =
422 LSPPartialResponse<ColorPresentationResultType, ColorPresentationPartialResultType>;
423using DocumentFormattingResultType = std::variant<QList<TextEdit>, std::nullptr_t>;
424using DocumentFormattingResponseType = LSPResponse<DocumentFormattingResultType>;
425using DocumentRangeFormattingResultType = std::variant<QList<TextEdit>, std::nullptr_t>;
426using DocumentRangeFormattingResponseType = LSPResponse<DocumentRangeFormattingResultType>;
427using DocumentOnTypeFormattingResultType = std::variant<QList<TextEdit>, std::nullptr_t>;
428using DocumentOnTypeFormattingResponseType = LSPResponse<DocumentOnTypeFormattingResultType>;
429using RenameResultType = std::variant<WorkspaceEdit, std::nullptr_t>;
430using RenameResponseType = LSPResponse<RenameResultType>;
431using PrepareRenameResultType =
432 std::variant<Range, RangePlaceHolder, DefaultBehaviorStruct, std::nullptr_t>;
433using PrepareRenameResponseType = LSPResponse<PrepareRenameResultType>;
434using FoldingRangeResultType = std::variant<QList<FoldingRange>, std::nullptr_t>;
435using FoldingRangePartialResultType = QList<FoldingRange>;
436using FoldingRangeResponseType =
437 LSPPartialResponse<FoldingRangeResultType, FoldingRangePartialResultType>;
438using SelectionRangeResultType = std::variant<QList<SelectionRange>, std::nullptr_t>;
439using SelectionRangePartialResultType = QList<SelectionRange>;
440using SelectionRangeResponseType =
441 LSPPartialResponse<SelectionRangeResultType, SelectionRangePartialResultType>;
442using CallHierarchyPrepareResultType = std::variant<QList<CallHierarchyItem>, std::nullptr_t>;
443using CallHierarchyPrepareResponseType = LSPResponse<CallHierarchyPrepareResultType>;
444using CallHierarchyIncomingCallsResultType =
445 std::variant<QList<CallHierarchyIncomingCall>, std::nullptr_t>;
446using CallHierarchyIncomingCallsPartialResultType = QList<CallHierarchyIncomingCall>;
447using CallHierarchyIncomingCallsResponseType =
448 LSPPartialResponse<CallHierarchyIncomingCallsResultType,
449 CallHierarchyIncomingCallsPartialResultType>;
450using CallHierarchyOutgoingCallsResultType =
451 std::variant<QList<CallHierarchyOutgoingCall>, std::nullptr_t>;
452using CallHierarchyOutgoingCallsPartialResultType = QList<CallHierarchyOutgoingCall>;
453using CallHierarchyOutgoingCallsResponseType =
454 LSPPartialResponse<CallHierarchyOutgoingCallsResultType,
455 CallHierarchyOutgoingCallsPartialResultType>;
456using SemanticTokensResultType = std::variant<SemanticTokens, std::nullptr_t>;
457using SemanticTokensPartialResultType = SemanticTokensPartialResult;
458using SemanticTokensResponseType =
459 LSPPartialResponse<SemanticTokensResultType, SemanticTokensPartialResultType>;
460using SemanticTokensDeltaResultType =
461 std::variant<SemanticTokens, SemanticTokensDelta, std::nullptr_t>;
462using SemanticTokensDeltaPartialResultType = SemanticTokensDeltaPartialResult;
463using SemanticTokensDeltaResponseType =
464 LSPPartialResponse<SemanticTokensDeltaResultType, SemanticTokensDeltaPartialResultType>;
465using SemanticTokensRangeResultType = std::variant<SemanticTokens, std::nullptr_t>;
466using SemanticTokensRangePartialResultType = SemanticTokensPartialResult;
467using SemanticTokensRangeResponseType =
468 LSPPartialResponse<SemanticTokensRangeResultType, SemanticTokensRangePartialResultType>;
469using RequestingARefreshOfAllSemanticTokensResultType = std::nullptr_t;
470using RequestingARefreshOfAllSemanticTokensResponseType =
471 LSPResponse<RequestingARefreshOfAllSemanticTokensResultType>;
472using LinkedEditingRangeResultType = std::variant<LinkedEditingRanges, std::nullptr_t>;
473using LinkedEditingRangeResponseType = LSPResponse<LinkedEditingRangeResultType>;
474using MonikerResultType = std::variant<QList<Moniker>, std::nullptr_t>;
475using MonikerPartialResultType = QList<Moniker>;
476using MonikerResponseType = LSPPartialResponse<MonikerResultType, MonikerPartialResultType>;
477}
478
479namespace Notifications {
480constexpr auto CancelMethod = "$/cancelRequest";
481using CancelParamsType = CancelParams;
482constexpr auto ProgressMethod = "$/progress";
483constexpr auto InitializedMethod = "initialized";
484using InitializedParamsType = InitializedParams;
485constexpr auto ExitMethod = "exit";
486using ExitParamsType = std::nullptr_t;
487constexpr auto LogTraceMethod = "$/logTrace";
488using LogTraceParamsType = LogTraceParams;
489constexpr auto SetTraceMethod = "$/setTrace";
490using SetTraceParamsType = SetTraceParams;
491constexpr auto ShowMessageMethod = "window/showMessage";
492using ShowMessageParamsType = ShowMessageParams;
493constexpr auto LogMessageMethod = "window/logMessage";
494using LogMessageParamsType = LogMessageParams;
495constexpr auto WorkDoneProgressCancelMethod = "window/workDoneProgress/cancel";
496using WorkDoneProgressCancelParamsType = WorkDoneProgressCancelParams;
497constexpr auto TelemetryEventMethod = "telemetry/event";
498using TelemetryEventParamsType = QJsonObject;
499constexpr auto DidChangeWorkspaceFoldersMethod = "workspace/didChangeWorkspaceFolders";
500using DidChangeWorkspaceFoldersParamsType = DidChangeWorkspaceFoldersParams;
501constexpr auto DidChangeConfigurationMethod = "workspace/didChangeConfiguration";
502using DidChangeConfigurationParamsType = DidChangeConfigurationParams;
503constexpr auto DidChangeWatchedFilesMethod = "workspace/didChangeWatchedFiles";
504using DidChangeWatchedFilesParamsType = DidChangeWatchedFilesParams;
505constexpr auto CreateFilesMethod = "workspace/didCreateFiles";
506using CreateFilesParamsType = CreateFilesParams;
507constexpr auto RenameFilesMethod = "workspace/didRenameFiles";
508using RenameFilesParamsType = RenameFilesParams;
509constexpr auto DeleteFilesMethod = "workspace/didDeleteFiles";
510using DeleteFilesParamsType = DeleteFilesParams;
511constexpr auto DidOpenTextDocumentMethod = "textDocument/didOpen";
512using DidOpenTextDocumentParamsType = DidOpenTextDocumentParams;
513constexpr auto DidChangeTextDocumentMethod = "textDocument/didChange";
514using DidChangeTextDocumentParamsType = DidChangeTextDocumentParams;
515constexpr auto WillSaveTextDocumentMethod = "textDocument/willSave";
516using WillSaveTextDocumentParamsType = WillSaveTextDocumentParams;
517constexpr auto DidSaveTextDocumentMethod = "textDocument/didSave";
518using DidSaveTextDocumentParamsType = DidSaveTextDocumentParams;
519constexpr auto DidCloseTextDocumentMethod = "textDocument/didClose";
520using DidCloseTextDocumentParamsType = DidCloseTextDocumentParams;
521constexpr auto PublishDiagnosticsMethod = "textDocument/publishDiagnostics";
522using PublishDiagnosticsParamsType = PublishDiagnosticsParams;
523}
524
525using RequestParams = std::variant<
526 InitializeParams, std::nullptr_t, ShowMessageRequestParams, ShowDocumentParams,
527 WorkDoneProgressCreateParams, RegistrationParams, UnregistrationParams, ConfigurationParams,
528 WorkspaceSymbolParams, ExecuteCommandParams, ApplyWorkspaceEditParams, CreateFilesParams,
529 RenameFilesParams, DeleteFilesParams, WillSaveTextDocumentParams, CompletionParams,
530 CompletionItem, HoverParams, SignatureHelpParams, DeclarationParams, DefinitionParams,
531 TypeDefinitionParams, ImplementationParams, ReferenceParams, DocumentHighlightParams,
532 DocumentSymbolParams, CodeActionParams, CodeAction, CodeLensParams, CodeLens,
533 DocumentLinkParams, DocumentLink, DocumentColorParams, ColorPresentationParams,
534 DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams,
535 RenameParams, PrepareRenameParams, FoldingRangeParams, SelectionRangeParams,
536 CallHierarchyPrepareParams, CallHierarchyIncomingCallsParams,
537 CallHierarchyOutgoingCallsParams, SemanticTokensParams, SemanticTokensDeltaParams,
538 SemanticTokensRangeParams, LinkedEditingRangeParams, MonikerParams, QJsonValue>;
539using NotificationParams = std::variant<
540 CancelParams, InitializedParams, std::nullptr_t, LogTraceParams, SetTraceParams,
541 ShowMessageParams, LogMessageParams, WorkDoneProgressCancelParams, QJsonObject,
542 DidChangeWorkspaceFoldersParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams,
543 CreateFilesParams, RenameFilesParams, DeleteFilesParams, DidOpenTextDocumentParams,
544 DidChangeTextDocumentParams, WillSaveTextDocumentParams, DidSaveTextDocumentParams,
545 DidCloseTextDocumentParams, PublishDiagnosticsParams, QJsonValue>;
546
547} // namespace QLspSpecification
548
549QT_END_NAMESPACE
550
551#endif // QLANGUAGESERVERSPEC_P_H
552

source code of qtlanguageserver/src/languageserver/qlanguageserverspec_p.h