| 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 QLANGUAGESERVERGEN_P_H | 
|---|
| 7 | #define QLANGUAGESERVERGEN_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/qlanguageserverspec_p.h> | 
|---|
| 22 | #include <QtLanguageServer/private/qlanguageserverbase_p.h> | 
|---|
| 23 |  | 
|---|
| 24 | #include <memory> | 
|---|
| 25 | #include <functional> | 
|---|
| 26 |  | 
|---|
| 27 | QT_BEGIN_NAMESPACE | 
|---|
| 28 |  | 
|---|
| 29 | namespace QLspSpecification { | 
|---|
| 30 |  | 
|---|
| 31 | class ProtocolGenPrivate; | 
|---|
| 32 |  | 
|---|
| 33 | class Q_LANGUAGESERVER_EXPORT ProtocolGen : public ProtocolBase | 
|---|
| 34 | { | 
|---|
| 35 | protected: | 
|---|
| 36 | ProtocolGen(std::unique_ptr<ProtocolGenPrivate> &&p); | 
|---|
| 37 | public: | 
|---|
| 38 | ~ProtocolGen(); | 
|---|
| 39 |  | 
|---|
| 40 | // # Send protocol | 
|---|
| 41 | void notifyCancel(const CancelParams ¶ms); | 
|---|
| 42 |  | 
|---|
| 43 | // ClientCapability::GeneralRegularExpressions | 
|---|
| 44 |  | 
|---|
| 45 | // ClientCapability::WorkspaceWorkspaceEdit | 
|---|
| 46 |  | 
|---|
| 47 | void requestInitialize( | 
|---|
| 48 | const InitializeParams &, std::function<void(const InitializeResult &)> responseHandler, | 
|---|
| 49 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 50 | void notifyInitialized(const InitializedParams ¶ms); | 
|---|
| 51 | void | 
|---|
| 52 | requestShutdown(const std::nullptr_t &, std::function<void()> responseHandler, | 
|---|
| 53 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 54 | void notifyExit(const std::nullptr_t ¶ms); | 
|---|
| 55 | void notifyLogTrace(const LogTraceParams ¶ms); | 
|---|
| 56 | void notifySetTrace(const SetTraceParams ¶ms); | 
|---|
| 57 | void notifyShowMessage(const ShowMessageParams ¶ms); | 
|---|
| 58 |  | 
|---|
| 59 | // ClientCapability::WindowShowMessage | 
|---|
| 60 | void requestShowMessageRequest( | 
|---|
| 61 | const ShowMessageRequestParams &, | 
|---|
| 62 | std::function<void(const std::variant<MessageActionItem, std::nullptr_t> &)> | 
|---|
| 63 | responseHandler, | 
|---|
| 64 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 65 |  | 
|---|
| 66 | // ClientCapability::WindowShowDocument | 
|---|
| 67 | void requestShowDocument( | 
|---|
| 68 | const ShowDocumentParams &, | 
|---|
| 69 | std::function<void(const ShowDocumentResult &)> responseHandler, | 
|---|
| 70 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 71 |  | 
|---|
| 72 | void notifyLogMessage(const LogMessageParams ¶ms); | 
|---|
| 73 | void requestWorkDoneProgressCreate( | 
|---|
| 74 | const WorkDoneProgressCreateParams &, std::function<void()> responseHandler, | 
|---|
| 75 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 76 | void notifyWorkDoneProgressCancel(const WorkDoneProgressCancelParams ¶ms); | 
|---|
| 77 | void notifyTelemetryEvent(const QJsonObject ¶ms); | 
|---|
| 78 | void requestRegistration( | 
|---|
| 79 | const RegistrationParams &, std::function<void()> responseHandler, | 
|---|
| 80 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 81 | void requestUnregistration( | 
|---|
| 82 | const UnregistrationParams &, std::function<void()> responseHandler, | 
|---|
| 83 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 84 |  | 
|---|
| 85 | // ServerCapability::WorkspaceWorkspaceFolders | 
|---|
| 86 | // ClientCapability::WorkspaceWorkspaceFolders | 
|---|
| 87 | void requestWorkspaceWorkspaceFolders( | 
|---|
| 88 | const std::nullptr_t &, | 
|---|
| 89 | std::function<void(const std::variant<QList<WorkspaceFolder>, std::nullptr_t> &)> | 
|---|
| 90 | responseHandler, | 
|---|
| 91 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 92 |  | 
|---|
| 93 | void notifyDidChangeWorkspaceFolders(const DidChangeWorkspaceFoldersParams ¶ms); | 
|---|
| 94 |  | 
|---|
| 95 | // ClientCapability::WorkspaceDidChangeConfiguration | 
|---|
| 96 | void notifyDidChangeConfiguration(const DidChangeConfigurationParams ¶ms); | 
|---|
| 97 |  | 
|---|
| 98 | // ClientCapability::WorkspaceConfiguration | 
|---|
| 99 | void requestConfiguration( | 
|---|
| 100 | const ConfigurationParams &, | 
|---|
| 101 | std::function<void(const QList<QJsonValue> &)> responseHandler, | 
|---|
| 102 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 103 |  | 
|---|
| 104 | // ClientCapability::WorkspaceDidChangeWatchedFiles | 
|---|
| 105 | void notifyDidChangeWatchedFiles(const DidChangeWatchedFilesParams ¶ms); | 
|---|
| 106 |  | 
|---|
| 107 | // ServerCapability::WorkspaceSymbolProvider | 
|---|
| 108 | // ClientCapability::WorkspaceSymbol | 
|---|
| 109 | void requestWorkspaceSymbol( | 
|---|
| 110 | const WorkspaceSymbolParams &, | 
|---|
| 111 | std::function<void(const std::variant<QList<SymbolInformation>, std::nullptr_t> &)> | 
|---|
| 112 | responseHandler, | 
|---|
| 113 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 114 |  | 
|---|
| 115 | // ServerCapability::ExecuteCommandProvider | 
|---|
| 116 | // ClientCapability::WorkspaceExecuteCommand | 
|---|
| 117 | void requestExecuteCommand( | 
|---|
| 118 | const ExecuteCommandParams &, | 
|---|
| 119 | std::function<void(const std::variant<QJsonValue, std::nullptr_t> &)> responseHandler, | 
|---|
| 120 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 121 |  | 
|---|
| 122 | // ClientCapability::WorkspaceApplyEdit | 
|---|
| 123 | void requestApplyWorkspaceEdit( | 
|---|
| 124 | const ApplyWorkspaceEditParams &, | 
|---|
| 125 | std::function<void(const ApplyWorkspaceEditResponse &)> responseHandler, | 
|---|
| 126 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 127 |  | 
|---|
| 128 | // ServerCapability::WorkspaceFileOperationsWillCreate | 
|---|
| 129 | // ClientCapability::WorkspaceFileOperationsWillCreate | 
|---|
| 130 | void requestCreateFiles( | 
|---|
| 131 | const CreateFilesParams &, | 
|---|
| 132 | std::function<void(const std::variant<WorkspaceEdit, std::nullptr_t> &)> | 
|---|
| 133 | responseHandler, | 
|---|
| 134 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 135 |  | 
|---|
| 136 | // ServerCapability::WorkspaceFileOperationsDidCreate | 
|---|
| 137 | // ClientCapability::WorkspaceFileOperationsDidCreate | 
|---|
| 138 | void notifyCreateFiles(const CreateFilesParams ¶ms); | 
|---|
| 139 |  | 
|---|
| 140 | // ServerCapability::WorkspaceFileOperationsWillRename | 
|---|
| 141 | // ClientCapability::WorkspaceFileOperationsWillRename | 
|---|
| 142 | void requestRenameFiles( | 
|---|
| 143 | const RenameFilesParams &, | 
|---|
| 144 | std::function<void(const std::variant<WorkspaceEdit, std::nullptr_t> &)> | 
|---|
| 145 | responseHandler, | 
|---|
| 146 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 147 |  | 
|---|
| 148 | // ServerCapability::WorkspaceFileOperationsDidRename | 
|---|
| 149 | // ClientCapability::WorkspaceFileOperationsDidRename | 
|---|
| 150 | void notifyRenameFiles(const RenameFilesParams ¶ms); | 
|---|
| 151 |  | 
|---|
| 152 | // ServerCapability::WorkspaceFileOperationsWillDelete | 
|---|
| 153 | // ClientCapability::WorkspaceFileOperationsWillDelete | 
|---|
| 154 | void requestDeleteFiles( | 
|---|
| 155 | const DeleteFilesParams &, | 
|---|
| 156 | std::function<void(const std::variant<WorkspaceEdit, std::nullptr_t> &)> | 
|---|
| 157 | responseHandler, | 
|---|
| 158 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 159 |  | 
|---|
| 160 | // ServerCapability::WorkspaceFileOperationsDidDelete | 
|---|
| 161 | // ClientCapability::WorkspaceFileOperationsDidDelete | 
|---|
| 162 | void notifyDeleteFiles(const DeleteFilesParams ¶ms); | 
|---|
| 163 |  | 
|---|
| 164 | // ServerCapability::TextDocumentSync | 
|---|
| 165 | // ClientCapability::TextDocumentSynchronizationDynamicRegistration | 
|---|
| 166 |  | 
|---|
| 167 | void notifyDidOpenTextDocument(const DidOpenTextDocumentParams ¶ms); | 
|---|
| 168 | void notifyDidChangeTextDocument(const DidChangeTextDocumentParams ¶ms); | 
|---|
| 169 |  | 
|---|
| 170 | // ServerCapability::TextDocumentSyncWillSave | 
|---|
| 171 | // ClientCapability::TextDocumentSynchronizationWillSave | 
|---|
| 172 | void notifyWillSaveTextDocument(const WillSaveTextDocumentParams ¶ms); | 
|---|
| 173 |  | 
|---|
| 174 | // ServerCapability::TextDocumentSyncWillSaveWaitUntil | 
|---|
| 175 | // ClientCapability::TextDocumentSynchronizationWillSaveWaitUntil | 
|---|
| 176 | void requestWillSaveTextDocument( | 
|---|
| 177 | const WillSaveTextDocumentParams &, | 
|---|
| 178 | std::function<void(const std::variant<QList<TextEdit>, std::nullptr_t> &)> | 
|---|
| 179 | responseHandler, | 
|---|
| 180 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 181 |  | 
|---|
| 182 | // ServerCapability::TextDocumentSyncSave | 
|---|
| 183 | // ClientCapability::TextDocumentSynchronizationDidSave | 
|---|
| 184 | void notifyDidSaveTextDocument(const DidSaveTextDocumentParams ¶ms); | 
|---|
| 185 |  | 
|---|
| 186 | void notifyDidCloseTextDocument(const DidCloseTextDocumentParams ¶ms); | 
|---|
| 187 |  | 
|---|
| 188 | // ClientCapability::TextDocumentPublishDiagnostics | 
|---|
| 189 | void notifyPublishDiagnostics(const PublishDiagnosticsParams ¶ms); | 
|---|
| 190 |  | 
|---|
| 191 | // ServerCapability::CompletionProvider | 
|---|
| 192 | // ClientCapability::TextDocumentCompletion | 
|---|
| 193 | void requestCompletion( | 
|---|
| 194 | const CompletionParams &, | 
|---|
| 195 | std::function<void( | 
|---|
| 196 | const std::variant<QList<CompletionItem>, CompletionList, std::nullptr_t> &)> | 
|---|
| 197 | responseHandler, | 
|---|
| 198 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 199 |  | 
|---|
| 200 | void requestCompletionItemResolve( | 
|---|
| 201 | const CompletionItem &, std::function<void(const CompletionItem &)> responseHandler, | 
|---|
| 202 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 203 |  | 
|---|
| 204 | // ServerCapability::HoverProvider | 
|---|
| 205 | // ClientCapability::TextDocumentHover | 
|---|
| 206 | void | 
|---|
| 207 | requestHover(const HoverParams &, | 
|---|
| 208 | std::function<void(const std::variant<Hover, std::nullptr_t> &)> responseHandler, | 
|---|
| 209 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 210 |  | 
|---|
| 211 | // ServerCapability::SignatureHelpProvider | 
|---|
| 212 | // ClientCapability::TextDocumentSignatureHelp | 
|---|
| 213 | void requestSignatureHelp( | 
|---|
| 214 | const SignatureHelpParams &, | 
|---|
| 215 | std::function<void(const std::variant<SignatureHelp, std::nullptr_t> &)> | 
|---|
| 216 | responseHandler, | 
|---|
| 217 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 218 |  | 
|---|
| 219 | // ServerCapability::DeclarationProvider | 
|---|
| 220 | // ClientCapability::TextDocumentDeclaration | 
|---|
| 221 | void requestDeclaration( | 
|---|
| 222 | const DeclarationParams &, | 
|---|
| 223 | std::function<void(const std::variant<Location, QList<Location>, QList<LocationLink>, | 
|---|
| 224 | std::nullptr_t> &)> | 
|---|
| 225 | responseHandler, | 
|---|
| 226 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 227 |  | 
|---|
| 228 | // ServerCapability::DefinitionProvider | 
|---|
| 229 | // ClientCapability::TextDocumentDefinition | 
|---|
| 230 | void requestDefinition( | 
|---|
| 231 | const DefinitionParams &, | 
|---|
| 232 | std::function<void(const std::variant<Location, QList<Location>, QList<LocationLink>, | 
|---|
| 233 | std::nullptr_t> &)> | 
|---|
| 234 | responseHandler, | 
|---|
| 235 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 236 |  | 
|---|
| 237 | // ServerCapability::TypeDefinitionProvider | 
|---|
| 238 | // ClientCapability::TextDocumentTypeDefinition | 
|---|
| 239 | void requestTypeDefinition( | 
|---|
| 240 | const TypeDefinitionParams &, | 
|---|
| 241 | std::function<void(const std::variant<Location, QList<Location>, QList<LocationLink>, | 
|---|
| 242 | std::nullptr_t> &)> | 
|---|
| 243 | responseHandler, | 
|---|
| 244 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 245 |  | 
|---|
| 246 | // ServerCapability::ImplementationProvider | 
|---|
| 247 | // ClientCapability::TextDocumentImplementation | 
|---|
| 248 | void requestImplementation( | 
|---|
| 249 | const ImplementationParams &, | 
|---|
| 250 | std::function<void(const std::variant<Location, QList<Location>, QList<LocationLink>, | 
|---|
| 251 | std::nullptr_t> &)> | 
|---|
| 252 | responseHandler, | 
|---|
| 253 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 254 |  | 
|---|
| 255 | // ServerCapability::ReferencesProvider | 
|---|
| 256 | // ClientCapability::TextDocumentReferences | 
|---|
| 257 | void requestReference( | 
|---|
| 258 | const ReferenceParams &, | 
|---|
| 259 | std::function<void(const std::variant<QList<Location>, std::nullptr_t> &)> | 
|---|
| 260 | responseHandler, | 
|---|
| 261 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 262 |  | 
|---|
| 263 | // ServerCapability::DocumentHighlightProvider | 
|---|
| 264 | // ClientCapability::TextDocumentDocumentHighlight | 
|---|
| 265 | void requestDocumentHighlight( | 
|---|
| 266 | const DocumentHighlightParams &, | 
|---|
| 267 | std::function<void(const std::variant<QList<DocumentHighlight>, std::nullptr_t> &)> | 
|---|
| 268 | responseHandler, | 
|---|
| 269 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 270 |  | 
|---|
| 271 | // ServerCapability::DocumentSymbolProvider | 
|---|
| 272 | // ClientCapability::TextDocumentDocumentSymbol | 
|---|
| 273 | void requestDocumentSymbol( | 
|---|
| 274 | const DocumentSymbolParams &, | 
|---|
| 275 | std::function<void(const std::variant<QList<DocumentSymbol>, QList<SymbolInformation>, | 
|---|
| 276 | std::nullptr_t> &)> | 
|---|
| 277 | responseHandler, | 
|---|
| 278 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 279 |  | 
|---|
| 280 | // ServerCapability::CodeActionProvider | 
|---|
| 281 | // ClientCapability::TextDocumentCodeAction | 
|---|
| 282 | void requestCodeAction( | 
|---|
| 283 | const CodeActionParams &, | 
|---|
| 284 | std::function<void( | 
|---|
| 285 | const std::variant<QList<std::variant<Command, CodeAction>>, std::nullptr_t> &)> | 
|---|
| 286 | responseHandler, | 
|---|
| 287 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 288 |  | 
|---|
| 289 | // ClientCapability::TextDocumentCodeActionResolveSupport | 
|---|
| 290 | void requestCodeActionResolve( | 
|---|
| 291 | const CodeAction &, std::function<void(const CodeAction &)> responseHandler, | 
|---|
| 292 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 293 |  | 
|---|
| 294 | // ServerCapability::CodeLensProvider | 
|---|
| 295 | // ClientCapability::TextDocumentCodeLens | 
|---|
| 296 | void | 
|---|
| 297 | requestCodeLens(const CodeLensParams &, | 
|---|
| 298 | std::function<void(const std::variant<QList<CodeLens>, std::nullptr_t> &)> | 
|---|
| 299 | responseHandler, | 
|---|
| 300 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 301 |  | 
|---|
| 302 | void requestCodeLensResolve( | 
|---|
| 303 | const CodeLens &, std::function<void(const CodeLens &)> responseHandler, | 
|---|
| 304 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 305 |  | 
|---|
| 306 | // ClientCapability::WorkspaceCodeLens | 
|---|
| 307 | void requestCodeLensRefresh( | 
|---|
| 308 | const std::nullptr_t &, std::function<void()> responseHandler, | 
|---|
| 309 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 310 |  | 
|---|
| 311 | // ServerCapability::DocumentLinkProvider | 
|---|
| 312 | // ClientCapability::TextDocumentDocumentLink | 
|---|
| 313 | void requestDocumentLink( | 
|---|
| 314 | const DocumentLinkParams &, | 
|---|
| 315 | std::function<void(const std::variant<QList<DocumentLink>, std::nullptr_t> &)> | 
|---|
| 316 | responseHandler, | 
|---|
| 317 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 318 |  | 
|---|
| 319 | void requestDocumentLinkResolve( | 
|---|
| 320 | const DocumentLink &, std::function<void(const DocumentLink &)> responseHandler, | 
|---|
| 321 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 322 |  | 
|---|
| 323 | // ServerCapability::ColorProvider | 
|---|
| 324 | // ClientCapability::TextDocumentColorProvider | 
|---|
| 325 | void requestDocumentColor( | 
|---|
| 326 | const DocumentColorParams &, | 
|---|
| 327 | std::function<void(const QList<ColorInformation> &)> responseHandler, | 
|---|
| 328 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 329 |  | 
|---|
| 330 | void requestColorPresentation( | 
|---|
| 331 | const ColorPresentationParams &, | 
|---|
| 332 | std::function<void(const QList<ColorPresentation> &)> responseHandler, | 
|---|
| 333 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 334 |  | 
|---|
| 335 | // ServerCapability::DocumentFormattingProvider | 
|---|
| 336 | // ClientCapability::TextDocumentFormatting | 
|---|
| 337 | void requestDocumentFormatting( | 
|---|
| 338 | const DocumentFormattingParams &, | 
|---|
| 339 | std::function<void(const std::variant<QList<TextEdit>, std::nullptr_t> &)> | 
|---|
| 340 | responseHandler, | 
|---|
| 341 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 342 |  | 
|---|
| 343 | // ServerCapability::DocumentRangeFormattingProvider | 
|---|
| 344 | // ClientCapability::TextDocumentRangeFormatting | 
|---|
| 345 | void requestDocumentRangeFormatting( | 
|---|
| 346 | const DocumentRangeFormattingParams &, | 
|---|
| 347 | std::function<void(const std::variant<QList<TextEdit>, std::nullptr_t> &)> | 
|---|
| 348 | responseHandler, | 
|---|
| 349 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 350 |  | 
|---|
| 351 | // ServerCapability::DocumentOnTypeFormattingProvider | 
|---|
| 352 | // ClientCapability::TextDocumentOnTypeFormatting | 
|---|
| 353 | void requestDocumentOnTypeFormatting( | 
|---|
| 354 | const DocumentOnTypeFormattingParams &, | 
|---|
| 355 | std::function<void(const std::variant<QList<TextEdit>, std::nullptr_t> &)> | 
|---|
| 356 | responseHandler, | 
|---|
| 357 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 358 |  | 
|---|
| 359 | // ServerCapability::RenameProvider | 
|---|
| 360 | // ClientCapability::TextDocumentRename | 
|---|
| 361 | void | 
|---|
| 362 | requestRename(const RenameParams &, | 
|---|
| 363 | std::function<void(const std::variant<WorkspaceEdit, std::nullptr_t> &)> | 
|---|
| 364 | responseHandler, | 
|---|
| 365 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 366 |  | 
|---|
| 367 | void requestPrepareRename( | 
|---|
| 368 | const PrepareRenameParams &, | 
|---|
| 369 | std::function<void(const std::variant<Range, RangePlaceHolder, DefaultBehaviorStruct, | 
|---|
| 370 | std::nullptr_t> &)> | 
|---|
| 371 | responseHandler, | 
|---|
| 372 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 373 |  | 
|---|
| 374 | // ServerCapability::FoldingRangeProvider | 
|---|
| 375 | // ClientCapability::TextDocumentFoldingRange | 
|---|
| 376 | void requestFoldingRange( | 
|---|
| 377 | const FoldingRangeParams &, | 
|---|
| 378 | std::function<void(const std::variant<QList<FoldingRange>, std::nullptr_t> &)> | 
|---|
| 379 | responseHandler, | 
|---|
| 380 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 381 |  | 
|---|
| 382 | // ServerCapability::SelectionRangeProvider | 
|---|
| 383 | // ClientCapability::TextDocumentSelectionRange | 
|---|
| 384 | void requestSelectionRange( | 
|---|
| 385 | const SelectionRangeParams &, | 
|---|
| 386 | std::function<void(const std::variant<QList<SelectionRange>, std::nullptr_t> &)> | 
|---|
| 387 | responseHandler, | 
|---|
| 388 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 389 |  | 
|---|
| 390 | // ServerCapability::CallHierarchyProvider | 
|---|
| 391 | // ClientCapability::TextDocumentCallHierarchy | 
|---|
| 392 | void requestCallHierarchyPrepare( | 
|---|
| 393 | const CallHierarchyPrepareParams &, | 
|---|
| 394 | std::function<void(const std::variant<QList<CallHierarchyItem>, std::nullptr_t> &)> | 
|---|
| 395 | responseHandler, | 
|---|
| 396 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 397 |  | 
|---|
| 398 | void requestCallHierarchyIncomingCalls( | 
|---|
| 399 | const CallHierarchyIncomingCallsParams &, | 
|---|
| 400 | std::function< | 
|---|
| 401 | void(const std::variant<QList<CallHierarchyIncomingCall>, std::nullptr_t> &)> | 
|---|
| 402 | responseHandler, | 
|---|
| 403 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 404 | void requestCallHierarchyOutgoingCalls( | 
|---|
| 405 | const CallHierarchyOutgoingCallsParams &, | 
|---|
| 406 | std::function< | 
|---|
| 407 | void(const std::variant<QList<CallHierarchyOutgoingCall>, std::nullptr_t> &)> | 
|---|
| 408 | responseHandler, | 
|---|
| 409 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 410 |  | 
|---|
| 411 | // ServerCapability::SemanticTokensProvider | 
|---|
| 412 | // ClientCapability::TextDocumentSemanticTokens | 
|---|
| 413 | void requestSemanticTokens( | 
|---|
| 414 | const SemanticTokensParams &, | 
|---|
| 415 | std::function<void(const std::variant<SemanticTokens, std::nullptr_t> &)> | 
|---|
| 416 | responseHandler, | 
|---|
| 417 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 418 | void requestSemanticTokensDelta( | 
|---|
| 419 | const SemanticTokensDeltaParams &, | 
|---|
| 420 | std::function< | 
|---|
| 421 | void(const std::variant<SemanticTokens, SemanticTokensDelta, std::nullptr_t> &)> | 
|---|
| 422 | responseHandler, | 
|---|
| 423 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 424 | void requestSemanticTokensRange( | 
|---|
| 425 | const SemanticTokensRangeParams &, | 
|---|
| 426 | std::function<void(const std::variant<SemanticTokens, std::nullptr_t> &)> | 
|---|
| 427 | responseHandler, | 
|---|
| 428 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 429 |  | 
|---|
| 430 | // ClientCapability::WorkspaceSemanticTokens | 
|---|
| 431 | void requestRequestingARefreshOfAllSemanticTokens( | 
|---|
| 432 | const std::nullptr_t &, std::function<void()> responseHandler, | 
|---|
| 433 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 434 |  | 
|---|
| 435 | // ServerCapability::LinkedEditingRangeProvider | 
|---|
| 436 | void requestLinkedEditingRange( | 
|---|
| 437 | const LinkedEditingRangeParams &, | 
|---|
| 438 | std::function<void(const std::variant<LinkedEditingRanges, std::nullptr_t> &)> | 
|---|
| 439 | responseHandler, | 
|---|
| 440 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 441 |  | 
|---|
| 442 | // ServerCapability::MonikerProvider | 
|---|
| 443 | void | 
|---|
| 444 | requestMoniker(const MonikerParams &, | 
|---|
| 445 | std::function<void(const std::variant<QList<Moniker>, std::nullptr_t> &)> | 
|---|
| 446 | responseHandler, | 
|---|
| 447 | ResponseErrorHandler errorHandler = &ProtocolBase::defaultResponseErrorHandler); | 
|---|
| 448 |  | 
|---|
| 449 | // # receive protocol | 
|---|
| 450 | void registerCancelNotificationHandler( | 
|---|
| 451 | const std::function<void(const QByteArray &, const CancelParams &)> &handler); | 
|---|
| 452 |  | 
|---|
| 453 | // ClientCapability::GeneralRegularExpressions | 
|---|
| 454 |  | 
|---|
| 455 | // ClientCapability::WorkspaceWorkspaceEdit | 
|---|
| 456 |  | 
|---|
| 457 | void registerInitializeRequestHandler( | 
|---|
| 458 | const std::function<void(const QByteArray &, const InitializeParams &, | 
|---|
| 459 | LSPResponse<InitializeResult> &&)> &handler); | 
|---|
| 460 | void registerInitializedNotificationHandler( | 
|---|
| 461 | const std::function<void(const QByteArray &, const InitializedParams &)> &handler); | 
|---|
| 462 | void registerShutdownRequestHandler( | 
|---|
| 463 | const std::function<void(const QByteArray &, const std::nullptr_t &, | 
|---|
| 464 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 465 | void registerExitNotificationHandler( | 
|---|
| 466 | const std::function<void(const QByteArray &, const std::nullptr_t &)> &handler); | 
|---|
| 467 | void registerLogTraceNotificationHandler( | 
|---|
| 468 | const std::function<void(const QByteArray &, const LogTraceParams &)> &handler); | 
|---|
| 469 | void registerSetTraceNotificationHandler( | 
|---|
| 470 | const std::function<void(const QByteArray &, const SetTraceParams &)> &handler); | 
|---|
| 471 | void registerShowMessageNotificationHandler( | 
|---|
| 472 | const std::function<void(const QByteArray &, const ShowMessageParams &)> &handler); | 
|---|
| 473 |  | 
|---|
| 474 | // ClientCapability::WindowShowMessage | 
|---|
| 475 | void registerShowMessageRequestRequestHandler( | 
|---|
| 476 | const std::function<void( | 
|---|
| 477 | const QByteArray &, const ShowMessageRequestParams &, | 
|---|
| 478 | LSPResponse<std::variant<MessageActionItem, std::nullptr_t>> &&)> &handler); | 
|---|
| 479 |  | 
|---|
| 480 | // ClientCapability::WindowShowDocument | 
|---|
| 481 | void registerShowDocumentRequestHandler( | 
|---|
| 482 | const std::function<void(const QByteArray &, const ShowDocumentParams &, | 
|---|
| 483 | LSPResponse<ShowDocumentResult> &&)> &handler); | 
|---|
| 484 |  | 
|---|
| 485 | void registerLogMessageNotificationHandler( | 
|---|
| 486 | const std::function<void(const QByteArray &, const LogMessageParams &)> &handler); | 
|---|
| 487 | void registerWorkDoneProgressCreateRequestHandler( | 
|---|
| 488 | const std::function<void(const QByteArray &, const WorkDoneProgressCreateParams &, | 
|---|
| 489 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 490 | void registerWorkDoneProgressCancelNotificationHandler( | 
|---|
| 491 | const std::function<void(const QByteArray &, const WorkDoneProgressCancelParams &)> | 
|---|
| 492 | &handler); | 
|---|
| 493 | void registerTelemetryEventNotificationHandler( | 
|---|
| 494 | const std::function<void(const QByteArray &, const QJsonObject &)> &handler); | 
|---|
| 495 | void registerRegistrationRequestHandler( | 
|---|
| 496 | const std::function<void(const QByteArray &, const RegistrationParams &, | 
|---|
| 497 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 498 | void registerUnregistrationRequestHandler( | 
|---|
| 499 | const std::function<void(const QByteArray &, const UnregistrationParams &, | 
|---|
| 500 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 501 |  | 
|---|
| 502 | // ServerCapability::WorkspaceWorkspaceFolders | 
|---|
| 503 | // ClientCapability::WorkspaceWorkspaceFolders | 
|---|
| 504 | void registerWorkspaceWorkspaceFoldersRequestHandler( | 
|---|
| 505 | const std::function< | 
|---|
| 506 | void(const QByteArray &, const std::nullptr_t &, | 
|---|
| 507 | LSPResponse<std::variant<QList<WorkspaceFolder>, std::nullptr_t>> &&)> | 
|---|
| 508 | &handler); | 
|---|
| 509 |  | 
|---|
| 510 | void registerDidChangeWorkspaceFoldersNotificationHandler( | 
|---|
| 511 | const std::function<void(const QByteArray &, const DidChangeWorkspaceFoldersParams &)> | 
|---|
| 512 | &handler); | 
|---|
| 513 |  | 
|---|
| 514 | // ClientCapability::WorkspaceDidChangeConfiguration | 
|---|
| 515 | void registerDidChangeConfigurationNotificationHandler( | 
|---|
| 516 | const std::function<void(const QByteArray &, const DidChangeConfigurationParams &)> | 
|---|
| 517 | &handler); | 
|---|
| 518 |  | 
|---|
| 519 | // ClientCapability::WorkspaceConfiguration | 
|---|
| 520 | void registerConfigurationRequestHandler( | 
|---|
| 521 | const std::function<void(const QByteArray &, const ConfigurationParams &, | 
|---|
| 522 | LSPResponse<QList<QJsonValue>> &&)> &handler); | 
|---|
| 523 |  | 
|---|
| 524 | // ClientCapability::WorkspaceDidChangeWatchedFiles | 
|---|
| 525 | void registerDidChangeWatchedFilesNotificationHandler( | 
|---|
| 526 | const std::function<void(const QByteArray &, const DidChangeWatchedFilesParams &)> | 
|---|
| 527 | &handler); | 
|---|
| 528 |  | 
|---|
| 529 | // ServerCapability::WorkspaceSymbolProvider | 
|---|
| 530 | // ClientCapability::WorkspaceSymbol | 
|---|
| 531 | void registerWorkspaceSymbolRequestHandler( | 
|---|
| 532 | const std::function< | 
|---|
| 533 | void(const QByteArray &, const WorkspaceSymbolParams &, | 
|---|
| 534 | LSPPartialResponse<std::variant<QList<SymbolInformation>, std::nullptr_t>, | 
|---|
| 535 | QList<SymbolInformation>> &&)> &handler); | 
|---|
| 536 |  | 
|---|
| 537 | // ServerCapability::ExecuteCommandProvider | 
|---|
| 538 | // ClientCapability::WorkspaceExecuteCommand | 
|---|
| 539 | void registerExecuteCommandRequestHandler( | 
|---|
| 540 | const std::function<void(const QByteArray &, const ExecuteCommandParams &, | 
|---|
| 541 | LSPResponse<std::variant<QJsonValue, std::nullptr_t>> &&)> | 
|---|
| 542 | &handler); | 
|---|
| 543 |  | 
|---|
| 544 | // ClientCapability::WorkspaceApplyEdit | 
|---|
| 545 | void registerApplyWorkspaceEditRequestHandler( | 
|---|
| 546 | const std::function<void(const QByteArray &, const ApplyWorkspaceEditParams &, | 
|---|
| 547 | LSPResponse<ApplyWorkspaceEditResponse> &&)> &handler); | 
|---|
| 548 |  | 
|---|
| 549 | // ServerCapability::WorkspaceFileOperationsWillCreate | 
|---|
| 550 | // ClientCapability::WorkspaceFileOperationsWillCreate | 
|---|
| 551 | void registerCreateFilesRequestHandler( | 
|---|
| 552 | const std::function<void(const QByteArray &, const CreateFilesParams &, | 
|---|
| 553 | LSPResponse<std::variant<WorkspaceEdit, std::nullptr_t>> &&)> | 
|---|
| 554 | &handler); | 
|---|
| 555 |  | 
|---|
| 556 | // ServerCapability::WorkspaceFileOperationsDidCreate | 
|---|
| 557 | // ClientCapability::WorkspaceFileOperationsDidCreate | 
|---|
| 558 | void registerCreateFilesNotificationHandler( | 
|---|
| 559 | const std::function<void(const QByteArray &, const CreateFilesParams &)> &handler); | 
|---|
| 560 |  | 
|---|
| 561 | // ServerCapability::WorkspaceFileOperationsWillRename | 
|---|
| 562 | // ClientCapability::WorkspaceFileOperationsWillRename | 
|---|
| 563 | void registerRenameFilesRequestHandler( | 
|---|
| 564 | const std::function<void(const QByteArray &, const RenameFilesParams &, | 
|---|
| 565 | LSPResponse<std::variant<WorkspaceEdit, std::nullptr_t>> &&)> | 
|---|
| 566 | &handler); | 
|---|
| 567 |  | 
|---|
| 568 | // ServerCapability::WorkspaceFileOperationsDidRename | 
|---|
| 569 | // ClientCapability::WorkspaceFileOperationsDidRename | 
|---|
| 570 | void registerRenameFilesNotificationHandler( | 
|---|
| 571 | const std::function<void(const QByteArray &, const RenameFilesParams &)> &handler); | 
|---|
| 572 |  | 
|---|
| 573 | // ServerCapability::WorkspaceFileOperationsWillDelete | 
|---|
| 574 | // ClientCapability::WorkspaceFileOperationsWillDelete | 
|---|
| 575 | void registerDeleteFilesRequestHandler( | 
|---|
| 576 | const std::function<void(const QByteArray &, const DeleteFilesParams &, | 
|---|
| 577 | LSPResponse<std::variant<WorkspaceEdit, std::nullptr_t>> &&)> | 
|---|
| 578 | &handler); | 
|---|
| 579 |  | 
|---|
| 580 | // ServerCapability::WorkspaceFileOperationsDidDelete | 
|---|
| 581 | // ClientCapability::WorkspaceFileOperationsDidDelete | 
|---|
| 582 | void registerDeleteFilesNotificationHandler( | 
|---|
| 583 | const std::function<void(const QByteArray &, const DeleteFilesParams &)> &handler); | 
|---|
| 584 |  | 
|---|
| 585 | // ServerCapability::TextDocumentSync | 
|---|
| 586 | // ClientCapability::TextDocumentSynchronizationDynamicRegistration | 
|---|
| 587 |  | 
|---|
| 588 | void registerDidOpenTextDocumentNotificationHandler( | 
|---|
| 589 | const std::function<void(const QByteArray &, const DidOpenTextDocumentParams &)> | 
|---|
| 590 | &handler); | 
|---|
| 591 | void registerDidChangeTextDocumentNotificationHandler( | 
|---|
| 592 | const std::function<void(const QByteArray &, const DidChangeTextDocumentParams &)> | 
|---|
| 593 | &handler); | 
|---|
| 594 |  | 
|---|
| 595 | // ServerCapability::TextDocumentSyncWillSave | 
|---|
| 596 | // ClientCapability::TextDocumentSynchronizationWillSave | 
|---|
| 597 | void registerWillSaveTextDocumentNotificationHandler( | 
|---|
| 598 | const std::function<void(const QByteArray &, const WillSaveTextDocumentParams &)> | 
|---|
| 599 | &handler); | 
|---|
| 600 |  | 
|---|
| 601 | // ServerCapability::TextDocumentSyncWillSaveWaitUntil | 
|---|
| 602 | // ClientCapability::TextDocumentSynchronizationWillSaveWaitUntil | 
|---|
| 603 | void registerWillSaveTextDocumentRequestHandler( | 
|---|
| 604 | const std::function<void(const QByteArray &, const WillSaveTextDocumentParams &, | 
|---|
| 605 | LSPResponse<std::variant<QList<TextEdit>, std::nullptr_t>> &&)> | 
|---|
| 606 | &handler); | 
|---|
| 607 |  | 
|---|
| 608 | // ServerCapability::TextDocumentSyncSave | 
|---|
| 609 | // ClientCapability::TextDocumentSynchronizationDidSave | 
|---|
| 610 | void registerDidSaveTextDocumentNotificationHandler( | 
|---|
| 611 | const std::function<void(const QByteArray &, const DidSaveTextDocumentParams &)> | 
|---|
| 612 | &handler); | 
|---|
| 613 |  | 
|---|
| 614 | void registerDidCloseTextDocumentNotificationHandler( | 
|---|
| 615 | const std::function<void(const QByteArray &, const DidCloseTextDocumentParams &)> | 
|---|
| 616 | &handler); | 
|---|
| 617 |  | 
|---|
| 618 | // ClientCapability::TextDocumentPublishDiagnostics | 
|---|
| 619 | void registerPublishDiagnosticsNotificationHandler( | 
|---|
| 620 | const std::function<void(const QByteArray &, const PublishDiagnosticsParams &)> | 
|---|
| 621 | &handler); | 
|---|
| 622 |  | 
|---|
| 623 | // ServerCapability::CompletionProvider | 
|---|
| 624 | // ClientCapability::TextDocumentCompletion | 
|---|
| 625 | void registerCompletionRequestHandler( | 
|---|
| 626 | const std::function<void( | 
|---|
| 627 | const QByteArray &, const CompletionParams &, | 
|---|
| 628 | LSPPartialResponse< | 
|---|
| 629 | std::variant<QList<CompletionItem>, CompletionList, std::nullptr_t>, | 
|---|
| 630 | std::variant<CompletionList, QList<CompletionItem>>> &&)> &handler); | 
|---|
| 631 |  | 
|---|
| 632 | void registerCompletionItemResolveRequestHandler( | 
|---|
| 633 | const std::function<void(const QByteArray &, const CompletionItem &, | 
|---|
| 634 | LSPResponse<CompletionItem> &&)> &handler); | 
|---|
| 635 |  | 
|---|
| 636 | // ServerCapability::HoverProvider | 
|---|
| 637 | // ClientCapability::TextDocumentHover | 
|---|
| 638 | void registerHoverRequestHandler( | 
|---|
| 639 | const std::function<void(const QByteArray &, const HoverParams &, | 
|---|
| 640 | LSPResponse<std::variant<Hover, std::nullptr_t>> &&)> | 
|---|
| 641 | &handler); | 
|---|
| 642 |  | 
|---|
| 643 | // ServerCapability::SignatureHelpProvider | 
|---|
| 644 | // ClientCapability::TextDocumentSignatureHelp | 
|---|
| 645 | void registerSignatureHelpRequestHandler( | 
|---|
| 646 | const std::function<void(const QByteArray &, const SignatureHelpParams &, | 
|---|
| 647 | LSPResponse<std::variant<SignatureHelp, std::nullptr_t>> &&)> | 
|---|
| 648 | &handler); | 
|---|
| 649 |  | 
|---|
| 650 | // ServerCapability::DeclarationProvider | 
|---|
| 651 | // ClientCapability::TextDocumentDeclaration | 
|---|
| 652 | void registerDeclarationRequestHandler( | 
|---|
| 653 | const std::function< | 
|---|
| 654 | void(const QByteArray &, const DeclarationParams &, | 
|---|
| 655 | LSPPartialResponse<std::variant<Location, QList<Location>, | 
|---|
| 656 | QList<LocationLink>, std::nullptr_t>, | 
|---|
| 657 | std::variant<QList<Location>, QList<LocationLink>>> &&)> | 
|---|
| 658 | &handler); | 
|---|
| 659 |  | 
|---|
| 660 | // ServerCapability::DefinitionProvider | 
|---|
| 661 | // ClientCapability::TextDocumentDefinition | 
|---|
| 662 | void registerDefinitionRequestHandler( | 
|---|
| 663 | const std::function< | 
|---|
| 664 | void(const QByteArray &, const DefinitionParams &, | 
|---|
| 665 | LSPPartialResponse<std::variant<Location, QList<Location>, | 
|---|
| 666 | QList<LocationLink>, std::nullptr_t>, | 
|---|
| 667 | std::variant<QList<Location>, QList<LocationLink>>> &&)> | 
|---|
| 668 | &handler); | 
|---|
| 669 |  | 
|---|
| 670 | // ServerCapability::TypeDefinitionProvider | 
|---|
| 671 | // ClientCapability::TextDocumentTypeDefinition | 
|---|
| 672 | void registerTypeDefinitionRequestHandler( | 
|---|
| 673 | const std::function< | 
|---|
| 674 | void(const QByteArray &, const TypeDefinitionParams &, | 
|---|
| 675 | LSPPartialResponse<std::variant<Location, QList<Location>, | 
|---|
| 676 | QList<LocationLink>, std::nullptr_t>, | 
|---|
| 677 | std::variant<QList<Location>, QList<LocationLink>>> &&)> | 
|---|
| 678 | &handler); | 
|---|
| 679 |  | 
|---|
| 680 | // ServerCapability::ImplementationProvider | 
|---|
| 681 | // ClientCapability::TextDocumentImplementation | 
|---|
| 682 | void registerImplementationRequestHandler( | 
|---|
| 683 | const std::function< | 
|---|
| 684 | void(const QByteArray &, const ImplementationParams &, | 
|---|
| 685 | LSPPartialResponse<std::variant<Location, QList<Location>, | 
|---|
| 686 | QList<LocationLink>, std::nullptr_t>, | 
|---|
| 687 | std::variant<QList<Location>, QList<LocationLink>>> &&)> | 
|---|
| 688 | &handler); | 
|---|
| 689 |  | 
|---|
| 690 | // ServerCapability::ReferencesProvider | 
|---|
| 691 | // ClientCapability::TextDocumentReferences | 
|---|
| 692 | void registerReferenceRequestHandler( | 
|---|
| 693 | const std::function< | 
|---|
| 694 | void(const QByteArray &, const ReferenceParams &, | 
|---|
| 695 | LSPPartialResponse<std::variant<QList<Location>, std::nullptr_t>, | 
|---|
| 696 | QList<Location>> &&)> &handler); | 
|---|
| 697 |  | 
|---|
| 698 | // ServerCapability::DocumentHighlightProvider | 
|---|
| 699 | // ClientCapability::TextDocumentDocumentHighlight | 
|---|
| 700 | void registerDocumentHighlightRequestHandler( | 
|---|
| 701 | const std::function< | 
|---|
| 702 | void(const QByteArray &, const DocumentHighlightParams &, | 
|---|
| 703 | LSPPartialResponse<std::variant<QList<DocumentHighlight>, std::nullptr_t>, | 
|---|
| 704 | QList<DocumentHighlight>> &&)> &handler); | 
|---|
| 705 |  | 
|---|
| 706 | // ServerCapability::DocumentSymbolProvider | 
|---|
| 707 | // ClientCapability::TextDocumentDocumentSymbol | 
|---|
| 708 | void registerDocumentSymbolRequestHandler( | 
|---|
| 709 | const std::function< | 
|---|
| 710 | void(const QByteArray &, const DocumentSymbolParams &, | 
|---|
| 711 | LSPPartialResponse<std::variant<QList<DocumentSymbol>, | 
|---|
| 712 | QList<SymbolInformation>, std::nullptr_t>, | 
|---|
| 713 | std::variant<QList<DocumentSymbol>, | 
|---|
| 714 | QList<SymbolInformation>>> &&)> &handler); | 
|---|
| 715 |  | 
|---|
| 716 | // ServerCapability::CodeActionProvider | 
|---|
| 717 | // ClientCapability::TextDocumentCodeAction | 
|---|
| 718 | void registerCodeActionRequestHandler( | 
|---|
| 719 | const std::function<void( | 
|---|
| 720 | const QByteArray &, const CodeActionParams &, | 
|---|
| 721 | LSPPartialResponse< | 
|---|
| 722 | std::variant<QList<std::variant<Command, CodeAction>>, std::nullptr_t>, | 
|---|
| 723 | QList<std::variant<Command, CodeAction>>> &&)> &handler); | 
|---|
| 724 |  | 
|---|
| 725 | // ClientCapability::TextDocumentCodeActionResolveSupport | 
|---|
| 726 | void registerCodeActionResolveRequestHandler( | 
|---|
| 727 | const std::function<void(const QByteArray &, const CodeAction &, | 
|---|
| 728 | LSPResponse<CodeAction> &&)> &handler); | 
|---|
| 729 |  | 
|---|
| 730 | // ServerCapability::CodeLensProvider | 
|---|
| 731 | // ClientCapability::TextDocumentCodeLens | 
|---|
| 732 | void registerCodeLensRequestHandler( | 
|---|
| 733 | const std::function< | 
|---|
| 734 | void(const QByteArray &, const CodeLensParams &, | 
|---|
| 735 | LSPPartialResponse<std::variant<QList<CodeLens>, std::nullptr_t>, | 
|---|
| 736 | QList<CodeLens>> &&)> &handler); | 
|---|
| 737 |  | 
|---|
| 738 | void registerCodeLensResolveRequestHandler( | 
|---|
| 739 | const std::function<void(const QByteArray &, const CodeLens &, | 
|---|
| 740 | LSPResponse<CodeLens> &&)> &handler); | 
|---|
| 741 |  | 
|---|
| 742 | // ClientCapability::WorkspaceCodeLens | 
|---|
| 743 | void registerCodeLensRefreshRequestHandler( | 
|---|
| 744 | const std::function<void(const QByteArray &, const std::nullptr_t &, | 
|---|
| 745 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 746 |  | 
|---|
| 747 | // ServerCapability::DocumentLinkProvider | 
|---|
| 748 | // ClientCapability::TextDocumentDocumentLink | 
|---|
| 749 | void registerDocumentLinkRequestHandler( | 
|---|
| 750 | const std::function< | 
|---|
| 751 | void(const QByteArray &, const DocumentLinkParams &, | 
|---|
| 752 | LSPPartialResponse<std::variant<QList<DocumentLink>, std::nullptr_t>, | 
|---|
| 753 | QList<DocumentLink>> &&)> &handler); | 
|---|
| 754 |  | 
|---|
| 755 | void registerDocumentLinkResolveRequestHandler( | 
|---|
| 756 | const std::function<void(const QByteArray &, const DocumentLink &, | 
|---|
| 757 | LSPResponse<DocumentLink> &&)> &handler); | 
|---|
| 758 |  | 
|---|
| 759 | // ServerCapability::ColorProvider | 
|---|
| 760 | // ClientCapability::TextDocumentColorProvider | 
|---|
| 761 | void registerDocumentColorRequestHandler( | 
|---|
| 762 | const std::function<void(const QByteArray &, const DocumentColorParams &, | 
|---|
| 763 | LSPPartialResponse<QList<ColorInformation>, | 
|---|
| 764 | QList<ColorInformation>> &&)> &handler); | 
|---|
| 765 |  | 
|---|
| 766 | void registerColorPresentationRequestHandler( | 
|---|
| 767 | const std::function<void(const QByteArray &, const ColorPresentationParams &, | 
|---|
| 768 | LSPPartialResponse<QList<ColorPresentation>, | 
|---|
| 769 | QList<ColorPresentation>> &&)> &handler); | 
|---|
| 770 |  | 
|---|
| 771 | // ServerCapability::DocumentFormattingProvider | 
|---|
| 772 | // ClientCapability::TextDocumentFormatting | 
|---|
| 773 | void registerDocumentFormattingRequestHandler( | 
|---|
| 774 | const std::function<void(const QByteArray &, const DocumentFormattingParams &, | 
|---|
| 775 | LSPResponse<std::variant<QList<TextEdit>, std::nullptr_t>> &&)> | 
|---|
| 776 | &handler); | 
|---|
| 777 |  | 
|---|
| 778 | // ServerCapability::DocumentRangeFormattingProvider | 
|---|
| 779 | // ClientCapability::TextDocumentRangeFormatting | 
|---|
| 780 | void registerDocumentRangeFormattingRequestHandler( | 
|---|
| 781 | const std::function<void(const QByteArray &, const DocumentRangeFormattingParams &, | 
|---|
| 782 | LSPResponse<std::variant<QList<TextEdit>, std::nullptr_t>> &&)> | 
|---|
| 783 | &handler); | 
|---|
| 784 |  | 
|---|
| 785 | // ServerCapability::DocumentOnTypeFormattingProvider | 
|---|
| 786 | // ClientCapability::TextDocumentOnTypeFormatting | 
|---|
| 787 | void registerDocumentOnTypeFormattingRequestHandler( | 
|---|
| 788 | const std::function<void(const QByteArray &, const DocumentOnTypeFormattingParams &, | 
|---|
| 789 | LSPResponse<std::variant<QList<TextEdit>, std::nullptr_t>> &&)> | 
|---|
| 790 | &handler); | 
|---|
| 791 |  | 
|---|
| 792 | // ServerCapability::RenameProvider | 
|---|
| 793 | // ClientCapability::TextDocumentRename | 
|---|
| 794 | void registerRenameRequestHandler( | 
|---|
| 795 | const std::function<void(const QByteArray &, const RenameParams &, | 
|---|
| 796 | LSPResponse<std::variant<WorkspaceEdit, std::nullptr_t>> &&)> | 
|---|
| 797 | &handler); | 
|---|
| 798 |  | 
|---|
| 799 | void registerPrepareRenameRequestHandler( | 
|---|
| 800 | const std::function< | 
|---|
| 801 | void(const QByteArray &, const PrepareRenameParams &, | 
|---|
| 802 | LSPResponse<std::variant<Range, RangePlaceHolder, DefaultBehaviorStruct, | 
|---|
| 803 | std::nullptr_t>> &&)> &handler); | 
|---|
| 804 |  | 
|---|
| 805 | // ServerCapability::FoldingRangeProvider | 
|---|
| 806 | // ClientCapability::TextDocumentFoldingRange | 
|---|
| 807 | void registerFoldingRangeRequestHandler( | 
|---|
| 808 | const std::function< | 
|---|
| 809 | void(const QByteArray &, const FoldingRangeParams &, | 
|---|
| 810 | LSPPartialResponse<std::variant<QList<FoldingRange>, std::nullptr_t>, | 
|---|
| 811 | QList<FoldingRange>> &&)> &handler); | 
|---|
| 812 |  | 
|---|
| 813 | // ServerCapability::SelectionRangeProvider | 
|---|
| 814 | // ClientCapability::TextDocumentSelectionRange | 
|---|
| 815 | void registerSelectionRangeRequestHandler( | 
|---|
| 816 | const std::function< | 
|---|
| 817 | void(const QByteArray &, const SelectionRangeParams &, | 
|---|
| 818 | LSPPartialResponse<std::variant<QList<SelectionRange>, std::nullptr_t>, | 
|---|
| 819 | QList<SelectionRange>> &&)> &handler); | 
|---|
| 820 |  | 
|---|
| 821 | // ServerCapability::CallHierarchyProvider | 
|---|
| 822 | // ClientCapability::TextDocumentCallHierarchy | 
|---|
| 823 | void registerCallHierarchyPrepareRequestHandler( | 
|---|
| 824 | const std::function< | 
|---|
| 825 | void(const QByteArray &, const CallHierarchyPrepareParams &, | 
|---|
| 826 | LSPResponse<std::variant<QList<CallHierarchyItem>, std::nullptr_t>> &&)> | 
|---|
| 827 | &handler); | 
|---|
| 828 |  | 
|---|
| 829 | void registerCallHierarchyIncomingCallsRequestHandler( | 
|---|
| 830 | const std::function< | 
|---|
| 831 | void(const QByteArray &, const CallHierarchyIncomingCallsParams &, | 
|---|
| 832 | LSPPartialResponse< | 
|---|
| 833 | std::variant<QList<CallHierarchyIncomingCall>, std::nullptr_t>, | 
|---|
| 834 | QList<CallHierarchyIncomingCall>> &&)> &handler); | 
|---|
| 835 | void registerCallHierarchyOutgoingCallsRequestHandler( | 
|---|
| 836 | const std::function< | 
|---|
| 837 | void(const QByteArray &, const CallHierarchyOutgoingCallsParams &, | 
|---|
| 838 | LSPPartialResponse< | 
|---|
| 839 | std::variant<QList<CallHierarchyOutgoingCall>, std::nullptr_t>, | 
|---|
| 840 | QList<CallHierarchyOutgoingCall>> &&)> &handler); | 
|---|
| 841 |  | 
|---|
| 842 | // ServerCapability::SemanticTokensProvider | 
|---|
| 843 | // ClientCapability::TextDocumentSemanticTokens | 
|---|
| 844 | void registerSemanticTokensRequestHandler( | 
|---|
| 845 | const std::function< | 
|---|
| 846 | void(const QByteArray &, const SemanticTokensParams &, | 
|---|
| 847 | LSPPartialResponse<std::variant<SemanticTokens, std::nullptr_t>, | 
|---|
| 848 | SemanticTokensPartialResult> &&)> &handler); | 
|---|
| 849 | void registerSemanticTokensDeltaRequestHandler( | 
|---|
| 850 | const std::function< | 
|---|
| 851 | void(const QByteArray &, const SemanticTokensDeltaParams &, | 
|---|
| 852 | LSPPartialResponse< | 
|---|
| 853 | std::variant<SemanticTokens, SemanticTokensDelta, std::nullptr_t>, | 
|---|
| 854 | SemanticTokensDeltaPartialResult> &&)> &handler); | 
|---|
| 855 | void registerSemanticTokensRangeRequestHandler( | 
|---|
| 856 | const std::function< | 
|---|
| 857 | void(const QByteArray &, const SemanticTokensRangeParams &, | 
|---|
| 858 | LSPPartialResponse<std::variant<SemanticTokens, std::nullptr_t>, | 
|---|
| 859 | SemanticTokensPartialResult> &&)> &handler); | 
|---|
| 860 |  | 
|---|
| 861 | // ClientCapability::WorkspaceSemanticTokens | 
|---|
| 862 | void registerRequestingARefreshOfAllSemanticTokensRequestHandler( | 
|---|
| 863 | const std::function<void(const QByteArray &, const std::nullptr_t &, | 
|---|
| 864 | LSPResponse<std::nullptr_t> &&)> &handler); | 
|---|
| 865 |  | 
|---|
| 866 | // ServerCapability::LinkedEditingRangeProvider | 
|---|
| 867 | void registerLinkedEditingRangeRequestHandler( | 
|---|
| 868 | const std::function<void( | 
|---|
| 869 | const QByteArray &, const LinkedEditingRangeParams &, | 
|---|
| 870 | LSPResponse<std::variant<LinkedEditingRanges, std::nullptr_t>> &&)> &handler); | 
|---|
| 871 |  | 
|---|
| 872 | // ServerCapability::MonikerProvider | 
|---|
| 873 | void registerMonikerRequestHandler( | 
|---|
| 874 | const std::function<void( | 
|---|
| 875 | const QByteArray &, const MonikerParams &, | 
|---|
| 876 | LSPPartialResponse<std::variant<QList<Moniker>, std::nullptr_t>, QList<Moniker>> | 
|---|
| 877 | &&)> &handler); | 
|---|
| 878 |  | 
|---|
| 879 | private: | 
|---|
| 880 | Q_DISABLE_COPY(ProtocolGen) | 
|---|
| 881 | Q_DECLARE_PRIVATE(ProtocolGen) | 
|---|
| 882 | }; | 
|---|
| 883 |  | 
|---|
| 884 | } // namespace QLspSpecification | 
|---|
| 885 |  | 
|---|
| 886 | QT_END_NAMESPACE | 
|---|
| 887 |  | 
|---|
| 888 | #endif // QLANGUAGESERVER_P_H | 
|---|
| 889 |  | 
|---|