1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef LIFECYCLEMESSAHE_H |
6 | #define LIFECYCLEMESSAHE_H |
7 | |
8 | #include "basicjsonstructures.h" |
9 | |
10 | namespace newlsp { |
11 | |
12 | struct ResolveSupport |
13 | { |
14 | std::vector<Enum::Properties::type_value> properties{}; |
15 | }; |
16 | std::string toJsonValueStr(const ResolveSupport &val); |
17 | |
18 | struct CodeActionKind |
19 | { |
20 | std::vector<Enum::CodeActionKind::type_value> valueSet{}; |
21 | }; |
22 | std::string toJsonValueStr(const CodeActionKind &val); |
23 | |
24 | struct CodeActionLiteralSupport |
25 | { |
26 | CodeActionKind codeActionKind{}; |
27 | }; |
28 | std::string toJsonValueStr(const CodeActionLiteralSupport &val); |
29 | |
30 | struct ChangeAnotationSupport |
31 | { |
32 | std::optional<bool> groupsOnLabel{}; |
33 | }; |
34 | std::string toJsonValueStr(const ChangeAnotationSupport &val); |
35 | |
36 | struct SymbolKind |
37 | { |
38 | std::vector<Enum::SymbolKind::type_value> valueSet{}; |
39 | }; |
40 | std::string toJsonValueStr(const SymbolKind &val); |
41 | |
42 | struct WorkspaceEditClientCapabilities |
43 | { |
44 | std::optional<bool> documentChanges{}; |
45 | std::optional<std::vector<Enum::ResourceOperationKind::type_value>> resourceOperations{}; |
46 | std::optional<Enum::FailureHandlingKind::type_value> failureHandling{}; |
47 | std::optional<bool> normalizesLineEndings{}; |
48 | std::optional<ChangeAnotationSupport> changeAnnotationSupport{}; |
49 | }; |
50 | std::string toJsonValueStr(const WorkspaceEditClientCapabilities &val); |
51 | |
52 | struct DidChangeConfigurationClientCapabilities |
53 | { |
54 | std::optional<bool> dynamicRegistration{}; |
55 | }; |
56 | std::string toJsonValueStr(const DidChangeConfigurationClientCapabilities &val); |
57 | |
58 | struct DidChangeWatchedFilesClientCapabilities |
59 | { |
60 | std::optional<bool> dynamicRegistration{}; |
61 | std::optional<bool> relativePatternSupport{}; |
62 | }; |
63 | std::string toJsonValueStr(const DidChangeWatchedFilesClientCapabilities &val); |
64 | |
65 | struct ExecuteCommandClientCapabilities |
66 | { |
67 | std::optional<bool> dynamicRegistration{}; |
68 | }; |
69 | std::string toJsonValueStr(const ExecuteCommandClientCapabilities &val); |
70 | |
71 | struct WorkspaceSymbolClientCapabilities |
72 | { |
73 | struct TagSupport |
74 | { |
75 | std::vector<Enum::SymbolTag::type_value> valueSet{}; |
76 | }; |
77 | std::optional<bool> dynamicRegistration{}; |
78 | std::optional<SymbolKind> symbolKind{}; |
79 | std::optional<TagSupport> tagSupport{}; |
80 | std::optional<std::vector<std::string>> resolveSupport{}; |
81 | |
82 | }; |
83 | std::string toJsonValueStr(const WorkspaceSymbolClientCapabilities &val); |
84 | |
85 | struct SemanticTokensWorkspaceClientCapabilities |
86 | { |
87 | std::optional<bool> refreshSupport{}; |
88 | }; |
89 | std::string toJsonValueStr(const SemanticTokensWorkspaceClientCapabilities &val); |
90 | |
91 | struct CodeLensWorkspaceClientCapabilities |
92 | { |
93 | std::optional<bool> refreshSupport{}; |
94 | }; |
95 | std::string toJsonValueStr(const CodeLensWorkspaceClientCapabilities &val); |
96 | |
97 | struct InlineValueWorkspaceClientCapabilities |
98 | { |
99 | std::optional<bool> refreshSupport{}; |
100 | }; |
101 | std::string toJsonValueStr(const InlineValueWorkspaceClientCapabilities &val); |
102 | |
103 | struct InlayHintWorkspaceClientCapabilities |
104 | { |
105 | std::optional<bool> refreshSupport{}; |
106 | }; |
107 | std::string toJsonValueStr(const InlayHintWorkspaceClientCapabilities &val); |
108 | |
109 | struct DiagnosticWorkspaceClientCapabilities |
110 | { |
111 | std::optional<bool> refreshSupport{}; |
112 | }; |
113 | std::string toJsonValueStr(const DiagnosticWorkspaceClientCapabilities &val); |
114 | |
115 | struct TextDocumentSyncClientCapabilities |
116 | { |
117 | std::optional<bool> dynamicRegistration{}; |
118 | std::optional<bool> willSave{}; |
119 | std::optional<bool> willSaveWaitUntil{}; |
120 | std::optional<bool> didSave{}; |
121 | }; |
122 | std::string toJsonValueStr(const TextDocumentSyncClientCapabilities &val); |
123 | |
124 | struct CompletionClientCapabilities |
125 | { |
126 | struct CompletionItem |
127 | { |
128 | struct TagSupport |
129 | { |
130 | std::vector<Enum::CompletionItemTag::type_value> valueSet{}; |
131 | }; |
132 | |
133 | struct InsertTextModeSupport |
134 | { |
135 | std::vector<Enum::InsertTextMode::type_value> valueSet{}; |
136 | }; |
137 | |
138 | std::optional<bool> snippetSupport{}; |
139 | std::optional<bool> commitCharactersSupport{}; |
140 | std::optional<std::vector<Enum::MarkupKind::type_value>> documentationFormat{}; |
141 | std::optional<bool> deprecatedSupport{}; |
142 | std::optional<bool> preselectSupport{}; |
143 | std::optional<TagSupport> tagSupport{}; |
144 | std::optional<bool> insertReplaceSupport{}; |
145 | std::optional<ResolveSupport> resolveSupport{}; |
146 | std::optional<InsertTextModeSupport> insertTextModeSupport{}; |
147 | std::optional<bool> labelDetailsSupport{}; |
148 | CompletionItem() = default; |
149 | |
150 | }; |
151 | |
152 | struct CompletionItemKind |
153 | { |
154 | std::optional<std::vector<Enum::CompletionItemKind::type_value>> valueSet{}; |
155 | CompletionItemKind() = default; |
156 | }; |
157 | |
158 | struct CompletionList |
159 | { |
160 | std::optional<std::vector<std::string>> itemDefaults{}; |
161 | }; |
162 | |
163 | std::optional<bool> dynamicRegistration{}; |
164 | std::optional<CompletionItem> completionItem{}; |
165 | std::optional<CompletionItemKind> completionItemKind{}; |
166 | std::optional<bool> contextSupport{}; |
167 | std::optional<Enum::InsertTextMode::type_value> insertTextMode{}; |
168 | std::optional<CompletionList> itemDefaults{}; |
169 | CompletionClientCapabilities() = default; |
170 | }; |
171 | std::string toJsonValueStr(const CompletionClientCapabilities &val); |
172 | std::string toJsonValueStr(const CompletionClientCapabilities::CompletionItem &val); |
173 | std::string toJsonValueStr(const CompletionClientCapabilities::CompletionItem::TagSupport &val); |
174 | std::string toJsonValueStr(const CompletionClientCapabilities::CompletionItem::InsertTextModeSupport &val); |
175 | std::string toJsonValueStr(const CompletionClientCapabilities::CompletionList &val); |
176 | std::string toJsonValueStr(const CompletionClientCapabilities::CompletionItemKind &val); |
177 | |
178 | struct HoverClientCapabilities |
179 | { |
180 | std::optional<bool> dynamicRegistration{}; |
181 | std::optional<std::vector<Enum::MarkupKind::type_value>> contentFormat{}; |
182 | }; |
183 | std::string toJsonValueStr(const HoverClientCapabilities &val); |
184 | |
185 | struct SignatureHelpClientCapabilities |
186 | { |
187 | struct SignatureInformation |
188 | { |
189 | struct ParameterInformation |
190 | { |
191 | std::optional<bool> labelOffsetSupport{}; |
192 | }; |
193 | std::optional<std::vector<Enum::MarkupKind::type_value>> documentationFormat{}; |
194 | std::optional<ParameterInformation> parameterInformation{}; |
195 | std::optional<bool> activeParameterSupport{}; |
196 | }; |
197 | std::optional<bool> dynamicRegistration{}; |
198 | std::optional<SignatureInformation> signatureInformation{}; |
199 | std::optional<bool> contextSupport{}; |
200 | }; |
201 | std::string toJsonValueStr(const SignatureHelpClientCapabilities::SignatureInformation::ParameterInformation &val); |
202 | std::string toJsonValueStr(const SignatureHelpClientCapabilities::SignatureInformation &val); |
203 | std::string toJsonValueStr(const SignatureHelpClientCapabilities &val); |
204 | |
205 | struct DeclarationClientCapabilities |
206 | { |
207 | std::optional<bool> dynamicRegistration{}; |
208 | std::optional<bool> linkSupport{}; |
209 | }; |
210 | std::string toJsonValueStr(const DeclarationClientCapabilities &val); |
211 | |
212 | struct DefinitionClientCapabilities |
213 | { |
214 | std::optional<bool> dynamicRegistration{}; |
215 | std::optional<bool> linkSupport{}; |
216 | }; |
217 | std::string toJsonValueStr(const DefinitionClientCapabilities &val); |
218 | |
219 | struct TypeDefinitionClientCapabilities |
220 | { |
221 | std::optional<bool> dynamicRegistration{}; |
222 | std::optional<bool> linkSupport{}; |
223 | }; |
224 | std::string toJsonValueStr(const TypeDefinitionClientCapabilities &val); |
225 | |
226 | struct ImplementationClientCapabilities |
227 | { |
228 | std::optional<bool> dynamicRegistration{}; |
229 | std::optional<bool> linkSupport{}; |
230 | }; |
231 | std::string toJsonValueStr(const ImplementationClientCapabilities &val); |
232 | |
233 | struct ReferenceClientCapabilities |
234 | { |
235 | std::optional<bool> dynamicRegistration{}; |
236 | }; |
237 | std::string toJsonValueStr(const ReferenceClientCapabilities &val); |
238 | |
239 | struct DocumentHighlightClientCapabilities |
240 | { |
241 | std::optional<bool> dynamicRegistration{}; |
242 | }; |
243 | std::string toJsonValueStr(const DocumentHighlightClientCapabilities &val); |
244 | |
245 | struct DocumentSymbolClientCapabilities |
246 | { |
247 | struct TagSupport |
248 | { |
249 | std::vector<Enum::SymbolKind::type_value> valueSet{}; |
250 | }; |
251 | std::optional<bool> dynamicRegistration{}; |
252 | std::optional<SymbolKind> symbolKind{}; |
253 | std::optional<bool> hierarchicalDocumentSymbolSupport{}; |
254 | std::optional<TagSupport> tagSupport{}; |
255 | std::optional<bool> labelSupport{}; |
256 | |
257 | }; |
258 | std::string toJsonValueStr(const DocumentSymbolClientCapabilities &val); |
259 | |
260 | struct CodeActionClientCapabilities |
261 | { |
262 | std::optional<bool> dynamicRegistration{}; |
263 | std::optional<CodeActionLiteralSupport> codeActionLiteralSupport{}; |
264 | std::optional<bool> isPreferredSupport{}; |
265 | std::optional<bool> disabledSupport{}; |
266 | std::optional<bool> dataSupport{}; |
267 | std::optional<ResolveSupport> resolveSupport{}; |
268 | std::optional<bool> honorsChangeAnnotations{}; |
269 | }; |
270 | std::string toJsonValueStr(const CodeActionClientCapabilities &val); |
271 | |
272 | struct CodeLensClientCapabilities |
273 | { |
274 | std::optional<bool> dynamicRegistration{}; |
275 | }; |
276 | std::string toJsonValueStr(const CodeLensClientCapabilities &val); |
277 | |
278 | struct DocumentLinkClientCapabilities |
279 | { |
280 | std::optional<bool> dynamicRegistration{}; |
281 | std::optional<bool> tooltipSupport{}; |
282 | }; |
283 | std::string toJsonValueStr(const DocumentLinkClientCapabilities &val); |
284 | |
285 | struct DocumentColorClientCapabilities |
286 | { |
287 | std::optional<bool> dynamicRegistration{}; |
288 | }; |
289 | std::string toJsonValueStr(const DocumentColorClientCapabilities &val); |
290 | |
291 | struct DocumentFormattingClientCapabilities |
292 | { |
293 | std::optional<bool> dynamicRegistration{}; |
294 | }; |
295 | std::string toJsonValueStr(const DocumentFormattingClientCapabilities &val); |
296 | |
297 | struct DocumentRangeFormattingClientCapabilities |
298 | { |
299 | std::optional<bool> dynamicRegistration{}; |
300 | }; |
301 | std::string toJsonValueStr(const DocumentRangeFormattingClientCapabilities &val); |
302 | |
303 | struct DocumentOnTypeFormattingClientCapabilities |
304 | { |
305 | std::optional<bool> dynamicRegistration{}; |
306 | }; |
307 | std::string toJsonValueStr(const DocumentOnTypeFormattingClientCapabilities &val); |
308 | |
309 | struct RenameClientCapabilities |
310 | { |
311 | std::optional<bool> dynamicRegistration{}; |
312 | std::optional<bool> prepareSupport{}; |
313 | std::optional<Enum::PrepareSupportDefaultBehavior::type_value> prepareSupportDefaultBehavior{}; |
314 | std::optional<bool> honorsChangeAnnotations{}; |
315 | }; |
316 | std::string toJsonValueStr(const RenameClientCapabilities &val); |
317 | |
318 | struct PublishDiagnosticsClientCapabilities |
319 | { |
320 | struct TagSupport |
321 | { |
322 | std::vector<Enum::DiagnosticTag::type_value> valueSet{}; |
323 | }; |
324 | std::optional<bool> relatedInformation{}; |
325 | std::optional<TagSupport> tagSupport{}; |
326 | std::optional<bool> versionSupport{}; |
327 | std::optional<bool> codeDescriptionSupport{}; |
328 | std::optional<bool> dataSupport{}; |
329 | }; |
330 | std::string toJsonValueStr(const PublishDiagnosticsClientCapabilities &val); |
331 | |
332 | struct FoldingRangeClientCapabilities |
333 | { |
334 | struct FoldingRangeKind |
335 | { |
336 | std::optional<std::vector<Enum::FoldingRangeKind::type_value>> valueSet{}; |
337 | }; |
338 | |
339 | struct FoldingRange |
340 | { |
341 | std::optional<bool> collapsedText{}; |
342 | }; |
343 | std::optional<bool> dynamicRegistration{}; |
344 | std::optional<unsigned int> rangeLimit{}; |
345 | std::optional<bool> lineFoldingOnly{}; |
346 | std::optional<FoldingRangeKind> foldingRangeKind{}; |
347 | std::optional<FoldingRange> foldingRange; |
348 | }; |
349 | std::string toJsonValueStr(const FoldingRangeClientCapabilities::FoldingRange &val); |
350 | std::string toJsonValueStr(const FoldingRangeClientCapabilities::FoldingRangeKind &val); |
351 | std::string toJsonValueStr(const FoldingRangeClientCapabilities &val); |
352 | |
353 | struct SelectionRangeClientCapabilities |
354 | { |
355 | std::optional<bool> dynamicRegistration{}; |
356 | }; |
357 | std::string toJsonValueStr(const SelectionRangeClientCapabilities &val); |
358 | |
359 | struct LinkedEditingRangeClientCapabilities |
360 | { |
361 | std::optional<bool> dynamicRegistration{}; |
362 | }; |
363 | std::string toJsonValueStr(const LinkedEditingRangeClientCapabilities &val); |
364 | |
365 | struct CallHierarchyClientCapabilities |
366 | { |
367 | std::optional<bool> dynamicRegistration{}; |
368 | }; |
369 | std::string toJsonValueStr(const CallHierarchyClientCapabilities &val); |
370 | |
371 | struct SemanticTokensClientCapabilities |
372 | { |
373 | struct Requests |
374 | { |
375 | struct Full |
376 | { |
377 | std::optional<bool> delta; |
378 | }; |
379 | |
380 | std::optional<std::any> range{}; // boolean | {}; |
381 | std::optional<Full> full{}; // full?: boolean | { delta?: boolean; } |
382 | }; |
383 | |
384 | Requests requests; |
385 | std::vector<Enum::SemanticTokenTypes::type_value> tokenTypes{}; |
386 | std::vector<Enum::SemanticTokenModifiers::type_value> tokenModifiers{}; |
387 | std::vector<Enum::TokenFormat::type_value> formats{}; |
388 | std::optional<bool> dynamicRegistration{}; |
389 | std::optional<bool> overlappingTokenSupport{}; |
390 | std::optional<bool> multilineTokenSupport{}; |
391 | std::optional<bool> serverCancelSupport{}; |
392 | std::optional<bool> augmentsSyntaxTokens{}; |
393 | }; |
394 | std::string toJsonValueStr(const SemanticTokensClientCapabilities &val); |
395 | |
396 | struct MonikerClientCapabilities |
397 | { |
398 | std::optional<bool> dynamicRegistration{}; |
399 | }; |
400 | std::string toJsonValueStr(const MonikerClientCapabilities &val); |
401 | |
402 | struct TypeHierarchyClientCapabilities |
403 | { |
404 | std::optional<bool> dynamicRegistration{}; |
405 | }; |
406 | std::string toJsonValueStr(const TypeHierarchyClientCapabilities &val); |
407 | |
408 | struct InlineValueClientCapabilities |
409 | { |
410 | std::optional<bool> dynamicRegistration{}; |
411 | }; |
412 | std::string toJsonValueStr(const InlineValueClientCapabilities &val); |
413 | |
414 | struct InlayHintClientCapabilities |
415 | { |
416 | std::optional<bool> dynamicRegistration{}; |
417 | std::optional<ResolveSupport> resolveSupport{}; |
418 | }; |
419 | std::string toJsonValueStr(const InlayHintClientCapabilities &val); |
420 | |
421 | struct DiagnosticClientCapabilities |
422 | { |
423 | std::optional<bool> dynamicRegistration{}; |
424 | std::optional<bool> relatedDocumentSupport{}; |
425 | }; |
426 | std::string toJsonValueStr(const DiagnosticClientCapabilities &val); |
427 | |
428 | struct TextDocumentClientCapabilities |
429 | { |
430 | std::optional<TextDocumentSyncClientCapabilities> synchronization{}; |
431 | std::optional<CompletionClientCapabilities> completion{}; |
432 | std::optional<HoverClientCapabilities> hover{}; |
433 | std::optional<SignatureHelpClientCapabilities> signatureHelp{}; |
434 | std::optional<DeclarationClientCapabilities> declaration{}; |
435 | std::optional<DefinitionClientCapabilities> definition{}; |
436 | std::optional<TypeDefinitionClientCapabilities> typeDefinition{}; |
437 | std::optional<ImplementationClientCapabilities> implementation{}; |
438 | std::optional<ReferenceClientCapabilities> references{}; |
439 | std::optional<DocumentHighlightClientCapabilities> documentHighlight{}; |
440 | std::optional<DocumentSymbolClientCapabilities> documentSymbol{}; |
441 | std::optional<CodeActionClientCapabilities> codeAction{}; |
442 | std::optional<CodeLensClientCapabilities> codeLens{}; |
443 | std::optional<DocumentLinkClientCapabilities> documentLink{}; |
444 | std::optional<DocumentColorClientCapabilities> colorProvider{}; |
445 | std::optional<DocumentFormattingClientCapabilities> formatting{}; |
446 | std::optional<DocumentRangeFormattingClientCapabilities> rangeFormatting{}; |
447 | std::optional<DocumentOnTypeFormattingClientCapabilities> onTypeFormatting{}; |
448 | std::optional<RenameClientCapabilities> rename{}; |
449 | std::optional<PublishDiagnosticsClientCapabilities> publishDiagnostics{}; |
450 | std::optional<FoldingRangeClientCapabilities> foldingRange{}; |
451 | std::optional<SelectionRangeClientCapabilities> selectionRange{}; |
452 | std::optional<LinkedEditingRangeClientCapabilities> linkedEditingRange{}; |
453 | std::optional<CallHierarchyClientCapabilities> callHierarchy{}; |
454 | std::optional<SemanticTokensClientCapabilities> semanticTokens{}; |
455 | std::optional<MonikerClientCapabilities> moniker{}; |
456 | std::optional<TypeHierarchyClientCapabilities> typeHierarchy{}; |
457 | std::optional<InlineValueClientCapabilities> inlineValue{}; |
458 | std::optional<InlayHintClientCapabilities> inlayHint{}; |
459 | std::optional<DiagnosticClientCapabilities> diagnostic{}; |
460 | }; |
461 | std::string toJsonValueStr(const TextDocumentClientCapabilities &val); |
462 | |
463 | struct FileOperations |
464 | { |
465 | std::optional<bool> dynamicRegistration{}; |
466 | std::optional<bool> didCreate{}; |
467 | std::optional<bool> willCreate{}; |
468 | std::optional<bool> didRename{}; |
469 | std::optional<bool> willRename{}; |
470 | std::optional<bool> didDelete{}; |
471 | std::optional<bool> willDelete{}; |
472 | }; |
473 | std::string toJsonValueStr(const FileOperations &val); |
474 | |
475 | struct Workspace |
476 | { |
477 | std::optional<bool> applyEdit{}; |
478 | std::optional<WorkspaceEditClientCapabilities> workspaceEdit{}; |
479 | std::optional<DidChangeConfigurationClientCapabilities> didChangeConfiguration{}; |
480 | std::optional<DidChangeWatchedFilesClientCapabilities> didChangeWatchedFiles{}; |
481 | std::optional<WorkspaceSymbolClientCapabilities> symbol{}; |
482 | std::optional<ExecuteCommandClientCapabilities> executeCommand{}; |
483 | std::optional<bool> workspaceFolders{}; |
484 | std::optional<bool> configuration{}; |
485 | std::optional<SemanticTokensWorkspaceClientCapabilities> semanticTokens{}; |
486 | std::optional<CodeLensWorkspaceClientCapabilities> codeLens{}; |
487 | std::optional<FileOperations> fileOperations{}; |
488 | std::optional<InlineValueWorkspaceClientCapabilities> inlineValue{}; |
489 | std::optional<InlayHintWorkspaceClientCapabilities> inlayHint{}; |
490 | std::optional<DiagnosticWorkspaceClientCapabilities> diagnostics{}; |
491 | }; |
492 | std::string toJsonValueStr(const Workspace &val); |
493 | |
494 | struct NotebookDocumentSyncClientCapabilities |
495 | { |
496 | std::optional<bool> dynamicRegistration{}; |
497 | std::optional<bool> executionSummarySupport{}; |
498 | }; |
499 | std::string toJsonValueStr(const NotebookDocumentSyncClientCapabilities &val); |
500 | |
501 | struct NotebookDocumentClientCapabilities |
502 | { |
503 | NotebookDocumentSyncClientCapabilities synchronization{}; |
504 | }; |
505 | std::string toJsonValueStr(const NotebookDocumentClientCapabilities &val); |
506 | |
507 | struct MessageActionItem |
508 | { |
509 | std::optional<bool> additionalPropertiesSupport{}; |
510 | }; |
511 | std::string toJsonValueStr(const MessageActionItem &val); |
512 | |
513 | struct ShowMessageRequestClientCapabilities |
514 | { |
515 | std::optional<MessageActionItem> messageActionItem{}; |
516 | }; |
517 | std::string toJsonValueStr(const ShowMessageRequestClientCapabilities &val); |
518 | |
519 | struct ShowDocumentClientCapabilities |
520 | { |
521 | bool support{}; |
522 | }; |
523 | std::string toJsonValueStr(const ShowDocumentClientCapabilities &val); |
524 | |
525 | struct Window |
526 | { |
527 | std::optional<bool> workDoneProgress{}; |
528 | std::optional<ShowMessageRequestClientCapabilities> showMessage{}; |
529 | std::optional<ShowDocumentClientCapabilities> showDocument{}; |
530 | }; |
531 | std::string toJsonValueStr(const Window &val); |
532 | |
533 | struct StaleRequestSupport |
534 | { |
535 | bool cancel{}; |
536 | std::vector<std::string> retryOnContentModified{}; |
537 | }; |
538 | std::string toJsonValueStr(const StaleRequestSupport &val); |
539 | |
540 | struct RegularExpressionsClientCapabilities |
541 | { |
542 | std::string engine{}; |
543 | std::optional<std::string> version{}; |
544 | }; |
545 | std::string toJsonValueStr(const RegularExpressionsClientCapabilities &val); |
546 | |
547 | struct MarkdownClientCapabilities |
548 | { |
549 | std::string parser{}; |
550 | std::optional<std::string> version{}; |
551 | std::optional<std::vector<std::string>> allowedTags{}; |
552 | }; |
553 | std::string toJsonValueStr(const MarkdownClientCapabilities &val); |
554 | |
555 | struct General |
556 | { |
557 | std::optional<StaleRequestSupport> staleRequestSupport{}; |
558 | std::optional<RegularExpressionsClientCapabilities> regularExpressions{}; |
559 | std::optional<MarkdownClientCapabilities> markdown{}; |
560 | std::optional<std::vector<Enum::PositionEncodingKind::type_value>> positionEncodings{}; |
561 | std::optional<std::any> experimental{}; |
562 | }; |
563 | std::string toJsonValueStr(const General &val); |
564 | |
565 | struct WorkspaceFolder |
566 | { |
567 | DocumentUri uri{}; |
568 | std::string name{}; |
569 | }; |
570 | std::string toJsonValueStr(const WorkspaceFolder &val); |
571 | std::string toJsonValueStr(const std::vector<WorkspaceFolder> &val); |
572 | |
573 | struct ClientInfo |
574 | { |
575 | std::string name{}; |
576 | std::optional<std::string> version{}; |
577 | }; |
578 | std::string toJsonValueStr(const ClientInfo &val); |
579 | |
580 | struct ClientCapabilities |
581 | { |
582 | std::optional<Workspace> workspace{}; |
583 | std::optional<TextDocumentClientCapabilities> textDocument{}; |
584 | std::optional<NotebookDocumentClientCapabilities> notebookDocument{}; |
585 | std::optional<Window> window{}; |
586 | std::optional<General> general{}; |
587 | }; |
588 | std::string toJsonValueStr(const ClientCapabilities &val); |
589 | |
590 | struct InitializeParams : WorkDoneProgressParams |
591 | { |
592 | std::optional<int> processId{}; |
593 | std::optional<ClientInfo> clientInfo{}; |
594 | std::optional<std::string> locale{}; |
595 | std::optional<std::string> rootPath{}; |
596 | std::optional<std::string> rootUri{}; |
597 | std::optional<std::string> language{}; // extend |
598 | std::optional<std::any> initializationOptions{}; |
599 | ClientCapabilities capabilities{}; |
600 | std::optional<Enum::TraceValue::type_value> trace{}; |
601 | std::optional<std::vector<WorkspaceFolder>> workspaceFolders{}; |
602 | std::string formatValue(const std::vector<WorkspaceFolder> &workspaceFolders) const; |
603 | }; |
604 | std::string toJsonValueStr(const InitializeParams &val); |
605 | |
606 | struct InitializedParams |
607 | { |
608 | |
609 | }; |
610 | std::string toJsonValueStr(const InitializedParams &val); |
611 | |
612 | } // namespace newlsp |
613 | |
614 | #endif // LIFECYCLEMESSAHE_H |
615 |