lsp-types 1.6.0.1 → 2.4.0.0
raw patch · 526 files changed
Files
- ChangeLog.md +62/−1
- README.md +4/−0
- generated/Language/LSP/Protocol/Internal/Meta.hs +433/−0
- generated/Language/LSP/Protocol/Internal/Method.hs +1068/−0
- generated/Language/LSP/Protocol/Internal/Types.hs +429/−0
- generated/Language/LSP/Protocol/Internal/Types/AnnotatedTextEdit.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditParams.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditResult.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/BaseSymbolInformation.hs +60/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyClientCapabilities.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCall.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCallsParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyItem.hs +83/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCall.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCallsParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyPrepareParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/CallHierarchyRegistrationOptions.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/CancelParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotation.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotationIdentifier.hs +30/−0
- generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotationsSupportOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCapabilities.hs +72/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionKindOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionLiteralOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionResolveOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemInsertTextModeOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemOptions.hs +112/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemOptionsKind.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemResolveOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientDiagnosticsTagOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientFoldingRangeKindOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientFoldingRangeOptions.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientInfo.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientInlayHintResolveOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSemanticTokensRequestFullDelta.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSemanticTokensRequestOptions.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientShowMessageActionItemOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSignatureInformationOptions.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSignatureParameterInformationOptions.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSymbolKindOptions.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSymbolResolveOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/ClientSymbolTagOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeAction.hs +109/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionClientCapabilities.hs +90/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionContext.hs +60/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionDisabled.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs +146/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionOptions.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionParams.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionRegistrationOptions.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeDescription.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLens.hs +55/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLensClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLensOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLensParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLensRegistrationOptions.hs +49/−0
- generated/Language/LSP/Protocol/Internal/Types/CodeLensWorkspaceClientCapabilities.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/Color.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/ColorInformation.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/ColorPresentation.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/ColorPresentationParams.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/Command.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionClientCapabilities.hs +75/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionContext.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItem.hs +218/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItemDefaults.hs +85/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs +212/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItemLabelDetails.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionItemTagOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionList.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionListCapabilities.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionOptions.hs +77/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionParams.hs +63/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionRegistrationOptions.hs +84/−0
- generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs +60/−0
- generated/Language/LSP/Protocol/Internal/Types/ConfigurationItem.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/ConfigurationParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/CreateFile.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/CreateFileOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/CreateFilesParams.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/Declaration.hs +28/−0
- generated/Language/LSP/Protocol/Internal/Types/DeclarationClientCapabilities.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DeclarationLink.hs +33/−0
- generated/Language/LSP/Protocol/Internal/Types/DeclarationOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DeclarationParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/DeclarationRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/Definition.hs +33/−0
- generated/Language/LSP/Protocol/Internal/Types/DefinitionClientCapabilities.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DefinitionLink.hs +30/−0
- generated/Language/LSP/Protocol/Internal/Types/DefinitionOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DefinitionParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/DefinitionRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DeleteFile.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/DeleteFileOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/DeleteFilesParams.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/Diagnostic.hs +97/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticClientCapabilities.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticOptions.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticRegistrationOptions.hs +72/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticRelatedInformation.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticServerCancellationData.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/DiagnosticWorkspaceClientCapabilities.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationRegistrationOptions.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeNotebookDocumentParams.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeTextDocumentParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesClientCapabilities.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesRegistrationOptions.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidChangeWorkspaceFoldersParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidCloseNotebookDocumentParams.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/DidCloseTextDocumentParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidOpenNotebookDocumentParams.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/DidOpenTextDocumentParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/DidSaveNotebookDocumentParams.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/DidSaveTextDocumentParams.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentColorClientCapabilities.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentColorOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentColorParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentColorRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticParams.hs +63/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReport.hs +35/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs +55/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportPartialResult.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentFilter.hs +32/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlight.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentLink.hs +64/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentLinkClientCapabilities.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentLinkOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentLinkParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentLinkRegistrationOptions.hs +49/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingOptions.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingParams.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingRegistrationOptions.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSelector.hs +31/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSymbol.hs +87/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolClientCapabilities.hs +67/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolOptions.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolRegistrationOptions.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/EditRangeWithInsertReplace.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs +91/−0
- generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandOptions.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandRegistrationOptions.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/ExecutionSummary.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs +70/−0
- generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/FileCreate.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/FileDelete.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/FileEvent.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationClientCapabilities.hs +72/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationFilter.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationOptions.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationPattern.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/FileOperationRegistrationOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/FileRename.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/FileSystemWatcher.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRange.hs +73/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRangeClientCapabilities.hs +70/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs +63/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRangeOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRangeParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/FoldingRangeRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/FormattingOptions.hs +63/−0
- generated/Language/LSP/Protocol/Internal/Types/FullDocumentDiagnosticReport.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/GeneralClientCapabilities.hs +84/−0
- generated/Language/LSP/Protocol/Internal/Types/GlobPattern.hs +31/−0
- generated/Language/LSP/Protocol/Internal/Types/Hover.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/HoverClientCapabilities.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/HoverOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/HoverParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/HoverRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/ImplementationClientCapabilities.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ImplementationOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/ImplementationParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/ImplementationRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/InitializeError.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/InitializeParams.hs +116/−0
- generated/Language/LSP/Protocol/Internal/Types/InitializeResult.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/InitializedParams.hs +34/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHint.hs +101/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintClientCapabilities.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintLabelPart.hs +74/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintOptions.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintRegistrationOptions.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/InlayHintWorkspaceClientCapabilities.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValue.hs +36/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueClientCapabilities.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueContext.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueEvaluatableExpression.hs +49/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueParams.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueRegistrationOptions.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueText.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueVariableLookup.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/InlineValueWorkspaceClientCapabilities.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/InsertReplaceEdit.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs +64/−0
- generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs +86/−0
- generated/Language/LSP/Protocol/Internal/Types/LanguageKind.hs +450/−0
- generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeClientCapabilities.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRanges.hs +49/−0
- generated/Language/LSP/Protocol/Internal/Types/Location.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/LocationLink.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/LocationUriOnly.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/LogMessageParams.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/LogTraceParams.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/MarkdownClientCapabilities.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/MarkedString.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/MarkedStringWithLanguage.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/MarkupContent.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/MessageActionItem.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/MessageType.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/Moniker.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/MonikerClientCapabilities.hs +41/−0
- generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/MonikerOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/MonikerParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/MonikerRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookCell.hs +66/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookCellArrayChange.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookCellLanguage.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookCellTextDocumentFilter.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocument.hs +67/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellChangeStructure.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellChanges.hs +55/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellContentChanges.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentChangeEvent.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentClientCapabilities.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilter.hs +34/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterNotebookType.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterPattern.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterScheme.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterWithCells.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterWithNotebook.hs +48/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentIdentifier.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncClientCapabilities.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncOptions.hs +57/−0
- generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncRegistrationOptions.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/OptionalVersionedTextDocumentIdentifier.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/ParameterInformation.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/PartialResultParams.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/Pattern.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/Position.hs +77/−0
- generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs +72/−0
- generated/Language/LSP/Protocol/Internal/Types/PrepareRenameDefaultBehavior.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/PrepareRenameParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/PrepareRenamePlaceholder.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/PrepareRenameResult.hs +30/−0
- generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/PreviousResultId.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/ProgressParams.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/ProgressToken.hs +28/−0
- generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsClientCapabilities.hs +70/−0
- generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsParams.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/Range.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/ReferenceClientCapabilities.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/ReferenceContext.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/ReferenceOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/ReferenceParams.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/ReferenceRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/Registration.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/RegistrationParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/RegularExpressionEngineKind.hs +30/−0
- generated/Language/LSP/Protocol/Internal/Types/RegularExpressionsClientCapabilities.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/RelatedFullDocumentDiagnosticReport.hs +69/−0
- generated/Language/LSP/Protocol/Internal/Types/RelatedUnchangedDocumentDiagnosticReport.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/RelativePattern.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameClientCapabilities.hs +67/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameFile.hs +63/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameFileOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameFilesParams.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameParams.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/RenameRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/ResourceOperation.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/SaveOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/SelectionRange.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/SelectionRangeClientCapabilities.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/SelectionRangeOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/SelectionRangeParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/SelectionRangeRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs +116/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs +208/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokens.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensClientCapabilities.hs +103/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDelta.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaParams.hs +57/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaPartialResult.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensEdit.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensFullDelta.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensLegend.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensOptions.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensPartialResult.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRangeParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRegistrationOptions.hs +70/−0
- generated/Language/LSP/Protocol/Internal/Types/SemanticTokensWorkspaceClientCapabilities.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/ServerCapabilities.hs +291/−0
- generated/Language/LSP/Protocol/Internal/Types/ServerCompletionItemOptions.hs +42/−0
- generated/Language/LSP/Protocol/Internal/Types/ServerInfo.hs +47/−0
- generated/Language/LSP/Protocol/Internal/Types/SetTraceParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowDocumentClientCapabilities.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowDocumentParams.hs +64/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowDocumentResult.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowMessageParams.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestClientCapabilities.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestParams.hs +50/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelp.hs +73/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpClientCapabilities.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpContext.hs +65/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpOptions.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpParams.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpRegistrationOptions.hs +60/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs +60/−0
- generated/Language/LSP/Protocol/Internal/Types/SignatureInformation.hs +69/−0
- generated/Language/LSP/Protocol/Internal/Types/StaleRequestSupportOptions.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/StaticRegistrationOptions.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/SymbolInformation.hs +82/−0
- generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs +219/−0
- generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentChangeRegistrationOptions.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentClientCapabilities.hs +241/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangeEvent.hs +30/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangePartial.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangeWholeDocument.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentEdit.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilter.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterLanguage.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterPattern.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterScheme.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentIdentifier.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentItem.hs +57/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentPositionParams.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentRegistrationOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveRegistrationOptions.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncClientCapabilities.hs +54/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncOptions.hs +64/−0
- generated/Language/LSP/Protocol/Internal/Types/TextEdit.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/TraceValue.hs +58/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionClientCapabilities.hs +46/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionParams.hs +56/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionRegistrationOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyClientCapabilities.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyItem.hs +84/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyOptions.hs +39/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyPrepareParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyRegistrationOptions.hs +53/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySubtypesParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySupertypesParams.hs +52/−0
- generated/Language/LSP/Protocol/Internal/Types/UInitializeParams.hs +104/−0
- generated/Language/LSP/Protocol/Internal/Types/UnchangedDocumentDiagnosticReport.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs +74/−0
- generated/Language/LSP/Protocol/Internal/Types/Unregistration.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/UnregistrationParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/VersionedNotebookDocumentIdentifier.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/VersionedTextDocumentIdentifier.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/WillSaveTextDocumentParams.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/WindowClientCapabilities.hs +61/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressBegin.hs +73/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCancelParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCreateParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressEnd.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressOptions.hs +37/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressParams.hs +38/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressReport.hs +66/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceClientCapabilities.hs +136/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticParams.hs +59/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReport.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReportPartialResult.hs +40/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceDocumentDiagnosticReport.hs +31/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceEdit.hs +81/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceEditClientCapabilities.hs +75/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceFolder.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersChangeEvent.hs +43/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersInitializeParams.hs +44/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersServerCapabilities.hs +49/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceFullDocumentDiagnosticReport.hs +66/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceOptions.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbol.hs +82/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolClientCapabilities.hs +62/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolOptions.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolParams.hs +51/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolRegistrationOptions.hs +45/−0
- generated/Language/LSP/Protocol/Internal/Types/WorkspaceUnchangedDocumentDiagnosticReport.hs +62/−0
- generator/CodeGen.hs +1128/−0
- generator/Main.hs +11/−0
- lsp-types.cabal +659/−128
- metaModel.json +15385/−0
- metamodel/Language/LSP/MetaModel.hs +11/−0
- metamodel/Language/LSP/MetaModel/Types.hs +258/−0
- quickcheck/Language/LSP/Protocol/QuickCheck.hs +6/−0
- quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs +43/−0
- quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs +82/−0
- quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs +27/−0
- src/Data/IxMap.hs +9/−12
- src/Data/Row/Aeson.hs +97/−0
- src/Data/Row/Hashable.hs +12/−0
- src/Language/LSP/Protocol/Capabilities.hs +994/−0
- src/Language/LSP/Protocol/Lens.hs +8/−0
- src/Language/LSP/Protocol/Message.hs +30/−0
- src/Language/LSP/Protocol/Message/Lens.hs +20/−0
- src/Language/LSP/Protocol/Message/LspId.hs +57/−0
- src/Language/LSP/Protocol/Message/Meta.hs +19/−0
- src/Language/LSP/Protocol/Message/Method.hs +172/−0
- src/Language/LSP/Protocol/Message/Parsing.hs +375/−0
- src/Language/LSP/Protocol/Message/Registration.hs +119/−0
- src/Language/LSP/Protocol/Message/Types.hs +270/−0
- src/Language/LSP/Protocol/Meta.hs +3/−0
- src/Language/LSP/Protocol/Types.hs +57/−0
- src/Language/LSP/Protocol/Types/CodeAction.hs +10/−0
- src/Language/LSP/Protocol/Types/Common.hs +215/−0
- src/Language/LSP/Protocol/Types/Edit.hs +59/−0
- src/Language/LSP/Protocol/Types/Lens.hs +10/−0
- src/Language/LSP/Protocol/Types/Location.hs +20/−0
- src/Language/LSP/Protocol/Types/LspEnum.hs +58/−0
- src/Language/LSP/Protocol/Types/MarkupContent.hs +47/−0
- src/Language/LSP/Protocol/Types/Orphans.hs +21/−0
- src/Language/LSP/Protocol/Types/Progress.hs +31/−0
- src/Language/LSP/Protocol/Types/SemanticTokens.hs +189/−0
- src/Language/LSP/Protocol/Types/Singletons.hs +78/−0
- src/Language/LSP/Protocol/Types/Uri.hs +259/−0
- src/Language/LSP/Protocol/Types/Uri/OsPath.hs +54/−0
- src/Language/LSP/Protocol/Types/WatchKinds.hs +38/−0
- src/Language/LSP/Protocol/Utils/Misc.hs +153/−0
- src/Language/LSP/Protocol/Utils/SMethodMap.hs +70/−0
- src/Language/LSP/Types.hs +0/−92
- src/Language/LSP/Types/CallHierarchy.hs +0/−100
- src/Language/LSP/Types/Cancellation.hs +0/−28
- src/Language/LSP/Types/Capabilities.hs +0/−290
- src/Language/LSP/Types/ClientCapabilities.hs +0/−295
- src/Language/LSP/Types/CodeAction.hs +0/−268
- src/Language/LSP/Types/CodeLens.hs +0/−64
- src/Language/LSP/Types/Command.hs +0/−51
- src/Language/LSP/Types/Common.hs +0/−103
- src/Language/LSP/Types/Completion.hs +0/−418
- src/Language/LSP/Types/Configuration.hs +0/−42
- src/Language/LSP/Types/Declaration.hs +0/−39
- src/Language/LSP/Types/Definition.hs +0/−36
- src/Language/LSP/Types/Diagnostic.hs +0/−139
- src/Language/LSP/Types/DocumentColor.hs +0/−91
- src/Language/LSP/Types/DocumentFilter.hs +0/−36
- src/Language/LSP/Types/DocumentHighlight.hs +0/−71
- src/Language/LSP/Types/DocumentLink.hs +0/−71
- src/Language/LSP/Types/DocumentSymbol.hs +0/−253
- src/Language/LSP/Types/FoldingRange.hs +0/−100
- src/Language/LSP/Types/Formatting.hs +0/−114
- src/Language/LSP/Types/Hover.hs +0/−84
- src/Language/LSP/Types/Implementation.hs +0/−42
- src/Language/LSP/Types/Initialize.hs +0/−96
- src/Language/LSP/Types/Lens.hs +0/−399
- src/Language/LSP/Types/Location.hs +0/−94
- src/Language/LSP/Types/LspId.hs +0/−55
- src/Language/LSP/Types/MarkupContent.hs +0/−111
- src/Language/LSP/Types/Message.hs +0/−423
- src/Language/LSP/Types/Method.hs +0/−455
- src/Language/LSP/Types/Parsing.hs +0/−340
- src/Language/LSP/Types/Progress.hs +0/−214
- src/Language/LSP/Types/References.hs +0/−43
- src/Language/LSP/Types/Registration.hs +0/−179
- src/Language/LSP/Types/Rename.hs +0/−85
- src/Language/LSP/Types/SMethodMap.hs +0/−71
- src/Language/LSP/Types/SelectionRange.hs +0/−54
- src/Language/LSP/Types/SemanticTokens.hs +0/−500
- src/Language/LSP/Types/ServerCapabilities.hs +0/−137
- src/Language/LSP/Types/SignatureHelp.hs +0/−207
- src/Language/LSP/Types/StaticRegistrationOptions.hs +0/−13
- src/Language/LSP/Types/TextDocument.hs +0/−264
- src/Language/LSP/Types/TypeDefinition.hs +0/−42
- src/Language/LSP/Types/Uri.hs +0/−241
- src/Language/LSP/Types/Uri/OsPath.hs +0/−53
- src/Language/LSP/Types/Utils.hs +0/−123
- src/Language/LSP/Types/WatchedFiles.hs +0/−113
- src/Language/LSP/Types/Window.hs +0/−114
- src/Language/LSP/Types/WorkspaceEdit.hs +0/−404
- src/Language/LSP/Types/WorkspaceFolders.hs +0/−37
- src/Language/LSP/Types/WorkspaceSymbol.hs +0/−91
- test/CapabilitiesSpec.hs +5/−10
- test/JsonSpec.hs +80/−147
- test/LocationSpec.hs +2/−2
- test/Main.hs +1/−1
- test/MethodSpec.hs +68/−67
- test/SemanticTokensSpec.hs +45/−40
- test/ServerCapabilitiesSpec.hs +25/−18
- test/Spec.hs +1/−0
- test/TypesSpec.hs +10/−21
- test/URIFilePathSpec.hs +102/−83
- test/WorkspaceEditSpec.hs +7/−6
ChangeLog.md view
@@ -1,5 +1,66 @@ # Revision history for lsp-types +## 2.4.0.0 -- 2026-02-14++- export `emptyNormalizedUri` from `Language.LSP.Protocol.Types.Uri`+- Relax dependency version bounds++## 2.3.0.1 -- 2024-12-31++- Relax dependency version bounds++## 2.3.0.0 -- 2024-06-06++- Add support for identifying client and server capabilities associated with a method.+- `TResponseMessage` now contains a `TResponseError` instead of a `ResponseError`++## 2.2.0.0 -- 2024-04-29++- Update the metamodel. This results in a number of breaking changes to the generated code, mostly replacing+ anonymous structs with named ones.++## 2.1.1.0 -- 2024-02-24++- Require aeson 2+- Accept `null` in place of a missing field, a common mistake in spec compliance.+- Arbitrary instances for everything now exist and are exported via the new `lsp-types-quickcheck` library++## 2.1.0.0 -- 2023-11-13++- Add `dynamicRegistrationSupported` to `Capabilities`.+- Fully update `fullCaps` for recent spec versions.+- Support GHC 9.8, drop checked support for GHC 8.10++## 2.0.2.0 -- 2023-08-24++- Add `Language.LSP.Protocol.Utils.Misc.prettyJSON :: Value -> Doc ann` for prettyprinting JSON,+ and `ViaJSON` as a deriving-via newtype wrapper for it.+- Generate `Pretty` instances for all LSP types using `ViaJSON`.++## 2.0.1.1 -- 2023-08-08++* Fix parsing of notifications with missing params++## 2.0.1.0 -- 2023-07-14++* Removed deprecation pragmas from fields, as these cannot currently be avoided.+* Added `isOptionalMethod`, that checks whether a method is optional according to the spec.++## 2.0.0.1 -- 2023-06-16++* Fixed missing `extra-source-files` for `metamodel.json`.++## 2.0.0.0 -- 2023-06-14++* Breaking change: major restructure to generate types and methods from the LSP metamodel.+ * Full support for version 3.17 of the LSP specification, many accuracy fixes+ * Generated types follow the spec very closely, e.g. using anonymous types, using `a |? Null` instead of `Maybe a`+ * Anonymous record types in the spec are now represented using `row-types`+ * Many constructors are now prefixed with their type names+ * Documentation from the spec is transferred+ * Three top level modules: `Types` (main protocol types), `Message` (messages and methods), `Capabilities` (capabilities)+* New typeclasses for handling LSP enumerations: `LspEnum` and `LspOpenEnum`+ ## 1.6.0.1 -- 2023-12-02 * Add `LANGUAGE DuplicateRecordFields` to facilitate building with GHC 9.8@@ -10,7 +71,7 @@ * Add `ServerCancelled`, `RequestFailed` and `ErrorCodeCustom` server error types * Fix "workspace/semanticTokens/refresh" to be a server method instead of a client method * Use a packed representation for `NormalizedFilePath`-* Add converions from `OsPath` to `NormalizedFilePath` in `Language.LSP.Types.Uri.OsPath` when using new enough `filepath`+* Add conversions from `OsPath` to `NormalizedFilePath` in `Language.LSP.Types.Uri.OsPath` when using new enough `filepath` ## 1.5.0.0 -- 2022-06-20
README.md view
@@ -7,6 +7,10 @@ packages, along with [lsp](https://hackage.haskell.org/package/lsp) and [lsp-test](https://hackage.haskell.org/package/lsp-test) +## Updating the generated code++To update the generated code, run `cabal run generator` from the `lsp-types` directory.+ ## Useful links - https://github.com/haskell/lsp
+ generated/Language/LSP/Protocol/Internal/Meta.hs view
@@ -0,0 +1,433 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Meta where++import qualified Language.Haskell.TH as TH+import qualified Language.LSP.Protocol.Internal.Types++structNames :: [TH.Name]+structNames = [''Language.LSP.Protocol.Internal.Types.ImplementationParams+ ,''Language.LSP.Protocol.Internal.Types.Location+ ,''Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+ ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceFolder+ ,''Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+ ,''Language.LSP.Protocol.Internal.Types.ConfigurationParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentColorParams+ ,''Language.LSP.Protocol.Internal.Types.ColorInformation+ ,''Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.ColorPresentationParams+ ,''Language.LSP.Protocol.Internal.Types.ColorPresentation+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.FoldingRangeParams+ ,''Language.LSP.Protocol.Internal.Types.FoldingRange+ ,''Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DeclarationParams+ ,''Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.SelectionRangeParams+ ,''Language.LSP.Protocol.Internal.Types.SelectionRange+ ,''Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyItem+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensParams+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokens+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+ ,''Language.LSP.Protocol.Internal.Types.ShowDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.ShowDocumentResult+ ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+ ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+ ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.CreateFilesParams+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceEdit+ ,''Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.RenameFilesParams+ ,''Language.LSP.Protocol.Internal.Types.DeleteFilesParams+ ,''Language.LSP.Protocol.Internal.Types.MonikerParams+ ,''Language.LSP.Protocol.Internal.Types.Moniker+ ,''Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+ ,''Language.LSP.Protocol.Internal.Types.InlineValueParams+ ,''Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.InlayHintParams+ ,''Language.LSP.Protocol.Internal.Types.InlayHint+ ,''Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult+ ,''Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.RegistrationParams+ ,''Language.LSP.Protocol.Internal.Types.UnregistrationParams+ ,''Language.LSP.Protocol.Internal.Types.InitializeParams+ ,''Language.LSP.Protocol.Internal.Types.InitializeResult+ ,''Language.LSP.Protocol.Internal.Types.InitializeError+ ,''Language.LSP.Protocol.Internal.Types.InitializedParams+ ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+ ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.ShowMessageParams+ ,''Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+ ,''Language.LSP.Protocol.Internal.Types.MessageActionItem+ ,''Language.LSP.Protocol.Internal.Types.LogMessageParams+ ,''Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+ ,''Language.LSP.Protocol.Internal.Types.TextEdit+ ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+ ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+ ,''Language.LSP.Protocol.Internal.Types.CompletionParams+ ,''Language.LSP.Protocol.Internal.Types.CompletionItem+ ,''Language.LSP.Protocol.Internal.Types.CompletionList+ ,''Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.HoverParams+ ,''Language.LSP.Protocol.Internal.Types.Hover+ ,''Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpParams+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelp+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DefinitionParams+ ,''Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.ReferenceParams+ ,''Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlight+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+ ,''Language.LSP.Protocol.Internal.Types.SymbolInformation+ ,''Language.LSP.Protocol.Internal.Types.DocumentSymbol+ ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.CodeActionParams+ ,''Language.LSP.Protocol.Internal.Types.Command+ ,''Language.LSP.Protocol.Internal.Types.CodeAction+ ,''Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.CodeLensParams+ ,''Language.LSP.Protocol.Internal.Types.CodeLens+ ,''Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentLinkParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentLink+ ,''Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+ ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.RenameParams+ ,''Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.PrepareRenameParams+ ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+ ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+ ,''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+ ,''Language.LSP.Protocol.Internal.Types.SetTraceParams+ ,''Language.LSP.Protocol.Internal.Types.LogTraceParams+ ,''Language.LSP.Protocol.Internal.Types.CancelParams+ ,''Language.LSP.Protocol.Internal.Types.ProgressParams+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams+ ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams+ ,''Language.LSP.Protocol.Internal.Types.PartialResultParams+ ,''Language.LSP.Protocol.Internal.Types.LocationLink+ ,''Language.LSP.Protocol.Internal.Types.Range+ ,''Language.LSP.Protocol.Internal.Types.ImplementationOptions+ ,''Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions+ ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+ ,''Language.LSP.Protocol.Internal.Types.ConfigurationItem+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+ ,''Language.LSP.Protocol.Internal.Types.Color+ ,''Language.LSP.Protocol.Internal.Types.DocumentColorOptions+ ,''Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+ ,''Language.LSP.Protocol.Internal.Types.DeclarationOptions+ ,''Language.LSP.Protocol.Internal.Types.Position+ ,''Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+ ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+ ,''Language.LSP.Protocol.Internal.Types.FileCreate+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentEdit+ ,''Language.LSP.Protocol.Internal.Types.CreateFile+ ,''Language.LSP.Protocol.Internal.Types.RenameFile+ ,''Language.LSP.Protocol.Internal.Types.DeleteFile+ ,''Language.LSP.Protocol.Internal.Types.ChangeAnnotation+ ,''Language.LSP.Protocol.Internal.Types.FileOperationFilter+ ,''Language.LSP.Protocol.Internal.Types.FileRename+ ,''Language.LSP.Protocol.Internal.Types.FileDelete+ ,''Language.LSP.Protocol.Internal.Types.MonikerOptions+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+ ,''Language.LSP.Protocol.Internal.Types.InlineValueContext+ ,''Language.LSP.Protocol.Internal.Types.InlineValueText+ ,''Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+ ,''Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+ ,''Language.LSP.Protocol.Internal.Types.InlineValueOptions+ ,''Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+ ,''Language.LSP.Protocol.Internal.Types.MarkupContent+ ,''Language.LSP.Protocol.Internal.Types.InlayHintOptions+ ,''Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticOptions+ ,''Language.LSP.Protocol.Internal.Types.PreviousResultId+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocument+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentItem+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+ ,''Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+ ,''Language.LSP.Protocol.Internal.Types.Registration+ ,''Language.LSP.Protocol.Internal.Types.Unregistration+ ,''Language.LSP.Protocol.Internal.Types.UInitializeParams+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams+ ,''Language.LSP.Protocol.Internal.Types.ServerCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ServerInfo+ ,''Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+ ,''Language.LSP.Protocol.Internal.Types.SaveOptions+ ,''Language.LSP.Protocol.Internal.Types.FileEvent+ ,''Language.LSP.Protocol.Internal.Types.FileSystemWatcher+ ,''Language.LSP.Protocol.Internal.Types.Diagnostic+ ,''Language.LSP.Protocol.Internal.Types.CompletionContext+ ,''Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+ ,''Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+ ,''Language.LSP.Protocol.Internal.Types.CompletionItemDefaults+ ,''Language.LSP.Protocol.Internal.Types.CompletionOptions+ ,''Language.LSP.Protocol.Internal.Types.HoverOptions+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpContext+ ,''Language.LSP.Protocol.Internal.Types.SignatureInformation+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+ ,''Language.LSP.Protocol.Internal.Types.DefinitionOptions+ ,''Language.LSP.Protocol.Internal.Types.ReferenceContext+ ,''Language.LSP.Protocol.Internal.Types.ReferenceOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+ ,''Language.LSP.Protocol.Internal.Types.BaseSymbolInformation+ ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+ ,''Language.LSP.Protocol.Internal.Types.CodeActionContext+ ,''Language.LSP.Protocol.Internal.Types.CodeActionDisabled+ ,''Language.LSP.Protocol.Internal.Types.CodeActionOptions+ ,''Language.LSP.Protocol.Internal.Types.LocationUriOnly+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+ ,''Language.LSP.Protocol.Internal.Types.CodeLensOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+ ,''Language.LSP.Protocol.Internal.Types.FormattingOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+ ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+ ,''Language.LSP.Protocol.Internal.Types.RenameOptions+ ,''Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder+ ,''Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior+ ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta+ ,''Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+ ,''Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+ ,''Language.LSP.Protocol.Internal.Types.ResourceOperation+ ,''Language.LSP.Protocol.Internal.Types.CreateFileOptions+ ,''Language.LSP.Protocol.Internal.Types.RenameFileOptions+ ,''Language.LSP.Protocol.Internal.Types.DeleteFileOptions+ ,''Language.LSP.Protocol.Internal.Types.FileOperationPattern+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.NotebookCell+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges+ ,''Language.LSP.Protocol.Internal.Types.ClientInfo+ ,''Language.LSP.Protocol.Internal.Types.ClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceOptions+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument+ ,''Language.LSP.Protocol.Internal.Types.CodeDescription+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+ ,''Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace+ ,''Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions+ ,''Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage+ ,''Language.LSP.Protocol.Internal.Types.ParameterInformation+ ,''Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+ ,''Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+ ,''Language.LSP.Protocol.Internal.Types.ExecutionSummary+ ,''Language.LSP.Protocol.Internal.Types.NotebookCellLanguage+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+ ,''Language.LSP.Protocol.Internal.Types.FileOperationOptions+ ,''Language.LSP.Protocol.Internal.Types.RelativePattern+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern+ ,''Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions+ ,''Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind+ ,''Language.LSP.Protocol.Internal.Types.CompletionListCapabilities+ ,''Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions+ ,''Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions+ ,''Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta]+aliasNames :: [TH.Name]+aliasNames = [''Language.LSP.Protocol.Internal.Types.Definition+ ,''Language.LSP.Protocol.Internal.Types.DefinitionLink+ ,''Language.LSP.Protocol.Internal.Types.Declaration+ ,''Language.LSP.Protocol.Internal.Types.DeclarationLink+ ,''Language.LSP.Protocol.Internal.Types.InlineValue+ ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.PrepareRenameResult+ ,''Language.LSP.Protocol.Internal.Types.DocumentSelector+ ,''Language.LSP.Protocol.Internal.Types.ProgressToken+ ,''Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+ ,''Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+ ,''Language.LSP.Protocol.Internal.Types.MarkedString+ ,''Language.LSP.Protocol.Internal.Types.DocumentFilter+ ,''Language.LSP.Protocol.Internal.Types.GlobPattern+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentFilter+ ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+ ,''Language.LSP.Protocol.Internal.Types.Pattern+ ,''Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind]+enumNames :: [TH.Name]+enumNames = [''Language.LSP.Protocol.Internal.Types.SemanticTokenTypes+ ,''Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers+ ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind+ ,''Language.LSP.Protocol.Internal.Types.ErrorCodes+ ,''Language.LSP.Protocol.Internal.Types.LSPErrorCodes+ ,''Language.LSP.Protocol.Internal.Types.FoldingRangeKind+ ,''Language.LSP.Protocol.Internal.Types.SymbolKind+ ,''Language.LSP.Protocol.Internal.Types.SymbolTag+ ,''Language.LSP.Protocol.Internal.Types.UniquenessLevel+ ,''Language.LSP.Protocol.Internal.Types.MonikerKind+ ,''Language.LSP.Protocol.Internal.Types.InlayHintKind+ ,''Language.LSP.Protocol.Internal.Types.MessageType+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+ ,''Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason+ ,''Language.LSP.Protocol.Internal.Types.CompletionItemKind+ ,''Language.LSP.Protocol.Internal.Types.CompletionItemTag+ ,''Language.LSP.Protocol.Internal.Types.InsertTextFormat+ ,''Language.LSP.Protocol.Internal.Types.InsertTextMode+ ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightKind+ ,''Language.LSP.Protocol.Internal.Types.CodeActionKind+ ,''Language.LSP.Protocol.Internal.Types.TraceValue+ ,''Language.LSP.Protocol.Internal.Types.MarkupKind+ ,''Language.LSP.Protocol.Internal.Types.LanguageKind+ ,''Language.LSP.Protocol.Internal.Types.PositionEncodingKind+ ,''Language.LSP.Protocol.Internal.Types.FileChangeType+ ,''Language.LSP.Protocol.Internal.Types.WatchKind+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticSeverity+ ,''Language.LSP.Protocol.Internal.Types.DiagnosticTag+ ,''Language.LSP.Protocol.Internal.Types.CompletionTriggerKind+ ,''Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind+ ,''Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind+ ,''Language.LSP.Protocol.Internal.Types.FileOperationPatternKind+ ,''Language.LSP.Protocol.Internal.Types.NotebookCellKind+ ,''Language.LSP.Protocol.Internal.Types.ResourceOperationKind+ ,''Language.LSP.Protocol.Internal.Types.FailureHandlingKind+ ,''Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior+ ,''Language.LSP.Protocol.Internal.Types.TokenFormat]
+ generated/Language/LSP/Protocol/Internal/Method.hs view
@@ -0,0 +1,1068 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Method where++import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Kind as Kind+import qualified Data.Proxy+import qualified Data.Row as Row+import qualified Data.Void+import qualified GHC.TypeLits+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CancelParams+import qualified Language.LSP.Protocol.Internal.Types.CodeAction+import qualified Language.LSP.Protocol.Internal.Types.CodeActionParams+import qualified Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLens+import qualified Language.LSP.Protocol.Internal.Types.CodeLensParams+import qualified Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ColorInformation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentationParams+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.CompletionItem+import qualified Language.LSP.Protocol.Internal.Types.CompletionList+import qualified Language.LSP.Protocol.Internal.Types.CompletionParams+import qualified Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.CreateFilesParams+import qualified Language.LSP.Protocol.Internal.Types.Declaration+import qualified Language.LSP.Protocol.Internal.Types.DeclarationLink+import qualified Language.LSP.Protocol.Internal.Types.DeclarationParams+import qualified Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.Definition+import qualified Language.LSP.Protocol.Internal.Types.DefinitionLink+import qualified Language.LSP.Protocol.Internal.Types.DefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeleteFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlight+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLink+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbol+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRange+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.Hover+import qualified Language.LSP.Protocol.Internal.Types.HoverParams+import qualified Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationParams+import qualified Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InitializeError+import qualified Language.LSP.Protocol.Internal.Types.InitializeParams+import qualified Language.LSP.Protocol.Internal.Types.InitializeResult+import qualified Language.LSP.Protocol.Internal.Types.InitializedParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHint+import qualified Language.LSP.Protocol.Internal.Types.InlayHintParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValue+import qualified Language.LSP.Protocol.Internal.Types.InlineValueParams+import qualified Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.LogMessageParams+import qualified Language.LSP.Protocol.Internal.Types.LogTraceParams+import qualified Language.LSP.Protocol.Internal.Types.MessageActionItem+import qualified Language.LSP.Protocol.Internal.Types.Moniker+import qualified Language.LSP.Protocol.Internal.Types.MonikerParams+import qualified Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameParams+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameResult+import qualified Language.LSP.Protocol.Internal.Types.ProgressParams+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+import qualified Language.LSP.Protocol.Internal.Types.ReferenceParams+import qualified Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.RegistrationParams+import qualified Language.LSP.Protocol.Internal.Types.RenameFilesParams+import qualified Language.LSP.Protocol.Internal.Types.RenameParams+import qualified Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRange+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokens+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SetTraceParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentResult+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageParams+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelp+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SymbolInformation+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+import qualified Language.LSP.Protocol.Internal.Types.UnregistrationParams+import qualified Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Message.Meta as MM+import qualified Language.LSP.Protocol.Types.Common++-- | A type representing a LSP method (or class of methods), intended to be used mostly at the type level.+type Method :: MM.MessageDirection -> MM.MessageKind -> Kind.Type+data Method f t where + Method_TextDocumentImplementation :: Method MM.ClientToServer MM.Request+ Method_TextDocumentTypeDefinition :: Method MM.ClientToServer MM.Request+ Method_WorkspaceWorkspaceFolders :: Method MM.ServerToClient MM.Request+ Method_WorkspaceConfiguration :: Method MM.ServerToClient MM.Request+ Method_TextDocumentDocumentColor :: Method MM.ClientToServer MM.Request+ Method_TextDocumentColorPresentation :: Method MM.ClientToServer MM.Request+ Method_TextDocumentFoldingRange :: Method MM.ClientToServer MM.Request+ Method_TextDocumentDeclaration :: Method MM.ClientToServer MM.Request+ Method_TextDocumentSelectionRange :: Method MM.ClientToServer MM.Request+ Method_WindowWorkDoneProgressCreate :: Method MM.ServerToClient MM.Request+ Method_TextDocumentPrepareCallHierarchy :: Method MM.ClientToServer MM.Request+ Method_CallHierarchyIncomingCalls :: Method MM.ClientToServer MM.Request+ Method_CallHierarchyOutgoingCalls :: Method MM.ClientToServer MM.Request+ Method_TextDocumentSemanticTokensFull :: Method MM.ClientToServer MM.Request+ Method_TextDocumentSemanticTokensFullDelta :: Method MM.ClientToServer MM.Request+ Method_TextDocumentSemanticTokensRange :: Method MM.ClientToServer MM.Request+ Method_WorkspaceSemanticTokensRefresh :: Method MM.ServerToClient MM.Request+ Method_WindowShowDocument :: Method MM.ServerToClient MM.Request+ Method_TextDocumentLinkedEditingRange :: Method MM.ClientToServer MM.Request+ Method_WorkspaceWillCreateFiles :: Method MM.ClientToServer MM.Request+ Method_WorkspaceWillRenameFiles :: Method MM.ClientToServer MM.Request+ Method_WorkspaceWillDeleteFiles :: Method MM.ClientToServer MM.Request+ Method_TextDocumentMoniker :: Method MM.ClientToServer MM.Request+ Method_TextDocumentPrepareTypeHierarchy :: Method MM.ClientToServer MM.Request+ Method_TypeHierarchySupertypes :: Method MM.ClientToServer MM.Request+ Method_TypeHierarchySubtypes :: Method MM.ClientToServer MM.Request+ Method_TextDocumentInlineValue :: Method MM.ClientToServer MM.Request+ Method_WorkspaceInlineValueRefresh :: Method MM.ServerToClient MM.Request+ Method_TextDocumentInlayHint :: Method MM.ClientToServer MM.Request+ Method_InlayHintResolve :: Method MM.ClientToServer MM.Request+ Method_WorkspaceInlayHintRefresh :: Method MM.ServerToClient MM.Request+ Method_TextDocumentDiagnostic :: Method MM.ClientToServer MM.Request+ Method_WorkspaceDiagnostic :: Method MM.ClientToServer MM.Request+ Method_WorkspaceDiagnosticRefresh :: Method MM.ServerToClient MM.Request+ Method_ClientRegisterCapability :: Method MM.ServerToClient MM.Request+ Method_ClientUnregisterCapability :: Method MM.ServerToClient MM.Request+ Method_Initialize :: Method MM.ClientToServer MM.Request+ Method_Shutdown :: Method MM.ClientToServer MM.Request+ Method_WindowShowMessageRequest :: Method MM.ServerToClient MM.Request+ Method_TextDocumentWillSaveWaitUntil :: Method MM.ClientToServer MM.Request+ Method_TextDocumentCompletion :: Method MM.ClientToServer MM.Request+ Method_CompletionItemResolve :: Method MM.ClientToServer MM.Request+ Method_TextDocumentHover :: Method MM.ClientToServer MM.Request+ Method_TextDocumentSignatureHelp :: Method MM.ClientToServer MM.Request+ Method_TextDocumentDefinition :: Method MM.ClientToServer MM.Request+ Method_TextDocumentReferences :: Method MM.ClientToServer MM.Request+ Method_TextDocumentDocumentHighlight :: Method MM.ClientToServer MM.Request+ Method_TextDocumentDocumentSymbol :: Method MM.ClientToServer MM.Request+ Method_TextDocumentCodeAction :: Method MM.ClientToServer MM.Request+ Method_CodeActionResolve :: Method MM.ClientToServer MM.Request+ Method_WorkspaceSymbol :: Method MM.ClientToServer MM.Request+ Method_WorkspaceSymbolResolve :: Method MM.ClientToServer MM.Request+ Method_TextDocumentCodeLens :: Method MM.ClientToServer MM.Request+ Method_CodeLensResolve :: Method MM.ClientToServer MM.Request+ Method_WorkspaceCodeLensRefresh :: Method MM.ServerToClient MM.Request+ Method_TextDocumentDocumentLink :: Method MM.ClientToServer MM.Request+ Method_DocumentLinkResolve :: Method MM.ClientToServer MM.Request+ Method_TextDocumentFormatting :: Method MM.ClientToServer MM.Request+ Method_TextDocumentRangeFormatting :: Method MM.ClientToServer MM.Request+ Method_TextDocumentOnTypeFormatting :: Method MM.ClientToServer MM.Request+ Method_TextDocumentRename :: Method MM.ClientToServer MM.Request+ Method_TextDocumentPrepareRename :: Method MM.ClientToServer MM.Request+ Method_WorkspaceExecuteCommand :: Method MM.ClientToServer MM.Request+ Method_WorkspaceApplyEdit :: Method MM.ServerToClient MM.Request+ Method_WorkspaceDidChangeWorkspaceFolders :: Method MM.ClientToServer MM.Notification+ Method_WindowWorkDoneProgressCancel :: Method MM.ClientToServer MM.Notification+ Method_WorkspaceDidCreateFiles :: Method MM.ClientToServer MM.Notification+ Method_WorkspaceDidRenameFiles :: Method MM.ClientToServer MM.Notification+ Method_WorkspaceDidDeleteFiles :: Method MM.ClientToServer MM.Notification+ Method_NotebookDocumentDidOpen :: Method MM.ClientToServer MM.Notification+ Method_NotebookDocumentDidChange :: Method MM.ClientToServer MM.Notification+ Method_NotebookDocumentDidSave :: Method MM.ClientToServer MM.Notification+ Method_NotebookDocumentDidClose :: Method MM.ClientToServer MM.Notification+ Method_Initialized :: Method MM.ClientToServer MM.Notification+ Method_Exit :: Method MM.ClientToServer MM.Notification+ Method_WorkspaceDidChangeConfiguration :: Method MM.ClientToServer MM.Notification+ Method_WindowShowMessage :: Method MM.ServerToClient MM.Notification+ Method_WindowLogMessage :: Method MM.ServerToClient MM.Notification+ Method_TelemetryEvent :: Method MM.ServerToClient MM.Notification+ Method_TextDocumentDidOpen :: Method MM.ClientToServer MM.Notification+ Method_TextDocumentDidChange :: Method MM.ClientToServer MM.Notification+ Method_TextDocumentDidClose :: Method MM.ClientToServer MM.Notification+ Method_TextDocumentDidSave :: Method MM.ClientToServer MM.Notification+ Method_TextDocumentWillSave :: Method MM.ClientToServer MM.Notification+ Method_WorkspaceDidChangeWatchedFiles :: Method MM.ClientToServer MM.Notification+ Method_TextDocumentPublishDiagnostics :: Method MM.ServerToClient MM.Notification+ Method_SetTrace :: Method MM.ClientToServer MM.Notification+ Method_LogTrace :: Method MM.ServerToClient MM.Notification+ Method_CancelRequest :: Method f MM.Notification+ Method_Progress :: Method f MM.Notification+ Method_CustomMethod :: GHC.TypeLits.Symbol -> Method f t++-- | Maps a LSP method to its parameter type.+type MessageParams :: forall f t . Method f t -> Kind.Type+type family MessageParams (m :: Method f t) where + MessageParams Method_TextDocumentImplementation = Language.LSP.Protocol.Internal.Types.ImplementationParams.ImplementationParams+ MessageParams Method_TextDocumentTypeDefinition = Language.LSP.Protocol.Internal.Types.TypeDefinitionParams.TypeDefinitionParams+ MessageParams Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+ MessageParams Method_WorkspaceConfiguration = Language.LSP.Protocol.Internal.Types.ConfigurationParams.ConfigurationParams+ MessageParams Method_TextDocumentDocumentColor = Language.LSP.Protocol.Internal.Types.DocumentColorParams.DocumentColorParams+ MessageParams Method_TextDocumentColorPresentation = Language.LSP.Protocol.Internal.Types.ColorPresentationParams.ColorPresentationParams+ MessageParams Method_TextDocumentFoldingRange = Language.LSP.Protocol.Internal.Types.FoldingRangeParams.FoldingRangeParams+ MessageParams Method_TextDocumentDeclaration = Language.LSP.Protocol.Internal.Types.DeclarationParams.DeclarationParams+ MessageParams Method_TextDocumentSelectionRange = Language.LSP.Protocol.Internal.Types.SelectionRangeParams.SelectionRangeParams+ MessageParams Method_WindowWorkDoneProgressCreate = Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams.WorkDoneProgressCreateParams+ MessageParams Method_TextDocumentPrepareCallHierarchy = Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams.CallHierarchyPrepareParams+ MessageParams Method_CallHierarchyIncomingCalls = Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams.CallHierarchyIncomingCallsParams+ MessageParams Method_CallHierarchyOutgoingCalls = Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams.CallHierarchyOutgoingCallsParams+ MessageParams Method_TextDocumentSemanticTokensFull = Language.LSP.Protocol.Internal.Types.SemanticTokensParams.SemanticTokensParams+ MessageParams Method_TextDocumentSemanticTokensFullDelta = Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams.SemanticTokensDeltaParams+ MessageParams Method_TextDocumentSemanticTokensRange = Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams.SemanticTokensRangeParams+ MessageParams Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+ MessageParams Method_WindowShowDocument = Language.LSP.Protocol.Internal.Types.ShowDocumentParams.ShowDocumentParams+ MessageParams Method_TextDocumentLinkedEditingRange = Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams.LinkedEditingRangeParams+ MessageParams Method_WorkspaceWillCreateFiles = Language.LSP.Protocol.Internal.Types.CreateFilesParams.CreateFilesParams+ MessageParams Method_WorkspaceWillRenameFiles = Language.LSP.Protocol.Internal.Types.RenameFilesParams.RenameFilesParams+ MessageParams Method_WorkspaceWillDeleteFiles = Language.LSP.Protocol.Internal.Types.DeleteFilesParams.DeleteFilesParams+ MessageParams Method_TextDocumentMoniker = Language.LSP.Protocol.Internal.Types.MonikerParams.MonikerParams+ MessageParams Method_TextDocumentPrepareTypeHierarchy = Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams.TypeHierarchyPrepareParams+ MessageParams Method_TypeHierarchySupertypes = Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams.TypeHierarchySupertypesParams+ MessageParams Method_TypeHierarchySubtypes = Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams.TypeHierarchySubtypesParams+ MessageParams Method_TextDocumentInlineValue = Language.LSP.Protocol.Internal.Types.InlineValueParams.InlineValueParams+ MessageParams Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+ MessageParams Method_TextDocumentInlayHint = Language.LSP.Protocol.Internal.Types.InlayHintParams.InlayHintParams+ MessageParams Method_InlayHintResolve = Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint+ MessageParams Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+ MessageParams Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams.DocumentDiagnosticParams+ MessageParams Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams.WorkspaceDiagnosticParams+ MessageParams Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+ MessageParams Method_ClientRegisterCapability = Language.LSP.Protocol.Internal.Types.RegistrationParams.RegistrationParams+ MessageParams Method_ClientUnregisterCapability = Language.LSP.Protocol.Internal.Types.UnregistrationParams.UnregistrationParams+ MessageParams Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeParams.InitializeParams+ MessageParams Method_Shutdown = Maybe Data.Void.Void+ MessageParams Method_WindowShowMessageRequest = Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams.ShowMessageRequestParams+ MessageParams Method_TextDocumentWillSaveWaitUntil = Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams.WillSaveTextDocumentParams+ MessageParams Method_TextDocumentCompletion = Language.LSP.Protocol.Internal.Types.CompletionParams.CompletionParams+ MessageParams Method_CompletionItemResolve = Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem+ MessageParams Method_TextDocumentHover = Language.LSP.Protocol.Internal.Types.HoverParams.HoverParams+ MessageParams Method_TextDocumentSignatureHelp = Language.LSP.Protocol.Internal.Types.SignatureHelpParams.SignatureHelpParams+ MessageParams Method_TextDocumentDefinition = Language.LSP.Protocol.Internal.Types.DefinitionParams.DefinitionParams+ MessageParams Method_TextDocumentReferences = Language.LSP.Protocol.Internal.Types.ReferenceParams.ReferenceParams+ MessageParams Method_TextDocumentDocumentHighlight = Language.LSP.Protocol.Internal.Types.DocumentHighlightParams.DocumentHighlightParams+ MessageParams Method_TextDocumentDocumentSymbol = Language.LSP.Protocol.Internal.Types.DocumentSymbolParams.DocumentSymbolParams+ MessageParams Method_TextDocumentCodeAction = Language.LSP.Protocol.Internal.Types.CodeActionParams.CodeActionParams+ MessageParams Method_CodeActionResolve = Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction+ MessageParams Method_WorkspaceSymbol = Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams.WorkspaceSymbolParams+ MessageParams Method_WorkspaceSymbolResolve = Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol+ MessageParams Method_TextDocumentCodeLens = Language.LSP.Protocol.Internal.Types.CodeLensParams.CodeLensParams+ MessageParams Method_CodeLensResolve = Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens+ MessageParams Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+ MessageParams Method_TextDocumentDocumentLink = Language.LSP.Protocol.Internal.Types.DocumentLinkParams.DocumentLinkParams+ MessageParams Method_DocumentLinkResolve = Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink+ MessageParams Method_TextDocumentFormatting = Language.LSP.Protocol.Internal.Types.DocumentFormattingParams.DocumentFormattingParams+ MessageParams Method_TextDocumentRangeFormatting = Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams.DocumentRangeFormattingParams+ MessageParams Method_TextDocumentOnTypeFormatting = Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams.DocumentOnTypeFormattingParams+ MessageParams Method_TextDocumentRename = Language.LSP.Protocol.Internal.Types.RenameParams.RenameParams+ MessageParams Method_TextDocumentPrepareRename = Language.LSP.Protocol.Internal.Types.PrepareRenameParams.PrepareRenameParams+ MessageParams Method_WorkspaceExecuteCommand = Language.LSP.Protocol.Internal.Types.ExecuteCommandParams.ExecuteCommandParams+ MessageParams Method_WorkspaceApplyEdit = Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams.ApplyWorkspaceEditParams+ MessageParams Method_WorkspaceDidChangeWorkspaceFolders = Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams.DidChangeWorkspaceFoldersParams+ MessageParams Method_WindowWorkDoneProgressCancel = Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams.WorkDoneProgressCancelParams+ MessageParams Method_WorkspaceDidCreateFiles = Language.LSP.Protocol.Internal.Types.CreateFilesParams.CreateFilesParams+ MessageParams Method_WorkspaceDidRenameFiles = Language.LSP.Protocol.Internal.Types.RenameFilesParams.RenameFilesParams+ MessageParams Method_WorkspaceDidDeleteFiles = Language.LSP.Protocol.Internal.Types.DeleteFilesParams.DeleteFilesParams+ MessageParams Method_NotebookDocumentDidOpen = Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams.DidOpenNotebookDocumentParams+ MessageParams Method_NotebookDocumentDidChange = Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams.DidChangeNotebookDocumentParams+ MessageParams Method_NotebookDocumentDidSave = Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams.DidSaveNotebookDocumentParams+ MessageParams Method_NotebookDocumentDidClose = Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams.DidCloseNotebookDocumentParams+ MessageParams Method_Initialized = Language.LSP.Protocol.Internal.Types.InitializedParams.InitializedParams+ MessageParams Method_Exit = Maybe Data.Void.Void+ MessageParams Method_WorkspaceDidChangeConfiguration = Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams.DidChangeConfigurationParams+ MessageParams Method_WindowShowMessage = Language.LSP.Protocol.Internal.Types.ShowMessageParams.ShowMessageParams+ MessageParams Method_WindowLogMessage = Language.LSP.Protocol.Internal.Types.LogMessageParams.LogMessageParams+ MessageParams Method_TelemetryEvent = Data.Aeson.Value+ MessageParams Method_TextDocumentDidOpen = Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams.DidOpenTextDocumentParams+ MessageParams Method_TextDocumentDidChange = Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams.DidChangeTextDocumentParams+ MessageParams Method_TextDocumentDidClose = Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams.DidCloseTextDocumentParams+ MessageParams Method_TextDocumentDidSave = Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams.DidSaveTextDocumentParams+ MessageParams Method_TextDocumentWillSave = Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams.WillSaveTextDocumentParams+ MessageParams Method_WorkspaceDidChangeWatchedFiles = Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams.DidChangeWatchedFilesParams+ MessageParams Method_TextDocumentPublishDiagnostics = Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams.PublishDiagnosticsParams+ MessageParams Method_SetTrace = Language.LSP.Protocol.Internal.Types.SetTraceParams.SetTraceParams+ MessageParams Method_LogTrace = Language.LSP.Protocol.Internal.Types.LogTraceParams.LogTraceParams+ MessageParams Method_CancelRequest = Language.LSP.Protocol.Internal.Types.CancelParams.CancelParams+ MessageParams Method_Progress = Language.LSP.Protocol.Internal.Types.ProgressParams.ProgressParams+ MessageParams (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its result type.+type MessageResult :: forall f t . Method f t -> Kind.Type+type family MessageResult (m :: Method f t) where + MessageResult Method_TextDocumentImplementation = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_TextDocumentTypeDefinition = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_WorkspaceWorkspaceFolders = ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceConfiguration = [Data.Aeson.Value]+ MessageResult Method_TextDocumentDocumentColor = [Language.LSP.Protocol.Internal.Types.ColorInformation.ColorInformation]+ MessageResult Method_TextDocumentColorPresentation = [Language.LSP.Protocol.Internal.Types.ColorPresentation.ColorPresentation]+ MessageResult Method_TextDocumentFoldingRange = ([Language.LSP.Protocol.Internal.Types.FoldingRange.FoldingRange] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentDeclaration = (Language.LSP.Protocol.Internal.Types.Declaration.Declaration Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DeclarationLink.DeclarationLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_TextDocumentSelectionRange = ([Language.LSP.Protocol.Internal.Types.SelectionRange.SelectionRange] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WindowWorkDoneProgressCreate = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_TextDocumentPrepareCallHierarchy = ([Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_CallHierarchyIncomingCalls = ([Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall.CallHierarchyIncomingCall] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_CallHierarchyOutgoingCalls = ([Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall.CallHierarchyOutgoingCall] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentSemanticTokensFull = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentSemanticTokensFullDelta = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.SemanticTokensDelta.SemanticTokensDelta Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_TextDocumentSemanticTokensRange = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceSemanticTokensRefresh = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_WindowShowDocument = Language.LSP.Protocol.Internal.Types.ShowDocumentResult.ShowDocumentResult+ MessageResult Method_TextDocumentLinkedEditingRange = (Language.LSP.Protocol.Internal.Types.LinkedEditingRanges.LinkedEditingRanges Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceWillCreateFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceWillRenameFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceWillDeleteFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentMoniker = ([Language.LSP.Protocol.Internal.Types.Moniker.Moniker] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentPrepareTypeHierarchy = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TypeHierarchySupertypes = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TypeHierarchySubtypes = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentInlineValue = ([Language.LSP.Protocol.Internal.Types.InlineValue.InlineValue] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceInlineValueRefresh = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_TextDocumentInlayHint = ([Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_InlayHintResolve = Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint+ MessageResult Method_WorkspaceInlayHintRefresh = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport.DocumentDiagnosticReport+ MessageResult Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport.WorkspaceDiagnosticReport+ MessageResult Method_WorkspaceDiagnosticRefresh = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_ClientRegisterCapability = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_ClientUnregisterCapability = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeResult.InitializeResult+ MessageResult Method_Shutdown = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_WindowShowMessageRequest = (Language.LSP.Protocol.Internal.Types.MessageActionItem.MessageActionItem Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentWillSaveWaitUntil = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentCompletion = ([Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem] Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CompletionList.CompletionList Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_CompletionItemResolve = Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem+ MessageResult Method_TextDocumentHover = (Language.LSP.Protocol.Internal.Types.Hover.Hover Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentSignatureHelp = (Language.LSP.Protocol.Internal.Types.SignatureHelp.SignatureHelp Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentDefinition = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_TextDocumentReferences = ([Language.LSP.Protocol.Internal.Types.Location.Location] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentDocumentHighlight = ([Language.LSP.Protocol.Internal.Types.DocumentHighlight.DocumentHighlight] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentDocumentSymbol = ([Language.LSP.Protocol.Internal.Types.SymbolInformation.SymbolInformation] Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DocumentSymbol.DocumentSymbol] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_TextDocumentCodeAction = ([(Language.LSP.Protocol.Internal.Types.Command.Command Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction)] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_CodeActionResolve = Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction+ MessageResult Method_WorkspaceSymbol = ([Language.LSP.Protocol.Internal.Types.SymbolInformation.SymbolInformation] Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ MessageResult Method_WorkspaceSymbolResolve = Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol+ MessageResult Method_TextDocumentCodeLens = ([Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_CodeLensResolve = Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens+ MessageResult Method_WorkspaceCodeLensRefresh = Language.LSP.Protocol.Types.Common.Null+ MessageResult Method_TextDocumentDocumentLink = ([Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_DocumentLinkResolve = Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink+ MessageResult Method_TextDocumentFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentRangeFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentOnTypeFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentRename = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_TextDocumentPrepareRename = (Language.LSP.Protocol.Internal.Types.PrepareRenameResult.PrepareRenameResult Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceExecuteCommand = (Data.Aeson.Value Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ MessageResult Method_WorkspaceApplyEdit = Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult.ApplyWorkspaceEditResult+ MessageResult (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its error data type.+type ErrorData :: forall f t . Method f t -> Kind.Type+type family ErrorData (m :: Method f t) where + ErrorData Method_TextDocumentImplementation = Maybe Data.Void.Void+ ErrorData Method_TextDocumentTypeDefinition = Maybe Data.Void.Void+ ErrorData Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+ ErrorData Method_WorkspaceConfiguration = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDocumentColor = Maybe Data.Void.Void+ ErrorData Method_TextDocumentColorPresentation = Maybe Data.Void.Void+ ErrorData Method_TextDocumentFoldingRange = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDeclaration = Maybe Data.Void.Void+ ErrorData Method_TextDocumentSelectionRange = Maybe Data.Void.Void+ ErrorData Method_WindowWorkDoneProgressCreate = Maybe Data.Void.Void+ ErrorData Method_TextDocumentPrepareCallHierarchy = Maybe Data.Void.Void+ ErrorData Method_CallHierarchyIncomingCalls = Maybe Data.Void.Void+ ErrorData Method_CallHierarchyOutgoingCalls = Maybe Data.Void.Void+ ErrorData Method_TextDocumentSemanticTokensFull = Maybe Data.Void.Void+ ErrorData Method_TextDocumentSemanticTokensFullDelta = Maybe Data.Void.Void+ ErrorData Method_TextDocumentSemanticTokensRange = Maybe Data.Void.Void+ ErrorData Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+ ErrorData Method_WindowShowDocument = Maybe Data.Void.Void+ ErrorData Method_TextDocumentLinkedEditingRange = Maybe Data.Void.Void+ ErrorData Method_WorkspaceWillCreateFiles = Maybe Data.Void.Void+ ErrorData Method_WorkspaceWillRenameFiles = Maybe Data.Void.Void+ ErrorData Method_WorkspaceWillDeleteFiles = Maybe Data.Void.Void+ ErrorData Method_TextDocumentMoniker = Maybe Data.Void.Void+ ErrorData Method_TextDocumentPrepareTypeHierarchy = Maybe Data.Void.Void+ ErrorData Method_TypeHierarchySupertypes = Maybe Data.Void.Void+ ErrorData Method_TypeHierarchySubtypes = Maybe Data.Void.Void+ ErrorData Method_TextDocumentInlineValue = Maybe Data.Void.Void+ ErrorData Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+ ErrorData Method_TextDocumentInlayHint = Maybe Data.Void.Void+ ErrorData Method_InlayHintResolve = Maybe Data.Void.Void+ ErrorData Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData.DiagnosticServerCancellationData+ ErrorData Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData.DiagnosticServerCancellationData+ ErrorData Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+ ErrorData Method_ClientRegisterCapability = Maybe Data.Void.Void+ ErrorData Method_ClientUnregisterCapability = Maybe Data.Void.Void+ ErrorData Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeError.InitializeError+ ErrorData Method_Shutdown = Maybe Data.Void.Void+ ErrorData Method_WindowShowMessageRequest = Maybe Data.Void.Void+ ErrorData Method_TextDocumentWillSaveWaitUntil = Maybe Data.Void.Void+ ErrorData Method_TextDocumentCompletion = Maybe Data.Void.Void+ ErrorData Method_CompletionItemResolve = Maybe Data.Void.Void+ ErrorData Method_TextDocumentHover = Maybe Data.Void.Void+ ErrorData Method_TextDocumentSignatureHelp = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDefinition = Maybe Data.Void.Void+ ErrorData Method_TextDocumentReferences = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDocumentHighlight = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDocumentSymbol = Maybe Data.Void.Void+ ErrorData Method_TextDocumentCodeAction = Maybe Data.Void.Void+ ErrorData Method_CodeActionResolve = Maybe Data.Void.Void+ ErrorData Method_WorkspaceSymbol = Maybe Data.Void.Void+ ErrorData Method_WorkspaceSymbolResolve = Maybe Data.Void.Void+ ErrorData Method_TextDocumentCodeLens = Maybe Data.Void.Void+ ErrorData Method_CodeLensResolve = Maybe Data.Void.Void+ ErrorData Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+ ErrorData Method_TextDocumentDocumentLink = Maybe Data.Void.Void+ ErrorData Method_DocumentLinkResolve = Maybe Data.Void.Void+ ErrorData Method_TextDocumentFormatting = Maybe Data.Void.Void+ ErrorData Method_TextDocumentRangeFormatting = Maybe Data.Void.Void+ ErrorData Method_TextDocumentOnTypeFormatting = Maybe Data.Void.Void+ ErrorData Method_TextDocumentRename = Maybe Data.Void.Void+ ErrorData Method_TextDocumentPrepareRename = Maybe Data.Void.Void+ ErrorData Method_WorkspaceExecuteCommand = Maybe Data.Void.Void+ ErrorData Method_WorkspaceApplyEdit = Maybe Data.Void.Void+ ErrorData (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its registration options type.+type RegistrationOptions :: forall f t . Method f t -> Kind.Type+type family RegistrationOptions (m :: Method f t) where + RegistrationOptions Method_TextDocumentImplementation = Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions.ImplementationRegistrationOptions+ RegistrationOptions Method_TextDocumentTypeDefinition = Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions.TypeDefinitionRegistrationOptions+ RegistrationOptions Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceConfiguration = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentDocumentColor = Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions.DocumentColorRegistrationOptions+ RegistrationOptions Method_TextDocumentColorPresentation = (Row.Rec ("workDoneProgress" Row..== (Maybe Bool) Row..+ ("documentSelector" Row..== (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null) Row..+ Row.Empty)))+ RegistrationOptions Method_TextDocumentFoldingRange = Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions.FoldingRangeRegistrationOptions+ RegistrationOptions Method_TextDocumentDeclaration = Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions.DeclarationRegistrationOptions+ RegistrationOptions Method_TextDocumentSelectionRange = Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions.SelectionRangeRegistrationOptions+ RegistrationOptions Method_WindowWorkDoneProgressCreate = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentPrepareCallHierarchy = Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions.CallHierarchyRegistrationOptions+ RegistrationOptions Method_CallHierarchyIncomingCalls = Maybe Data.Void.Void+ RegistrationOptions Method_CallHierarchyOutgoingCalls = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentSemanticTokensFull = Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions+ RegistrationOptions Method_TextDocumentSemanticTokensFullDelta = Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions+ RegistrationOptions Method_TextDocumentSemanticTokensRange = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+ RegistrationOptions Method_WindowShowDocument = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentLinkedEditingRange = Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions.LinkedEditingRangeRegistrationOptions+ RegistrationOptions Method_WorkspaceWillCreateFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_WorkspaceWillRenameFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_WorkspaceWillDeleteFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_TextDocumentMoniker = Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions.MonikerRegistrationOptions+ RegistrationOptions Method_TextDocumentPrepareTypeHierarchy = Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions.TypeHierarchyRegistrationOptions+ RegistrationOptions Method_TypeHierarchySupertypes = Maybe Data.Void.Void+ RegistrationOptions Method_TypeHierarchySubtypes = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentInlineValue = Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions.InlineValueRegistrationOptions+ RegistrationOptions Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentInlayHint = Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions.InlayHintRegistrationOptions+ RegistrationOptions Method_InlayHintResolve = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions.DiagnosticRegistrationOptions+ RegistrationOptions Method_WorkspaceDiagnostic = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+ RegistrationOptions Method_ClientRegisterCapability = Maybe Data.Void.Void+ RegistrationOptions Method_ClientUnregisterCapability = Maybe Data.Void.Void+ RegistrationOptions Method_Initialize = Maybe Data.Void.Void+ RegistrationOptions Method_Shutdown = Maybe Data.Void.Void+ RegistrationOptions Method_WindowShowMessageRequest = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentWillSaveWaitUntil = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+ RegistrationOptions Method_TextDocumentCompletion = Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions.CompletionRegistrationOptions+ RegistrationOptions Method_CompletionItemResolve = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentHover = Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions.HoverRegistrationOptions+ RegistrationOptions Method_TextDocumentSignatureHelp = Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions.SignatureHelpRegistrationOptions+ RegistrationOptions Method_TextDocumentDefinition = Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions.DefinitionRegistrationOptions+ RegistrationOptions Method_TextDocumentReferences = Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions.ReferenceRegistrationOptions+ RegistrationOptions Method_TextDocumentDocumentHighlight = Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions.DocumentHighlightRegistrationOptions+ RegistrationOptions Method_TextDocumentDocumentSymbol = Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions.DocumentSymbolRegistrationOptions+ RegistrationOptions Method_TextDocumentCodeAction = Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions.CodeActionRegistrationOptions+ RegistrationOptions Method_CodeActionResolve = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceSymbol = Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions.WorkspaceSymbolRegistrationOptions+ RegistrationOptions Method_WorkspaceSymbolResolve = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentCodeLens = Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions.CodeLensRegistrationOptions+ RegistrationOptions Method_CodeLensResolve = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentDocumentLink = Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions.DocumentLinkRegistrationOptions+ RegistrationOptions Method_DocumentLinkResolve = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentFormatting = Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions.DocumentFormattingRegistrationOptions+ RegistrationOptions Method_TextDocumentRangeFormatting = Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions.DocumentRangeFormattingRegistrationOptions+ RegistrationOptions Method_TextDocumentOnTypeFormatting = Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions.DocumentOnTypeFormattingRegistrationOptions+ RegistrationOptions Method_TextDocumentRename = Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions.RenameRegistrationOptions+ RegistrationOptions Method_TextDocumentPrepareRename = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceExecuteCommand = Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions.ExecuteCommandRegistrationOptions+ RegistrationOptions Method_WorkspaceApplyEdit = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceDidChangeWorkspaceFolders = Maybe Data.Void.Void+ RegistrationOptions Method_WindowWorkDoneProgressCancel = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceDidCreateFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_WorkspaceDidRenameFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_WorkspaceDidDeleteFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+ RegistrationOptions Method_NotebookDocumentDidOpen = Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions+ RegistrationOptions Method_NotebookDocumentDidChange = Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions+ RegistrationOptions Method_NotebookDocumentDidSave = Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions+ RegistrationOptions Method_NotebookDocumentDidClose = Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions+ RegistrationOptions Method_Initialized = Maybe Data.Void.Void+ RegistrationOptions Method_Exit = Maybe Data.Void.Void+ RegistrationOptions Method_WorkspaceDidChangeConfiguration = Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions.DidChangeConfigurationRegistrationOptions+ RegistrationOptions Method_WindowShowMessage = Maybe Data.Void.Void+ RegistrationOptions Method_WindowLogMessage = Maybe Data.Void.Void+ RegistrationOptions Method_TelemetryEvent = Maybe Data.Void.Void+ RegistrationOptions Method_TextDocumentDidOpen = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+ RegistrationOptions Method_TextDocumentDidChange = Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions.TextDocumentChangeRegistrationOptions+ RegistrationOptions Method_TextDocumentDidClose = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+ RegistrationOptions Method_TextDocumentDidSave = Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions.TextDocumentSaveRegistrationOptions+ RegistrationOptions Method_TextDocumentWillSave = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+ RegistrationOptions Method_WorkspaceDidChangeWatchedFiles = Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions.DidChangeWatchedFilesRegistrationOptions+ RegistrationOptions Method_TextDocumentPublishDiagnostics = Maybe Data.Void.Void+ RegistrationOptions Method_SetTrace = Maybe Data.Void.Void+ RegistrationOptions Method_LogTrace = Maybe Data.Void.Void+ RegistrationOptions Method_CancelRequest = Maybe Data.Void.Void+ RegistrationOptions Method_Progress = Maybe Data.Void.Void+ RegistrationOptions (Method_CustomMethod s) = Data.Void.Void++-- | A singleton type for 'Method'.+type SMethod :: forall f t . Method f t -> Kind.Type+data SMethod m where + SMethod_TextDocumentImplementation :: SMethod Method_TextDocumentImplementation+ SMethod_TextDocumentTypeDefinition :: SMethod Method_TextDocumentTypeDefinition+ SMethod_WorkspaceWorkspaceFolders :: SMethod Method_WorkspaceWorkspaceFolders+ SMethod_WorkspaceConfiguration :: SMethod Method_WorkspaceConfiguration+ SMethod_TextDocumentDocumentColor :: SMethod Method_TextDocumentDocumentColor+ SMethod_TextDocumentColorPresentation :: SMethod Method_TextDocumentColorPresentation+ SMethod_TextDocumentFoldingRange :: SMethod Method_TextDocumentFoldingRange+ SMethod_TextDocumentDeclaration :: SMethod Method_TextDocumentDeclaration+ SMethod_TextDocumentSelectionRange :: SMethod Method_TextDocumentSelectionRange+ SMethod_WindowWorkDoneProgressCreate :: SMethod Method_WindowWorkDoneProgressCreate+ SMethod_TextDocumentPrepareCallHierarchy :: SMethod Method_TextDocumentPrepareCallHierarchy+ SMethod_CallHierarchyIncomingCalls :: SMethod Method_CallHierarchyIncomingCalls+ SMethod_CallHierarchyOutgoingCalls :: SMethod Method_CallHierarchyOutgoingCalls+ SMethod_TextDocumentSemanticTokensFull :: SMethod Method_TextDocumentSemanticTokensFull+ SMethod_TextDocumentSemanticTokensFullDelta :: SMethod Method_TextDocumentSemanticTokensFullDelta+ SMethod_TextDocumentSemanticTokensRange :: SMethod Method_TextDocumentSemanticTokensRange+ SMethod_WorkspaceSemanticTokensRefresh :: SMethod Method_WorkspaceSemanticTokensRefresh+ SMethod_WindowShowDocument :: SMethod Method_WindowShowDocument+ SMethod_TextDocumentLinkedEditingRange :: SMethod Method_TextDocumentLinkedEditingRange+ SMethod_WorkspaceWillCreateFiles :: SMethod Method_WorkspaceWillCreateFiles+ SMethod_WorkspaceWillRenameFiles :: SMethod Method_WorkspaceWillRenameFiles+ SMethod_WorkspaceWillDeleteFiles :: SMethod Method_WorkspaceWillDeleteFiles+ SMethod_TextDocumentMoniker :: SMethod Method_TextDocumentMoniker+ SMethod_TextDocumentPrepareTypeHierarchy :: SMethod Method_TextDocumentPrepareTypeHierarchy+ SMethod_TypeHierarchySupertypes :: SMethod Method_TypeHierarchySupertypes+ SMethod_TypeHierarchySubtypes :: SMethod Method_TypeHierarchySubtypes+ SMethod_TextDocumentInlineValue :: SMethod Method_TextDocumentInlineValue+ SMethod_WorkspaceInlineValueRefresh :: SMethod Method_WorkspaceInlineValueRefresh+ SMethod_TextDocumentInlayHint :: SMethod Method_TextDocumentInlayHint+ SMethod_InlayHintResolve :: SMethod Method_InlayHintResolve+ SMethod_WorkspaceInlayHintRefresh :: SMethod Method_WorkspaceInlayHintRefresh+ SMethod_TextDocumentDiagnostic :: SMethod Method_TextDocumentDiagnostic+ SMethod_WorkspaceDiagnostic :: SMethod Method_WorkspaceDiagnostic+ SMethod_WorkspaceDiagnosticRefresh :: SMethod Method_WorkspaceDiagnosticRefresh+ SMethod_ClientRegisterCapability :: SMethod Method_ClientRegisterCapability+ SMethod_ClientUnregisterCapability :: SMethod Method_ClientUnregisterCapability+ SMethod_Initialize :: SMethod Method_Initialize+ SMethod_Shutdown :: SMethod Method_Shutdown+ SMethod_WindowShowMessageRequest :: SMethod Method_WindowShowMessageRequest+ SMethod_TextDocumentWillSaveWaitUntil :: SMethod Method_TextDocumentWillSaveWaitUntil+ SMethod_TextDocumentCompletion :: SMethod Method_TextDocumentCompletion+ SMethod_CompletionItemResolve :: SMethod Method_CompletionItemResolve+ SMethod_TextDocumentHover :: SMethod Method_TextDocumentHover+ SMethod_TextDocumentSignatureHelp :: SMethod Method_TextDocumentSignatureHelp+ SMethod_TextDocumentDefinition :: SMethod Method_TextDocumentDefinition+ SMethod_TextDocumentReferences :: SMethod Method_TextDocumentReferences+ SMethod_TextDocumentDocumentHighlight :: SMethod Method_TextDocumentDocumentHighlight+ SMethod_TextDocumentDocumentSymbol :: SMethod Method_TextDocumentDocumentSymbol+ SMethod_TextDocumentCodeAction :: SMethod Method_TextDocumentCodeAction+ SMethod_CodeActionResolve :: SMethod Method_CodeActionResolve+ SMethod_WorkspaceSymbol :: SMethod Method_WorkspaceSymbol+ SMethod_WorkspaceSymbolResolve :: SMethod Method_WorkspaceSymbolResolve+ SMethod_TextDocumentCodeLens :: SMethod Method_TextDocumentCodeLens+ SMethod_CodeLensResolve :: SMethod Method_CodeLensResolve+ SMethod_WorkspaceCodeLensRefresh :: SMethod Method_WorkspaceCodeLensRefresh+ SMethod_TextDocumentDocumentLink :: SMethod Method_TextDocumentDocumentLink+ SMethod_DocumentLinkResolve :: SMethod Method_DocumentLinkResolve+ SMethod_TextDocumentFormatting :: SMethod Method_TextDocumentFormatting+ SMethod_TextDocumentRangeFormatting :: SMethod Method_TextDocumentRangeFormatting+ SMethod_TextDocumentOnTypeFormatting :: SMethod Method_TextDocumentOnTypeFormatting+ SMethod_TextDocumentRename :: SMethod Method_TextDocumentRename+ SMethod_TextDocumentPrepareRename :: SMethod Method_TextDocumentPrepareRename+ SMethod_WorkspaceExecuteCommand :: SMethod Method_WorkspaceExecuteCommand+ SMethod_WorkspaceApplyEdit :: SMethod Method_WorkspaceApplyEdit+ SMethod_WorkspaceDidChangeWorkspaceFolders :: SMethod Method_WorkspaceDidChangeWorkspaceFolders+ SMethod_WindowWorkDoneProgressCancel :: SMethod Method_WindowWorkDoneProgressCancel+ SMethod_WorkspaceDidCreateFiles :: SMethod Method_WorkspaceDidCreateFiles+ SMethod_WorkspaceDidRenameFiles :: SMethod Method_WorkspaceDidRenameFiles+ SMethod_WorkspaceDidDeleteFiles :: SMethod Method_WorkspaceDidDeleteFiles+ SMethod_NotebookDocumentDidOpen :: SMethod Method_NotebookDocumentDidOpen+ SMethod_NotebookDocumentDidChange :: SMethod Method_NotebookDocumentDidChange+ SMethod_NotebookDocumentDidSave :: SMethod Method_NotebookDocumentDidSave+ SMethod_NotebookDocumentDidClose :: SMethod Method_NotebookDocumentDidClose+ SMethod_Initialized :: SMethod Method_Initialized+ SMethod_Exit :: SMethod Method_Exit+ SMethod_WorkspaceDidChangeConfiguration :: SMethod Method_WorkspaceDidChangeConfiguration+ SMethod_WindowShowMessage :: SMethod Method_WindowShowMessage+ SMethod_WindowLogMessage :: SMethod Method_WindowLogMessage+ SMethod_TelemetryEvent :: SMethod Method_TelemetryEvent+ SMethod_TextDocumentDidOpen :: SMethod Method_TextDocumentDidOpen+ SMethod_TextDocumentDidChange :: SMethod Method_TextDocumentDidChange+ SMethod_TextDocumentDidClose :: SMethod Method_TextDocumentDidClose+ SMethod_TextDocumentDidSave :: SMethod Method_TextDocumentDidSave+ SMethod_TextDocumentWillSave :: SMethod Method_TextDocumentWillSave+ SMethod_WorkspaceDidChangeWatchedFiles :: SMethod Method_WorkspaceDidChangeWatchedFiles+ SMethod_TextDocumentPublishDiagnostics :: SMethod Method_TextDocumentPublishDiagnostics+ SMethod_SetTrace :: SMethod Method_SetTrace+ SMethod_LogTrace :: SMethod Method_LogTrace+ SMethod_CancelRequest :: SMethod Method_CancelRequest+ SMethod_Progress :: SMethod Method_Progress+ SMethod_CustomMethod :: forall s . GHC.TypeLits.KnownSymbol s => Data.Proxy.Proxy s -> SMethod (Method_CustomMethod s)++-- | A method which isn't statically known.+data SomeMethod where + SomeMethod :: forall m . SMethod m -> SomeMethod++-- | Turn a 'SomeMethod' into its LSP method string.+someMethodToMethodString :: SomeMethod -> String+someMethodToMethodString (SomeMethod SMethod_TextDocumentImplementation) = "textDocument/implementation"+someMethodToMethodString (SomeMethod SMethod_TextDocumentTypeDefinition) = "textDocument/typeDefinition"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWorkspaceFolders) = "workspace/workspaceFolders"+someMethodToMethodString (SomeMethod SMethod_WorkspaceConfiguration) = "workspace/configuration"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentColor) = "textDocument/documentColor"+someMethodToMethodString (SomeMethod SMethod_TextDocumentColorPresentation) = "textDocument/colorPresentation"+someMethodToMethodString (SomeMethod SMethod_TextDocumentFoldingRange) = "textDocument/foldingRange"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDeclaration) = "textDocument/declaration"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSelectionRange) = "textDocument/selectionRange"+someMethodToMethodString (SomeMethod SMethod_WindowWorkDoneProgressCreate) = "window/workDoneProgress/create"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareCallHierarchy) = "textDocument/prepareCallHierarchy"+someMethodToMethodString (SomeMethod SMethod_CallHierarchyIncomingCalls) = "callHierarchy/incomingCalls"+someMethodToMethodString (SomeMethod SMethod_CallHierarchyOutgoingCalls) = "callHierarchy/outgoingCalls"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensFull) = "textDocument/semanticTokens/full"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensFullDelta) = "textDocument/semanticTokens/full/delta"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensRange) = "textDocument/semanticTokens/range"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSemanticTokensRefresh) = "workspace/semanticTokens/refresh"+someMethodToMethodString (SomeMethod SMethod_WindowShowDocument) = "window/showDocument"+someMethodToMethodString (SomeMethod SMethod_TextDocumentLinkedEditingRange) = "textDocument/linkedEditingRange"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillCreateFiles) = "workspace/willCreateFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillRenameFiles) = "workspace/willRenameFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillDeleteFiles) = "workspace/willDeleteFiles"+someMethodToMethodString (SomeMethod SMethod_TextDocumentMoniker) = "textDocument/moniker"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareTypeHierarchy) = "textDocument/prepareTypeHierarchy"+someMethodToMethodString (SomeMethod SMethod_TypeHierarchySupertypes) = "typeHierarchy/supertypes"+someMethodToMethodString (SomeMethod SMethod_TypeHierarchySubtypes) = "typeHierarchy/subtypes"+someMethodToMethodString (SomeMethod SMethod_TextDocumentInlineValue) = "textDocument/inlineValue"+someMethodToMethodString (SomeMethod SMethod_WorkspaceInlineValueRefresh) = "workspace/inlineValue/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentInlayHint) = "textDocument/inlayHint"+someMethodToMethodString (SomeMethod SMethod_InlayHintResolve) = "inlayHint/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceInlayHintRefresh) = "workspace/inlayHint/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDiagnostic) = "textDocument/diagnostic"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDiagnostic) = "workspace/diagnostic"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDiagnosticRefresh) = "workspace/diagnostic/refresh"+someMethodToMethodString (SomeMethod SMethod_ClientRegisterCapability) = "client/registerCapability"+someMethodToMethodString (SomeMethod SMethod_ClientUnregisterCapability) = "client/unregisterCapability"+someMethodToMethodString (SomeMethod SMethod_Initialize) = "initialize"+someMethodToMethodString (SomeMethod SMethod_Shutdown) = "shutdown"+someMethodToMethodString (SomeMethod SMethod_WindowShowMessageRequest) = "window/showMessageRequest"+someMethodToMethodString (SomeMethod SMethod_TextDocumentWillSaveWaitUntil) = "textDocument/willSaveWaitUntil"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCompletion) = "textDocument/completion"+someMethodToMethodString (SomeMethod SMethod_CompletionItemResolve) = "completionItem/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentHover) = "textDocument/hover"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSignatureHelp) = "textDocument/signatureHelp"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDefinition) = "textDocument/definition"+someMethodToMethodString (SomeMethod SMethod_TextDocumentReferences) = "textDocument/references"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentHighlight) = "textDocument/documentHighlight"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentSymbol) = "textDocument/documentSymbol"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCodeAction) = "textDocument/codeAction"+someMethodToMethodString (SomeMethod SMethod_CodeActionResolve) = "codeAction/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSymbol) = "workspace/symbol"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSymbolResolve) = "workspaceSymbol/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCodeLens) = "textDocument/codeLens"+someMethodToMethodString (SomeMethod SMethod_CodeLensResolve) = "codeLens/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceCodeLensRefresh) = "workspace/codeLens/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentLink) = "textDocument/documentLink"+someMethodToMethodString (SomeMethod SMethod_DocumentLinkResolve) = "documentLink/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentFormatting) = "textDocument/formatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentRangeFormatting) = "textDocument/rangeFormatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentOnTypeFormatting) = "textDocument/onTypeFormatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentRename) = "textDocument/rename"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareRename) = "textDocument/prepareRename"+someMethodToMethodString (SomeMethod SMethod_WorkspaceExecuteCommand) = "workspace/executeCommand"+someMethodToMethodString (SomeMethod SMethod_WorkspaceApplyEdit) = "workspace/applyEdit"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeWorkspaceFolders) = "workspace/didChangeWorkspaceFolders"+someMethodToMethodString (SomeMethod SMethod_WindowWorkDoneProgressCancel) = "window/workDoneProgress/cancel"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidCreateFiles) = "workspace/didCreateFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidRenameFiles) = "workspace/didRenameFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidDeleteFiles) = "workspace/didDeleteFiles"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidOpen) = "notebookDocument/didOpen"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidChange) = "notebookDocument/didChange"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidSave) = "notebookDocument/didSave"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidClose) = "notebookDocument/didClose"+someMethodToMethodString (SomeMethod SMethod_Initialized) = "initialized"+someMethodToMethodString (SomeMethod SMethod_Exit) = "exit"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeConfiguration) = "workspace/didChangeConfiguration"+someMethodToMethodString (SomeMethod SMethod_WindowShowMessage) = "window/showMessage"+someMethodToMethodString (SomeMethod SMethod_WindowLogMessage) = "window/logMessage"+someMethodToMethodString (SomeMethod SMethod_TelemetryEvent) = "telemetry/event"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidOpen) = "textDocument/didOpen"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidChange) = "textDocument/didChange"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidClose) = "textDocument/didClose"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidSave) = "textDocument/didSave"+someMethodToMethodString (SomeMethod SMethod_TextDocumentWillSave) = "textDocument/willSave"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeWatchedFiles) = "workspace/didChangeWatchedFiles"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPublishDiagnostics) = "textDocument/publishDiagnostics"+someMethodToMethodString (SomeMethod SMethod_SetTrace) = "$/setTrace"+someMethodToMethodString (SomeMethod SMethod_LogTrace) = "$/logTrace"+someMethodToMethodString (SomeMethod SMethod_CancelRequest) = "$/cancelRequest"+someMethodToMethodString (SomeMethod SMethod_Progress) = "$/progress"+someMethodToMethodString (SomeMethod (SMethod_CustomMethod v)) = GHC.TypeLits.symbolVal v++-- | Turn a LSP method string into a 'SomeMethod'.+methodStringToSomeMethod :: String -> SomeMethod+methodStringToSomeMethod "textDocument/implementation" = SomeMethod SMethod_TextDocumentImplementation+methodStringToSomeMethod "textDocument/typeDefinition" = SomeMethod SMethod_TextDocumentTypeDefinition+methodStringToSomeMethod "workspace/workspaceFolders" = SomeMethod SMethod_WorkspaceWorkspaceFolders+methodStringToSomeMethod "workspace/configuration" = SomeMethod SMethod_WorkspaceConfiguration+methodStringToSomeMethod "textDocument/documentColor" = SomeMethod SMethod_TextDocumentDocumentColor+methodStringToSomeMethod "textDocument/colorPresentation" = SomeMethod SMethod_TextDocumentColorPresentation+methodStringToSomeMethod "textDocument/foldingRange" = SomeMethod SMethod_TextDocumentFoldingRange+methodStringToSomeMethod "textDocument/declaration" = SomeMethod SMethod_TextDocumentDeclaration+methodStringToSomeMethod "textDocument/selectionRange" = SomeMethod SMethod_TextDocumentSelectionRange+methodStringToSomeMethod "window/workDoneProgress/create" = SomeMethod SMethod_WindowWorkDoneProgressCreate+methodStringToSomeMethod "textDocument/prepareCallHierarchy" = SomeMethod SMethod_TextDocumentPrepareCallHierarchy+methodStringToSomeMethod "callHierarchy/incomingCalls" = SomeMethod SMethod_CallHierarchyIncomingCalls+methodStringToSomeMethod "callHierarchy/outgoingCalls" = SomeMethod SMethod_CallHierarchyOutgoingCalls+methodStringToSomeMethod "textDocument/semanticTokens/full" = SomeMethod SMethod_TextDocumentSemanticTokensFull+methodStringToSomeMethod "textDocument/semanticTokens/full/delta" = SomeMethod SMethod_TextDocumentSemanticTokensFullDelta+methodStringToSomeMethod "textDocument/semanticTokens/range" = SomeMethod SMethod_TextDocumentSemanticTokensRange+methodStringToSomeMethod "workspace/semanticTokens/refresh" = SomeMethod SMethod_WorkspaceSemanticTokensRefresh+methodStringToSomeMethod "window/showDocument" = SomeMethod SMethod_WindowShowDocument+methodStringToSomeMethod "textDocument/linkedEditingRange" = SomeMethod SMethod_TextDocumentLinkedEditingRange+methodStringToSomeMethod "workspace/willCreateFiles" = SomeMethod SMethod_WorkspaceWillCreateFiles+methodStringToSomeMethod "workspace/willRenameFiles" = SomeMethod SMethod_WorkspaceWillRenameFiles+methodStringToSomeMethod "workspace/willDeleteFiles" = SomeMethod SMethod_WorkspaceWillDeleteFiles+methodStringToSomeMethod "textDocument/moniker" = SomeMethod SMethod_TextDocumentMoniker+methodStringToSomeMethod "textDocument/prepareTypeHierarchy" = SomeMethod SMethod_TextDocumentPrepareTypeHierarchy+methodStringToSomeMethod "typeHierarchy/supertypes" = SomeMethod SMethod_TypeHierarchySupertypes+methodStringToSomeMethod "typeHierarchy/subtypes" = SomeMethod SMethod_TypeHierarchySubtypes+methodStringToSomeMethod "textDocument/inlineValue" = SomeMethod SMethod_TextDocumentInlineValue+methodStringToSomeMethod "workspace/inlineValue/refresh" = SomeMethod SMethod_WorkspaceInlineValueRefresh+methodStringToSomeMethod "textDocument/inlayHint" = SomeMethod SMethod_TextDocumentInlayHint+methodStringToSomeMethod "inlayHint/resolve" = SomeMethod SMethod_InlayHintResolve+methodStringToSomeMethod "workspace/inlayHint/refresh" = SomeMethod SMethod_WorkspaceInlayHintRefresh+methodStringToSomeMethod "textDocument/diagnostic" = SomeMethod SMethod_TextDocumentDiagnostic+methodStringToSomeMethod "workspace/diagnostic" = SomeMethod SMethod_WorkspaceDiagnostic+methodStringToSomeMethod "workspace/diagnostic/refresh" = SomeMethod SMethod_WorkspaceDiagnosticRefresh+methodStringToSomeMethod "client/registerCapability" = SomeMethod SMethod_ClientRegisterCapability+methodStringToSomeMethod "client/unregisterCapability" = SomeMethod SMethod_ClientUnregisterCapability+methodStringToSomeMethod "initialize" = SomeMethod SMethod_Initialize+methodStringToSomeMethod "shutdown" = SomeMethod SMethod_Shutdown+methodStringToSomeMethod "window/showMessageRequest" = SomeMethod SMethod_WindowShowMessageRequest+methodStringToSomeMethod "textDocument/willSaveWaitUntil" = SomeMethod SMethod_TextDocumentWillSaveWaitUntil+methodStringToSomeMethod "textDocument/completion" = SomeMethod SMethod_TextDocumentCompletion+methodStringToSomeMethod "completionItem/resolve" = SomeMethod SMethod_CompletionItemResolve+methodStringToSomeMethod "textDocument/hover" = SomeMethod SMethod_TextDocumentHover+methodStringToSomeMethod "textDocument/signatureHelp" = SomeMethod SMethod_TextDocumentSignatureHelp+methodStringToSomeMethod "textDocument/definition" = SomeMethod SMethod_TextDocumentDefinition+methodStringToSomeMethod "textDocument/references" = SomeMethod SMethod_TextDocumentReferences+methodStringToSomeMethod "textDocument/documentHighlight" = SomeMethod SMethod_TextDocumentDocumentHighlight+methodStringToSomeMethod "textDocument/documentSymbol" = SomeMethod SMethod_TextDocumentDocumentSymbol+methodStringToSomeMethod "textDocument/codeAction" = SomeMethod SMethod_TextDocumentCodeAction+methodStringToSomeMethod "codeAction/resolve" = SomeMethod SMethod_CodeActionResolve+methodStringToSomeMethod "workspace/symbol" = SomeMethod SMethod_WorkspaceSymbol+methodStringToSomeMethod "workspaceSymbol/resolve" = SomeMethod SMethod_WorkspaceSymbolResolve+methodStringToSomeMethod "textDocument/codeLens" = SomeMethod SMethod_TextDocumentCodeLens+methodStringToSomeMethod "codeLens/resolve" = SomeMethod SMethod_CodeLensResolve+methodStringToSomeMethod "workspace/codeLens/refresh" = SomeMethod SMethod_WorkspaceCodeLensRefresh+methodStringToSomeMethod "textDocument/documentLink" = SomeMethod SMethod_TextDocumentDocumentLink+methodStringToSomeMethod "documentLink/resolve" = SomeMethod SMethod_DocumentLinkResolve+methodStringToSomeMethod "textDocument/formatting" = SomeMethod SMethod_TextDocumentFormatting+methodStringToSomeMethod "textDocument/rangeFormatting" = SomeMethod SMethod_TextDocumentRangeFormatting+methodStringToSomeMethod "textDocument/onTypeFormatting" = SomeMethod SMethod_TextDocumentOnTypeFormatting+methodStringToSomeMethod "textDocument/rename" = SomeMethod SMethod_TextDocumentRename+methodStringToSomeMethod "textDocument/prepareRename" = SomeMethod SMethod_TextDocumentPrepareRename+methodStringToSomeMethod "workspace/executeCommand" = SomeMethod SMethod_WorkspaceExecuteCommand+methodStringToSomeMethod "workspace/applyEdit" = SomeMethod SMethod_WorkspaceApplyEdit+methodStringToSomeMethod "workspace/didChangeWorkspaceFolders" = SomeMethod SMethod_WorkspaceDidChangeWorkspaceFolders+methodStringToSomeMethod "window/workDoneProgress/cancel" = SomeMethod SMethod_WindowWorkDoneProgressCancel+methodStringToSomeMethod "workspace/didCreateFiles" = SomeMethod SMethod_WorkspaceDidCreateFiles+methodStringToSomeMethod "workspace/didRenameFiles" = SomeMethod SMethod_WorkspaceDidRenameFiles+methodStringToSomeMethod "workspace/didDeleteFiles" = SomeMethod SMethod_WorkspaceDidDeleteFiles+methodStringToSomeMethod "notebookDocument/didOpen" = SomeMethod SMethod_NotebookDocumentDidOpen+methodStringToSomeMethod "notebookDocument/didChange" = SomeMethod SMethod_NotebookDocumentDidChange+methodStringToSomeMethod "notebookDocument/didSave" = SomeMethod SMethod_NotebookDocumentDidSave+methodStringToSomeMethod "notebookDocument/didClose" = SomeMethod SMethod_NotebookDocumentDidClose+methodStringToSomeMethod "initialized" = SomeMethod SMethod_Initialized+methodStringToSomeMethod "exit" = SomeMethod SMethod_Exit+methodStringToSomeMethod "workspace/didChangeConfiguration" = SomeMethod SMethod_WorkspaceDidChangeConfiguration+methodStringToSomeMethod "window/showMessage" = SomeMethod SMethod_WindowShowMessage+methodStringToSomeMethod "window/logMessage" = SomeMethod SMethod_WindowLogMessage+methodStringToSomeMethod "telemetry/event" = SomeMethod SMethod_TelemetryEvent+methodStringToSomeMethod "textDocument/didOpen" = SomeMethod SMethod_TextDocumentDidOpen+methodStringToSomeMethod "textDocument/didChange" = SomeMethod SMethod_TextDocumentDidChange+methodStringToSomeMethod "textDocument/didClose" = SomeMethod SMethod_TextDocumentDidClose+methodStringToSomeMethod "textDocument/didSave" = SomeMethod SMethod_TextDocumentDidSave+methodStringToSomeMethod "textDocument/willSave" = SomeMethod SMethod_TextDocumentWillSave+methodStringToSomeMethod "workspace/didChangeWatchedFiles" = SomeMethod SMethod_WorkspaceDidChangeWatchedFiles+methodStringToSomeMethod "textDocument/publishDiagnostics" = SomeMethod SMethod_TextDocumentPublishDiagnostics+methodStringToSomeMethod "$/setTrace" = SomeMethod SMethod_SetTrace+methodStringToSomeMethod "$/logTrace" = SomeMethod SMethod_LogTrace+methodStringToSomeMethod "$/cancelRequest" = SomeMethod SMethod_CancelRequest+methodStringToSomeMethod "$/progress" = SomeMethod SMethod_Progress+methodStringToSomeMethod v = case GHC.TypeLits.someSymbolVal v of { GHC.TypeLits.SomeSymbol p -> SomeMethod (SMethod_CustomMethod p) ; }++-- | Get a singleton witness for the message direction of a 'SMethod'.+messageDirection :: forall f t (m :: Method f t) . SMethod m -> MM.SMessageDirection f+messageDirection SMethod_TextDocumentImplementation = MM.SClientToServer+messageDirection SMethod_TextDocumentTypeDefinition = MM.SClientToServer+messageDirection SMethod_WorkspaceWorkspaceFolders = MM.SServerToClient+messageDirection SMethod_WorkspaceConfiguration = MM.SServerToClient+messageDirection SMethod_TextDocumentDocumentColor = MM.SClientToServer+messageDirection SMethod_TextDocumentColorPresentation = MM.SClientToServer+messageDirection SMethod_TextDocumentFoldingRange = MM.SClientToServer+messageDirection SMethod_TextDocumentDeclaration = MM.SClientToServer+messageDirection SMethod_TextDocumentSelectionRange = MM.SClientToServer+messageDirection SMethod_WindowWorkDoneProgressCreate = MM.SServerToClient+messageDirection SMethod_TextDocumentPrepareCallHierarchy = MM.SClientToServer+messageDirection SMethod_CallHierarchyIncomingCalls = MM.SClientToServer+messageDirection SMethod_CallHierarchyOutgoingCalls = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensFull = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensFullDelta = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensRange = MM.SClientToServer+messageDirection SMethod_WorkspaceSemanticTokensRefresh = MM.SServerToClient+messageDirection SMethod_WindowShowDocument = MM.SServerToClient+messageDirection SMethod_TextDocumentLinkedEditingRange = MM.SClientToServer+messageDirection SMethod_WorkspaceWillCreateFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceWillRenameFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceWillDeleteFiles = MM.SClientToServer+messageDirection SMethod_TextDocumentMoniker = MM.SClientToServer+messageDirection SMethod_TextDocumentPrepareTypeHierarchy = MM.SClientToServer+messageDirection SMethod_TypeHierarchySupertypes = MM.SClientToServer+messageDirection SMethod_TypeHierarchySubtypes = MM.SClientToServer+messageDirection SMethod_TextDocumentInlineValue = MM.SClientToServer+messageDirection SMethod_WorkspaceInlineValueRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentInlayHint = MM.SClientToServer+messageDirection SMethod_InlayHintResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceInlayHintRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentDiagnostic = MM.SClientToServer+messageDirection SMethod_WorkspaceDiagnostic = MM.SClientToServer+messageDirection SMethod_WorkspaceDiagnosticRefresh = MM.SServerToClient+messageDirection SMethod_ClientRegisterCapability = MM.SServerToClient+messageDirection SMethod_ClientUnregisterCapability = MM.SServerToClient+messageDirection SMethod_Initialize = MM.SClientToServer+messageDirection SMethod_Shutdown = MM.SClientToServer+messageDirection SMethod_WindowShowMessageRequest = MM.SServerToClient+messageDirection SMethod_TextDocumentWillSaveWaitUntil = MM.SClientToServer+messageDirection SMethod_TextDocumentCompletion = MM.SClientToServer+messageDirection SMethod_CompletionItemResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentHover = MM.SClientToServer+messageDirection SMethod_TextDocumentSignatureHelp = MM.SClientToServer+messageDirection SMethod_TextDocumentDefinition = MM.SClientToServer+messageDirection SMethod_TextDocumentReferences = MM.SClientToServer+messageDirection SMethod_TextDocumentDocumentHighlight = MM.SClientToServer+messageDirection SMethod_TextDocumentDocumentSymbol = MM.SClientToServer+messageDirection SMethod_TextDocumentCodeAction = MM.SClientToServer+messageDirection SMethod_CodeActionResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceSymbol = MM.SClientToServer+messageDirection SMethod_WorkspaceSymbolResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentCodeLens = MM.SClientToServer+messageDirection SMethod_CodeLensResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceCodeLensRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentDocumentLink = MM.SClientToServer+messageDirection SMethod_DocumentLinkResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentRangeFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentOnTypeFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentRename = MM.SClientToServer+messageDirection SMethod_TextDocumentPrepareRename = MM.SClientToServer+messageDirection SMethod_WorkspaceExecuteCommand = MM.SClientToServer+messageDirection SMethod_WorkspaceApplyEdit = MM.SServerToClient+messageDirection SMethod_WorkspaceDidChangeWorkspaceFolders = MM.SClientToServer+messageDirection SMethod_WindowWorkDoneProgressCancel = MM.SClientToServer+messageDirection SMethod_WorkspaceDidCreateFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceDidRenameFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceDidDeleteFiles = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidOpen = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidChange = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidSave = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidClose = MM.SClientToServer+messageDirection SMethod_Initialized = MM.SClientToServer+messageDirection SMethod_Exit = MM.SClientToServer+messageDirection SMethod_WorkspaceDidChangeConfiguration = MM.SClientToServer+messageDirection SMethod_WindowShowMessage = MM.SServerToClient+messageDirection SMethod_WindowLogMessage = MM.SServerToClient+messageDirection SMethod_TelemetryEvent = MM.SServerToClient+messageDirection SMethod_TextDocumentDidOpen = MM.SClientToServer+messageDirection SMethod_TextDocumentDidChange = MM.SClientToServer+messageDirection SMethod_TextDocumentDidClose = MM.SClientToServer+messageDirection SMethod_TextDocumentDidSave = MM.SClientToServer+messageDirection SMethod_TextDocumentWillSave = MM.SClientToServer+messageDirection SMethod_WorkspaceDidChangeWatchedFiles = MM.SClientToServer+messageDirection SMethod_TextDocumentPublishDiagnostics = MM.SServerToClient+messageDirection SMethod_SetTrace = MM.SClientToServer+messageDirection SMethod_LogTrace = MM.SServerToClient+messageDirection SMethod_CancelRequest = MM.SBothDirections+messageDirection SMethod_Progress = MM.SBothDirections+messageDirection (SMethod_CustomMethod _) = MM.SBothDirections++-- | Get a singleton witness for the message kind of a 'SMethod'.+messageKind :: forall f t (m :: Method f t) . SMethod m -> MM.SMessageKind t+messageKind SMethod_TextDocumentImplementation = MM.SRequest+messageKind SMethod_TextDocumentTypeDefinition = MM.SRequest+messageKind SMethod_WorkspaceWorkspaceFolders = MM.SRequest+messageKind SMethod_WorkspaceConfiguration = MM.SRequest+messageKind SMethod_TextDocumentDocumentColor = MM.SRequest+messageKind SMethod_TextDocumentColorPresentation = MM.SRequest+messageKind SMethod_TextDocumentFoldingRange = MM.SRequest+messageKind SMethod_TextDocumentDeclaration = MM.SRequest+messageKind SMethod_TextDocumentSelectionRange = MM.SRequest+messageKind SMethod_WindowWorkDoneProgressCreate = MM.SRequest+messageKind SMethod_TextDocumentPrepareCallHierarchy = MM.SRequest+messageKind SMethod_CallHierarchyIncomingCalls = MM.SRequest+messageKind SMethod_CallHierarchyOutgoingCalls = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensFull = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensFullDelta = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensRange = MM.SRequest+messageKind SMethod_WorkspaceSemanticTokensRefresh = MM.SRequest+messageKind SMethod_WindowShowDocument = MM.SRequest+messageKind SMethod_TextDocumentLinkedEditingRange = MM.SRequest+messageKind SMethod_WorkspaceWillCreateFiles = MM.SRequest+messageKind SMethod_WorkspaceWillRenameFiles = MM.SRequest+messageKind SMethod_WorkspaceWillDeleteFiles = MM.SRequest+messageKind SMethod_TextDocumentMoniker = MM.SRequest+messageKind SMethod_TextDocumentPrepareTypeHierarchy = MM.SRequest+messageKind SMethod_TypeHierarchySupertypes = MM.SRequest+messageKind SMethod_TypeHierarchySubtypes = MM.SRequest+messageKind SMethod_TextDocumentInlineValue = MM.SRequest+messageKind SMethod_WorkspaceInlineValueRefresh = MM.SRequest+messageKind SMethod_TextDocumentInlayHint = MM.SRequest+messageKind SMethod_InlayHintResolve = MM.SRequest+messageKind SMethod_WorkspaceInlayHintRefresh = MM.SRequest+messageKind SMethod_TextDocumentDiagnostic = MM.SRequest+messageKind SMethod_WorkspaceDiagnostic = MM.SRequest+messageKind SMethod_WorkspaceDiagnosticRefresh = MM.SRequest+messageKind SMethod_ClientRegisterCapability = MM.SRequest+messageKind SMethod_ClientUnregisterCapability = MM.SRequest+messageKind SMethod_Initialize = MM.SRequest+messageKind SMethod_Shutdown = MM.SRequest+messageKind SMethod_WindowShowMessageRequest = MM.SRequest+messageKind SMethod_TextDocumentWillSaveWaitUntil = MM.SRequest+messageKind SMethod_TextDocumentCompletion = MM.SRequest+messageKind SMethod_CompletionItemResolve = MM.SRequest+messageKind SMethod_TextDocumentHover = MM.SRequest+messageKind SMethod_TextDocumentSignatureHelp = MM.SRequest+messageKind SMethod_TextDocumentDefinition = MM.SRequest+messageKind SMethod_TextDocumentReferences = MM.SRequest+messageKind SMethod_TextDocumentDocumentHighlight = MM.SRequest+messageKind SMethod_TextDocumentDocumentSymbol = MM.SRequest+messageKind SMethod_TextDocumentCodeAction = MM.SRequest+messageKind SMethod_CodeActionResolve = MM.SRequest+messageKind SMethod_WorkspaceSymbol = MM.SRequest+messageKind SMethod_WorkspaceSymbolResolve = MM.SRequest+messageKind SMethod_TextDocumentCodeLens = MM.SRequest+messageKind SMethod_CodeLensResolve = MM.SRequest+messageKind SMethod_WorkspaceCodeLensRefresh = MM.SRequest+messageKind SMethod_TextDocumentDocumentLink = MM.SRequest+messageKind SMethod_DocumentLinkResolve = MM.SRequest+messageKind SMethod_TextDocumentFormatting = MM.SRequest+messageKind SMethod_TextDocumentRangeFormatting = MM.SRequest+messageKind SMethod_TextDocumentOnTypeFormatting = MM.SRequest+messageKind SMethod_TextDocumentRename = MM.SRequest+messageKind SMethod_TextDocumentPrepareRename = MM.SRequest+messageKind SMethod_WorkspaceExecuteCommand = MM.SRequest+messageKind SMethod_WorkspaceApplyEdit = MM.SRequest+messageKind SMethod_WorkspaceDidChangeWorkspaceFolders = MM.SNotification+messageKind SMethod_WindowWorkDoneProgressCancel = MM.SNotification+messageKind SMethod_WorkspaceDidCreateFiles = MM.SNotification+messageKind SMethod_WorkspaceDidRenameFiles = MM.SNotification+messageKind SMethod_WorkspaceDidDeleteFiles = MM.SNotification+messageKind SMethod_NotebookDocumentDidOpen = MM.SNotification+messageKind SMethod_NotebookDocumentDidChange = MM.SNotification+messageKind SMethod_NotebookDocumentDidSave = MM.SNotification+messageKind SMethod_NotebookDocumentDidClose = MM.SNotification+messageKind SMethod_Initialized = MM.SNotification+messageKind SMethod_Exit = MM.SNotification+messageKind SMethod_WorkspaceDidChangeConfiguration = MM.SNotification+messageKind SMethod_WindowShowMessage = MM.SNotification+messageKind SMethod_WindowLogMessage = MM.SNotification+messageKind SMethod_TelemetryEvent = MM.SNotification+messageKind SMethod_TextDocumentDidOpen = MM.SNotification+messageKind SMethod_TextDocumentDidChange = MM.SNotification+messageKind SMethod_TextDocumentDidClose = MM.SNotification+messageKind SMethod_TextDocumentDidSave = MM.SNotification+messageKind SMethod_TextDocumentWillSave = MM.SNotification+messageKind SMethod_WorkspaceDidChangeWatchedFiles = MM.SNotification+messageKind SMethod_TextDocumentPublishDiagnostics = MM.SNotification+messageKind SMethod_SetTrace = MM.SNotification+messageKind SMethod_LogTrace = MM.SNotification+messageKind SMethod_CancelRequest = MM.SNotification+messageKind SMethod_Progress = MM.SNotification+messageKind (SMethod_CustomMethod _) = MM.SBothTypes
+ generated/Language/LSP/Protocol/Internal/Types.hs view
@@ -0,0 +1,429 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types (module Export) where++import Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit as Export+import Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams as Export+import Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult as Export+import Language.LSP.Protocol.Internal.Types.BaseSymbolInformation as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyItem as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOptions as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CancelParams as Export+import Language.LSP.Protocol.Internal.Types.ChangeAnnotation as Export+import Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier as Export+import Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind as Export+import Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientInfo as Export+import Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta as Export+import Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions as Export+import Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeAction as Export+import Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CodeActionContext as Export+import Language.LSP.Protocol.Internal.Types.CodeActionDisabled as Export+import Language.LSP.Protocol.Internal.Types.CodeActionKind as Export+import Language.LSP.Protocol.Internal.Types.CodeActionOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeActionParams as Export+import Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.CodeDescription as Export+import Language.LSP.Protocol.Internal.Types.CodeLens as Export+import Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CodeLensOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeLensParams as Export+import Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.Color as Export+import Language.LSP.Protocol.Internal.Types.ColorInformation as Export+import Language.LSP.Protocol.Internal.Types.ColorPresentation as Export+import Language.LSP.Protocol.Internal.Types.ColorPresentationParams as Export+import Language.LSP.Protocol.Internal.Types.Command as Export+import Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CompletionContext as Export+import Language.LSP.Protocol.Internal.Types.CompletionItem as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemDefaults as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemKind as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemTag as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions as Export+import Language.LSP.Protocol.Internal.Types.CompletionList as Export+import Language.LSP.Protocol.Internal.Types.CompletionListCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CompletionOptions as Export+import Language.LSP.Protocol.Internal.Types.CompletionParams as Export+import Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CompletionTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.ConfigurationItem as Export+import Language.LSP.Protocol.Internal.Types.ConfigurationParams as Export+import Language.LSP.Protocol.Internal.Types.CreateFile as Export+import Language.LSP.Protocol.Internal.Types.CreateFileOptions as Export+import Language.LSP.Protocol.Internal.Types.CreateFilesParams as Export+import Language.LSP.Protocol.Internal.Types.Declaration as Export+import Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DeclarationLink as Export+import Language.LSP.Protocol.Internal.Types.DeclarationOptions as Export+import Language.LSP.Protocol.Internal.Types.DeclarationParams as Export+import Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.Definition as Export+import Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DefinitionLink as Export+import Language.LSP.Protocol.Internal.Types.DefinitionOptions as Export+import Language.LSP.Protocol.Internal.Types.DefinitionParams as Export+import Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DeleteFile as Export+import Language.LSP.Protocol.Internal.Types.DeleteFileOptions as Export+import Language.LSP.Protocol.Internal.Types.DeleteFilesParams as Export+import Language.LSP.Protocol.Internal.Types.Diagnostic as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticOptions as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticSeverity as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticTag as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams as Export+import Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult as Export+import Language.LSP.Protocol.Internal.Types.DocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlight as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightKind as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentLink as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentSelector as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbol as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace as Export+import Language.LSP.Protocol.Internal.Types.ErrorCodes as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandParams as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ExecutionSummary as Export+import Language.LSP.Protocol.Internal.Types.FailureHandlingKind as Export+import Language.LSP.Protocol.Internal.Types.FileChangeType as Export+import Language.LSP.Protocol.Internal.Types.FileCreate as Export+import Language.LSP.Protocol.Internal.Types.FileDelete as Export+import Language.LSP.Protocol.Internal.Types.FileEvent as Export+import Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.FileOperationFilter as Export+import Language.LSP.Protocol.Internal.Types.FileOperationOptions as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPattern as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPatternKind as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions as Export+import Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.FileRename as Export+import Language.LSP.Protocol.Internal.Types.FileSystemWatcher as Export+import Language.LSP.Protocol.Internal.Types.FoldingRange as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeKind as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeParams as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.FormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.GlobPattern as Export+import Language.LSP.Protocol.Internal.Types.Hover as Export+import Language.LSP.Protocol.Internal.Types.HoverClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.HoverOptions as Export+import Language.LSP.Protocol.Internal.Types.HoverParams as Export+import Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ImplementationOptions as Export+import Language.LSP.Protocol.Internal.Types.ImplementationParams as Export+import Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InitializeError as Export+import Language.LSP.Protocol.Internal.Types.InitializeParams as Export+import Language.LSP.Protocol.Internal.Types.InitializeResult as Export+import Language.LSP.Protocol.Internal.Types.InitializedParams as Export+import Language.LSP.Protocol.Internal.Types.InlayHint as Export+import Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlayHintKind as Export+import Language.LSP.Protocol.Internal.Types.InlayHintLabelPart as Export+import Language.LSP.Protocol.Internal.Types.InlayHintOptions as Export+import Language.LSP.Protocol.Internal.Types.InlayHintParams as Export+import Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlineValue as Export+import Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlineValueContext as Export+import Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression as Export+import Language.LSP.Protocol.Internal.Types.InlineValueOptions as Export+import Language.LSP.Protocol.Internal.Types.InlineValueParams as Export+import Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InlineValueText as Export+import Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup as Export+import Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InsertReplaceEdit as Export+import Language.LSP.Protocol.Internal.Types.InsertTextFormat as Export+import Language.LSP.Protocol.Internal.Types.InsertTextMode as Export+import Language.LSP.Protocol.Internal.Types.LSPErrorCodes as Export+import Language.LSP.Protocol.Internal.Types.LanguageKind as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRanges as Export+import Language.LSP.Protocol.Internal.Types.Location as Export+import Language.LSP.Protocol.Internal.Types.LocationLink as Export+import Language.LSP.Protocol.Internal.Types.LocationUriOnly as Export+import Language.LSP.Protocol.Internal.Types.LogMessageParams as Export+import Language.LSP.Protocol.Internal.Types.LogTraceParams as Export+import Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.MarkedString as Export+import Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage as Export+import Language.LSP.Protocol.Internal.Types.MarkupContent as Export+import Language.LSP.Protocol.Internal.Types.MarkupKind as Export+import Language.LSP.Protocol.Internal.Types.MessageActionItem as Export+import Language.LSP.Protocol.Internal.Types.MessageType as Export+import Language.LSP.Protocol.Internal.Types.Moniker as Export+import Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.MonikerKind as Export+import Language.LSP.Protocol.Internal.Types.MonikerOptions as Export+import Language.LSP.Protocol.Internal.Types.MonikerParams as Export+import Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.NotebookCell as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellKind as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellLanguage as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocument as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.ParameterInformation as Export+import Language.LSP.Protocol.Internal.Types.PartialResultParams as Export+import Language.LSP.Protocol.Internal.Types.Pattern as Export+import Language.LSP.Protocol.Internal.Types.Position as Export+import Language.LSP.Protocol.Internal.Types.PositionEncodingKind as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenameParams as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenameResult as Export+import Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior as Export+import Language.LSP.Protocol.Internal.Types.PreviousResultId as Export+import Language.LSP.Protocol.Internal.Types.ProgressParams as Export+import Language.LSP.Protocol.Internal.Types.ProgressToken as Export+import Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams as Export+import Language.LSP.Protocol.Internal.Types.Range as Export+import Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ReferenceContext as Export+import Language.LSP.Protocol.Internal.Types.ReferenceOptions as Export+import Language.LSP.Protocol.Internal.Types.ReferenceParams as Export+import Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.Registration as Export+import Language.LSP.Protocol.Internal.Types.RegistrationParams as Export+import Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind as Export+import Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.RelativePattern as Export+import Language.LSP.Protocol.Internal.Types.RenameClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.RenameFile as Export+import Language.LSP.Protocol.Internal.Types.RenameFileOptions as Export+import Language.LSP.Protocol.Internal.Types.RenameFilesParams as Export+import Language.LSP.Protocol.Internal.Types.RenameOptions as Export+import Language.LSP.Protocol.Internal.Types.RenameParams as Export+import Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ResourceOperation as Export+import Language.LSP.Protocol.Internal.Types.ResourceOperationKind as Export+import Language.LSP.Protocol.Internal.Types.SaveOptions as Export+import Language.LSP.Protocol.Internal.Types.SelectionRange as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeParams as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokenTypes as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokens as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDelta as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensEdit as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensLegend as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ServerCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions as Export+import Language.LSP.Protocol.Internal.Types.ServerInfo as Export+import Language.LSP.Protocol.Internal.Types.SetTraceParams as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentResult as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageParams as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelp as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpContext as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpOptions as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpParams as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.SignatureInformation as Export+import Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions as Export+import Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SymbolInformation as Export+import Language.LSP.Protocol.Internal.Types.SymbolKind as Export+import Language.LSP.Protocol.Internal.Types.SymbolTag as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentEdit as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentItem as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions as Export+import Language.LSP.Protocol.Internal.Types.TextEdit as Export+import Language.LSP.Protocol.Internal.Types.TokenFormat as Export+import Language.LSP.Protocol.Internal.Types.TraceValue as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionParams as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyItem as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams as Export+import Language.LSP.Protocol.Internal.Types.UInitializeParams as Export+import Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.UniquenessLevel as Export+import Language.LSP.Protocol.Internal.Types.Unregistration as Export+import Language.LSP.Protocol.Internal.Types.UnregistrationParams as Export+import Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.WatchKind as Export+import Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.WindowClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceEdit as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFolder as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbol as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport as Export++
+ generated/Language/LSP/Protocol/Internal/Types/AnnotatedTextEdit.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A special text edit with an additional change annotation.++@since 3.16.0.+-}+data AnnotatedTextEdit = AnnotatedTextEdit + { {-|+ The range of the text document to be manipulated. To insert+ text into a document create a range where start === end.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The string to be inserted. For delete operations use an+ empty string.+ -}+ _newText :: Data.Text.Text+ , {-|+ The actual identifier of the change annotation+ -}+ _annotationId :: Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON AnnotatedTextEdit)++instance Aeson.ToJSON AnnotatedTextEdit where+ toJSON (AnnotatedTextEdit arg0 arg1 arg2) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,["newText" Aeson..= arg1]+ ,["annotationId" Aeson..= arg2]]++instance Aeson.FromJSON AnnotatedTextEdit where+ parseJSON = Aeson.withObject "AnnotatedTextEdit" $ \arg -> AnnotatedTextEdit <$> arg Aeson..: "range" <*> arg Aeson..: "newText" <*> arg Aeson..: "annotationId"
+ generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditParams.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters passed via an apply workspace edit request.+-}+data ApplyWorkspaceEditParams = ApplyWorkspaceEditParams + { {-|+ An optional label of the workspace edit. This label is+ presented in the user interface for example on an undo+ stack to undo the workspace edit.+ -}+ _label :: (Maybe Data.Text.Text)+ , {-|+ The edits to apply.+ -}+ _edit :: Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ApplyWorkspaceEditParams)++instance Aeson.ToJSON ApplyWorkspaceEditParams where+ toJSON (ApplyWorkspaceEditParams arg0 arg1) = Aeson.object $ concat $ ["label" Language.LSP.Protocol.Types.Common..=? arg0+ ,["edit" Aeson..= arg1]]++instance Aeson.FromJSON ApplyWorkspaceEditParams where+ parseJSON = Aeson.withObject "ApplyWorkspaceEditParams" $ \arg -> ApplyWorkspaceEditParams <$> arg Language.LSP.Protocol.Types.Common..:!? "label" <*> arg Aeson..: "edit"
+ generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditResult.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+The result returned from the apply workspace edit request.++@since 3.17 renamed from ApplyWorkspaceEditResponse+-}+data ApplyWorkspaceEditResult = ApplyWorkspaceEditResult + { {-|+ Indicates whether the edit was applied or not.+ -}+ _applied :: Bool+ , {-|+ An optional textual description for why the edit was not applied.+ This may be used by the server for diagnostic logging or to provide+ a suitable error for a request that triggered the edit.+ -}+ _failureReason :: (Maybe Data.Text.Text)+ , {-|+ Depending on the client's failure handling strategy `failedChange` might+ contain the index of the change that failed. This property is only available+ if the client signals a `failureHandlingStrategy` in its client capabilities.+ -}+ _failedChange :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ApplyWorkspaceEditResult)++instance Aeson.ToJSON ApplyWorkspaceEditResult where+ toJSON (ApplyWorkspaceEditResult arg0 arg1 arg2) = Aeson.object $ concat $ [["applied" Aeson..= arg0]+ ,"failureReason" Language.LSP.Protocol.Types.Common..=? arg1+ ,"failedChange" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ApplyWorkspaceEditResult where+ parseJSON = Aeson.withObject "ApplyWorkspaceEditResult" $ \arg -> ApplyWorkspaceEditResult <$> arg Aeson..: "applied" <*> arg Language.LSP.Protocol.Types.Common..:!? "failureReason" <*> arg Language.LSP.Protocol.Types.Common..:!? "failedChange"
+ generated/Language/LSP/Protocol/Internal/Types/BaseSymbolInformation.hs view
@@ -0,0 +1,60 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.BaseSymbolInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+A base for all symbol information.+-}+data BaseSymbolInformation = BaseSymbolInformation + { {-|+ The name of this symbol.+ -}+ _name :: Data.Text.Text+ , {-|+ The kind of this symbol.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this symbol.++ @since 3.16.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ The name of the symbol containing this symbol. This information is for+ user interface purposes (e.g. to render a qualifier in the user interface+ if necessary). It can't be used to re-infer a hierarchy for the document+ symbols.+ -}+ _containerName :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON BaseSymbolInformation)++instance Aeson.ToJSON BaseSymbolInformation where+ toJSON (BaseSymbolInformation arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,["kind" Aeson..= arg1]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+ ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON BaseSymbolInformation where+ parseJSON = Aeson.withObject "BaseSymbolInformation" $ \arg -> BaseSymbolInformation <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "containerName"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyClientCapabilities.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data CallHierarchyClientCapabilities = CallHierarchyClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyClientCapabilities)++instance Aeson.ToJSON CallHierarchyClientCapabilities where+ toJSON (CallHierarchyClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CallHierarchyClientCapabilities where+ parseJSON = Aeson.withObject "CallHierarchyClientCapabilities" $ \arg -> CallHierarchyClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCall.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents an incoming call, e.g. a caller of a method or constructor.++@since 3.16.0+-}+data CallHierarchyIncomingCall = CallHierarchyIncomingCall + { {-|+ The item that makes the call.+ -}+ _from :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+ , {-|+ The ranges at which the calls appear. This is relative to the caller+ denoted by `CallHierarchyIncomingCall.from`.+ -}+ _fromRanges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyIncomingCall)++instance Aeson.ToJSON CallHierarchyIncomingCall where+ toJSON (CallHierarchyIncomingCall arg0 arg1) = Aeson.object $ concat $ [["from" Aeson..= arg0]+ ,["fromRanges" Aeson..= arg1]]++instance Aeson.FromJSON CallHierarchyIncomingCall where+ parseJSON = Aeson.withObject "CallHierarchyIncomingCall" $ \arg -> CallHierarchyIncomingCall <$> arg Aeson..: "from" <*> arg Aeson..: "fromRanges"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCallsParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `callHierarchy/incomingCalls` request.++@since 3.16.0+-}+data CallHierarchyIncomingCallsParams = CallHierarchyIncomingCallsParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|++ -}+ _item :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyIncomingCallsParams)++instance Aeson.ToJSON CallHierarchyIncomingCallsParams where+ toJSON (CallHierarchyIncomingCallsParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["item" Aeson..= arg2]]++instance Aeson.FromJSON CallHierarchyIncomingCallsParams where+ parseJSON = Aeson.withObject "CallHierarchyIncomingCallsParams" $ \arg -> CallHierarchyIncomingCallsParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyItem.hs view
@@ -0,0 +1,83 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents programming constructs like functions or constructors in the context+of call hierarchy.++@since 3.16.0+-}+data CallHierarchyItem = CallHierarchyItem + { {-|+ The name of this item.+ -}+ _name :: Data.Text.Text+ , {-|+ The kind of this item.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this item.+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ More detail for this item, e.g. the signature of a function.+ -}+ _detail :: (Maybe Data.Text.Text)+ , {-|+ The resource identifier of this item.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.+ Must be contained by the `CallHierarchyItem.range`.+ -}+ _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ A data entry field that is preserved between a call hierarchy prepare and+ incoming calls or outgoing calls requests.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyItem)++instance Aeson.ToJSON CallHierarchyItem where+ toJSON (CallHierarchyItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,["kind" Aeson..= arg1]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+ ,"detail" Language.LSP.Protocol.Types.Common..=? arg3+ ,["uri" Aeson..= arg4]+ ,["range" Aeson..= arg5]+ ,["selectionRange" Aeson..= arg6]+ ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON CallHierarchyItem where+ parseJSON = Aeson.withObject "CallHierarchyItem" $ \arg -> CallHierarchyItem <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "detail" <*> arg Aeson..: "uri" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Call hierarchy options used during static registration.++@since 3.16.0+-}+data CallHierarchyOptions = CallHierarchyOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyOptions)++instance Aeson.ToJSON CallHierarchyOptions where+ toJSON (CallHierarchyOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CallHierarchyOptions where+ parseJSON = Aeson.withObject "CallHierarchyOptions" $ \arg -> CallHierarchyOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCall.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.++@since 3.16.0+-}+data CallHierarchyOutgoingCall = CallHierarchyOutgoingCall + { {-|+ The item that is called.+ -}+ _to :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+ , {-|+ The range at which this item is called. This is the range relative to the caller, e.g the item+ passed to `CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls`+ and not `CallHierarchyOutgoingCall.to`.+ -}+ _fromRanges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyOutgoingCall)++instance Aeson.ToJSON CallHierarchyOutgoingCall where+ toJSON (CallHierarchyOutgoingCall arg0 arg1) = Aeson.object $ concat $ [["to" Aeson..= arg0]+ ,["fromRanges" Aeson..= arg1]]++instance Aeson.FromJSON CallHierarchyOutgoingCall where+ parseJSON = Aeson.withObject "CallHierarchyOutgoingCall" $ \arg -> CallHierarchyOutgoingCall <$> arg Aeson..: "to" <*> arg Aeson..: "fromRanges"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCallsParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `callHierarchy/outgoingCalls` request.++@since 3.16.0+-}+data CallHierarchyOutgoingCallsParams = CallHierarchyOutgoingCallsParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|++ -}+ _item :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyOutgoingCallsParams)++instance Aeson.ToJSON CallHierarchyOutgoingCallsParams where+ toJSON (CallHierarchyOutgoingCallsParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["item" Aeson..= arg2]]++instance Aeson.FromJSON CallHierarchyOutgoingCallsParams where+ parseJSON = Aeson.withObject "CallHierarchyOutgoingCallsParams" $ \arg -> CallHierarchyOutgoingCallsParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyPrepareParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `textDocument/prepareCallHierarchy` request.++@since 3.16.0+-}+data CallHierarchyPrepareParams = CallHierarchyPrepareParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyPrepareParams)++instance Aeson.ToJSON CallHierarchyPrepareParams where+ toJSON (CallHierarchyPrepareParams arg0 arg1 arg2) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CallHierarchyPrepareParams where+ parseJSON = Aeson.withObject "CallHierarchyPrepareParams" $ \arg -> CallHierarchyPrepareParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyRegistrationOptions.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Call hierarchy options used during static or dynamic registration.++@since 3.16.0+-}+data CallHierarchyRegistrationOptions = CallHierarchyRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CallHierarchyRegistrationOptions)++instance Aeson.ToJSON CallHierarchyRegistrationOptions where+ toJSON (CallHierarchyRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CallHierarchyRegistrationOptions where+ parseJSON = Aeson.withObject "CallHierarchyRegistrationOptions" $ \arg -> CallHierarchyRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/CancelParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CancelParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data CancelParams = CancelParams + { {-|+ The request id to cancel.+ -}+ _id :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CancelParams)++instance Aeson.ToJSON CancelParams where+ toJSON (CancelParams arg0) = Aeson.object $ concat $ [["id" Aeson..= arg0]]++instance Aeson.FromJSON CancelParams where+ parseJSON = Aeson.withObject "CancelParams" $ \arg -> CancelParams <$> arg Aeson..: "id"
+ generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotation.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ChangeAnnotation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional information that describes document changes.++@since 3.16.0+-}+data ChangeAnnotation = ChangeAnnotation + { {-|+ A human-readable string describing the actual change. The string+ is rendered prominent in the user interface.+ -}+ _label :: Data.Text.Text+ , {-|+ A flag which indicates that user confirmation is needed+ before applying the change.+ -}+ _needsConfirmation :: (Maybe Bool)+ , {-|+ A human-readable string which is rendered less prominent in+ the user interface.+ -}+ _description :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ChangeAnnotation)++instance Aeson.ToJSON ChangeAnnotation where+ toJSON (ChangeAnnotation arg0 arg1 arg2) = Aeson.object $ concat $ [["label" Aeson..= arg0]+ ,"needsConfirmation" Language.LSP.Protocol.Types.Common..=? arg1+ ,"description" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ChangeAnnotation where+ parseJSON = Aeson.withObject "ChangeAnnotation" $ \arg -> ChangeAnnotation <$> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "needsConfirmation" <*> arg Language.LSP.Protocol.Types.Common..:!? "description"
+ generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotationIdentifier.hs view
@@ -0,0 +1,30 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text++{-|+An identifier to refer to a change annotation stored with a workspace edit.+-}+newtype ChangeAnnotationIdentifier = ChangeAnnotationIdentifier Data.Text.Text+ deriving newtype ( Aeson.ToJSON+ , Aeson.FromJSON+ , Aeson.ToJSONKey+ , Aeson.FromJSONKey )+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ChangeAnnotationIdentifier)
+ generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotationsSupportOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ChangeAnnotationsSupportOptions = ChangeAnnotationsSupportOptions + { {-|+ Whether the client groups edits with equal labels into tree nodes,+ for instance all edits labelled with "Changes in Strings" would+ be a tree node.+ -}+ _groupsOnLabel :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ChangeAnnotationsSupportOptions)++instance Aeson.ToJSON ChangeAnnotationsSupportOptions where+ toJSON (ChangeAnnotationsSupportOptions arg0) = Aeson.object $ concat $ ["groupsOnLabel" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ChangeAnnotationsSupportOptions where+ parseJSON = Aeson.withObject "ChangeAnnotationsSupportOptions" $ \arg -> ChangeAnnotationsSupportOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "groupsOnLabel"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCapabilities.hs view
@@ -0,0 +1,72 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Defines the capabilities provided by the client.+-}+data ClientCapabilities = ClientCapabilities + { {-|+ Workspace specific client capabilities.+ -}+ _workspace :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities.WorkspaceClientCapabilities)+ , {-|+ Text document specific client capabilities.+ -}+ _textDocument :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities.TextDocumentClientCapabilities)+ , {-|+ Capabilities specific to the notebook document support.++ @since 3.17.0+ -}+ _notebookDocument :: (Maybe Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities.NotebookDocumentClientCapabilities)+ , {-|+ Window specific client capabilities.+ -}+ _window :: (Maybe Language.LSP.Protocol.Internal.Types.WindowClientCapabilities.WindowClientCapabilities)+ , {-|+ General client capabilities.++ @since 3.16.0+ -}+ _general :: (Maybe Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities.GeneralClientCapabilities)+ , {-|+ Experimental client capabilities.+ -}+ _experimental :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCapabilities)++instance Aeson.ToJSON ClientCapabilities where+ toJSON (ClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ ["workspace" Language.LSP.Protocol.Types.Common..=? arg0+ ,"textDocument" Language.LSP.Protocol.Types.Common..=? arg1+ ,"notebookDocument" Language.LSP.Protocol.Types.Common..=? arg2+ ,"window" Language.LSP.Protocol.Types.Common..=? arg3+ ,"general" Language.LSP.Protocol.Types.Common..=? arg4+ ,"experimental" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON ClientCapabilities where+ parseJSON = Aeson.withObject "ClientCapabilities" $ \arg -> ClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "workspace" <*> arg Language.LSP.Protocol.Types.Common..:!? "textDocument" <*> arg Language.LSP.Protocol.Types.Common..:!? "notebookDocument" <*> arg Language.LSP.Protocol.Types.Common..:!? "window" <*> arg Language.LSP.Protocol.Types.Common..:!? "general" <*> arg Language.LSP.Protocol.Types.Common..:!? "experimental"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionKindOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCodeActionKindOptions = ClientCodeActionKindOptions + { {-|+ The code action kind values the client supports. When this+ property exists the client also guarantees that it will+ handle values outside its set gracefully and falls back+ to a default value when unknown.+ -}+ _valueSet :: [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCodeActionKindOptions)++instance Aeson.ToJSON ClientCodeActionKindOptions where+ toJSON (ClientCodeActionKindOptions arg0) = Aeson.object $ concat $ [["valueSet" Aeson..= arg0]]++instance Aeson.FromJSON ClientCodeActionKindOptions where+ parseJSON = Aeson.withObject "ClientCodeActionKindOptions" $ \arg -> ClientCodeActionKindOptions <$> arg Aeson..: "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionLiteralOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCodeActionLiteralOptions = ClientCodeActionLiteralOptions + { {-|+ The code action kind is support with the following value+ set.+ -}+ _codeActionKind :: Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions.ClientCodeActionKindOptions+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCodeActionLiteralOptions)++instance Aeson.ToJSON ClientCodeActionLiteralOptions where+ toJSON (ClientCodeActionLiteralOptions arg0) = Aeson.object $ concat $ [["codeActionKind" Aeson..= arg0]]++instance Aeson.FromJSON ClientCodeActionLiteralOptions where+ parseJSON = Aeson.withObject "ClientCodeActionLiteralOptions" $ \arg -> ClientCodeActionLiteralOptions <$> arg Aeson..: "codeActionKind"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCodeActionResolveOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCodeActionResolveOptions = ClientCodeActionResolveOptions + { {-|+ The properties that a client can resolve lazily.+ -}+ _properties :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCodeActionResolveOptions)++instance Aeson.ToJSON ClientCodeActionResolveOptions where+ toJSON (ClientCodeActionResolveOptions arg0) = Aeson.object $ concat $ [["properties" Aeson..= arg0]]++instance Aeson.FromJSON ClientCodeActionResolveOptions where+ parseJSON = Aeson.withObject "ClientCodeActionResolveOptions" $ \arg -> ClientCodeActionResolveOptions <$> arg Aeson..: "properties"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemInsertTextModeOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCompletionItemInsertTextModeOptions = ClientCompletionItemInsertTextModeOptions + { {-|++ -}+ _valueSet :: [Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCompletionItemInsertTextModeOptions)++instance Aeson.ToJSON ClientCompletionItemInsertTextModeOptions where+ toJSON (ClientCompletionItemInsertTextModeOptions arg0) = Aeson.object $ concat $ [["valueSet" Aeson..= arg0]]++instance Aeson.FromJSON ClientCompletionItemInsertTextModeOptions where+ parseJSON = Aeson.withObject "ClientCompletionItemInsertTextModeOptions" $ \arg -> ClientCompletionItemInsertTextModeOptions <$> arg Aeson..: "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemOptions.hs view
@@ -0,0 +1,112 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCompletionItemOptions = ClientCompletionItemOptions + { {-|+ Client supports snippets as insert text.++ A snippet can define tab stops and placeholders with `$1`, `$2`+ and `${3:foo}`. `$0` defines the final tab stop, it defaults to+ the end of the snippet. Placeholders with equal identifiers are linked,+ that is typing in one will update others too.+ -}+ _snippetSupport :: (Maybe Bool)+ , {-|+ Client supports commit characters on a completion item.+ -}+ _commitCharactersSupport :: (Maybe Bool)+ , {-|+ Client supports the following content formats for the documentation+ property. The order describes the preferred format of the client.+ -}+ _documentationFormat :: (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind])+ , {-|+ Client supports the deprecated property on a completion item.+ -}+ _deprecatedSupport :: (Maybe Bool)+ , {-|+ Client supports the preselect property on a completion item.+ -}+ _preselectSupport :: (Maybe Bool)+ , {-|+ Client supports the tag property on a completion item. Clients supporting+ tags have to handle unknown tags gracefully. Clients especially need to+ preserve unknown tags when sending a completion item back to the server in+ a resolve call.++ @since 3.15.0+ -}+ _tagSupport :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions.CompletionItemTagOptions)+ , {-|+ Client support insert replace edit to control different behavior if a+ completion item is inserted in the text or should replace text.++ @since 3.16.0+ -}+ _insertReplaceSupport :: (Maybe Bool)+ , {-|+ Indicates which properties a client can resolve lazily on a completion+ item. Before version 3.16.0 only the predefined properties `documentation`+ and `details` could be resolved lazily.++ @since 3.16.0+ -}+ _resolveSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions.ClientCompletionItemResolveOptions)+ , {-|+ The client supports the `insertTextMode` property on+ a completion item to override the whitespace handling mode+ as defined by the client (see `insertTextMode`).++ @since 3.16.0+ -}+ _insertTextModeSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions.ClientCompletionItemInsertTextModeOptions)+ , {-|+ The client has support for completion item label+ details (see also `CompletionItemLabelDetails`).++ @since 3.17.0+ -}+ _labelDetailsSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCompletionItemOptions)++instance Aeson.ToJSON ClientCompletionItemOptions where+ toJSON (ClientCompletionItemOptions arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9) = Aeson.object $ concat $ ["snippetSupport" Language.LSP.Protocol.Types.Common..=? arg0+ ,"commitCharactersSupport" Language.LSP.Protocol.Types.Common..=? arg1+ ,"documentationFormat" Language.LSP.Protocol.Types.Common..=? arg2+ ,"deprecatedSupport" Language.LSP.Protocol.Types.Common..=? arg3+ ,"preselectSupport" Language.LSP.Protocol.Types.Common..=? arg4+ ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg5+ ,"insertReplaceSupport" Language.LSP.Protocol.Types.Common..=? arg6+ ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg7+ ,"insertTextModeSupport" Language.LSP.Protocol.Types.Common..=? arg8+ ,"labelDetailsSupport" Language.LSP.Protocol.Types.Common..=? arg9]++instance Aeson.FromJSON ClientCompletionItemOptions where+ parseJSON = Aeson.withObject "ClientCompletionItemOptions" $ \arg -> ClientCompletionItemOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "snippetSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "commitCharactersSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentationFormat" <*> arg Language.LSP.Protocol.Types.Common..:!? "deprecatedSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "preselectSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "tagSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertReplaceSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextModeSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "labelDetailsSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemOptionsKind.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCompletionItemOptionsKind = ClientCompletionItemOptionsKind + { {-|+ The completion item kind values the client supports. When this+ property exists the client also guarantees that it will+ handle values outside its set gracefully and falls back+ to a default value when unknown.++ If this property is not present the client only supports+ the completion items kinds from `Text` to `Reference` as defined in+ the initial version of the protocol.+ -}+ _valueSet :: (Maybe [Language.LSP.Protocol.Internal.Types.CompletionItemKind.CompletionItemKind])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCompletionItemOptionsKind)++instance Aeson.ToJSON ClientCompletionItemOptionsKind where+ toJSON (ClientCompletionItemOptionsKind arg0) = Aeson.object $ concat $ ["valueSet" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientCompletionItemOptionsKind where+ parseJSON = Aeson.withObject "ClientCompletionItemOptionsKind" $ \arg -> ClientCompletionItemOptionsKind <$> arg Language.LSP.Protocol.Types.Common..:!? "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientCompletionItemResolveOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientCompletionItemResolveOptions = ClientCompletionItemResolveOptions + { {-|+ The properties that a client can resolve lazily.+ -}+ _properties :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientCompletionItemResolveOptions)++instance Aeson.ToJSON ClientCompletionItemResolveOptions where+ toJSON (ClientCompletionItemResolveOptions arg0) = Aeson.object $ concat $ [["properties" Aeson..= arg0]]++instance Aeson.FromJSON ClientCompletionItemResolveOptions where+ parseJSON = Aeson.withObject "ClientCompletionItemResolveOptions" $ \arg -> ClientCompletionItemResolveOptions <$> arg Aeson..: "properties"
+ generated/Language/LSP/Protocol/Internal/Types/ClientDiagnosticsTagOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticTag+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientDiagnosticsTagOptions = ClientDiagnosticsTagOptions + { {-|+ The tags supported by the client.+ -}+ _valueSet :: [Language.LSP.Protocol.Internal.Types.DiagnosticTag.DiagnosticTag]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientDiagnosticsTagOptions)++instance Aeson.ToJSON ClientDiagnosticsTagOptions where+ toJSON (ClientDiagnosticsTagOptions arg0) = Aeson.object $ concat $ [["valueSet" Aeson..= arg0]]++instance Aeson.FromJSON ClientDiagnosticsTagOptions where+ parseJSON = Aeson.withObject "ClientDiagnosticsTagOptions" $ \arg -> ClientDiagnosticsTagOptions <$> arg Aeson..: "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientFoldingRangeKindOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientFoldingRangeKindOptions = ClientFoldingRangeKindOptions + { {-|+ The folding range kind values the client supports. When this+ property exists the client also guarantees that it will+ handle values outside its set gracefully and falls back+ to a default value when unknown.+ -}+ _valueSet :: (Maybe [Language.LSP.Protocol.Internal.Types.FoldingRangeKind.FoldingRangeKind])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientFoldingRangeKindOptions)++instance Aeson.ToJSON ClientFoldingRangeKindOptions where+ toJSON (ClientFoldingRangeKindOptions arg0) = Aeson.object $ concat $ ["valueSet" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientFoldingRangeKindOptions where+ parseJSON = Aeson.withObject "ClientFoldingRangeKindOptions" $ \arg -> ClientFoldingRangeKindOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientFoldingRangeOptions.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientFoldingRangeOptions = ClientFoldingRangeOptions + { {-|+ If set, the client signals that it supports setting collapsedText on+ folding ranges to display custom labels instead of the default text.++ @since 3.17.0+ -}+ _collapsedText :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientFoldingRangeOptions)++instance Aeson.ToJSON ClientFoldingRangeOptions where+ toJSON (ClientFoldingRangeOptions arg0) = Aeson.object $ concat $ ["collapsedText" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientFoldingRangeOptions where+ parseJSON = Aeson.withObject "ClientFoldingRangeOptions" $ \arg -> ClientFoldingRangeOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "collapsedText"
+ generated/Language/LSP/Protocol/Internal/Types/ClientInfo.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientInfo where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Information about the client++@since 3.15.0+@since 3.18.0 ClientInfo type name added.+@proposed+-}+data ClientInfo = ClientInfo + { {-|+ The name of the client as defined by the client.+ -}+ _name :: Data.Text.Text+ , {-|+ The client's version as defined by the client.+ -}+ _version :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientInfo)++instance Aeson.ToJSON ClientInfo where+ toJSON (ClientInfo arg0 arg1) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,"version" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ClientInfo where+ parseJSON = Aeson.withObject "ClientInfo" $ \arg -> ClientInfo <$> arg Aeson..: "name" <*> arg Language.LSP.Protocol.Types.Common..:!? "version"
+ generated/Language/LSP/Protocol/Internal/Types/ClientInlayHintResolveOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientInlayHintResolveOptions = ClientInlayHintResolveOptions + { {-|+ The properties that a client can resolve lazily.+ -}+ _properties :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientInlayHintResolveOptions)++instance Aeson.ToJSON ClientInlayHintResolveOptions where+ toJSON (ClientInlayHintResolveOptions arg0) = Aeson.object $ concat $ [["properties" Aeson..= arg0]]++instance Aeson.FromJSON ClientInlayHintResolveOptions where+ parseJSON = Aeson.withObject "ClientInlayHintResolveOptions" $ \arg -> ClientInlayHintResolveOptions <$> arg Aeson..: "properties"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSemanticTokensRequestFullDelta.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSemanticTokensRequestFullDelta = ClientSemanticTokensRequestFullDelta + { {-|+ The client will send the `textDocument/semanticTokens/full/delta` request if+ the server provides a corresponding handler.+ -}+ _delta :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSemanticTokensRequestFullDelta)++instance Aeson.ToJSON ClientSemanticTokensRequestFullDelta where+ toJSON (ClientSemanticTokensRequestFullDelta arg0) = Aeson.object $ concat $ ["delta" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientSemanticTokensRequestFullDelta where+ parseJSON = Aeson.withObject "ClientSemanticTokensRequestFullDelta" $ \arg -> ClientSemanticTokensRequestFullDelta <$> arg Language.LSP.Protocol.Types.Common..:!? "delta"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSemanticTokensRequestOptions.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSemanticTokensRequestOptions = ClientSemanticTokensRequestOptions + { {-|+ The client will send the `textDocument/semanticTokens/range` request if+ the server provides a corresponding handler.+ -}+ _range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))+ , {-|+ The client will send the `textDocument/semanticTokens/full` request if+ the server provides a corresponding handler.+ -}+ _full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta.ClientSemanticTokensRequestFullDelta))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSemanticTokensRequestOptions)++instance Aeson.ToJSON ClientSemanticTokensRequestOptions where+ toJSON (ClientSemanticTokensRequestOptions arg0 arg1) = Aeson.object $ concat $ ["range" Language.LSP.Protocol.Types.Common..=? arg0+ ,"full" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ClientSemanticTokensRequestOptions where+ parseJSON = Aeson.withObject "ClientSemanticTokensRequestOptions" $ \arg -> ClientSemanticTokensRequestOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "full"
+ generated/Language/LSP/Protocol/Internal/Types/ClientShowMessageActionItemOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientShowMessageActionItemOptions = ClientShowMessageActionItemOptions + { {-|+ Whether the client supports additional attributes which+ are preserved and send back to the server in the+ request's response.+ -}+ _additionalPropertiesSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientShowMessageActionItemOptions)++instance Aeson.ToJSON ClientShowMessageActionItemOptions where+ toJSON (ClientShowMessageActionItemOptions arg0) = Aeson.object $ concat $ ["additionalPropertiesSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientShowMessageActionItemOptions where+ parseJSON = Aeson.withObject "ClientShowMessageActionItemOptions" $ \arg -> ClientShowMessageActionItemOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "additionalPropertiesSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSignatureInformationOptions.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSignatureInformationOptions = ClientSignatureInformationOptions + { {-|+ Client supports the following content formats for the documentation+ property. The order describes the preferred format of the client.+ -}+ _documentationFormat :: (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind])+ , {-|+ Client capabilities specific to parameter information.+ -}+ _parameterInformation :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions.ClientSignatureParameterInformationOptions)+ , {-|+ The client supports the `activeParameter` property on `SignatureInformation`+ literal.++ @since 3.16.0+ -}+ _activeParameterSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSignatureInformationOptions)++instance Aeson.ToJSON ClientSignatureInformationOptions where+ toJSON (ClientSignatureInformationOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["documentationFormat" Language.LSP.Protocol.Types.Common..=? arg0+ ,"parameterInformation" Language.LSP.Protocol.Types.Common..=? arg1+ ,"activeParameterSupport" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ClientSignatureInformationOptions where+ parseJSON = Aeson.withObject "ClientSignatureInformationOptions" $ \arg -> ClientSignatureInformationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "documentationFormat" <*> arg Language.LSP.Protocol.Types.Common..:!? "parameterInformation" <*> arg Language.LSP.Protocol.Types.Common..:!? "activeParameterSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSignatureParameterInformationOptions.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSignatureParameterInformationOptions = ClientSignatureParameterInformationOptions + { {-|+ The client supports processing label offsets instead of a+ simple label string.++ @since 3.14.0+ -}+ _labelOffsetSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSignatureParameterInformationOptions)++instance Aeson.ToJSON ClientSignatureParameterInformationOptions where+ toJSON (ClientSignatureParameterInformationOptions arg0) = Aeson.object $ concat $ ["labelOffsetSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientSignatureParameterInformationOptions where+ parseJSON = Aeson.withObject "ClientSignatureParameterInformationOptions" $ \arg -> ClientSignatureParameterInformationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "labelOffsetSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSymbolKindOptions.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSymbolKindOptions = ClientSymbolKindOptions + { {-|+ The symbol kind values the client supports. When this+ property exists the client also guarantees that it will+ handle values outside its set gracefully and falls back+ to a default value when unknown.++ If this property is not present the client only supports+ the symbol kinds from `File` to `Array` as defined in+ the initial version of the protocol.+ -}+ _valueSet :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSymbolKindOptions)++instance Aeson.ToJSON ClientSymbolKindOptions where+ toJSON (ClientSymbolKindOptions arg0) = Aeson.object $ concat $ ["valueSet" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ClientSymbolKindOptions where+ parseJSON = Aeson.withObject "ClientSymbolKindOptions" $ \arg -> ClientSymbolKindOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSymbolResolveOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSymbolResolveOptions = ClientSymbolResolveOptions + { {-|+ The properties that a client can resolve lazily. Usually+ `location.range`+ -}+ _properties :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSymbolResolveOptions)++instance Aeson.ToJSON ClientSymbolResolveOptions where+ toJSON (ClientSymbolResolveOptions arg0) = Aeson.object $ concat $ [["properties" Aeson..= arg0]]++instance Aeson.FromJSON ClientSymbolResolveOptions where+ parseJSON = Aeson.withObject "ClientSymbolResolveOptions" $ \arg -> ClientSymbolResolveOptions <$> arg Aeson..: "properties"
+ generated/Language/LSP/Protocol/Internal/Types/ClientSymbolTagOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ClientSymbolTagOptions = ClientSymbolTagOptions + { {-|+ The tags supported by the client.+ -}+ _valueSet :: [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ClientSymbolTagOptions)++instance Aeson.ToJSON ClientSymbolTagOptions where+ toJSON (ClientSymbolTagOptions arg0) = Aeson.object $ concat $ [["valueSet" Aeson..= arg0]]++instance Aeson.FromJSON ClientSymbolTagOptions where+ parseJSON = Aeson.withObject "ClientSymbolTagOptions" $ \arg -> ClientSymbolTagOptions <$> arg Aeson..: "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/CodeAction.hs view
@@ -0,0 +1,109 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeAction where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CodeActionDisabled+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+A code action represents a change that can be performed in code, e.g. to fix a problem or+to refactor code.++A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.+-}+data CodeAction = CodeAction + { {-|+ A short, human-readable, title for this code action.+ -}+ _title :: Data.Text.Text+ , {-|+ The kind of the code action.++ Used to filter code actions.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind)+ , {-|+ The diagnostics that this code action resolves.+ -}+ _diagnostics :: (Maybe [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic])+ , {-|+ Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted+ by keybindings.++ A quick fix should be marked preferred if it properly addresses the underlying error.+ A refactoring should be marked preferred if it is the most reasonable choice of actions to take.++ @since 3.15.0+ -}+ _isPreferred :: (Maybe Bool)+ , {-|+ Marks that the code action cannot currently be applied.++ Clients should follow the following guidelines regarding disabled code actions:++ - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)+ code action menus.++ - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type+ of code action, such as refactorings.++ - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)+ that auto applies a code action and only disabled code actions are returned, the client should show the user an+ error message with `reason` in the editor.++ @since 3.16.0+ -}+ _disabled :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionDisabled.CodeActionDisabled)+ , {-|+ The workspace edit this code action performs.+ -}+ _edit :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit)+ , {-|+ A command this code action executes. If a code action+ provides an edit and a command, first the edit is+ executed and then the command.+ -}+ _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+ , {-|+ A data entry field that is preserved on a code action between+ a `textDocument/codeAction` and a `codeAction/resolve` request.++ @since 3.16.0+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeAction)++instance Aeson.ToJSON CodeAction where+ toJSON (CodeAction arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $ [["title" Aeson..= arg0]+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg1+ ,"diagnostics" Language.LSP.Protocol.Types.Common..=? arg2+ ,"isPreferred" Language.LSP.Protocol.Types.Common..=? arg3+ ,"disabled" Language.LSP.Protocol.Types.Common..=? arg4+ ,"edit" Language.LSP.Protocol.Types.Common..=? arg5+ ,"command" Language.LSP.Protocol.Types.Common..=? arg6+ ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON CodeAction where+ parseJSON = Aeson.withObject "CodeAction" $ \arg -> CodeAction <$> arg Aeson..: "title" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "diagnostics" <*> arg Language.LSP.Protocol.Types.Common..:!? "isPreferred" <*> arg Language.LSP.Protocol.Types.Common..:!? "disabled" <*> arg Language.LSP.Protocol.Types.Common..:!? "edit" <*> arg Language.LSP.Protocol.Types.Common..:!? "command" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionClientCapabilities.hs view
@@ -0,0 +1,90 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+The Client Capabilities of a `CodeActionRequest`.+-}+data CodeActionClientCapabilities = CodeActionClientCapabilities + { {-|+ Whether code action supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client support code action literals of type `CodeAction` as a valid+ response of the `textDocument/codeAction` request. If the property is not+ set the request can only return `Command` literals.++ @since 3.8.0+ -}+ _codeActionLiteralSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions.ClientCodeActionLiteralOptions)+ , {-|+ Whether code action supports the `isPreferred` property.++ @since 3.15.0+ -}+ _isPreferredSupport :: (Maybe Bool)+ , {-|+ Whether code action supports the `disabled` property.++ @since 3.16.0+ -}+ _disabledSupport :: (Maybe Bool)+ , {-|+ Whether code action supports the `data` property which is+ preserved between a `textDocument/codeAction` and a+ `codeAction/resolve` request.++ @since 3.16.0+ -}+ _dataSupport :: (Maybe Bool)+ , {-|+ Whether the client supports resolving additional code action+ properties via a separate `codeAction/resolve` request.++ @since 3.16.0+ -}+ _resolveSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions.ClientCodeActionResolveOptions)+ , {-|+ Whether the client honors the change annotations in+ text edits and resource operations returned via the+ `CodeAction#edit` property by for example presenting+ the workspace edit in the user interface and asking+ for confirmation.++ @since 3.16.0+ -}+ _honorsChangeAnnotations :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionClientCapabilities)++instance Aeson.ToJSON CodeActionClientCapabilities where+ toJSON (CodeActionClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"codeActionLiteralSupport" Language.LSP.Protocol.Types.Common..=? arg1+ ,"isPreferredSupport" Language.LSP.Protocol.Types.Common..=? arg2+ ,"disabledSupport" Language.LSP.Protocol.Types.Common..=? arg3+ ,"dataSupport" Language.LSP.Protocol.Types.Common..=? arg4+ ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg5+ ,"honorsChangeAnnotations" Language.LSP.Protocol.Types.Common..=? arg6]++instance Aeson.FromJSON CodeActionClientCapabilities where+ parseJSON = Aeson.withObject "CodeActionClientCapabilities" $ \arg -> CodeActionClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeActionLiteralSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "isPreferredSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "disabledSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "dataSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "honorsChangeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionContext.hs view
@@ -0,0 +1,60 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common++{-|+Contains additional diagnostic information about the context in which+a `CodeActionProvider.provideCodeActions` is run.+-}+data CodeActionContext = CodeActionContext + { {-|+ An array of diagnostics known on the client side overlapping the range provided to the+ `textDocument/codeAction` request. They are provided so that the server knows which+ errors are currently presented to the user for the given range. There is no guarantee+ that these accurately reflect the error state of the resource. The primary parameter+ to compute code actions is the provided range.+ -}+ _diagnostics :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+ , {-|+ Requested kind of actions to return.++ Actions not of this kind are filtered out by the client before being shown. So servers+ can omit computing them.+ -}+ _only :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+ , {-|+ The reason why code actions were requested.++ @since 3.17.0+ -}+ _triggerKind :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind.CodeActionTriggerKind)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionContext)++instance Aeson.ToJSON CodeActionContext where+ toJSON (CodeActionContext arg0 arg1 arg2) = Aeson.object $ concat $ [["diagnostics" Aeson..= arg0]+ ,"only" Language.LSP.Protocol.Types.Common..=? arg1+ ,"triggerKind" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeActionContext where+ parseJSON = Aeson.withObject "CodeActionContext" $ \arg -> CodeActionContext <$> arg Aeson..: "diagnostics" <*> arg Language.LSP.Protocol.Types.Common..:!? "only" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerKind"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionDisabled.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionDisabled where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Captures why the code action is currently disabled.++@since 3.18.0+@proposed+-}+data CodeActionDisabled = CodeActionDisabled + { {-|+ Human readable description of why the code action is currently disabled.++ This is displayed in the code actions UI.+ -}+ _reason :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionDisabled)++instance Aeson.ToJSON CodeActionDisabled where+ toJSON (CodeActionDisabled arg0) = Aeson.object $ concat $ [["reason" Aeson..= arg0]]++instance Aeson.FromJSON CodeActionDisabled where+ parseJSON = Aeson.withObject "CodeActionDisabled" $ \arg -> CodeActionDisabled <$> arg Aeson..: "reason"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs view
@@ -0,0 +1,146 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined code action kinds+-}+data CodeActionKind = + {-|+ Empty kind.+ -}+ CodeActionKind_Empty+ | {-|+ Base kind for quickfix actions: 'quickfix'+ -}+ CodeActionKind_QuickFix+ | {-|+ Base kind for refactoring actions: 'refactor'+ -}+ CodeActionKind_Refactor+ | {-|+ Base kind for refactoring extraction actions: 'refactor.extract'++ Example extract actions:++ - Extract method+ - Extract function+ - Extract variable+ - Extract interface from class+ - ...+ -}+ CodeActionKind_RefactorExtract+ | {-|+ Base kind for refactoring inline actions: 'refactor.inline'++ Example inline actions:++ - Inline function+ - Inline variable+ - Inline constant+ - ...+ -}+ CodeActionKind_RefactorInline+ | {-|+ Base kind for refactoring rewrite actions: 'refactor.rewrite'++ Example rewrite actions:++ - Convert JavaScript function to class+ - Add or remove parameter+ - Encapsulate field+ - Make method static+ - Move method to base class+ - ...+ -}+ CodeActionKind_RefactorRewrite+ | {-|+ Base kind for source actions: `source`++ Source code actions apply to the entire file.+ -}+ CodeActionKind_Source+ | {-|+ Base kind for an organize imports source action: `source.organizeImports`+ -}+ CodeActionKind_SourceOrganizeImports+ | {-|+ Base kind for auto-fix source actions: `source.fixAll`.++ Fix all actions automatically fix errors that have a clear fix that do not require user input.+ They should not suppress errors or perform unsafe fixes such as generating new types or classes.++ @since 3.15.0+ -}+ CodeActionKind_SourceFixAll+ | {-|+ Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using+ this should always begin with `notebook.`++ @since 3.18.0+ -}+ CodeActionKind_Notebook+ | CodeActionKind_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionKind)+ deriving Pretty via (ViaJSON CodeActionKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionKind where+ knownValues = Data.Set.fromList [CodeActionKind_Empty+ ,CodeActionKind_QuickFix+ ,CodeActionKind_Refactor+ ,CodeActionKind_RefactorExtract+ ,CodeActionKind_RefactorInline+ ,CodeActionKind_RefactorRewrite+ ,CodeActionKind_Source+ ,CodeActionKind_SourceOrganizeImports+ ,CodeActionKind_SourceFixAll+ ,CodeActionKind_Notebook]+ type EnumBaseType CodeActionKind = Data.Text.Text+ toEnumBaseType CodeActionKind_Empty = ""+ toEnumBaseType CodeActionKind_QuickFix = "quickfix"+ toEnumBaseType CodeActionKind_Refactor = "refactor"+ toEnumBaseType CodeActionKind_RefactorExtract = "refactor.extract"+ toEnumBaseType CodeActionKind_RefactorInline = "refactor.inline"+ toEnumBaseType CodeActionKind_RefactorRewrite = "refactor.rewrite"+ toEnumBaseType CodeActionKind_Source = "source"+ toEnumBaseType CodeActionKind_SourceOrganizeImports = "source.organizeImports"+ toEnumBaseType CodeActionKind_SourceFixAll = "source.fixAll"+ toEnumBaseType CodeActionKind_Notebook = "notebook"+ toEnumBaseType (CodeActionKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum CodeActionKind where+ fromOpenEnumBaseType "" = CodeActionKind_Empty+ fromOpenEnumBaseType "quickfix" = CodeActionKind_QuickFix+ fromOpenEnumBaseType "refactor" = CodeActionKind_Refactor+ fromOpenEnumBaseType "refactor.extract" = CodeActionKind_RefactorExtract+ fromOpenEnumBaseType "refactor.inline" = CodeActionKind_RefactorInline+ fromOpenEnumBaseType "refactor.rewrite" = CodeActionKind_RefactorRewrite+ fromOpenEnumBaseType "source" = CodeActionKind_Source+ fromOpenEnumBaseType "source.organizeImports" = CodeActionKind_SourceOrganizeImports+ fromOpenEnumBaseType "source.fixAll" = CodeActionKind_SourceFixAll+ fromOpenEnumBaseType "notebook" = CodeActionKind_Notebook+ fromOpenEnumBaseType arg = CodeActionKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionOptions.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `CodeActionRequest`.+-}+data CodeActionOptions = CodeActionOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ CodeActionKinds that this server may return.++ The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server+ may list out every specific kind they provide.+ -}+ _codeActionKinds :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+ , {-|+ The server provides support to resolve additional+ information for a code action.++ @since 3.16.0+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionOptions)++instance Aeson.ToJSON CodeActionOptions where+ toJSON (CodeActionOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"codeActionKinds" Language.LSP.Protocol.Types.Common..=? arg1+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeActionOptions where+ parseJSON = Aeson.withObject "CodeActionOptions" $ \arg -> CodeActionOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeActionKinds" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionParams.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionContext+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `CodeActionRequest`.+-}+data CodeActionParams = CodeActionParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document in which the command was invoked.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The range for which the command was invoked.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ Context carrying additional information.+ -}+ _context :: Language.LSP.Protocol.Internal.Types.CodeActionContext.CodeActionContext+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionParams)++instance Aeson.ToJSON CodeActionParams where+ toJSON (CodeActionParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,["range" Aeson..= arg3]+ ,["context" Aeson..= arg4]]++instance Aeson.FromJSON CodeActionParams where+ parseJSON = Aeson.withObject "CodeActionParams" $ \arg -> CodeActionParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionRegistrationOptions.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CodeActionRequest`.+-}+data CodeActionRegistrationOptions = CodeActionRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ CodeActionKinds that this server may return.++ The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server+ may list out every specific kind they provide.+ -}+ _codeActionKinds :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+ , {-|+ The server provides support to resolve additional+ information for a code action.++ @since 3.16.0+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeActionRegistrationOptions)++instance Aeson.ToJSON CodeActionRegistrationOptions where+ toJSON (CodeActionRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"codeActionKinds" Language.LSP.Protocol.Types.Common..=? arg2+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON CodeActionRegistrationOptions where+ parseJSON = Aeson.withObject "CodeActionRegistrationOptions" $ \arg -> CodeActionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeActionKinds" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The reason why code actions were requested.++@since 3.17.0+-}+data CodeActionTriggerKind = + {-|+ Code actions were explicitly requested by the user or by an extension.+ -}+ CodeActionTriggerKind_Invoked+ | {-|+ Code actions were requested automatically.++ This typically happens when current selection in a file changes, but can+ also be triggered when file content changes.+ -}+ CodeActionTriggerKind_Automatic+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionTriggerKind)+ deriving Pretty via (ViaJSON CodeActionTriggerKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionTriggerKind where+ knownValues = Data.Set.fromList [CodeActionTriggerKind_Invoked+ ,CodeActionTriggerKind_Automatic]+ type EnumBaseType CodeActionTriggerKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType CodeActionTriggerKind_Invoked = 1+ toEnumBaseType CodeActionTriggerKind_Automatic = 2+ fromEnumBaseType 1 = pure CodeActionTriggerKind_Invoked+ fromEnumBaseType 2 = pure CodeActionTriggerKind_Automatic+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CodeDescription.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeDescription where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Structure to capture a description for an error code.++@since 3.16.0+-}+data CodeDescription = CodeDescription + { {-|+ An URI to open with more information about the diagnostic error.+ -}+ _href :: Language.LSP.Protocol.Types.Uri.Uri+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeDescription)++instance Aeson.ToJSON CodeDescription where+ toJSON (CodeDescription arg0) = Aeson.object $ concat $ [["href" Aeson..= arg0]]++instance Aeson.FromJSON CodeDescription where+ parseJSON = Aeson.withObject "CodeDescription" $ \arg -> CodeDescription <$> arg Aeson..: "href"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLens.hs view
@@ -0,0 +1,55 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLens where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A code lens represents a `Command` that should be shown along with+source text, like the number of references, a way to run tests, etc.++A code lens is _unresolved_ when no command is associated to it. For performance+reasons the creation of a code lens and resolving should be done in two stages.+-}+data CodeLens = CodeLens + { {-|+ The range in which this code lens is valid. Should only span a single line.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The command this code lens represents.+ -}+ _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+ , {-|+ A data entry field that is preserved on a code lens item between+ a `CodeLensRequest`+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLens)++instance Aeson.ToJSON CodeLens where+ toJSON (CodeLens arg0 arg1 arg2) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"command" Language.LSP.Protocol.Types.Common..=? arg1+ ,"data" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeLens where+ parseJSON = Aeson.withObject "CodeLens" $ \arg -> CodeLens <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "command" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities of a `CodeLensRequest`.+-}+data CodeLensClientCapabilities = CodeLensClientCapabilities + { {-|+ Whether code lens supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLensClientCapabilities)++instance Aeson.ToJSON CodeLensClientCapabilities where+ toJSON (CodeLensClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CodeLensClientCapabilities where+ parseJSON = Aeson.withObject "CodeLensClientCapabilities" $ \arg -> CodeLensClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Code Lens provider options of a `CodeLensRequest`.+-}+data CodeLensOptions = CodeLensOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Code lens has a resolve provider as well.+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLensOptions)++instance Aeson.ToJSON CodeLensOptions where+ toJSON (CodeLensOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CodeLensOptions where+ parseJSON = Aeson.withObject "CodeLensOptions" $ \arg -> CodeLensOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `CodeLensRequest`.+-}+data CodeLensParams = CodeLensParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document to request code lens for.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLensParams)++instance Aeson.ToJSON CodeLensParams where+ toJSON (CodeLensParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON CodeLensParams where+ parseJSON = Aeson.withObject "CodeLensParams" $ \arg -> CodeLensParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensRegistrationOptions.hs view
@@ -0,0 +1,49 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CodeLensRequest`.+-}+data CodeLensRegistrationOptions = CodeLensRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Code lens has a resolve provider as well.+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLensRegistrationOptions)++instance Aeson.ToJSON CodeLensRegistrationOptions where+ toJSON (CodeLensRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeLensRegistrationOptions where+ parseJSON = Aeson.withObject "CodeLensRegistrationOptions" $ \arg -> CodeLensRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensWorkspaceClientCapabilities.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data CodeLensWorkspaceClientCapabilities = CodeLensWorkspaceClientCapabilities + { {-|+ Whether the client implementation supports a refresh request sent from the+ server to the client.++ Note that this event is global and will force the client to refresh all+ code lenses currently shown. It should be used with absolute care and is+ useful for situation where a server for example detect a project wide+ change that requires such a calculation.+ -}+ _refreshSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CodeLensWorkspaceClientCapabilities)++instance Aeson.ToJSON CodeLensWorkspaceClientCapabilities where+ toJSON (CodeLensWorkspaceClientCapabilities arg0) = Aeson.object $ concat $ ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CodeLensWorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "CodeLensWorkspaceClientCapabilities" $ \arg -> CodeLensWorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/Color.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Color where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a color in RGBA space.+-}+data Color = Color + { {-|+ The red component of this color in the range [0-1].+ -}+ _red :: Float+ , {-|+ The green component of this color in the range [0-1].+ -}+ _green :: Float+ , {-|+ The blue component of this color in the range [0-1].+ -}+ _blue :: Float+ , {-|+ The alpha component of this color in the range [0-1].+ -}+ _alpha :: Float+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Color)++instance Aeson.ToJSON Color where+ toJSON (Color arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["red" Aeson..= arg0]+ ,["green" Aeson..= arg1]+ ,["blue" Aeson..= arg2]+ ,["alpha" Aeson..= arg3]]++instance Aeson.FromJSON Color where+ parseJSON = Aeson.withObject "Color" $ \arg -> Color <$> arg Aeson..: "red" <*> arg Aeson..: "green" <*> arg Aeson..: "blue" <*> arg Aeson..: "alpha"
+ generated/Language/LSP/Protocol/Internal/Types/ColorInformation.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Color+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a color range from a document.+-}+data ColorInformation = ColorInformation + { {-|+ The range in the document where this color appears.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The actual color value for this color range.+ -}+ _color :: Language.LSP.Protocol.Internal.Types.Color.Color+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ColorInformation)++instance Aeson.ToJSON ColorInformation where+ toJSON (ColorInformation arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,["color" Aeson..= arg1]]++instance Aeson.FromJSON ColorInformation where+ parseJSON = Aeson.withObject "ColorInformation" $ \arg -> ColorInformation <$> arg Aeson..: "range" <*> arg Aeson..: "color"
+ generated/Language/LSP/Protocol/Internal/Types/ColorPresentation.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorPresentation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ColorPresentation = ColorPresentation + { {-|+ The label of this color presentation. It will be shown on the color+ picker header. By default this is also the text that is inserted when selecting+ this color presentation.+ -}+ _label :: Data.Text.Text+ , {-|+ An `TextEdit` which is applied to a document when selecting+ this presentation for the color. When `falsy` the `ColorPresentation.label`+ is used.+ -}+ _textEdit :: (Maybe Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit)+ , {-|+ An optional array of additional `TextEdit` that are applied when+ selecting this color presentation. Edits must not overlap with the main `ColorPresentation.textEdit` nor with themselves.+ -}+ _additionalTextEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ColorPresentation)++instance Aeson.ToJSON ColorPresentation where+ toJSON (ColorPresentation arg0 arg1 arg2) = Aeson.object $ concat $ [["label" Aeson..= arg0]+ ,"textEdit" Language.LSP.Protocol.Types.Common..=? arg1+ ,"additionalTextEdits" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ColorPresentation where+ parseJSON = Aeson.withObject "ColorPresentation" $ \arg -> ColorPresentation <$> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "textEdit" <*> arg Language.LSP.Protocol.Types.Common..:!? "additionalTextEdits"
+ generated/Language/LSP/Protocol/Internal/Types/ColorPresentationParams.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorPresentationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Color+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `ColorPresentationRequest`.+-}+data ColorPresentationParams = ColorPresentationParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The color to request presentations for.+ -}+ _color :: Language.LSP.Protocol.Internal.Types.Color.Color+ , {-|+ The range where the color would be inserted. Serves as a context.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ColorPresentationParams)++instance Aeson.ToJSON ColorPresentationParams where+ toJSON (ColorPresentationParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,["color" Aeson..= arg3]+ ,["range" Aeson..= arg4]]++instance Aeson.FromJSON ColorPresentationParams where+ parseJSON = Aeson.withObject "ColorPresentationParams" $ \arg -> ColorPresentationParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "color" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/Command.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Command where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a reference to a command. Provides a title which+will be used to represent a command in the UI and, optionally,+an array of arguments which will be passed to the command handler+function when invoked.+-}+data Command = Command + { {-|+ Title of the command, like `save`.+ -}+ _title :: Data.Text.Text+ , {-|+ The identifier of the actual command handler.+ -}+ _command :: Data.Text.Text+ , {-|+ Arguments that the command handler should be+ invoked with.+ -}+ _arguments :: (Maybe [Data.Aeson.Value])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Command)++instance Aeson.ToJSON Command where+ toJSON (Command arg0 arg1 arg2) = Aeson.object $ concat $ [["title" Aeson..= arg0]+ ,["command" Aeson..= arg1]+ ,"arguments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON Command where+ parseJSON = Aeson.withObject "Command" $ \arg -> Command <$> arg Aeson..: "title" <*> arg Aeson..: "command" <*> arg Language.LSP.Protocol.Types.Common..:!? "arguments"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionClientCapabilities.hs view
@@ -0,0 +1,75 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind+import qualified Language.LSP.Protocol.Internal.Types.CompletionListCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion client capabilities+-}+data CompletionClientCapabilities = CompletionClientCapabilities + { {-|+ Whether completion supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports the following `CompletionItem` specific+ capabilities.+ -}+ _completionItem :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions.ClientCompletionItemOptions)+ , {-|++ -}+ _completionItemKind :: (Maybe Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind.ClientCompletionItemOptionsKind)+ , {-|+ Defines how the client handles whitespace and indentation+ when accepting a completion item that uses multi line+ text in either `insertText` or `textEdit`.++ @since 3.17.0+ -}+ _insertTextMode :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode)+ , {-|+ The client supports to send additional context information for a+ `textDocument/completion` request.+ -}+ _contextSupport :: (Maybe Bool)+ , {-|+ The client supports the following `CompletionList` specific+ capabilities.++ @since 3.17.0+ -}+ _completionList :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionListCapabilities.CompletionListCapabilities)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionClientCapabilities)++instance Aeson.ToJSON CompletionClientCapabilities where+ toJSON (CompletionClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg1+ ,"completionItemKind" Language.LSP.Protocol.Types.Common..=? arg2+ ,"insertTextMode" Language.LSP.Protocol.Types.Common..=? arg3+ ,"contextSupport" Language.LSP.Protocol.Types.Common..=? arg4+ ,"completionList" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON CompletionClientCapabilities where+ parseJSON = Aeson.withObject "CompletionClientCapabilities" $ \arg -> CompletionClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionItem" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionItemKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextMode" <*> arg Language.LSP.Protocol.Types.Common..:!? "contextSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionList"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionContext.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CompletionTriggerKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Contains additional information about the context in which a completion request is triggered.+-}+data CompletionContext = CompletionContext + { {-|+ How the completion was triggered.+ -}+ _triggerKind :: Language.LSP.Protocol.Internal.Types.CompletionTriggerKind.CompletionTriggerKind+ , {-|+ The trigger character (a single character) that has trigger code complete.+ Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`+ -}+ _triggerCharacter :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionContext)++instance Aeson.ToJSON CompletionContext where+ toJSON (CompletionContext arg0 arg1) = Aeson.object $ concat $ [["triggerKind" Aeson..= arg0]+ ,"triggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CompletionContext where+ parseJSON = Aeson.withObject "CompletionContext" $ \arg -> CompletionContext <$> arg Aeson..: "triggerKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItem.hs view
@@ -0,0 +1,218 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemKind+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemTag+import qualified Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+import qualified Language.LSP.Protocol.Internal.Types.InsertTextFormat+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+A completion item represents a text snippet that is+proposed to complete text that is being typed.+-}+data CompletionItem = CompletionItem + { {-|+ The label of this completion item.++ The label property is also by default the text that+ is inserted when selecting this completion.++ If label details are provided the label itself should+ be an unqualified name of the completion item.+ -}+ _label :: Data.Text.Text+ , {-|+ Additional details for the label++ @since 3.17.0+ -}+ _labelDetails :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails.CompletionItemLabelDetails)+ , {-|+ The kind of this completion item. Based of the kind+ an icon is chosen by the editor.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemKind.CompletionItemKind)+ , {-|+ Tags for this completion item.++ @since 3.15.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.CompletionItemTag.CompletionItemTag])+ , {-|+ A human-readable string with additional information+ about this item, like type or symbol information.+ -}+ _detail :: (Maybe Data.Text.Text)+ , {-|+ A human-readable string that represents a doc-comment.+ -}+ _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+ , {-|+ Indicates if this item is deprecated.+ @deprecated Use `tags` instead.+ -}+ _deprecated :: (Maybe Bool)+ , {-|+ Select this item when showing.++ *Note* that only one completion item can be selected and that the+ tool / client decides which item that is. The rule is that the *first*+ item of those that match best is selected.+ -}+ _preselect :: (Maybe Bool)+ , {-|+ A string that should be used when comparing this item+ with other items. When `falsy` the `CompletionItem.label`+ is used.+ -}+ _sortText :: (Maybe Data.Text.Text)+ , {-|+ A string that should be used when filtering a set of+ completion items. When `falsy` the `CompletionItem.label`+ is used.+ -}+ _filterText :: (Maybe Data.Text.Text)+ , {-|+ A string that should be inserted into a document when selecting+ this completion. When `falsy` the `CompletionItem.label`+ is used.++ The `insertText` is subject to interpretation by the client side.+ Some tools might not take the string literally. For example+ VS Code when code complete is requested in this example+ `con<cursor position>` and a completion item with an `insertText` of+ `console` is provided it will only insert `sole`. Therefore it is+ recommended to use `textEdit` instead since it avoids additional client+ side interpretation.+ -}+ _insertText :: (Maybe Data.Text.Text)+ , {-|+ The format of the insert text. The format applies to both the+ `insertText` property and the `newText` property of a provided+ `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.++ Please note that the insertTextFormat doesn't apply to+ `additionalTextEdits`.+ -}+ _insertTextFormat :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextFormat.InsertTextFormat)+ , {-|+ How whitespace and indentation is handled during completion+ item insertion. If not provided the clients default value depends on+ the `textDocument.completion.insertTextMode` client capability.++ @since 3.16.0+ -}+ _insertTextMode :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode)+ , {-|+ An `TextEdit` which is applied to a document when selecting+ this completion. When an edit is provided the value of+ `CompletionItem.insertText` is ignored.++ Most editors support two different operations when accepting a completion+ item. One is to insert a completion text and the other is to replace an+ existing text with a completion text. Since this can usually not be+ predetermined by a server it can report both ranges. Clients need to+ signal support for `InsertReplaceEdits` via the+ `textDocument.completion.insertReplaceSupport` client capability+ property.++ *Note 1:* The text edit's range as well as both ranges from an insert+ replace edit must be a [single line] and they must contain the position+ at which completion has been requested.+ *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range+ must be a prefix of the edit's replace range, that means it must be+ contained and starting at the same position.++ @since 3.16.0 additional type `InsertReplaceEdit`+ -}+ _textEdit :: (Maybe (Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InsertReplaceEdit.InsertReplaceEdit))+ , {-|+ The edit text used if the completion item is part of a CompletionList and+ CompletionList defines an item default for the text edit range.++ Clients will only honor this property if they opt into completion list+ item defaults using the capability `completionList.itemDefaults`.++ If not provided and a list's default range is provided the label+ property is used as a text.++ @since 3.17.0+ -}+ _textEditText :: (Maybe Data.Text.Text)+ , {-|+ An optional array of additional `TextEdit` that are applied when+ selecting this completion. Edits must not overlap (including the same insert position)+ with the main `CompletionItem.textEdit` nor with themselves.++ Additional text edits should be used to change text unrelated to the current cursor position+ (for example adding an import statement at the top of the file if the completion item will+ insert an unqualified type).+ -}+ _additionalTextEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+ , {-|+ An optional set of characters that when pressed while this completion is active will accept it first and+ then type that character. *Note* that all commit characters should have `length=1` and that superfluous+ characters will be ignored.+ -}+ _commitCharacters :: (Maybe [Data.Text.Text])+ , {-|+ An optional `Command` that is executed *after* inserting this completion. *Note* that+ additional modifications to the current document should be described with the+ `CompletionItem.additionalTextEdits`-property.+ -}+ _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+ , {-|+ A data entry field that is preserved on a completion item between a+ `CompletionRequest`.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionItem)++instance Aeson.ToJSON CompletionItem where+ toJSON (CompletionItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18) = Aeson.object $ concat $ [["label" Aeson..= arg0]+ ,"labelDetails" Language.LSP.Protocol.Types.Common..=? arg1+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg2+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg3+ ,"detail" Language.LSP.Protocol.Types.Common..=? arg4+ ,"documentation" Language.LSP.Protocol.Types.Common..=? arg5+ ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg6+ ,"preselect" Language.LSP.Protocol.Types.Common..=? arg7+ ,"sortText" Language.LSP.Protocol.Types.Common..=? arg8+ ,"filterText" Language.LSP.Protocol.Types.Common..=? arg9+ ,"insertText" Language.LSP.Protocol.Types.Common..=? arg10+ ,"insertTextFormat" Language.LSP.Protocol.Types.Common..=? arg11+ ,"insertTextMode" Language.LSP.Protocol.Types.Common..=? arg12+ ,"textEdit" Language.LSP.Protocol.Types.Common..=? arg13+ ,"textEditText" Language.LSP.Protocol.Types.Common..=? arg14+ ,"additionalTextEdits" Language.LSP.Protocol.Types.Common..=? arg15+ ,"commitCharacters" Language.LSP.Protocol.Types.Common..=? arg16+ ,"command" Language.LSP.Protocol.Types.Common..=? arg17+ ,"data" Language.LSP.Protocol.Types.Common..=? arg18]++instance Aeson.FromJSON CompletionItem where+ parseJSON = Aeson.withObject "CompletionItem" $ \arg -> CompletionItem <$> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "labelDetails" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "detail" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentation" <*> arg Language.LSP.Protocol.Types.Common..:!? "deprecated" <*> arg Language.LSP.Protocol.Types.Common..:!? "preselect" <*> arg Language.LSP.Protocol.Types.Common..:!? "sortText" <*> arg Language.LSP.Protocol.Types.Common..:!? "filterText" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertText" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextFormat" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextMode" <*> arg Language.LSP.Protocol.Types.Common..:!? "textEdit" <*> arg Language.LSP.Protocol.Types.Common..:!? "textEditText" <*> arg Language.LSP.Protocol.Types.Common..:!? "additionalTextEdits" <*> arg Language.LSP.Protocol.Types.Common..:!? "commitCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "command" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemDefaults.hs view
@@ -0,0 +1,85 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemDefaults where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace+import qualified Language.LSP.Protocol.Internal.Types.InsertTextFormat+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+In many cases the items of an actual completion result share the same+value for properties like `commitCharacters` or the range of a text+edit. A completion list can therefore define item defaults which will+be used if a completion item itself doesn't specify the value.++If a completion list specifies a default value and a completion item+also specifies a corresponding value the one from the item is used.++Servers are only allowed to return default values if the client+signals support for this via the `completionList.itemDefaults`+capability.++@since 3.17.0+-}+data CompletionItemDefaults = CompletionItemDefaults + { {-|+ A default commit character set.++ @since 3.17.0+ -}+ _commitCharacters :: (Maybe [Data.Text.Text])+ , {-|+ A default edit range.++ @since 3.17.0+ -}+ _editRange :: (Maybe (Language.LSP.Protocol.Internal.Types.Range.Range Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace.EditRangeWithInsertReplace))+ , {-|+ A default insert text format.++ @since 3.17.0+ -}+ _insertTextFormat :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextFormat.InsertTextFormat)+ , {-|+ A default insert text mode.++ @since 3.17.0+ -}+ _insertTextMode :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode)+ , {-|+ A default data value.++ @since 3.17.0+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionItemDefaults)++instance Aeson.ToJSON CompletionItemDefaults where+ toJSON (CompletionItemDefaults arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["commitCharacters" Language.LSP.Protocol.Types.Common..=? arg0+ ,"editRange" Language.LSP.Protocol.Types.Common..=? arg1+ ,"insertTextFormat" Language.LSP.Protocol.Types.Common..=? arg2+ ,"insertTextMode" Language.LSP.Protocol.Types.Common..=? arg3+ ,"data" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON CompletionItemDefaults where+ parseJSON = Aeson.withObject "CompletionItemDefaults" $ \arg -> CompletionItemDefaults <$> arg Language.LSP.Protocol.Types.Common..:!? "commitCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "editRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextFormat" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertTextMode" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs view
@@ -0,0 +1,212 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The kind of a completion entry.+-}+data CompletionItemKind = + {-|++ -}+ CompletionItemKind_Text+ | {-|++ -}+ CompletionItemKind_Method+ | {-|++ -}+ CompletionItemKind_Function+ | {-|++ -}+ CompletionItemKind_Constructor+ | {-|++ -}+ CompletionItemKind_Field+ | {-|++ -}+ CompletionItemKind_Variable+ | {-|++ -}+ CompletionItemKind_Class+ | {-|++ -}+ CompletionItemKind_Interface+ | {-|++ -}+ CompletionItemKind_Module+ | {-|++ -}+ CompletionItemKind_Property+ | {-|++ -}+ CompletionItemKind_Unit+ | {-|++ -}+ CompletionItemKind_Value+ | {-|++ -}+ CompletionItemKind_Enum+ | {-|++ -}+ CompletionItemKind_Keyword+ | {-|++ -}+ CompletionItemKind_Snippet+ | {-|++ -}+ CompletionItemKind_Color+ | {-|++ -}+ CompletionItemKind_File+ | {-|++ -}+ CompletionItemKind_Reference+ | {-|++ -}+ CompletionItemKind_Folder+ | {-|++ -}+ CompletionItemKind_EnumMember+ | {-|++ -}+ CompletionItemKind_Constant+ | {-|++ -}+ CompletionItemKind_Struct+ | {-|++ -}+ CompletionItemKind_Event+ | {-|++ -}+ CompletionItemKind_Operator+ | {-|++ -}+ CompletionItemKind_TypeParameter+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemKind)+ deriving Pretty via (ViaJSON CompletionItemKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemKind where+ knownValues = Data.Set.fromList [CompletionItemKind_Text+ ,CompletionItemKind_Method+ ,CompletionItemKind_Function+ ,CompletionItemKind_Constructor+ ,CompletionItemKind_Field+ ,CompletionItemKind_Variable+ ,CompletionItemKind_Class+ ,CompletionItemKind_Interface+ ,CompletionItemKind_Module+ ,CompletionItemKind_Property+ ,CompletionItemKind_Unit+ ,CompletionItemKind_Value+ ,CompletionItemKind_Enum+ ,CompletionItemKind_Keyword+ ,CompletionItemKind_Snippet+ ,CompletionItemKind_Color+ ,CompletionItemKind_File+ ,CompletionItemKind_Reference+ ,CompletionItemKind_Folder+ ,CompletionItemKind_EnumMember+ ,CompletionItemKind_Constant+ ,CompletionItemKind_Struct+ ,CompletionItemKind_Event+ ,CompletionItemKind_Operator+ ,CompletionItemKind_TypeParameter]+ type EnumBaseType CompletionItemKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType CompletionItemKind_Text = 1+ toEnumBaseType CompletionItemKind_Method = 2+ toEnumBaseType CompletionItemKind_Function = 3+ toEnumBaseType CompletionItemKind_Constructor = 4+ toEnumBaseType CompletionItemKind_Field = 5+ toEnumBaseType CompletionItemKind_Variable = 6+ toEnumBaseType CompletionItemKind_Class = 7+ toEnumBaseType CompletionItemKind_Interface = 8+ toEnumBaseType CompletionItemKind_Module = 9+ toEnumBaseType CompletionItemKind_Property = 10+ toEnumBaseType CompletionItemKind_Unit = 11+ toEnumBaseType CompletionItemKind_Value = 12+ toEnumBaseType CompletionItemKind_Enum = 13+ toEnumBaseType CompletionItemKind_Keyword = 14+ toEnumBaseType CompletionItemKind_Snippet = 15+ toEnumBaseType CompletionItemKind_Color = 16+ toEnumBaseType CompletionItemKind_File = 17+ toEnumBaseType CompletionItemKind_Reference = 18+ toEnumBaseType CompletionItemKind_Folder = 19+ toEnumBaseType CompletionItemKind_EnumMember = 20+ toEnumBaseType CompletionItemKind_Constant = 21+ toEnumBaseType CompletionItemKind_Struct = 22+ toEnumBaseType CompletionItemKind_Event = 23+ toEnumBaseType CompletionItemKind_Operator = 24+ toEnumBaseType CompletionItemKind_TypeParameter = 25+ fromEnumBaseType 1 = pure CompletionItemKind_Text+ fromEnumBaseType 2 = pure CompletionItemKind_Method+ fromEnumBaseType 3 = pure CompletionItemKind_Function+ fromEnumBaseType 4 = pure CompletionItemKind_Constructor+ fromEnumBaseType 5 = pure CompletionItemKind_Field+ fromEnumBaseType 6 = pure CompletionItemKind_Variable+ fromEnumBaseType 7 = pure CompletionItemKind_Class+ fromEnumBaseType 8 = pure CompletionItemKind_Interface+ fromEnumBaseType 9 = pure CompletionItemKind_Module+ fromEnumBaseType 10 = pure CompletionItemKind_Property+ fromEnumBaseType 11 = pure CompletionItemKind_Unit+ fromEnumBaseType 12 = pure CompletionItemKind_Value+ fromEnumBaseType 13 = pure CompletionItemKind_Enum+ fromEnumBaseType 14 = pure CompletionItemKind_Keyword+ fromEnumBaseType 15 = pure CompletionItemKind_Snippet+ fromEnumBaseType 16 = pure CompletionItemKind_Color+ fromEnumBaseType 17 = pure CompletionItemKind_File+ fromEnumBaseType 18 = pure CompletionItemKind_Reference+ fromEnumBaseType 19 = pure CompletionItemKind_Folder+ fromEnumBaseType 20 = pure CompletionItemKind_EnumMember+ fromEnumBaseType 21 = pure CompletionItemKind_Constant+ fromEnumBaseType 22 = pure CompletionItemKind_Struct+ fromEnumBaseType 23 = pure CompletionItemKind_Event+ fromEnumBaseType 24 = pure CompletionItemKind_Operator+ fromEnumBaseType 25 = pure CompletionItemKind_TypeParameter+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemLabelDetails.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional details for a completion item label.++@since 3.17.0+-}+data CompletionItemLabelDetails = CompletionItemLabelDetails + { {-|+ An optional string which is rendered less prominently directly after `CompletionItem.label`,+ without any spacing. Should be used for function signatures and type annotations.+ -}+ _detail :: (Maybe Data.Text.Text)+ , {-|+ An optional string which is rendered less prominently after `CompletionItem.detail`. Should be used+ for fully qualified names and file paths.+ -}+ _description :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionItemLabelDetails)++instance Aeson.ToJSON CompletionItemLabelDetails where+ toJSON (CompletionItemLabelDetails arg0 arg1) = Aeson.object $ concat $ ["detail" Language.LSP.Protocol.Types.Common..=? arg0+ ,"description" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CompletionItemLabelDetails where+ parseJSON = Aeson.withObject "CompletionItemLabelDetails" $ \arg -> CompletionItemLabelDetails <$> arg Language.LSP.Protocol.Types.Common..:!? "detail" <*> arg Language.LSP.Protocol.Types.Common..:!? "description"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Completion item tags are extra annotations that tweak the rendering of a completion+item.++@since 3.15.0+-}+data CompletionItemTag = + {-|+ Render a completion as obsolete, usually using a strike-out.+ -}+ CompletionItemTag_Deprecated+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemTag)+ deriving Pretty via (ViaJSON CompletionItemTag)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemTag where+ knownValues = Data.Set.fromList [CompletionItemTag_Deprecated]+ type EnumBaseType CompletionItemTag = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType CompletionItemTag_Deprecated = 1+ fromEnumBaseType 1 = pure CompletionItemTag_Deprecated+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemTagOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemTag+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data CompletionItemTagOptions = CompletionItemTagOptions + { {-|+ The tags supported by the client.+ -}+ _valueSet :: [Language.LSP.Protocol.Internal.Types.CompletionItemTag.CompletionItemTag]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionItemTagOptions)++instance Aeson.ToJSON CompletionItemTagOptions where+ toJSON (CompletionItemTagOptions arg0) = Aeson.object $ concat $ [["valueSet" Aeson..= arg0]]++instance Aeson.FromJSON CompletionItemTagOptions where+ parseJSON = Aeson.withObject "CompletionItemTagOptions" $ \arg -> CompletionItemTagOptions <$> arg Aeson..: "valueSet"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionList.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionList where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CompletionItem+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemDefaults+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a collection of `CompletionItem` to be presented+in the editor.+-}+data CompletionList = CompletionList + { {-|+ This list it not complete. Further typing results in recomputing this list.++ Recomputed lists have all their items replaced (not appended) in the+ incomplete completion sessions.+ -}+ _isIncomplete :: Bool+ , {-|+ In many cases the items of an actual completion result share the same+ value for properties like `commitCharacters` or the range of a text+ edit. A completion list can therefore define item defaults which will+ be used if a completion item itself doesn't specify the value.++ If a completion list specifies a default value and a completion item+ also specifies a corresponding value the one from the item is used.++ Servers are only allowed to return default values if the client+ signals support for this via the `completionList.itemDefaults`+ capability.++ @since 3.17.0+ -}+ _itemDefaults :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemDefaults.CompletionItemDefaults)+ , {-|+ The completion items.+ -}+ _items :: [Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionList)++instance Aeson.ToJSON CompletionList where+ toJSON (CompletionList arg0 arg1 arg2) = Aeson.object $ concat $ [["isIncomplete" Aeson..= arg0]+ ,"itemDefaults" Language.LSP.Protocol.Types.Common..=? arg1+ ,["items" Aeson..= arg2]]++instance Aeson.FromJSON CompletionList where+ parseJSON = Aeson.withObject "CompletionList" $ \arg -> CompletionList <$> arg Aeson..: "isIncomplete" <*> arg Language.LSP.Protocol.Types.Common..:!? "itemDefaults" <*> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionListCapabilities.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionListCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+The client supports the following `CompletionList` specific+capabilities.++@since 3.17.0+-}+data CompletionListCapabilities = CompletionListCapabilities + { {-|+ The client supports the following itemDefaults on+ a completion list.++ The value lists the supported property names of the+ `CompletionList.itemDefaults` object. If omitted+ no properties are supported.++ @since 3.17.0+ -}+ _itemDefaults :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionListCapabilities)++instance Aeson.ToJSON CompletionListCapabilities where+ toJSON (CompletionListCapabilities arg0) = Aeson.object $ concat $ ["itemDefaults" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CompletionListCapabilities where+ parseJSON = Aeson.withObject "CompletionListCapabilities" $ \arg -> CompletionListCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "itemDefaults"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionOptions.hs view
@@ -0,0 +1,77 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion options.+-}+data CompletionOptions = CompletionOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Most tools trigger completion request automatically without explicitly requesting+ it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user+ starts to type an identifier. For example if the user types `c` in a JavaScript file+ code complete will automatically pop up present `console` besides others as a+ completion item. Characters that make up identifiers don't need to be listed here.++ If code complete should automatically be trigger on characters not being valid inside+ an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.+ -}+ _triggerCharacters :: (Maybe [Data.Text.Text])+ , {-|+ The list of all possible characters that commit a completion. This field can be used+ if clients don't support individual commit characters per completion item. See+ `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`++ If a server provides both `allCommitCharacters` and commit characters on an individual+ completion item the ones on the completion item win.++ @since 3.2.0+ -}+ _allCommitCharacters :: (Maybe [Data.Text.Text])+ , {-|+ The server provides support to resolve additional+ information for a completion item.+ -}+ _resolveProvider :: (Maybe Bool)+ , {-|+ The server supports the following `CompletionItem` specific+ capabilities.++ @since 3.17.0+ -}+ _completionItem :: (Maybe Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions.ServerCompletionItemOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionOptions)++instance Aeson.ToJSON CompletionOptions where+ toJSON (CompletionOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg1+ ,"allCommitCharacters" Language.LSP.Protocol.Types.Common..=? arg2+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg3+ ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON CompletionOptions where+ parseJSON = Aeson.withObject "CompletionOptions" $ \arg -> CompletionOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "allCommitCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionItem"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionParams.hs view
@@ -0,0 +1,63 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CompletionContext+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion parameters+-}+data CompletionParams = CompletionParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The completion context. This is only available it the client specifies+ to send this using the client capability `textDocument.completion.contextSupport === true`+ -}+ _context :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionContext.CompletionContext)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionParams)++instance Aeson.ToJSON CompletionParams where+ toJSON (CompletionParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3+ ,"context" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON CompletionParams where+ parseJSON = Aeson.withObject "CompletionParams" $ \arg -> CompletionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "context"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionRegistrationOptions.hs view
@@ -0,0 +1,84 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CompletionRequest`.+-}+data CompletionRegistrationOptions = CompletionRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Most tools trigger completion request automatically without explicitly requesting+ it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user+ starts to type an identifier. For example if the user types `c` in a JavaScript file+ code complete will automatically pop up present `console` besides others as a+ completion item. Characters that make up identifiers don't need to be listed here.++ If code complete should automatically be trigger on characters not being valid inside+ an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.+ -}+ _triggerCharacters :: (Maybe [Data.Text.Text])+ , {-|+ The list of all possible characters that commit a completion. This field can be used+ if clients don't support individual commit characters per completion item. See+ `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`++ If a server provides both `allCommitCharacters` and commit characters on an individual+ completion item the ones on the completion item win.++ @since 3.2.0+ -}+ _allCommitCharacters :: (Maybe [Data.Text.Text])+ , {-|+ The server provides support to resolve additional+ information for a completion item.+ -}+ _resolveProvider :: (Maybe Bool)+ , {-|+ The server supports the following `CompletionItem` specific+ capabilities.++ @since 3.17.0+ -}+ _completionItem :: (Maybe Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions.ServerCompletionItemOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CompletionRegistrationOptions)++instance Aeson.ToJSON CompletionRegistrationOptions where+ toJSON (CompletionRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2+ ,"allCommitCharacters" Language.LSP.Protocol.Types.Common..=? arg3+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg4+ ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON CompletionRegistrationOptions where+ parseJSON = Aeson.withObject "CompletionRegistrationOptions" $ \arg -> CompletionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "allCommitCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionItem"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs view
@@ -0,0 +1,60 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How a completion was triggered+-}+data CompletionTriggerKind = + {-|+ Completion was triggered by typing an identifier (24x7 code+ complete), manual invocation (e.g Ctrl+Space) or via API.+ -}+ CompletionTriggerKind_Invoked+ | {-|+ Completion was triggered by a trigger character specified by+ the `triggerCharacters` properties of the `CompletionRegistrationOptions`.+ -}+ CompletionTriggerKind_TriggerCharacter+ | {-|+ Completion was re-triggered as current completion list is incomplete+ -}+ CompletionTriggerKind_TriggerForIncompleteCompletions+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionTriggerKind)+ deriving Pretty via (ViaJSON CompletionTriggerKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionTriggerKind where+ knownValues = Data.Set.fromList [CompletionTriggerKind_Invoked+ ,CompletionTriggerKind_TriggerCharacter+ ,CompletionTriggerKind_TriggerForIncompleteCompletions]+ type EnumBaseType CompletionTriggerKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType CompletionTriggerKind_Invoked = 1+ toEnumBaseType CompletionTriggerKind_TriggerCharacter = 2+ toEnumBaseType CompletionTriggerKind_TriggerForIncompleteCompletions = 3+ fromEnumBaseType 1 = pure CompletionTriggerKind_Invoked+ fromEnumBaseType 2 = pure CompletionTriggerKind_TriggerCharacter+ fromEnumBaseType 3 = pure CompletionTriggerKind_TriggerForIncompleteCompletions+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/ConfigurationItem.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ConfigurationItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|++-}+data ConfigurationItem = ConfigurationItem + { {-|+ The scope to get the configuration section for.+ -}+ _scopeUri :: (Maybe Language.LSP.Protocol.Types.Uri.Uri)+ , {-|+ The configuration section asked for.+ -}+ _section :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ConfigurationItem)++instance Aeson.ToJSON ConfigurationItem where+ toJSON (ConfigurationItem arg0 arg1) = Aeson.object $ concat $ ["scopeUri" Language.LSP.Protocol.Types.Common..=? arg0+ ,"section" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ConfigurationItem where+ parseJSON = Aeson.withObject "ConfigurationItem" $ \arg -> ConfigurationItem <$> arg Language.LSP.Protocol.Types.Common..:!? "scopeUri" <*> arg Language.LSP.Protocol.Types.Common..:!? "section"
+ generated/Language/LSP/Protocol/Internal/Types/ConfigurationParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ConfigurationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a configuration request.+-}+data ConfigurationParams = ConfigurationParams + { {-|++ -}+ _items :: [Language.LSP.Protocol.Internal.Types.ConfigurationItem.ConfigurationItem]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ConfigurationParams)++instance Aeson.ToJSON ConfigurationParams where+ toJSON (ConfigurationParams arg0) = Aeson.object $ concat $ [["items" Aeson..= arg0]]++instance Aeson.FromJSON ConfigurationParams where+ parseJSON = Aeson.withObject "ConfigurationParams" $ \arg -> ConfigurationParams <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFile.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.CreateFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Create file operation.+-}+data CreateFile = CreateFile + { {-|+ An optional annotation identifier describing the operation.++ @since 3.16.0+ -}+ _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+ , {-|+ A create+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "create")+ , {-|+ The resource to create.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Additional options+ -}+ _options :: (Maybe Language.LSP.Protocol.Internal.Types.CreateFileOptions.CreateFileOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CreateFile)++instance Aeson.ToJSON CreateFile where+ toJSON (CreateFile arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+ ,["kind" Aeson..= arg1]+ ,["uri" Aeson..= arg2]+ ,"options" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON CreateFile where+ parseJSON = Aeson.withObject "CreateFile" $ \arg -> CreateFile <$> arg Language.LSP.Protocol.Types.Common..:!? "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "uri" <*> arg Language.LSP.Protocol.Types.Common..:!? "options"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFileOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Options to create a file.+-}+data CreateFileOptions = CreateFileOptions + { {-|+ Overwrite existing file. Overwrite wins over `ignoreIfExists`+ -}+ _overwrite :: (Maybe Bool)+ , {-|+ Ignore if exists.+ -}+ _ignoreIfExists :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CreateFileOptions)++instance Aeson.ToJSON CreateFileOptions where+ toJSON (CreateFileOptions arg0 arg1) = Aeson.object $ concat $ ["overwrite" Language.LSP.Protocol.Types.Common..=? arg0+ ,"ignoreIfExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CreateFileOptions where+ parseJSON = Aeson.withObject "CreateFileOptions" $ \arg -> CreateFileOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "overwrite" <*> arg Language.LSP.Protocol.Types.Common..:!? "ignoreIfExists"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFilesParams.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileCreate+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated creation of+files.++@since 3.16.0+-}+data CreateFilesParams = CreateFilesParams + { {-|+ An array of all files/folders created in this operation.+ -}+ _files :: [Language.LSP.Protocol.Internal.Types.FileCreate.FileCreate]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON CreateFilesParams)++instance Aeson.ToJSON CreateFilesParams where+ toJSON (CreateFilesParams arg0) = Aeson.object $ concat $ [["files" Aeson..= arg0]]++instance Aeson.FromJSON CreateFilesParams where+ parseJSON = Aeson.withObject "CreateFilesParams" $ \arg -> CreateFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/Declaration.hs view
@@ -0,0 +1,28 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Declaration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+The declaration of a symbol representation as one or many `Location`.+-}+newtype Declaration = Declaration (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.Location.Location])+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Declaration)
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationClientCapabilities.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.14.0+-}+data DeclarationClientCapabilities = DeclarationClientCapabilities + { {-|+ Whether declaration supports dynamic registration. If this is set to `true`+ the client supports the new `DeclarationRegistrationOptions` return value+ for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports additional metadata in the form of declaration links.+ -}+ _linkSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeclarationClientCapabilities)++instance Aeson.ToJSON DeclarationClientCapabilities where+ toJSON (DeclarationClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DeclarationClientCapabilities where+ parseJSON = Aeson.withObject "DeclarationClientCapabilities" $ \arg -> DeclarationClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationLink.hs view
@@ -0,0 +1,33 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.LocationLink++{-|+Information about where a symbol is declared.++Provides additional metadata over normal `Location` declarations, including the range of+the declaring symbol.++Servers should prefer returning `DeclarationLink` over `Declaration` if supported+by the client.+-}+newtype DeclarationLink = DeclarationLink Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeclarationLink)
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationOptions = DeclarationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeclarationOptions)++instance Aeson.ToJSON DeclarationOptions where+ toJSON (DeclarationOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DeclarationOptions where+ parseJSON = Aeson.withObject "DeclarationOptions" $ \arg -> DeclarationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationParams = DeclarationParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeclarationParams)++instance Aeson.ToJSON DeclarationParams where+ toJSON (DeclarationParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DeclarationParams where+ parseJSON = Aeson.withObject "DeclarationParams" $ \arg -> DeclarationParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationRegistrationOptions = DeclarationRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeclarationRegistrationOptions)++instance Aeson.ToJSON DeclarationRegistrationOptions where+ toJSON (DeclarationRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["documentSelector" Aeson..= arg1]+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DeclarationRegistrationOptions where+ parseJSON = Aeson.withObject "DeclarationRegistrationOptions" $ \arg -> DeclarationRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/Definition.hs view
@@ -0,0 +1,33 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Definition where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+The definition of a symbol represented as one or many `Location`.+For most programming languages there is only one location at which a symbol is+defined.++Servers should prefer returning `DefinitionLink` over `Definition` if supported+by the client.+-}+newtype Definition = Definition (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.Location.Location])+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Definition)
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionClientCapabilities.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DefinitionRequest`.+-}+data DefinitionClientCapabilities = DefinitionClientCapabilities + { {-|+ Whether definition supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports additional metadata in the form of definition links.++ @since 3.14.0+ -}+ _linkSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DefinitionClientCapabilities)++instance Aeson.ToJSON DefinitionClientCapabilities where+ toJSON (DefinitionClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DefinitionClientCapabilities where+ parseJSON = Aeson.withObject "DefinitionClientCapabilities" $ \arg -> DefinitionClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionLink.hs view
@@ -0,0 +1,30 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.LocationLink++{-|+Information about where a symbol is defined.++Provides additional metadata over normal `Location` definitions, including the range of+the defining symbol+-}+newtype DefinitionLink = DefinitionLink Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DefinitionLink)
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Server Capabilities for a `DefinitionRequest`.+-}+data DefinitionOptions = DefinitionOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DefinitionOptions)++instance Aeson.ToJSON DefinitionOptions where+ toJSON (DefinitionOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DefinitionOptions where+ parseJSON = Aeson.withObject "DefinitionOptions" $ \arg -> DefinitionOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DefinitionRequest`.+-}+data DefinitionParams = DefinitionParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DefinitionParams)++instance Aeson.ToJSON DefinitionParams where+ toJSON (DefinitionParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DefinitionParams where+ parseJSON = Aeson.withObject "DefinitionParams" $ \arg -> DefinitionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DefinitionRequest`.+-}+data DefinitionRegistrationOptions = DefinitionRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DefinitionRegistrationOptions)++instance Aeson.ToJSON DefinitionRegistrationOptions where+ toJSON (DefinitionRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DefinitionRegistrationOptions where+ parseJSON = Aeson.withObject "DefinitionRegistrationOptions" $ \arg -> DefinitionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFile.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.DeleteFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Delete file operation+-}+data DeleteFile = DeleteFile + { {-|+ An optional annotation identifier describing the operation.++ @since 3.16.0+ -}+ _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+ , {-|+ A delete+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "delete")+ , {-|+ The file to delete.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Delete options.+ -}+ _options :: (Maybe Language.LSP.Protocol.Internal.Types.DeleteFileOptions.DeleteFileOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeleteFile)++instance Aeson.ToJSON DeleteFile where+ toJSON (DeleteFile arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+ ,["kind" Aeson..= arg1]+ ,["uri" Aeson..= arg2]+ ,"options" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DeleteFile where+ parseJSON = Aeson.withObject "DeleteFile" $ \arg -> DeleteFile <$> arg Language.LSP.Protocol.Types.Common..:!? "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "uri" <*> arg Language.LSP.Protocol.Types.Common..:!? "options"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFileOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Delete file options+-}+data DeleteFileOptions = DeleteFileOptions + { {-|+ Delete the content recursively if a folder is denoted.+ -}+ _recursive :: (Maybe Bool)+ , {-|+ Ignore the operation if the file doesn't exist.+ -}+ _ignoreIfNotExists :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeleteFileOptions)++instance Aeson.ToJSON DeleteFileOptions where+ toJSON (DeleteFileOptions arg0 arg1) = Aeson.object $ concat $ ["recursive" Language.LSP.Protocol.Types.Common..=? arg0+ ,"ignoreIfNotExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DeleteFileOptions where+ parseJSON = Aeson.withObject "DeleteFileOptions" $ \arg -> DeleteFileOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "recursive" <*> arg Language.LSP.Protocol.Types.Common..:!? "ignoreIfNotExists"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFilesParams.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileDelete+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated deletes of+files.++@since 3.16.0+-}+data DeleteFilesParams = DeleteFilesParams + { {-|+ An array of all files/folders deleted in this operation.+ -}+ _files :: [Language.LSP.Protocol.Internal.Types.FileDelete.FileDelete]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DeleteFilesParams)++instance Aeson.ToJSON DeleteFilesParams where+ toJSON (DeleteFilesParams arg0) = Aeson.object $ concat $ [["files" Aeson..= arg0]]++instance Aeson.FromJSON DeleteFilesParams where+ parseJSON = Aeson.withObject "DeleteFilesParams" $ \arg -> DeleteFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/Diagnostic.hs view
@@ -0,0 +1,97 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Diagnostic where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CodeDescription+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticSeverity+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticTag+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a diagnostic, such as a compiler error or warning. Diagnostic objects+are only valid in the scope of a resource.+-}+data Diagnostic = Diagnostic + { {-|+ The range at which the message applies+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The diagnostic's severity. Can be omitted. If omitted it is up to the+ client to interpret diagnostics as error, warning, info or hint.+ -}+ _severity :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticSeverity.DiagnosticSeverity)+ , {-|+ The diagnostic's code, which usually appear in the user interface.+ -}+ _code :: (Maybe (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text))+ , {-|+ An optional property to describe the error code.+ Requires the code field (above) to be present/not null.++ @since 3.16.0+ -}+ _codeDescription :: (Maybe Language.LSP.Protocol.Internal.Types.CodeDescription.CodeDescription)+ , {-|+ A human-readable string describing the source of this+ diagnostic, e.g. 'typescript' or 'super lint'. It usually+ appears in the user interface.+ -}+ _source :: (Maybe Data.Text.Text)+ , {-|+ The diagnostic's message. It usually appears in the user interface+ -}+ _message :: Data.Text.Text+ , {-|+ Additional metadata about the diagnostic.++ @since 3.15.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.DiagnosticTag.DiagnosticTag])+ , {-|+ An array of related diagnostic information, e.g. when symbol-names within+ a scope collide all definitions can be marked via this property.+ -}+ _relatedInformation :: (Maybe [Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation.DiagnosticRelatedInformation])+ , {-|+ A data entry field that is preserved between a `textDocument/publishDiagnostics`+ notification and `textDocument/codeAction` request.++ @since 3.16.0+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Diagnostic)++instance Aeson.ToJSON Diagnostic where+ toJSON (Diagnostic arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"severity" Language.LSP.Protocol.Types.Common..=? arg1+ ,"code" Language.LSP.Protocol.Types.Common..=? arg2+ ,"codeDescription" Language.LSP.Protocol.Types.Common..=? arg3+ ,"source" Language.LSP.Protocol.Types.Common..=? arg4+ ,["message" Aeson..= arg5]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg6+ ,"relatedInformation" Language.LSP.Protocol.Types.Common..=? arg7+ ,"data" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON Diagnostic where+ parseJSON = Aeson.withObject "Diagnostic" $ \arg -> Diagnostic <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "severity" <*> arg Language.LSP.Protocol.Types.Common..:!? "code" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeDescription" <*> arg Language.LSP.Protocol.Types.Common..:!? "source" <*> arg Aeson..: "message" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "relatedInformation" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticClientCapabilities.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to diagnostic pull requests.++@since 3.17.0+-}+data DiagnosticClientCapabilities = DiagnosticClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Whether the clients supports related documents for document diagnostic pulls.+ -}+ _relatedDocumentSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticClientCapabilities)++instance Aeson.ToJSON DiagnosticClientCapabilities where+ toJSON (DiagnosticClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"relatedDocumentSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DiagnosticClientCapabilities where+ parseJSON = Aeson.withObject "DiagnosticClientCapabilities" $ \arg -> DiagnosticClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "relatedDocumentSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticOptions.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Diagnostic options.++@since 3.17.0+-}+data DiagnosticOptions = DiagnosticOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ An optional identifier under which the diagnostics are+ managed by the client.+ -}+ _identifier :: (Maybe Data.Text.Text)+ , {-|+ Whether the language has inter file dependencies meaning that+ editing code in one file can result in a different diagnostic+ set in another file. Inter file dependencies are common for+ most programming languages and typically uncommon for linters.+ -}+ _interFileDependencies :: Bool+ , {-|+ The server provides support for workspace diagnostics as well.+ -}+ _workspaceDiagnostics :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticOptions)++instance Aeson.ToJSON DiagnosticOptions where+ toJSON (DiagnosticOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"identifier" Language.LSP.Protocol.Types.Common..=? arg1+ ,["interFileDependencies" Aeson..= arg2]+ ,["workspaceDiagnostics" Aeson..= arg3]]++instance Aeson.FromJSON DiagnosticOptions where+ parseJSON = Aeson.withObject "DiagnosticOptions" $ \arg -> DiagnosticOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "identifier" <*> arg Aeson..: "interFileDependencies" <*> arg Aeson..: "workspaceDiagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticRegistrationOptions.hs view
@@ -0,0 +1,72 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Diagnostic registration options.++@since 3.17.0+-}+data DiagnosticRegistrationOptions = DiagnosticRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ An optional identifier under which the diagnostics are+ managed by the client.+ -}+ _identifier :: (Maybe Data.Text.Text)+ , {-|+ Whether the language has inter file dependencies meaning that+ editing code in one file can result in a different diagnostic+ set in another file. Inter file dependencies are common for+ most programming languages and typically uncommon for linters.+ -}+ _interFileDependencies :: Bool+ , {-|+ The server provides support for workspace diagnostics as well.+ -}+ _workspaceDiagnostics :: Bool+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticRegistrationOptions)++instance Aeson.ToJSON DiagnosticRegistrationOptions where+ toJSON (DiagnosticRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"identifier" Language.LSP.Protocol.Types.Common..=? arg2+ ,["interFileDependencies" Aeson..= arg3]+ ,["workspaceDiagnostics" Aeson..= arg4]+ ,"id" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON DiagnosticRegistrationOptions where+ parseJSON = Aeson.withObject "DiagnosticRegistrationOptions" $ \arg -> DiagnosticRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "identifier" <*> arg Aeson..: "interFileDependencies" <*> arg Aeson..: "workspaceDiagnostics" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticRelatedInformation.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a related message and source code location for a diagnostic. This should be+used to point to code locations that cause or related to a diagnostics, e.g when duplicating+a symbol in a scope.+-}+data DiagnosticRelatedInformation = DiagnosticRelatedInformation + { {-|+ The location of this related diagnostic information.+ -}+ _location :: Language.LSP.Protocol.Internal.Types.Location.Location+ , {-|+ The message of this related diagnostic information.+ -}+ _message :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticRelatedInformation)++instance Aeson.ToJSON DiagnosticRelatedInformation where+ toJSON (DiagnosticRelatedInformation arg0 arg1) = Aeson.object $ concat $ [["location" Aeson..= arg0]+ ,["message" Aeson..= arg1]]++instance Aeson.FromJSON DiagnosticRelatedInformation where+ parseJSON = Aeson.withObject "DiagnosticRelatedInformation" $ \arg -> DiagnosticRelatedInformation <$> arg Aeson..: "location" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticServerCancellationData.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Cancellation data returned from a diagnostic request.++@since 3.17.0+-}+data DiagnosticServerCancellationData = DiagnosticServerCancellationData + { {-|++ -}+ _retriggerRequest :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticServerCancellationData)++instance Aeson.ToJSON DiagnosticServerCancellationData where+ toJSON (DiagnosticServerCancellationData arg0) = Aeson.object $ concat $ [["retriggerRequest" Aeson..= arg0]]++instance Aeson.FromJSON DiagnosticServerCancellationData where+ parseJSON = Aeson.withObject "DiagnosticServerCancellationData" $ \arg -> DiagnosticServerCancellationData <$> arg Aeson..: "retriggerRequest"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticSeverity where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The diagnostic's severity.+-}+data DiagnosticSeverity = + {-|+ Reports an error.+ -}+ DiagnosticSeverity_Error+ | {-|+ Reports a warning.+ -}+ DiagnosticSeverity_Warning+ | {-|+ Reports an information.+ -}+ DiagnosticSeverity_Information+ | {-|+ Reports a hint.+ -}+ DiagnosticSeverity_Hint+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticSeverity)+ deriving Pretty via (ViaJSON DiagnosticSeverity)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticSeverity where+ knownValues = Data.Set.fromList [DiagnosticSeverity_Error+ ,DiagnosticSeverity_Warning+ ,DiagnosticSeverity_Information+ ,DiagnosticSeverity_Hint]+ type EnumBaseType DiagnosticSeverity = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType DiagnosticSeverity_Error = 1+ toEnumBaseType DiagnosticSeverity_Warning = 2+ toEnumBaseType DiagnosticSeverity_Information = 3+ toEnumBaseType DiagnosticSeverity_Hint = 4+ fromEnumBaseType 1 = pure DiagnosticSeverity_Error+ fromEnumBaseType 2 = pure DiagnosticSeverity_Warning+ fromEnumBaseType 3 = pure DiagnosticSeverity_Information+ fromEnumBaseType 4 = pure DiagnosticSeverity_Hint+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The diagnostic tags.++@since 3.15.0+-}+data DiagnosticTag = + {-|+ Unused or unnecessary code.++ Clients are allowed to render diagnostics with this tag faded out instead of having+ an error squiggle.+ -}+ DiagnosticTag_Unnecessary+ | {-|+ Deprecated or obsolete code.++ Clients are allowed to rendered diagnostics with this tag strike through.+ -}+ DiagnosticTag_Deprecated+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticTag)+ deriving Pretty via (ViaJSON DiagnosticTag)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticTag where+ knownValues = Data.Set.fromList [DiagnosticTag_Unnecessary+ ,DiagnosticTag_Deprecated]+ type EnumBaseType DiagnosticTag = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType DiagnosticTag_Unnecessary = 1+ toEnumBaseType DiagnosticTag_Deprecated = 2+ fromEnumBaseType 1 = pure DiagnosticTag_Unnecessary+ fromEnumBaseType 2 = pure DiagnosticTag_Deprecated+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticWorkspaceClientCapabilities.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Workspace client capabilities specific to diagnostic pull requests.++@since 3.17.0+-}+data DiagnosticWorkspaceClientCapabilities = DiagnosticWorkspaceClientCapabilities + { {-|+ Whether the client implementation supports a refresh request sent from+ the server to the client.++ Note that this event is global and will force the client to refresh all+ pulled diagnostics currently shown. It should be used with absolute care and+ is useful for situation where a server for example detects a project wide+ change that requires such a calculation.+ -}+ _refreshSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DiagnosticWorkspaceClientCapabilities)++instance Aeson.ToJSON DiagnosticWorkspaceClientCapabilities where+ toJSON (DiagnosticWorkspaceClientCapabilities arg0) = Aeson.object $ concat $ ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DiagnosticWorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "DiagnosticWorkspaceClientCapabilities" $ \arg -> DiagnosticWorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeConfigurationClientCapabilities = DidChangeConfigurationClientCapabilities + { {-|+ Did change configuration notification supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeConfigurationClientCapabilities)++instance Aeson.ToJSON DidChangeConfigurationClientCapabilities where+ toJSON (DidChangeConfigurationClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DidChangeConfigurationClientCapabilities where+ parseJSON = Aeson.withObject "DidChangeConfigurationClientCapabilities" $ \arg -> DidChangeConfigurationClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a change configuration notification.+-}+data DidChangeConfigurationParams = DidChangeConfigurationParams + { {-|+ The actual changed settings+ -}+ _settings :: Data.Aeson.Value+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeConfigurationParams)++instance Aeson.ToJSON DidChangeConfigurationParams where+ toJSON (DidChangeConfigurationParams arg0) = Aeson.object $ concat $ [["settings" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeConfigurationParams where+ parseJSON = Aeson.withObject "DidChangeConfigurationParams" $ \arg -> DidChangeConfigurationParams <$> arg Aeson..: "settings"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationRegistrationOptions.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeConfigurationRegistrationOptions = DidChangeConfigurationRegistrationOptions + { {-|++ -}+ _section :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? [Data.Text.Text]))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeConfigurationRegistrationOptions)++instance Aeson.ToJSON DidChangeConfigurationRegistrationOptions where+ toJSON (DidChangeConfigurationRegistrationOptions arg0) = Aeson.object $ concat $ ["section" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DidChangeConfigurationRegistrationOptions where+ parseJSON = Aeson.withObject "DidChangeConfigurationRegistrationOptions" $ \arg -> DidChangeConfigurationRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "section"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeNotebookDocumentParams.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a change notebook document notification.++@since 3.17.0+-}+data DidChangeNotebookDocumentParams = DidChangeNotebookDocumentParams + { {-|+ The notebook document that did change. The version number points+ to the version after all provided changes have been applied. If+ only the text document content of a cell changes the notebook version+ doesn't necessarily have to change.+ -}+ _notebookDocument :: Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier.VersionedNotebookDocumentIdentifier+ , {-|+ The actual changes to the notebook document.++ The changes describe single state changes to the notebook document.+ So if there are two changes c1 (at array index 0) and c2 (at array+ index 1) for a notebook in state S then c1 moves the notebook from+ S to S' and c2 from S' to S''. So c1 is computed on the state S and+ c2 is computed on the state S'.++ To mirror the content of a notebook using change events use the following approach:+ - start with the same initial content+ - apply the 'notebookDocument/didChange' notifications in the order you receive them.+ - apply the `NotebookChangeEvent`s in a single notification in the order+ you receive them.+ -}+ _change :: Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent.NotebookDocumentChangeEvent+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeNotebookDocumentParams)++instance Aeson.ToJSON DidChangeNotebookDocumentParams where+ toJSON (DidChangeNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $ [["notebookDocument" Aeson..= arg0]+ ,["change" Aeson..= arg1]]++instance Aeson.FromJSON DidChangeNotebookDocumentParams where+ parseJSON = Aeson.withObject "DidChangeNotebookDocumentParams" $ \arg -> DidChangeNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "change"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeTextDocumentParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The change text document notification's parameters.+-}+data DidChangeTextDocumentParams = DidChangeTextDocumentParams + { {-|+ The document that did change. The version number points+ to the version after all provided content changes have+ been applied.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier.VersionedTextDocumentIdentifier+ , {-|+ The actual content changes. The content changes describe single state changes+ to the document. So if there are two content changes c1 (at array index 0) and+ c2 (at array index 1) for a document in state S then c1 moves the document from+ S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed+ on the state S'.++ To mirror the content of a document using change events use the following approach:+ - start with the same initial content+ - apply the 'textDocument/didChange' notifications in the order you receive them.+ - apply the `TextDocumentContentChangeEvent`s in a single notification in the order+ you receive them.+ -}+ _contentChanges :: [Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent.TextDocumentContentChangeEvent]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeTextDocumentParams)++instance Aeson.ToJSON DidChangeTextDocumentParams where+ toJSON (DidChangeTextDocumentParams arg0 arg1) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["contentChanges" Aeson..= arg1]]++instance Aeson.FromJSON DidChangeTextDocumentParams where+ parseJSON = Aeson.withObject "DidChangeTextDocumentParams" $ \arg -> DidChangeTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "contentChanges"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesClientCapabilities.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeWatchedFilesClientCapabilities = DidChangeWatchedFilesClientCapabilities + { {-|+ Did change watched files notification supports dynamic registration. Please note+ that the current protocol doesn't support static configuration for file changes+ from the server side.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Whether the client has support for `RelativePattern`+ or not.++ @since 3.17.0+ -}+ _relativePatternSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeWatchedFilesClientCapabilities)++instance Aeson.ToJSON DidChangeWatchedFilesClientCapabilities where+ toJSON (DidChangeWatchedFilesClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"relativePatternSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DidChangeWatchedFilesClientCapabilities where+ parseJSON = Aeson.withObject "DidChangeWatchedFilesClientCapabilities" $ \arg -> DidChangeWatchedFilesClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "relativePatternSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileEvent+import qualified Language.LSP.Protocol.Types.Common++{-|+The watched files change notification's parameters.+-}+data DidChangeWatchedFilesParams = DidChangeWatchedFilesParams + { {-|+ The actual file events.+ -}+ _changes :: [Language.LSP.Protocol.Internal.Types.FileEvent.FileEvent]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeWatchedFilesParams)++instance Aeson.ToJSON DidChangeWatchedFilesParams where+ toJSON (DidChangeWatchedFilesParams arg0) = Aeson.object $ concat $ [["changes" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWatchedFilesParams where+ parseJSON = Aeson.withObject "DidChangeWatchedFilesParams" $ \arg -> DidChangeWatchedFilesParams <$> arg Aeson..: "changes"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesRegistrationOptions.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileSystemWatcher+import qualified Language.LSP.Protocol.Types.Common++{-|+Describe options to be used when registered for text document change events.+-}+data DidChangeWatchedFilesRegistrationOptions = DidChangeWatchedFilesRegistrationOptions + { {-|+ The watchers to register.+ -}+ _watchers :: [Language.LSP.Protocol.Internal.Types.FileSystemWatcher.FileSystemWatcher]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeWatchedFilesRegistrationOptions)++instance Aeson.ToJSON DidChangeWatchedFilesRegistrationOptions where+ toJSON (DidChangeWatchedFilesRegistrationOptions arg0) = Aeson.object $ concat $ [["watchers" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWatchedFilesRegistrationOptions where+ parseJSON = Aeson.withObject "DidChangeWatchedFilesRegistrationOptions" $ \arg -> DidChangeWatchedFilesRegistrationOptions <$> arg Aeson..: "watchers"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWorkspaceFoldersParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `workspace/didChangeWorkspaceFolders` notification.+-}+data DidChangeWorkspaceFoldersParams = DidChangeWorkspaceFoldersParams + { {-|+ The actual workspace folder change event.+ -}+ _event :: Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent.WorkspaceFoldersChangeEvent+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidChangeWorkspaceFoldersParams)++instance Aeson.ToJSON DidChangeWorkspaceFoldersParams where+ toJSON (DidChangeWorkspaceFoldersParams arg0) = Aeson.object $ concat $ [["event" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWorkspaceFoldersParams where+ parseJSON = Aeson.withObject "DidChangeWorkspaceFoldersParams" $ \arg -> DidChangeWorkspaceFoldersParams <$> arg Aeson..: "event"
+ generated/Language/LSP/Protocol/Internal/Types/DidCloseNotebookDocumentParams.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a close notebook document notification.++@since 3.17.0+-}+data DidCloseNotebookDocumentParams = DidCloseNotebookDocumentParams + { {-|+ The notebook document that got closed.+ -}+ _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier+ , {-|+ The text documents that represent the content+ of a notebook cell that got closed.+ -}+ _cellTextDocuments :: [Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidCloseNotebookDocumentParams)++instance Aeson.ToJSON DidCloseNotebookDocumentParams where+ toJSON (DidCloseNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $ [["notebookDocument" Aeson..= arg0]+ ,["cellTextDocuments" Aeson..= arg1]]++instance Aeson.FromJSON DidCloseNotebookDocumentParams where+ parseJSON = Aeson.withObject "DidCloseNotebookDocumentParams" $ \arg -> DidCloseNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "cellTextDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DidCloseTextDocumentParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a close text document notification+-}+data DidCloseTextDocumentParams = DidCloseTextDocumentParams + { {-|+ The document that was closed.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidCloseTextDocumentParams)++instance Aeson.ToJSON DidCloseTextDocumentParams where+ toJSON (DidCloseTextDocumentParams arg0) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidCloseTextDocumentParams where+ parseJSON = Aeson.withObject "DidCloseTextDocumentParams" $ \arg -> DidCloseTextDocumentParams <$> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidOpenNotebookDocumentParams.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocument+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in an open notebook document notification.++@since 3.17.0+-}+data DidOpenNotebookDocumentParams = DidOpenNotebookDocumentParams + { {-|+ The notebook document that got opened.+ -}+ _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocument.NotebookDocument+ , {-|+ The text documents that represent the content+ of a notebook cell.+ -}+ _cellTextDocuments :: [Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidOpenNotebookDocumentParams)++instance Aeson.ToJSON DidOpenNotebookDocumentParams where+ toJSON (DidOpenNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $ [["notebookDocument" Aeson..= arg0]+ ,["cellTextDocuments" Aeson..= arg1]]++instance Aeson.FromJSON DidOpenNotebookDocumentParams where+ parseJSON = Aeson.withObject "DidOpenNotebookDocumentParams" $ \arg -> DidOpenNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "cellTextDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DidOpenTextDocumentParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in an open text document notification+-}+data DidOpenTextDocumentParams = DidOpenTextDocumentParams + { {-|+ The document that was opened.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidOpenTextDocumentParams)++instance Aeson.ToJSON DidOpenTextDocumentParams where+ toJSON (DidOpenTextDocumentParams arg0) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidOpenTextDocumentParams where+ parseJSON = Aeson.withObject "DidOpenTextDocumentParams" $ \arg -> DidOpenTextDocumentParams <$> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidSaveNotebookDocumentParams.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a save notebook document notification.++@since 3.17.0+-}+data DidSaveNotebookDocumentParams = DidSaveNotebookDocumentParams + { {-|+ The notebook document that got saved.+ -}+ _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidSaveNotebookDocumentParams)++instance Aeson.ToJSON DidSaveNotebookDocumentParams where+ toJSON (DidSaveNotebookDocumentParams arg0) = Aeson.object $ concat $ [["notebookDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidSaveNotebookDocumentParams where+ parseJSON = Aeson.withObject "DidSaveNotebookDocumentParams" $ \arg -> DidSaveNotebookDocumentParams <$> arg Aeson..: "notebookDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidSaveTextDocumentParams.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a save text document notification+-}+data DidSaveTextDocumentParams = DidSaveTextDocumentParams + { {-|+ The document that was saved.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ Optional the content when saved. Depends on the includeText value+ when the save notification was requested.+ -}+ _text :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DidSaveTextDocumentParams)++instance Aeson.ToJSON DidSaveTextDocumentParams where+ toJSON (DidSaveTextDocumentParams arg0 arg1) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,"text" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DidSaveTextDocumentParams where+ parseJSON = Aeson.withObject "DidSaveTextDocumentParams" $ \arg -> DidSaveTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Language.LSP.Protocol.Types.Common..:!? "text"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorClientCapabilities.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorClientCapabilities = DocumentColorClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `DocumentColorRegistrationOptions` return value+ for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentColorClientCapabilities)++instance Aeson.ToJSON DocumentColorClientCapabilities where+ toJSON (DocumentColorClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentColorClientCapabilities where+ parseJSON = Aeson.withObject "DocumentColorClientCapabilities" $ \arg -> DocumentColorClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorOptions = DocumentColorOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentColorOptions)++instance Aeson.ToJSON DocumentColorOptions where+ toJSON (DocumentColorOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentColorOptions where+ parseJSON = Aeson.withObject "DocumentColorOptions" $ \arg -> DocumentColorOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentColorRequest`.+-}+data DocumentColorParams = DocumentColorParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentColorParams)++instance Aeson.ToJSON DocumentColorParams where+ toJSON (DocumentColorParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentColorParams where+ parseJSON = Aeson.withObject "DocumentColorParams" $ \arg -> DocumentColorParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorRegistrationOptions = DocumentColorRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentColorRegistrationOptions)++instance Aeson.ToJSON DocumentColorRegistrationOptions where+ toJSON (DocumentColorRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentColorRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentColorRegistrationOptions" $ \arg -> DocumentColorRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticParams.hs view
@@ -0,0 +1,63 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters of the document diagnostic request.++@since 3.17.0+-}+data DocumentDiagnosticParams = DocumentDiagnosticParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The additional identifier provided during registration.+ -}+ _identifier :: (Maybe Data.Text.Text)+ , {-|+ The result id of a previous response if provided.+ -}+ _previousResultId :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentDiagnosticParams)++instance Aeson.ToJSON DocumentDiagnosticParams where+ toJSON (DocumentDiagnosticParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,"identifier" Language.LSP.Protocol.Types.Common..=? arg3+ ,"previousResultId" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON DocumentDiagnosticParams where+ parseJSON = Aeson.withObject "DocumentDiagnosticParams" $ \arg -> DocumentDiagnosticParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Language.LSP.Protocol.Types.Common..:!? "identifier" <*> arg Language.LSP.Protocol.Types.Common..:!? "previousResultId"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReport.hs view
@@ -0,0 +1,35 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a document diagnostic pull request. A report can+either be a full report containing all diagnostics for the+requested document or an unchanged report indicating that nothing+has changed in terms of diagnostics in comparison to the last+pull request.++@since 3.17.0+-}+newtype DocumentDiagnosticReport = DocumentDiagnosticReport (Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport.RelatedFullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport.RelatedUnchangedDocumentDiagnosticReport)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentDiagnosticReport)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs view
@@ -0,0 +1,55 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The document diagnostic report kinds.++@since 3.17.0+-}+data DocumentDiagnosticReportKind = + {-|+ A diagnostic report with a full+ set of problems.+ -}+ DocumentDiagnosticReportKind_Full+ | {-|+ A report indicating that the last+ returned report is still accurate.+ -}+ DocumentDiagnosticReportKind_Unchanged+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentDiagnosticReportKind)+ deriving Pretty via (ViaJSON DocumentDiagnosticReportKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentDiagnosticReportKind where+ knownValues = Data.Set.fromList [DocumentDiagnosticReportKind_Full+ ,DocumentDiagnosticReportKind_Unchanged]+ type EnumBaseType DocumentDiagnosticReportKind = Data.Text.Text+ toEnumBaseType DocumentDiagnosticReportKind_Full = "full"+ toEnumBaseType DocumentDiagnosticReportKind_Unchanged = "unchanged"+ fromEnumBaseType "full" = pure DocumentDiagnosticReportKind_Full+ fromEnumBaseType "unchanged" = pure DocumentDiagnosticReportKind_Unchanged+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportPartialResult.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A partial result for a document diagnostic report.++@since 3.17.0+-}+data DocumentDiagnosticReportPartialResult = DocumentDiagnosticReportPartialResult + { {-|++ -}+ _relatedDocuments :: (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentDiagnosticReportPartialResult)++instance Aeson.ToJSON DocumentDiagnosticReportPartialResult where+ toJSON (DocumentDiagnosticReportPartialResult arg0) = Aeson.object $ concat $ [["relatedDocuments" Aeson..= arg0]]++instance Aeson.FromJSON DocumentDiagnosticReportPartialResult where+ parseJSON = Aeson.withObject "DocumentDiagnosticReportPartialResult" $ \arg -> DocumentDiagnosticReportPartialResult <$> arg Aeson..: "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFilter.hs view
@@ -0,0 +1,32 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter describes a top level text document or+a notebook cell document.++@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.+-}+newtype DocumentFilter = DocumentFilter (Language.LSP.Protocol.Internal.Types.TextDocumentFilter.TextDocumentFilter Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter.NotebookCellTextDocumentFilter)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentFilter)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentFormattingRequest`.+-}+data DocumentFormattingClientCapabilities = DocumentFormattingClientCapabilities + { {-|+ Whether formatting supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentFormattingClientCapabilities)++instance Aeson.ToJSON DocumentFormattingClientCapabilities where+ toJSON (DocumentFormattingClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentFormattingClientCapabilities where+ parseJSON = Aeson.withObject "DocumentFormattingClientCapabilities" $ \arg -> DocumentFormattingClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentFormattingRequest`.+-}+data DocumentFormattingOptions = DocumentFormattingOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentFormattingOptions)++instance Aeson.ToJSON DocumentFormattingOptions where+ toJSON (DocumentFormattingOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentFormattingOptions where+ parseJSON = Aeson.withObject "DocumentFormattingOptions" $ \arg -> DocumentFormattingOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentFormattingRequest`.+-}+data DocumentFormattingParams = DocumentFormattingParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document to format.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The format options.+ -}+ _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentFormattingParams)++instance Aeson.ToJSON DocumentFormattingParams where+ toJSON (DocumentFormattingParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["textDocument" Aeson..= arg1]+ ,["options" Aeson..= arg2]]++instance Aeson.FromJSON DocumentFormattingParams where+ parseJSON = Aeson.withObject "DocumentFormattingParams" $ \arg -> DocumentFormattingParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentFormattingRequest`.+-}+data DocumentFormattingRegistrationOptions = DocumentFormattingRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentFormattingRegistrationOptions)++instance Aeson.ToJSON DocumentFormattingRegistrationOptions where+ toJSON (DocumentFormattingRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentFormattingRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentFormattingRegistrationOptions" $ \arg -> DocumentFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlight.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlight where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightKind+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A document highlight is a range inside a text document which deserves+special attention. Usually a document highlight is visualized by changing+the background color of its range.+-}+data DocumentHighlight = DocumentHighlight + { {-|+ The range this highlight applies to.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The highlight kind, default is `DocumentHighlightKind.Text`.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentHighlightKind.DocumentHighlightKind)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentHighlight)++instance Aeson.ToJSON DocumentHighlight where+ toJSON (DocumentHighlight arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentHighlight where+ parseJSON = Aeson.withObject "DocumentHighlight" $ \arg -> DocumentHighlight <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DocumentHighlightRequest`.+-}+data DocumentHighlightClientCapabilities = DocumentHighlightClientCapabilities + { {-|+ Whether document highlight supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentHighlightClientCapabilities)++instance Aeson.ToJSON DocumentHighlightClientCapabilities where+ toJSON (DocumentHighlightClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentHighlightClientCapabilities where+ parseJSON = Aeson.withObject "DocumentHighlightClientCapabilities" $ \arg -> DocumentHighlightClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A document highlight kind.+-}+data DocumentHighlightKind = + {-|+ A textual occurrence.+ -}+ DocumentHighlightKind_Text+ | {-|+ Read-access of a symbol, like reading a variable.+ -}+ DocumentHighlightKind_Read+ | {-|+ Write-access of a symbol, like writing to a variable.+ -}+ DocumentHighlightKind_Write+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentHighlightKind)+ deriving Pretty via (ViaJSON DocumentHighlightKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentHighlightKind where+ knownValues = Data.Set.fromList [DocumentHighlightKind_Text+ ,DocumentHighlightKind_Read+ ,DocumentHighlightKind_Write]+ type EnumBaseType DocumentHighlightKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType DocumentHighlightKind_Text = 1+ toEnumBaseType DocumentHighlightKind_Read = 2+ toEnumBaseType DocumentHighlightKind_Write = 3+ fromEnumBaseType 1 = pure DocumentHighlightKind_Text+ fromEnumBaseType 2 = pure DocumentHighlightKind_Read+ fromEnumBaseType 3 = pure DocumentHighlightKind_Write+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentHighlightRequest`.+-}+data DocumentHighlightOptions = DocumentHighlightOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentHighlightOptions)++instance Aeson.ToJSON DocumentHighlightOptions where+ toJSON (DocumentHighlightOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentHighlightOptions where+ parseJSON = Aeson.withObject "DocumentHighlightOptions" $ \arg -> DocumentHighlightOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentHighlightRequest`.+-}+data DocumentHighlightParams = DocumentHighlightParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentHighlightParams)++instance Aeson.ToJSON DocumentHighlightParams where+ toJSON (DocumentHighlightParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DocumentHighlightParams where+ parseJSON = Aeson.withObject "DocumentHighlightParams" $ \arg -> DocumentHighlightParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentHighlightRequest`.+-}+data DocumentHighlightRegistrationOptions = DocumentHighlightRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentHighlightRegistrationOptions)++instance Aeson.ToJSON DocumentHighlightRegistrationOptions where+ toJSON (DocumentHighlightRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentHighlightRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentHighlightRegistrationOptions" $ \arg -> DocumentHighlightRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLink.hs view
@@ -0,0 +1,64 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A document link is a range in a text document that links to an internal or external resource, like another+text document or a web site.+-}+data DocumentLink = DocumentLink + { {-|+ The range this link applies to.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The uri this link points to. If missing a resolve request is sent later.+ -}+ _target :: (Maybe Language.LSP.Protocol.Types.Uri.Uri)+ , {-|+ The tooltip text when you hover over this link.++ If a tooltip is provided, is will be displayed in a string that includes instructions on how to+ trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,+ user settings, and localization.++ @since 3.15.0+ -}+ _tooltip :: (Maybe Data.Text.Text)+ , {-|+ A data entry field that is preserved on a document link between a+ DocumentLinkRequest and a DocumentLinkResolveRequest.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentLink)++instance Aeson.ToJSON DocumentLink where+ toJSON (DocumentLink arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"target" Language.LSP.Protocol.Types.Common..=? arg1+ ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg2+ ,"data" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DocumentLink where+ parseJSON = Aeson.withObject "DocumentLink" $ \arg -> DocumentLink <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "target" <*> arg Language.LSP.Protocol.Types.Common..:!? "tooltip" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkClientCapabilities.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities of a `DocumentLinkRequest`.+-}+data DocumentLinkClientCapabilities = DocumentLinkClientCapabilities + { {-|+ Whether document link supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Whether the client supports the `tooltip` property on `DocumentLink`.++ @since 3.15.0+ -}+ _tooltipSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentLinkClientCapabilities)++instance Aeson.ToJSON DocumentLinkClientCapabilities where+ toJSON (DocumentLinkClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"tooltipSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentLinkClientCapabilities where+ parseJSON = Aeson.withObject "DocumentLinkClientCapabilities" $ \arg -> DocumentLinkClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "tooltipSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentLinkRequest`.+-}+data DocumentLinkOptions = DocumentLinkOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Document links have a resolve provider as well.+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentLinkOptions)++instance Aeson.ToJSON DocumentLinkOptions where+ toJSON (DocumentLinkOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentLinkOptions where+ parseJSON = Aeson.withObject "DocumentLinkOptions" $ \arg -> DocumentLinkOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentLinkRequest`.+-}+data DocumentLinkParams = DocumentLinkParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document to provide document links for.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentLinkParams)++instance Aeson.ToJSON DocumentLinkParams where+ toJSON (DocumentLinkParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentLinkParams where+ parseJSON = Aeson.withObject "DocumentLinkParams" $ \arg -> DocumentLinkParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkRegistrationOptions.hs view
@@ -0,0 +1,49 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentLinkRequest`.+-}+data DocumentLinkRegistrationOptions = DocumentLinkRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Document links have a resolve provider as well.+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentLinkRegistrationOptions)++instance Aeson.ToJSON DocumentLinkRegistrationOptions where+ toJSON (DocumentLinkRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentLinkRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentLinkRegistrationOptions" $ \arg -> DocumentLinkRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingClientCapabilities = DocumentOnTypeFormattingClientCapabilities + { {-|+ Whether on type formatting supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentOnTypeFormattingClientCapabilities)++instance Aeson.ToJSON DocumentOnTypeFormattingClientCapabilities where+ toJSON (DocumentOnTypeFormattingClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentOnTypeFormattingClientCapabilities where+ parseJSON = Aeson.withObject "DocumentOnTypeFormattingClientCapabilities" $ \arg -> DocumentOnTypeFormattingClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingOptions.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingOptions = DocumentOnTypeFormattingOptions + { {-|+ A character on which formatting should be triggered, like `{`.+ -}+ _firstTriggerCharacter :: Data.Text.Text+ , {-|+ More trigger characters.+ -}+ _moreTriggerCharacter :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentOnTypeFormattingOptions)++instance Aeson.ToJSON DocumentOnTypeFormattingOptions where+ toJSON (DocumentOnTypeFormattingOptions arg0 arg1) = Aeson.object $ concat $ [["firstTriggerCharacter" Aeson..= arg0]+ ,"moreTriggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentOnTypeFormattingOptions where+ parseJSON = Aeson.withObject "DocumentOnTypeFormattingOptions" $ \arg -> DocumentOnTypeFormattingOptions <$> arg Aeson..: "firstTriggerCharacter" <*> arg Language.LSP.Protocol.Types.Common..:!? "moreTriggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingParams.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingParams = DocumentOnTypeFormattingParams + { {-|+ The document to format.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position around which the on type formatting should happen.+ This is not necessarily the exact position where the character denoted+ by the property `ch` got typed.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ The character that has been typed that triggered the formatting+ on type request. That is not necessarily the last character that+ got inserted into the document since the client could auto insert+ characters as well (e.g. like automatic brace completion).+ -}+ _ch :: Data.Text.Text+ , {-|+ The formatting options.+ -}+ _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentOnTypeFormattingParams)++instance Aeson.ToJSON DocumentOnTypeFormattingParams where+ toJSON (DocumentOnTypeFormattingParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,["ch" Aeson..= arg2]+ ,["options" Aeson..= arg3]]++instance Aeson.FromJSON DocumentOnTypeFormattingParams where+ parseJSON = Aeson.withObject "DocumentOnTypeFormattingParams" $ \arg -> DocumentOnTypeFormattingParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..: "ch" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingRegistrationOptions.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingRegistrationOptions = DocumentOnTypeFormattingRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ A character on which formatting should be triggered, like `{`.+ -}+ _firstTriggerCharacter :: Data.Text.Text+ , {-|+ More trigger characters.+ -}+ _moreTriggerCharacter :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentOnTypeFormattingRegistrationOptions)++instance Aeson.ToJSON DocumentOnTypeFormattingRegistrationOptions where+ toJSON (DocumentOnTypeFormattingRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,["firstTriggerCharacter" Aeson..= arg1]+ ,"moreTriggerCharacter" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentOnTypeFormattingRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentOnTypeFormattingRegistrationOptions" $ \arg -> DocumentOnTypeFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..: "firstTriggerCharacter" <*> arg Language.LSP.Protocol.Types.Common..:!? "moreTriggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingClientCapabilities = DocumentRangeFormattingClientCapabilities + { {-|+ Whether range formatting supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentRangeFormattingClientCapabilities)++instance Aeson.ToJSON DocumentRangeFormattingClientCapabilities where+ toJSON (DocumentRangeFormattingClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentRangeFormattingClientCapabilities where+ parseJSON = Aeson.withObject "DocumentRangeFormattingClientCapabilities" $ \arg -> DocumentRangeFormattingClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingOptions = DocumentRangeFormattingOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentRangeFormattingOptions)++instance Aeson.ToJSON DocumentRangeFormattingOptions where+ toJSON (DocumentRangeFormattingOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentRangeFormattingOptions where+ parseJSON = Aeson.withObject "DocumentRangeFormattingOptions" $ \arg -> DocumentRangeFormattingOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingParams = DocumentRangeFormattingParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document to format.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The range to format+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The format options+ -}+ _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentRangeFormattingParams)++instance Aeson.ToJSON DocumentRangeFormattingParams where+ toJSON (DocumentRangeFormattingParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["textDocument" Aeson..= arg1]+ ,["range" Aeson..= arg2]+ ,["options" Aeson..= arg3]]++instance Aeson.FromJSON DocumentRangeFormattingParams where+ parseJSON = Aeson.withObject "DocumentRangeFormattingParams" $ \arg -> DocumentRangeFormattingParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingRegistrationOptions = DocumentRangeFormattingRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentRangeFormattingRegistrationOptions)++instance Aeson.ToJSON DocumentRangeFormattingRegistrationOptions where+ toJSON (DocumentRangeFormattingRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentRangeFormattingRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentRangeFormattingRegistrationOptions" $ \arg -> DocumentRangeFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSelector.hs view
@@ -0,0 +1,31 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSelector where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentFilter++{-|+A document selector is the combination of one or many document filters.++@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;++The use of a string as a document filter is deprecated @since 3.16.0.+-}+newtype DocumentSelector = DocumentSelector [Language.LSP.Protocol.Internal.Types.DocumentFilter.DocumentFilter]+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSelector)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbol.hs view
@@ -0,0 +1,87 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbol where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents programming constructs like variables, classes, interfaces etc.+that appear in a document. Document symbols can be hierarchical and they+have two ranges: one that encloses its definition and one that points to+its most interesting range, e.g. the range of an identifier.+-}+data DocumentSymbol = DocumentSymbol + { {-|+ The name of this symbol. Will be displayed in the user interface and therefore must not be+ an empty string or a string only consisting of white spaces.+ -}+ _name :: Data.Text.Text+ , {-|+ More detail for this symbol, e.g the signature of a function.+ -}+ _detail :: (Maybe Data.Text.Text)+ , {-|+ The kind of this symbol.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this document symbol.++ @since 3.16.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ Indicates if this symbol is deprecated.++ @deprecated Use tags instead+ -}+ _deprecated :: (Maybe Bool)+ , {-|+ The range enclosing this symbol not including leading/trailing whitespace but everything else+ like comments. This information is typically used to determine if the clients cursor is+ inside the symbol to reveal in the symbol in the UI.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.+ Must be contained by the `range`.+ -}+ _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ Children of this symbol, e.g. properties of a class.+ -}+ _children :: (Maybe [Language.LSP.Protocol.Internal.Types.DocumentSymbol.DocumentSymbol])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSymbol)++instance Aeson.ToJSON DocumentSymbol where+ toJSON (DocumentSymbol arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,"detail" Language.LSP.Protocol.Types.Common..=? arg1+ ,["kind" Aeson..= arg2]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg3+ ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg4+ ,["range" Aeson..= arg5]+ ,["selectionRange" Aeson..= arg6]+ ,"children" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON DocumentSymbol where+ parseJSON = Aeson.withObject "DocumentSymbol" $ \arg -> DocumentSymbol <$> arg Aeson..: "name" <*> arg Language.LSP.Protocol.Types.Common..:!? "detail" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "deprecated" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "children"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolClientCapabilities.hs view
@@ -0,0 +1,67 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DocumentSymbolRequest`.+-}+data DocumentSymbolClientCapabilities = DocumentSymbolClientCapabilities + { {-|+ Whether document symbol supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Specific capabilities for the `SymbolKind` in the+ `textDocument/documentSymbol` request.+ -}+ _symbolKind :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions.ClientSymbolKindOptions)+ , {-|+ The client supports hierarchical document symbols.+ -}+ _hierarchicalDocumentSymbolSupport :: (Maybe Bool)+ , {-|+ The client supports tags on `SymbolInformation`. Tags are supported on+ `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.+ Clients supporting tags have to handle unknown tags gracefully.++ @since 3.16.0+ -}+ _tagSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions.ClientSymbolTagOptions)+ , {-|+ The client supports an additional label presented in the UI when+ registering a document symbol provider.++ @since 3.16.0+ -}+ _labelSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSymbolClientCapabilities)++instance Aeson.ToJSON DocumentSymbolClientCapabilities where+ toJSON (DocumentSymbolClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"symbolKind" Language.LSP.Protocol.Types.Common..=? arg1+ ,"hierarchicalDocumentSymbolSupport" Language.LSP.Protocol.Types.Common..=? arg2+ ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg3+ ,"labelSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON DocumentSymbolClientCapabilities where+ parseJSON = Aeson.withObject "DocumentSymbolClientCapabilities" $ \arg -> DocumentSymbolClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "symbolKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "hierarchicalDocumentSymbolSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "tagSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "labelSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolOptions.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentSymbolRequest`.+-}+data DocumentSymbolOptions = DocumentSymbolOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ A human-readable string that is shown when multiple outlines trees+ are shown for the same document.++ @since 3.16.0+ -}+ _label :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSymbolOptions)++instance Aeson.ToJSON DocumentSymbolOptions where+ toJSON (DocumentSymbolOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"label" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentSymbolOptions where+ parseJSON = Aeson.withObject "DocumentSymbolOptions" $ \arg -> DocumentSymbolOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "label"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentSymbolRequest`.+-}+data DocumentSymbolParams = DocumentSymbolParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSymbolParams)++instance Aeson.ToJSON DocumentSymbolParams where+ toJSON (DocumentSymbolParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentSymbolParams where+ parseJSON = Aeson.withObject "DocumentSymbolParams" $ \arg -> DocumentSymbolParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolRegistrationOptions.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentSymbolRequest`.+-}+data DocumentSymbolRegistrationOptions = DocumentSymbolRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ A human-readable string that is shown when multiple outlines trees+ are shown for the same document.++ @since 3.16.0+ -}+ _label :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON DocumentSymbolRegistrationOptions)++instance Aeson.ToJSON DocumentSymbolRegistrationOptions where+ toJSON (DocumentSymbolRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"label" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentSymbolRegistrationOptions where+ parseJSON = Aeson.withObject "DocumentSymbolRegistrationOptions" $ \arg -> DocumentSymbolRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "label"
+ generated/Language/LSP/Protocol/Internal/Types/EditRangeWithInsertReplace.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Edit range variant that includes ranges for insert and replace operations.++@since 3.18.0+@proposed+-}+data EditRangeWithInsertReplace = EditRangeWithInsertReplace + { {-|++ -}+ _insert :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|++ -}+ _replace :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON EditRangeWithInsertReplace)++instance Aeson.ToJSON EditRangeWithInsertReplace where+ toJSON (EditRangeWithInsertReplace arg0 arg1) = Aeson.object $ concat $ [["insert" Aeson..= arg0]+ ,["replace" Aeson..= arg1]]++instance Aeson.FromJSON EditRangeWithInsertReplace where+ parseJSON = Aeson.withObject "EditRangeWithInsertReplace" $ \arg -> EditRangeWithInsertReplace <$> arg Aeson..: "insert" <*> arg Aeson..: "replace"
+ generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs view
@@ -0,0 +1,91 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ErrorCodes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Predefined error codes.+-}+data ErrorCodes = + {-|++ -}+ ErrorCodes_ParseError+ | {-|++ -}+ ErrorCodes_InvalidRequest+ | {-|++ -}+ ErrorCodes_MethodNotFound+ | {-|++ -}+ ErrorCodes_InvalidParams+ | {-|++ -}+ ErrorCodes_InternalError+ | {-|+ Error code indicating that a server received a notification or+ request before the server has received the `initialize` request.+ -}+ ErrorCodes_ServerNotInitialized+ | {-|++ -}+ ErrorCodes_UnknownErrorCode+ | ErrorCodes_Custom Language.LSP.Protocol.Types.Common.Int32+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ErrorCodes)+ deriving Pretty via (ViaJSON ErrorCodes)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum ErrorCodes where+ knownValues = Data.Set.fromList [ErrorCodes_ParseError+ ,ErrorCodes_InvalidRequest+ ,ErrorCodes_MethodNotFound+ ,ErrorCodes_InvalidParams+ ,ErrorCodes_InternalError+ ,ErrorCodes_ServerNotInitialized+ ,ErrorCodes_UnknownErrorCode]+ type EnumBaseType ErrorCodes = Language.LSP.Protocol.Types.Common.Int32+ toEnumBaseType ErrorCodes_ParseError = -32700+ toEnumBaseType ErrorCodes_InvalidRequest = -32600+ toEnumBaseType ErrorCodes_MethodNotFound = -32601+ toEnumBaseType ErrorCodes_InvalidParams = -32602+ toEnumBaseType ErrorCodes_InternalError = -32603+ toEnumBaseType ErrorCodes_ServerNotInitialized = -32002+ toEnumBaseType ErrorCodes_UnknownErrorCode = -32001+ toEnumBaseType (ErrorCodes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum ErrorCodes where+ fromOpenEnumBaseType -32700 = ErrorCodes_ParseError+ fromOpenEnumBaseType -32600 = ErrorCodes_InvalidRequest+ fromOpenEnumBaseType -32601 = ErrorCodes_MethodNotFound+ fromOpenEnumBaseType -32602 = ErrorCodes_InvalidParams+ fromOpenEnumBaseType -32603 = ErrorCodes_InternalError+ fromOpenEnumBaseType -32002 = ErrorCodes_ServerNotInitialized+ fromOpenEnumBaseType -32001 = ErrorCodes_UnknownErrorCode+ fromOpenEnumBaseType arg = ErrorCodes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities of a `ExecuteCommandRequest`.+-}+data ExecuteCommandClientCapabilities = ExecuteCommandClientCapabilities + { {-|+ Execute command supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ExecuteCommandClientCapabilities)++instance Aeson.ToJSON ExecuteCommandClientCapabilities where+ toJSON (ExecuteCommandClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ExecuteCommandClientCapabilities where+ parseJSON = Aeson.withObject "ExecuteCommandClientCapabilities" $ \arg -> ExecuteCommandClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandOptions.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+The server capabilities of a `ExecuteCommandRequest`.+-}+data ExecuteCommandOptions = ExecuteCommandOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The commands to be executed on the server+ -}+ _commands :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ExecuteCommandOptions)++instance Aeson.ToJSON ExecuteCommandOptions where+ toJSON (ExecuteCommandOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["commands" Aeson..= arg1]]++instance Aeson.FromJSON ExecuteCommandOptions where+ parseJSON = Aeson.withObject "ExecuteCommandOptions" $ \arg -> ExecuteCommandOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "commands"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `ExecuteCommandRequest`.+-}+data ExecuteCommandParams = ExecuteCommandParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The identifier of the actual command handler.+ -}+ _command :: Data.Text.Text+ , {-|+ Arguments that the command should be invoked with.+ -}+ _arguments :: (Maybe [Data.Aeson.Value])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ExecuteCommandParams)++instance Aeson.ToJSON ExecuteCommandParams where+ toJSON (ExecuteCommandParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["command" Aeson..= arg1]+ ,"arguments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ExecuteCommandParams where+ parseJSON = Aeson.withObject "ExecuteCommandParams" $ \arg -> ExecuteCommandParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "command" <*> arg Language.LSP.Protocol.Types.Common..:!? "arguments"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandRegistrationOptions.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `ExecuteCommandRequest`.+-}+data ExecuteCommandRegistrationOptions = ExecuteCommandRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The commands to be executed on the server+ -}+ _commands :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ExecuteCommandRegistrationOptions)++instance Aeson.ToJSON ExecuteCommandRegistrationOptions where+ toJSON (ExecuteCommandRegistrationOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["commands" Aeson..= arg1]]++instance Aeson.FromJSON ExecuteCommandRegistrationOptions where+ parseJSON = Aeson.withObject "ExecuteCommandRegistrationOptions" $ \arg -> ExecuteCommandRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "commands"
+ generated/Language/LSP/Protocol/Internal/Types/ExecutionSummary.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecutionSummary where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ExecutionSummary = ExecutionSummary + { {-|+ A strict monotonically increasing value+ indicating the execution order of a cell+ inside a notebook.+ -}+ _executionOrder :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ Whether the execution was successful or+ not if known by the client.+ -}+ _success :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ExecutionSummary)++instance Aeson.ToJSON ExecutionSummary where+ toJSON (ExecutionSummary arg0 arg1) = Aeson.object $ concat $ [["executionOrder" Aeson..= arg0]+ ,"success" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ExecutionSummary where+ parseJSON = Aeson.withObject "ExecutionSummary" $ \arg -> ExecutionSummary <$> arg Aeson..: "executionOrder" <*> arg Language.LSP.Protocol.Types.Common..:!? "success"
+ generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs view
@@ -0,0 +1,70 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FailureHandlingKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data FailureHandlingKind = + {-|+ Applying the workspace change is simply aborted if one of the changes provided+ fails. All operations executed before the failing operation stay executed.+ -}+ FailureHandlingKind_Abort+ | {-|+ All operations are executed transactional. That means they either all+ succeed or no changes at all are applied to the workspace.+ -}+ FailureHandlingKind_Transactional+ | {-|+ If the workspace edit contains only textual file changes they are executed transactional.+ If resource changes (create, rename or delete file) are part of the change the failure+ handling strategy is abort.+ -}+ FailureHandlingKind_TextOnlyTransactional+ | {-|+ The client tries to undo the operations already executed. But there is no+ guarantee that this is succeeding.+ -}+ FailureHandlingKind_Undo+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FailureHandlingKind)+ deriving Pretty via (ViaJSON FailureHandlingKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FailureHandlingKind where+ knownValues = Data.Set.fromList [FailureHandlingKind_Abort+ ,FailureHandlingKind_Transactional+ ,FailureHandlingKind_TextOnlyTransactional+ ,FailureHandlingKind_Undo]+ type EnumBaseType FailureHandlingKind = Data.Text.Text+ toEnumBaseType FailureHandlingKind_Abort = "abort"+ toEnumBaseType FailureHandlingKind_Transactional = "transactional"+ toEnumBaseType FailureHandlingKind_TextOnlyTransactional = "textOnlyTransactional"+ toEnumBaseType FailureHandlingKind_Undo = "undo"+ fromEnumBaseType "abort" = pure FailureHandlingKind_Abort+ fromEnumBaseType "transactional" = pure FailureHandlingKind_Transactional+ fromEnumBaseType "textOnlyTransactional" = pure FailureHandlingKind_TextOnlyTransactional+ fromEnumBaseType "undo" = pure FailureHandlingKind_Undo+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileChangeType where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The file event type+-}+data FileChangeType = + {-|+ The file got created.+ -}+ FileChangeType_Created+ | {-|+ The file got changed.+ -}+ FileChangeType_Changed+ | {-|+ The file got deleted.+ -}+ FileChangeType_Deleted+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileChangeType)+ deriving Pretty via (ViaJSON FileChangeType)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileChangeType where+ knownValues = Data.Set.fromList [FileChangeType_Created+ ,FileChangeType_Changed+ ,FileChangeType_Deleted]+ type EnumBaseType FileChangeType = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType FileChangeType_Created = 1+ toEnumBaseType FileChangeType_Changed = 2+ toEnumBaseType FileChangeType_Deleted = 3+ fromEnumBaseType 1 = pure FileChangeType_Created+ fromEnumBaseType 2 = pure FileChangeType_Changed+ fromEnumBaseType 3 = pure FileChangeType_Deleted+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileCreate.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileCreate where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder create.++@since 3.16.0+-}+data FileCreate = FileCreate + { {-|+ A file:// URI for the location of the file/folder being created.+ -}+ _uri :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileCreate)++instance Aeson.ToJSON FileCreate where+ toJSON (FileCreate arg0) = Aeson.object $ concat $ [["uri" Aeson..= arg0]]++instance Aeson.FromJSON FileCreate where+ parseJSON = Aeson.withObject "FileCreate" $ \arg -> FileCreate <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/FileDelete.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileDelete where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder delete.++@since 3.16.0+-}+data FileDelete = FileDelete + { {-|+ A file:// URI for the location of the file/folder being deleted.+ -}+ _uri :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileDelete)++instance Aeson.ToJSON FileDelete where+ toJSON (FileDelete arg0) = Aeson.object $ concat $ [["uri" Aeson..= arg0]]++instance Aeson.FromJSON FileDelete where+ parseJSON = Aeson.withObject "FileDelete" $ \arg -> FileDelete <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/FileEvent.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileChangeType+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+An event describing a file change.+-}+data FileEvent = FileEvent + { {-|+ The file's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The change type.+ -}+ _type_ :: Language.LSP.Protocol.Internal.Types.FileChangeType.FileChangeType+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileEvent)++instance Aeson.ToJSON FileEvent where+ toJSON (FileEvent arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["type" Aeson..= arg1]]++instance Aeson.FromJSON FileEvent where+ parseJSON = Aeson.withObject "FileEvent" $ \arg -> FileEvent <$> arg Aeson..: "uri" <*> arg Aeson..: "type"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationClientCapabilities.hs view
@@ -0,0 +1,72 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Capabilities relating to events from file operations by the user in the client.++These events do not come from the file system, they come from user operations+like renaming a file in the UI.++@since 3.16.0+-}+data FileOperationClientCapabilities = FileOperationClientCapabilities + { {-|+ Whether the client supports dynamic registration for file requests/notifications.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client has support for sending didCreateFiles notifications.+ -}+ _didCreate :: (Maybe Bool)+ , {-|+ The client has support for sending willCreateFiles requests.+ -}+ _willCreate :: (Maybe Bool)+ , {-|+ The client has support for sending didRenameFiles notifications.+ -}+ _didRename :: (Maybe Bool)+ , {-|+ The client has support for sending willRenameFiles requests.+ -}+ _willRename :: (Maybe Bool)+ , {-|+ The client has support for sending didDeleteFiles notifications.+ -}+ _didDelete :: (Maybe Bool)+ , {-|+ The client has support for sending willDeleteFiles requests.+ -}+ _willDelete :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationClientCapabilities)++instance Aeson.ToJSON FileOperationClientCapabilities where+ toJSON (FileOperationClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"didCreate" Language.LSP.Protocol.Types.Common..=? arg1+ ,"willCreate" Language.LSP.Protocol.Types.Common..=? arg2+ ,"didRename" Language.LSP.Protocol.Types.Common..=? arg3+ ,"willRename" Language.LSP.Protocol.Types.Common..=? arg4+ ,"didDelete" Language.LSP.Protocol.Types.Common..=? arg5+ ,"willDelete" Language.LSP.Protocol.Types.Common..=? arg6]++instance Aeson.FromJSON FileOperationClientCapabilities where+ parseJSON = Aeson.withObject "FileOperationClientCapabilities" $ \arg -> FileOperationClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "didCreate" <*> arg Language.LSP.Protocol.Types.Common..:!? "willCreate" <*> arg Language.LSP.Protocol.Types.Common..:!? "didRename" <*> arg Language.LSP.Protocol.Types.Common..:!? "willRename" <*> arg Language.LSP.Protocol.Types.Common..:!? "didDelete" <*> arg Language.LSP.Protocol.Types.Common..:!? "willDelete"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationFilter.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPattern+import qualified Language.LSP.Protocol.Types.Common++{-|+A filter to describe in which file operation requests or notifications+the server is interested in receiving.++@since 3.16.0+-}+data FileOperationFilter = FileOperationFilter + { {-|+ A Uri scheme like `file` or `untitled`.+ -}+ _scheme :: (Maybe Data.Text.Text)+ , {-|+ The actual file operation pattern.+ -}+ _pattern :: Language.LSP.Protocol.Internal.Types.FileOperationPattern.FileOperationPattern+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationFilter)++instance Aeson.ToJSON FileOperationFilter where+ toJSON (FileOperationFilter arg0 arg1) = Aeson.object $ concat $ ["scheme" Language.LSP.Protocol.Types.Common..=? arg0+ ,["pattern" Aeson..= arg1]]++instance Aeson.FromJSON FileOperationFilter where+ parseJSON = Aeson.withObject "FileOperationFilter" $ \arg -> FileOperationFilter <$> arg Language.LSP.Protocol.Types.Common..:!? "scheme" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationOptions.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Options for notifications/requests for user operations on files.++@since 3.16.0+-}+data FileOperationOptions = FileOperationOptions + { {-|+ The server is interested in receiving didCreateFiles notifications.+ -}+ _didCreate :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ , {-|+ The server is interested in receiving willCreateFiles requests.+ -}+ _willCreate :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ , {-|+ The server is interested in receiving didRenameFiles notifications.+ -}+ _didRename :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ , {-|+ The server is interested in receiving willRenameFiles requests.+ -}+ _willRename :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ , {-|+ The server is interested in receiving didDeleteFiles file notifications.+ -}+ _didDelete :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ , {-|+ The server is interested in receiving willDeleteFiles file requests.+ -}+ _willDelete :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationOptions)++instance Aeson.ToJSON FileOperationOptions where+ toJSON (FileOperationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ ["didCreate" Language.LSP.Protocol.Types.Common..=? arg0+ ,"willCreate" Language.LSP.Protocol.Types.Common..=? arg1+ ,"didRename" Language.LSP.Protocol.Types.Common..=? arg2+ ,"willRename" Language.LSP.Protocol.Types.Common..=? arg3+ ,"didDelete" Language.LSP.Protocol.Types.Common..=? arg4+ ,"willDelete" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON FileOperationOptions where+ parseJSON = Aeson.withObject "FileOperationOptions" $ \arg -> FileOperationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "didCreate" <*> arg Language.LSP.Protocol.Types.Common..:!? "willCreate" <*> arg Language.LSP.Protocol.Types.Common..:!? "didRename" <*> arg Language.LSP.Protocol.Types.Common..:!? "willRename" <*> arg Language.LSP.Protocol.Types.Common..:!? "didDelete" <*> arg Language.LSP.Protocol.Types.Common..:!? "willDelete"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPattern.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPatternKind+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+A pattern to describe in which file operation requests or notifications+the server is interested in receiving.++@since 3.16.0+-}+data FileOperationPattern = FileOperationPattern + { {-|+ The glob pattern to match. Glob patterns can have the following syntax:+ - `*` to match one or more characters in a path segment+ - `?` to match on one character in a path segment+ - `**` to match any number of path segments, including none+ - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)+ - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+ - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)+ -}+ _glob :: Data.Text.Text+ , {-|+ Whether to match files or folders with this pattern.++ Matches both if undefined.+ -}+ _matches :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationPatternKind.FileOperationPatternKind)+ , {-|+ Additional options used during matching.+ -}+ _options :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions.FileOperationPatternOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationPattern)++instance Aeson.ToJSON FileOperationPattern where+ toJSON (FileOperationPattern arg0 arg1 arg2) = Aeson.object $ concat $ [["glob" Aeson..= arg0]+ ,"matches" Language.LSP.Protocol.Types.Common..=? arg1+ ,"options" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON FileOperationPattern where+ parseJSON = Aeson.withObject "FileOperationPattern" $ \arg -> FileOperationPattern <$> arg Aeson..: "glob" <*> arg Language.LSP.Protocol.Types.Common..:!? "matches" <*> arg Language.LSP.Protocol.Types.Common..:!? "options"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPatternKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A pattern kind describing if a glob pattern matches a file a folder or+both.++@since 3.16.0+-}+data FileOperationPatternKind = + {-|+ The pattern matches a file only.+ -}+ FileOperationPatternKind_File+ | {-|+ The pattern matches a folder only.+ -}+ FileOperationPatternKind_Folder+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileOperationPatternKind)+ deriving Pretty via (ViaJSON FileOperationPatternKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileOperationPatternKind where+ knownValues = Data.Set.fromList [FileOperationPatternKind_File+ ,FileOperationPatternKind_Folder]+ type EnumBaseType FileOperationPatternKind = Data.Text.Text+ toEnumBaseType FileOperationPatternKind_File = "file"+ toEnumBaseType FileOperationPatternKind_Folder = "folder"+ fromEnumBaseType "file" = pure FileOperationPatternKind_File+ fromEnumBaseType "folder" = pure FileOperationPatternKind_Folder+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Matching options for the file operation pattern.++@since 3.16.0+-}+data FileOperationPatternOptions = FileOperationPatternOptions + { {-|+ The pattern should be matched ignoring casing.+ -}+ _ignoreCase :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationPatternOptions)++instance Aeson.ToJSON FileOperationPatternOptions where+ toJSON (FileOperationPatternOptions arg0) = Aeson.object $ concat $ ["ignoreCase" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON FileOperationPatternOptions where+ parseJSON = Aeson.withObject "FileOperationPatternOptions" $ \arg -> FileOperationPatternOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "ignoreCase"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationRegistrationOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileOperationFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+The options to register for file operations.++@since 3.16.0+-}+data FileOperationRegistrationOptions = FileOperationRegistrationOptions + { {-|+ The actual filters.+ -}+ _filters :: [Language.LSP.Protocol.Internal.Types.FileOperationFilter.FileOperationFilter]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileOperationRegistrationOptions)++instance Aeson.ToJSON FileOperationRegistrationOptions where+ toJSON (FileOperationRegistrationOptions arg0) = Aeson.object $ concat $ [["filters" Aeson..= arg0]]++instance Aeson.FromJSON FileOperationRegistrationOptions where+ parseJSON = Aeson.withObject "FileOperationRegistrationOptions" $ \arg -> FileOperationRegistrationOptions <$> arg Aeson..: "filters"
+ generated/Language/LSP/Protocol/Internal/Types/FileRename.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileRename where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder rename.++@since 3.16.0+-}+data FileRename = FileRename + { {-|+ A file:// URI for the original location of the file/folder being renamed.+ -}+ _oldUri :: Data.Text.Text+ , {-|+ A file:// URI for the new location of the file/folder being renamed.+ -}+ _newUri :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileRename)++instance Aeson.ToJSON FileRename where+ toJSON (FileRename arg0 arg1) = Aeson.object $ concat $ [["oldUri" Aeson..= arg0]+ ,["newUri" Aeson..= arg1]]++instance Aeson.FromJSON FileRename where+ parseJSON = Aeson.withObject "FileRename" $ \arg -> FileRename <$> arg Aeson..: "oldUri" <*> arg Aeson..: "newUri"
+ generated/Language/LSP/Protocol/Internal/Types/FileSystemWatcher.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileSystemWatcher where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.GlobPattern+import qualified Language.LSP.Protocol.Internal.Types.WatchKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FileSystemWatcher = FileSystemWatcher + { {-|+ The glob pattern to watch. See `GlobPattern` for more detail.++ @since 3.17.0 support for relative patterns.+ -}+ _globPattern :: Language.LSP.Protocol.Internal.Types.GlobPattern.GlobPattern+ , {-|+ The kind of events of interest. If omitted it defaults+ to WatchKind.Create | WatchKind.Change | WatchKind.Delete+ which is 7.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.WatchKind.WatchKind)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FileSystemWatcher)++instance Aeson.ToJSON FileSystemWatcher where+ toJSON (FileSystemWatcher arg0 arg1) = Aeson.object $ concat $ [["globPattern" Aeson..= arg0]+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON FileSystemWatcher where+ parseJSON = Aeson.withObject "FileSystemWatcher" $ \arg -> FileSystemWatcher <$> arg Aeson..: "globPattern" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRange.hs view
@@ -0,0 +1,73 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a folding range. To be valid, start and end line must be bigger than zero and smaller+than the number of lines in the document. Clients are free to ignore invalid ranges.+-}+data FoldingRange = FoldingRange + { {-|+ The zero-based start line of the range to fold. The folded area starts after the line's last character.+ To be valid, the end must be zero or larger and smaller than the number of lines in the document.+ -}+ _startLine :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.+ -}+ _startCharacter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ , {-|+ The zero-based end line of the range to fold. The folded area ends with the line's last character.+ To be valid, the end must be zero or larger and smaller than the number of lines in the document.+ -}+ _endLine :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.+ -}+ _endCharacter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ , {-|+ Describes the kind of the folding range such as 'comment' or 'region'. The kind+ is used to categorize folding ranges and used by commands like 'Fold all comments'.+ See `FoldingRangeKind` for an enumeration of standardized kinds.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.FoldingRangeKind.FoldingRangeKind)+ , {-|+ The text that the client should show when the specified range is+ collapsed. If not defined or not supported by the client, a default+ will be chosen by the client.++ @since 3.17.0+ -}+ _collapsedText :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FoldingRange)++instance Aeson.ToJSON FoldingRange where+ toJSON (FoldingRange arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["startLine" Aeson..= arg0]+ ,"startCharacter" Language.LSP.Protocol.Types.Common..=? arg1+ ,["endLine" Aeson..= arg2]+ ,"endCharacter" Language.LSP.Protocol.Types.Common..=? arg3+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg4+ ,"collapsedText" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON FoldingRange where+ parseJSON = Aeson.withObject "FoldingRange" $ \arg -> FoldingRange <$> arg Aeson..: "startLine" <*> arg Language.LSP.Protocol.Types.Common..:!? "startCharacter" <*> arg Aeson..: "endLine" <*> arg Language.LSP.Protocol.Types.Common..:!? "endCharacter" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "collapsedText"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeClientCapabilities.hs view
@@ -0,0 +1,70 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeClientCapabilities = FoldingRangeClientCapabilities + { {-|+ Whether implementation supports dynamic registration for folding range+ providers. If this is set to `true` the client supports the new+ `FoldingRangeRegistrationOptions` return value for the corresponding+ server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The maximum number of folding ranges that the client prefers to receive+ per document. The value serves as a hint, servers are free to follow the+ limit.+ -}+ _rangeLimit :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ , {-|+ If set, the client signals that it only supports folding complete lines.+ If set, client will ignore specified `startCharacter` and `endCharacter`+ properties in a FoldingRange.+ -}+ _lineFoldingOnly :: (Maybe Bool)+ , {-|+ Specific options for the folding range kind.++ @since 3.17.0+ -}+ _foldingRangeKind :: (Maybe Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions.ClientFoldingRangeKindOptions)+ , {-|+ Specific options for the folding range.++ @since 3.17.0+ -}+ _foldingRange :: (Maybe Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions.ClientFoldingRangeOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FoldingRangeClientCapabilities)++instance Aeson.ToJSON FoldingRangeClientCapabilities where+ toJSON (FoldingRangeClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"rangeLimit" Language.LSP.Protocol.Types.Common..=? arg1+ ,"lineFoldingOnly" Language.LSP.Protocol.Types.Common..=? arg2+ ,"foldingRangeKind" Language.LSP.Protocol.Types.Common..=? arg3+ ,"foldingRange" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON FoldingRangeClientCapabilities where+ parseJSON = Aeson.withObject "FoldingRangeClientCapabilities" $ \arg -> FoldingRangeClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "rangeLimit" <*> arg Language.LSP.Protocol.Types.Common..:!? "lineFoldingOnly" <*> arg Language.LSP.Protocol.Types.Common..:!? "foldingRangeKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "foldingRange"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs view
@@ -0,0 +1,63 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined range kinds.+-}+data FoldingRangeKind = + {-|+ Folding range for a comment+ -}+ FoldingRangeKind_Comment+ | {-|+ Folding range for an import or include+ -}+ FoldingRangeKind_Imports+ | {-|+ Folding range for a region (e.g. `#region`)+ -}+ FoldingRangeKind_Region+ | FoldingRangeKind_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FoldingRangeKind)+ deriving Pretty via (ViaJSON FoldingRangeKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FoldingRangeKind where+ knownValues = Data.Set.fromList [FoldingRangeKind_Comment+ ,FoldingRangeKind_Imports+ ,FoldingRangeKind_Region]+ type EnumBaseType FoldingRangeKind = Data.Text.Text+ toEnumBaseType FoldingRangeKind_Comment = "comment"+ toEnumBaseType FoldingRangeKind_Imports = "imports"+ toEnumBaseType FoldingRangeKind_Region = "region"+ toEnumBaseType (FoldingRangeKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum FoldingRangeKind where+ fromOpenEnumBaseType "comment" = FoldingRangeKind_Comment+ fromOpenEnumBaseType "imports" = FoldingRangeKind_Imports+ fromOpenEnumBaseType "region" = FoldingRangeKind_Region+ fromOpenEnumBaseType arg = FoldingRangeKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeOptions = FoldingRangeOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FoldingRangeOptions)++instance Aeson.ToJSON FoldingRangeOptions where+ toJSON (FoldingRangeOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON FoldingRangeOptions where+ parseJSON = Aeson.withObject "FoldingRangeOptions" $ \arg -> FoldingRangeOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `FoldingRangeRequest`.+-}+data FoldingRangeParams = FoldingRangeParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FoldingRangeParams)++instance Aeson.ToJSON FoldingRangeParams where+ toJSON (FoldingRangeParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON FoldingRangeParams where+ parseJSON = Aeson.withObject "FoldingRangeParams" $ \arg -> FoldingRangeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeRegistrationOptions = FoldingRangeRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FoldingRangeRegistrationOptions)++instance Aeson.ToJSON FoldingRangeRegistrationOptions where+ toJSON (FoldingRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON FoldingRangeRegistrationOptions where+ parseJSON = Aeson.withObject "FoldingRangeRegistrationOptions" $ \arg -> FoldingRangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/FormattingOptions.hs view
@@ -0,0 +1,63 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Value-object describing what options formatting should use.+-}+data FormattingOptions = FormattingOptions + { {-|+ Size of a tab in spaces.+ -}+ _tabSize :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ Prefer spaces over tabs.+ -}+ _insertSpaces :: Bool+ , {-|+ Trim trailing whitespace on a line.++ @since 3.15.0+ -}+ _trimTrailingWhitespace :: (Maybe Bool)+ , {-|+ Insert a newline character at the end of the file if one does not exist.++ @since 3.15.0+ -}+ _insertFinalNewline :: (Maybe Bool)+ , {-|+ Trim all newlines after the final newline at the end of the file.++ @since 3.15.0+ -}+ _trimFinalNewlines :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FormattingOptions)++instance Aeson.ToJSON FormattingOptions where+ toJSON (FormattingOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["tabSize" Aeson..= arg0]+ ,["insertSpaces" Aeson..= arg1]+ ,"trimTrailingWhitespace" Language.LSP.Protocol.Types.Common..=? arg2+ ,"insertFinalNewline" Language.LSP.Protocol.Types.Common..=? arg3+ ,"trimFinalNewlines" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON FormattingOptions where+ parseJSON = Aeson.withObject "FormattingOptions" $ \arg -> FormattingOptions <$> arg Aeson..: "tabSize" <*> arg Aeson..: "insertSpaces" <*> arg Language.LSP.Protocol.Types.Common..:!? "trimTrailingWhitespace" <*> arg Language.LSP.Protocol.Types.Common..:!? "insertFinalNewline" <*> arg Language.LSP.Protocol.Types.Common..:!? "trimFinalNewlines"
+ generated/Language/LSP/Protocol/Internal/Types/FullDocumentDiagnosticReport.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|+A diagnostic report with a full set of problems.++@since 3.17.0+-}+data FullDocumentDiagnosticReport = FullDocumentDiagnosticReport + { {-|+ A full document diagnostic report.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+ , {-|+ An optional result id. If provided it will+ be sent on the next diagnostic request for the+ same document.+ -}+ _resultId :: (Maybe Data.Text.Text)+ , {-|+ The actual items.+ -}+ _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON FullDocumentDiagnosticReport)++instance Aeson.ToJSON FullDocumentDiagnosticReport where+ toJSON (FullDocumentDiagnosticReport arg0 arg1 arg2) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+ ,["items" Aeson..= arg2]]++instance Aeson.FromJSON FullDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "FullDocumentDiagnosticReport" $ \arg -> FullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "resultId" <*> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/GeneralClientCapabilities.hs view
@@ -0,0 +1,84 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.PositionEncodingKind+import qualified Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+General client capabilities.++@since 3.16.0+-}+data GeneralClientCapabilities = GeneralClientCapabilities + { {-|+ Client capability that signals how the client+ handles stale requests (e.g. a request+ for which the client will not process the response+ anymore since the information is outdated).++ @since 3.17.0+ -}+ _staleRequestSupport :: (Maybe Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions.StaleRequestSupportOptions)+ , {-|+ Client capabilities specific to regular expressions.++ @since 3.16.0+ -}+ _regularExpressions :: (Maybe Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities.RegularExpressionsClientCapabilities)+ , {-|+ Client capabilities specific to the client's markdown parser.++ @since 3.16.0+ -}+ _markdown :: (Maybe Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities.MarkdownClientCapabilities)+ , {-|+ The position encodings supported by the client. Client and server+ have to agree on the same position encoding to ensure that offsets+ (e.g. character position in a line) are interpreted the same on both+ sides.++ To keep the protocol backwards compatible the following applies: if+ the value 'utf-16' is missing from the array of position encodings+ servers can assume that the client supports UTF-16. UTF-16 is+ therefore a mandatory encoding.++ If omitted it defaults to ['utf-16'].++ Implementation considerations: since the conversion from one encoding+ into another requires the content of the file / line the conversion+ is best done where the file is read which is usually on the server+ side.++ @since 3.17.0+ -}+ _positionEncodings :: (Maybe [Language.LSP.Protocol.Internal.Types.PositionEncodingKind.PositionEncodingKind])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON GeneralClientCapabilities)++instance Aeson.ToJSON GeneralClientCapabilities where+ toJSON (GeneralClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["staleRequestSupport" Language.LSP.Protocol.Types.Common..=? arg0+ ,"regularExpressions" Language.LSP.Protocol.Types.Common..=? arg1+ ,"markdown" Language.LSP.Protocol.Types.Common..=? arg2+ ,"positionEncodings" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON GeneralClientCapabilities where+ parseJSON = Aeson.withObject "GeneralClientCapabilities" $ \arg -> GeneralClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "staleRequestSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "regularExpressions" <*> arg Language.LSP.Protocol.Types.Common..:!? "markdown" <*> arg Language.LSP.Protocol.Types.Common..:!? "positionEncodings"
+ generated/Language/LSP/Protocol/Internal/Types/GlobPattern.hs view
@@ -0,0 +1,31 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.GlobPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Pattern+import qualified Language.LSP.Protocol.Internal.Types.RelativePattern+import qualified Language.LSP.Protocol.Types.Common++{-|+The glob pattern. Either a string pattern or a relative pattern.++@since 3.17.0+-}+newtype GlobPattern = GlobPattern (Language.LSP.Protocol.Internal.Types.Pattern.Pattern Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RelativePattern.RelativePattern)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON GlobPattern)
+ generated/Language/LSP/Protocol/Internal/Types/Hover.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Hover where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkedString+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a hover request.+-}+data Hover = Hover + { {-|+ The hover's content+ -}+ _contents :: (Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.MarkedString.MarkedString Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.MarkedString.MarkedString]))+ , {-|+ An optional range inside the text document that is used to+ visualize the hover, e.g. by changing the background color.+ -}+ _range :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Hover)++instance Aeson.ToJSON Hover where+ toJSON (Hover arg0 arg1) = Aeson.object $ concat $ [["contents" Aeson..= arg0]+ ,"range" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON Hover where+ parseJSON = Aeson.withObject "Hover" $ \arg -> Hover <$> arg Aeson..: "contents" <*> arg Language.LSP.Protocol.Types.Common..:!? "range"
+ generated/Language/LSP/Protocol/Internal/Types/HoverClientCapabilities.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data HoverClientCapabilities = HoverClientCapabilities + { {-|+ Whether hover supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Client supports the following content formats for the content+ property. The order describes the preferred format of the client.+ -}+ _contentFormat :: (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON HoverClientCapabilities)++instance Aeson.ToJSON HoverClientCapabilities where+ toJSON (HoverClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"contentFormat" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON HoverClientCapabilities where+ parseJSON = Aeson.withObject "HoverClientCapabilities" $ \arg -> HoverClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "contentFormat"
+ generated/Language/LSP/Protocol/Internal/Types/HoverOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Hover options.+-}+data HoverOptions = HoverOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON HoverOptions)++instance Aeson.ToJSON HoverOptions where+ toJSON (HoverOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON HoverOptions where+ parseJSON = Aeson.withObject "HoverOptions" $ \arg -> HoverOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/HoverParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `HoverRequest`.+-}+data HoverParams = HoverParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON HoverParams)++instance Aeson.ToJSON HoverParams where+ toJSON (HoverParams arg0 arg1 arg2) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON HoverParams where+ parseJSON = Aeson.withObject "HoverParams" $ \arg -> HoverParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/HoverRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `HoverRequest`.+-}+data HoverRegistrationOptions = HoverRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON HoverRegistrationOptions)++instance Aeson.ToJSON HoverRegistrationOptions where+ toJSON (HoverRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON HoverRegistrationOptions where+ parseJSON = Aeson.withObject "HoverRegistrationOptions" $ \arg -> HoverRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationClientCapabilities.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.6.0+-}+data ImplementationClientCapabilities = ImplementationClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `ImplementationRegistrationOptions` return value+ for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports additional metadata in the form of definition links.++ @since 3.14.0+ -}+ _linkSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ImplementationClientCapabilities)++instance Aeson.ToJSON ImplementationClientCapabilities where+ toJSON (ImplementationClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ImplementationClientCapabilities where+ parseJSON = Aeson.withObject "ImplementationClientCapabilities" $ \arg -> ImplementationClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationOptions = ImplementationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ImplementationOptions)++instance Aeson.ToJSON ImplementationOptions where+ toJSON (ImplementationOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ImplementationOptions where+ parseJSON = Aeson.withObject "ImplementationOptions" $ \arg -> ImplementationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationParams = ImplementationParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ImplementationParams)++instance Aeson.ToJSON ImplementationParams where+ toJSON (ImplementationParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON ImplementationParams where+ parseJSON = Aeson.withObject "ImplementationParams" $ \arg -> ImplementationParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationRegistrationOptions = ImplementationRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ImplementationRegistrationOptions)++instance Aeson.ToJSON ImplementationRegistrationOptions where+ toJSON (ImplementationRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ImplementationRegistrationOptions where+ parseJSON = Aeson.withObject "ImplementationRegistrationOptions" $ \arg -> ImplementationRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeError.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeError where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The data type of the ResponseError if the+initialize request fails.+-}+data InitializeError = InitializeError + { {-|+ Indicates whether the client execute the following retry logic:+ (1) show the message provided by the ResponseError to the user+ (2) user selects retry or cancel+ (3) if user selected retry the initialize method is sent again.+ -}+ _retry :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InitializeError)++instance Aeson.ToJSON InitializeError where+ toJSON (InitializeError arg0) = Aeson.object $ concat $ [["retry" Aeson..= arg0]]++instance Aeson.FromJSON InitializeError where+ parseJSON = Aeson.withObject "InitializeError" $ \arg -> InitializeError <$> arg Aeson..: "retry"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeParams.hs view
@@ -0,0 +1,116 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ClientInfo+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TraceValue+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|++-}+data InitializeParams = InitializeParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The process Id of the parent process that started+ the server.++ Is `null` if the process has not been started by another process.+ If the parent process is not alive then the server should exit.+ -}+ _processId :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ Information about the client++ @since 3.15.0+ -}+ _clientInfo :: (Maybe Language.LSP.Protocol.Internal.Types.ClientInfo.ClientInfo)+ , {-|+ The locale the client is currently showing the user interface+ in. This must not necessarily be the locale of the operating+ system.++ Uses IETF language tags as the value's syntax+ (See https://en.wikipedia.org/wiki/IETF_language_tag)++ @since 3.16.0+ -}+ _locale :: (Maybe Data.Text.Text)+ , {-|+ The rootPath of the workspace. Is null+ if no folder is open.++ @deprecated in favour of rootUri.+ -}+ _rootPath :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ , {-|+ The rootUri of the workspace. Is null if no+ folder is open. If both `rootPath` and `rootUri` are set+ `rootUri` wins.++ @deprecated in favour of workspaceFolders.+ -}+ _rootUri :: (Language.LSP.Protocol.Types.Uri.Uri Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The capabilities provided by the client (editor or tool)+ -}+ _capabilities :: Language.LSP.Protocol.Internal.Types.ClientCapabilities.ClientCapabilities+ , {-|+ User provided initialization options.+ -}+ _initializationOptions :: (Maybe Data.Aeson.Value)+ , {-|+ The initial trace setting. If omitted trace is disabled ('off').+ -}+ _trace :: (Maybe Language.LSP.Protocol.Internal.Types.TraceValue.TraceValue)+ , {-|+ The workspace folders configured in the client when the server starts.++ This property is only available if the client supports workspace folders.+ It can be `null` if the client supports workspace folders but none are+ configured.++ @since 3.6.0+ -}+ _workspaceFolders :: (Maybe ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InitializeParams)++instance Aeson.ToJSON InitializeParams where+ toJSON (InitializeParams arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["processId" Aeson..= arg1]+ ,"clientInfo" Language.LSP.Protocol.Types.Common..=? arg2+ ,"locale" Language.LSP.Protocol.Types.Common..=? arg3+ ,"rootPath" Language.LSP.Protocol.Types.Common..=? arg4+ ,["rootUri" Aeson..= arg5]+ ,["capabilities" Aeson..= arg6]+ ,"initializationOptions" Language.LSP.Protocol.Types.Common..=? arg7+ ,"trace" Language.LSP.Protocol.Types.Common..=? arg8+ ,"workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg9]++instance Aeson.FromJSON InitializeParams where+ parseJSON = Aeson.withObject "InitializeParams" $ \arg -> InitializeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "processId" <*> arg Language.LSP.Protocol.Types.Common..:!? "clientInfo" <*> arg Language.LSP.Protocol.Types.Common..:!? "locale" <*> arg Language.LSP.Protocol.Types.Common..:!? "rootPath" <*> arg Aeson..: "rootUri" <*> arg Aeson..: "capabilities" <*> arg Language.LSP.Protocol.Types.Common..:!? "initializationOptions" <*> arg Language.LSP.Protocol.Types.Common..:!? "trace" <*> arg Language.LSP.Protocol.Types.Common..:!? "workspaceFolders"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeResult.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ServerCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ServerInfo+import qualified Language.LSP.Protocol.Types.Common++{-|+The result returned from an initialize request.+-}+data InitializeResult = InitializeResult + { {-|+ The capabilities the language server provides.+ -}+ _capabilities :: Language.LSP.Protocol.Internal.Types.ServerCapabilities.ServerCapabilities+ , {-|+ Information about the server.++ @since 3.15.0+ -}+ _serverInfo :: (Maybe Language.LSP.Protocol.Internal.Types.ServerInfo.ServerInfo)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InitializeResult)++instance Aeson.ToJSON InitializeResult where+ toJSON (InitializeResult arg0 arg1) = Aeson.object $ concat $ [["capabilities" Aeson..= arg0]+ ,"serverInfo" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InitializeResult where+ parseJSON = Aeson.withObject "InitializeResult" $ \arg -> InitializeResult <$> arg Aeson..: "capabilities" <*> arg Language.LSP.Protocol.Types.Common..:!? "serverInfo"
+ generated/Language/LSP/Protocol/Internal/Types/InitializedParams.hs view
@@ -0,0 +1,34 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializedParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data InitializedParams = InitializedParams + { + }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InitializedParams)++instance Aeson.ToJSON InitializedParams where+ toJSON (InitializedParams ) = Aeson.object $ concat $ []++instance Aeson.FromJSON InitializedParams where+ parseJSON = Aeson.withObject "InitializedParams" $ \arg -> pure InitializedParams
+ generated/Language/LSP/Protocol/Internal/Types/InlayHint.hs view
@@ -0,0 +1,101 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHint where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.InlayHintKind+import qualified Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint information.++@since 3.17.0+-}+data InlayHint = InlayHint + { {-|+ The position of this hint.++ If multiple hints have the same position, they will be shown in the order+ they appear in the response.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ The label of this hint. A human readable string or an array of+ InlayHintLabelPart label parts.++ *Note* that neither the string nor the label part can be empty.+ -}+ _label :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.InlayHintLabelPart.InlayHintLabelPart])+ , {-|+ The kind of this hint. Can be omitted in which case the client+ should fall back to a reasonable default.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintKind.InlayHintKind)+ , {-|+ Optional text edits that are performed when accepting this inlay hint.++ *Note* that edits are expected to change the document so that the inlay+ hint (or its nearest variant) is now part of the document and the inlay+ hint itself is now obsolete.+ -}+ _textEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+ , {-|+ The tooltip text when you hover over this item.+ -}+ _tooltip :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+ , {-|+ Render padding before the hint.++ Note: Padding should use the editor's background color, not the+ background color of the hint itself. That means padding can be used+ to visually align/separate an inlay hint.+ -}+ _paddingLeft :: (Maybe Bool)+ , {-|+ Render padding after the hint.++ Note: Padding should use the editor's background color, not the+ background color of the hint itself. That means padding can be used+ to visually align/separate an inlay hint.+ -}+ _paddingRight :: (Maybe Bool)+ , {-|+ A data entry field that is preserved on an inlay hint between+ a `textDocument/inlayHint` and a `inlayHint/resolve` request.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHint)++instance Aeson.ToJSON InlayHint where+ toJSON (InlayHint arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $ [["position" Aeson..= arg0]+ ,["label" Aeson..= arg1]+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg2+ ,"textEdits" Language.LSP.Protocol.Types.Common..=? arg3+ ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg4+ ,"paddingLeft" Language.LSP.Protocol.Types.Common..=? arg5+ ,"paddingRight" Language.LSP.Protocol.Types.Common..=? arg6+ ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON InlayHint where+ parseJSON = Aeson.withObject "InlayHint" $ \arg -> InlayHint <$> arg Aeson..: "position" <*> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "textEdits" <*> arg Language.LSP.Protocol.Types.Common..:!? "tooltip" <*> arg Language.LSP.Protocol.Types.Common..:!? "paddingLeft" <*> arg Language.LSP.Protocol.Types.Common..:!? "paddingRight" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintClientCapabilities.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint client capabilities.++@since 3.17.0+-}+data InlayHintClientCapabilities = InlayHintClientCapabilities + { {-|+ Whether inlay hints support dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Indicates which properties a client can resolve lazily on an inlay+ hint.+ -}+ _resolveSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions.ClientInlayHintResolveOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintClientCapabilities)++instance Aeson.ToJSON InlayHintClientCapabilities where+ toJSON (InlayHintClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlayHintClientCapabilities where+ parseJSON = Aeson.withObject "InlayHintClientCapabilities" $ \arg -> InlayHintClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Inlay hint kinds.++@since 3.17.0+-}+data InlayHintKind = + {-|+ An inlay hint that for a type annotation.+ -}+ InlayHintKind_Type+ | {-|+ An inlay hint that is for a parameter.+ -}+ InlayHintKind_Parameter+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InlayHintKind)+ deriving Pretty via (ViaJSON InlayHintKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InlayHintKind where+ knownValues = Data.Set.fromList [InlayHintKind_Type,InlayHintKind_Parameter]+ type EnumBaseType InlayHintKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType InlayHintKind_Type = 1+ toEnumBaseType InlayHintKind_Parameter = 2+ fromEnumBaseType 1 = pure InlayHintKind_Type+ fromEnumBaseType 2 = pure InlayHintKind_Parameter+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintLabelPart.hs view
@@ -0,0 +1,74 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintLabelPart where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Types.Common++{-|+An inlay hint label part allows for interactive and composite labels+of inlay hints.++@since 3.17.0+-}+data InlayHintLabelPart = InlayHintLabelPart + { {-|+ The value of this label part.+ -}+ _value :: Data.Text.Text+ , {-|+ The tooltip text when you hover over this label part. Depending on+ the client capability `inlayHint.resolveSupport` clients might resolve+ this property late using the resolve request.+ -}+ _tooltip :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+ , {-|+ An optional source code location that represents this+ label part.++ The editor will use this location for the hover and for code navigation+ features: This part will become a clickable link that resolves to the+ definition of the symbol at the given location (not necessarily the+ location itself), it shows the hover that shows at the given location,+ and it shows a context menu with further code navigation commands.++ Depending on the client capability `inlayHint.resolveSupport` clients+ might resolve this property late using the resolve request.+ -}+ _location :: (Maybe Language.LSP.Protocol.Internal.Types.Location.Location)+ , {-|+ An optional command for this label part.++ Depending on the client capability `inlayHint.resolveSupport` clients+ might resolve this property late using the resolve request.+ -}+ _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintLabelPart)++instance Aeson.ToJSON InlayHintLabelPart where+ toJSON (InlayHintLabelPart arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["value" Aeson..= arg0]+ ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg1+ ,"location" Language.LSP.Protocol.Types.Common..=? arg2+ ,"command" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON InlayHintLabelPart where+ parseJSON = Aeson.withObject "InlayHintLabelPart" $ \arg -> InlayHintLabelPart <$> arg Aeson..: "value" <*> arg Language.LSP.Protocol.Types.Common..:!? "tooltip" <*> arg Language.LSP.Protocol.Types.Common..:!? "location" <*> arg Language.LSP.Protocol.Types.Common..:!? "command"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintOptions.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint options used during static registration.++@since 3.17.0+-}+data InlayHintOptions = InlayHintOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The server provides support to resolve additional+ information for an inlay hint item.+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintOptions)++instance Aeson.ToJSON InlayHintOptions where+ toJSON (InlayHintOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlayHintOptions where+ parseJSON = Aeson.withObject "InlayHintOptions" $ \arg -> InlayHintOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in inlay hint requests.++@since 3.17.0+-}+data InlayHintParams = InlayHintParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The document range for which inlay hints should be computed.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintParams)++instance Aeson.ToJSON InlayHintParams where+ toJSON (InlayHintParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["textDocument" Aeson..= arg1]+ ,["range" Aeson..= arg2]]++instance Aeson.FromJSON InlayHintParams where+ parseJSON = Aeson.withObject "InlayHintParams" $ \arg -> InlayHintParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintRegistrationOptions.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint options used during static or dynamic registration.++@since 3.17.0+-}+data InlayHintRegistrationOptions = InlayHintRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The server provides support to resolve additional+ information for an inlay hint item.+ -}+ _resolveProvider :: (Maybe Bool)+ , {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintRegistrationOptions)++instance Aeson.ToJSON InlayHintRegistrationOptions where+ toJSON (InlayHintRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1+ ,["documentSelector" Aeson..= arg2]+ ,"id" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON InlayHintRegistrationOptions where+ parseJSON = Aeson.withObject "InlayHintRegistrationOptions" $ \arg -> InlayHintRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider" <*> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintWorkspaceClientCapabilities.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client workspace capabilities specific to inlay hints.++@since 3.17.0+-}+data InlayHintWorkspaceClientCapabilities = InlayHintWorkspaceClientCapabilities + { {-|+ Whether the client implementation supports a refresh request sent from+ the server to the client.++ Note that this event is global and will force the client to refresh all+ inlay hints currently shown. It should be used with absolute care and+ is useful for situation where a server for example detects a project wide+ change that requires such a calculation.+ -}+ _refreshSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlayHintWorkspaceClientCapabilities)++instance Aeson.ToJSON InlayHintWorkspaceClientCapabilities where+ toJSON (InlayHintWorkspaceClientCapabilities arg0) = Aeson.object $ concat $ ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlayHintWorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "InlayHintWorkspaceClientCapabilities" $ \arg -> InlayHintWorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValue.hs view
@@ -0,0 +1,36 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValue where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+import qualified Language.LSP.Protocol.Internal.Types.InlineValueText+import qualified Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value information can be provided by different means:+- directly as a text value (class InlineValueText).+- as a name to use for a variable lookup (class InlineValueVariableLookup)+- as an evaluatable expression (class InlineValueEvaluatableExpression)+The InlineValue types combines all inline value types into one type.++@since 3.17.0+-}+newtype InlineValue = InlineValue (Language.LSP.Protocol.Internal.Types.InlineValueText.InlineValueText Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup.InlineValueVariableLookup Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression.InlineValueEvaluatableExpression))+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValue)
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueClientCapabilities.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to inline values.++@since 3.17.0+-}+data InlineValueClientCapabilities = InlineValueClientCapabilities + { {-|+ Whether implementation supports dynamic registration for inline value providers.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueClientCapabilities)++instance Aeson.ToJSON InlineValueClientCapabilities where+ toJSON (InlineValueClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueClientCapabilities where+ parseJSON = Aeson.withObject "InlineValueClientCapabilities" $ \arg -> InlineValueClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueContext.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.17.0+-}+data InlineValueContext = InlineValueContext + { {-|+ The stack frame (as a DAP Id) where the execution has stopped.+ -}+ _frameId :: Language.LSP.Protocol.Types.Common.Int32+ , {-|+ The document range where execution has stopped.+ Typically the end position of the range denotes the line where the inline values are shown.+ -}+ _stoppedLocation :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueContext)++instance Aeson.ToJSON InlineValueContext where+ toJSON (InlineValueContext arg0 arg1) = Aeson.object $ concat $ [["frameId" Aeson..= arg0]+ ,["stoppedLocation" Aeson..= arg1]]++instance Aeson.FromJSON InlineValueContext where+ parseJSON = Aeson.withObject "InlineValueContext" $ \arg -> InlineValueContext <$> arg Aeson..: "frameId" <*> arg Aeson..: "stoppedLocation"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueEvaluatableExpression.hs view
@@ -0,0 +1,49 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide an inline value through an expression evaluation.+If only a range is specified, the expression will be extracted from the underlying document.+An optional expression can be used to override the extracted expression.++@since 3.17.0+-}+data InlineValueEvaluatableExpression = InlineValueEvaluatableExpression + { {-|+ The document range for which the inline value applies.+ The range is used to extract the evaluatable expression from the underlying document.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ If specified the expression overrides the extracted expression.+ -}+ _expression :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueEvaluatableExpression)++instance Aeson.ToJSON InlineValueEvaluatableExpression where+ toJSON (InlineValueEvaluatableExpression arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"expression" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlineValueEvaluatableExpression where+ parseJSON = Aeson.withObject "InlineValueEvaluatableExpression" $ \arg -> InlineValueEvaluatableExpression <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "expression"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value options used during static registration.++@since 3.17.0+-}+data InlineValueOptions = InlineValueOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueOptions)++instance Aeson.ToJSON InlineValueOptions where+ toJSON (InlineValueOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueOptions where+ parseJSON = Aeson.withObject "InlineValueOptions" $ \arg -> InlineValueOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueParams.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.InlineValueContext+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in inline value requests.++@since 3.17.0+-}+data InlineValueParams = InlineValueParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The document range for which inline values should be computed.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ Additional information about the context in which inline values were+ requested.+ -}+ _context :: Language.LSP.Protocol.Internal.Types.InlineValueContext.InlineValueContext+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueParams)++instance Aeson.ToJSON InlineValueParams where+ toJSON (InlineValueParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["textDocument" Aeson..= arg1]+ ,["range" Aeson..= arg2]+ ,["context" Aeson..= arg3]]++instance Aeson.FromJSON InlineValueParams where+ parseJSON = Aeson.withObject "InlineValueParams" $ \arg -> InlineValueParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueRegistrationOptions.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value options used during static or dynamic registration.++@since 3.17.0+-}+data InlineValueRegistrationOptions = InlineValueRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueRegistrationOptions)++instance Aeson.ToJSON InlineValueRegistrationOptions where+ toJSON (InlineValueRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["documentSelector" Aeson..= arg1]+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON InlineValueRegistrationOptions where+ parseJSON = Aeson.withObject "InlineValueRegistrationOptions" $ \arg -> InlineValueRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueText.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueText where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide inline value as text.++@since 3.17.0+-}+data InlineValueText = InlineValueText + { {-|+ The document range for which the inline value applies.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The text of the inline value.+ -}+ _text :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueText)++instance Aeson.ToJSON InlineValueText where+ toJSON (InlineValueText arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,["text" Aeson..= arg1]]++instance Aeson.FromJSON InlineValueText where+ parseJSON = Aeson.withObject "InlineValueText" $ \arg -> InlineValueText <$> arg Aeson..: "range" <*> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueVariableLookup.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide inline value through a variable lookup.+If only a range is specified, the variable name will be extracted from the underlying document.+An optional variable name can be used to override the extracted name.++@since 3.17.0+-}+data InlineValueVariableLookup = InlineValueVariableLookup + { {-|+ The document range for which the inline value applies.+ The range is used to extract the variable name from the underlying document.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ If specified the name of the variable to look up.+ -}+ _variableName :: (Maybe Data.Text.Text)+ , {-|+ How to perform the lookup.+ -}+ _caseSensitiveLookup :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueVariableLookup)++instance Aeson.ToJSON InlineValueVariableLookup where+ toJSON (InlineValueVariableLookup arg0 arg1 arg2) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"variableName" Language.LSP.Protocol.Types.Common..=? arg1+ ,["caseSensitiveLookup" Aeson..= arg2]]++instance Aeson.FromJSON InlineValueVariableLookup where+ parseJSON = Aeson.withObject "InlineValueVariableLookup" $ \arg -> InlineValueVariableLookup <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "variableName" <*> arg Aeson..: "caseSensitiveLookup"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueWorkspaceClientCapabilities.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client workspace capabilities specific to inline values.++@since 3.17.0+-}+data InlineValueWorkspaceClientCapabilities = InlineValueWorkspaceClientCapabilities + { {-|+ Whether the client implementation supports a refresh request sent from the+ server to the client.++ Note that this event is global and will force the client to refresh all+ inline values currently shown. It should be used with absolute care and is+ useful for situation where a server for example detects a project wide+ change that requires such a calculation.+ -}+ _refreshSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InlineValueWorkspaceClientCapabilities)++instance Aeson.ToJSON InlineValueWorkspaceClientCapabilities where+ toJSON (InlineValueWorkspaceClientCapabilities arg0) = Aeson.object $ concat $ ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueWorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "InlineValueWorkspaceClientCapabilities" $ \arg -> InlineValueWorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InsertReplaceEdit.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertReplaceEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A special text edit to provide an insert and a replace operation.++@since 3.16.0+-}+data InsertReplaceEdit = InsertReplaceEdit + { {-|+ The string to be inserted.+ -}+ _newText :: Data.Text.Text+ , {-|+ The range if the insert is requested+ -}+ _insert :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The range if the replace is requested.+ -}+ _replace :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON InsertReplaceEdit)++instance Aeson.ToJSON InsertReplaceEdit where+ toJSON (InsertReplaceEdit arg0 arg1 arg2) = Aeson.object $ concat $ [["newText" Aeson..= arg0]+ ,["insert" Aeson..= arg1]+ ,["replace" Aeson..= arg2]]++instance Aeson.FromJSON InsertReplaceEdit where+ parseJSON = Aeson.withObject "InsertReplaceEdit" $ \arg -> InsertReplaceEdit <$> arg Aeson..: "newText" <*> arg Aeson..: "insert" <*> arg Aeson..: "replace"
+ generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertTextFormat where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Defines whether the insert text in a completion item should be interpreted as+plain text or a snippet.+-}+data InsertTextFormat = + {-|+ The primary text to be inserted is treated as a plain string.+ -}+ InsertTextFormat_PlainText+ | {-|+ The primary text to be inserted is treated as a snippet.++ A snippet can define tab stops and placeholders with `$1`, `$2`+ and `${3:foo}`. `$0` defines the final tab stop, it defaults to+ the end of the snippet. Placeholders with equal identifiers are linked,+ that is typing in one will update others too.++ See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax+ -}+ InsertTextFormat_Snippet+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextFormat)+ deriving Pretty via (ViaJSON InsertTextFormat)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextFormat where+ knownValues = Data.Set.fromList [InsertTextFormat_PlainText+ ,InsertTextFormat_Snippet]+ type EnumBaseType InsertTextFormat = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType InsertTextFormat_PlainText = 1+ toEnumBaseType InsertTextFormat_Snippet = 2+ fromEnumBaseType 1 = pure InsertTextFormat_PlainText+ fromEnumBaseType 2 = pure InsertTextFormat_Snippet+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs view
@@ -0,0 +1,64 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertTextMode where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How whitespace and indentation is handled during completion+item insertion.++@since 3.16.0+-}+data InsertTextMode = + {-|+ The insertion or replace strings is taken as it is. If the+ value is multi line the lines below the cursor will be+ inserted using the indentation defined in the string value.+ The client will not apply any kind of adjustments to the+ string.+ -}+ InsertTextMode_AsIs+ | {-|+ The editor adjusts leading whitespace of new lines so that+ they match the indentation up to the cursor of the line for+ which the item is accepted.++ Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a+ multi line completion item is indented using 2 tabs and all+ following lines inserted will be indented using 2 tabs as well.+ -}+ InsertTextMode_AdjustIndentation+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextMode)+ deriving Pretty via (ViaJSON InsertTextMode)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextMode where+ knownValues = Data.Set.fromList [InsertTextMode_AsIs+ ,InsertTextMode_AdjustIndentation]+ type EnumBaseType InsertTextMode = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType InsertTextMode_AsIs = 1+ toEnumBaseType InsertTextMode_AdjustIndentation = 2+ fromEnumBaseType 1 = pure InsertTextMode_AsIs+ fromEnumBaseType 2 = pure InsertTextMode_AdjustIndentation+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs view
@@ -0,0 +1,86 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LSPErrorCodes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data LSPErrorCodes = + {-|+ A request failed but it was syntactically correct, e.g the+ method name was known and the parameters were valid. The error+ message should contain human readable information about why+ the request failed.++ @since 3.17.0+ -}+ LSPErrorCodes_RequestFailed+ | {-|+ The server cancelled the request. This error code should+ only be used for requests that explicitly support being+ server cancellable.++ @since 3.17.0+ -}+ LSPErrorCodes_ServerCancelled+ | {-|+ The server detected that the content of a document got+ modified outside normal conditions. A server should+ NOT send this error code if it detects a content change+ in it unprocessed messages. The result even computed+ on an older state might still be useful for the client.++ If a client decides that a result is not of any use anymore+ the client should cancel the request.+ -}+ LSPErrorCodes_ContentModified+ | {-|+ The client has canceled a request and a server as detected+ the cancel.+ -}+ LSPErrorCodes_RequestCancelled+ | LSPErrorCodes_Custom Language.LSP.Protocol.Types.Common.Int32+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum LSPErrorCodes)+ deriving Pretty via (ViaJSON LSPErrorCodes)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum LSPErrorCodes where+ knownValues = Data.Set.fromList [LSPErrorCodes_RequestFailed+ ,LSPErrorCodes_ServerCancelled+ ,LSPErrorCodes_ContentModified+ ,LSPErrorCodes_RequestCancelled]+ type EnumBaseType LSPErrorCodes = Language.LSP.Protocol.Types.Common.Int32+ toEnumBaseType LSPErrorCodes_RequestFailed = -32803+ toEnumBaseType LSPErrorCodes_ServerCancelled = -32802+ toEnumBaseType LSPErrorCodes_ContentModified = -32801+ toEnumBaseType LSPErrorCodes_RequestCancelled = -32800+ toEnumBaseType (LSPErrorCodes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum LSPErrorCodes where+ fromOpenEnumBaseType -32803 = LSPErrorCodes_RequestFailed+ fromOpenEnumBaseType -32802 = LSPErrorCodes_ServerCancelled+ fromOpenEnumBaseType -32801 = LSPErrorCodes_ContentModified+ fromOpenEnumBaseType -32800 = LSPErrorCodes_RequestCancelled+ fromOpenEnumBaseType arg = LSPErrorCodes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/LanguageKind.hs view
@@ -0,0 +1,450 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LanguageKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Predefined Language kinds+@since 3.18.0+@proposed+-}+data LanguageKind = + {-|++ -}+ LanguageKind_ABAP+ | {-|++ -}+ LanguageKind_WindowsBat+ | {-|++ -}+ LanguageKind_BibTeX+ | {-|++ -}+ LanguageKind_Clojure+ | {-|++ -}+ LanguageKind_Coffeescript+ | {-|++ -}+ LanguageKind_C+ | {-|++ -}+ LanguageKind_CPP+ | {-|++ -}+ LanguageKind_CSharp+ | {-|++ -}+ LanguageKind_CSS+ | {-|++ -}+ LanguageKind_Diff+ | {-|++ -}+ LanguageKind_Dart+ | {-|++ -}+ LanguageKind_Dockerfile+ | {-|++ -}+ LanguageKind_Elixir+ | {-|++ -}+ LanguageKind_Erlang+ | {-|++ -}+ LanguageKind_FSharp+ | {-|++ -}+ LanguageKind_GitCommit+ | {-|++ -}+ LanguageKind_GitRebase+ | {-|++ -}+ LanguageKind_Go+ | {-|++ -}+ LanguageKind_Groovy+ | {-|++ -}+ LanguageKind_Handlebars+ | {-|++ -}+ LanguageKind_Haskell+ | {-|++ -}+ LanguageKind_HTML+ | {-|++ -}+ LanguageKind_Ini+ | {-|++ -}+ LanguageKind_Java+ | {-|++ -}+ LanguageKind_JavaScript+ | {-|++ -}+ LanguageKind_JavaScriptReact+ | {-|++ -}+ LanguageKind_JSON+ | {-|++ -}+ LanguageKind_LaTeX+ | {-|++ -}+ LanguageKind_Less+ | {-|++ -}+ LanguageKind_Lua+ | {-|++ -}+ LanguageKind_Makefile+ | {-|++ -}+ LanguageKind_Markdown+ | {-|++ -}+ LanguageKind_ObjectiveC+ | {-|++ -}+ LanguageKind_ObjectiveCPP+ | {-|++ -}+ LanguageKind_Perl+ | {-|++ -}+ LanguageKind_Perl6+ | {-|++ -}+ LanguageKind_PHP+ | {-|++ -}+ LanguageKind_Powershell+ | {-|++ -}+ LanguageKind_Pug+ | {-|++ -}+ LanguageKind_Python+ | {-|++ -}+ LanguageKind_R+ | {-|++ -}+ LanguageKind_Razor+ | {-|++ -}+ LanguageKind_Ruby+ | {-|++ -}+ LanguageKind_Rust+ | {-|++ -}+ LanguageKind_SCSS+ | {-|++ -}+ LanguageKind_SASS+ | {-|++ -}+ LanguageKind_Scala+ | {-|++ -}+ LanguageKind_ShaderLab+ | {-|++ -}+ LanguageKind_ShellScript+ | {-|++ -}+ LanguageKind_SQL+ | {-|++ -}+ LanguageKind_Swift+ | {-|++ -}+ LanguageKind_TypeScript+ | {-|++ -}+ LanguageKind_TypeScriptReact+ | {-|++ -}+ LanguageKind_TeX+ | {-|++ -}+ LanguageKind_VisualBasic+ | {-|++ -}+ LanguageKind_XML+ | {-|++ -}+ LanguageKind_XSL+ | {-|++ -}+ LanguageKind_YAML+ | LanguageKind_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum LanguageKind)+ deriving Pretty via (ViaJSON LanguageKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum LanguageKind where+ knownValues = Data.Set.fromList [LanguageKind_ABAP+ ,LanguageKind_WindowsBat+ ,LanguageKind_BibTeX+ ,LanguageKind_Clojure+ ,LanguageKind_Coffeescript+ ,LanguageKind_C+ ,LanguageKind_CPP+ ,LanguageKind_CSharp+ ,LanguageKind_CSS+ ,LanguageKind_Diff+ ,LanguageKind_Dart+ ,LanguageKind_Dockerfile+ ,LanguageKind_Elixir+ ,LanguageKind_Erlang+ ,LanguageKind_FSharp+ ,LanguageKind_GitCommit+ ,LanguageKind_GitRebase+ ,LanguageKind_Go+ ,LanguageKind_Groovy+ ,LanguageKind_Handlebars+ ,LanguageKind_Haskell+ ,LanguageKind_HTML+ ,LanguageKind_Ini+ ,LanguageKind_Java+ ,LanguageKind_JavaScript+ ,LanguageKind_JavaScriptReact+ ,LanguageKind_JSON+ ,LanguageKind_LaTeX+ ,LanguageKind_Less+ ,LanguageKind_Lua+ ,LanguageKind_Makefile+ ,LanguageKind_Markdown+ ,LanguageKind_ObjectiveC+ ,LanguageKind_ObjectiveCPP+ ,LanguageKind_Perl+ ,LanguageKind_Perl6+ ,LanguageKind_PHP+ ,LanguageKind_Powershell+ ,LanguageKind_Pug+ ,LanguageKind_Python+ ,LanguageKind_R+ ,LanguageKind_Razor+ ,LanguageKind_Ruby+ ,LanguageKind_Rust+ ,LanguageKind_SCSS+ ,LanguageKind_SASS+ ,LanguageKind_Scala+ ,LanguageKind_ShaderLab+ ,LanguageKind_ShellScript+ ,LanguageKind_SQL+ ,LanguageKind_Swift+ ,LanguageKind_TypeScript+ ,LanguageKind_TypeScriptReact+ ,LanguageKind_TeX+ ,LanguageKind_VisualBasic+ ,LanguageKind_XML+ ,LanguageKind_XSL+ ,LanguageKind_YAML]+ type EnumBaseType LanguageKind = Data.Text.Text+ toEnumBaseType LanguageKind_ABAP = "abap"+ toEnumBaseType LanguageKind_WindowsBat = "bat"+ toEnumBaseType LanguageKind_BibTeX = "bibtex"+ toEnumBaseType LanguageKind_Clojure = "clojure"+ toEnumBaseType LanguageKind_Coffeescript = "coffeescript"+ toEnumBaseType LanguageKind_C = "c"+ toEnumBaseType LanguageKind_CPP = "cpp"+ toEnumBaseType LanguageKind_CSharp = "csharp"+ toEnumBaseType LanguageKind_CSS = "css"+ toEnumBaseType LanguageKind_Diff = "diff"+ toEnumBaseType LanguageKind_Dart = "dart"+ toEnumBaseType LanguageKind_Dockerfile = "dockerfile"+ toEnumBaseType LanguageKind_Elixir = "elixir"+ toEnumBaseType LanguageKind_Erlang = "erlang"+ toEnumBaseType LanguageKind_FSharp = "fsharp"+ toEnumBaseType LanguageKind_GitCommit = "git-commit"+ toEnumBaseType LanguageKind_GitRebase = "rebase"+ toEnumBaseType LanguageKind_Go = "go"+ toEnumBaseType LanguageKind_Groovy = "groovy"+ toEnumBaseType LanguageKind_Handlebars = "handlebars"+ toEnumBaseType LanguageKind_Haskell = "haskell"+ toEnumBaseType LanguageKind_HTML = "html"+ toEnumBaseType LanguageKind_Ini = "ini"+ toEnumBaseType LanguageKind_Java = "java"+ toEnumBaseType LanguageKind_JavaScript = "javascript"+ toEnumBaseType LanguageKind_JavaScriptReact = "javascriptreact"+ toEnumBaseType LanguageKind_JSON = "json"+ toEnumBaseType LanguageKind_LaTeX = "latex"+ toEnumBaseType LanguageKind_Less = "less"+ toEnumBaseType LanguageKind_Lua = "lua"+ toEnumBaseType LanguageKind_Makefile = "makefile"+ toEnumBaseType LanguageKind_Markdown = "markdown"+ toEnumBaseType LanguageKind_ObjectiveC = "objective-c"+ toEnumBaseType LanguageKind_ObjectiveCPP = "objective-cpp"+ toEnumBaseType LanguageKind_Perl = "perl"+ toEnumBaseType LanguageKind_Perl6 = "perl6"+ toEnumBaseType LanguageKind_PHP = "php"+ toEnumBaseType LanguageKind_Powershell = "powershell"+ toEnumBaseType LanguageKind_Pug = "jade"+ toEnumBaseType LanguageKind_Python = "python"+ toEnumBaseType LanguageKind_R = "r"+ toEnumBaseType LanguageKind_Razor = "razor"+ toEnumBaseType LanguageKind_Ruby = "ruby"+ toEnumBaseType LanguageKind_Rust = "rust"+ toEnumBaseType LanguageKind_SCSS = "scss"+ toEnumBaseType LanguageKind_SASS = "sass"+ toEnumBaseType LanguageKind_Scala = "scala"+ toEnumBaseType LanguageKind_ShaderLab = "shaderlab"+ toEnumBaseType LanguageKind_ShellScript = "shellscript"+ toEnumBaseType LanguageKind_SQL = "sql"+ toEnumBaseType LanguageKind_Swift = "swift"+ toEnumBaseType LanguageKind_TypeScript = "typescript"+ toEnumBaseType LanguageKind_TypeScriptReact = "typescriptreact"+ toEnumBaseType LanguageKind_TeX = "tex"+ toEnumBaseType LanguageKind_VisualBasic = "vb"+ toEnumBaseType LanguageKind_XML = "xml"+ toEnumBaseType LanguageKind_XSL = "xsl"+ toEnumBaseType LanguageKind_YAML = "yaml"+ toEnumBaseType (LanguageKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum LanguageKind where+ fromOpenEnumBaseType "abap" = LanguageKind_ABAP+ fromOpenEnumBaseType "bat" = LanguageKind_WindowsBat+ fromOpenEnumBaseType "bibtex" = LanguageKind_BibTeX+ fromOpenEnumBaseType "clojure" = LanguageKind_Clojure+ fromOpenEnumBaseType "coffeescript" = LanguageKind_Coffeescript+ fromOpenEnumBaseType "c" = LanguageKind_C+ fromOpenEnumBaseType "cpp" = LanguageKind_CPP+ fromOpenEnumBaseType "csharp" = LanguageKind_CSharp+ fromOpenEnumBaseType "css" = LanguageKind_CSS+ fromOpenEnumBaseType "diff" = LanguageKind_Diff+ fromOpenEnumBaseType "dart" = LanguageKind_Dart+ fromOpenEnumBaseType "dockerfile" = LanguageKind_Dockerfile+ fromOpenEnumBaseType "elixir" = LanguageKind_Elixir+ fromOpenEnumBaseType "erlang" = LanguageKind_Erlang+ fromOpenEnumBaseType "fsharp" = LanguageKind_FSharp+ fromOpenEnumBaseType "git-commit" = LanguageKind_GitCommit+ fromOpenEnumBaseType "rebase" = LanguageKind_GitRebase+ fromOpenEnumBaseType "go" = LanguageKind_Go+ fromOpenEnumBaseType "groovy" = LanguageKind_Groovy+ fromOpenEnumBaseType "handlebars" = LanguageKind_Handlebars+ fromOpenEnumBaseType "haskell" = LanguageKind_Haskell+ fromOpenEnumBaseType "html" = LanguageKind_HTML+ fromOpenEnumBaseType "ini" = LanguageKind_Ini+ fromOpenEnumBaseType "java" = LanguageKind_Java+ fromOpenEnumBaseType "javascript" = LanguageKind_JavaScript+ fromOpenEnumBaseType "javascriptreact" = LanguageKind_JavaScriptReact+ fromOpenEnumBaseType "json" = LanguageKind_JSON+ fromOpenEnumBaseType "latex" = LanguageKind_LaTeX+ fromOpenEnumBaseType "less" = LanguageKind_Less+ fromOpenEnumBaseType "lua" = LanguageKind_Lua+ fromOpenEnumBaseType "makefile" = LanguageKind_Makefile+ fromOpenEnumBaseType "markdown" = LanguageKind_Markdown+ fromOpenEnumBaseType "objective-c" = LanguageKind_ObjectiveC+ fromOpenEnumBaseType "objective-cpp" = LanguageKind_ObjectiveCPP+ fromOpenEnumBaseType "perl" = LanguageKind_Perl+ fromOpenEnumBaseType "perl6" = LanguageKind_Perl6+ fromOpenEnumBaseType "php" = LanguageKind_PHP+ fromOpenEnumBaseType "powershell" = LanguageKind_Powershell+ fromOpenEnumBaseType "jade" = LanguageKind_Pug+ fromOpenEnumBaseType "python" = LanguageKind_Python+ fromOpenEnumBaseType "r" = LanguageKind_R+ fromOpenEnumBaseType "razor" = LanguageKind_Razor+ fromOpenEnumBaseType "ruby" = LanguageKind_Ruby+ fromOpenEnumBaseType "rust" = LanguageKind_Rust+ fromOpenEnumBaseType "scss" = LanguageKind_SCSS+ fromOpenEnumBaseType "sass" = LanguageKind_SASS+ fromOpenEnumBaseType "scala" = LanguageKind_Scala+ fromOpenEnumBaseType "shaderlab" = LanguageKind_ShaderLab+ fromOpenEnumBaseType "shellscript" = LanguageKind_ShellScript+ fromOpenEnumBaseType "sql" = LanguageKind_SQL+ fromOpenEnumBaseType "swift" = LanguageKind_Swift+ fromOpenEnumBaseType "typescript" = LanguageKind_TypeScript+ fromOpenEnumBaseType "typescriptreact" = LanguageKind_TypeScriptReact+ fromOpenEnumBaseType "tex" = LanguageKind_TeX+ fromOpenEnumBaseType "vb" = LanguageKind_VisualBasic+ fromOpenEnumBaseType "xml" = LanguageKind_XML+ fromOpenEnumBaseType "xsl" = LanguageKind_XSL+ fromOpenEnumBaseType "yaml" = LanguageKind_YAML+ fromOpenEnumBaseType arg = LanguageKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeClientCapabilities.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for the linked editing range request.++@since 3.16.0+-}+data LinkedEditingRangeClientCapabilities = LinkedEditingRangeClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LinkedEditingRangeClientCapabilities)++instance Aeson.ToJSON LinkedEditingRangeClientCapabilities where+ toJSON (LinkedEditingRangeClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON LinkedEditingRangeClientCapabilities where+ parseJSON = Aeson.withObject "LinkedEditingRangeClientCapabilities" $ \arg -> LinkedEditingRangeClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeOptions = LinkedEditingRangeOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LinkedEditingRangeOptions)++instance Aeson.ToJSON LinkedEditingRangeOptions where+ toJSON (LinkedEditingRangeOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON LinkedEditingRangeOptions where+ parseJSON = Aeson.withObject "LinkedEditingRangeOptions" $ \arg -> LinkedEditingRangeOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeParams = LinkedEditingRangeParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LinkedEditingRangeParams)++instance Aeson.ToJSON LinkedEditingRangeParams where+ toJSON (LinkedEditingRangeParams arg0 arg1 arg2) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON LinkedEditingRangeParams where+ parseJSON = Aeson.withObject "LinkedEditingRangeParams" $ \arg -> LinkedEditingRangeParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeRegistrationOptions = LinkedEditingRangeRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LinkedEditingRangeRegistrationOptions)++instance Aeson.ToJSON LinkedEditingRangeRegistrationOptions where+ toJSON (LinkedEditingRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON LinkedEditingRangeRegistrationOptions where+ parseJSON = Aeson.withObject "LinkedEditingRangeRegistrationOptions" $ \arg -> LinkedEditingRangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRanges.hs view
@@ -0,0 +1,49 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRanges where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a linked editing range request.++@since 3.16.0+-}+data LinkedEditingRanges = LinkedEditingRanges + { {-|+ A list of ranges that can be edited together. The ranges must have+ identical length and contain identical text content. The ranges cannot overlap.+ -}+ _ranges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+ , {-|+ An optional word pattern (regular expression) that describes valid contents for+ the given ranges. If no pattern is provided, the client configuration's word+ pattern will be used.+ -}+ _wordPattern :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LinkedEditingRanges)++instance Aeson.ToJSON LinkedEditingRanges where+ toJSON (LinkedEditingRanges arg0 arg1) = Aeson.object $ concat $ [["ranges" Aeson..= arg0]+ ,"wordPattern" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON LinkedEditingRanges where+ parseJSON = Aeson.withObject "LinkedEditingRanges" $ \arg -> LinkedEditingRanges <$> arg Aeson..: "ranges" <*> arg Language.LSP.Protocol.Types.Common..:!? "wordPattern"
+ generated/Language/LSP/Protocol/Internal/Types/Location.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Location where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents a location inside a resource, such as a line+inside a text file.+-}+data Location = Location + { {-|++ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|++ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Location)++instance Aeson.ToJSON Location where+ toJSON (Location arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["range" Aeson..= arg1]]++instance Aeson.FromJSON Location where+ parseJSON = Aeson.withObject "Location" $ \arg -> Location <$> arg Aeson..: "uri" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/LocationLink.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LocationLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents the connection of two locations. Provides additional metadata over normal `Location`,+including an origin range.+-}+data LocationLink = LocationLink + { {-|+ Span of the origin of this link.++ Used as the underlined span for mouse interaction. Defaults to the word range at+ the definition position.+ -}+ _originSelectionRange :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+ , {-|+ The target resource identifier of this link.+ -}+ _targetUri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The full target range of this link. If the target for example is a symbol then target range is the+ range enclosing this symbol not including leading/trailing whitespace but everything else+ like comments. This information is typically used to highlight the range in the editor.+ -}+ _targetRange :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The range that should be selected and revealed when this link is being followed, e.g the name of a function.+ Must be contained by the `targetRange`. See also `DocumentSymbol#range`+ -}+ _targetSelectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LocationLink)++instance Aeson.ToJSON LocationLink where+ toJSON (LocationLink arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["originSelectionRange" Language.LSP.Protocol.Types.Common..=? arg0+ ,["targetUri" Aeson..= arg1]+ ,["targetRange" Aeson..= arg2]+ ,["targetSelectionRange" Aeson..= arg3]]++instance Aeson.FromJSON LocationLink where+ parseJSON = Aeson.withObject "LocationLink" $ \arg -> LocationLink <$> arg Language.LSP.Protocol.Types.Common..:!? "originSelectionRange" <*> arg Aeson..: "targetUri" <*> arg Aeson..: "targetRange" <*> arg Aeson..: "targetSelectionRange"
+ generated/Language/LSP/Protocol/Internal/Types/LocationUriOnly.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LocationUriOnly where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Location with only uri and does not include range.++@since 3.18.0+@proposed+-}+data LocationUriOnly = LocationUriOnly + { {-|++ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LocationUriOnly)++instance Aeson.ToJSON LocationUriOnly where+ toJSON (LocationUriOnly arg0) = Aeson.object $ concat $ [["uri" Aeson..= arg0]]++instance Aeson.FromJSON LocationUriOnly where+ parseJSON = Aeson.withObject "LocationUriOnly" $ \arg -> LocationUriOnly <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/LogMessageParams.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LogMessageParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|+The log message parameters.+-}+data LogMessageParams = LogMessageParams + { {-|+ The message type. See `MessageType`+ -}+ _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+ , {-|+ The actual message.+ -}+ _message :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LogMessageParams)++instance Aeson.ToJSON LogMessageParams where+ toJSON (LogMessageParams arg0 arg1) = Aeson.object $ concat $ [["type" Aeson..= arg0]+ ,["message" Aeson..= arg1]]++instance Aeson.FromJSON LogMessageParams where+ parseJSON = Aeson.withObject "LogMessageParams" $ \arg -> LogMessageParams <$> arg Aeson..: "type" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/LogTraceParams.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LogTraceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LogTraceParams = LogTraceParams + { {-|++ -}+ _message :: Data.Text.Text+ , {-|++ -}+ _verbose :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON LogTraceParams)++instance Aeson.ToJSON LogTraceParams where+ toJSON (LogTraceParams arg0 arg1) = Aeson.object $ concat $ [["message" Aeson..= arg0]+ ,"verbose" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON LogTraceParams where+ parseJSON = Aeson.withObject "LogTraceParams" $ \arg -> LogTraceParams <$> arg Aeson..: "message" <*> arg Language.LSP.Protocol.Types.Common..:!? "verbose"
+ generated/Language/LSP/Protocol/Internal/Types/MarkdownClientCapabilities.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to the used markdown parser.++@since 3.16.0+-}+data MarkdownClientCapabilities = MarkdownClientCapabilities + { {-|+ The name of the parser.+ -}+ _parser :: Data.Text.Text+ , {-|+ The version of the parser.+ -}+ _version :: (Maybe Data.Text.Text)+ , {-|+ A list of HTML tags that the client allows / supports in+ Markdown.++ @since 3.17.0+ -}+ _allowedTags :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MarkdownClientCapabilities)++instance Aeson.ToJSON MarkdownClientCapabilities where+ toJSON (MarkdownClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $ [["parser" Aeson..= arg0]+ ,"version" Language.LSP.Protocol.Types.Common..=? arg1+ ,"allowedTags" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON MarkdownClientCapabilities where+ parseJSON = Aeson.withObject "MarkdownClientCapabilities" $ \arg -> MarkdownClientCapabilities <$> arg Aeson..: "parser" <*> arg Language.LSP.Protocol.Types.Common..:!? "version" <*> arg Language.LSP.Protocol.Types.Common..:!? "allowedTags"
+ generated/Language/LSP/Protocol/Internal/Types/MarkedString.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkedString where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED MarkedString "use MarkupContent instead." #-}+{-|+MarkedString can be used to render human readable text. It is either a markdown string+or a code-block that provides a language and a code snippet. The language identifier+is semantically equal to the optional language identifier in fenced code blocks in GitHub+issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting++The pair of a language and a value is an equivalent to markdown:+```${language}+${value}+```++Note that markdown strings will be sanitized - that means html will be escaped.+@deprecated use MarkupContent instead.+-}+newtype MarkedString = MarkedString (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage.MarkedStringWithLanguage)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MarkedString)
+ generated/Language/LSP/Protocol/Internal/Types/MarkedStringWithLanguage.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED MarkedStringWithLanguage "use MarkupContent instead." #-}+{-|+@since 3.18.0+@proposed+@deprecated use MarkupContent instead.+-}+data MarkedStringWithLanguage = MarkedStringWithLanguage + { {-|++ -}+ _language :: Data.Text.Text+ , {-|++ -}+ _value :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MarkedStringWithLanguage)++instance Aeson.ToJSON MarkedStringWithLanguage where+ toJSON (MarkedStringWithLanguage arg0 arg1) = Aeson.object $ concat $ [["language" Aeson..= arg0]+ ,["value" Aeson..= arg1]]++instance Aeson.FromJSON MarkedStringWithLanguage where+ parseJSON = Aeson.withObject "MarkedStringWithLanguage" $ \arg -> MarkedStringWithLanguage <$> arg Aeson..: "language" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/MarkupContent.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkupContent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+A `MarkupContent` literal represents a string value which content is interpreted base on its+kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.++If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.+See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting++Here is an example how such a string can be constructed using JavaScript / TypeScript:+```ts+let markdown: MarkdownContent = {+ kind: MarkupKind.Markdown,+ value: [+ '# Header',+ 'Some text',+ '```typescript',+ 'someCode();',+ '```'+ ].join('\n')+};+```++*Please Note* that clients might sanitize the return markdown. A client could decide to+remove HTML from the markdown to avoid script execution.+-}+data MarkupContent = MarkupContent + { {-|+ The type of the Markup+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind+ , {-|+ The content itself+ -}+ _value :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MarkupContent)++instance Aeson.ToJSON MarkupContent where+ toJSON (MarkupContent arg0 arg1) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["value" Aeson..= arg1]]++instance Aeson.FromJSON MarkupContent where+ parseJSON = Aeson.withObject "MarkupContent" $ \arg -> MarkupContent <$> arg Aeson..: "kind" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkupKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Describes the content type that a client supports in various+result literals like `Hover`, `ParameterInfo` or `CompletionItem`.++Please note that `MarkupKinds` must not start with a `$`. This kinds+are reserved for internal usage.+-}+data MarkupKind = + {-|+ Plain text is supported as a content format+ -}+ MarkupKind_PlainText+ | {-|+ Markdown is supported as a content format+ -}+ MarkupKind_Markdown+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MarkupKind)+ deriving Pretty via (ViaJSON MarkupKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MarkupKind where+ knownValues = Data.Set.fromList [MarkupKind_PlainText,MarkupKind_Markdown]+ type EnumBaseType MarkupKind = Data.Text.Text+ toEnumBaseType MarkupKind_PlainText = "plaintext"+ toEnumBaseType MarkupKind_Markdown = "markdown"+ fromEnumBaseType "plaintext" = pure MarkupKind_PlainText+ fromEnumBaseType "markdown" = pure MarkupKind_Markdown+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/MessageActionItem.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MessageActionItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MessageActionItem = MessageActionItem + { {-|+ A short title like 'Retry', 'Open Log' etc.+ -}+ _title :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MessageActionItem)++instance Aeson.ToJSON MessageActionItem where+ toJSON (MessageActionItem arg0) = Aeson.object $ concat $ [["title" Aeson..= arg0]]++instance Aeson.FromJSON MessageActionItem where+ parseJSON = Aeson.withObject "MessageActionItem" $ \arg -> MessageActionItem <$> arg Aeson..: "title"
+ generated/Language/LSP/Protocol/Internal/Types/MessageType.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MessageType where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The message type+-}+data MessageType = + {-|+ An error message.+ -}+ MessageType_Error+ | {-|+ A warning message.+ -}+ MessageType_Warning+ | {-|+ An information message.+ -}+ MessageType_Info+ | {-|+ A log message.+ -}+ MessageType_Log+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MessageType)+ deriving Pretty via (ViaJSON MessageType)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MessageType where+ knownValues = Data.Set.fromList [MessageType_Error+ ,MessageType_Warning+ ,MessageType_Info+ ,MessageType_Log]+ type EnumBaseType MessageType = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType MessageType_Error = 1+ toEnumBaseType MessageType_Warning = 2+ toEnumBaseType MessageType_Info = 3+ toEnumBaseType MessageType_Log = 4+ fromEnumBaseType 1 = pure MessageType_Error+ fromEnumBaseType 2 = pure MessageType_Warning+ fromEnumBaseType 3 = pure MessageType_Info+ fromEnumBaseType 4 = pure MessageType_Log+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/Moniker.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Moniker where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MonikerKind+import qualified Language.LSP.Protocol.Internal.Types.UniquenessLevel+import qualified Language.LSP.Protocol.Types.Common++{-|+Moniker definition to match LSIF 0.5 moniker definition.++@since 3.16.0+-}+data Moniker = Moniker + { {-|+ The scheme of the moniker. For example tsc or .Net+ -}+ _scheme :: Data.Text.Text+ , {-|+ The identifier of the moniker. The value is opaque in LSIF however+ schema owners are allowed to define the structure if they want.+ -}+ _identifier :: Data.Text.Text+ , {-|+ The scope in which the moniker is unique+ -}+ _unique :: Language.LSP.Protocol.Internal.Types.UniquenessLevel.UniquenessLevel+ , {-|+ The moniker kind if known.+ -}+ _kind :: (Maybe Language.LSP.Protocol.Internal.Types.MonikerKind.MonikerKind)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Moniker)++instance Aeson.ToJSON Moniker where+ toJSON (Moniker arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["scheme" Aeson..= arg0]+ ,["identifier" Aeson..= arg1]+ ,["unique" Aeson..= arg2]+ ,"kind" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON Moniker where+ parseJSON = Aeson.withObject "Moniker" $ \arg -> Moniker <$> arg Aeson..: "scheme" <*> arg Aeson..: "identifier" <*> arg Aeson..: "unique" <*> arg Language.LSP.Protocol.Types.Common..:!? "kind"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerClientCapabilities.hs view
@@ -0,0 +1,41 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to the moniker request.++@since 3.16.0+-}+data MonikerClientCapabilities = MonikerClientCapabilities + { {-|+ Whether moniker supports dynamic registration. If this is set to `true`+ the client supports the new `MonikerRegistrationOptions` return value+ for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MonikerClientCapabilities)++instance Aeson.ToJSON MonikerClientCapabilities where+ toJSON (MonikerClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON MonikerClientCapabilities where+ parseJSON = Aeson.withObject "MonikerClientCapabilities" $ \arg -> MonikerClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The moniker kind.++@since 3.16.0+-}+data MonikerKind = + {-|+ The moniker represent a symbol that is imported into a project+ -}+ MonikerKind_Import+ | {-|+ The moniker represents a symbol that is exported from a project+ -}+ MonikerKind_Export+ | {-|+ The moniker represents a symbol that is local to a project (e.g. a local+ variable of a function, a class not visible outside the project, ...)+ -}+ MonikerKind_Local+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MonikerKind)+ deriving Pretty via (ViaJSON MonikerKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MonikerKind where+ knownValues = Data.Set.fromList [MonikerKind_Import+ ,MonikerKind_Export+ ,MonikerKind_Local]+ type EnumBaseType MonikerKind = Data.Text.Text+ toEnumBaseType MonikerKind_Import = "import"+ toEnumBaseType MonikerKind_Export = "export"+ toEnumBaseType MonikerKind_Local = "local"+ fromEnumBaseType "import" = pure MonikerKind_Import+ fromEnumBaseType "export" = pure MonikerKind_Export+ fromEnumBaseType "local" = pure MonikerKind_Local+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/MonikerOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerOptions = MonikerOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MonikerOptions)++instance Aeson.ToJSON MonikerOptions where+ toJSON (MonikerOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON MonikerOptions where+ parseJSON = Aeson.withObject "MonikerOptions" $ \arg -> MonikerOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerParams = MonikerParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MonikerParams)++instance Aeson.ToJSON MonikerParams where+ toJSON (MonikerParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON MonikerParams where+ parseJSON = Aeson.withObject "MonikerParams" $ \arg -> MonikerParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerRegistrationOptions = MonikerRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON MonikerRegistrationOptions)++instance Aeson.ToJSON MonikerRegistrationOptions where+ toJSON (MonikerRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON MonikerRegistrationOptions where+ parseJSON = Aeson.withObject "MonikerRegistrationOptions" $ \arg -> MonikerRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCell.hs view
@@ -0,0 +1,66 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCell where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ExecutionSummary+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellKind+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A notebook cell.++A cell's document URI must be unique across ALL notebook+cells and can therefore be used to uniquely identify a+notebook cell or the cell's text document.++@since 3.17.0+-}+data NotebookCell = NotebookCell + { {-|+ The cell's kind+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.NotebookCellKind.NotebookCellKind+ , {-|+ The URI of the cell's text document+ content.+ -}+ _document :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Additional metadata stored with the cell.++ Note: should always be an object literal (e.g. LSPObject)+ -}+ _metadata :: (Maybe Data.Aeson.Object)+ , {-|+ Additional execution summary information+ if supported by the client.+ -}+ _executionSummary :: (Maybe Language.LSP.Protocol.Internal.Types.ExecutionSummary.ExecutionSummary)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookCell)++instance Aeson.ToJSON NotebookCell where+ toJSON (NotebookCell arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["document" Aeson..= arg1]+ ,"metadata" Language.LSP.Protocol.Types.Common..=? arg2+ ,"executionSummary" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON NotebookCell where+ parseJSON = Aeson.withObject "NotebookCell" $ \arg -> NotebookCell <$> arg Aeson..: "kind" <*> arg Aeson..: "document" <*> arg Language.LSP.Protocol.Types.Common..:!? "metadata" <*> arg Language.LSP.Protocol.Types.Common..:!? "executionSummary"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellArrayChange.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Types.Common++{-|+A change describing how to move a `NotebookCell`+array from state S to S'.++@since 3.17.0+-}+data NotebookCellArrayChange = NotebookCellArrayChange + { {-|+ The start oftest of the cell that changed.+ -}+ _start :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The deleted cells+ -}+ _deleteCount :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The new cells, if any+ -}+ _cells :: (Maybe [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookCellArrayChange)++instance Aeson.ToJSON NotebookCellArrayChange where+ toJSON (NotebookCellArrayChange arg0 arg1 arg2) = Aeson.object $ concat $ [["start" Aeson..= arg0]+ ,["deleteCount" Aeson..= arg1]+ ,"cells" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookCellArrayChange where+ parseJSON = Aeson.withObject "NotebookCellArrayChange" $ \arg -> NotebookCellArrayChange <$> arg Aeson..: "start" <*> arg Aeson..: "deleteCount" <*> arg Language.LSP.Protocol.Types.Common..:!? "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A notebook cell kind.++@since 3.17.0+-}+data NotebookCellKind = + {-|+ A markup-cell is formatted source that is used for display.+ -}+ NotebookCellKind_Markup+ | {-|+ A code-cell is source code.+ -}+ NotebookCellKind_Code+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum NotebookCellKind)+ deriving Pretty via (ViaJSON NotebookCellKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum NotebookCellKind where+ knownValues = Data.Set.fromList [NotebookCellKind_Markup+ ,NotebookCellKind_Code]+ type EnumBaseType NotebookCellKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType NotebookCellKind_Markup = 1+ toEnumBaseType NotebookCellKind_Code = 2+ fromEnumBaseType 1 = pure NotebookCellKind_Markup+ fromEnumBaseType 2 = pure NotebookCellKind_Code+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellLanguage.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellLanguage where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data NotebookCellLanguage = NotebookCellLanguage + { {-|++ -}+ _language :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookCellLanguage)++instance Aeson.ToJSON NotebookCellLanguage where+ toJSON (NotebookCellLanguage arg0) = Aeson.object $ concat $ [["language" Aeson..= arg0]]++instance Aeson.FromJSON NotebookCellLanguage where+ parseJSON = Aeson.withObject "NotebookCellLanguage" $ \arg -> NotebookCellLanguage <$> arg Aeson..: "language"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellTextDocumentFilter.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook cell text document filter denotes a cell text+document by different properties.++@since 3.17.0+-}+data NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter + { {-|+ A filter that matches against the notebook+ containing the notebook cell. If a string+ value is provided it matches against the+ notebook type. '*' matches every notebook.+ -}+ _notebook :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter)+ , {-|+ A language id like `python`.++ Will be matched against the language id of the+ notebook cell document. '*' matches every language.+ -}+ _language :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookCellTextDocumentFilter)++instance Aeson.ToJSON NotebookCellTextDocumentFilter where+ toJSON (NotebookCellTextDocumentFilter arg0 arg1) = Aeson.object $ concat $ [["notebook" Aeson..= arg0]+ ,"language" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookCellTextDocumentFilter where+ parseJSON = Aeson.withObject "NotebookCellTextDocumentFilter" $ \arg -> NotebookCellTextDocumentFilter <$> arg Aeson..: "notebook" <*> arg Language.LSP.Protocol.Types.Common..:!? "language"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocument.hs view
@@ -0,0 +1,67 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocument where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A notebook document.++@since 3.17.0+-}+data NotebookDocument = NotebookDocument + { {-|+ The notebook document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The type of the notebook.+ -}+ _notebookType :: Data.Text.Text+ , {-|+ The version number of this document (it will increase after each+ change, including undo/redo).+ -}+ _version :: Language.LSP.Protocol.Types.Common.Int32+ , {-|+ Additional metadata stored with the notebook+ document.++ Note: should always be an object literal (e.g. LSPObject)+ -}+ _metadata :: (Maybe Data.Aeson.Object)+ , {-|+ The cells of a notebook.+ -}+ _cells :: [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocument)++instance Aeson.ToJSON NotebookDocument where+ toJSON (NotebookDocument arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["notebookType" Aeson..= arg1]+ ,["version" Aeson..= arg2]+ ,"metadata" Language.LSP.Protocol.Types.Common..=? arg3+ ,["cells" Aeson..= arg4]]++instance Aeson.FromJSON NotebookDocument where+ parseJSON = Aeson.withObject "NotebookDocument" $ \arg -> NotebookDocument <$> arg Aeson..: "uri" <*> arg Aeson..: "notebookType" <*> arg Aeson..: "version" <*> arg Language.LSP.Protocol.Types.Common..:!? "metadata" <*> arg Aeson..: "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellChangeStructure.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Types.Common++{-|+Structural changes to cells in a notebook document.++@since 3.18.0+@proposed+-}+data NotebookDocumentCellChangeStructure = NotebookDocumentCellChangeStructure + { {-|+ The change to the cell array.+ -}+ _array :: Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange.NotebookCellArrayChange+ , {-|+ Additional opened cell text documents.+ -}+ _didOpen :: (Maybe [Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem])+ , {-|+ Additional closed cell text documents.+ -}+ _didClose :: (Maybe [Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentCellChangeStructure)++instance Aeson.ToJSON NotebookDocumentCellChangeStructure where+ toJSON (NotebookDocumentCellChangeStructure arg0 arg1 arg2) = Aeson.object $ concat $ [["array" Aeson..= arg0]+ ,"didOpen" Language.LSP.Protocol.Types.Common..=? arg1+ ,"didClose" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentCellChangeStructure where+ parseJSON = Aeson.withObject "NotebookDocumentCellChangeStructure" $ \arg -> NotebookDocumentCellChangeStructure <$> arg Aeson..: "array" <*> arg Language.LSP.Protocol.Types.Common..:!? "didOpen" <*> arg Language.LSP.Protocol.Types.Common..:!? "didClose"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellChanges.hs view
@@ -0,0 +1,55 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges+import qualified Language.LSP.Protocol.Types.Common++{-|+Cell changes to a notebook document.++@since 3.18.0+@proposed+-}+data NotebookDocumentCellChanges = NotebookDocumentCellChanges + { {-|+ Changes to the cell structure to add or+ remove cells.+ -}+ _structure :: (Maybe Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure.NotebookDocumentCellChangeStructure)+ , {-|+ Changes to notebook cells properties like its+ kind, execution summary or metadata.+ -}+ _data_ :: (Maybe [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell])+ , {-|+ Changes to the text content of notebook cells.+ -}+ _textContent :: (Maybe [Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges.NotebookDocumentCellContentChanges])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentCellChanges)++instance Aeson.ToJSON NotebookDocumentCellChanges where+ toJSON (NotebookDocumentCellChanges arg0 arg1 arg2) = Aeson.object $ concat $ ["structure" Language.LSP.Protocol.Types.Common..=? arg0+ ,"data" Language.LSP.Protocol.Types.Common..=? arg1+ ,"textContent" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentCellChanges where+ parseJSON = Aeson.withObject "NotebookDocumentCellChanges" $ \arg -> NotebookDocumentCellChanges <$> arg Language.LSP.Protocol.Types.Common..:!? "structure" <*> arg Language.LSP.Protocol.Types.Common..:!? "data" <*> arg Language.LSP.Protocol.Types.Common..:!? "textContent"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentCellContentChanges.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Content changes to a cell in a notebook document.++@since 3.18.0+@proposed+-}+data NotebookDocumentCellContentChanges = NotebookDocumentCellContentChanges + { {-|++ -}+ _document :: Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier.VersionedTextDocumentIdentifier+ , {-|++ -}+ _changes :: [Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent.TextDocumentContentChangeEvent]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentCellContentChanges)++instance Aeson.ToJSON NotebookDocumentCellContentChanges where+ toJSON (NotebookDocumentCellContentChanges arg0 arg1) = Aeson.object $ concat $ [["document" Aeson..= arg0]+ ,["changes" Aeson..= arg1]]++instance Aeson.FromJSON NotebookDocumentCellContentChanges where+ parseJSON = Aeson.withObject "NotebookDocumentCellContentChanges" $ \arg -> NotebookDocumentCellContentChanges <$> arg Aeson..: "document" <*> arg Aeson..: "changes"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentChangeEvent.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges+import qualified Language.LSP.Protocol.Types.Common++{-|+A change event for a notebook document.++@since 3.17.0+-}+data NotebookDocumentChangeEvent = NotebookDocumentChangeEvent + { {-|+ The changed meta data if any.++ Note: should always be an object literal (e.g. LSPObject)+ -}+ _metadata :: (Maybe Data.Aeson.Object)+ , {-|+ Changes to cells+ -}+ _cells :: (Maybe Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges.NotebookDocumentCellChanges)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentChangeEvent)++instance Aeson.ToJSON NotebookDocumentChangeEvent where+ toJSON (NotebookDocumentChangeEvent arg0 arg1) = Aeson.object $ concat $ ["metadata" Language.LSP.Protocol.Types.Common..=? arg0+ ,"cells" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentChangeEvent where+ parseJSON = Aeson.withObject "NotebookDocumentChangeEvent" $ \arg -> NotebookDocumentChangeEvent <$> arg Language.LSP.Protocol.Types.Common..:!? "metadata" <*> arg Language.LSP.Protocol.Types.Common..:!? "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentClientCapabilities.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Capabilities specific to the notebook document support.++@since 3.17.0+-}+data NotebookDocumentClientCapabilities = NotebookDocumentClientCapabilities + { {-|+ Capabilities specific to notebook document synchronization++ @since 3.17.0+ -}+ _synchronization :: Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities.NotebookDocumentSyncClientCapabilities+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentClientCapabilities)++instance Aeson.ToJSON NotebookDocumentClientCapabilities where+ toJSON (NotebookDocumentClientCapabilities arg0) = Aeson.object $ concat $ [["synchronization" Aeson..= arg0]]++instance Aeson.FromJSON NotebookDocumentClientCapabilities where+ parseJSON = Aeson.withObject "NotebookDocumentClientCapabilities" $ \arg -> NotebookDocumentClientCapabilities <$> arg Aeson..: "synchronization"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilter.hs view
@@ -0,0 +1,34 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook document filter denotes a notebook document by+different properties. The properties will be match+against the notebook's URI (same as with documents)++@since 3.17.0+-}+newtype NotebookDocumentFilter = NotebookDocumentFilter (Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType.NotebookDocumentFilterNotebookType Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme.NotebookDocumentFilterScheme Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern.NotebookDocumentFilterPattern))+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilter)
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterNotebookType.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook document filter where `notebookType` is required field.++@since 3.18.0+@proposed+-}+data NotebookDocumentFilterNotebookType = NotebookDocumentFilterNotebookType + { {-|+ The type of the enclosing notebook.+ -}+ _notebookType :: Data.Text.Text+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: (Maybe Data.Text.Text)+ , {-|+ A glob pattern.+ -}+ _pattern :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilterNotebookType)++instance Aeson.ToJSON NotebookDocumentFilterNotebookType where+ toJSON (NotebookDocumentFilterNotebookType arg0 arg1 arg2) = Aeson.object $ concat $ [["notebookType" Aeson..= arg0]+ ,"scheme" Language.LSP.Protocol.Types.Common..=? arg1+ ,"pattern" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentFilterNotebookType where+ parseJSON = Aeson.withObject "NotebookDocumentFilterNotebookType" $ \arg -> NotebookDocumentFilterNotebookType <$> arg Aeson..: "notebookType" <*> arg Language.LSP.Protocol.Types.Common..:!? "scheme" <*> arg Language.LSP.Protocol.Types.Common..:!? "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterPattern.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook document filter where `pattern` is required field.++@since 3.18.0+@proposed+-}+data NotebookDocumentFilterPattern = NotebookDocumentFilterPattern + { {-|+ The type of the enclosing notebook.+ -}+ _notebookType :: (Maybe Data.Text.Text)+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: (Maybe Data.Text.Text)+ , {-|+ A glob pattern.+ -}+ _pattern :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilterPattern)++instance Aeson.ToJSON NotebookDocumentFilterPattern where+ toJSON (NotebookDocumentFilterPattern arg0 arg1 arg2) = Aeson.object $ concat $ ["notebookType" Language.LSP.Protocol.Types.Common..=? arg0+ ,"scheme" Language.LSP.Protocol.Types.Common..=? arg1+ ,["pattern" Aeson..= arg2]]++instance Aeson.FromJSON NotebookDocumentFilterPattern where+ parseJSON = Aeson.withObject "NotebookDocumentFilterPattern" $ \arg -> NotebookDocumentFilterPattern <$> arg Language.LSP.Protocol.Types.Common..:!? "notebookType" <*> arg Language.LSP.Protocol.Types.Common..:!? "scheme" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterScheme.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook document filter where `scheme` is required field.++@since 3.18.0+@proposed+-}+data NotebookDocumentFilterScheme = NotebookDocumentFilterScheme + { {-|+ The type of the enclosing notebook.+ -}+ _notebookType :: (Maybe Data.Text.Text)+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: Data.Text.Text+ , {-|+ A glob pattern.+ -}+ _pattern :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilterScheme)++instance Aeson.ToJSON NotebookDocumentFilterScheme where+ toJSON (NotebookDocumentFilterScheme arg0 arg1 arg2) = Aeson.object $ concat $ ["notebookType" Language.LSP.Protocol.Types.Common..=? arg0+ ,["scheme" Aeson..= arg1]+ ,"pattern" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentFilterScheme where+ parseJSON = Aeson.withObject "NotebookDocumentFilterScheme" $ \arg -> NotebookDocumentFilterScheme <$> arg Language.LSP.Protocol.Types.Common..:!? "notebookType" <*> arg Aeson..: "scheme" <*> arg Language.LSP.Protocol.Types.Common..:!? "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterWithCells.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellLanguage+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data NotebookDocumentFilterWithCells = NotebookDocumentFilterWithCells + { {-|+ The notebook to be synced If a string+ value is provided it matches against the+ notebook type. '*' matches every notebook.+ -}+ _notebook :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter))+ , {-|+ The cells of the matching notebook to be synced.+ -}+ _cells :: [Language.LSP.Protocol.Internal.Types.NotebookCellLanguage.NotebookCellLanguage]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilterWithCells)++instance Aeson.ToJSON NotebookDocumentFilterWithCells where+ toJSON (NotebookDocumentFilterWithCells arg0 arg1) = Aeson.object $ concat $ ["notebook" Language.LSP.Protocol.Types.Common..=? arg0+ ,["cells" Aeson..= arg1]]++instance Aeson.FromJSON NotebookDocumentFilterWithCells where+ parseJSON = Aeson.withObject "NotebookDocumentFilterWithCells" $ \arg -> NotebookDocumentFilterWithCells <$> arg Language.LSP.Protocol.Types.Common..:!? "notebook" <*> arg Aeson..: "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilterWithNotebook.hs view
@@ -0,0 +1,48 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellLanguage+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data NotebookDocumentFilterWithNotebook = NotebookDocumentFilterWithNotebook + { {-|+ The notebook to be synced If a string+ value is provided it matches against the+ notebook type. '*' matches every notebook.+ -}+ _notebook :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter)+ , {-|+ The cells of the matching notebook to be synced.+ -}+ _cells :: (Maybe [Language.LSP.Protocol.Internal.Types.NotebookCellLanguage.NotebookCellLanguage])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentFilterWithNotebook)++instance Aeson.ToJSON NotebookDocumentFilterWithNotebook where+ toJSON (NotebookDocumentFilterWithNotebook arg0 arg1) = Aeson.object $ concat $ [["notebook" Aeson..= arg0]+ ,"cells" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentFilterWithNotebook where+ parseJSON = Aeson.withObject "NotebookDocumentFilterWithNotebook" $ \arg -> NotebookDocumentFilterWithNotebook <$> arg Aeson..: "notebook" <*> arg Language.LSP.Protocol.Types.Common..:!? "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentIdentifier.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A literal to identify a notebook document in the client.++@since 3.17.0+-}+data NotebookDocumentIdentifier = NotebookDocumentIdentifier + { {-|+ The notebook document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentIdentifier)++instance Aeson.ToJSON NotebookDocumentIdentifier where+ toJSON (NotebookDocumentIdentifier arg0) = Aeson.object $ concat $ [["uri" Aeson..= arg0]]++instance Aeson.FromJSON NotebookDocumentIdentifier where+ parseJSON = Aeson.withObject "NotebookDocumentIdentifier" $ \arg -> NotebookDocumentIdentifier <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncClientCapabilities.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Notebook specific client capabilities.++@since 3.17.0+-}+data NotebookDocumentSyncClientCapabilities = NotebookDocumentSyncClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is+ set to `true` the client supports the new+ `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports sending execution summary data per cell.+ -}+ _executionSummarySupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentSyncClientCapabilities)++instance Aeson.ToJSON NotebookDocumentSyncClientCapabilities where+ toJSON (NotebookDocumentSyncClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"executionSummarySupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentSyncClientCapabilities where+ parseJSON = Aeson.withObject "NotebookDocumentSyncClientCapabilities" $ \arg -> NotebookDocumentSyncClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "executionSummarySupport"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncOptions.hs view
@@ -0,0 +1,57 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook+import qualified Language.LSP.Protocol.Types.Common++{-|+Options specific to a notebook plus its cells+to be synced to the server.++If a selector provides a notebook document+filter but no cell selector all cells of a+matching notebook document will be synced.++If a selector provides no notebook document+filter but only a cell selector all notebook+document that contain at least one matching+cell will be synced.++@since 3.17.0+-}+data NotebookDocumentSyncOptions = NotebookDocumentSyncOptions + { {-|+ The notebooks to be synced+ -}+ _notebookSelector :: [(Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook.NotebookDocumentFilterWithNotebook Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells.NotebookDocumentFilterWithCells)]+ , {-|+ Whether save notification should be forwarded to+ the server. Will only be honored if mode === `notebook`.+ -}+ _save :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentSyncOptions)++instance Aeson.ToJSON NotebookDocumentSyncOptions where+ toJSON (NotebookDocumentSyncOptions arg0 arg1) = Aeson.object $ concat $ [["notebookSelector" Aeson..= arg0]+ ,"save" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentSyncOptions where+ parseJSON = Aeson.withObject "NotebookDocumentSyncOptions" $ \arg -> NotebookDocumentSyncOptions <$> arg Aeson..: "notebookSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "save"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncRegistrationOptions.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options specific to a notebook.++@since 3.17.0+-}+data NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncRegistrationOptions + { {-|+ The notebooks to be synced+ -}+ _notebookSelector :: [(Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook.NotebookDocumentFilterWithNotebook Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells.NotebookDocumentFilterWithCells)]+ , {-|+ Whether save notification should be forwarded to+ the server. Will only be honored if mode === `notebook`.+ -}+ _save :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON NotebookDocumentSyncRegistrationOptions)++instance Aeson.ToJSON NotebookDocumentSyncRegistrationOptions where+ toJSON (NotebookDocumentSyncRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["notebookSelector" Aeson..= arg0]+ ,"save" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentSyncRegistrationOptions where+ parseJSON = Aeson.withObject "NotebookDocumentSyncRegistrationOptions" $ \arg -> NotebookDocumentSyncRegistrationOptions <$> arg Aeson..: "notebookSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "save" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/OptionalVersionedTextDocumentIdentifier.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A text document identifier to optionally denote a specific version of a text document.+-}+data OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier + { {-|+ The text document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The version number of this document. If a versioned text document identifier+ is sent from the server to the client and the file is not open in the editor+ (the server has not received an open notification before) the server can send+ `null` to indicate that the version is unknown and the content on disk is the+ truth (as specified with document content ownership).+ -}+ _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON OptionalVersionedTextDocumentIdentifier)++instance Aeson.ToJSON OptionalVersionedTextDocumentIdentifier where+ toJSON (OptionalVersionedTextDocumentIdentifier arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["version" Aeson..= arg1]]++instance Aeson.FromJSON OptionalVersionedTextDocumentIdentifier where+ parseJSON = Aeson.withObject "OptionalVersionedTextDocumentIdentifier" $ \arg -> OptionalVersionedTextDocumentIdentifier <$> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/ParameterInformation.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ParameterInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a parameter of a callable-signature. A parameter can+have a label and a doc-comment.+-}+data ParameterInformation = ParameterInformation + { {-|+ The label of this parameter information.++ Either a string or an inclusive start and exclusive end offsets within its containing+ signature label. (see SignatureInformation.label). The offsets are based on a UTF-16+ string representation as `Position` and `Range` does.++ To avoid ambiguities a server should use the [start, end] offset value instead of using+ a substring. Whether a client support this is controlled via `labelOffsetSupport` client+ capability.++ *Note*: a label of type string should be a substring of its containing signature label.+ Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.+ -}+ _label :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? ( Language.LSP.Protocol.Types.Common.UInt+ , Language.LSP.Protocol.Types.Common.UInt ))+ , {-|+ The human-readable doc-comment of this parameter. Will be shown+ in the UI but can be omitted.+ -}+ _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ParameterInformation)++instance Aeson.ToJSON ParameterInformation where+ toJSON (ParameterInformation arg0 arg1) = Aeson.object $ concat $ [["label" Aeson..= arg0]+ ,"documentation" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ParameterInformation where+ parseJSON = Aeson.withObject "ParameterInformation" $ \arg -> ParameterInformation <$> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentation"
+ generated/Language/LSP/Protocol/Internal/Types/PartialResultParams.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PartialResultParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data PartialResultParams = PartialResultParams + { {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PartialResultParams)++instance Aeson.ToJSON PartialResultParams where+ toJSON (PartialResultParams arg0) = Aeson.object $ concat $ ["partialResultToken" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON PartialResultParams where+ parseJSON = Aeson.withObject "PartialResultParams" $ \arg -> PartialResultParams <$> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/Pattern.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Pattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text++{-|+The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:+- `*` to match one or more characters in a path segment+- `?` to match on one character in a path segment+- `**` to match any number of path segments, including none+- `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)+- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)++@since 3.17.0+-}+newtype Pattern = Pattern Data.Text.Text+ deriving newtype ( Aeson.ToJSON+ , Aeson.FromJSON+ , Aeson.ToJSONKey+ , Aeson.FromJSONKey )+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Pattern)
+ generated/Language/LSP/Protocol/Internal/Types/Position.hs view
@@ -0,0 +1,77 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Position where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Position in a text document expressed as zero-based line and character+offset. Prior to 3.17 the offsets were always based on a UTF-16 string+representation. So a string of the form `a𐐀b` the character offset of the+character `a` is 0, the character offset of `𐐀` is 1 and the character+offset of b is 3 since `𐐀` is represented using two code units in UTF-16.+Since 3.17 clients and servers can agree on a different string encoding+representation (e.g. UTF-8). The client announces it's supported encoding+via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).+The value is an array of position encodings the client supports, with+decreasing preference (e.g. the encoding at index `0` is the most preferred+one). To stay backwards compatible the only mandatory encoding is UTF-16+represented via the string `utf-16`. The server can pick one of the+encodings offered by the client and signals that encoding back to the+client via the initialize result's property+[`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value+`utf-16` is missing from the client's capability `general.positionEncodings`+servers can safely assume that the client supports UTF-16. If the server+omits the position encoding in its initialize result the encoding defaults+to the string value `utf-16`. Implementation considerations: since the+conversion from one encoding into another requires the content of the+file / line the conversion is best done where the file is read which is+usually on the server side.++Positions are line end character agnostic. So you can not specify a position+that denotes `\r|\n` or `\n|` where `|` represents the character offset.++@since 3.17.0 - support for negotiated position encoding.+-}+data Position = Position + { {-|+ Line position in a document (zero-based).++ If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.+ If a line number is negative, it defaults to 0.+ -}+ _line :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ Character offset on a line in a document (zero-based).++ The meaning of this offset is determined by the negotiated+ `PositionEncodingKind`.++ If the character value is greater than the line length it defaults back to the+ line length.+ -}+ _character :: Language.LSP.Protocol.Types.Common.UInt+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Position)++instance Aeson.ToJSON Position where+ toJSON (Position arg0 arg1) = Aeson.object $ concat $ [["line" Aeson..= arg0]+ ,["character" Aeson..= arg1]]++instance Aeson.FromJSON Position where+ parseJSON = Aeson.withObject "Position" $ \arg -> Position <$> arg Aeson..: "line" <*> arg Aeson..: "character"
+ generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs view
@@ -0,0 +1,72 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PositionEncodingKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined position encoding kinds.++@since 3.17.0+-}+data PositionEncodingKind = + {-|+ Character offsets count UTF-8 code units (e.g. bytes).+ -}+ PositionEncodingKind_UTF8+ | {-|+ Character offsets count UTF-16 code units.++ This is the default and must always be supported+ by servers+ -}+ PositionEncodingKind_UTF16+ | {-|+ Character offsets count UTF-32 code units.++ Implementation note: these are the same as Unicode codepoints,+ so this `PositionEncodingKind` may also be used for an+ encoding-agnostic representation of character offsets.+ -}+ PositionEncodingKind_UTF32+ | PositionEncodingKind_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PositionEncodingKind)+ deriving Pretty via (ViaJSON PositionEncodingKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum PositionEncodingKind where+ knownValues = Data.Set.fromList [PositionEncodingKind_UTF8+ ,PositionEncodingKind_UTF16+ ,PositionEncodingKind_UTF32]+ type EnumBaseType PositionEncodingKind = Data.Text.Text+ toEnumBaseType PositionEncodingKind_UTF8 = "utf-8"+ toEnumBaseType PositionEncodingKind_UTF16 = "utf-16"+ toEnumBaseType PositionEncodingKind_UTF32 = "utf-32"+ toEnumBaseType (PositionEncodingKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum PositionEncodingKind where+ fromOpenEnumBaseType "utf-8" = PositionEncodingKind_UTF8+ fromOpenEnumBaseType "utf-16" = PositionEncodingKind_UTF16+ fromOpenEnumBaseType "utf-32" = PositionEncodingKind_UTF32+ fromOpenEnumBaseType arg = PositionEncodingKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenameDefaultBehavior.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data PrepareRenameDefaultBehavior = PrepareRenameDefaultBehavior + { {-|++ -}+ _defaultBehavior :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PrepareRenameDefaultBehavior)++instance Aeson.ToJSON PrepareRenameDefaultBehavior where+ toJSON (PrepareRenameDefaultBehavior arg0) = Aeson.object $ concat $ [["defaultBehavior" Aeson..= arg0]]++instance Aeson.FromJSON PrepareRenameDefaultBehavior where+ parseJSON = Aeson.withObject "PrepareRenameDefaultBehavior" $ \arg -> PrepareRenameDefaultBehavior <$> arg Aeson..: "defaultBehavior"
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenameParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenameParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data PrepareRenameParams = PrepareRenameParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PrepareRenameParams)++instance Aeson.ToJSON PrepareRenameParams where+ toJSON (PrepareRenameParams arg0 arg1 arg2) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON PrepareRenameParams where+ parseJSON = Aeson.withObject "PrepareRenameParams" $ \arg -> PrepareRenameParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenamePlaceholder.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data PrepareRenamePlaceholder = PrepareRenamePlaceholder + { {-|++ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|++ -}+ _placeholder :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PrepareRenamePlaceholder)++instance Aeson.ToJSON PrepareRenamePlaceholder where+ toJSON (PrepareRenamePlaceholder arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,["placeholder" Aeson..= arg1]]++instance Aeson.FromJSON PrepareRenamePlaceholder where+ parseJSON = Aeson.withObject "PrepareRenamePlaceholder" $ \arg -> PrepareRenamePlaceholder <$> arg Aeson..: "range" <*> arg Aeson..: "placeholder"
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenameResult.hs view
@@ -0,0 +1,30 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenameResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+newtype PrepareRenameResult = PrepareRenameResult (Language.LSP.Protocol.Internal.Types.Range.Range Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder.PrepareRenamePlaceholder Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior.PrepareRenameDefaultBehavior))+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PrepareRenameResult)
+ generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data PrepareSupportDefaultBehavior = + {-|+ The client's default behavior is to select the identifier+ according the to language's syntax rule.+ -}+ PrepareSupportDefaultBehavior_Identifier+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PrepareSupportDefaultBehavior)+ deriving Pretty via (ViaJSON PrepareSupportDefaultBehavior)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum PrepareSupportDefaultBehavior where+ knownValues = Data.Set.fromList [PrepareSupportDefaultBehavior_Identifier]+ type EnumBaseType PrepareSupportDefaultBehavior = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType PrepareSupportDefaultBehavior_Identifier = 1+ fromEnumBaseType 1 = pure PrepareSupportDefaultBehavior_Identifier+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/PreviousResultId.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PreviousResultId where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A previous result id in a workspace pull request.++@since 3.17.0+-}+data PreviousResultId = PreviousResultId + { {-|+ The URI for which the client knowns a+ result id.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The value of the previous result id.+ -}+ _value :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PreviousResultId)++instance Aeson.ToJSON PreviousResultId where+ toJSON (PreviousResultId arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["value" Aeson..= arg1]]++instance Aeson.FromJSON PreviousResultId where+ parseJSON = Aeson.withObject "PreviousResultId" $ \arg -> PreviousResultId <$> arg Aeson..: "uri" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ProgressParams.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ProgressParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ProgressParams = ProgressParams + { {-|+ The progress token provided by the client or server.+ -}+ _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+ , {-|+ The progress data.+ -}+ _value :: Data.Aeson.Value+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ProgressParams)++instance Aeson.ToJSON ProgressParams where+ toJSON (ProgressParams arg0 arg1) = Aeson.object $ concat $ [["token" Aeson..= arg0]+ ,["value" Aeson..= arg1]]++instance Aeson.FromJSON ProgressParams where+ parseJSON = Aeson.withObject "ProgressParams" $ \arg -> ProgressParams <$> arg Aeson..: "token" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ProgressToken.hs view
@@ -0,0 +1,28 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ProgressToken where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+newtype ProgressToken = ProgressToken (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ProgressToken)
+ generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsClientCapabilities.hs view
@@ -0,0 +1,70 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+The publish diagnostic client capabilities.+-}+data PublishDiagnosticsClientCapabilities = PublishDiagnosticsClientCapabilities + { {-|+ Whether the clients accepts diagnostics with related information.+ -}+ _relatedInformation :: (Maybe Bool)+ , {-|+ Client supports the tag property to provide meta data about a diagnostic.+ Clients supporting tags have to handle unknown tags gracefully.++ @since 3.15.0+ -}+ _tagSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions.ClientDiagnosticsTagOptions)+ , {-|+ Whether the client interprets the version property of the+ `textDocument/publishDiagnostics` notification's parameter.++ @since 3.15.0+ -}+ _versionSupport :: (Maybe Bool)+ , {-|+ Client supports a codeDescription property++ @since 3.16.0+ -}+ _codeDescriptionSupport :: (Maybe Bool)+ , {-|+ Whether code action supports the `data` property which is+ preserved between a `textDocument/publishDiagnostics` and+ `textDocument/codeAction` request.++ @since 3.16.0+ -}+ _dataSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PublishDiagnosticsClientCapabilities)++instance Aeson.ToJSON PublishDiagnosticsClientCapabilities where+ toJSON (PublishDiagnosticsClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["relatedInformation" Language.LSP.Protocol.Types.Common..=? arg0+ ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg1+ ,"versionSupport" Language.LSP.Protocol.Types.Common..=? arg2+ ,"codeDescriptionSupport" Language.LSP.Protocol.Types.Common..=? arg3+ ,"dataSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON PublishDiagnosticsClientCapabilities where+ parseJSON = Aeson.withObject "PublishDiagnosticsClientCapabilities" $ \arg -> PublishDiagnosticsClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "relatedInformation" <*> arg Language.LSP.Protocol.Types.Common..:!? "tagSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "versionSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeDescriptionSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "dataSupport"
+ generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsParams.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+The publish diagnostic notification's parameters.+-}+data PublishDiagnosticsParams = PublishDiagnosticsParams + { {-|+ The URI for which diagnostic information is reported.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Optional the version number of the document the diagnostics are published for.++ @since 3.15.0+ -}+ _version :: (Maybe Language.LSP.Protocol.Types.Common.Int32)+ , {-|+ An array of diagnostic information items.+ -}+ _diagnostics :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON PublishDiagnosticsParams)++instance Aeson.ToJSON PublishDiagnosticsParams where+ toJSON (PublishDiagnosticsParams arg0 arg1 arg2) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,"version" Language.LSP.Protocol.Types.Common..=? arg1+ ,["diagnostics" Aeson..= arg2]]++instance Aeson.FromJSON PublishDiagnosticsParams where+ parseJSON = Aeson.withObject "PublishDiagnosticsParams" $ \arg -> PublishDiagnosticsParams <$> arg Aeson..: "uri" <*> arg Language.LSP.Protocol.Types.Common..:!? "version" <*> arg Aeson..: "diagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/Range.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Range where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Types.Common++{-|+A range in a text document expressed as (zero-based) start and end positions.++If you want to specify a range that contains a line including the line ending+character(s) then use an end position denoting the start of the next line.+For example:+```ts+{+ start: { line: 5, character: 23 }+ end : { line 6, character : 0 }+}+```+-}+data Range = Range + { {-|+ The range's start position.+ -}+ _start :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ The range's end position.+ -}+ _end :: Language.LSP.Protocol.Internal.Types.Position.Position+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Range)++instance Aeson.ToJSON Range where+ toJSON (Range arg0 arg1) = Aeson.object $ concat $ [["start" Aeson..= arg0]+ ,["end" Aeson..= arg1]]++instance Aeson.FromJSON Range where+ parseJSON = Aeson.withObject "Range" $ \arg -> Range <$> arg Aeson..: "start" <*> arg Aeson..: "end"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceClientCapabilities.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `ReferencesRequest`.+-}+data ReferenceClientCapabilities = ReferenceClientCapabilities + { {-|+ Whether references supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ReferenceClientCapabilities)++instance Aeson.ToJSON ReferenceClientCapabilities where+ toJSON (ReferenceClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ReferenceClientCapabilities where+ parseJSON = Aeson.withObject "ReferenceClientCapabilities" $ \arg -> ReferenceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceContext.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Value-object that contains additional information when+requesting references.+-}+data ReferenceContext = ReferenceContext + { {-|+ Include the declaration of the current symbol.+ -}+ _includeDeclaration :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ReferenceContext)++instance Aeson.ToJSON ReferenceContext where+ toJSON (ReferenceContext arg0) = Aeson.object $ concat $ [["includeDeclaration" Aeson..= arg0]]++instance Aeson.FromJSON ReferenceContext where+ parseJSON = Aeson.withObject "ReferenceContext" $ \arg -> ReferenceContext <$> arg Aeson..: "includeDeclaration"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Reference options.+-}+data ReferenceOptions = ReferenceOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ReferenceOptions)++instance Aeson.ToJSON ReferenceOptions where+ toJSON (ReferenceOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ReferenceOptions where+ parseJSON = Aeson.withObject "ReferenceOptions" $ \arg -> ReferenceOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceParams.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.ReferenceContext+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `ReferencesRequest`.+-}+data ReferenceParams = ReferenceParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|++ -}+ _context :: Language.LSP.Protocol.Internal.Types.ReferenceContext.ReferenceContext+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ReferenceParams)++instance Aeson.ToJSON ReferenceParams where+ toJSON (ReferenceParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3+ ,["context" Aeson..= arg4]]++instance Aeson.FromJSON ReferenceParams where+ parseJSON = Aeson.withObject "ReferenceParams" $ \arg -> ReferenceParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `ReferencesRequest`.+-}+data ReferenceRegistrationOptions = ReferenceRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ReferenceRegistrationOptions)++instance Aeson.ToJSON ReferenceRegistrationOptions where+ toJSON (ReferenceRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ReferenceRegistrationOptions where+ parseJSON = Aeson.withObject "ReferenceRegistrationOptions" $ \arg -> ReferenceRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/Registration.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Registration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+General parameters to register for a notification or to register a provider.+-}+data Registration = Registration + { {-|+ The id used to register the request. The id can be used to deregister+ the request again.+ -}+ _id :: Data.Text.Text+ , {-|+ The method / capability to register for.+ -}+ _method :: Data.Text.Text+ , {-|+ Options necessary for the registration.+ -}+ _registerOptions :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Registration)++instance Aeson.ToJSON Registration where+ toJSON (Registration arg0 arg1 arg2) = Aeson.object $ concat $ [["id" Aeson..= arg0]+ ,["method" Aeson..= arg1]+ ,"registerOptions" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON Registration where+ parseJSON = Aeson.withObject "Registration" $ \arg -> Registration <$> arg Aeson..: "id" <*> arg Aeson..: "method" <*> arg Language.LSP.Protocol.Types.Common..:!? "registerOptions"
+ generated/Language/LSP/Protocol/Internal/Types/RegistrationParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RegistrationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Registration+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data RegistrationParams = RegistrationParams + { {-|++ -}+ _registrations :: [Language.LSP.Protocol.Internal.Types.Registration.Registration]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RegistrationParams)++instance Aeson.ToJSON RegistrationParams where+ toJSON (RegistrationParams arg0) = Aeson.object $ concat $ [["registrations" Aeson..= arg0]]++instance Aeson.FromJSON RegistrationParams where+ parseJSON = Aeson.withObject "RegistrationParams" $ \arg -> RegistrationParams <$> arg Aeson..: "registrations"
+ generated/Language/LSP/Protocol/Internal/Types/RegularExpressionEngineKind.hs view
@@ -0,0 +1,30 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text++{-|++-}+newtype RegularExpressionEngineKind = RegularExpressionEngineKind Data.Text.Text+ deriving newtype ( Aeson.ToJSON+ , Aeson.FromJSON+ , Aeson.ToJSONKey+ , Aeson.FromJSONKey )+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RegularExpressionEngineKind)
+ generated/Language/LSP/Protocol/Internal/Types/RegularExpressionsClientCapabilities.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to regular expressions.++@since 3.16.0+-}+data RegularExpressionsClientCapabilities = RegularExpressionsClientCapabilities + { {-|+ The engine's name.+ -}+ _engine :: Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind.RegularExpressionEngineKind+ , {-|+ The engine's version.+ -}+ _version :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RegularExpressionsClientCapabilities)++instance Aeson.ToJSON RegularExpressionsClientCapabilities where+ toJSON (RegularExpressionsClientCapabilities arg0 arg1) = Aeson.object $ concat $ [["engine" Aeson..= arg0]+ ,"version" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RegularExpressionsClientCapabilities where+ parseJSON = Aeson.withObject "RegularExpressionsClientCapabilities" $ \arg -> RegularExpressionsClientCapabilities <$> arg Aeson..: "engine" <*> arg Language.LSP.Protocol.Types.Common..:!? "version"
+ generated/Language/LSP/Protocol/Internal/Types/RelatedFullDocumentDiagnosticReport.hs view
@@ -0,0 +1,69 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+A full diagnostic report with a set of related documents.++@since 3.17.0+-}+data RelatedFullDocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport + { {-|+ A full document diagnostic report.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+ , {-|+ An optional result id. If provided it will+ be sent on the next diagnostic request for the+ same document.+ -}+ _resultId :: (Maybe Data.Text.Text)+ , {-|+ The actual items.+ -}+ _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+ , {-|+ Diagnostics of related documents. This information is useful+ in programming languages where code in a file A can generate+ diagnostics in a file B which A depends on. An example of+ such a language is C/C++ where marco definitions in a file+ a.cpp and result in errors in a header file b.hpp.++ @since 3.17.0+ -}+ _relatedDocuments :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport)))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RelatedFullDocumentDiagnosticReport)++instance Aeson.ToJSON RelatedFullDocumentDiagnosticReport where+ toJSON (RelatedFullDocumentDiagnosticReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+ ,["items" Aeson..= arg2]+ ,"relatedDocuments" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON RelatedFullDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "RelatedFullDocumentDiagnosticReport" $ \arg -> RelatedFullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "resultId" <*> arg Aeson..: "items" <*> arg Language.LSP.Protocol.Types.Common..:!? "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/RelatedUnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+An unchanged diagnostic report with a set of related documents.++@since 3.17.0+-}+data RelatedUnchangedDocumentDiagnosticReport = RelatedUnchangedDocumentDiagnosticReport + { {-|+ A document diagnostic report indicating+ no changes to the last result. A server can+ only return `unchanged` if result ids are+ provided.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+ , {-|+ A result id which will be sent on the next+ diagnostic request for the same document.+ -}+ _resultId :: Data.Text.Text+ , {-|+ Diagnostics of related documents. This information is useful+ in programming languages where code in a file A can generate+ diagnostics in a file B which A depends on. An example of+ such a language is C/C++ where marco definitions in a file+ a.cpp and result in errors in a header file b.hpp.++ @since 3.17.0+ -}+ _relatedDocuments :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport)))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RelatedUnchangedDocumentDiagnosticReport)++instance Aeson.ToJSON RelatedUnchangedDocumentDiagnosticReport where+ toJSON (RelatedUnchangedDocumentDiagnosticReport arg0 arg1 arg2) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["resultId" Aeson..= arg1]+ ,"relatedDocuments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON RelatedUnchangedDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "RelatedUnchangedDocumentDiagnosticReport" $ \arg -> RelatedUnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId" <*> arg Language.LSP.Protocol.Types.Common..:!? "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/RelativePattern.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelativePattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Pattern+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A relative pattern is a helper to construct glob patterns that are matched+relatively to a base URI. The common value for a `baseUri` is a workspace+folder root, but it can be another absolute URI as well.++@since 3.17.0+-}+data RelativePattern = RelativePattern + { {-|+ A workspace folder or a base URI to which this pattern will be matched+ against relatively.+ -}+ _baseUri :: (Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Uri.Uri)+ , {-|+ The actual glob pattern;+ -}+ _pattern :: Language.LSP.Protocol.Internal.Types.Pattern.Pattern+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RelativePattern)++instance Aeson.ToJSON RelativePattern where+ toJSON (RelativePattern arg0 arg1) = Aeson.object $ concat $ [["baseUri" Aeson..= arg0]+ ,["pattern" Aeson..= arg1]]++instance Aeson.FromJSON RelativePattern where+ parseJSON = Aeson.withObject "RelativePattern" $ \arg -> RelativePattern <$> arg Aeson..: "baseUri" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/RenameClientCapabilities.hs view
@@ -0,0 +1,67 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data RenameClientCapabilities = RenameClientCapabilities + { {-|+ Whether rename supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Client supports testing for validity of rename operations+ before execution.++ @since 3.12.0+ -}+ _prepareSupport :: (Maybe Bool)+ , {-|+ Client supports the default behavior result.++ The value indicates the default behavior used by the+ client.++ @since 3.16.0+ -}+ _prepareSupportDefaultBehavior :: (Maybe Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior.PrepareSupportDefaultBehavior)+ , {-|+ Whether the client honors the change annotations in+ text edits and resource operations returned via the+ rename request's workspace edit by for example presenting+ the workspace edit in the user interface and asking+ for confirmation.++ @since 3.16.0+ -}+ _honorsChangeAnnotations :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameClientCapabilities)++instance Aeson.ToJSON RenameClientCapabilities where+ toJSON (RenameClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"prepareSupport" Language.LSP.Protocol.Types.Common..=? arg1+ ,"prepareSupportDefaultBehavior" Language.LSP.Protocol.Types.Common..=? arg2+ ,"honorsChangeAnnotations" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON RenameClientCapabilities where+ parseJSON = Aeson.withObject "RenameClientCapabilities" $ \arg -> RenameClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "prepareSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "prepareSupportDefaultBehavior" <*> arg Language.LSP.Protocol.Types.Common..:!? "honorsChangeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFile.hs view
@@ -0,0 +1,63 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.RenameFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Rename file operation+-}+data RenameFile = RenameFile + { {-|+ An optional annotation identifier describing the operation.++ @since 3.16.0+ -}+ _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+ , {-|+ A rename+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "rename")+ , {-|+ The old (existing) location.+ -}+ _oldUri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The new location.+ -}+ _newUri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Rename options.+ -}+ _options :: (Maybe Language.LSP.Protocol.Internal.Types.RenameFileOptions.RenameFileOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameFile)++instance Aeson.ToJSON RenameFile where+ toJSON (RenameFile arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+ ,["kind" Aeson..= arg1]+ ,["oldUri" Aeson..= arg2]+ ,["newUri" Aeson..= arg3]+ ,"options" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON RenameFile where+ parseJSON = Aeson.withObject "RenameFile" $ \arg -> RenameFile <$> arg Language.LSP.Protocol.Types.Common..:!? "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "oldUri" <*> arg Aeson..: "newUri" <*> arg Language.LSP.Protocol.Types.Common..:!? "options"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFileOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Rename file options+-}+data RenameFileOptions = RenameFileOptions + { {-|+ Overwrite target if existing. Overwrite wins over `ignoreIfExists`+ -}+ _overwrite :: (Maybe Bool)+ , {-|+ Ignores if target exists.+ -}+ _ignoreIfExists :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameFileOptions)++instance Aeson.ToJSON RenameFileOptions where+ toJSON (RenameFileOptions arg0 arg1) = Aeson.object $ concat $ ["overwrite" Language.LSP.Protocol.Types.Common..=? arg0+ ,"ignoreIfExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RenameFileOptions where+ parseJSON = Aeson.withObject "RenameFileOptions" $ \arg -> RenameFileOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "overwrite" <*> arg Language.LSP.Protocol.Types.Common..:!? "ignoreIfExists"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFilesParams.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileRename+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated renames of+files.++@since 3.16.0+-}+data RenameFilesParams = RenameFilesParams + { {-|+ An array of all files/folders renamed in this operation. When a folder is renamed, only+ the folder will be included, and not its children.+ -}+ _files :: [Language.LSP.Protocol.Internal.Types.FileRename.FileRename]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameFilesParams)++instance Aeson.ToJSON RenameFilesParams where+ toJSON (RenameFilesParams arg0) = Aeson.object $ concat $ [["files" Aeson..= arg0]]++instance Aeson.FromJSON RenameFilesParams where+ parseJSON = Aeson.withObject "RenameFilesParams" $ \arg -> RenameFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/RenameOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `RenameRequest`.+-}+data RenameOptions = RenameOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Renames should be checked and tested before being executed.++ @since version 3.12.0+ -}+ _prepareProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameOptions)++instance Aeson.ToJSON RenameOptions where+ toJSON (RenameOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"prepareProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RenameOptions where+ parseJSON = Aeson.withObject "RenameOptions" $ \arg -> RenameOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "prepareProvider"
+ generated/Language/LSP/Protocol/Internal/Types/RenameParams.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `RenameRequest`.+-}+data RenameParams = RenameParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The document to rename.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position at which this request was sent.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ The new name of the symbol. If the given name is not valid the+ request must return a `ResponseError` with an+ appropriate message set.+ -}+ _newName :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameParams)++instance Aeson.ToJSON RenameParams where+ toJSON (RenameParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["textDocument" Aeson..= arg1]+ ,["position" Aeson..= arg2]+ ,["newName" Aeson..= arg3]]++instance Aeson.FromJSON RenameParams where+ parseJSON = Aeson.withObject "RenameParams" $ \arg -> RenameParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..: "newName"
+ generated/Language/LSP/Protocol/Internal/Types/RenameRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `RenameRequest`.+-}+data RenameRegistrationOptions = RenameRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Renames should be checked and tested before being executed.++ @since version 3.12.0+ -}+ _prepareProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON RenameRegistrationOptions)++instance Aeson.ToJSON RenameRegistrationOptions where+ toJSON (RenameRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"prepareProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON RenameRegistrationOptions where+ parseJSON = Aeson.withObject "RenameRegistrationOptions" $ \arg -> RenameRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "prepareProvider"
+ generated/Language/LSP/Protocol/Internal/Types/ResourceOperation.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ResourceOperation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A generic resource operation.+-}+data ResourceOperation = ResourceOperation + { {-|+ The resource operation kind.+ -}+ _kind :: Data.Text.Text+ , {-|+ An optional annotation identifier describing the operation.++ @since 3.16.0+ -}+ _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ResourceOperation)++instance Aeson.ToJSON ResourceOperation where+ toJSON (ResourceOperation arg0 arg1) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"annotationId" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ResourceOperation where+ parseJSON = Aeson.withObject "ResourceOperation" $ \arg -> ResourceOperation <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "annotationId"
+ generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ResourceOperationKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data ResourceOperationKind = + {-|+ Supports creating new files and folders.+ -}+ ResourceOperationKind_Create+ | {-|+ Supports renaming existing files and folders.+ -}+ ResourceOperationKind_Rename+ | {-|+ Supports deleting existing files and folders.+ -}+ ResourceOperationKind_Delete+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ResourceOperationKind)+ deriving Pretty via (ViaJSON ResourceOperationKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum ResourceOperationKind where+ knownValues = Data.Set.fromList [ResourceOperationKind_Create+ ,ResourceOperationKind_Rename+ ,ResourceOperationKind_Delete]+ type EnumBaseType ResourceOperationKind = Data.Text.Text+ toEnumBaseType ResourceOperationKind_Create = "create"+ toEnumBaseType ResourceOperationKind_Rename = "rename"+ toEnumBaseType ResourceOperationKind_Delete = "delete"+ fromEnumBaseType "create" = pure ResourceOperationKind_Create+ fromEnumBaseType "rename" = pure ResourceOperationKind_Rename+ fromEnumBaseType "delete" = pure ResourceOperationKind_Delete+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SaveOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SaveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Save options.+-}+data SaveOptions = SaveOptions + { {-|+ The client is supposed to include the content on save.+ -}+ _includeText :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SaveOptions)++instance Aeson.ToJSON SaveOptions where+ toJSON (SaveOptions arg0) = Aeson.object $ concat $ ["includeText" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SaveOptions where+ parseJSON = Aeson.withObject "SaveOptions" $ \arg -> SaveOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "includeText"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRange.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A selection range represents a part of a selection hierarchy. A selection range+may have a parent selection range that contains it.+-}+data SelectionRange = SelectionRange + { {-|+ The `Range` of this selection range.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.+ -}+ _parent :: (Maybe Language.LSP.Protocol.Internal.Types.SelectionRange.SelectionRange)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SelectionRange)++instance Aeson.ToJSON SelectionRange where+ toJSON (SelectionRange arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"parent" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON SelectionRange where+ parseJSON = Aeson.withObject "SelectionRange" $ \arg -> SelectionRange <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "parent"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeClientCapabilities.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeClientCapabilities = SelectionRangeClientCapabilities + { {-|+ Whether implementation supports dynamic registration for selection range providers. If this is set to `true`+ the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server+ capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SelectionRangeClientCapabilities)++instance Aeson.ToJSON SelectionRangeClientCapabilities where+ toJSON (SelectionRangeClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SelectionRangeClientCapabilities where+ parseJSON = Aeson.withObject "SelectionRangeClientCapabilities" $ \arg -> SelectionRangeClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeOptions = SelectionRangeOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SelectionRangeOptions)++instance Aeson.ToJSON SelectionRangeOptions where+ toJSON (SelectionRangeOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SelectionRangeOptions where+ parseJSON = Aeson.withObject "SelectionRangeOptions" $ \arg -> SelectionRangeOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in selection range requests.+-}+data SelectionRangeParams = SelectionRangeParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The positions inside the text document.+ -}+ _positions :: [Language.LSP.Protocol.Internal.Types.Position.Position]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SelectionRangeParams)++instance Aeson.ToJSON SelectionRangeParams where+ toJSON (SelectionRangeParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,["positions" Aeson..= arg3]]++instance Aeson.FromJSON SelectionRangeParams where+ parseJSON = Aeson.withObject "SelectionRangeParams" $ \arg -> SelectionRangeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "positions"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeRegistrationOptions = SelectionRangeRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SelectionRangeRegistrationOptions)++instance Aeson.ToJSON SelectionRangeRegistrationOptions where+ toJSON (SelectionRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["documentSelector" Aeson..= arg1]+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SelectionRangeRegistrationOptions where+ parseJSON = Aeson.withObject "SelectionRangeRegistrationOptions" $ \arg -> SelectionRangeRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs view
@@ -0,0 +1,116 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined token modifiers. This set is not fixed+an clients can specify additional token types via the+corresponding client capabilities.++@since 3.16.0+-}+data SemanticTokenModifiers = + {-|++ -}+ SemanticTokenModifiers_Declaration+ | {-|++ -}+ SemanticTokenModifiers_Definition+ | {-|++ -}+ SemanticTokenModifiers_Readonly+ | {-|++ -}+ SemanticTokenModifiers_Static+ | {-|++ -}+ SemanticTokenModifiers_Deprecated+ | {-|++ -}+ SemanticTokenModifiers_Abstract+ | {-|++ -}+ SemanticTokenModifiers_Async+ | {-|++ -}+ SemanticTokenModifiers_Modification+ | {-|++ -}+ SemanticTokenModifiers_Documentation+ | {-|++ -}+ SemanticTokenModifiers_DefaultLibrary+ | SemanticTokenModifiers_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenModifiers)+ deriving Pretty via (ViaJSON SemanticTokenModifiers)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenModifiers where+ knownValues = Data.Set.fromList [SemanticTokenModifiers_Declaration+ ,SemanticTokenModifiers_Definition+ ,SemanticTokenModifiers_Readonly+ ,SemanticTokenModifiers_Static+ ,SemanticTokenModifiers_Deprecated+ ,SemanticTokenModifiers_Abstract+ ,SemanticTokenModifiers_Async+ ,SemanticTokenModifiers_Modification+ ,SemanticTokenModifiers_Documentation+ ,SemanticTokenModifiers_DefaultLibrary]+ type EnumBaseType SemanticTokenModifiers = Data.Text.Text+ toEnumBaseType SemanticTokenModifiers_Declaration = "declaration"+ toEnumBaseType SemanticTokenModifiers_Definition = "definition"+ toEnumBaseType SemanticTokenModifiers_Readonly = "readonly"+ toEnumBaseType SemanticTokenModifiers_Static = "static"+ toEnumBaseType SemanticTokenModifiers_Deprecated = "deprecated"+ toEnumBaseType SemanticTokenModifiers_Abstract = "abstract"+ toEnumBaseType SemanticTokenModifiers_Async = "async"+ toEnumBaseType SemanticTokenModifiers_Modification = "modification"+ toEnumBaseType SemanticTokenModifiers_Documentation = "documentation"+ toEnumBaseType SemanticTokenModifiers_DefaultLibrary = "defaultLibrary"+ toEnumBaseType (SemanticTokenModifiers_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum SemanticTokenModifiers where+ fromOpenEnumBaseType "declaration" = SemanticTokenModifiers_Declaration+ fromOpenEnumBaseType "definition" = SemanticTokenModifiers_Definition+ fromOpenEnumBaseType "readonly" = SemanticTokenModifiers_Readonly+ fromOpenEnumBaseType "static" = SemanticTokenModifiers_Static+ fromOpenEnumBaseType "deprecated" = SemanticTokenModifiers_Deprecated+ fromOpenEnumBaseType "abstract" = SemanticTokenModifiers_Abstract+ fromOpenEnumBaseType "async" = SemanticTokenModifiers_Async+ fromOpenEnumBaseType "modification" = SemanticTokenModifiers_Modification+ fromOpenEnumBaseType "documentation" = SemanticTokenModifiers_Documentation+ fromOpenEnumBaseType "defaultLibrary" = SemanticTokenModifiers_DefaultLibrary+ fromOpenEnumBaseType arg = SemanticTokenModifiers_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs view
@@ -0,0 +1,208 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokenTypes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined token types. This set is not fixed+an clients can specify additional token types via the+corresponding client capabilities.++@since 3.16.0+-}+data SemanticTokenTypes = + {-|++ -}+ SemanticTokenTypes_Namespace+ | {-|+ Represents a generic type. Acts as a fallback for types which can't be mapped to+ a specific type like class or enum.+ -}+ SemanticTokenTypes_Type+ | {-|++ -}+ SemanticTokenTypes_Class+ | {-|++ -}+ SemanticTokenTypes_Enum+ | {-|++ -}+ SemanticTokenTypes_Interface+ | {-|++ -}+ SemanticTokenTypes_Struct+ | {-|++ -}+ SemanticTokenTypes_TypeParameter+ | {-|++ -}+ SemanticTokenTypes_Parameter+ | {-|++ -}+ SemanticTokenTypes_Variable+ | {-|++ -}+ SemanticTokenTypes_Property+ | {-|++ -}+ SemanticTokenTypes_EnumMember+ | {-|++ -}+ SemanticTokenTypes_Event+ | {-|++ -}+ SemanticTokenTypes_Function+ | {-|++ -}+ SemanticTokenTypes_Method+ | {-|++ -}+ SemanticTokenTypes_Macro+ | {-|++ -}+ SemanticTokenTypes_Keyword+ | {-|++ -}+ SemanticTokenTypes_Modifier+ | {-|++ -}+ SemanticTokenTypes_Comment+ | {-|++ -}+ SemanticTokenTypes_String+ | {-|++ -}+ SemanticTokenTypes_Number+ | {-|++ -}+ SemanticTokenTypes_Regexp+ | {-|++ -}+ SemanticTokenTypes_Operator+ | {-|+ @since 3.17.0+ -}+ SemanticTokenTypes_Decorator+ | SemanticTokenTypes_Custom Data.Text.Text+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON+ , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenTypes)+ deriving Pretty via (ViaJSON SemanticTokenTypes)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenTypes where+ knownValues = Data.Set.fromList [SemanticTokenTypes_Namespace+ ,SemanticTokenTypes_Type+ ,SemanticTokenTypes_Class+ ,SemanticTokenTypes_Enum+ ,SemanticTokenTypes_Interface+ ,SemanticTokenTypes_Struct+ ,SemanticTokenTypes_TypeParameter+ ,SemanticTokenTypes_Parameter+ ,SemanticTokenTypes_Variable+ ,SemanticTokenTypes_Property+ ,SemanticTokenTypes_EnumMember+ ,SemanticTokenTypes_Event+ ,SemanticTokenTypes_Function+ ,SemanticTokenTypes_Method+ ,SemanticTokenTypes_Macro+ ,SemanticTokenTypes_Keyword+ ,SemanticTokenTypes_Modifier+ ,SemanticTokenTypes_Comment+ ,SemanticTokenTypes_String+ ,SemanticTokenTypes_Number+ ,SemanticTokenTypes_Regexp+ ,SemanticTokenTypes_Operator+ ,SemanticTokenTypes_Decorator]+ type EnumBaseType SemanticTokenTypes = Data.Text.Text+ toEnumBaseType SemanticTokenTypes_Namespace = "namespace"+ toEnumBaseType SemanticTokenTypes_Type = "type"+ toEnumBaseType SemanticTokenTypes_Class = "class"+ toEnumBaseType SemanticTokenTypes_Enum = "enum"+ toEnumBaseType SemanticTokenTypes_Interface = "interface"+ toEnumBaseType SemanticTokenTypes_Struct = "struct"+ toEnumBaseType SemanticTokenTypes_TypeParameter = "typeParameter"+ toEnumBaseType SemanticTokenTypes_Parameter = "parameter"+ toEnumBaseType SemanticTokenTypes_Variable = "variable"+ toEnumBaseType SemanticTokenTypes_Property = "property"+ toEnumBaseType SemanticTokenTypes_EnumMember = "enumMember"+ toEnumBaseType SemanticTokenTypes_Event = "event"+ toEnumBaseType SemanticTokenTypes_Function = "function"+ toEnumBaseType SemanticTokenTypes_Method = "method"+ toEnumBaseType SemanticTokenTypes_Macro = "macro"+ toEnumBaseType SemanticTokenTypes_Keyword = "keyword"+ toEnumBaseType SemanticTokenTypes_Modifier = "modifier"+ toEnumBaseType SemanticTokenTypes_Comment = "comment"+ toEnumBaseType SemanticTokenTypes_String = "string"+ toEnumBaseType SemanticTokenTypes_Number = "number"+ toEnumBaseType SemanticTokenTypes_Regexp = "regexp"+ toEnumBaseType SemanticTokenTypes_Operator = "operator"+ toEnumBaseType SemanticTokenTypes_Decorator = "decorator"+ toEnumBaseType (SemanticTokenTypes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum SemanticTokenTypes where+ fromOpenEnumBaseType "namespace" = SemanticTokenTypes_Namespace+ fromOpenEnumBaseType "type" = SemanticTokenTypes_Type+ fromOpenEnumBaseType "class" = SemanticTokenTypes_Class+ fromOpenEnumBaseType "enum" = SemanticTokenTypes_Enum+ fromOpenEnumBaseType "interface" = SemanticTokenTypes_Interface+ fromOpenEnumBaseType "struct" = SemanticTokenTypes_Struct+ fromOpenEnumBaseType "typeParameter" = SemanticTokenTypes_TypeParameter+ fromOpenEnumBaseType "parameter" = SemanticTokenTypes_Parameter+ fromOpenEnumBaseType "variable" = SemanticTokenTypes_Variable+ fromOpenEnumBaseType "property" = SemanticTokenTypes_Property+ fromOpenEnumBaseType "enumMember" = SemanticTokenTypes_EnumMember+ fromOpenEnumBaseType "event" = SemanticTokenTypes_Event+ fromOpenEnumBaseType "function" = SemanticTokenTypes_Function+ fromOpenEnumBaseType "method" = SemanticTokenTypes_Method+ fromOpenEnumBaseType "macro" = SemanticTokenTypes_Macro+ fromOpenEnumBaseType "keyword" = SemanticTokenTypes_Keyword+ fromOpenEnumBaseType "modifier" = SemanticTokenTypes_Modifier+ fromOpenEnumBaseType "comment" = SemanticTokenTypes_Comment+ fromOpenEnumBaseType "string" = SemanticTokenTypes_String+ fromOpenEnumBaseType "number" = SemanticTokenTypes_Number+ fromOpenEnumBaseType "regexp" = SemanticTokenTypes_Regexp+ fromOpenEnumBaseType "operator" = SemanticTokenTypes_Operator+ fromOpenEnumBaseType "decorator" = SemanticTokenTypes_Decorator+ fromOpenEnumBaseType arg = SemanticTokenTypes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokens.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokens where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokens = SemanticTokens + { {-|+ An optional result id. If provided and clients support delta updating+ the client will include the result id in the next semantic token request.+ A server can then instead of computing all semantic tokens again simply+ send a delta.+ -}+ _resultId :: (Maybe Data.Text.Text)+ , {-|+ The actual tokens.+ -}+ _data_ :: [Language.LSP.Protocol.Types.Common.UInt]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokens)++instance Aeson.ToJSON SemanticTokens where+ toJSON (SemanticTokens arg0 arg1) = Aeson.object $ concat $ ["resultId" Language.LSP.Protocol.Types.Common..=? arg0+ ,["data" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokens where+ parseJSON = Aeson.withObject "SemanticTokens" $ \arg -> SemanticTokens <$> arg Language.LSP.Protocol.Types.Common..:!? "resultId" <*> arg Aeson..: "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensClientCapabilities.hs view
@@ -0,0 +1,103 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions+import qualified Language.LSP.Protocol.Internal.Types.TokenFormat+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensClientCapabilities = SemanticTokensClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Which requests the client supports and might send to the server+ depending on the server's capability. Please note that clients might not+ show semantic tokens or degrade some of the user experience if a range+ or full request is advertised by the client but not provided by the+ server. If for example the client capability `requests.full` and+ `request.range` are both set to true but the server only provides a+ range provider the client might not render a minimap correctly or might+ even decide to not show any semantic tokens at all.+ -}+ _requests :: Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions.ClientSemanticTokensRequestOptions+ , {-|+ The token types that the client supports.+ -}+ _tokenTypes :: [Data.Text.Text]+ , {-|+ The token modifiers that the client supports.+ -}+ _tokenModifiers :: [Data.Text.Text]+ , {-|+ The token formats the clients supports.+ -}+ _formats :: [Language.LSP.Protocol.Internal.Types.TokenFormat.TokenFormat]+ , {-|+ Whether the client supports tokens that can overlap each other.+ -}+ _overlappingTokenSupport :: (Maybe Bool)+ , {-|+ Whether the client supports tokens that can span multiple lines.+ -}+ _multilineTokenSupport :: (Maybe Bool)+ , {-|+ Whether the client allows the server to actively cancel a+ semantic token request, e.g. supports returning+ LSPErrorCodes.ServerCancelled. If a server does the client+ needs to retrigger the request.++ @since 3.17.0+ -}+ _serverCancelSupport :: (Maybe Bool)+ , {-|+ Whether the client uses semantic tokens to augment existing+ syntax tokens. If set to `true` client side created syntax+ tokens and semantic tokens are both used for colorization. If+ set to `false` the client only uses the returned semantic tokens+ for colorization.++ If the value is `undefined` then the client behavior is not+ specified.++ @since 3.17.0+ -}+ _augmentsSyntaxTokens :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensClientCapabilities)++instance Aeson.ToJSON SemanticTokensClientCapabilities where+ toJSON (SemanticTokensClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,["requests" Aeson..= arg1]+ ,["tokenTypes" Aeson..= arg2]+ ,["tokenModifiers" Aeson..= arg3]+ ,["formats" Aeson..= arg4]+ ,"overlappingTokenSupport" Language.LSP.Protocol.Types.Common..=? arg5+ ,"multilineTokenSupport" Language.LSP.Protocol.Types.Common..=? arg6+ ,"serverCancelSupport" Language.LSP.Protocol.Types.Common..=? arg7+ ,"augmentsSyntaxTokens" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON SemanticTokensClientCapabilities where+ parseJSON = Aeson.withObject "SemanticTokensClientCapabilities" $ \arg -> SemanticTokensClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Aeson..: "requests" <*> arg Aeson..: "tokenTypes" <*> arg Aeson..: "tokenModifiers" <*> arg Aeson..: "formats" <*> arg Language.LSP.Protocol.Types.Common..:!? "overlappingTokenSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "multilineTokenSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "serverCancelSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "augmentsSyntaxTokens"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDelta.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDelta where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDelta = SemanticTokensDelta + { {-|++ -}+ _resultId :: (Maybe Data.Text.Text)+ , {-|+ The semantic token edits to transform a previous result into a new result.+ -}+ _edits :: [Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensDelta)++instance Aeson.ToJSON SemanticTokensDelta where+ toJSON (SemanticTokensDelta arg0 arg1) = Aeson.object $ concat $ ["resultId" Language.LSP.Protocol.Types.Common..=? arg0+ ,["edits" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokensDelta where+ parseJSON = Aeson.withObject "SemanticTokensDelta" $ \arg -> SemanticTokensDelta <$> arg Language.LSP.Protocol.Types.Common..:!? "resultId" <*> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaParams.hs view
@@ -0,0 +1,57 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDeltaParams = SemanticTokensDeltaParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The result id of a previous response. The result Id can either point to a full response+ or a delta response depending on what was received last.+ -}+ _previousResultId :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensDeltaParams)++instance Aeson.ToJSON SemanticTokensDeltaParams where+ toJSON (SemanticTokensDeltaParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,["previousResultId" Aeson..= arg3]]++instance Aeson.FromJSON SemanticTokensDeltaParams where+ parseJSON = Aeson.withObject "SemanticTokensDeltaParams" $ \arg -> SemanticTokensDeltaParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "previousResultId"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaPartialResult.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDeltaPartialResult = SemanticTokensDeltaPartialResult + { {-|++ -}+ _edits :: [Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensDeltaPartialResult)++instance Aeson.ToJSON SemanticTokensDeltaPartialResult where+ toJSON (SemanticTokensDeltaPartialResult arg0) = Aeson.object $ concat $ [["edits" Aeson..= arg0]]++instance Aeson.FromJSON SemanticTokensDeltaPartialResult where+ parseJSON = Aeson.withObject "SemanticTokensDeltaPartialResult" $ \arg -> SemanticTokensDeltaPartialResult <$> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensEdit.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensEdit = SemanticTokensEdit + { {-|+ The start offset of the edit.+ -}+ _start :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The count of elements to remove.+ -}+ _deleteCount :: Language.LSP.Protocol.Types.Common.UInt+ , {-|+ The elements to insert.+ -}+ _data_ :: (Maybe [Language.LSP.Protocol.Types.Common.UInt])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensEdit)++instance Aeson.ToJSON SemanticTokensEdit where+ toJSON (SemanticTokensEdit arg0 arg1 arg2) = Aeson.object $ concat $ [["start" Aeson..= arg0]+ ,["deleteCount" Aeson..= arg1]+ ,"data" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SemanticTokensEdit where+ parseJSON = Aeson.withObject "SemanticTokensEdit" $ \arg -> SemanticTokensEdit <$> arg Aeson..: "start" <*> arg Aeson..: "deleteCount" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensFullDelta.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Semantic tokens options to support deltas for full documents++@since 3.18.0+@proposed+-}+data SemanticTokensFullDelta = SemanticTokensFullDelta + { {-|+ The server supports deltas for full documents.+ -}+ _delta :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensFullDelta)++instance Aeson.ToJSON SemanticTokensFullDelta where+ toJSON (SemanticTokensFullDelta arg0) = Aeson.object $ concat $ ["delta" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SemanticTokensFullDelta where+ parseJSON = Aeson.withObject "SemanticTokensFullDelta" $ \arg -> SemanticTokensFullDelta <$> arg Language.LSP.Protocol.Types.Common..:!? "delta"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensLegend.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensLegend where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensLegend = SemanticTokensLegend + { {-|+ The token types a server uses.+ -}+ _tokenTypes :: [Data.Text.Text]+ , {-|+ The token modifiers a server uses.+ -}+ _tokenModifiers :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensLegend)++instance Aeson.ToJSON SemanticTokensLegend where+ toJSON (SemanticTokensLegend arg0 arg1) = Aeson.object $ concat $ [["tokenTypes" Aeson..= arg0]+ ,["tokenModifiers" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokensLegend where+ parseJSON = Aeson.withObject "SemanticTokensLegend" $ \arg -> SemanticTokensLegend <$> arg Aeson..: "tokenTypes" <*> arg Aeson..: "tokenModifiers"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensOptions.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensOptions = SemanticTokensOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The legend used by the server+ -}+ _legend :: Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend+ , {-|+ Server supports providing semantic tokens for a specific range+ of a document.+ -}+ _range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))+ , {-|+ Server supports providing semantic tokens for a full document.+ -}+ _full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta.SemanticTokensFullDelta))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensOptions)++instance Aeson.ToJSON SemanticTokensOptions where+ toJSON (SemanticTokensOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,["legend" Aeson..= arg1]+ ,"range" Language.LSP.Protocol.Types.Common..=? arg2+ ,"full" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SemanticTokensOptions where+ parseJSON = Aeson.withObject "SemanticTokensOptions" $ \arg -> SemanticTokensOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "legend" <*> arg Language.LSP.Protocol.Types.Common..:!? "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "full"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensParams = SemanticTokensParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensParams)++instance Aeson.ToJSON SemanticTokensParams where+ toJSON (SemanticTokensParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON SemanticTokensParams where+ parseJSON = Aeson.withObject "SemanticTokensParams" $ \arg -> SemanticTokensParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensPartialResult.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensPartialResult = SemanticTokensPartialResult + { {-|++ -}+ _data_ :: [Language.LSP.Protocol.Types.Common.UInt]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensPartialResult)++instance Aeson.ToJSON SemanticTokensPartialResult where+ toJSON (SemanticTokensPartialResult arg0) = Aeson.object $ concat $ [["data" Aeson..= arg0]]++instance Aeson.FromJSON SemanticTokensPartialResult where+ parseJSON = Aeson.withObject "SemanticTokensPartialResult" $ \arg -> SemanticTokensPartialResult <$> arg Aeson..: "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRangeParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensRangeParams = SemanticTokensRangeParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The range the semantic tokens are requested for.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensRangeParams)++instance Aeson.ToJSON SemanticTokensRangeParams where+ toJSON (SemanticTokensRangeParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["textDocument" Aeson..= arg2]+ ,["range" Aeson..= arg3]]++instance Aeson.FromJSON SemanticTokensRangeParams where+ parseJSON = Aeson.withObject "SemanticTokensRangeParams" $ \arg -> SemanticTokensRangeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRegistrationOptions.hs view
@@ -0,0 +1,70 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensRegistrationOptions = SemanticTokensRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The legend used by the server+ -}+ _legend :: Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend+ , {-|+ Server supports providing semantic tokens for a specific range+ of a document.+ -}+ _range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))+ , {-|+ Server supports providing semantic tokens for a full document.+ -}+ _full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta.SemanticTokensFullDelta))+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensRegistrationOptions)++instance Aeson.ToJSON SemanticTokensRegistrationOptions where+ toJSON (SemanticTokensRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,["legend" Aeson..= arg2]+ ,"range" Language.LSP.Protocol.Types.Common..=? arg3+ ,"full" Language.LSP.Protocol.Types.Common..=? arg4+ ,"id" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON SemanticTokensRegistrationOptions where+ parseJSON = Aeson.withObject "SemanticTokensRegistrationOptions" $ \arg -> SemanticTokensRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Aeson..: "legend" <*> arg Language.LSP.Protocol.Types.Common..:!? "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "full" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensWorkspaceClientCapabilities.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensWorkspaceClientCapabilities = SemanticTokensWorkspaceClientCapabilities + { {-|+ Whether the client implementation supports a refresh request sent from+ the server to the client.++ Note that this event is global and will force the client to refresh all+ semantic tokens currently shown. It should be used with absolute care+ and is useful for situation where a server for example detects a project+ wide change that requires such a calculation.+ -}+ _refreshSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SemanticTokensWorkspaceClientCapabilities)++instance Aeson.ToJSON SemanticTokensWorkspaceClientCapabilities where+ toJSON (SemanticTokensWorkspaceClientCapabilities arg0) = Aeson.object $ concat $ ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SemanticTokensWorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "SemanticTokensWorkspaceClientCapabilities" $ \arg -> SemanticTokensWorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ServerCapabilities.hs view
@@ -0,0 +1,291 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ServerCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeActionOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLensOptions+import qualified Language.LSP.Protocol.Internal.Types.CompletionOptions+import qualified Language.LSP.Protocol.Internal.Types.DeclarationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.HoverOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.MonikerOptions+import qualified Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.PositionEncodingKind+import qualified Language.LSP.Protocol.Internal.Types.ReferenceOptions+import qualified Language.LSP.Protocol.Internal.Types.RenameOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Defines the capabilities provided by a language+server.+-}+data ServerCapabilities = ServerCapabilities + { {-|+ The position encoding the server picked from the encodings offered+ by the client via the client capability `general.positionEncodings`.++ If the client didn't provide any position encodings the only valid+ value that a server can return is 'utf-16'.++ If omitted it defaults to 'utf-16'.++ @since 3.17.0+ -}+ _positionEncoding :: (Maybe Language.LSP.Protocol.Internal.Types.PositionEncodingKind.PositionEncodingKind)+ , {-|+ Defines how text documents are synced. Is either a detailed structure+ defining each notification or for backwards compatibility the+ TextDocumentSyncKind number.+ -}+ _textDocumentSync :: (Maybe (Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions.TextDocumentSyncOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind))+ , {-|+ Defines how notebook documents are synced.++ @since 3.17.0+ -}+ _notebookDocumentSync :: (Maybe (Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions.NotebookDocumentSyncOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions))+ , {-|+ The server provides completion support.+ -}+ _completionProvider :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionOptions.CompletionOptions)+ , {-|+ The server provides hover support.+ -}+ _hoverProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.HoverOptions.HoverOptions))+ , {-|+ The server provides signature help support.+ -}+ _signatureHelpProvider :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpOptions.SignatureHelpOptions)+ , {-|+ The server provides Goto Declaration support.+ -}+ _declarationProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.DeclarationOptions.DeclarationOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions.DeclarationRegistrationOptions)))+ , {-|+ The server provides goto definition support.+ -}+ _definitionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DefinitionOptions.DefinitionOptions))+ , {-|+ The server provides Goto Type Definition support.+ -}+ _typeDefinitionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions.TypeDefinitionOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions.TypeDefinitionRegistrationOptions)))+ , {-|+ The server provides Goto Implementation support.+ -}+ _implementationProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.ImplementationOptions.ImplementationOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions.ImplementationRegistrationOptions)))+ , {-|+ The server provides find references support.+ -}+ _referencesProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ReferenceOptions.ReferenceOptions))+ , {-|+ The server provides document highlight support.+ -}+ _documentHighlightProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions.DocumentHighlightOptions))+ , {-|+ The server provides document symbol support.+ -}+ _documentSymbolProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions.DocumentSymbolOptions))+ , {-|+ The server provides code actions. CodeActionOptions may only be+ specified if the client states that it supports+ `codeActionLiteralSupport` in its initial `initialize` request.+ -}+ _codeActionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CodeActionOptions.CodeActionOptions))+ , {-|+ The server provides code lens.+ -}+ _codeLensProvider :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensOptions.CodeLensOptions)+ , {-|+ The server provides document link support.+ -}+ _documentLinkProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentLinkOptions.DocumentLinkOptions)+ , {-|+ The server provides color provider support.+ -}+ _colorProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.DocumentColorOptions.DocumentColorOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions.DocumentColorRegistrationOptions)))+ , {-|+ The server provides workspace symbol support.+ -}+ _workspaceSymbolProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions.WorkspaceSymbolOptions))+ , {-|+ The server provides document formatting.+ -}+ _documentFormattingProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions.DocumentFormattingOptions))+ , {-|+ The server provides document range formatting.+ -}+ _documentRangeFormattingProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions.DocumentRangeFormattingOptions))+ , {-|+ The server provides document formatting on typing.+ -}+ _documentOnTypeFormattingProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions.DocumentOnTypeFormattingOptions)+ , {-|+ The server provides rename support. RenameOptions may only be+ specified if the client states that it supports+ `prepareSupport` in its initial `initialize` request.+ -}+ _renameProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RenameOptions.RenameOptions))+ , {-|+ The server provides folding provider support.+ -}+ _foldingRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.FoldingRangeOptions.FoldingRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions.FoldingRangeRegistrationOptions)))+ , {-|+ The server provides selection range support.+ -}+ _selectionRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.SelectionRangeOptions.SelectionRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions.SelectionRangeRegistrationOptions)))+ , {-|+ The server provides execute command support.+ -}+ _executeCommandProvider :: (Maybe Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions.ExecuteCommandOptions)+ , {-|+ The server provides call hierarchy support.++ @since 3.16.0+ -}+ _callHierarchyProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CallHierarchyOptions.CallHierarchyOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions.CallHierarchyRegistrationOptions)))+ , {-|+ The server provides linked editing range support.++ @since 3.16.0+ -}+ _linkedEditingRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions.LinkedEditingRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions.LinkedEditingRangeRegistrationOptions)))+ , {-|+ The server provides semantic tokens support.++ @since 3.16.0+ -}+ _semanticTokensProvider :: (Maybe (Language.LSP.Protocol.Internal.Types.SemanticTokensOptions.SemanticTokensOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions))+ , {-|+ The server provides moniker support.++ @since 3.16.0+ -}+ _monikerProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.MonikerOptions.MonikerOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions.MonikerRegistrationOptions)))+ , {-|+ The server provides type hierarchy support.++ @since 3.17.0+ -}+ _typeHierarchyProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions.TypeHierarchyOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions.TypeHierarchyRegistrationOptions)))+ , {-|+ The server provides inline values.++ @since 3.17.0+ -}+ _inlineValueProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlineValueOptions.InlineValueOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions.InlineValueRegistrationOptions)))+ , {-|+ The server provides inlay hints.++ @since 3.17.0+ -}+ _inlayHintProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlayHintOptions.InlayHintOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions.InlayHintRegistrationOptions)))+ , {-|+ The server has support for pull model diagnostics.++ @since 3.17.0+ -}+ _diagnosticProvider :: (Maybe (Language.LSP.Protocol.Internal.Types.DiagnosticOptions.DiagnosticOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions.DiagnosticRegistrationOptions))+ , {-|+ Workspace specific server capabilities.+ -}+ _workspace :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceOptions.WorkspaceOptions)+ , {-|+ Experimental server capabilities.+ -}+ _experimental :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ServerCapabilities)++instance Aeson.ToJSON ServerCapabilities where+ toJSON (ServerCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 arg20 arg21 arg22 arg23 arg24 arg25 arg26 arg27 arg28 arg29 arg30 arg31 arg32 arg33 arg34) = Aeson.object $ concat $ ["positionEncoding" Language.LSP.Protocol.Types.Common..=? arg0+ ,"textDocumentSync" Language.LSP.Protocol.Types.Common..=? arg1+ ,"notebookDocumentSync" Language.LSP.Protocol.Types.Common..=? arg2+ ,"completionProvider" Language.LSP.Protocol.Types.Common..=? arg3+ ,"hoverProvider" Language.LSP.Protocol.Types.Common..=? arg4+ ,"signatureHelpProvider" Language.LSP.Protocol.Types.Common..=? arg5+ ,"declarationProvider" Language.LSP.Protocol.Types.Common..=? arg6+ ,"definitionProvider" Language.LSP.Protocol.Types.Common..=? arg7+ ,"typeDefinitionProvider" Language.LSP.Protocol.Types.Common..=? arg8+ ,"implementationProvider" Language.LSP.Protocol.Types.Common..=? arg9+ ,"referencesProvider" Language.LSP.Protocol.Types.Common..=? arg10+ ,"documentHighlightProvider" Language.LSP.Protocol.Types.Common..=? arg11+ ,"documentSymbolProvider" Language.LSP.Protocol.Types.Common..=? arg12+ ,"codeActionProvider" Language.LSP.Protocol.Types.Common..=? arg13+ ,"codeLensProvider" Language.LSP.Protocol.Types.Common..=? arg14+ ,"documentLinkProvider" Language.LSP.Protocol.Types.Common..=? arg15+ ,"colorProvider" Language.LSP.Protocol.Types.Common..=? arg16+ ,"workspaceSymbolProvider" Language.LSP.Protocol.Types.Common..=? arg17+ ,"documentFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg18+ ,"documentRangeFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg19+ ,"documentOnTypeFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg20+ ,"renameProvider" Language.LSP.Protocol.Types.Common..=? arg21+ ,"foldingRangeProvider" Language.LSP.Protocol.Types.Common..=? arg22+ ,"selectionRangeProvider" Language.LSP.Protocol.Types.Common..=? arg23+ ,"executeCommandProvider" Language.LSP.Protocol.Types.Common..=? arg24+ ,"callHierarchyProvider" Language.LSP.Protocol.Types.Common..=? arg25+ ,"linkedEditingRangeProvider" Language.LSP.Protocol.Types.Common..=? arg26+ ,"semanticTokensProvider" Language.LSP.Protocol.Types.Common..=? arg27+ ,"monikerProvider" Language.LSP.Protocol.Types.Common..=? arg28+ ,"typeHierarchyProvider" Language.LSP.Protocol.Types.Common..=? arg29+ ,"inlineValueProvider" Language.LSP.Protocol.Types.Common..=? arg30+ ,"inlayHintProvider" Language.LSP.Protocol.Types.Common..=? arg31+ ,"diagnosticProvider" Language.LSP.Protocol.Types.Common..=? arg32+ ,"workspace" Language.LSP.Protocol.Types.Common..=? arg33+ ,"experimental" Language.LSP.Protocol.Types.Common..=? arg34]++instance Aeson.FromJSON ServerCapabilities where+ parseJSON = Aeson.withObject "ServerCapabilities" $ \arg -> ServerCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "positionEncoding" <*> arg Language.LSP.Protocol.Types.Common..:!? "textDocumentSync" <*> arg Language.LSP.Protocol.Types.Common..:!? "notebookDocumentSync" <*> arg Language.LSP.Protocol.Types.Common..:!? "completionProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "hoverProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "signatureHelpProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "declarationProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "definitionProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "typeDefinitionProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "implementationProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "referencesProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentHighlightProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentSymbolProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeActionProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeLensProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentLinkProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "colorProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "workspaceSymbolProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentFormattingProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentRangeFormattingProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentOnTypeFormattingProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "renameProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "foldingRangeProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "selectionRangeProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "executeCommandProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "callHierarchyProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkedEditingRangeProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "semanticTokensProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "monikerProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "typeHierarchyProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlineValueProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlayHintProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "diagnosticProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "workspace" <*> arg Language.LSP.Protocol.Types.Common..:!? "experimental"
+ generated/Language/LSP/Protocol/Internal/Types/ServerCompletionItemOptions.hs view
@@ -0,0 +1,42 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data ServerCompletionItemOptions = ServerCompletionItemOptions + { {-|+ The server has support for completion item label+ details (see also `CompletionItemLabelDetails`) when+ receiving a completion item in a resolve call.++ @since 3.17.0+ -}+ _labelDetailsSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ServerCompletionItemOptions)++instance Aeson.ToJSON ServerCompletionItemOptions where+ toJSON (ServerCompletionItemOptions arg0) = Aeson.object $ concat $ ["labelDetailsSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ServerCompletionItemOptions where+ parseJSON = Aeson.withObject "ServerCompletionItemOptions" $ \arg -> ServerCompletionItemOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "labelDetailsSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ServerInfo.hs view
@@ -0,0 +1,47 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ServerInfo where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Information about the server++@since 3.15.0+@since 3.18.0 ServerInfo type name added.+@proposed+-}+data ServerInfo = ServerInfo + { {-|+ The name of the server as defined by the server.+ -}+ _name :: Data.Text.Text+ , {-|+ The server's version as defined by the server.+ -}+ _version :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ServerInfo)++instance Aeson.ToJSON ServerInfo where+ toJSON (ServerInfo arg0 arg1) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,"version" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ServerInfo where+ parseJSON = Aeson.withObject "ServerInfo" $ \arg -> ServerInfo <$> arg Aeson..: "name" <*> arg Language.LSP.Protocol.Types.Common..:!? "version"
+ generated/Language/LSP/Protocol/Internal/Types/SetTraceParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SetTraceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TraceValue+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SetTraceParams = SetTraceParams + { {-|++ -}+ _value :: Language.LSP.Protocol.Internal.Types.TraceValue.TraceValue+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SetTraceParams)++instance Aeson.ToJSON SetTraceParams where+ toJSON (SetTraceParams arg0) = Aeson.object $ concat $ [["value" Aeson..= arg0]]++instance Aeson.FromJSON SetTraceParams where+ parseJSON = Aeson.withObject "SetTraceParams" $ \arg -> SetTraceParams <$> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentClientCapabilities.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for the showDocument request.++@since 3.16.0+-}+data ShowDocumentClientCapabilities = ShowDocumentClientCapabilities + { {-|+ The client has support for the showDocument+ request.+ -}+ _support :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowDocumentClientCapabilities)++instance Aeson.ToJSON ShowDocumentClientCapabilities where+ toJSON (ShowDocumentClientCapabilities arg0) = Aeson.object $ concat $ [["support" Aeson..= arg0]]++instance Aeson.FromJSON ShowDocumentClientCapabilities where+ parseJSON = Aeson.withObject "ShowDocumentClientCapabilities" $ \arg -> ShowDocumentClientCapabilities <$> arg Aeson..: "support"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentParams.hs view
@@ -0,0 +1,64 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Params to show a resource in the UI.++@since 3.16.0+-}+data ShowDocumentParams = ShowDocumentParams + { {-|+ The uri to show.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ Indicates to show the resource in an external program.+ To show, for example, `https://code.visualstudio.com/`+ in the default WEB browser set `external` to `true`.+ -}+ _external :: (Maybe Bool)+ , {-|+ An optional property to indicate whether the editor+ showing the document should take focus or not.+ Clients might ignore this property if an external+ program is started.+ -}+ _takeFocus :: (Maybe Bool)+ , {-|+ An optional selection range if the document is a text+ document. Clients might ignore the property if an+ external program is started or the file is not a text+ file.+ -}+ _selection :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowDocumentParams)++instance Aeson.ToJSON ShowDocumentParams where+ toJSON (ShowDocumentParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,"external" Language.LSP.Protocol.Types.Common..=? arg1+ ,"takeFocus" Language.LSP.Protocol.Types.Common..=? arg2+ ,"selection" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON ShowDocumentParams where+ parseJSON = Aeson.withObject "ShowDocumentParams" $ \arg -> ShowDocumentParams <$> arg Aeson..: "uri" <*> arg Language.LSP.Protocol.Types.Common..:!? "external" <*> arg Language.LSP.Protocol.Types.Common..:!? "takeFocus" <*> arg Language.LSP.Protocol.Types.Common..:!? "selection"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentResult.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a showDocument request.++@since 3.16.0+-}+data ShowDocumentResult = ShowDocumentResult + { {-|+ A boolean indicating if the show was successful.+ -}+ _success :: Bool+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowDocumentResult)++instance Aeson.ToJSON ShowDocumentResult where+ toJSON (ShowDocumentResult arg0) = Aeson.object $ concat $ [["success" Aeson..= arg0]]++instance Aeson.FromJSON ShowDocumentResult where+ parseJSON = Aeson.withObject "ShowDocumentResult" $ \arg -> ShowDocumentResult <$> arg Aeson..: "success"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageParams.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a notification message.+-}+data ShowMessageParams = ShowMessageParams + { {-|+ The message type. See `MessageType`+ -}+ _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+ , {-|+ The actual message.+ -}+ _message :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowMessageParams)++instance Aeson.ToJSON ShowMessageParams where+ toJSON (ShowMessageParams arg0 arg1) = Aeson.object $ concat $ [["type" Aeson..= arg0]+ ,["message" Aeson..= arg1]]++instance Aeson.FromJSON ShowMessageParams where+ parseJSON = Aeson.withObject "ShowMessageParams" $ \arg -> ShowMessageParams <$> arg Aeson..: "type" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestClientCapabilities.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Show message request client capabilities+-}+data ShowMessageRequestClientCapabilities = ShowMessageRequestClientCapabilities + { {-|+ Capabilities specific to the `MessageActionItem` type.+ -}+ _messageActionItem :: (Maybe Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions.ClientShowMessageActionItemOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowMessageRequestClientCapabilities)++instance Aeson.ToJSON ShowMessageRequestClientCapabilities where+ toJSON (ShowMessageRequestClientCapabilities arg0) = Aeson.object $ concat $ ["messageActionItem" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ShowMessageRequestClientCapabilities where+ parseJSON = Aeson.withObject "ShowMessageRequestClientCapabilities" $ \arg -> ShowMessageRequestClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "messageActionItem"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestParams.hs view
@@ -0,0 +1,50 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageActionItem+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ShowMessageRequestParams = ShowMessageRequestParams + { {-|+ The message type. See `MessageType`+ -}+ _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+ , {-|+ The actual message.+ -}+ _message :: Data.Text.Text+ , {-|+ The message action items to present.+ -}+ _actions :: (Maybe [Language.LSP.Protocol.Internal.Types.MessageActionItem.MessageActionItem])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON ShowMessageRequestParams)++instance Aeson.ToJSON ShowMessageRequestParams where+ toJSON (ShowMessageRequestParams arg0 arg1 arg2) = Aeson.object $ concat $ [["type" Aeson..= arg0]+ ,["message" Aeson..= arg1]+ ,"actions" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ShowMessageRequestParams where+ parseJSON = Aeson.withObject "ShowMessageRequestParams" $ \arg -> ShowMessageRequestParams <$> arg Aeson..: "type" <*> arg Aeson..: "message" <*> arg Language.LSP.Protocol.Types.Common..:!? "actions"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelp.hs view
@@ -0,0 +1,73 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelp where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SignatureInformation+import qualified Language.LSP.Protocol.Types.Common++{-|+Signature help represents the signature of something+callable. There can be multiple signature but only one+active and only one active parameter.+-}+data SignatureHelp = SignatureHelp + { {-|+ One or more signatures.+ -}+ _signatures :: [Language.LSP.Protocol.Internal.Types.SignatureInformation.SignatureInformation]+ , {-|+ The active signature. If omitted or the value lies outside the+ range of `signatures` the value defaults to zero or is ignored if+ the `SignatureHelp` has no signatures.++ Whenever possible implementors should make an active decision about+ the active signature and shouldn't rely on a default value.++ In future version of the protocol this property might become+ mandatory to better express this.+ -}+ _activeSignature :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ , {-|+ The active parameter of the active signature.++ If `null`, no parameter of the signature is active (for example a named+ argument that does not match any declared parameters). This is only valid+ if the client specifies the client capability+ `textDocument.signatureHelp.noActiveParameterSupport === true`++ If omitted or the value lies outside the range of+ `signatures[activeSignature].parameters` defaults to 0 if the active+ signature has parameters.++ If the active signature has no parameters it is ignored.++ In future version of the protocol this property might become+ mandatory (but still nullable) to better express the active parameter if+ the active signature does have any.+ -}+ _activeParameter :: (Maybe (Language.LSP.Protocol.Types.Common.UInt Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelp)++instance Aeson.ToJSON SignatureHelp where+ toJSON (SignatureHelp arg0 arg1 arg2) = Aeson.object $ concat $ [["signatures" Aeson..= arg0]+ ,"activeSignature" Language.LSP.Protocol.Types.Common..=? arg1+ ,"activeParameter" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelp where+ parseJSON = Aeson.withObject "SignatureHelp" $ \arg -> SignatureHelp <$> arg Aeson..: "signatures" <*> arg Language.LSP.Protocol.Types.Common..:!? "activeSignature" <*> arg Language.LSP.Protocol.Types.Common..:!? "activeParameter"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpClientCapabilities.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `SignatureHelpRequest`.+-}+data SignatureHelpClientCapabilities = SignatureHelpClientCapabilities + { {-|+ Whether signature help supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports the following `SignatureInformation`+ specific properties.+ -}+ _signatureInformation :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions.ClientSignatureInformationOptions)+ , {-|+ The client supports to send additional context information for a+ `textDocument/signatureHelp` request. A client that opts into+ contextSupport will also support the `retriggerCharacters` on+ `SignatureHelpOptions`.++ @since 3.15.0+ -}+ _contextSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelpClientCapabilities)++instance Aeson.ToJSON SignatureHelpClientCapabilities where+ toJSON (SignatureHelpClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"signatureInformation" Language.LSP.Protocol.Types.Common..=? arg1+ ,"contextSupport" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelpClientCapabilities where+ parseJSON = Aeson.withObject "SignatureHelpClientCapabilities" $ \arg -> SignatureHelpClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "signatureInformation" <*> arg Language.LSP.Protocol.Types.Common..:!? "contextSupport"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpContext.hs view
@@ -0,0 +1,65 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelp+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional information about the context in which a signature help request was triggered.++@since 3.15.0+-}+data SignatureHelpContext = SignatureHelpContext + { {-|+ Action that caused signature help to be triggered.+ -}+ _triggerKind :: Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind.SignatureHelpTriggerKind+ , {-|+ Character that caused signature help to be triggered.++ This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`+ -}+ _triggerCharacter :: (Maybe Data.Text.Text)+ , {-|+ `true` if signature help was already showing when it was triggered.++ Retriggers occurs when the signature help is already active and can be caused by actions such as+ typing a trigger character, a cursor move, or document content changes.+ -}+ _isRetrigger :: Bool+ , {-|+ The currently active `SignatureHelp`.++ The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on+ the user navigating through available signatures.+ -}+ _activeSignatureHelp :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelp.SignatureHelp)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelpContext)++instance Aeson.ToJSON SignatureHelpContext where+ toJSON (SignatureHelpContext arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["triggerKind" Aeson..= arg0]+ ,"triggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1+ ,["isRetrigger" Aeson..= arg2]+ ,"activeSignatureHelp" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpContext where+ parseJSON = Aeson.withObject "SignatureHelpContext" $ \arg -> SignatureHelpContext <$> arg Aeson..: "triggerKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacter" <*> arg Aeson..: "isRetrigger" <*> arg Language.LSP.Protocol.Types.Common..:!? "activeSignatureHelp"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpOptions.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Server Capabilities for a `SignatureHelpRequest`.+-}+data SignatureHelpOptions = SignatureHelpOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ List of characters that trigger signature help automatically.+ -}+ _triggerCharacters :: (Maybe [Data.Text.Text])+ , {-|+ List of characters that re-trigger signature help.++ These trigger characters are only active when signature help is already showing. All trigger characters+ are also counted as re-trigger characters.++ @since 3.15.0+ -}+ _retriggerCharacters :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelpOptions)++instance Aeson.ToJSON SignatureHelpOptions where+ toJSON (SignatureHelpOptions arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg1+ ,"retriggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelpOptions where+ parseJSON = Aeson.withObject "SignatureHelpOptions" $ \arg -> SignatureHelpOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "retriggerCharacters"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpParams.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpContext+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `SignatureHelpRequest`.+-}+data SignatureHelpParams = SignatureHelpParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The signature help context. This is only available if the client specifies+ to send this using the client capability `textDocument.signatureHelp.contextSupport === true`++ @since 3.15.0+ -}+ _context :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpContext.SignatureHelpContext)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelpParams)++instance Aeson.ToJSON SignatureHelpParams where+ toJSON (SignatureHelpParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"context" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpParams where+ parseJSON = Aeson.withObject "SignatureHelpParams" $ \arg -> SignatureHelpParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "context"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpRegistrationOptions.hs view
@@ -0,0 +1,60 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `SignatureHelpRequest`.+-}+data SignatureHelpRegistrationOptions = SignatureHelpRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ List of characters that trigger signature help automatically.+ -}+ _triggerCharacters :: (Maybe [Data.Text.Text])+ , {-|+ List of characters that re-trigger signature help.++ These trigger characters are only active when signature help is already showing. All trigger characters+ are also counted as re-trigger characters.++ @since 3.15.0+ -}+ _retriggerCharacters :: (Maybe [Data.Text.Text])+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureHelpRegistrationOptions)++instance Aeson.ToJSON SignatureHelpRegistrationOptions where+ toJSON (SignatureHelpRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2+ ,"retriggerCharacters" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpRegistrationOptions where+ parseJSON = Aeson.withObject "SignatureHelpRegistrationOptions" $ \arg -> SignatureHelpRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "triggerCharacters" <*> arg Language.LSP.Protocol.Types.Common..:!? "retriggerCharacters"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs view
@@ -0,0 +1,60 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How a signature help was triggered.++@since 3.15.0+-}+data SignatureHelpTriggerKind = + {-|+ Signature help was invoked manually by the user or by a command.+ -}+ SignatureHelpTriggerKind_Invoked+ | {-|+ Signature help was triggered by a trigger character.+ -}+ SignatureHelpTriggerKind_TriggerCharacter+ | {-|+ Signature help was triggered by the cursor moving or by the document content changing.+ -}+ SignatureHelpTriggerKind_ContentChange+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SignatureHelpTriggerKind)+ deriving Pretty via (ViaJSON SignatureHelpTriggerKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SignatureHelpTriggerKind where+ knownValues = Data.Set.fromList [SignatureHelpTriggerKind_Invoked+ ,SignatureHelpTriggerKind_TriggerCharacter+ ,SignatureHelpTriggerKind_ContentChange]+ type EnumBaseType SignatureHelpTriggerKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType SignatureHelpTriggerKind_Invoked = 1+ toEnumBaseType SignatureHelpTriggerKind_TriggerCharacter = 2+ toEnumBaseType SignatureHelpTriggerKind_ContentChange = 3+ fromEnumBaseType 1 = pure SignatureHelpTriggerKind_Invoked+ fromEnumBaseType 2 = pure SignatureHelpTriggerKind_TriggerCharacter+ fromEnumBaseType 3 = pure SignatureHelpTriggerKind_ContentChange+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SignatureInformation.hs view
@@ -0,0 +1,69 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.ParameterInformation+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents the signature of something callable. A signature+can have a label, like a function-name, a doc-comment, and+a set of parameters.+-}+data SignatureInformation = SignatureInformation + { {-|+ The label of this signature. Will be shown in+ the UI.+ -}+ _label :: Data.Text.Text+ , {-|+ The human-readable doc-comment of this signature. Will be shown+ in the UI but can be omitted.+ -}+ _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+ , {-|+ The parameters of this signature.+ -}+ _parameters :: (Maybe [Language.LSP.Protocol.Internal.Types.ParameterInformation.ParameterInformation])+ , {-|+ The index of the active parameter.++ If `null`, no parameter of the signature is active (for example a named+ argument that does not match any declared parameters). This is only valid+ if the client specifies the client capability+ `textDocument.signatureHelp.noActiveParameterSupport === true`++ If provided (or `null`), this is used in place of+ `SignatureHelp.activeParameter`.++ @since 3.16.0+ -}+ _activeParameter :: (Maybe (Language.LSP.Protocol.Types.Common.UInt Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SignatureInformation)++instance Aeson.ToJSON SignatureInformation where+ toJSON (SignatureInformation arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["label" Aeson..= arg0]+ ,"documentation" Language.LSP.Protocol.Types.Common..=? arg1+ ,"parameters" Language.LSP.Protocol.Types.Common..=? arg2+ ,"activeParameter" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureInformation where+ parseJSON = Aeson.withObject "SignatureInformation" $ \arg -> SignatureInformation <$> arg Aeson..: "label" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentation" <*> arg Language.LSP.Protocol.Types.Common..:!? "parameters" <*> arg Language.LSP.Protocol.Types.Common..:!? "activeParameter"
+ generated/Language/LSP/Protocol/Internal/Types/StaleRequestSupportOptions.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data StaleRequestSupportOptions = StaleRequestSupportOptions + { {-|+ The client will actively cancel the request.+ -}+ _cancel :: Bool+ , {-|+ The list of requests for which the client+ will retry the request if it receives a+ response with error code `ContentModified`+ -}+ _retryOnContentModified :: [Data.Text.Text]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON StaleRequestSupportOptions)++instance Aeson.ToJSON StaleRequestSupportOptions where+ toJSON (StaleRequestSupportOptions arg0 arg1) = Aeson.object $ concat $ [["cancel" Aeson..= arg0]+ ,["retryOnContentModified" Aeson..= arg1]]++instance Aeson.FromJSON StaleRequestSupportOptions where+ parseJSON = Aeson.withObject "StaleRequestSupportOptions" $ \arg -> StaleRequestSupportOptions <$> arg Aeson..: "cancel" <*> arg Aeson..: "retryOnContentModified"
+ generated/Language/LSP/Protocol/Internal/Types/StaticRegistrationOptions.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Static registration options to be returned in the initialize+request.+-}+data StaticRegistrationOptions = StaticRegistrationOptions + { {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON StaticRegistrationOptions)++instance Aeson.ToJSON StaticRegistrationOptions where+ toJSON (StaticRegistrationOptions arg0) = Aeson.object $ concat $ ["id" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON StaticRegistrationOptions where+ parseJSON = Aeson.withObject "StaticRegistrationOptions" $ \arg -> StaticRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/SymbolInformation.hs view
@@ -0,0 +1,82 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information about programming constructs like variables, classes,+interfaces etc.+-}+data SymbolInformation = SymbolInformation + { {-|+ The name of this symbol.+ -}+ _name :: Data.Text.Text+ , {-|+ The kind of this symbol.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this symbol.++ @since 3.16.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ The name of the symbol containing this symbol. This information is for+ user interface purposes (e.g. to render a qualifier in the user interface+ if necessary). It can't be used to re-infer a hierarchy for the document+ symbols.+ -}+ _containerName :: (Maybe Data.Text.Text)+ , {-|+ Indicates if this symbol is deprecated.++ @deprecated Use tags instead+ -}+ _deprecated :: (Maybe Bool)+ , {-|+ The location of this symbol. The location's range is used by a tool+ to reveal the location in the editor. If the symbol is selected in the+ tool the range's start information is used to position the cursor. So+ the range usually spans more than the actual symbol's name and does+ normally include things like visibility modifiers.++ The range doesn't have to denote a node range in the sense of an abstract+ syntax tree. It can therefore not be used to re-construct a hierarchy of+ the symbols.+ -}+ _location :: Language.LSP.Protocol.Internal.Types.Location.Location+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON SymbolInformation)++instance Aeson.ToJSON SymbolInformation where+ toJSON (SymbolInformation arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,["kind" Aeson..= arg1]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+ ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3+ ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg4+ ,["location" Aeson..= arg5]]++instance Aeson.FromJSON SymbolInformation where+ parseJSON = Aeson.withObject "SymbolInformation" $ \arg -> SymbolInformation <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "containerName" <*> arg Language.LSP.Protocol.Types.Common..:!? "deprecated" <*> arg Aeson..: "location"
+ generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs view
@@ -0,0 +1,219 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A symbol kind.+-}+data SymbolKind = + {-|++ -}+ SymbolKind_File+ | {-|++ -}+ SymbolKind_Module+ | {-|++ -}+ SymbolKind_Namespace+ | {-|++ -}+ SymbolKind_Package+ | {-|++ -}+ SymbolKind_Class+ | {-|++ -}+ SymbolKind_Method+ | {-|++ -}+ SymbolKind_Property+ | {-|++ -}+ SymbolKind_Field+ | {-|++ -}+ SymbolKind_Constructor+ | {-|++ -}+ SymbolKind_Enum+ | {-|++ -}+ SymbolKind_Interface+ | {-|++ -}+ SymbolKind_Function+ | {-|++ -}+ SymbolKind_Variable+ | {-|++ -}+ SymbolKind_Constant+ | {-|++ -}+ SymbolKind_String+ | {-|++ -}+ SymbolKind_Number+ | {-|++ -}+ SymbolKind_Boolean+ | {-|++ -}+ SymbolKind_Array+ | {-|++ -}+ SymbolKind_Object+ | {-|++ -}+ SymbolKind_Key+ | {-|++ -}+ SymbolKind_Null+ | {-|++ -}+ SymbolKind_EnumMember+ | {-|++ -}+ SymbolKind_Struct+ | {-|++ -}+ SymbolKind_Event+ | {-|++ -}+ SymbolKind_Operator+ | {-|++ -}+ SymbolKind_TypeParameter+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolKind)+ deriving Pretty via (ViaJSON SymbolKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolKind where+ knownValues = Data.Set.fromList [SymbolKind_File+ ,SymbolKind_Module+ ,SymbolKind_Namespace+ ,SymbolKind_Package+ ,SymbolKind_Class+ ,SymbolKind_Method+ ,SymbolKind_Property+ ,SymbolKind_Field+ ,SymbolKind_Constructor+ ,SymbolKind_Enum+ ,SymbolKind_Interface+ ,SymbolKind_Function+ ,SymbolKind_Variable+ ,SymbolKind_Constant+ ,SymbolKind_String+ ,SymbolKind_Number+ ,SymbolKind_Boolean+ ,SymbolKind_Array+ ,SymbolKind_Object+ ,SymbolKind_Key+ ,SymbolKind_Null+ ,SymbolKind_EnumMember+ ,SymbolKind_Struct+ ,SymbolKind_Event+ ,SymbolKind_Operator+ ,SymbolKind_TypeParameter]+ type EnumBaseType SymbolKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType SymbolKind_File = 1+ toEnumBaseType SymbolKind_Module = 2+ toEnumBaseType SymbolKind_Namespace = 3+ toEnumBaseType SymbolKind_Package = 4+ toEnumBaseType SymbolKind_Class = 5+ toEnumBaseType SymbolKind_Method = 6+ toEnumBaseType SymbolKind_Property = 7+ toEnumBaseType SymbolKind_Field = 8+ toEnumBaseType SymbolKind_Constructor = 9+ toEnumBaseType SymbolKind_Enum = 10+ toEnumBaseType SymbolKind_Interface = 11+ toEnumBaseType SymbolKind_Function = 12+ toEnumBaseType SymbolKind_Variable = 13+ toEnumBaseType SymbolKind_Constant = 14+ toEnumBaseType SymbolKind_String = 15+ toEnumBaseType SymbolKind_Number = 16+ toEnumBaseType SymbolKind_Boolean = 17+ toEnumBaseType SymbolKind_Array = 18+ toEnumBaseType SymbolKind_Object = 19+ toEnumBaseType SymbolKind_Key = 20+ toEnumBaseType SymbolKind_Null = 21+ toEnumBaseType SymbolKind_EnumMember = 22+ toEnumBaseType SymbolKind_Struct = 23+ toEnumBaseType SymbolKind_Event = 24+ toEnumBaseType SymbolKind_Operator = 25+ toEnumBaseType SymbolKind_TypeParameter = 26+ fromEnumBaseType 1 = pure SymbolKind_File+ fromEnumBaseType 2 = pure SymbolKind_Module+ fromEnumBaseType 3 = pure SymbolKind_Namespace+ fromEnumBaseType 4 = pure SymbolKind_Package+ fromEnumBaseType 5 = pure SymbolKind_Class+ fromEnumBaseType 6 = pure SymbolKind_Method+ fromEnumBaseType 7 = pure SymbolKind_Property+ fromEnumBaseType 8 = pure SymbolKind_Field+ fromEnumBaseType 9 = pure SymbolKind_Constructor+ fromEnumBaseType 10 = pure SymbolKind_Enum+ fromEnumBaseType 11 = pure SymbolKind_Interface+ fromEnumBaseType 12 = pure SymbolKind_Function+ fromEnumBaseType 13 = pure SymbolKind_Variable+ fromEnumBaseType 14 = pure SymbolKind_Constant+ fromEnumBaseType 15 = pure SymbolKind_String+ fromEnumBaseType 16 = pure SymbolKind_Number+ fromEnumBaseType 17 = pure SymbolKind_Boolean+ fromEnumBaseType 18 = pure SymbolKind_Array+ fromEnumBaseType 19 = pure SymbolKind_Object+ fromEnumBaseType 20 = pure SymbolKind_Key+ fromEnumBaseType 21 = pure SymbolKind_Null+ fromEnumBaseType 22 = pure SymbolKind_EnumMember+ fromEnumBaseType 23 = pure SymbolKind_Struct+ fromEnumBaseType 24 = pure SymbolKind_Event+ fromEnumBaseType 25 = pure SymbolKind_Operator+ fromEnumBaseType 26 = pure SymbolKind_TypeParameter+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Symbol tags are extra annotations that tweak the rendering of a symbol.++@since 3.16+-}+data SymbolTag = + {-|+ Render a symbol as obsolete, usually using a strike-out.+ -}+ SymbolTag_Deprecated+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolTag)+ deriving Pretty via (ViaJSON SymbolTag)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolTag where+ knownValues = Data.Set.fromList [SymbolTag_Deprecated]+ type EnumBaseType SymbolTag = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType SymbolTag_Deprecated = 1+ fromEnumBaseType 1 = pure SymbolTag_Deprecated+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentChangeRegistrationOptions.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Describe options to be used when registered for text document change events.+-}+data TextDocumentChangeRegistrationOptions = TextDocumentChangeRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ How documents are synced to the server.+ -}+ _syncKind :: Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentChangeRegistrationOptions)++instance Aeson.ToJSON TextDocumentChangeRegistrationOptions where+ toJSON (TextDocumentChangeRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,["syncKind" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentChangeRegistrationOptions where+ parseJSON = Aeson.withObject "TextDocumentChangeRegistrationOptions" $ \arg -> TextDocumentChangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..: "syncKind"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentClientCapabilities.hs view
@@ -0,0 +1,241 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Text document specific client capabilities.+-}+data TextDocumentClientCapabilities = TextDocumentClientCapabilities + { {-|+ Defines which synchronization capabilities the client supports.+ -}+ _synchronization :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities.TextDocumentSyncClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/completion` request.+ -}+ _completion :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities.CompletionClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/hover` request.+ -}+ _hover :: (Maybe Language.LSP.Protocol.Internal.Types.HoverClientCapabilities.HoverClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/signatureHelp` request.+ -}+ _signatureHelp :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities.SignatureHelpClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/declaration` request.++ @since 3.14.0+ -}+ _declaration :: (Maybe Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities.DeclarationClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/definition` request.+ -}+ _definition :: (Maybe Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities.DefinitionClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/typeDefinition` request.++ @since 3.6.0+ -}+ _typeDefinition :: (Maybe Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities.TypeDefinitionClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/implementation` request.++ @since 3.6.0+ -}+ _implementation :: (Maybe Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities.ImplementationClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/references` request.+ -}+ _references :: (Maybe Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities.ReferenceClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/documentHighlight` request.+ -}+ _documentHighlight :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities.DocumentHighlightClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/documentSymbol` request.+ -}+ _documentSymbol :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities.DocumentSymbolClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/codeAction` request.+ -}+ _codeAction :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities.CodeActionClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/codeLens` request.+ -}+ _codeLens :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities.CodeLensClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/documentLink` request.+ -}+ _documentLink :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities.DocumentLinkClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/documentColor` and the+ `textDocument/colorPresentation` request.++ @since 3.6.0+ -}+ _colorProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities.DocumentColorClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/formatting` request.+ -}+ _formatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities.DocumentFormattingClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/rangeFormatting` request.+ -}+ _rangeFormatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities.DocumentRangeFormattingClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/onTypeFormatting` request.+ -}+ _onTypeFormatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities.DocumentOnTypeFormattingClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/rename` request.+ -}+ _rename :: (Maybe Language.LSP.Protocol.Internal.Types.RenameClientCapabilities.RenameClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/foldingRange` request.++ @since 3.10.0+ -}+ _foldingRange :: (Maybe Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities.FoldingRangeClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/selectionRange` request.++ @since 3.15.0+ -}+ _selectionRange :: (Maybe Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities.SelectionRangeClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/publishDiagnostics` notification.+ -}+ _publishDiagnostics :: (Maybe Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities.PublishDiagnosticsClientCapabilities)+ , {-|+ Capabilities specific to the various call hierarchy requests.++ @since 3.16.0+ -}+ _callHierarchy :: (Maybe Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities.CallHierarchyClientCapabilities)+ , {-|+ Capabilities specific to the various semantic token request.++ @since 3.16.0+ -}+ _semanticTokens :: (Maybe Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities.SemanticTokensClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/linkedEditingRange` request.++ @since 3.16.0+ -}+ _linkedEditingRange :: (Maybe Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities.LinkedEditingRangeClientCapabilities)+ , {-|+ Client capabilities specific to the `textDocument/moniker` request.++ @since 3.16.0+ -}+ _moniker :: (Maybe Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities.MonikerClientCapabilities)+ , {-|+ Capabilities specific to the various type hierarchy requests.++ @since 3.17.0+ -}+ _typeHierarchy :: (Maybe Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities.TypeHierarchyClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/inlineValue` request.++ @since 3.17.0+ -}+ _inlineValue :: (Maybe Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities.InlineValueClientCapabilities)+ , {-|+ Capabilities specific to the `textDocument/inlayHint` request.++ @since 3.17.0+ -}+ _inlayHint :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities.InlayHintClientCapabilities)+ , {-|+ Capabilities specific to the diagnostic pull model.++ @since 3.17.0+ -}+ _diagnostic :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities.DiagnosticClientCapabilities)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentClientCapabilities)++instance Aeson.ToJSON TextDocumentClientCapabilities where+ toJSON (TextDocumentClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 arg20 arg21 arg22 arg23 arg24 arg25 arg26 arg27 arg28 arg29) = Aeson.object $ concat $ ["synchronization" Language.LSP.Protocol.Types.Common..=? arg0+ ,"completion" Language.LSP.Protocol.Types.Common..=? arg1+ ,"hover" Language.LSP.Protocol.Types.Common..=? arg2+ ,"signatureHelp" Language.LSP.Protocol.Types.Common..=? arg3+ ,"declaration" Language.LSP.Protocol.Types.Common..=? arg4+ ,"definition" Language.LSP.Protocol.Types.Common..=? arg5+ ,"typeDefinition" Language.LSP.Protocol.Types.Common..=? arg6+ ,"implementation" Language.LSP.Protocol.Types.Common..=? arg7+ ,"references" Language.LSP.Protocol.Types.Common..=? arg8+ ,"documentHighlight" Language.LSP.Protocol.Types.Common..=? arg9+ ,"documentSymbol" Language.LSP.Protocol.Types.Common..=? arg10+ ,"codeAction" Language.LSP.Protocol.Types.Common..=? arg11+ ,"codeLens" Language.LSP.Protocol.Types.Common..=? arg12+ ,"documentLink" Language.LSP.Protocol.Types.Common..=? arg13+ ,"colorProvider" Language.LSP.Protocol.Types.Common..=? arg14+ ,"formatting" Language.LSP.Protocol.Types.Common..=? arg15+ ,"rangeFormatting" Language.LSP.Protocol.Types.Common..=? arg16+ ,"onTypeFormatting" Language.LSP.Protocol.Types.Common..=? arg17+ ,"rename" Language.LSP.Protocol.Types.Common..=? arg18+ ,"foldingRange" Language.LSP.Protocol.Types.Common..=? arg19+ ,"selectionRange" Language.LSP.Protocol.Types.Common..=? arg20+ ,"publishDiagnostics" Language.LSP.Protocol.Types.Common..=? arg21+ ,"callHierarchy" Language.LSP.Protocol.Types.Common..=? arg22+ ,"semanticTokens" Language.LSP.Protocol.Types.Common..=? arg23+ ,"linkedEditingRange" Language.LSP.Protocol.Types.Common..=? arg24+ ,"moniker" Language.LSP.Protocol.Types.Common..=? arg25+ ,"typeHierarchy" Language.LSP.Protocol.Types.Common..=? arg26+ ,"inlineValue" Language.LSP.Protocol.Types.Common..=? arg27+ ,"inlayHint" Language.LSP.Protocol.Types.Common..=? arg28+ ,"diagnostic" Language.LSP.Protocol.Types.Common..=? arg29]++instance Aeson.FromJSON TextDocumentClientCapabilities where+ parseJSON = Aeson.withObject "TextDocumentClientCapabilities" $ \arg -> TextDocumentClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "synchronization" <*> arg Language.LSP.Protocol.Types.Common..:!? "completion" <*> arg Language.LSP.Protocol.Types.Common..:!? "hover" <*> arg Language.LSP.Protocol.Types.Common..:!? "signatureHelp" <*> arg Language.LSP.Protocol.Types.Common..:!? "declaration" <*> arg Language.LSP.Protocol.Types.Common..:!? "definition" <*> arg Language.LSP.Protocol.Types.Common..:!? "typeDefinition" <*> arg Language.LSP.Protocol.Types.Common..:!? "implementation" <*> arg Language.LSP.Protocol.Types.Common..:!? "references" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentHighlight" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentSymbol" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeAction" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeLens" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentLink" <*> arg Language.LSP.Protocol.Types.Common..:!? "colorProvider" <*> arg Language.LSP.Protocol.Types.Common..:!? "formatting" <*> arg Language.LSP.Protocol.Types.Common..:!? "rangeFormatting" <*> arg Language.LSP.Protocol.Types.Common..:!? "onTypeFormatting" <*> arg Language.LSP.Protocol.Types.Common..:!? "rename" <*> arg Language.LSP.Protocol.Types.Common..:!? "foldingRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "selectionRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "publishDiagnostics" <*> arg Language.LSP.Protocol.Types.Common..:!? "callHierarchy" <*> arg Language.LSP.Protocol.Types.Common..:!? "semanticTokens" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkedEditingRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "moniker" <*> arg Language.LSP.Protocol.Types.Common..:!? "typeHierarchy" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlineValue" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlayHint" <*> arg Language.LSP.Protocol.Types.Common..:!? "diagnostic"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangeEvent.hs view
@@ -0,0 +1,30 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument+import qualified Language.LSP.Protocol.Types.Common++{-|+An event describing a change to a text document. If only a text is provided+it is considered to be the full content of the document.+-}+newtype TextDocumentContentChangeEvent = TextDocumentContentChangeEvent (Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial.TextDocumentContentChangePartial Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument.TextDocumentContentChangeWholeDocument)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentContentChangeEvent)
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangePartial.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data TextDocumentContentChangePartial = TextDocumentContentChangePartial + { {-|+ The range of the document that changed.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The optional length of the range that got replaced.++ @deprecated use range instead.+ -}+ _rangeLength :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ , {-|+ The new text for the provided range.+ -}+ _text :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentContentChangePartial)++instance Aeson.ToJSON TextDocumentContentChangePartial where+ toJSON (TextDocumentContentChangePartial arg0 arg1 arg2) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,"rangeLength" Language.LSP.Protocol.Types.Common..=? arg1+ ,["text" Aeson..= arg2]]++instance Aeson.FromJSON TextDocumentContentChangePartial where+ parseJSON = Aeson.withObject "TextDocumentContentChangePartial" $ \arg -> TextDocumentContentChangePartial <$> arg Aeson..: "range" <*> arg Language.LSP.Protocol.Types.Common..:!? "rangeLength" <*> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangeWholeDocument.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.18.0+@proposed+-}+data TextDocumentContentChangeWholeDocument = TextDocumentContentChangeWholeDocument + { {-|+ The new text of the whole document.+ -}+ _text :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentContentChangeWholeDocument)++instance Aeson.ToJSON TextDocumentContentChangeWholeDocument where+ toJSON (TextDocumentContentChangeWholeDocument arg0) = Aeson.object $ concat $ [["text" Aeson..= arg0]]++instance Aeson.FromJSON TextDocumentContentChangeWholeDocument where+ parseJSON = Aeson.withObject "TextDocumentContentChangeWholeDocument" $ \arg -> TextDocumentContentChangeWholeDocument <$> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentEdit.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+import qualified Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+Describes textual changes on a text document. A TextDocumentEdit describes all changes+on a document version Si and after they are applied move the document to version Si+1.+So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any+kind of ordering. However the edits must be non overlapping.+-}+data TextDocumentEdit = TextDocumentEdit + { {-|+ The text document to change.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier.OptionalVersionedTextDocumentIdentifier+ , {-|+ The edits to be applied.++ @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a+ client capability.+ -}+ _edits :: [(Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit.AnnotatedTextEdit)]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentEdit)++instance Aeson.ToJSON TextDocumentEdit where+ toJSON (TextDocumentEdit arg0 arg1) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["edits" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentEdit where+ parseJSON = Aeson.withObject "TextDocumentEdit" $ \arg -> TextDocumentEdit <$> arg Aeson..: "textDocument" <*> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilter.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter denotes a document by different properties like+the `TextDocument.languageId` of+its resource, or a glob-pattern that is applied to the `TextDocument.fileName`.++Glob patterns can have the following syntax:+- `*` to match one or more characters in a path segment+- `?` to match on one character in a path segment+- `**` to match any number of path segments, including none+- `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)+- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)++@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`+@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`++@since 3.17.0+-}+newtype TextDocumentFilter = TextDocumentFilter (Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage.TextDocumentFilterLanguage Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme.TextDocumentFilterScheme Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern.TextDocumentFilterPattern))+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentFilter)
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterLanguage.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter where `language` is required field.++@since 3.18.0+@proposed+-}+data TextDocumentFilterLanguage = TextDocumentFilterLanguage + { {-|+ A language id, like `typescript`.+ -}+ _language :: Data.Text.Text+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: (Maybe Data.Text.Text)+ , {-|+ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.+ -}+ _pattern :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentFilterLanguage)++instance Aeson.ToJSON TextDocumentFilterLanguage where+ toJSON (TextDocumentFilterLanguage arg0 arg1 arg2) = Aeson.object $ concat $ [["language" Aeson..= arg0]+ ,"scheme" Language.LSP.Protocol.Types.Common..=? arg1+ ,"pattern" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TextDocumentFilterLanguage where+ parseJSON = Aeson.withObject "TextDocumentFilterLanguage" $ \arg -> TextDocumentFilterLanguage <$> arg Aeson..: "language" <*> arg Language.LSP.Protocol.Types.Common..:!? "scheme" <*> arg Language.LSP.Protocol.Types.Common..:!? "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterPattern.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter where `pattern` is required field.++@since 3.18.0+@proposed+-}+data TextDocumentFilterPattern = TextDocumentFilterPattern + { {-|+ A language id, like `typescript`.+ -}+ _language :: (Maybe Data.Text.Text)+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: (Maybe Data.Text.Text)+ , {-|+ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.+ -}+ _pattern :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentFilterPattern)++instance Aeson.ToJSON TextDocumentFilterPattern where+ toJSON (TextDocumentFilterPattern arg0 arg1 arg2) = Aeson.object $ concat $ ["language" Language.LSP.Protocol.Types.Common..=? arg0+ ,"scheme" Language.LSP.Protocol.Types.Common..=? arg1+ ,["pattern" Aeson..= arg2]]++instance Aeson.FromJSON TextDocumentFilterPattern where+ parseJSON = Aeson.withObject "TextDocumentFilterPattern" $ \arg -> TextDocumentFilterPattern <$> arg Language.LSP.Protocol.Types.Common..:!? "language" <*> arg Language.LSP.Protocol.Types.Common..:!? "scheme" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilterScheme.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter where `scheme` is required field.++@since 3.18.0+@proposed+-}+data TextDocumentFilterScheme = TextDocumentFilterScheme + { {-|+ A language id, like `typescript`.+ -}+ _language :: (Maybe Data.Text.Text)+ , {-|+ A Uri `Uri.scheme`, like `file` or `untitled`.+ -}+ _scheme :: Data.Text.Text+ , {-|+ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.+ -}+ _pattern :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentFilterScheme)++instance Aeson.ToJSON TextDocumentFilterScheme where+ toJSON (TextDocumentFilterScheme arg0 arg1 arg2) = Aeson.object $ concat $ ["language" Language.LSP.Protocol.Types.Common..=? arg0+ ,["scheme" Aeson..= arg1]+ ,"pattern" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TextDocumentFilterScheme where+ parseJSON = Aeson.withObject "TextDocumentFilterScheme" $ \arg -> TextDocumentFilterScheme <$> arg Language.LSP.Protocol.Types.Common..:!? "language" <*> arg Aeson..: "scheme" <*> arg Language.LSP.Protocol.Types.Common..:!? "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentIdentifier.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A literal to identify a text document in the client.+-}+data TextDocumentIdentifier = TextDocumentIdentifier + { {-|+ The text document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentIdentifier)++instance Aeson.ToJSON TextDocumentIdentifier where+ toJSON (TextDocumentIdentifier arg0) = Aeson.object $ concat $ [["uri" Aeson..= arg0]]++instance Aeson.FromJSON TextDocumentIdentifier where+ parseJSON = Aeson.withObject "TextDocumentIdentifier" $ \arg -> TextDocumentIdentifier <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentItem.hs view
@@ -0,0 +1,57 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.LanguageKind+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+An item to transfer a text document from the client to the+server.+-}+data TextDocumentItem = TextDocumentItem + { {-|+ The text document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The text document's language identifier.+ -}+ _languageId :: Language.LSP.Protocol.Internal.Types.LanguageKind.LanguageKind+ , {-|+ The version number of this document (it will increase after each+ change, including undo/redo).+ -}+ _version :: Language.LSP.Protocol.Types.Common.Int32+ , {-|+ The content of the opened text document.+ -}+ _text :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentItem)++instance Aeson.ToJSON TextDocumentItem where+ toJSON (TextDocumentItem arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["languageId" Aeson..= arg1]+ ,["version" Aeson..= arg2]+ ,["text" Aeson..= arg3]]++instance Aeson.FromJSON TextDocumentItem where+ parseJSON = Aeson.withObject "TextDocumentItem" $ \arg -> TextDocumentItem <$> arg Aeson..: "uri" <*> arg Aeson..: "languageId" <*> arg Aeson..: "version" <*> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentPositionParams.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in requests to pass a text document and a position inside that+document.+-}+data TextDocumentPositionParams = TextDocumentPositionParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentPositionParams)++instance Aeson.ToJSON TextDocumentPositionParams where+ toJSON (TextDocumentPositionParams arg0 arg1) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentPositionParams where+ parseJSON = Aeson.withObject "TextDocumentPositionParams" $ \arg -> TextDocumentPositionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentRegistrationOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+General text document registration options.+-}+data TextDocumentRegistrationOptions = TextDocumentRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentRegistrationOptions)++instance Aeson.ToJSON TextDocumentRegistrationOptions where+ toJSON (TextDocumentRegistrationOptions arg0) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]]++instance Aeson.FromJSON TextDocumentRegistrationOptions where+ parseJSON = Aeson.withObject "TextDocumentRegistrationOptions" $ \arg -> TextDocumentRegistrationOptions <$> arg Aeson..: "documentSelector"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Represents reasons why a text document is saved.+-}+data TextDocumentSaveReason = + {-|+ Manually triggered, e.g. by the user pressing save, by starting debugging,+ or by an API call.+ -}+ TextDocumentSaveReason_Manual+ | {-|+ Automatic after a delay.+ -}+ TextDocumentSaveReason_AfterDelay+ | {-|+ When the editor lost focus.+ -}+ TextDocumentSaveReason_FocusOut+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSaveReason)+ deriving Pretty via (ViaJSON TextDocumentSaveReason)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSaveReason where+ knownValues = Data.Set.fromList [TextDocumentSaveReason_Manual+ ,TextDocumentSaveReason_AfterDelay+ ,TextDocumentSaveReason_FocusOut]+ type EnumBaseType TextDocumentSaveReason = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType TextDocumentSaveReason_Manual = 1+ toEnumBaseType TextDocumentSaveReason_AfterDelay = 2+ toEnumBaseType TextDocumentSaveReason_FocusOut = 3+ fromEnumBaseType 1 = pure TextDocumentSaveReason_Manual+ fromEnumBaseType 2 = pure TextDocumentSaveReason_AfterDelay+ fromEnumBaseType 3 = pure TextDocumentSaveReason_FocusOut+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveRegistrationOptions.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Save registration options.+-}+data TextDocumentSaveRegistrationOptions = TextDocumentSaveRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The client is supposed to include the content on save.+ -}+ _includeText :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentSaveRegistrationOptions)++instance Aeson.ToJSON TextDocumentSaveRegistrationOptions where+ toJSON (TextDocumentSaveRegistrationOptions arg0 arg1) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"includeText" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON TextDocumentSaveRegistrationOptions where+ parseJSON = Aeson.withObject "TextDocumentSaveRegistrationOptions" $ \arg -> TextDocumentSaveRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "includeText"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncClientCapabilities.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TextDocumentSyncClientCapabilities = TextDocumentSyncClientCapabilities + { {-|+ Whether text document synchronization supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports sending will save notifications.+ -}+ _willSave :: (Maybe Bool)+ , {-|+ The client supports sending a will save request and+ waits for a response providing text edits which will+ be applied to the document before it is saved.+ -}+ _willSaveWaitUntil :: (Maybe Bool)+ , {-|+ The client supports did save notifications.+ -}+ _didSave :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentSyncClientCapabilities)++instance Aeson.ToJSON TextDocumentSyncClientCapabilities where+ toJSON (TextDocumentSyncClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"willSave" Language.LSP.Protocol.Types.Common..=? arg1+ ,"willSaveWaitUntil" Language.LSP.Protocol.Types.Common..=? arg2+ ,"didSave" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON TextDocumentSyncClientCapabilities where+ parseJSON = Aeson.withObject "TextDocumentSyncClientCapabilities" $ \arg -> TextDocumentSyncClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "willSave" <*> arg Language.LSP.Protocol.Types.Common..:!? "willSaveWaitUntil" <*> arg Language.LSP.Protocol.Types.Common..:!? "didSave"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Defines how the host (editor) should sync+document changes to the language server.+-}+data TextDocumentSyncKind = + {-|+ Documents should not be synced at all.+ -}+ TextDocumentSyncKind_None+ | {-|+ Documents are synced by always sending the full content+ of the document.+ -}+ TextDocumentSyncKind_Full+ | {-|+ Documents are synced by sending the full content on open.+ After that only incremental updates to the document are+ send.+ -}+ TextDocumentSyncKind_Incremental+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSyncKind)+ deriving Pretty via (ViaJSON TextDocumentSyncKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSyncKind where+ knownValues = Data.Set.fromList [TextDocumentSyncKind_None+ ,TextDocumentSyncKind_Full+ ,TextDocumentSyncKind_Incremental]+ type EnumBaseType TextDocumentSyncKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType TextDocumentSyncKind_None = 0+ toEnumBaseType TextDocumentSyncKind_Full = 1+ toEnumBaseType TextDocumentSyncKind_Incremental = 2+ fromEnumBaseType 0 = pure TextDocumentSyncKind_None+ fromEnumBaseType 1 = pure TextDocumentSyncKind_Full+ fromEnumBaseType 2 = pure TextDocumentSyncKind_Incremental+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncOptions.hs view
@@ -0,0 +1,64 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SaveOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TextDocumentSyncOptions = TextDocumentSyncOptions + { {-|+ Open and close notifications are sent to the server. If omitted open close notification should not+ be sent.+ -}+ _openClose :: (Maybe Bool)+ , {-|+ Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full+ and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.+ -}+ _change :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind)+ , {-|+ If present will save notifications are sent to the server. If omitted the notification should not be+ sent.+ -}+ _willSave :: (Maybe Bool)+ , {-|+ If present will save wait until requests are sent to the server. If omitted the request should not be+ sent.+ -}+ _willSaveWaitUntil :: (Maybe Bool)+ , {-|+ If present save notifications are sent to the server. If omitted the notification should not be+ sent.+ -}+ _save :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SaveOptions.SaveOptions))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextDocumentSyncOptions)++instance Aeson.ToJSON TextDocumentSyncOptions where+ toJSON (TextDocumentSyncOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["openClose" Language.LSP.Protocol.Types.Common..=? arg0+ ,"change" Language.LSP.Protocol.Types.Common..=? arg1+ ,"willSave" Language.LSP.Protocol.Types.Common..=? arg2+ ,"willSaveWaitUntil" Language.LSP.Protocol.Types.Common..=? arg3+ ,"save" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON TextDocumentSyncOptions where+ parseJSON = Aeson.withObject "TextDocumentSyncOptions" $ \arg -> TextDocumentSyncOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "openClose" <*> arg Language.LSP.Protocol.Types.Common..:!? "change" <*> arg Language.LSP.Protocol.Types.Common..:!? "willSave" <*> arg Language.LSP.Protocol.Types.Common..:!? "willSaveWaitUntil" <*> arg Language.LSP.Protocol.Types.Common..:!? "save"
+ generated/Language/LSP/Protocol/Internal/Types/TextEdit.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A text edit applicable to a text document.+-}+data TextEdit = TextEdit + { {-|+ The range of the text document to be manipulated. To insert+ text into a document create a range where start === end.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The string to be inserted. For delete operations use an+ empty string.+ -}+ _newText :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TextEdit)++instance Aeson.ToJSON TextEdit where+ toJSON (TextEdit arg0 arg1) = Aeson.object $ concat $ [["range" Aeson..= arg0]+ ,["newText" Aeson..= arg1]]++instance Aeson.FromJSON TextEdit where+ parseJSON = Aeson.withObject "TextEdit" $ \arg -> TextEdit <$> arg Aeson..: "range" <*> arg Aeson..: "newText"
+ generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TokenFormat where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data TokenFormat = + {-|++ -}+ TokenFormat_Relative+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TokenFormat)+ deriving Pretty via (ViaJSON TokenFormat)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TokenFormat where+ knownValues = Data.Set.fromList [TokenFormat_Relative]+ type EnumBaseType TokenFormat = Data.Text.Text+ toEnumBaseType TokenFormat_Relative = "relative"+ fromEnumBaseType "relative" = pure TokenFormat_Relative+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TraceValue.hs view
@@ -0,0 +1,58 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TraceValue where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data TraceValue = + {-|+ Turn tracing off.+ -}+ TraceValue_Off+ | {-|+ Trace messages only.+ -}+ TraceValue_Messages+ | {-|+ Verbose message tracing.+ -}+ TraceValue_Verbose+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TraceValue)+ deriving Pretty via (ViaJSON TraceValue)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TraceValue where+ knownValues = Data.Set.fromList [TraceValue_Off+ ,TraceValue_Messages+ ,TraceValue_Verbose]+ type EnumBaseType TraceValue = Data.Text.Text+ toEnumBaseType TraceValue_Off = "off"+ toEnumBaseType TraceValue_Messages = "messages"+ toEnumBaseType TraceValue_Verbose = "verbose"+ fromEnumBaseType "off" = pure TraceValue_Off+ fromEnumBaseType "messages" = pure TraceValue_Messages+ fromEnumBaseType "verbose" = pure TraceValue_Verbose+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionClientCapabilities.hs view
@@ -0,0 +1,46 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Since 3.6.0+-}+data TypeDefinitionClientCapabilities = TypeDefinitionClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `TypeDefinitionRegistrationOptions` return value+ for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ The client supports additional metadata in the form of definition links.++ Since 3.14.0+ -}+ _linkSupport :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeDefinitionClientCapabilities)++instance Aeson.ToJSON TypeDefinitionClientCapabilities where+ toJSON (TypeDefinitionClientCapabilities arg0 arg1) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON TypeDefinitionClientCapabilities where+ parseJSON = Aeson.withObject "TypeDefinitionClientCapabilities" $ \arg -> TypeDefinitionClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionOptions = TypeDefinitionOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeDefinitionOptions)++instance Aeson.ToJSON TypeDefinitionOptions where+ toJSON (TypeDefinitionOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeDefinitionOptions where+ parseJSON = Aeson.withObject "TypeDefinitionOptions" $ \arg -> TypeDefinitionOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionParams.hs view
@@ -0,0 +1,56 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionParams = TypeDefinitionParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeDefinitionParams)++instance Aeson.ToJSON TypeDefinitionParams where+ toJSON (TypeDefinitionParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON TypeDefinitionParams where+ parseJSON = Aeson.withObject "TypeDefinitionParams" $ \arg -> TypeDefinitionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionRegistrationOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionRegistrationOptions = TypeDefinitionRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeDefinitionRegistrationOptions)++instance Aeson.ToJSON TypeDefinitionRegistrationOptions where+ toJSON (TypeDefinitionRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeDefinitionRegistrationOptions where+ parseJSON = Aeson.withObject "TypeDefinitionRegistrationOptions" $ \arg -> TypeDefinitionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyClientCapabilities.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.17.0+-}+data TypeHierarchyClientCapabilities = TypeHierarchyClientCapabilities + { {-|+ Whether implementation supports dynamic registration. If this is set to `true`+ the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+ return value for the corresponding server capability as well.+ -}+ _dynamicRegistration :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchyClientCapabilities)++instance Aeson.ToJSON TypeHierarchyClientCapabilities where+ toJSON (TypeHierarchyClientCapabilities arg0) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeHierarchyClientCapabilities where+ parseJSON = Aeson.withObject "TypeHierarchyClientCapabilities" $ \arg -> TypeHierarchyClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyItem.hs view
@@ -0,0 +1,84 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+@since 3.17.0+-}+data TypeHierarchyItem = TypeHierarchyItem + { {-|+ The name of this item.+ -}+ _name :: Data.Text.Text+ , {-|+ The kind of this item.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this item.+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ More detail for this item, e.g. the signature of a function.+ -}+ _detail :: (Maybe Data.Text.Text)+ , {-|+ The resource identifier of this item.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The range enclosing this symbol not including leading/trailing whitespace+ but everything else, e.g. comments and code.+ -}+ _range :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ The range that should be selected and revealed when this symbol is being+ picked, e.g. the name of a function. Must be contained by the+ `TypeHierarchyItem.range`.+ -}+ _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+ , {-|+ A data entry field that is preserved between a type hierarchy prepare and+ supertypes or subtypes requests. It could also be used to identify the+ type hierarchy in the server, helping improve the performance on+ resolving supertypes and subtypes.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchyItem)++instance Aeson.ToJSON TypeHierarchyItem where+ toJSON (TypeHierarchyItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,["kind" Aeson..= arg1]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+ ,"detail" Language.LSP.Protocol.Types.Common..=? arg3+ ,["uri" Aeson..= arg4]+ ,["range" Aeson..= arg5]+ ,["selectionRange" Aeson..= arg6]+ ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON TypeHierarchyItem where+ parseJSON = Aeson.withObject "TypeHierarchyItem" $ \arg -> TypeHierarchyItem <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "detail" <*> arg Aeson..: "uri" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyOptions.hs view
@@ -0,0 +1,39 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Type hierarchy options used during static registration.++@since 3.17.0+-}+data TypeHierarchyOptions = TypeHierarchyOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchyOptions)++instance Aeson.ToJSON TypeHierarchyOptions where+ toJSON (TypeHierarchyOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeHierarchyOptions where+ parseJSON = Aeson.withObject "TypeHierarchyOptions" $ \arg -> TypeHierarchyOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyPrepareParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `textDocument/prepareTypeHierarchy` request.++@since 3.17.0+-}+data TypeHierarchyPrepareParams = TypeHierarchyPrepareParams + { {-|+ The text document.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The position inside the text document.+ -}+ _position :: Language.LSP.Protocol.Internal.Types.Position.Position+ , {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchyPrepareParams)++instance Aeson.ToJSON TypeHierarchyPrepareParams where+ toJSON (TypeHierarchyPrepareParams arg0 arg1 arg2) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["position" Aeson..= arg1]+ ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeHierarchyPrepareParams where+ parseJSON = Aeson.withObject "TypeHierarchyPrepareParams" $ \arg -> TypeHierarchyPrepareParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyRegistrationOptions.hs view
@@ -0,0 +1,53 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Type hierarchy options used during static or dynamic registration.++@since 3.17.0+-}+data TypeHierarchyRegistrationOptions = TypeHierarchyRegistrationOptions + { {-|+ A document selector to identify the scope of the registration. If set to null+ the document selector provided on the client side will be used.+ -}+ _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The id used to register the request. The id can be used to deregister+ the request again. See also Registration#id.+ -}+ _id :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchyRegistrationOptions)++instance Aeson.ToJSON TypeHierarchyRegistrationOptions where+ toJSON (TypeHierarchyRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $ [["documentSelector" Aeson..= arg0]+ ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+ ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeHierarchyRegistrationOptions where+ parseJSON = Aeson.withObject "TypeHierarchyRegistrationOptions" $ \arg -> TypeHierarchyRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "id"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySubtypesParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `typeHierarchy/subtypes` request.++@since 3.17.0+-}+data TypeHierarchySubtypesParams = TypeHierarchySubtypesParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|++ -}+ _item :: Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchySubtypesParams)++instance Aeson.ToJSON TypeHierarchySubtypesParams where+ toJSON (TypeHierarchySubtypesParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["item" Aeson..= arg2]]++instance Aeson.FromJSON TypeHierarchySubtypesParams where+ parseJSON = Aeson.withObject "TypeHierarchySubtypesParams" $ \arg -> TypeHierarchySubtypesParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySupertypesParams.hs view
@@ -0,0 +1,52 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `typeHierarchy/supertypes` request.++@since 3.17.0+-}+data TypeHierarchySupertypesParams = TypeHierarchySupertypesParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|++ -}+ _item :: Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON TypeHierarchySupertypesParams)++instance Aeson.ToJSON TypeHierarchySupertypesParams where+ toJSON (TypeHierarchySupertypesParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["item" Aeson..= arg2]]++instance Aeson.FromJSON TypeHierarchySupertypesParams where+ parseJSON = Aeson.withObject "TypeHierarchySupertypesParams" $ \arg -> TypeHierarchySupertypesParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/UInitializeParams.hs view
@@ -0,0 +1,104 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UInitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ClientInfo+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TraceValue+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+The initialize parameters+-}+data UInitializeParams = UInitializeParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The process Id of the parent process that started+ the server.++ Is `null` if the process has not been started by another process.+ If the parent process is not alive then the server should exit.+ -}+ _processId :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ Information about the client++ @since 3.15.0+ -}+ _clientInfo :: (Maybe Language.LSP.Protocol.Internal.Types.ClientInfo.ClientInfo)+ , {-|+ The locale the client is currently showing the user interface+ in. This must not necessarily be the locale of the operating+ system.++ Uses IETF language tags as the value's syntax+ (See https://en.wikipedia.org/wiki/IETF_language_tag)++ @since 3.16.0+ -}+ _locale :: (Maybe Data.Text.Text)+ , {-|+ The rootPath of the workspace. Is null+ if no folder is open.++ @deprecated in favour of rootUri.+ -}+ _rootPath :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ , {-|+ The rootUri of the workspace. Is null if no+ folder is open. If both `rootPath` and `rootUri` are set+ `rootUri` wins.++ @deprecated in favour of workspaceFolders.+ -}+ _rootUri :: (Language.LSP.Protocol.Types.Uri.Uri Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ , {-|+ The capabilities provided by the client (editor or tool)+ -}+ _capabilities :: Language.LSP.Protocol.Internal.Types.ClientCapabilities.ClientCapabilities+ , {-|+ User provided initialization options.+ -}+ _initializationOptions :: (Maybe Data.Aeson.Value)+ , {-|+ The initial trace setting. If omitted trace is disabled ('off').+ -}+ _trace :: (Maybe Language.LSP.Protocol.Internal.Types.TraceValue.TraceValue)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON UInitializeParams)++instance Aeson.ToJSON UInitializeParams where+ toJSON (UInitializeParams arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,["processId" Aeson..= arg1]+ ,"clientInfo" Language.LSP.Protocol.Types.Common..=? arg2+ ,"locale" Language.LSP.Protocol.Types.Common..=? arg3+ ,"rootPath" Language.LSP.Protocol.Types.Common..=? arg4+ ,["rootUri" Aeson..= arg5]+ ,["capabilities" Aeson..= arg6]+ ,"initializationOptions" Language.LSP.Protocol.Types.Common..=? arg7+ ,"trace" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON UInitializeParams where+ parseJSON = Aeson.withObject "_InitializeParams" $ \arg -> UInitializeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Aeson..: "processId" <*> arg Language.LSP.Protocol.Types.Common..:!? "clientInfo" <*> arg Language.LSP.Protocol.Types.Common..:!? "locale" <*> arg Language.LSP.Protocol.Types.Common..:!? "rootPath" <*> arg Aeson..: "rootUri" <*> arg Aeson..: "capabilities" <*> arg Language.LSP.Protocol.Types.Common..:!? "initializationOptions" <*> arg Language.LSP.Protocol.Types.Common..:!? "trace"
+ generated/Language/LSP/Protocol/Internal/Types/UnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|+A diagnostic report indicating that the last returned+report is still accurate.++@since 3.17.0+-}+data UnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport + { {-|+ A document diagnostic report indicating+ no changes to the last result. A server can+ only return `unchanged` if result ids are+ provided.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+ , {-|+ A result id which will be sent on the next+ diagnostic request for the same document.+ -}+ _resultId :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON UnchangedDocumentDiagnosticReport)++instance Aeson.ToJSON UnchangedDocumentDiagnosticReport where+ toJSON (UnchangedDocumentDiagnosticReport arg0 arg1) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["resultId" Aeson..= arg1]]++instance Aeson.FromJSON UnchangedDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "UnchangedDocumentDiagnosticReport" $ \arg -> UnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId"
+ generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs view
@@ -0,0 +1,74 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UniquenessLevel where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Moniker uniqueness level to define scope of the moniker.++@since 3.16.0+-}+data UniquenessLevel = + {-|+ The moniker is only unique inside a document+ -}+ UniquenessLevel_Document+ | {-|+ The moniker is unique inside a project for which a dump got created+ -}+ UniquenessLevel_Project+ | {-|+ The moniker is unique inside the group to which a project belongs+ -}+ UniquenessLevel_Group+ | {-|+ The moniker is unique inside the moniker scheme.+ -}+ UniquenessLevel_Scheme+ | {-|+ The moniker is globally unique+ -}+ UniquenessLevel_Global+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum UniquenessLevel)+ deriving Pretty via (ViaJSON UniquenessLevel)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum UniquenessLevel where+ knownValues = Data.Set.fromList [UniquenessLevel_Document+ ,UniquenessLevel_Project+ ,UniquenessLevel_Group+ ,UniquenessLevel_Scheme+ ,UniquenessLevel_Global]+ type EnumBaseType UniquenessLevel = Data.Text.Text+ toEnumBaseType UniquenessLevel_Document = "document"+ toEnumBaseType UniquenessLevel_Project = "project"+ toEnumBaseType UniquenessLevel_Group = "group"+ toEnumBaseType UniquenessLevel_Scheme = "scheme"+ toEnumBaseType UniquenessLevel_Global = "global"+ fromEnumBaseType "document" = pure UniquenessLevel_Document+ fromEnumBaseType "project" = pure UniquenessLevel_Project+ fromEnumBaseType "group" = pure UniquenessLevel_Group+ fromEnumBaseType "scheme" = pure UniquenessLevel_Scheme+ fromEnumBaseType "global" = pure UniquenessLevel_Global+ fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/Unregistration.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Unregistration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+General parameters to unregister a request or notification.+-}+data Unregistration = Unregistration + { {-|+ The id used to unregister the request or notification. Usually an id+ provided during the register request.+ -}+ _id :: Data.Text.Text+ , {-|+ The method to unregister for.+ -}+ _method :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON Unregistration)++instance Aeson.ToJSON Unregistration where+ toJSON (Unregistration arg0 arg1) = Aeson.object $ concat $ [["id" Aeson..= arg0]+ ,["method" Aeson..= arg1]]++instance Aeson.FromJSON Unregistration where+ parseJSON = Aeson.withObject "Unregistration" $ \arg -> Unregistration <$> arg Aeson..: "id" <*> arg Aeson..: "method"
+ generated/Language/LSP/Protocol/Internal/Types/UnregistrationParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UnregistrationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Unregistration+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data UnregistrationParams = UnregistrationParams + { {-|++ -}+ _unregisterations :: [Language.LSP.Protocol.Internal.Types.Unregistration.Unregistration]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON UnregistrationParams)++instance Aeson.ToJSON UnregistrationParams where+ toJSON (UnregistrationParams arg0) = Aeson.object $ concat $ [["unregisterations" Aeson..= arg0]]++instance Aeson.FromJSON UnregistrationParams where+ parseJSON = Aeson.withObject "UnregistrationParams" $ \arg -> UnregistrationParams <$> arg Aeson..: "unregisterations"
+ generated/Language/LSP/Protocol/Internal/Types/VersionedNotebookDocumentIdentifier.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A versioned notebook document identifier.++@since 3.17.0+-}+data VersionedNotebookDocumentIdentifier = VersionedNotebookDocumentIdentifier + { {-|+ The version number of this notebook document.+ -}+ _version :: Language.LSP.Protocol.Types.Common.Int32+ , {-|+ The notebook document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON VersionedNotebookDocumentIdentifier)++instance Aeson.ToJSON VersionedNotebookDocumentIdentifier where+ toJSON (VersionedNotebookDocumentIdentifier arg0 arg1) = Aeson.object $ concat $ [["version" Aeson..= arg0]+ ,["uri" Aeson..= arg1]]++instance Aeson.FromJSON VersionedNotebookDocumentIdentifier where+ parseJSON = Aeson.withObject "VersionedNotebookDocumentIdentifier" $ \arg -> VersionedNotebookDocumentIdentifier <$> arg Aeson..: "version" <*> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/VersionedTextDocumentIdentifier.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A text document identifier to denote a specific version of a text document.+-}+data VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier + { {-|+ The text document's uri.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The version number of this document.+ -}+ _version :: Language.LSP.Protocol.Types.Common.Int32+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON VersionedTextDocumentIdentifier)++instance Aeson.ToJSON VersionedTextDocumentIdentifier where+ toJSON (VersionedTextDocumentIdentifier arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["version" Aeson..= arg1]]++instance Aeson.FromJSON VersionedTextDocumentIdentifier where+ parseJSON = Aeson.withObject "VersionedTextDocumentIdentifier" $ \arg -> VersionedTextDocumentIdentifier <$> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WatchKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data WatchKind = + {-|+ Interested in create events.+ -}+ WatchKind_Create+ | {-|+ Interested in change events+ -}+ WatchKind_Change+ | {-|+ Interested in delete events+ -}+ WatchKind_Delete+ | WatchKind_Custom Language.LSP.Protocol.Types.Common.UInt+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving ( Aeson.ToJSON+ , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum WatchKind)+ deriving Pretty via (ViaJSON WatchKind)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum WatchKind where+ knownValues = Data.Set.fromList [WatchKind_Create+ ,WatchKind_Change+ ,WatchKind_Delete]+ type EnumBaseType WatchKind = Language.LSP.Protocol.Types.Common.UInt+ toEnumBaseType WatchKind_Create = 1+ toEnumBaseType WatchKind_Change = 2+ toEnumBaseType WatchKind_Delete = 4+ toEnumBaseType (WatchKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum WatchKind where+ fromOpenEnumBaseType 1 = WatchKind_Create+ fromOpenEnumBaseType 2 = WatchKind_Change+ fromOpenEnumBaseType 4 = WatchKind_Delete+ fromOpenEnumBaseType arg = WatchKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/WillSaveTextDocumentParams.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a will save text document notification.+-}+data WillSaveTextDocumentParams = WillSaveTextDocumentParams + { {-|+ The document that will be saved.+ -}+ _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+ , {-|+ The 'TextDocumentSaveReason'.+ -}+ _reason :: Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason.TextDocumentSaveReason+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WillSaveTextDocumentParams)++instance Aeson.ToJSON WillSaveTextDocumentParams where+ toJSON (WillSaveTextDocumentParams arg0 arg1) = Aeson.object $ concat $ [["textDocument" Aeson..= arg0]+ ,["reason" Aeson..= arg1]]++instance Aeson.FromJSON WillSaveTextDocumentParams where+ parseJSON = Aeson.withObject "WillSaveTextDocumentParams" $ \arg -> WillSaveTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "reason"
+ generated/Language/LSP/Protocol/Internal/Types/WindowClientCapabilities.hs view
@@ -0,0 +1,61 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WindowClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WindowClientCapabilities = WindowClientCapabilities + { {-|+ It indicates whether the client supports server initiated+ progress using the `window/workDoneProgress/create` request.++ The capability also controls Whether client supports handling+ of progress notifications. If set servers are allowed to report a+ `workDoneProgress` property in the request specific server+ capabilities.++ @since 3.15.0+ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ Capabilities specific to the showMessage request.++ @since 3.16.0+ -}+ _showMessage :: (Maybe Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities.ShowMessageRequestClientCapabilities)+ , {-|+ Capabilities specific to the showDocument request.++ @since 3.16.0+ -}+ _showDocument :: (Maybe Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities.ShowDocumentClientCapabilities)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WindowClientCapabilities)++instance Aeson.ToJSON WindowClientCapabilities where+ toJSON (WindowClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"showMessage" Language.LSP.Protocol.Types.Common..=? arg1+ ,"showDocument" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON WindowClientCapabilities where+ parseJSON = Aeson.withObject "WindowClientCapabilities" $ \arg -> WindowClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "showMessage" <*> arg Language.LSP.Protocol.Types.Common..:!? "showDocument"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressBegin.hs view
@@ -0,0 +1,73 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressBegin = WorkDoneProgressBegin + { {-|++ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "begin")+ , {-|+ Mandatory title of the progress operation. Used to briefly inform about+ the kind of operation being performed.++ Examples: "Indexing" or "Linking dependencies".+ -}+ _title :: Data.Text.Text+ , {-|+ Controls if a cancel button should show to allow the user to cancel the+ long running operation. Clients that don't support cancellation are allowed+ to ignore the setting.+ -}+ _cancellable :: (Maybe Bool)+ , {-|+ Optional, more detailed associated progress message. Contains+ complementary information to the `title`.++ Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".+ If unset, the previous progress message (if any) is still valid.+ -}+ _message :: (Maybe Data.Text.Text)+ , {-|+ Optional progress percentage to display (value 100 is considered 100%).+ If not provided infinite progress is assumed and clients are allowed+ to ignore the `percentage` value in subsequent in report notifications.++ The value should be steadily rising. Clients are free to ignore values+ that are not following this rule. The value range is [0, 100].+ -}+ _percentage :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressBegin)++instance Aeson.ToJSON WorkDoneProgressBegin where+ toJSON (WorkDoneProgressBegin arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["title" Aeson..= arg1]+ ,"cancellable" Language.LSP.Protocol.Types.Common..=? arg2+ ,"message" Language.LSP.Protocol.Types.Common..=? arg3+ ,"percentage" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON WorkDoneProgressBegin where+ parseJSON = Aeson.withObject "WorkDoneProgressBegin" $ \arg -> WorkDoneProgressBegin <$> arg Aeson..: "kind" <*> arg Aeson..: "title" <*> arg Language.LSP.Protocol.Types.Common..:!? "cancellable" <*> arg Language.LSP.Protocol.Types.Common..:!? "message" <*> arg Language.LSP.Protocol.Types.Common..:!? "percentage"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCancelParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressCancelParams = WorkDoneProgressCancelParams + { {-|+ The token to be used to report progress.+ -}+ _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressCancelParams)++instance Aeson.ToJSON WorkDoneProgressCancelParams where+ toJSON (WorkDoneProgressCancelParams arg0) = Aeson.object $ concat $ [["token" Aeson..= arg0]]++instance Aeson.FromJSON WorkDoneProgressCancelParams where+ parseJSON = Aeson.withObject "WorkDoneProgressCancelParams" $ \arg -> WorkDoneProgressCancelParams <$> arg Aeson..: "token"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCreateParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressCreateParams = WorkDoneProgressCreateParams + { {-|+ The token to be used to report progress.+ -}+ _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressCreateParams)++instance Aeson.ToJSON WorkDoneProgressCreateParams where+ toJSON (WorkDoneProgressCreateParams arg0) = Aeson.object $ concat $ [["token" Aeson..= arg0]]++instance Aeson.FromJSON WorkDoneProgressCreateParams where+ parseJSON = Aeson.withObject "WorkDoneProgressCreateParams" $ \arg -> WorkDoneProgressCreateParams <$> arg Aeson..: "token"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressEnd.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressEnd = WorkDoneProgressEnd + { {-|++ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "end")+ , {-|+ Optional, a final message indicating to for example indicate the outcome+ of the operation.+ -}+ _message :: (Maybe Data.Text.Text)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressEnd)++instance Aeson.ToJSON WorkDoneProgressEnd where+ toJSON (WorkDoneProgressEnd arg0 arg1) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"message" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkDoneProgressEnd where+ parseJSON = Aeson.withObject "WorkDoneProgressEnd" $ \arg -> WorkDoneProgressEnd <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "message"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressOptions.hs view
@@ -0,0 +1,37 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressOptions = WorkDoneProgressOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressOptions)++instance Aeson.ToJSON WorkDoneProgressOptions where+ toJSON (WorkDoneProgressOptions arg0) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkDoneProgressOptions where+ parseJSON = Aeson.withObject "WorkDoneProgressOptions" $ \arg -> WorkDoneProgressOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressParams.hs view
@@ -0,0 +1,38 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressParams = WorkDoneProgressParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressParams)++instance Aeson.ToJSON WorkDoneProgressParams where+ toJSON (WorkDoneProgressParams arg0) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkDoneProgressParams where+ parseJSON = Aeson.withObject "WorkDoneProgressParams" $ \arg -> WorkDoneProgressParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressReport.hs view
@@ -0,0 +1,66 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressReport = WorkDoneProgressReport + { {-|++ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "report")+ , {-|+ Controls enablement state of a cancel button.++ Clients that don't support cancellation or don't support controlling the button's+ enablement state are allowed to ignore the property.+ -}+ _cancellable :: (Maybe Bool)+ , {-|+ Optional, more detailed associated progress message. Contains+ complementary information to the `title`.++ Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".+ If unset, the previous progress message (if any) is still valid.+ -}+ _message :: (Maybe Data.Text.Text)+ , {-|+ Optional progress percentage to display (value 100 is considered 100%).+ If not provided infinite progress is assumed and clients are allowed+ to ignore the `percentage` value in subsequent in report notifications.++ The value should be steadily rising. Clients are free to ignore values+ that are not following this rule. The value range is [0, 100]+ -}+ _percentage :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkDoneProgressReport)++instance Aeson.ToJSON WorkDoneProgressReport where+ toJSON (WorkDoneProgressReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"cancellable" Language.LSP.Protocol.Types.Common..=? arg1+ ,"message" Language.LSP.Protocol.Types.Common..=? arg2+ ,"percentage" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON WorkDoneProgressReport where+ parseJSON = Aeson.withObject "WorkDoneProgressReport" $ \arg -> WorkDoneProgressReport <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "cancellable" <*> arg Language.LSP.Protocol.Types.Common..:!? "message" <*> arg Language.LSP.Protocol.Types.Common..:!? "percentage"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceClientCapabilities.hs view
@@ -0,0 +1,136 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Workspace specific client capabilities.+-}+data WorkspaceClientCapabilities = WorkspaceClientCapabilities + { {-|+ The client supports applying batch edits+ to the workspace by supporting the request+ 'workspace/applyEdit'+ -}+ _applyEdit :: (Maybe Bool)+ , {-|+ Capabilities specific to `WorkspaceEdit`s.+ -}+ _workspaceEdit :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities.WorkspaceEditClientCapabilities)+ , {-|+ Capabilities specific to the `workspace/didChangeConfiguration` notification.+ -}+ _didChangeConfiguration :: (Maybe Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities.DidChangeConfigurationClientCapabilities)+ , {-|+ Capabilities specific to the `workspace/didChangeWatchedFiles` notification.+ -}+ _didChangeWatchedFiles :: (Maybe Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities.DidChangeWatchedFilesClientCapabilities)+ , {-|+ Capabilities specific to the `workspace/symbol` request.+ -}+ _symbol :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities.WorkspaceSymbolClientCapabilities)+ , {-|+ Capabilities specific to the `workspace/executeCommand` request.+ -}+ _executeCommand :: (Maybe Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities.ExecuteCommandClientCapabilities)+ , {-|+ The client has support for workspace folders.++ @since 3.6.0+ -}+ _workspaceFolders :: (Maybe Bool)+ , {-|+ The client supports `workspace/configuration` requests.++ @since 3.6.0+ -}+ _configuration :: (Maybe Bool)+ , {-|+ Capabilities specific to the semantic token requests scoped to the+ workspace.++ @since 3.16.0.+ -}+ _semanticTokens :: (Maybe Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities.SemanticTokensWorkspaceClientCapabilities)+ , {-|+ Capabilities specific to the code lens requests scoped to the+ workspace.++ @since 3.16.0.+ -}+ _codeLens :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities.CodeLensWorkspaceClientCapabilities)+ , {-|+ The client has support for file notifications/requests for user operations on files.++ Since 3.16.0+ -}+ _fileOperations :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities.FileOperationClientCapabilities)+ , {-|+ Capabilities specific to the inline values requests scoped to the+ workspace.++ @since 3.17.0.+ -}+ _inlineValue :: (Maybe Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities.InlineValueWorkspaceClientCapabilities)+ , {-|+ Capabilities specific to the inlay hint requests scoped to the+ workspace.++ @since 3.17.0.+ -}+ _inlayHint :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities.InlayHintWorkspaceClientCapabilities)+ , {-|+ Capabilities specific to the diagnostic requests scoped to the+ workspace.++ @since 3.17.0.+ -}+ _diagnostics :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities.DiagnosticWorkspaceClientCapabilities)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceClientCapabilities)++instance Aeson.ToJSON WorkspaceClientCapabilities where+ toJSON (WorkspaceClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13) = Aeson.object $ concat $ ["applyEdit" Language.LSP.Protocol.Types.Common..=? arg0+ ,"workspaceEdit" Language.LSP.Protocol.Types.Common..=? arg1+ ,"didChangeConfiguration" Language.LSP.Protocol.Types.Common..=? arg2+ ,"didChangeWatchedFiles" Language.LSP.Protocol.Types.Common..=? arg3+ ,"symbol" Language.LSP.Protocol.Types.Common..=? arg4+ ,"executeCommand" Language.LSP.Protocol.Types.Common..=? arg5+ ,"workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg6+ ,"configuration" Language.LSP.Protocol.Types.Common..=? arg7+ ,"semanticTokens" Language.LSP.Protocol.Types.Common..=? arg8+ ,"codeLens" Language.LSP.Protocol.Types.Common..=? arg9+ ,"fileOperations" Language.LSP.Protocol.Types.Common..=? arg10+ ,"inlineValue" Language.LSP.Protocol.Types.Common..=? arg11+ ,"inlayHint" Language.LSP.Protocol.Types.Common..=? arg12+ ,"diagnostics" Language.LSP.Protocol.Types.Common..=? arg13]++instance Aeson.FromJSON WorkspaceClientCapabilities where+ parseJSON = Aeson.withObject "WorkspaceClientCapabilities" $ \arg -> WorkspaceClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "applyEdit" <*> arg Language.LSP.Protocol.Types.Common..:!? "workspaceEdit" <*> arg Language.LSP.Protocol.Types.Common..:!? "didChangeConfiguration" <*> arg Language.LSP.Protocol.Types.Common..:!? "didChangeWatchedFiles" <*> arg Language.LSP.Protocol.Types.Common..:!? "symbol" <*> arg Language.LSP.Protocol.Types.Common..:!? "executeCommand" <*> arg Language.LSP.Protocol.Types.Common..:!? "workspaceFolders" <*> arg Language.LSP.Protocol.Types.Common..:!? "configuration" <*> arg Language.LSP.Protocol.Types.Common..:!? "semanticTokens" <*> arg Language.LSP.Protocol.Types.Common..:!? "codeLens" <*> arg Language.LSP.Protocol.Types.Common..:!? "fileOperations" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlineValue" <*> arg Language.LSP.Protocol.Types.Common..:!? "inlayHint" <*> arg Language.LSP.Protocol.Types.Common..:!? "diagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticParams.hs view
@@ -0,0 +1,59 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.PreviousResultId+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters of the workspace diagnostic request.++@since 3.17.0+-}+data WorkspaceDiagnosticParams = WorkspaceDiagnosticParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ The additional identifier provided during registration.+ -}+ _identifier :: (Maybe Data.Text.Text)+ , {-|+ The currently known diagnostic reports with their+ previous result ids.+ -}+ _previousResultIds :: [Language.LSP.Protocol.Internal.Types.PreviousResultId.PreviousResultId]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceDiagnosticParams)++instance Aeson.ToJSON WorkspaceDiagnosticParams where+ toJSON (WorkspaceDiagnosticParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,"identifier" Language.LSP.Protocol.Types.Common..=? arg2+ ,["previousResultIds" Aeson..= arg3]]++instance Aeson.FromJSON WorkspaceDiagnosticParams where+ parseJSON = Aeson.withObject "WorkspaceDiagnosticParams" $ \arg -> WorkspaceDiagnosticParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "identifier" <*> arg Aeson..: "previousResultIds"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReport.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A workspace diagnostic report.++@since 3.17.0+-}+data WorkspaceDiagnosticReport = WorkspaceDiagnosticReport + { {-|++ -}+ _items :: [Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport.WorkspaceDocumentDiagnosticReport]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceDiagnosticReport)++instance Aeson.ToJSON WorkspaceDiagnosticReport where+ toJSON (WorkspaceDiagnosticReport arg0) = Aeson.object $ concat $ [["items" Aeson..= arg0]]++instance Aeson.FromJSON WorkspaceDiagnosticReport where+ parseJSON = Aeson.withObject "WorkspaceDiagnosticReport" $ \arg -> WorkspaceDiagnosticReport <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReportPartialResult.hs view
@@ -0,0 +1,40 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A partial result for a workspace diagnostic report.++@since 3.17.0+-}+data WorkspaceDiagnosticReportPartialResult = WorkspaceDiagnosticReportPartialResult + { {-|++ -}+ _items :: [Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport.WorkspaceDocumentDiagnosticReport]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceDiagnosticReportPartialResult)++instance Aeson.ToJSON WorkspaceDiagnosticReportPartialResult where+ toJSON (WorkspaceDiagnosticReportPartialResult arg0) = Aeson.object $ concat $ [["items" Aeson..= arg0]]++instance Aeson.FromJSON WorkspaceDiagnosticReportPartialResult where+ parseJSON = Aeson.withObject "WorkspaceDiagnosticReportPartialResult" $ \arg -> WorkspaceDiagnosticReportPartialResult <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDocumentDiagnosticReport.hs view
@@ -0,0 +1,31 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A workspace diagnostic document report.++@since 3.17.0+-}+newtype WorkspaceDocumentDiagnosticReport = WorkspaceDocumentDiagnosticReport (Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport.WorkspaceFullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport.WorkspaceUnchangedDocumentDiagnosticReport)+ deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceDocumentDiagnosticReport)
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceEdit.hs view
@@ -0,0 +1,81 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotation+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.CreateFile+import qualified Language.LSP.Protocol.Internal.Types.DeleteFile+import qualified Language.LSP.Protocol.Internal.Types.RenameFile+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentEdit+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A workspace edit represents changes to many resources managed in the workspace. The edit+should either provide `changes` or `documentChanges`. If documentChanges are present+they are preferred over `changes` if the client can handle versioned document edits.++Since version 3.13.0 a workspace edit can contain resource operations as well. If resource+operations are present clients need to execute the operations in the order in which they+are provided. So a workspace edit for example can consist of the following two changes:+(1) a create file a.txt and (2) a text document edit which insert text into file a.txt.++An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will+cause failure of the operation. How the client recovers from the failure is described by+the client capability: `workspace.workspaceEdit.failureHandling`+-}+data WorkspaceEdit = WorkspaceEdit + { {-|+ Holds changes to existing resources.+ -}+ _changes :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit]))+ , {-|+ Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes+ are either an array of `TextDocumentEdit`s to express changes to n different text documents+ where each text document edit addresses a specific version of a text document. Or it can contain+ above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.++ Whether a client supports versioned document edits is expressed via+ `workspace.workspaceEdit.documentChanges` client capability.++ If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then+ only plain `TextEdit`s using the `changes` property are supported.+ -}+ _documentChanges :: (Maybe [(Language.LSP.Protocol.Internal.Types.TextDocumentEdit.TextDocumentEdit Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CreateFile.CreateFile Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.RenameFile.RenameFile Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DeleteFile.DeleteFile)))])+ , {-|+ A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and+ delete file / folder operations.++ Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.++ @since 3.16.0+ -}+ _changeAnnotations :: (Maybe (Data.Map.Map Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier Language.LSP.Protocol.Internal.Types.ChangeAnnotation.ChangeAnnotation))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceEdit)++instance Aeson.ToJSON WorkspaceEdit where+ toJSON (WorkspaceEdit arg0 arg1 arg2) = Aeson.object $ concat $ ["changes" Language.LSP.Protocol.Types.Common..=? arg0+ ,"documentChanges" Language.LSP.Protocol.Types.Common..=? arg1+ ,"changeAnnotations" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON WorkspaceEdit where+ parseJSON = Aeson.withObject "WorkspaceEdit" $ \arg -> WorkspaceEdit <$> arg Language.LSP.Protocol.Types.Common..:!? "changes" <*> arg Language.LSP.Protocol.Types.Common..:!? "documentChanges" <*> arg Language.LSP.Protocol.Types.Common..:!? "changeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceEditClientCapabilities.hs view
@@ -0,0 +1,75 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions+import qualified Language.LSP.Protocol.Internal.Types.FailureHandlingKind+import qualified Language.LSP.Protocol.Internal.Types.ResourceOperationKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceEditClientCapabilities = WorkspaceEditClientCapabilities + { {-|+ The client supports versioned document changes in `WorkspaceEdit`s+ -}+ _documentChanges :: (Maybe Bool)+ , {-|+ The resource operations the client supports. Clients should at least+ support 'create', 'rename' and 'delete' files and folders.++ @since 3.13.0+ -}+ _resourceOperations :: (Maybe [Language.LSP.Protocol.Internal.Types.ResourceOperationKind.ResourceOperationKind])+ , {-|+ The failure handling strategy of a client if applying the workspace edit+ fails.++ @since 3.13.0+ -}+ _failureHandling :: (Maybe Language.LSP.Protocol.Internal.Types.FailureHandlingKind.FailureHandlingKind)+ , {-|+ Whether the client normalizes line endings to the client specific+ setting.+ If set to `true` the client will normalize line ending characters+ in a workspace edit to the client-specified new line+ character.++ @since 3.16.0+ -}+ _normalizesLineEndings :: (Maybe Bool)+ , {-|+ Whether the client in general supports change annotations on text edits,+ create file, rename file and delete file changes.++ @since 3.16.0+ -}+ _changeAnnotationSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions.ChangeAnnotationsSupportOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceEditClientCapabilities)++instance Aeson.ToJSON WorkspaceEditClientCapabilities where+ toJSON (WorkspaceEditClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ ["documentChanges" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resourceOperations" Language.LSP.Protocol.Types.Common..=? arg1+ ,"failureHandling" Language.LSP.Protocol.Types.Common..=? arg2+ ,"normalizesLineEndings" Language.LSP.Protocol.Types.Common..=? arg3+ ,"changeAnnotationSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON WorkspaceEditClientCapabilities where+ parseJSON = Aeson.withObject "WorkspaceEditClientCapabilities" $ \arg -> WorkspaceEditClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "documentChanges" <*> arg Language.LSP.Protocol.Types.Common..:!? "resourceOperations" <*> arg Language.LSP.Protocol.Types.Common..:!? "failureHandling" <*> arg Language.LSP.Protocol.Types.Common..:!? "normalizesLineEndings" <*> arg Language.LSP.Protocol.Types.Common..:!? "changeAnnotationSupport"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFolder.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFolder where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A workspace folder inside a client.+-}+data WorkspaceFolder = WorkspaceFolder + { {-|+ The associated URI for this workspace folder.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The name of the workspace folder. Used to refer to this+ workspace folder in the user interface.+ -}+ _name :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceFolder)++instance Aeson.ToJSON WorkspaceFolder where+ toJSON (WorkspaceFolder arg0 arg1) = Aeson.object $ concat $ [["uri" Aeson..= arg0]+ ,["name" Aeson..= arg1]]++instance Aeson.FromJSON WorkspaceFolder where+ parseJSON = Aeson.withObject "WorkspaceFolder" $ \arg -> WorkspaceFolder <$> arg Aeson..: "uri" <*> arg Aeson..: "name"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersChangeEvent.hs view
@@ -0,0 +1,43 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common++{-|+The workspace folder change event.+-}+data WorkspaceFoldersChangeEvent = WorkspaceFoldersChangeEvent + { {-|+ The array of added workspace folders+ -}+ _added :: [Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder]+ , {-|+ The array of the removed workspace folders+ -}+ _removed :: [Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder]+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceFoldersChangeEvent)++instance Aeson.ToJSON WorkspaceFoldersChangeEvent where+ toJSON (WorkspaceFoldersChangeEvent arg0 arg1) = Aeson.object $ concat $ [["added" Aeson..= arg0]+ ,["removed" Aeson..= arg1]]++instance Aeson.FromJSON WorkspaceFoldersChangeEvent where+ parseJSON = Aeson.withObject "WorkspaceFoldersChangeEvent" $ \arg -> WorkspaceFoldersChangeEvent <$> arg Aeson..: "added" <*> arg Aeson..: "removed"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersInitializeParams.hs view
@@ -0,0 +1,44 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceFoldersInitializeParams = WorkspaceFoldersInitializeParams + { {-|+ The workspace folders configured in the client when the server starts.++ This property is only available if the client supports workspace folders.+ It can be `null` if the client supports workspace folders but none are+ configured.++ @since 3.6.0+ -}+ _workspaceFolders :: (Maybe ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceFoldersInitializeParams)++instance Aeson.ToJSON WorkspaceFoldersInitializeParams where+ toJSON (WorkspaceFoldersInitializeParams arg0) = Aeson.object $ concat $ ["workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkspaceFoldersInitializeParams where+ parseJSON = Aeson.withObject "WorkspaceFoldersInitializeParams" $ \arg -> WorkspaceFoldersInitializeParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workspaceFolders"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersServerCapabilities.hs view
@@ -0,0 +1,49 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceFoldersServerCapabilities = WorkspaceFoldersServerCapabilities + { {-|+ The server has support for workspace folders+ -}+ _supported :: (Maybe Bool)+ , {-|+ Whether the server wants to receive workspace folder+ change notifications.++ If a string is provided the string is treated as an ID+ under which the notification is registered on the client+ side. The ID can be used to unregister for these events+ using the `client/unregisterCapability` request.+ -}+ _changeNotifications :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Bool))+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceFoldersServerCapabilities)++instance Aeson.ToJSON WorkspaceFoldersServerCapabilities where+ toJSON (WorkspaceFoldersServerCapabilities arg0 arg1) = Aeson.object $ concat $ ["supported" Language.LSP.Protocol.Types.Common..=? arg0+ ,"changeNotifications" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceFoldersServerCapabilities where+ parseJSON = Aeson.withObject "WorkspaceFoldersServerCapabilities" $ \arg -> WorkspaceFoldersServerCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "supported" <*> arg Language.LSP.Protocol.Types.Common..:!? "changeNotifications"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFullDocumentDiagnosticReport.hs view
@@ -0,0 +1,66 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+A full document diagnostic report for a workspace diagnostic result.++@since 3.17.0+-}+data WorkspaceFullDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport + { {-|+ A full document diagnostic report.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+ , {-|+ An optional result id. If provided it will+ be sent on the next diagnostic request for the+ same document.+ -}+ _resultId :: (Maybe Data.Text.Text)+ , {-|+ The actual items.+ -}+ _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+ , {-|+ The URI for which diagnostic information is reported.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The version number for which the diagnostics are reported.+ If the document is not marked as open `null` can be provided.+ -}+ _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceFullDocumentDiagnosticReport)++instance Aeson.ToJSON WorkspaceFullDocumentDiagnosticReport where+ toJSON (WorkspaceFullDocumentDiagnosticReport arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+ ,["items" Aeson..= arg2]+ ,["uri" Aeson..= arg3]+ ,["version" Aeson..= arg4]]++instance Aeson.FromJSON WorkspaceFullDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "WorkspaceFullDocumentDiagnosticReport" $ \arg -> WorkspaceFullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "resultId" <*> arg Aeson..: "items" <*> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceOptions.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileOperationOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Defines workspace specific capabilities of the server.++@since 3.18.0+@proposed+-}+data WorkspaceOptions = WorkspaceOptions + { {-|+ The server supports workspace folder.++ @since 3.6.0+ -}+ _workspaceFolders :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities.WorkspaceFoldersServerCapabilities)+ , {-|+ The server is interested in notifications/requests for operations on files.++ @since 3.16.0+ -}+ _fileOperations :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationOptions.FileOperationOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceOptions)++instance Aeson.ToJSON WorkspaceOptions where+ toJSON (WorkspaceOptions arg0 arg1) = Aeson.object $ concat $ ["workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg0+ ,"fileOperations" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceOptions where+ parseJSON = Aeson.withObject "WorkspaceOptions" $ \arg -> WorkspaceOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workspaceFolders" <*> arg Language.LSP.Protocol.Types.Common..:!? "fileOperations"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbol.hs view
@@ -0,0 +1,82 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbol where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.LocationUriOnly+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+A special workspace symbol that supports locations without a range.++See also SymbolInformation.++@since 3.17.0+-}+data WorkspaceSymbol = WorkspaceSymbol + { {-|+ The name of this symbol.+ -}+ _name :: Data.Text.Text+ , {-|+ The kind of this symbol.+ -}+ _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+ , {-|+ Tags for this symbol.++ @since 3.16.0+ -}+ _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+ , {-|+ The name of the symbol containing this symbol. This information is for+ user interface purposes (e.g. to render a qualifier in the user interface+ if necessary). It can't be used to re-infer a hierarchy for the document+ symbols.+ -}+ _containerName :: (Maybe Data.Text.Text)+ , {-|+ The location of the symbol. Whether a server is allowed to+ return a location without a range depends on the client+ capability `workspace.symbol.resolveSupport`.++ See SymbolInformation#location for more details.+ -}+ _location :: (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.LocationUriOnly.LocationUriOnly)+ , {-|+ A data entry field that is preserved on a workspace symbol between a+ workspace symbol request and a workspace symbol resolve request.+ -}+ _data_ :: (Maybe Data.Aeson.Value)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceSymbol)++instance Aeson.ToJSON WorkspaceSymbol where+ toJSON (WorkspaceSymbol arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $ [["name" Aeson..= arg0]+ ,["kind" Aeson..= arg1]+ ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+ ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3+ ,["location" Aeson..= arg4]+ ,"data" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON WorkspaceSymbol where+ parseJSON = Aeson.withObject "WorkspaceSymbol" $ \arg -> WorkspaceSymbol <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tags" <*> arg Language.LSP.Protocol.Types.Common..:!? "containerName" <*> arg Aeson..: "location" <*> arg Language.LSP.Protocol.Types.Common..:!? "data"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolClientCapabilities.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions+import qualified Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolClientCapabilities = WorkspaceSymbolClientCapabilities + { {-|+ Symbol request supports dynamic registration.+ -}+ _dynamicRegistration :: (Maybe Bool)+ , {-|+ Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.+ -}+ _symbolKind :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions.ClientSymbolKindOptions)+ , {-|+ The client supports tags on `SymbolInformation`.+ Clients supporting tags have to handle unknown tags gracefully.++ @since 3.16.0+ -}+ _tagSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions.ClientSymbolTagOptions)+ , {-|+ The client support partial workspace symbols. The client will send the+ request `workspaceSymbol/resolve` to the server to resolve additional+ properties.++ @since 3.17.0+ -}+ _resolveSupport :: (Maybe Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions.ClientSymbolResolveOptions)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceSymbolClientCapabilities)++instance Aeson.ToJSON WorkspaceSymbolClientCapabilities where+ toJSON (WorkspaceSymbolClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $ ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+ ,"symbolKind" Language.LSP.Protocol.Types.Common..=? arg1+ ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg2+ ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON WorkspaceSymbolClientCapabilities where+ parseJSON = Aeson.withObject "WorkspaceSymbolClientCapabilities" $ \arg -> WorkspaceSymbolClientCapabilities <$> arg Language.LSP.Protocol.Types.Common..:!? "dynamicRegistration" <*> arg Language.LSP.Protocol.Types.Common..:!? "symbolKind" <*> arg Language.LSP.Protocol.Types.Common..:!? "tagSupport" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveSupport"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolOptions.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Server capabilities for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolOptions = WorkspaceSymbolOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The server provides support to resolve additional+ information for a workspace symbol.++ @since 3.17.0+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceSymbolOptions)++instance Aeson.ToJSON WorkspaceSymbolOptions where+ toJSON (WorkspaceSymbolOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceSymbolOptions where+ parseJSON = Aeson.withObject "WorkspaceSymbolOptions" $ \arg -> WorkspaceSymbolOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolParams.hs view
@@ -0,0 +1,51 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolParams = WorkspaceSymbolParams + { {-|+ An optional token that a server can use to report work done progress.+ -}+ _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ An optional token that a server can use to report partial results (e.g. streaming) to+ the client.+ -}+ _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+ , {-|+ A query string to filter symbols by. Clients may send an empty+ string here to request all symbols.+ -}+ _query :: Data.Text.Text+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceSymbolParams)++instance Aeson.ToJSON WorkspaceSymbolParams where+ toJSON (WorkspaceSymbolParams arg0 arg1 arg2) = Aeson.object $ concat $ ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+ ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+ ,["query" Aeson..= arg2]]++instance Aeson.FromJSON WorkspaceSymbolParams where+ parseJSON = Aeson.withObject "WorkspaceSymbolParams" $ \arg -> WorkspaceSymbolParams <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneToken" <*> arg Language.LSP.Protocol.Types.Common..:!? "partialResultToken" <*> arg Aeson..: "query"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolRegistrationOptions.hs view
@@ -0,0 +1,45 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolRegistrationOptions = WorkspaceSymbolRegistrationOptions + { {-|++ -}+ _workDoneProgress :: (Maybe Bool)+ , {-|+ The server provides support to resolve additional+ information for a workspace symbol.++ @since 3.17.0+ -}+ _resolveProvider :: (Maybe Bool)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceSymbolRegistrationOptions)++instance Aeson.ToJSON WorkspaceSymbolRegistrationOptions where+ toJSON (WorkspaceSymbolRegistrationOptions arg0 arg1) = Aeson.object $ concat $ ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+ ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceSymbolRegistrationOptions where+ parseJSON = Aeson.withObject "WorkspaceSymbolRegistrationOptions" $ \arg -> WorkspaceSymbolRegistrationOptions <$> arg Language.LSP.Protocol.Types.Common..:!? "workDoneProgress" <*> arg Language.LSP.Protocol.Types.Common..:!? "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceUnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,62 @@+{- ORMOLU_DISABLE -}+{- HLINT ignore -}+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+An unchanged document diagnostic report for a workspace diagnostic result.++@since 3.17.0+-}+data WorkspaceUnchangedDocumentDiagnosticReport = WorkspaceUnchangedDocumentDiagnosticReport + { {-|+ A document diagnostic report indicating+ no changes to the last result. A server can+ only return `unchanged` if result ids are+ provided.+ -}+ _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+ , {-|+ A result id which will be sent on the next+ diagnostic request for the same document.+ -}+ _resultId :: Data.Text.Text+ , {-|+ The URI for which diagnostic information is reported.+ -}+ _uri :: Language.LSP.Protocol.Types.Uri.Uri+ , {-|+ The version number for which the diagnostics are reported.+ If the document is not marked as open `null` can be provided.+ -}+ _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+ }+ deriving stock (Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving Pretty via (ViaJSON WorkspaceUnchangedDocumentDiagnosticReport)++instance Aeson.ToJSON WorkspaceUnchangedDocumentDiagnosticReport where+ toJSON (WorkspaceUnchangedDocumentDiagnosticReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $ [["kind" Aeson..= arg0]+ ,["resultId" Aeson..= arg1]+ ,["uri" Aeson..= arg2]+ ,["version" Aeson..= arg3]]++instance Aeson.FromJSON WorkspaceUnchangedDocumentDiagnosticReport where+ parseJSON = Aeson.withObject "WorkspaceUnchangedDocumentDiagnosticReport" $ \arg -> WorkspaceUnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId" <*> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generator/CodeGen.hs view
@@ -0,0 +1,1128 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ViewPatterns #-}++{- | The main module for generating code from the metamodel++See Note [Code generation approach] for why we do it this way.+-}+module CodeGen where++import Control.Monad+import Control.Monad.Reader+import Control.Monad.Writer+import Data.Foldable+import Data.Function+import Data.List (intersperse, sort)+import Data.List.NonEmpty qualified as NE+import Data.Map qualified as Map+import Data.Maybe (catMaybes, fromMaybe, mapMaybe, maybeToList)+import Data.Set qualified as Set+import Data.Text qualified as T+import Data.Text.IO qualified as T+import Data.Traversable+import Language.LSP.MetaModel as MM+import Prettyprinter+import System.Directory+import System.FilePath+import Text.RE.Replace qualified as RE+import Text.RE.TDFA.Text qualified as RE+import Witherable (forMaybe)++-- | A mapping from names in the metamodel to their names in the generated Haskell.+type SymbolTable = Map.Map T.Text T.Text++{- | A mapping from names in the metamodel to their structure definition, used for chasing+ supertypes.+-}+type StructTable = Map.Map T.Text Structure++data TypeMeta = TypeMeta {isProposed :: Bool}+type MetaTable = Map.Map T.Text TypeMeta++data CodeGenEnv = CodeGenEnv+ { symbolTable :: SymbolTable+ , structTable :: StructTable+ , metaTable :: MetaTable+ , modulePrefix :: T.Text+ , outputDir :: FilePath+ }++-- | Monad for running overall code generation in, has access to the environment and settings.+type CodeGenM = ReaderT CodeGenEnv IO++-- | Monad for running module generation in, the same as 'CodeGenM' with the ability to record imports.+type ModuleGenM = WriterT (Set.Set T.Text) CodeGenM++typesModSegment :: T.Text+typesModSegment = "Types"++pragma :: T.Text -> Doc ann -> Doc ann+pragma kind doc = "{-#" <+> pretty kind <+> doc <+> "#-}"++-- comment out Generic for a faster build...+toStockDerive :: [T.Text]+toStockDerive = ["Show", "Eq", "Ord", "Generic"]++toAnyclassDerive :: [T.Text]+toAnyclassDerive = ["NFData", "Hashable"]++indentSize :: Int+indentSize = 2++optDeprecated :: T.Text -> Maybe T.Text -> [Doc ann]+optDeprecated name mreason = case mreason of+ Just reason -> ["{-# DEPRECATED" <+> pretty name <+> dquotes (pretty reason) <+> "#-}"]+ Nothing -> []++-- TODO: since and proposed are a mess, figure out whether there's a useful way to include them+mkDocumentation :: Maybe T.Text -> Maybe T.Text -> Maybe Bool -> ModuleGenM (Maybe T.Text)+mkDocumentation (Just doc) _since proposed = Just <$> fixupDocumentation doc+mkDocumentation Nothing _since proposed = pure Nothing++fixupDocumentation :: T.Text -> ModuleGenM T.Text+fixupDocumentation t = do+ -- TODO: use the symbol table to map these to the actual entity names+ let+ fixupJSDocLinks t = RE.replaceAll "`$1`" (t RE.*=~ [RE.re|{@link[[:space:]]+$([[:word:].]+).*}|])+ fixupMarkdownLinks t = RE.replaceAll "`$1`" $ t RE.*=~ [RE.re|\[[[:word:].]+\][[:space:]]*\(#$([[:word:].]+)\)|]+ let t' = fixupJSDocLinks t+ let t'' = fixupMarkdownLinks t'+ pure t''++multilineHaddock :: Doc ann -> Doc ann+multilineHaddock doc = vsep ["{-|", doc, "-}"]++genModule :: forall ann. T.Text -> [T.Text] -> Maybe [T.Text] -> ModuleGenM (Doc ann) -> CodeGenM T.Text+genModule name pragmas mexports action = do+ (doc, imports) <- runWriterT action+ mp <- asks modulePrefix+ dir <- asks outputDir+ let+ -- these are both common in the generated code+ ghcOptions :: [T.Text] = ["-Wno-unused-imports", "-Wno-unused-matches", "-Wno-deprecations"]+ fullModName = mp <> "." <> name+ ignoreComments = ["{- ORMOLU_DISABLE -}", "{- HLINT ignore -}"]+ warning = "-- THIS IS A GENERATED FILE, DO NOT EDIT"+ pragmaSection = hardvcat (fmap (\p -> "{-#" <+> "LANGUAGE" <+> pretty p <+> "#-}") pragmas)+ optionsSection = hardvcat (fmap (\p -> "{-#" <+> "OPTIONS_GHC" <+> pretty p <+> "#-}") ghcOptions)+ header = case mexports of+ Just exports -> "module" <+> pretty fullModName <+> parens (cat $ punctuate "," (fmap pretty exports)) <+> "where"+ Nothing -> "module" <+> pretty fullModName <+> "where"+ -- TODO: replace with regex+ isSelfImport imp = (" " <> fullModName <> " ") `T.isInfixOf` imp || (" " <> fullModName) `T.isSuffixOf` imp+ importSection = hardvcat (fmap pretty $ filter (not . isSelfImport) $ toList imports)+ mod =+ hardvcat ignoreComments+ <> hardline+ <> warning+ <> hardline+ <> pragmaSection+ <> hardline+ <> optionsSection+ <> hardline+ <> header+ <> hardline+ <> hardline+ <> importSection+ <> hardline+ <> hardline+ <> doc+ <> hardline+ printed = T.pack $ show mod++ modSegments = T.unpack <$> T.splitOn "." fullModName+ modulePath = foldl (</>) dir modSegments <.> "hs"++ lift $ createDirectoryIfMissing True $ takeDirectory modulePath+ lift $ T.writeFile modulePath printed+ pure fullModName++data Qualification = Unqual | Qual | QualAs T.Text | As T.Text++ensureImport :: T.Text -> Qualification -> ModuleGenM T.Text+ensureImport mod Unqual = tell (Set.singleton $ "import " <> mod) >> pure mod+ensureImport mod Qual = tell (Set.singleton $ "import qualified " <> mod) >> pure mod+ensureImport mod (QualAs qual) = tell (Set.singleton $ "import qualified " <> mod <> " as " <> qual) >> pure qual+ensureImport mod (As qual) = tell (Set.singleton $ "import " <> mod <> " as " <> qual) >> pure qual++ensureLSPImport :: T.Text -> Qualification -> ModuleGenM T.Text+ensureLSPImport mod qual = do+ mp <- asks modulePrefix+ ensureImport (mp <> "." <> mod) qual++entityName :: T.Text -> T.Text -> ModuleGenM T.Text+entityName mod n = do+ qual <- ensureImport mod Qual+ pure $ qual <> "." <> n++lspEntityName :: T.Text -> T.Text -> ModuleGenM T.Text+lspEntityName mod n = do+ qual <- ensureLSPImport mod Qual+ pure $ qual <> "." <> n++genFromMetaModel :: T.Text -> FilePath -> MetaModel -> IO ()+genFromMetaModel prefix dir mm = do+ let (symbolTable, structTable, metaTable) = buildTables mm+ flip runReaderT (CodeGenEnv symbolTable structTable metaTable prefix dir) $ do+ -- Don't even generate LSPAny, LSPObject, or LSPArry+ let filteredAliases = filter (\TypeAlias{name} -> name `notElem` ["LSPAny", "LSPObject", "LSPArray"]) (typeAliases mm)+ structModuleNames <- catMaybes <$> traverse genStruct (structures mm)+ aliasModuleNames <- catMaybes <$> traverse genAlias filteredAliases+ enumModuleNames <- catMaybes <$> traverse genEnum (enumerations mm)+ methodModuleName <- genMethods (requests mm) (notifications mm)+ -- not the methods, we export them separately!+ genAllModule $ sort $ concat [structModuleNames, aliasModuleNames, enumModuleNames]+ -- Have to use the string form of the generated Name+ -- since we might have mangled the original name+ let structNames = mapMaybe (\Structure{name} -> Map.lookup name symbolTable) (structures mm)+ aliasNames = mapMaybe (\TypeAlias{name} -> Map.lookup name symbolTable) filteredAliases+ enumNames = mapMaybe (\Enumeration{name} -> Map.lookup name symbolTable) (enumerations mm)+ genMetaModule (structures mm) filteredAliases (enumerations mm)+ pure ()+ pure ()++-- | Names we can't put in Haskell code.+reservedNames :: Set.Set T.Text+reservedNames = Set.fromList ["data", "type"]++-- | Sanitize a name so we can use it in Haskell.+sanitizeName :: T.Text -> T.Text+sanitizeName n =+ -- Names can't start with underscores! Replace that with a 'U' for lack+ -- of a better idea+ let n' = if "_" `T.isPrefixOf` n then T.cons 'U' $ T.tail n else n+ -- Names can't have '$'s! Just throw them away.+ n'' = T.filter (\c -> c /= '$') n'+ -- If we end up with a reserved name, suffix with an underscore. This+ -- relibly gets us something recognizable, rather than trying to systematize+ -- the conversion of 'type' into 'tpe' or similar.+ n''' = if n'' `Set.member` reservedNames then n'' <> "_" else n''+ in n'''++-- | Make a name to be used at the top-level (i.e. not as a member of anything).+makeToplevelName :: T.Text -> T.Text+makeToplevelName n = capitalize $ sanitizeName n++-- | Make a name for a constructor, optionally including a contextual name to qualify it with.+makeConstrName :: Maybe T.Text -> T.Text -> T.Text+makeConstrName context n =+ let+ cap = capitalize n+ disambiguated = case context of Just t -> t <> "_" <> cap; Nothing -> cap+ in+ sanitizeName disambiguated++-- | Make a name for a field.+makeFieldName :: T.Text -> T.Text+makeFieldName n = "_" <> sanitizeName n++buildTables :: MetaModel -> (SymbolTable, StructTable, MetaTable)+buildTables (MetaModel{structures, enumerations, typeAliases}) =+ let (structNames, structStructs, structMeta) = unzip3 $ flip fmap structures $ \s@Structure{name, proposed} ->+ ((name, makeToplevelName name), (name, s), (name, TypeMeta (fromMaybe False proposed)))++ (enumNames, enumMeta) = unzip $ flip fmap enumerations $ \Enumeration{name, proposed} -> ((name, makeToplevelName name), (name, TypeMeta (fromMaybe False proposed)))++ (aliasNames, aliasMeta) = unzip $ flip fmap typeAliases $ \TypeAlias{name, proposed} -> ((name, makeToplevelName name), (name, TypeMeta (fromMaybe False proposed)))+ symbolTable = Map.fromList $ structNames <> enumNames <> aliasNames++ structTable = Map.fromList structStructs++ metaTable = Map.fromList $ structMeta <> enumMeta <> aliasMeta+ in (symbolTable, structTable, metaTable)++isProposedM :: T.Text -> ModuleGenM Bool+isProposedM n = do+ mt <- asks metaTable+ case Map.lookup n mt of+ Just (TypeMeta proposed) -> pure proposed+ Nothing -> fail $ "Unknown name: " <> show n++isProposedTypeM :: Type -> ModuleGenM Bool+isProposedTypeM = \case+ ReferenceType n -> isProposedM n+ _ -> pure False++{- | Translate a type in the metamodel into the corresponding Haskell type.+ See Note [Translating metamodel types]+-}+convertType :: Type -> ModuleGenM (Doc ann)+convertType = \case+ BaseType n -> case n of+ URI -> pretty <$> entityName "Language.LSP.Protocol.Types.Uri" "Uri"+ DocumentUri -> pretty <$> entityName "Language.LSP.Protocol.Types.Uri" "Uri"+ Integer -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Int32"+ UInteger -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "UInt"+ Decimal -> pure "Float"+ RegExp -> pretty <$> entityName "Data.Text" "Text"+ String -> pretty <$> entityName "Data.Text" "Text"+ Boolean -> pure "Bool"+ Null -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Null"+ -- Special cases: these are in fact defined in the meta model, but+ -- we have way better types for them++ -- 'LSPAny' is a big union of anything in the metamodel, we just+ -- keep that as an aeson 'Value'+ ReferenceType "LSPAny" -> pretty <$> entityName "Data.Aeson" "Value"+ -- 'LSPObject' is an empty structure ... better to just say it's an aeson 'Object'!+ ReferenceType "LSPObject" -> pretty <$> entityName "Data.Aeson" "Object"+ -- 'LSPArray' is a list of 'LSPAny'... better to just say it's an aeson 'Array'!+ ReferenceType "LSPArray" -> pretty <$> entityName "Data.Aeson" "Array"+ ReferenceType n -> do+ st <- asks symbolTable+ case Map.lookup n st of+ Just thn -> pretty <$> lspEntityName (typesModSegment <> "." <> thn) thn+ Nothing -> fail $ "Reference to unknown type: " <> show n+ ArrayType e -> do+ innerType <- convertType e+ pure $ brackets innerType+ MapType k v -> do+ kt <- convertType k+ vt <- convertType v+ n <- pretty <$> entityName "Data.Map" "Map"+ pure $ parens $ n <+> kt <+> vt+ OrType es -> do+ -- Any 'proposed' members should be treated as 'Void', but that's+ -- annoying and leaks their presence, better to just filter them out+ es' <- filterM (fmap not . isProposedTypeM) (toList es)+ case NE.nonEmpty es' of+ Nothing -> fail $ "Or type with no non-proposed members: " <> show es+ Just es'' -> do+ est <- traverse convertType es''+ n <- pretty <$> entityName "Language.LSP.Protocol.Types.Common" "|?"+ pure $ foldr1 (\ty o -> parens (ty <+> n <+> o)) est+ AndType es -> do+ st <- asks structTable+ props <- for es $ \case+ ReferenceType t | Just e <- Map.lookup t st -> getStructProperties e+ t -> fail $ "element of 'and' type was not a reference to a structure: " ++ show t+ genAnonymousStruct $ concat props+ StructureLiteralType (StructureLiteral{properties}) -> genAnonymousStruct properties+ TupleType es -> do+ est <- traverse convertType es+ pure $ tupled est+ StringLiteralType s -> do+ tycon <- entityName "Language.LSP.Protocol.Types.Singletons" "AString"+ let ty = pretty tycon <+> dquotes (pretty s)+ pure $ parens ty+ IntegerLiteralType n -> do+ tycon <- entityName "Language.LSP.Protocol.Types.Singletons" "AnInteger"+ let ty = pretty tycon <+> pretty n+ pure $ parens ty+ BooleanLiteralType _ -> fail "unsupported: boolean literal types"++genStruct :: Structure -> CodeGenM (Maybe T.Text)+genStruct s@Structure{proposed = Just True} = pure Nothing+genStruct s@Structure{name} =+ Just <$> do+ st <- asks symbolTable+ hsName <- case Map.lookup name st of+ Just hsn -> pure hsn+ Nothing -> fail $ "Unknown type: " <> show name+ genModule (typesModSegment <> "." <> hsName) [] Nothing (printStruct hsName s)++printStruct :: T.Text -> Structure -> ModuleGenM (Doc ann)+printStruct tn s@Structure{name, documentation, since, proposed, deprecated} = do+ let structName = name++ props <- getStructProperties s+ args <- for props $ \Property{name, type_, optional, documentation, since, proposed, deprecated} -> do+ pty <- convertType type_+ let mty = case optional of+ Just True -> parens ("Maybe" <+> pty)+ _ -> pty+ let n = makeFieldName name+ propDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+ pure $ hardvcat [propDoc, pretty n <+> "::" <+> mty]++ -- We do *not* deprecate fields. We can't really represent this properly: typically a deprecated field+ -- is optional, and the "correct" thing to do is to omit it. But in our representaiton that means passing+ -- Nothing as the value, which counts as "using" the field. So there is no way for users to avoid the+ -- deprecation warning, which is silly. To do this properly we'd need to do something clever with+ -- pattern synonyms maybe?+ let deprecations = optDeprecated tn deprecated++ ensureImport "GHC.Generics" Unqual+ ensureImport "Control.DeepSeq" Unqual+ ensureImport "Data.Hashable" Unqual+ ensureImport "Prettyprinter" Unqual+ ensureImport "Language.LSP.Protocol.Utils.Misc" Unqual+ let derivDoc =+ let stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+ anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+ viaDeriv = "deriving" <+> "Pretty" <+> "via" <+> parens ("ViaJSON" <+> pretty tn)+ in indent indentSize $ hardvcat [stockDeriv, anyclassDeriv, viaDeriv]+ dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+ let dataDecl = "data" <+> pretty tn <+> "=" <+> pretty tn <+> nest indentSize (encloseSep (line <> "{ ") (line <> "}") ", " args)+ datad = hardvcat (deprecations ++ [dataDoc, dataDecl, derivDoc])++ ensureImport "Data.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Hashable" (QualAs "Hashable")+ optionalPairerName <- entityName "Language.LSP.Protocol.Types.Common" ".=?"+ optionalMatcherName <- entityName "Language.LSP.Protocol.Types.Common" ".:!?"+ let toJsonD =+ let (unzip -> (args, pairEs)) = flip fmap (zip props [0 ..]) $ \(Property{name, optional}, i) ->+ let n :: T.Text = "arg" <> T.pack (show i)+ pairE = case optional of+ Just True -> dquotes (pretty name) <+> pretty optionalPairerName <+> pretty n+ _ -> brackets (dquotes (pretty name) <+> "Aeson..=" <+> pretty n)+ in (pretty n, pairE)+ body = "Aeson.object $ concat $ " <+> encloseSep "[" "]" "," pairEs+ toJsonDoc = "toJSON" <+> parens (pretty tn <+> hsep args) <+> "=" <+> nest indentSize body+ instanceDoc = "instance Aeson.ToJSON" <+> pretty tn <+> "where" <> nest indentSize (hardline <> toJsonDoc)+ in instanceDoc++ fromJsonD <- do+ let vn :: T.Text = "arg"+ let exprs = flip fmap props $ \Property{name, optional} ->+ case optional of+ -- Accept null in place of Nothing+ -- Note [Principle of robustness for parsing LSP types]+ Just True -> pretty vn <+> pretty optionalMatcherName <+> dquotes (pretty name)+ _ -> pretty vn <+> "Aeson..:" <+> dquotes (pretty name)+ let lamBody = mkIterApplicativeApp (pretty tn) exprs+ let body = "Aeson.withObject" <+> dquotes (pretty structName) <+> "$" <+> "\\" <> pretty vn <+> "->" <+> nest indentSize lamBody+ let fromJsonDoc = "parseJSON" <+> "=" <+> nest indentSize body+ let instanceDoc = "instance Aeson.FromJSON" <+> pretty tn <+> "where" <> nest indentSize (hardline <> fromJsonDoc)+ pure instanceDoc++ pure $+ datad+ <> hardline+ <> hardline+ <> toJsonD+ <> hardline+ <> hardline+ <> fromJsonD++-- | Get the list of properties of a struct, including inherited ones.+getStructProperties :: Structure -> ModuleGenM [Property]+getStructProperties s@Structure{name, properties, extends, mixins} = do+ st <- asks structTable+ let+ extends' = fromMaybe [] extends+ mixins' = fromMaybe [] mixins+ supertypes = extends' ++ mixins'+ superProps <- for supertypes $ \case+ ReferenceType t | Just e <- Map.lookup t st -> getStructProperties e+ t -> fail $ "supertype of structure " ++ show name ++ " was not a reference to a structure: " ++ show t+ let allSuperProps = concat superProps+ -- If a property is redefined in the current type, then it overrides the inherited one+ localNames = foldMap (\Property{name} -> Set.singleton name) properties+ filteredSuperProps = filter (\Property{name} -> name `Set.notMember` localNames) allSuperProps+ fullProps = filteredSuperProps ++ properties+ nonProposedProps = filter (\Property{proposed} -> case proposed of Just True -> False; _ -> True) fullProps+ pure nonProposedProps++-- | Generate a type corresponding to an anonymous struct.+genAnonymousStruct :: [Property] -> ModuleGenM (Doc ann)+genAnonymousStruct properties = do+ ensureImport "Data.Row" (QualAs "Row")+ row <- for properties $ \Property{name, type_, optional} -> do+ pty <- convertType type_+ let mty = case optional of+ Just True -> parens ("Maybe" <+> pty)+ _ -> pty+ pure $ dquotes (pretty name) <+> "Row..==" <+> mty+ let tyList = foldr (\ty l -> parens $ ty <+> "Row..+" <+> l) "Row.Empty" row+ pure $ parens $ "Row.Rec" <+> tyList++genEnum :: Enumeration -> CodeGenM (Maybe T.Text)+genEnum s@Enumeration{proposed = Just True} = pure Nothing+genEnum e@Enumeration{name} =+ Just <$> do+ st <- asks symbolTable+ hsName <- case Map.lookup name st of+ Just hsn -> pure hsn+ Nothing -> fail $ "Unknown type: " <> show name+ genModule (typesModSegment <> "." <> hsName) [] Nothing (printEnum hsName e)++printEnum :: T.Text -> Enumeration -> ModuleGenM (Doc ann)+printEnum tn Enumeration{name, type_, values, supportsCustomValues, documentation, since, proposed, deprecated} = do+ st <- asks symbolTable++ let enumName = name+ enumNameString = T.unpack enumName+ -- This indicates whether or not the enum is "open" and supports custom values.+ -- We need to branch on this a lot!+ custom = fromMaybe False supportsCustomValues++ -- The (Haskell) type of the elements of this enum. Useful, so we can generate various+ -- code (e.g. for parsing JSON) generically but use this type to pin down what we want to do.+ ty <- case type_ of+ BaseType Integer -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Int32"+ BaseType UInteger -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "UInt"+ BaseType String -> pretty <$> entityName "Data.Text" "Text"+ _ -> fail $ "enumeration of unexpected type " ++ show type_++ let isString = case type_ of+ BaseType String -> True+ _ -> False++ -- https://github.com/microsoft/vscode-languageserver-node/issues/1035+ let badEnumValues = ["jsonrpcReservedErrorRangeStart", "jsonrpcReservedErrorRangeEnd", "serverErrorStart", "serverErrorEnd"]+ values' = filter (\EnumerationEntry{name} -> name `notElem` badEnumValues) values+ -- The associations between constructor names and their literals+ assocs <- forMaybe values' $ \case+ EnumerationEntry{proposed = Just True} -> pure Nothing+ EnumerationEntry{name, value, documentation, since, proposed} ->+ Just <$> do+ let cn = makeConstrName (Just enumName) name+ -- The literal for the actual enum value in this case+ lit = case value of+ T t -> pretty $ show $ T.unpack t+ I i -> pretty $ show i+ doc <- mkDocumentation documentation since proposed+ pure (cn, lit, doc)++ let normalCons = flip fmap assocs $ \(cn, _, doc) ->+ hardvcat [multilineHaddock $ pretty doc, pretty cn]+ let customCon =+ let cn = makeConstrName (Just enumName) "Custom"+ in if custom then Just (cn, pretty cn <+> ty) else Nothing+ let cons = normalCons ++ (snd <$> maybeToList customCon)++ ensureImport "Data.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Hashable" (QualAs "Hashable")++ lspEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "LspEnum"+ let knownValuesN = "knownValues"+ let toBaseTypeN = "toEnumBaseType"+ let fromBaseTypeN = "fromEnumBaseType"+ lspOpenEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "LspOpenEnum"+ let fromOpenBaseTypeN = "fromOpenEnumBaseType"+ asLspEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "AsLspEnum"+ isStringN <- pretty <$> entityName "Data.String" "IsString"++ let deprecations = optDeprecated tn deprecated ++ (flip concatMap values' $ \EnumerationEntry{name, deprecated} -> optDeprecated (makeConstrName (Just enumName) name) deprecated)++ ensureImport "GHC.Generics" Unqual+ ensureImport "Control.DeepSeq" Unqual+ ensureImport "Data.Hashable" Unqual+ ensureImport "Prettyprinter" Unqual+ ensureImport "Language.LSP.Protocol.Utils.Misc" Unqual+ dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+ let derivDoc =+ let+ toDeriveViaLspEnum = ["Aeson.ToJSON", "Aeson.FromJSON"] ++ if custom && isString then [isStringN] else []+ stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+ anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+ viaDeriv1 = "deriving" <+> tupled toDeriveViaLspEnum <+> "via" <+> parens (asLspEnumN <+> pretty tn)+ viaDeriv2 = "deriving" <+> "Pretty" <+> "via" <+> parens ("ViaJSON" <+> pretty tn)+ in+ indent indentSize $ hardvcat [stockDeriv, anyclassDeriv, viaDeriv1, viaDeriv2]+ let dataDecl = "data" <+> pretty tn <+> "=" <+> nest indentSize (encloseSep (line <> " ") mempty "| " cons)+ dataD = hardvcat (deprecations ++ [dataDoc, dataDecl, derivDoc])++ setFromListN <- pretty <$> entityName "Data.Set" "fromList"+ let knownValuesD =+ let valuesList = nest indentSize $ encloseSep "[" "]" "," $ flip fmap assocs $ \(n, _, _) -> pretty n+ in knownValuesN <+> "=" <+> setFromListN <+> valuesList++ let toBaseTypeD =+ -- xToValue X1 = <X1 value>+ let normalClauses = flip fmap assocs $ \(n, v, _) -> toBaseTypeN <+> pretty n <+> "=" <+> v+ -- xToValue (CustomX c) = c+ customClause = case customCon of+ Just (cn, _) ->+ let vn :: T.Text = "arg"+ in Just $ toBaseTypeN <+> parens (pretty cn <+> pretty vn) <+> "=" <+> pretty vn+ Nothing -> Nothing+ clauses = normalClauses ++ maybeToList customClause+ in hardvcat clauses++ let fromBaseTypeD =+ let fn = if custom then fromOpenBaseTypeN else fromBaseTypeN+ -- valueToX <X1 value> = X+ -- or+ -- valueToX <X1 value> = Just X+ normalClauses = flip fmap assocs $ \(n, v, _) -> fn <+> v <+> "=" <+> if custom then pretty n else "pure" <+> pretty n+ -- valueToX c = CustomX c+ -- or+ -- valueToX _ = Nothing+ fallThroughClause = case customCon of+ Just (cn, _) ->+ let vn :: T.Text = "arg"+ in fn <+> pretty vn <+> "=" <+> pretty cn <+> pretty vn+ Nothing -> fn <+> "_ = Nothing"+ clauses = normalClauses ++ [fallThroughClause]+ in hardvcat clauses++ let lspEnumD =+ let+ baseTypeD = "type EnumBaseType" <+> pretty tn <+> "=" <+> ty+ decls = [knownValuesD, baseTypeD, toBaseTypeD] ++ if custom then [] else [fromBaseTypeD]+ instanceDoc = "instance" <+> lspEnumN <+> pretty tn <+> "where" <> nest indentSize (hardline <> vcat decls)+ in+ instanceDoc+ let lspOpenEnumD = "instance" <+> lspOpenEnumN <+> pretty tn <+> "where" <> nest indentSize (hardline <> fromBaseTypeD)++ pure $+ dataD+ <> hardline+ <> hardline+ <> lspEnumD+ <> hardline+ <> hardline+ <> (if custom then lspOpenEnumD <> hardline <> hardline else "")++genAlias :: TypeAlias -> CodeGenM (Maybe T.Text)+genAlias s@TypeAlias{proposed = Just True} = pure Nothing+genAlias a@TypeAlias{name} =+ Just <$> do+ st <- asks symbolTable+ hsName <- case Map.lookup name st of+ Just hsn -> pure hsn+ Nothing -> fail $ "Unknown type: " <> show name+ genModule (typesModSegment <> "." <> hsName) [] Nothing (printAlias hsName a)++printAlias :: forall ann. T.Text -> TypeAlias -> ModuleGenM (Doc ann)+printAlias hsName TypeAlias{name, type_, documentation, since, proposed, deprecated} = do+ st <- asks symbolTable+ rhs <- convertType type_++ ensureImport "GHC.Generics" Unqual+ ensureImport "Control.DeepSeq" Unqual+ ensureImport "Data.Hashable" Unqual+ ensureImport "Data.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Aeson" (QualAs "Aeson")+ ensureImport "Data.Row.Hashable" (QualAs "Hashable")+ ensureImport "Prettyprinter" Unqual+ ensureImport "Language.LSP.Protocol.Utils.Misc" Unqual+ -- In practice, it seems that only base types and aliases to base types get used as map keys, so deriving+ -- To/FromJSONKey for them seems to be enough+ let derivDoc =+ let aesonDeriving :: [Doc ann] = ["Aeson.ToJSON", "Aeson.FromJSON"] ++ case type_ of BaseType _ -> ["Aeson.ToJSONKey", "Aeson.FromJSONKey"]; _ -> []+ newtypeDeriv = "deriving newtype" <+> tupled aesonDeriving+ stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+ anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+ viaDeriv = "deriving" <+> "Pretty" <+> "via" <+> parens ("ViaJSON" <+> pretty hsName)+ in indent indentSize $ hardvcat [newtypeDeriv, stockDeriv, anyclassDeriv, viaDeriv]+ dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+ let dataDecl = "newtype" <+> pretty hsName <+> "=" <+> pretty hsName <+> rhs+ datad = hardvcat (optDeprecated hsName deprecated ++ [dataDoc, dataDecl, derivDoc])+ pure datad++---------------++data RequestData ann = RequestData+ { methCon :: Doc ann+ , singCon :: Doc ann+ , paramsEq :: Doc ann+ , resultEq :: Doc ann+ , errorDataEq :: Doc ann+ , registrationOptionsEq :: Doc ann+ , toStringClause :: Doc ann+ , fromStringClause :: Doc ann+ , messageDirectionClause :: Doc ann+ , messageKindClause :: Doc ann+ }++data NotificationData ann = NotificationData+ { methCon :: Doc ann+ , singCon :: Doc ann+ , paramsEq :: Doc ann+ , registrationOptionsEq :: Doc ann+ , toStringClause :: Doc ann+ , fromStringClause :: Doc ann+ , messageDirectionClause :: Doc ann+ , messageKindClause :: Doc ann+ }++data CustomData ann = CustomData+ { methCon :: Doc ann+ , singCon :: Doc ann+ , paramsEq :: Doc ann+ , resultEq :: Doc ann+ , errorDataEq :: Doc ann+ , registrationOptionsEq :: Doc ann+ , toStringClause :: Doc ann+ , fromStringClause :: Doc ann+ , messageDirectionClause :: Doc ann+ , messageKindClause :: Doc ann+ }++-- See Note [Generating code for methods]+-- TODO: partial result params+printMethods :: [Request] -> [Notification] -> ModuleGenM (Doc ann)+printMethods reqs nots = do+ let mtyN = "Method"+ styN = "SMethod"+ sstyN = "SomeMethod"+ smcn = "SomeMethod"+ mpN = "MessageParams"+ mrN = "MessageResult"+ edN = "ErrorData"+ roN = "RegistrationOptions"+ toStringN = "someMethodToMethodString"+ fromStringN = "methodStringToSomeMethod"+ mdN = "messageDirection"+ mkN = "messageKind"++ let methodName context fullName =+ let pieces = T.splitOn "/" fullName+ in pretty $ makeConstrName context $ foldMap capitalize pieces+ let messagePartType t = case t of+ Just ty -> convertType ty+ -- See Note [Absent parameters/results/errors]+ Nothing -> do+ ensureImport "Data.Void" Qual+ pure "Maybe Data.Void.Void"++ ensureImport "Language.LSP.Protocol.Message.Meta" (QualAs "MM")++ -- Construct the various pieces we'll need for the declarations in one go+ reqData <- forMaybe reqs $ \case+ Request{proposed = Just True} -> pure Nothing+ Request{method, params, result, errorData, registrationOptions, messageDirection} ->+ Just <$> do+ -- <constructor name> :: Method <direction> <method type>+ let mcn = methodName (Just mtyN) method+ direction = case messageDirection of+ MM.ClientToServer -> "MM.ClientToServer"+ MM.ServerToClient -> "MM.ServerToClient"+ MM.Both -> "f"+ methCon = mcn <+> "::" <+> pretty mtyN <+> direction <+> "MM.Request"+ scn = methodName (Just styN) method+ singCon = scn <+> "::" <+> pretty styN <+> mcn++ -- MessageParams <constructor name> = <param type>+ paramTy <- messagePartType params+ let paramsEq = mpN <+> mcn <+> "=" <+> paramTy+ -- MessageResult <constructor name> = <result type>+ resultTy <- messagePartType (Just result)+ let resultEq = mrN <+> mcn <+> "=" <+> resultTy+ errDatTy <- messagePartType errorData+ let errorDataEq = edN <+> mcn <+> "=" <+> errDatTy+ regOptsTy <- messagePartType registrationOptions+ let registrationOptionsEq = roN <+> mcn <+> "=" <+> regOptsTy++ let toStringClause = toStringN <+> parens (smcn <+> scn) <+> "=" <+> dquotes (pretty method)+ fromStringClause = fromStringN <+> dquotes (pretty method) <+> "=" <+> smcn <+> scn+ messageDirectionClause =+ let d = case messageDirection of+ MM.ClientToServer -> "MM.SClientToServer"+ MM.ServerToClient -> "MM.SServerToClient"+ MM.Both -> "MM.SBothDirections"+ in mdN <+> scn <+> "=" <+> d+ messageKindClause = "messageKind" <+> scn <+> "=" <+> "MM.SRequest"+ pure $ RequestData{..}++ notData <- forMaybe nots $ \case+ Notification{proposed = Just True} -> pure Nothing+ Notification{method, params, registrationOptions, messageDirection} ->+ Just <$> do+ let mcn = methodName (Just mtyN) method+ direction = case messageDirection of+ MM.ClientToServer -> "MM.ClientToServer"+ MM.ServerToClient -> "MM.ServerToClient"+ MM.Both -> "f"+ methCon = mcn <+> "::" <+> pretty mtyN <+> direction <+> "MM.Notification"+ scn = methodName (Just styN) method+ singCon = scn <+> "::" <+> pretty styN <+> mcn++ -- MessageParams <constructor name> = <param type>+ paramTy <- messagePartType params+ let paramsEq = mpN <+> mcn <+> "=" <+> paramTy+ regOptsTy <- messagePartType registrationOptions+ let registrationOptionsEq = roN <+> mcn <+> "=" <+> regOptsTy++ let toStringClause = toStringN <+> parens (smcn <+> scn) <+> "=" <+> dquotes (pretty method)+ fromStringClause = fromStringN <+> dquotes (pretty method) <+> "=" <+> smcn <+> scn+ messageDirectionClause =+ let d = case messageDirection of+ MM.ClientToServer -> "MM.SClientToServer"+ MM.ServerToClient -> "MM.SServerToClient"+ MM.Both -> "MM.SBothDirections"+ in "messageDirection" <+> scn <+> "=" <+> d+ messageKindClause = "messageKind" <+> scn <+> "=" <+> "MM.SNotification"++ pure $ NotificationData{..}++ -- Add the custom method case, which isn't in the metamodel+ customDat <- do+ let mcn = methodName (Just mtyN) "CustomMethod"+ -- Method_CustomMethod :: Symbol -> Method f t+ methCon = mcn <+> "::" <+> "GHC.TypeLits.Symbol" <+> "->" <+> pretty mtyN <+> "f" <+> "t"+ -- SMethod_CustomMethod :: KnownSymbol s => SMethod Method_CustomMethod+ scn = methodName (Just styN) "CustomMethod"+ ensureImport "Data.Proxy" Qual+ ensureImport "GHC.TypeLits" Qual+ let singCon = scn <+> "::" <+> "forall s . GHC.TypeLits.KnownSymbol s =>" <+> "Data.Proxy.Proxy s" <+> "->" <+> pretty styN <+> parens (mcn <+> "s")+ -- MessageParams (Method_CustomMethod s) = Value+ ensureImport "Data.Aeson" (QualAs "Aeson")+ let paramsEq = mpN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+ -- MessageResult (Method_CustomMethod s) = Value+ resultEq = mrN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+ -- Can shove whatever you want in the error data for custom methods?+ -- ErrorData (Method_CustomMethod s) = Value+ errorDataEq = edN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+ -- Can't register custom methods+ -- RegistrationOptions (Method_CustomMethod s) = Void+ ensureImport "Data.Void" Qual+ let registrationOptionsEq = roN <+> parens (mcn <+> "s") <+> "=" <+> "Data.Void.Void"++ let toStringClause = toStringN <+> parens (smcn <+> parens (scn <+> "v")) <+> "=" <+> "GHC.TypeLits.symbolVal v"+ fromStringClause = fromStringN <+> "v = case GHC.TypeLits.someSymbolVal v of { GHC.TypeLits.SomeSymbol p ->" <+> smcn <+> parens (scn <+> "p") <+> "; }"+ messageDirectionClause = mdN <+> parens (scn <+> "_") <+> "=" <+> "MM.SBothDirections"+ messageKindClause = mkN <+> parens (scn <+> "_") <+> "=" <+> "MM.SBothTypes"++ pure $ CustomData{..}++ ensureImport "Data.Kind" (QualAs "Kind")+ let dataD =+ let sigD = "type" <+> pretty mtyN <+> ":: MM.MessageDirection -> MM.MessageKind -> Kind.Type"+ docD = "-- | A type representing a LSP method (or class of methods), intended to be used mostly at the type level."+ ctors = fmap (\RequestData{..} -> methCon) reqData ++ fmap (\NotificationData{..} -> methCon) notData ++ [(\CustomData{..} -> methCon) customDat]+ dataD = nest indentSize $ "data" <+> pretty mtyN <+> "f t" <+> "where" <+> (hardline <> hardvcat ctors)+ in -- This only really exists on the type level so we don't really want instances anyway+ hardvcat [docD, sigD, dataD]++ let mpD =+ let sigD = "type" <+> mpN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+ docD = "-- | Maps a LSP method to its parameter type."+ eqns = fmap (\RequestData{..} -> paramsEq) reqData ++ fmap (\NotificationData{..} -> paramsEq) notData ++ [(\CustomData{..} -> paramsEq) customDat]+ declD = nest indentSize $ "type family" <+> mpN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+ in hardvcat [docD, sigD, declD]++ let mrD =+ let sigD = "type" <+> mrN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+ docD = "-- | Maps a LSP method to its result type."+ -- TODO: should we give notifiations ()?+ eqns = fmap (\RequestData{..} -> resultEq) reqData ++ [(\CustomData{..} -> resultEq) customDat]+ declD = nest indentSize $ "type family" <+> mrN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+ in hardvcat [docD, sigD, declD]++ let edD =+ let sigD = "type" <+> edN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+ docD = "-- | Maps a LSP method to its error data type."+ -- TODO: should we give notifiations ()?+ eqns = fmap (\RequestData{..} -> errorDataEq) reqData ++ [(\CustomData{..} -> errorDataEq) customDat]+ declD = nest indentSize $ "type family" <+> edN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+ in hardvcat [docD, sigD, declD]++ let roD =+ let sigD = "type" <+> roN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+ docD = "-- | Maps a LSP method to its registration options type."+ eqns = fmap (\RequestData{..} -> registrationOptionsEq) reqData ++ fmap (\NotificationData{..} -> registrationOptionsEq) notData ++ [(\CustomData{..} -> registrationOptionsEq) customDat]+ declD = nest indentSize $ "type family" <+> roN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+ in hardvcat [docD, sigD, declD]++ let singD =+ let sigD = "type" <+> pretty styN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+ docD = "-- | A singleton type for 'Method'."+ ctors = fmap (\RequestData{..} -> singCon) reqData ++ fmap (\NotificationData{..} -> singCon) notData ++ [(\CustomData{..} -> singCon) customDat]+ -- Can't derive instances, it's a GADT, will do them later+ dataD = nest indentSize $ "data" <+> pretty styN <+> "m" <+> "where" <+> (hardline <> hardvcat ctors)+ in hardvcat [docD, sigD, dataD]++ let ssmD =+ let ctor = smcn <+> "::" <+> "forall m ." <+> pretty styN <+> "m" <+> "->" <+> sstyN+ docD = "-- | A method which isn't statically known."+ -- Can't derive instances because it's a GADT and we're not doing the instances for SMethod here either+ dataD = nest indentSize $ "data" <+> sstyN <+> "where" <+> (hardline <> ctor)+ in hardvcat [docD, dataD]++ -- methodToString :: SomeMethod -> String+ let toStringD =+ let docD = "-- | Turn a 'SomeMethod' into its LSP method string."+ sigD = toStringN <+> "::" <+> sstyN <+> "->" <+> "String"+ clauses = fmap (\RequestData{..} -> toStringClause) reqData ++ fmap (\NotificationData{..} -> toStringClause) notData ++ [(\CustomData{..} -> toStringClause) customDat]+ in hardvcat [docD, sigD, hardvcat clauses]+ -- stringToMethod :: String -> SomeMethod+ let fromStringD =+ let docD = "-- | Turn a LSP method string into a 'SomeMethod'."+ sigD = fromStringN <+> "::" <+> "String" <+> "->" <+> sstyN+ clauses = fmap (\RequestData{..} -> fromStringClause) reqData ++ fmap (\NotificationData{..} -> fromStringClause) notData ++ [(\CustomData{..} -> fromStringClause) customDat]+ in hardvcat [docD, sigD, hardvcat clauses]++ let messageDirectionD =+ let docD = "-- | Get a singleton witness for the message direction of a 'SMethod'."+ sigD = mdN <+> ":: forall f t (m :: Method f t) ." <+> pretty styN <+> "m" <+> "->" <+> "MM.SMessageDirection f"+ clauses = fmap (\RequestData{..} -> messageDirectionClause) reqData ++ fmap (\NotificationData{..} -> messageDirectionClause) notData ++ [(\CustomData{..} -> messageDirectionClause) customDat]+ in hardvcat [docD, sigD, hardvcat clauses]++ let messageKindD =+ let docD = "-- | Get a singleton witness for the message kind of a 'SMethod'."+ sigD = mkN <+> ":: forall f t (m :: Method f t) ." <+> pretty styN <+> "m" <+> "->" <+> "MM.SMessageKind t"+ clauses = fmap (\RequestData{..} -> messageKindClause) reqData ++ fmap (\NotificationData{..} -> messageKindClause) notData ++ [(\CustomData{..} -> messageKindClause) customDat]+ in hardvcat [docD, sigD, hardvcat clauses]++ pure $+ dataD+ <> hardline+ <> hardline+ <> mpD+ <> hardline+ <> hardline+ <> mrD+ <> hardline+ <> hardline+ <> edD+ <> hardline+ <> hardline+ <> roD+ <> hardline+ <> hardline+ <> singD+ <> hardline+ <> hardline+ <> ssmD+ <> hardline+ <> hardline+ <> toStringD+ <> hardline+ <> hardline+ <> fromStringD+ <> hardline+ <> hardline+ <> messageDirectionD+ <> hardline+ <> hardline+ <> messageKindD++genMethods :: [Request] -> [Notification] -> CodeGenM T.Text+genMethods reqs nots = do+ genModule "Method" [] Nothing (printMethods reqs nots)++---------------++genMetaModule :: [Structure] -> [TypeAlias] -> [Enumeration] -> CodeGenM T.Text+genMetaModule structs aliases enums = do+ genModule "Meta" ["TemplateHaskell"] Nothing $ do+ ensureImport "Language.Haskell.TH" (QualAs "TH")+ let tyn thn = pretty <$> entityName "Language.LSP.Protocol.Internal.Types" thn+ sns <- forMaybe structs $ \case+ Structure{proposed = Just True} -> pure Nothing+ Structure{name} ->+ Just <$> do+ st <- asks symbolTable+ case Map.lookup name st of+ Just thn -> pretty <$> entityName "Language.LSP.Protocol.Internal.Types" thn+ Nothing -> fail $ "Unknown struct: " <> show name+ ans <- forMaybe aliases $ \case+ TypeAlias{proposed = Just True} -> pure Nothing+ TypeAlias{name} ->+ Just <$> do+ st <- asks symbolTable+ case Map.lookup name st of+ Just thn -> pretty <$> entityName "Language.LSP.Protocol.Internal.Types" thn+ Nothing -> fail $ "Unknown alias: " <> show name+ ens <- forMaybe enums $ \case+ Enumeration{proposed = Just True} -> pure Nothing+ Enumeration{name} ->+ Just <$> do+ st <- asks symbolTable+ case Map.lookup name st of+ Just thn -> pretty <$> entityName "Language.LSP.Protocol.Internal.Types" thn+ Nothing -> fail $ "Unknown enum: " <> show name+ let+ sig1 = "structNames" <+> "::" <+> brackets "TH.Name"+ decl1 = "structNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) sns)+ sig2 = "aliasNames" <+> "::" <+> brackets "TH.Name"+ decl2 = "aliasNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) ans)+ sig3 = "enumNames" <+> "::" <+> brackets "TH.Name"+ decl3 = "enumNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) ens)+ pure $+ hardvcat+ [ sig1+ , decl1+ , sig2+ , decl2+ , sig3+ , decl3+ ]++---------------++printReExports :: [T.Text] -> ModuleGenM (Doc ann)+printReExports names = do+ for_ names $ \n -> ensureImport n (As "Export")+ pure mempty++genAllModule :: [T.Text] -> CodeGenM T.Text+genAllModule names = do+ genModule typesModSegment [] (Just ["module Export"]) (printReExports names)++---------------++capitalize :: T.Text -> T.Text+capitalize s = T.toUpper (T.singleton (T.head s)) `T.append` T.tail s++uncapitalize :: T.Text -> T.Text+uncapitalize s = T.toLower (T.singleton (T.head s)) `T.append` T.tail s++hardvcat :: [Doc ann] -> Doc ann+hardvcat = concatWith (\x y -> x <> hardline <> y)++mkIterApplicativeApp :: Doc a -> [Doc a] -> Doc a+mkIterApplicativeApp hd [] = "pure" <+> hd+mkIterApplicativeApp hd (a : rest) =+ let acc = hd <+> "<$>" <+> a+ in foldl' (\acc a -> acc <+> "<*>" <+> a) acc rest++{- Note [Code generation approach]+The approach we take here is quite primitive: we just print out Haskell modules+as strings. This ends up being better than the alternatives!++Using TH:+- Hard to make it work reliably on all GHC versions+- Have to produce everything in a single module+- Slow compilation: the TH itself is slow, and then it produces a gigantic module+ which must be compiled in one go+- Hard to debug: you have to dump splices and dig through the output++Various other libraries for generating Haskell:+- Only support old versions of Haskell syntax (we need GADTs and type families)+- Are dubiously supported+-}++{- Note [Translating metamodel types]++= Or types++Or types are translated directly into anonymous unions using '(|?)'.++= And types++And types are difficult to handle in general (it's not even clear what that means). We assume+that they contain only references to structures, and translate them as anonymous records+with the union of the fields of the components of the and type.++= Null++We would like a type that reliably serializes to/from null, since null alternatives+are called out explicitly in the LSP spec. In the end, we just defined a specific type for+this: 'Null'.++= Enumerations++Enumerations are compiled as simple sum types.++Enums that allow custom values get a special extra constructor for that.++= Type aliases++Type aliases are compiled to newtype definitions.++The alternative would be to compile them to type aliases. It's not at all clear which+one is better, but this way is closer to how we did things before and in some cases+makes things easier (e.g. when there is a type alias for an anoymous record you get+slightly better errors before you go under the newtype).++= Structures++Top level strutures are compiled into record datatypes.++Properties for structures are included in the following order:+- Properties from types in 'extends' (including all their inherited properties).+- Properties from types in 'mixins' (including all their inherited properties).+- Properties defined in the struct itself.++We insist that extended and mixed in types are references to top-level structures (it's+unclear that anything else makes sense).++Field names for structure properties are not disambiguated: we rely on `DuplicateRecordFields`.+We generate lenses for conveniently accessing all the duplicate fields, hence+the fields themselves are prefixed with an underscore so they don't clash with the lenses.++== Optional fields++Optional fields are translated as 'Maybe' types. We can configure `aeson` to do the right thing+for datatypes, and for anonymous records we have our own instances in 'Data.Row.Aeson'.++== Structure literals++Structure literals are translated directly as anonymous records. See Note [Anonymous records].++== String/integer literals++String and integer literal types are weird. They're inhabited by only that specific+string or integer. They're often used for "kind" fields i.e. to encode sum types.+We do try to represent this faithfully, so we have types 'AString' and 'AnInteger'+which behave like this.++-}++{- Note [Generating code for methods]+The code generation for methods is in many ways the most complicated part,+because there are some type-level parts. We follow the same basic approach as the+old way:+- A 'Method' type that represents a method, with type parameters for direction and+type (notification/request).+- A 'SMethod' singleton GADT indexed by a 'Method' that can be passed around at runtime.+- A variety of type families for mapping 'Method's to their parameter types, result types, etc.++We also generate a few functions. The ultimate goal would be to avoid any non-generated+code having to do a full pattern match on 'Method', since it's gigantic and that's not+very maintainable. We don't quite achieve that yet.+-}++{- Note [Absent parameters/results/errors]+Many methods don't *have* parameters/results/errors. What are we supposed to do there?+We can't say the type is 'Null', because the client will send us messages where the+value is absent, not just null. We really need a way to say the value is *absent*.++We have a cunning trick for this: use 'Maybe Void'. That can only ever be 'Nothing',+and sine we're configuring aeson to omit 'Nothing' fields in objects, that's exactly+what we want.++See also https://github.com/haskell/aeson/issues/646 for some relevant discussion.+-}++{- Note [Anonymous records]+We need anonymous records in a few places. We could lift each of these to the top+level and declare a new Haskell record type for them, but this requires us to make+lots of arbitrary choices (e.g. what do we call all these new types?) and takes us+further from representing the metamodel accurately. So we instead use an actual+anonymous records library, in this case `row-types`.+-}++{- Note [Avoiding name clashes]+It is difficult to avoid name clashes, especially since we don't control the input+source. And there are plenty of name clashes in the metamodel.+- Field names clash a lot+- Constructor names clash+- There are a few instances where constructor names clash with type names.++One approach would be to generate lots of modules and use Haskell's module system+to disambiguate. But this would prevent us from providing large modules that+re-export things, rather we would need users to import each module that they+use individually, which would be quite tedious. That would also force us to+expose the generated module structure.++The main thing we do is just pick non-clashing names. The crude heuristic+we have adopted is to prefix many values with the name of the type with which they+are associated, followed by an underscore. So the constructors of `X` will be+`X_A`, `X_B` etc.++We don't do this for fields, instead we rely on `DuplicateRecordFields` and+use classy lenses.+-}++{- Note [Principle of robustness for parsing LSP types]+The principle of robustness states:++> Be conservative in what you do, liberal in what you accept from others++We try to follow this when parsing LSP types, and where possible accept+"slightly wrong" input. This is important because the LSP spec is very+fiddly to implement correctly, and there are many clients we interact with,+some of whom will therefore get it wrong. It's best if we can accept this+(although in an ideal world we would also emit a warning, but it's not super+easy to do that, so we just don't).++Specific ways in which we try to be robust:+- Accept 'null' to mean "missing". The LSP spec *sometimes* allows a value+ to be 'null', but often it says a value can be missing but is not nullable.+ A common mistake for clients is to still send 'null' to mean "missing"+ (see e.g. https://github.com/haskell/haskell-language-server/issues/3842#issuecomment-1798217080).+ This is complicated because if 'null' is an allowed value then we want to parse+ it as a present 'null', not missing.+-}
+ generator/Main.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE OverloadedStrings #-}++module Main (main) where++import CodeGen+import Language.LSP.MetaModel++-- Run this from the lsp-types directory with "cabal run generator" to regenerate+-- the generated files from the metamodel.+main :: IO ()+main = genFromMetaModel "Language.LSP.Protocol.Internal" "generated" metaModel
lsp-types.cabal view
@@ -1,141 +1,672 @@-cabal-version: 2.2-name: lsp-types-version: 1.6.0.1-synopsis: Haskell library for the Microsoft Language Server Protocol, data types+cabal-version: 3.0+name: lsp-types+version: 2.4.0.0+synopsis:+ Haskell library for the Microsoft Language Server Protocol, data types -description: An implementation of the types to allow language implementors to- support the Language Server Protocol for their specific language.+description:+ An implementation of the types to allow language implementors to+ support the Language Server Protocol for their specific language. -homepage: https://github.com/haskell/lsp-license: MIT-license-file: LICENSE-author: Alan Zimmerman-maintainer: alan.zimm@gmail.com-copyright: Alan Zimmerman, 2016-2021-category: Development-build-type: Simple-extra-source-files: ChangeLog.md, README.md+homepage: https://github.com/haskell/lsp+license: MIT+license-file: LICENSE+author: Alan Zimmerman+maintainer: alan.zimm@gmail.com+copyright: Alan Zimmerman, 2016-2021+category: Development+build-type: Simple+extra-doc-files:+ ChangeLog.md+ README.md+extra-source-files:+ metaModel.json +source-repository head+ type: git+ location: https://github.com/haskell/lsp+ flag force-ospath- default: False- manual: False- description: Force a version bound on filepath library, to enable 'OsPath'.+ default: False+ manual: False+ description:+ Force a version bound on filepath library, to enable 'OsPath'. +common warnings+ ghc-options: -Wunused-packages+ library- exposed-modules: Language.LSP.Types- , Language.LSP.Types.Capabilities- , Language.LSP.Types.Lens- , Language.LSP.Types.SMethodMap- , Data.IxMap- other-modules: Language.LSP.Types.CallHierarchy- , Language.LSP.Types.Cancellation- , Language.LSP.Types.ClientCapabilities- , Language.LSP.Types.CodeAction- , Language.LSP.Types.CodeLens- , Language.LSP.Types.Command- , Language.LSP.Types.Common- , Language.LSP.Types.Completion- , Language.LSP.Types.Configuration- , Language.LSP.Types.Declaration- , Language.LSP.Types.Definition- , Language.LSP.Types.Diagnostic- , Language.LSP.Types.DocumentColor- , Language.LSP.Types.DocumentFilter- , Language.LSP.Types.DocumentHighlight- , Language.LSP.Types.DocumentLink- , Language.LSP.Types.DocumentSymbol- , Language.LSP.Types.FoldingRange- , Language.LSP.Types.Formatting- , Language.LSP.Types.Hover- , Language.LSP.Types.Implementation- , Language.LSP.Types.Initialize- , Language.LSP.Types.Location- , Language.LSP.Types.LspId- , Language.LSP.Types.MarkupContent- , Language.LSP.Types.Method- , Language.LSP.Types.Message- , Language.LSP.Types.Parsing- , Language.LSP.Types.Progress- , Language.LSP.Types.Registration- , Language.LSP.Types.References- , Language.LSP.Types.Rename- , Language.LSP.Types.SelectionRange- , Language.LSP.Types.ServerCapabilities- , Language.LSP.Types.SemanticTokens- , Language.LSP.Types.SignatureHelp- , Language.LSP.Types.StaticRegistrationOptions- , Language.LSP.Types.TextDocument- , Language.LSP.Types.TypeDefinition- , Language.LSP.Types.Uri- , Language.LSP.Types.Utils- , Language.LSP.Types.Window- , Language.LSP.Types.WatchedFiles- , Language.LSP.Types.WorkspaceEdit- , Language.LSP.Types.WorkspaceFolders- , Language.LSP.Types.WorkspaceSymbol- , Language.LSP.Types.Uri.OsPath- -- other-extensions:- ghc-options: -Wall- build-depends: base >= 4.11 && < 5- , aeson >=1.2.2.0- , binary- , containers- , data-default- , deepseq- , Diff >= 0.2- , dlist- , hashable- , lens >= 4.15.2- , mtl < 2.4- , network-uri >= 2.6- , mod- , scientific- , some- , text- , template-haskell- , unordered-containers- , exceptions- , safe+ import: warnings+ hs-source-dirs: src generated+ default-language: GHC2021++ -- Various things we want on by default+ -- * syntactic niceties, QOL+ -- * we always want more deriving options+ -- * we want all data strict by default+ -- * we have lots of duplicte record fields+ -- * extended type class stuff particularly for the+ -- lens classes+ -- * fancy types for singletons etc.+ default-extensions:+ DataKinds+ DeriveAnyClass+ DerivingStrategies+ DerivingVia+ DuplicateRecordFields+ FunctionalDependencies+ GADTs+ NegativeLiterals+ OverloadedStrings+ StrictData+ TypeFamilies+ UndecidableInstances++ build-depends:+ , aeson >=2 && <2.3+ , base >=4.11 && <5+ , binary ^>=0.8+ , containers >=0.6 && < 0.9+ , data-default >=0.7 && < 0.9+ , deepseq >=1.4 && <1.6+ , Diff >=0.4 && <1.1+ , dlist ^>=1.0+ , hashable >=1.4 && <1.6+ , indexed-traversable ^>=0.1+ , indexed-traversable-instances ^>=0.1+ , lens >=5.1 && <5.4+ , mod ^>=0.2+ , mtl >=2.2 && <2.4+ , network-uri ^>=2.6+ , prettyprinter ^>=1.7+ , row-types ^>=1.0+ , safe ^>=0.3+ , some ^>=1.0+ , template-haskell >=2.7 && <2.25+ , text >=1 && <2.2++ -- This version of filepath comes with GHC 9.6, so+ -- we should be able to drop this flag once we only+ -- support 9.6 or higher if flag(force-ospath)- build-depends: filepath ^>= 1.4.100.0+ build-depends: filepath >=1.4.100.0 && < 1.6+ else- build-depends: filepath- hs-source-dirs: src- default-language: Haskell2010+ build-depends: filepath >=1.4 && < 1.6++ if impl(ghc >= 9.6)+ build-depends: exceptions ^>=0.10++ ghc-options:+ -Wall -Wmissing-deriving-strategies+ -Wno-unticked-promoted-constructors++ exposed-modules:+ Data.IxMap+ Data.Row.Aeson+ Data.Row.Hashable+ Language.LSP.Protocol.Capabilities+ Language.LSP.Protocol.Lens+ Language.LSP.Protocol.Message+ Language.LSP.Protocol.Types+ Language.LSP.Protocol.Meta+ Language.LSP.Protocol.Utils.Misc+ Language.LSP.Protocol.Utils.SMethodMap++ other-modules:+ Language.LSP.Protocol.Message.Lens+ Language.LSP.Protocol.Message.LspId+ Language.LSP.Protocol.Message.Meta+ Language.LSP.Protocol.Message.Method+ Language.LSP.Protocol.Message.Parsing+ Language.LSP.Protocol.Message.Registration+ Language.LSP.Protocol.Message.Types+ Language.LSP.Protocol.Types.CodeAction+ Language.LSP.Protocol.Types.Common+ Language.LSP.Protocol.Types.Edit+ Language.LSP.Protocol.Types.Lens+ Language.LSP.Protocol.Types.Location+ Language.LSP.Protocol.Types.LspEnum+ Language.LSP.Protocol.Types.MarkupContent+ Language.LSP.Protocol.Types.Orphans+ Language.LSP.Protocol.Types.Progress+ Language.LSP.Protocol.Types.SemanticTokens+ Language.LSP.Protocol.Types.Singletons+ Language.LSP.Protocol.Types.Uri+ Language.LSP.Protocol.Types.Uri.OsPath+ Language.LSP.Protocol.Types.WatchKinds+++ -- The generated modules+ -- In principle these could be in a separate component,+ -- but a) the generated modules depend on some of the common code+ -- and b) some of the helper code depends on the generated modules+ -- It's simpler to just have everything in together, otherwise we'd+ -- actually need three layers!+ other-modules:+ Language.LSP.Protocol.Internal.Meta+ Language.LSP.Protocol.Internal.Method+ Language.LSP.Protocol.Internal.Types+ Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+ Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+ Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+ Language.LSP.Protocol.Internal.Types.BaseSymbolInformation+ Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+ Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+ Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+ Language.LSP.Protocol.Internal.Types.CallHierarchyItem+ Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+ Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+ Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+ Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+ Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+ Language.LSP.Protocol.Internal.Types.CancelParams+ Language.LSP.Protocol.Internal.Types.ChangeAnnotation+ Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+ Language.LSP.Protocol.Internal.Types.ClientCapabilities+ Language.LSP.Protocol.Internal.Types.CodeAction+ Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+ Language.LSP.Protocol.Internal.Types.CodeActionContext+ Language.LSP.Protocol.Internal.Types.CodeActionKind+ Language.LSP.Protocol.Internal.Types.CodeActionOptions+ Language.LSP.Protocol.Internal.Types.CodeActionParams+ Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+ Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind+ Language.LSP.Protocol.Internal.Types.CodeDescription+ Language.LSP.Protocol.Internal.Types.CodeLens+ Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+ Language.LSP.Protocol.Internal.Types.CodeLensOptions+ Language.LSP.Protocol.Internal.Types.CodeLensParams+ Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+ Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.Color+ Language.LSP.Protocol.Internal.Types.ColorInformation+ Language.LSP.Protocol.Internal.Types.ColorPresentation+ Language.LSP.Protocol.Internal.Types.ColorPresentationParams+ Language.LSP.Protocol.Internal.Types.Command+ Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+ Language.LSP.Protocol.Internal.Types.CompletionContext+ Language.LSP.Protocol.Internal.Types.CompletionItem+ Language.LSP.Protocol.Internal.Types.CompletionItemKind+ Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+ Language.LSP.Protocol.Internal.Types.CompletionItemTag+ Language.LSP.Protocol.Internal.Types.CompletionList+ Language.LSP.Protocol.Internal.Types.CompletionOptions+ Language.LSP.Protocol.Internal.Types.CompletionParams+ Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+ Language.LSP.Protocol.Internal.Types.CompletionTriggerKind+ Language.LSP.Protocol.Internal.Types.ConfigurationItem+ Language.LSP.Protocol.Internal.Types.ConfigurationParams+ Language.LSP.Protocol.Internal.Types.CreateFile+ Language.LSP.Protocol.Internal.Types.CreateFileOptions+ Language.LSP.Protocol.Internal.Types.CreateFilesParams+ Language.LSP.Protocol.Internal.Types.Declaration+ Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+ Language.LSP.Protocol.Internal.Types.DeclarationLink+ Language.LSP.Protocol.Internal.Types.DeclarationOptions+ Language.LSP.Protocol.Internal.Types.DeclarationParams+ Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+ Language.LSP.Protocol.Internal.Types.Definition+ Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+ Language.LSP.Protocol.Internal.Types.DefinitionLink+ Language.LSP.Protocol.Internal.Types.DefinitionOptions+ Language.LSP.Protocol.Internal.Types.DefinitionParams+ Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DeleteFile+ Language.LSP.Protocol.Internal.Types.DeleteFileOptions+ Language.LSP.Protocol.Internal.Types.DeleteFilesParams+ Language.LSP.Protocol.Internal.Types.Diagnostic+ Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+ Language.LSP.Protocol.Internal.Types.DiagnosticOptions+ Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+ Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+ Language.LSP.Protocol.Internal.Types.DiagnosticSeverity+ Language.LSP.Protocol.Internal.Types.DiagnosticTag+ Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+ Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+ Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+ Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+ Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+ Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+ Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+ Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+ Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+ Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+ Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+ Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+ Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+ Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentColorOptions+ Language.LSP.Protocol.Internal.Types.DocumentColorParams+ Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+ Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind+ Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult+ Language.LSP.Protocol.Internal.Types.DocumentFilter+ Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+ Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+ Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentHighlight+ Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentHighlightKind+ Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+ Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+ Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentLink+ Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+ Language.LSP.Protocol.Internal.Types.DocumentLinkParams+ Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+ Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+ Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+ Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+ Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+ Language.LSP.Protocol.Internal.Types.DocumentSelector+ Language.LSP.Protocol.Internal.Types.DocumentSymbol+ Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+ Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+ Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+ Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+ Language.LSP.Protocol.Internal.Types.ErrorCodes+ Language.LSP.Protocol.Internal.Types.EditRangeWithInsertReplace+ Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+ Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+ Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+ Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+ Language.LSP.Protocol.Internal.Types.ExecutionSummary+ Language.LSP.Protocol.Internal.Types.FailureHandlingKind+ Language.LSP.Protocol.Internal.Types.FileChangeType+ Language.LSP.Protocol.Internal.Types.FileCreate+ Language.LSP.Protocol.Internal.Types.FileDelete+ Language.LSP.Protocol.Internal.Types.FileEvent+ Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+ Language.LSP.Protocol.Internal.Types.FileOperationFilter+ Language.LSP.Protocol.Internal.Types.FileOperationOptions+ Language.LSP.Protocol.Internal.Types.FileOperationPattern+ Language.LSP.Protocol.Internal.Types.FileOperationPatternKind+ Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+ Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+ Language.LSP.Protocol.Internal.Types.FileRename+ Language.LSP.Protocol.Internal.Types.FileSystemWatcher+ Language.LSP.Protocol.Internal.Types.FoldingRange+ Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+ Language.LSP.Protocol.Internal.Types.FoldingRangeKind+ Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+ Language.LSP.Protocol.Internal.Types.FoldingRangeParams+ Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+ Language.LSP.Protocol.Internal.Types.FormattingOptions+ Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+ Language.LSP.Protocol.Internal.Types.GlobPattern+ Language.LSP.Protocol.Internal.Types.Hover+ Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+ Language.LSP.Protocol.Internal.Types.HoverOptions+ Language.LSP.Protocol.Internal.Types.HoverParams+ Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+ Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+ Language.LSP.Protocol.Internal.Types.ImplementationOptions+ Language.LSP.Protocol.Internal.Types.ImplementationParams+ Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+ Language.LSP.Protocol.Internal.Types.InitializedParams+ Language.LSP.Protocol.Internal.Types.InitializeError+ Language.LSP.Protocol.Internal.Types.InitializeParams+ Language.LSP.Protocol.Internal.Types.InitializeResult+ Language.LSP.Protocol.Internal.Types.InlayHint+ Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+ Language.LSP.Protocol.Internal.Types.InlayHintKind+ Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+ Language.LSP.Protocol.Internal.Types.InlayHintOptions+ Language.LSP.Protocol.Internal.Types.InlayHintParams+ Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+ Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.InlineValue+ Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+ Language.LSP.Protocol.Internal.Types.InlineValueContext+ Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+ Language.LSP.Protocol.Internal.Types.InlineValueOptions+ Language.LSP.Protocol.Internal.Types.InlineValueParams+ Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+ Language.LSP.Protocol.Internal.Types.InlineValueText+ Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+ Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+ Language.LSP.Protocol.Internal.Types.InsertTextFormat+ Language.LSP.Protocol.Internal.Types.InsertTextMode+ Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+ Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+ Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+ Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+ Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+ Language.LSP.Protocol.Internal.Types.Location+ Language.LSP.Protocol.Internal.Types.LocationLink+ Language.LSP.Protocol.Internal.Types.LogMessageParams+ Language.LSP.Protocol.Internal.Types.LogTraceParams+ Language.LSP.Protocol.Internal.Types.LSPErrorCodes+ Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+ Language.LSP.Protocol.Internal.Types.MarkedString+ Language.LSP.Protocol.Internal.Types.MarkupContent+ Language.LSP.Protocol.Internal.Types.MarkupKind+ Language.LSP.Protocol.Internal.Types.MessageActionItem+ Language.LSP.Protocol.Internal.Types.MessageType+ Language.LSP.Protocol.Internal.Types.Moniker+ Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+ Language.LSP.Protocol.Internal.Types.MonikerKind+ Language.LSP.Protocol.Internal.Types.MonikerOptions+ Language.LSP.Protocol.Internal.Types.MonikerParams+ Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+ Language.LSP.Protocol.Internal.Types.NotebookCell+ Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+ Language.LSP.Protocol.Internal.Types.NotebookCellKind+ Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+ Language.LSP.Protocol.Internal.Types.NotebookDocument+ Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+ Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+ Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+ Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+ Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+ Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+ Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+ Language.LSP.Protocol.Internal.Types.ParameterInformation+ Language.LSP.Protocol.Internal.Types.PartialResultParams+ Language.LSP.Protocol.Internal.Types.Pattern+ Language.LSP.Protocol.Internal.Types.Position+ Language.LSP.Protocol.Internal.Types.PositionEncodingKind+ Language.LSP.Protocol.Internal.Types.PrepareRenameParams+ Language.LSP.Protocol.Internal.Types.PrepareRenameResult+ Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior+ Language.LSP.Protocol.Internal.Types.PreviousResultId+ Language.LSP.Protocol.Internal.Types.ProgressParams+ Language.LSP.Protocol.Internal.Types.ProgressToken+ Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+ Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+ Language.LSP.Protocol.Internal.Types.Range+ Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+ Language.LSP.Protocol.Internal.Types.ReferenceContext+ Language.LSP.Protocol.Internal.Types.ReferenceOptions+ Language.LSP.Protocol.Internal.Types.ReferenceParams+ Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+ Language.LSP.Protocol.Internal.Types.Registration+ Language.LSP.Protocol.Internal.Types.RegistrationParams+ Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+ Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.RelativePattern+ Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+ Language.LSP.Protocol.Internal.Types.RenameFile+ Language.LSP.Protocol.Internal.Types.RenameFileOptions+ Language.LSP.Protocol.Internal.Types.RenameFilesParams+ Language.LSP.Protocol.Internal.Types.RenameOptions+ Language.LSP.Protocol.Internal.Types.RenameParams+ Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+ Language.LSP.Protocol.Internal.Types.ResourceOperation+ Language.LSP.Protocol.Internal.Types.ResourceOperationKind+ Language.LSP.Protocol.Internal.Types.SaveOptions+ Language.LSP.Protocol.Internal.Types.SelectionRange+ Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+ Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+ Language.LSP.Protocol.Internal.Types.SelectionRangeParams+ Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+ Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers+ Language.LSP.Protocol.Internal.Types.SemanticTokens+ Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+ Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+ Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+ Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult+ Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+ Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+ Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+ Language.LSP.Protocol.Internal.Types.SemanticTokensParams+ Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult+ Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+ Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+ Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.SemanticTokenTypes+ Language.LSP.Protocol.Internal.Types.ServerCapabilities+ Language.LSP.Protocol.Internal.Types.SetTraceParams+ Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+ Language.LSP.Protocol.Internal.Types.ShowDocumentParams+ Language.LSP.Protocol.Internal.Types.ShowDocumentResult+ Language.LSP.Protocol.Internal.Types.ShowMessageParams+ Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+ Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+ Language.LSP.Protocol.Internal.Types.SignatureHelp+ Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+ Language.LSP.Protocol.Internal.Types.SignatureHelpContext+ Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+ Language.LSP.Protocol.Internal.Types.SignatureHelpParams+ Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+ Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind+ Language.LSP.Protocol.Internal.Types.SignatureInformation+ Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions+ Language.LSP.Protocol.Internal.Types.SymbolInformation+ Language.LSP.Protocol.Internal.Types.SymbolKind+ Language.LSP.Protocol.Internal.Types.SymbolTag+ Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+ Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+ Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+ Language.LSP.Protocol.Internal.Types.TextDocumentEdit+ Language.LSP.Protocol.Internal.Types.TextDocumentFilter+ Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+ Language.LSP.Protocol.Internal.Types.TextDocumentItem+ Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams+ Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+ Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason+ Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+ Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+ Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+ Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+ Language.LSP.Protocol.Internal.Types.TextEdit+ Language.LSP.Protocol.Internal.Types.TokenFormat+ Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+ Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+ Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+ Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+ Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+ Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+ Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+ Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+ Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+ Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+ Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+ Language.LSP.Protocol.Internal.Types.UInitializeParams+ Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.UniquenessLevel+ Language.LSP.Protocol.Internal.Types.Unregistration+ Language.LSP.Protocol.Internal.Types.UnregistrationParams+ Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+ Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+ Language.LSP.Protocol.Internal.Types.WatchKind+ Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+ Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams+ Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport+ Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+ Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+ Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+ Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult+ Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.WorkspaceEdit+ Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+ Language.LSP.Protocol.Internal.Types.WorkspaceFolder+ Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+ Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams+ Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+ Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+ Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+ Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+ Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+ Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+ Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport+ Language.LSP.Protocol.Internal.Types.ChangeAnnotationsSupportOptions+ Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions+ Language.LSP.Protocol.Internal.Types.ClientCodeActionLiteralOptions+ Language.LSP.Protocol.Internal.Types.ClientCodeActionResolveOptions+ Language.LSP.Protocol.Internal.Types.ClientCompletionItemInsertTextModeOptions+ Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptions+ Language.LSP.Protocol.Internal.Types.ClientCompletionItemOptionsKind+ Language.LSP.Protocol.Internal.Types.ClientCompletionItemResolveOptions+ Language.LSP.Protocol.Internal.Types.ClientDiagnosticsTagOptions+ Language.LSP.Protocol.Internal.Types.ClientFoldingRangeKindOptions+ Language.LSP.Protocol.Internal.Types.ClientFoldingRangeOptions+ Language.LSP.Protocol.Internal.Types.ClientInfo+ Language.LSP.Protocol.Internal.Types.ClientInlayHintResolveOptions+ Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta+ Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestOptions+ Language.LSP.Protocol.Internal.Types.ClientShowMessageActionItemOptions+ Language.LSP.Protocol.Internal.Types.ClientSignatureInformationOptions+ Language.LSP.Protocol.Internal.Types.ClientSignatureParameterInformationOptions+ Language.LSP.Protocol.Internal.Types.ClientSymbolKindOptions+ Language.LSP.Protocol.Internal.Types.ClientSymbolResolveOptions+ Language.LSP.Protocol.Internal.Types.ClientSymbolTagOptions+ Language.LSP.Protocol.Internal.Types.CodeActionDisabled+ Language.LSP.Protocol.Internal.Types.CompletionItemDefaults+ Language.LSP.Protocol.Internal.Types.CompletionItemTagOptions+ Language.LSP.Protocol.Internal.Types.CompletionListCapabilities+ Language.LSP.Protocol.Internal.Types.LanguageKind+ Language.LSP.Protocol.Internal.Types.LocationUriOnly+ Language.LSP.Protocol.Internal.Types.MarkedStringWithLanguage+ Language.LSP.Protocol.Internal.Types.NotebookCellLanguage+ Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChangeStructure+ Language.LSP.Protocol.Internal.Types.NotebookDocumentCellChanges+ Language.LSP.Protocol.Internal.Types.NotebookDocumentCellContentChanges+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterNotebookType+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterPattern+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterScheme+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithCells+ Language.LSP.Protocol.Internal.Types.NotebookDocumentFilterWithNotebook+ Language.LSP.Protocol.Internal.Types.PrepareRenameDefaultBehavior+ Language.LSP.Protocol.Internal.Types.PrepareRenamePlaceholder+ Language.LSP.Protocol.Internal.Types.RegularExpressionEngineKind+ Language.LSP.Protocol.Internal.Types.SemanticTokensFullDelta+ Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions+ Language.LSP.Protocol.Internal.Types.ServerInfo+ Language.LSP.Protocol.Internal.Types.StaleRequestSupportOptions+ Language.LSP.Protocol.Internal.Types.TextDocumentContentChangePartial+ Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeWholeDocument+ Language.LSP.Protocol.Internal.Types.TextDocumentFilterLanguage+ Language.LSP.Protocol.Internal.Types.TextDocumentFilterPattern+ Language.LSP.Protocol.Internal.Types.TextDocumentFilterScheme+ Language.LSP.Protocol.Internal.Types.TraceValue+ Language.LSP.Protocol.Internal.Types.WorkspaceOptions++library metamodel+ import: warnings+ -- We don't currently re-export this from the main+ -- library, but it's here if people want it+ visibility: public+ hs-source-dirs: metamodel+ default-language: GHC2021 default-extensions:- DuplicateRecordFields StrictData + exposed-modules:+ Language.LSP.MetaModel+ Language.LSP.MetaModel.Types++ build-depends:+ , aeson >=2+ , base >=4.11 && <5+ , file-embed ^>=0.0.15+ , lens >=5.1 && <5.4+ , template-haskell >=2.7 && <2.25+ , text >=1 && <2.2++library lsp-types-quickcheck+ import: warnings+ visibility: public+ hs-source-dirs: quickcheck generated+ default-language: GHC2021+ default-extensions:+ StrictData+ DerivingVia+ DerivingStrategies++ exposed-modules:+ Language.LSP.Protocol.QuickCheck++ other-modules:+ Language.LSP.Protocol.QuickCheck.Common+ Language.LSP.Protocol.QuickCheck.Message+ Language.LSP.Protocol.QuickCheck.Types++ build-depends:+ , base >=4.11 && <5+ , lsp-types+ , row-types+ , QuickCheck+ , quickcheck-instances+ , generic-arbitrary+ , template-haskell++executable generator+ hs-source-dirs: generator+ default-language: GHC2021+ default-extensions:+ StrictData++ main-is: Main.hs+ other-modules: CodeGen+ build-depends:+ , base+ , containers+ , directory+ , filepath+ , lsp-types:metamodel+ , mtl+ , prettyprinter+ , regex+ , text+ , witherable+ test-suite lsp-types-test- type: exitcode-stdio-1.0- hs-source-dirs: test- main-is: Main.hs- other-modules: Spec- CapabilitiesSpec- JsonSpec- MethodSpec- ServerCapabilitiesSpec- SemanticTokensSpec- TypesSpec- URIFilePathSpec- WorkspaceEditSpec- LocationSpec- build-depends: base- , QuickCheck- -- for instance Arbitrary Value- , aeson >= 2.0.3.0- , filepath- , hspec- , lsp-types- , lens >= 4.15.2- , network-uri- , quickcheck-instances- , text- , tuple- build-tool-depends: hspec-discover:hspec-discover- ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall- default-language: Haskell2010+ import: warnings+ type: exitcode-stdio-1.0+ hs-source-dirs: test+ default-language: GHC2021+ main-is: Main.hs+ other-modules:+ CapabilitiesSpec+ JsonSpec+ LocationSpec+ MethodSpec+ SemanticTokensSpec+ ServerCapabilitiesSpec+ Spec+ TypesSpec+ URIFilePathSpec+ WorkspaceEditSpec -source-repository head- type: git- location: https://github.com/haskell/lsp+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall+ build-depends:+ , aeson+ , base+ , filepath+ , hspec+ , hspec-golden+ , lens+ , lsp-types+ , lsp-types-quickcheck+ , network-uri+ , prettyprinter+ , QuickCheck+ , quickcheck-instances+ , text++ build-tool-depends: hspec-discover:hspec-discover
+ metaModel.json view
@@ -0,0 +1,15385 @@+{+ "metaData": {+ "version": "3.17.0"+ },+ "requests": [+ {+ "method": "textDocument/implementation",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Definition"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "ImplementationParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "ImplementationRegistrationOptions"+ },+ "documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/typeDefinition",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Definition"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "TypeDefinitionParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TypeDefinitionRegistrationOptions"+ },+ "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such."+ },+ {+ "method": "workspace/workspaceFolders",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceFolder"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "serverToClient",+ "documentation": "The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders."+ },+ {+ "method": "workspace/configuration",+ "result": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "LSPAny"+ }+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "ConfigurationParams"+ },+ "documentation": "The 'workspace/configuration' request is sent from the server to the client to fetch a certain\nconfiguration setting.\n\nThis pull model replaces the old push model were the client signaled configuration change via an\nevent. If the server still needs to react to configuration changes (since the server caches the\nresult of `workspace/configuration` requests) the server should register for an empty configuration\nchange event and empty the cache if such an event is received."+ },+ {+ "method": "textDocument/documentColor",+ "result": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ColorInformation"+ }+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentColorParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ColorInformation"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentColorRegistrationOptions"+ },+ "documentation": "A request to list all color symbols found in a given text document. The request's\nparameter is of type {@link DocumentColorParams} the\nresponse is of type {@link ColorInformation ColorInformation[]} or a Thenable\nthat resolves to such."+ },+ {+ "method": "textDocument/colorPresentation",+ "result": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ColorPresentation"+ }+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "ColorPresentationParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ColorPresentation"+ }+ },+ "registrationOptions": {+ "kind": "and",+ "items": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ]+ },+ "documentation": "A request to list all presentation for a color. The request's\nparameter is of type {@link ColorPresentationParams} the\nresponse is of type {@link ColorInformation ColorInformation[]} or a Thenable\nthat resolves to such."+ },+ {+ "method": "textDocument/foldingRange",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FoldingRange"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "FoldingRangeParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FoldingRange"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FoldingRangeRegistrationOptions"+ },+ "documentation": "A request to provide folding ranges in a document. The request's\nparameter is of type {@link FoldingRangeParams}, the\nresponse is of type {@link FoldingRangeList} or a Thenable\nthat resolves to such."+ },+ {+ "method": "workspace/foldingRange/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "method": "textDocument/declaration",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Declaration"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DeclarationLink"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DeclarationParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DeclarationLink"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DeclarationRegistrationOptions"+ },+ "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Declaration} or a typed array of {@link DeclarationLink}\nor a Thenable that resolves to such."+ },+ {+ "method": "textDocument/selectionRange",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SelectionRange"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SelectionRangeParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SelectionRange"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "SelectionRangeRegistrationOptions"+ },+ "documentation": "A request to provide selection ranges in a document. The request's\nparameter is of type {@link SelectionRangeParams}, the\nresponse is of type {@link SelectionRange SelectionRange[]} or a Thenable\nthat resolves to such."+ },+ {+ "method": "window/workDoneProgress/create",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "WorkDoneProgressCreateParams"+ },+ "documentation": "The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress\nreporting from the server."+ },+ {+ "method": "textDocument/prepareCallHierarchy",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CallHierarchyItem"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CallHierarchyPrepareParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "CallHierarchyRegistrationOptions"+ },+ "documentation": "A request to result a `CallHierarchyItem` in a document at a given position.\nCan be used as an input to an incoming or outgoing call hierarchy.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "callHierarchy/incomingCalls",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CallHierarchyIncomingCall"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CallHierarchyIncomingCallsParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CallHierarchyIncomingCall"+ }+ },+ "documentation": "A request to resolve the incoming calls for a given `CallHierarchyItem`.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "callHierarchy/outgoingCalls",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CallHierarchyOutgoingCall"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CallHierarchyOutgoingCallsParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CallHierarchyOutgoingCall"+ }+ },+ "documentation": "A request to resolve the outgoing calls for a given `CallHierarchyItem`.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/semanticTokens/full",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SemanticTokens"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SemanticTokensParams"+ },+ "partialResult": {+ "kind": "reference",+ "name": "SemanticTokensPartialResult"+ },+ "registrationMethod": "textDocument/semanticTokens",+ "registrationOptions": {+ "kind": "reference",+ "name": "SemanticTokensRegistrationOptions"+ },+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/semanticTokens/full/delta",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SemanticTokens"+ },+ {+ "kind": "reference",+ "name": "SemanticTokensDelta"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SemanticTokensDeltaParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SemanticTokensPartialResult"+ },+ {+ "kind": "reference",+ "name": "SemanticTokensDeltaPartialResult"+ }+ ]+ },+ "registrationMethod": "textDocument/semanticTokens",+ "registrationOptions": {+ "kind": "reference",+ "name": "SemanticTokensRegistrationOptions"+ },+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/semanticTokens/range",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SemanticTokens"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SemanticTokensRangeParams"+ },+ "partialResult": {+ "kind": "reference",+ "name": "SemanticTokensPartialResult"+ },+ "registrationMethod": "textDocument/semanticTokens",+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/semanticTokens/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "window/showDocument",+ "result": {+ "kind": "reference",+ "name": "ShowDocumentResult"+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "ShowDocumentParams"+ },+ "documentation": "A request to show a document. This request might open an\nexternal program depending on the value of the URI to open.\nFor example a request to open `https://code.visualstudio.com/`\nwill very likely open the URI in a WEB browser.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/linkedEditingRange",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "LinkedEditingRanges"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "LinkedEditingRangeParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "LinkedEditingRangeRegistrationOptions"+ },+ "documentation": "A request to provide ranges that can be edited together.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/willCreateFiles",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CreateFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The will create files request is sent from the client to the server before files are actually\ncreated as long as the creation is triggered from within the client.\n\nThe request can return a `WorkspaceEdit` which will be applied to workspace before the\nfiles are created. Hence the `WorkspaceEdit` can not manipulate the content of the file\nto be created.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/willRenameFiles",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "RenameFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The will rename files request is sent from the client to the server before files are actually\nrenamed as long as the rename is triggered from within the client.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/willDeleteFiles",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DeleteFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The did delete files notification is sent from the client to the server when\nfiles were deleted from within the client.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/moniker",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Moniker"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "MonikerParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Moniker"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "MonikerRegistrationOptions"+ },+ "documentation": "A request to get the moniker of a symbol at a given text document position.\nThe request parameter is of type {@link TextDocumentPositionParams}.\nThe response is of type {@link Moniker Moniker[]} or `null`."+ },+ {+ "method": "textDocument/prepareTypeHierarchy",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "TypeHierarchyPrepareParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TypeHierarchyRegistrationOptions"+ },+ "documentation": "A request to result a `TypeHierarchyItem` in a document at a given position.\nCan be used as an input to a subtypes or supertypes type hierarchy.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "typeHierarchy/supertypes",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "TypeHierarchySupertypesParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ },+ "documentation": "A request to resolve the supertypes for a given `TypeHierarchyItem`.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "typeHierarchy/subtypes",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "TypeHierarchySubtypesParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ },+ "documentation": "A request to resolve the subtypes for a given `TypeHierarchyItem`.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "textDocument/inlineValue",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlineValue"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InlineValueParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlineValue"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "InlineValueRegistrationOptions"+ },+ "documentation": "A request to provide inline values in a document. The request's parameter is of\ntype {@link InlineValueParams}, the response is of type\n{@link InlineValue InlineValue[]} or a Thenable that resolves to such.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "workspace/inlineValue/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "textDocument/inlayHint",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlayHint"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InlayHintParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlayHint"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "InlayHintRegistrationOptions"+ },+ "documentation": "A request to provide inlay hints in a document. The request's parameter is of\ntype {@link InlayHintsParams}, the response is of type\n{@link InlayHint InlayHint[]} or a Thenable that resolves to such.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "inlayHint/resolve",+ "result": {+ "kind": "reference",+ "name": "InlayHint"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InlayHint"+ },+ "documentation": "A request to resolve additional properties for an inlay hint.\nThe request's parameter is of type {@link InlayHint}, the response is\nof type {@link InlayHint} or a Thenable that resolves to such.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "workspace/inlayHint/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "textDocument/diagnostic",+ "result": {+ "kind": "reference",+ "name": "DocumentDiagnosticReport"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentDiagnosticParams"+ },+ "partialResult": {+ "kind": "reference",+ "name": "DocumentDiagnosticReportPartialResult"+ },+ "errorData": {+ "kind": "reference",+ "name": "DiagnosticServerCancellationData"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DiagnosticRegistrationOptions"+ },+ "documentation": "The document diagnostic request definition.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "workspace/diagnostic",+ "result": {+ "kind": "reference",+ "name": "WorkspaceDiagnosticReport"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WorkspaceDiagnosticParams"+ },+ "partialResult": {+ "kind": "reference",+ "name": "WorkspaceDiagnosticReportPartialResult"+ },+ "errorData": {+ "kind": "reference",+ "name": "DiagnosticServerCancellationData"+ },+ "documentation": "The workspace diagnostic request definition.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "workspace/diagnostic/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "The diagnostic refresh request definition.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "textDocument/inlineCompletion",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "InlineCompletionList"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlineCompletionItem"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InlineCompletionParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlineCompletionItem"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "InlineCompletionRegistrationOptions"+ },+ "documentation": "A request to provide inline completions in a document. The request's parameter is of\ntype {@link InlineCompletionParams}, the response is of type\n{@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "method": "client/registerCapability",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "RegistrationParams"+ },+ "documentation": "The `client/registerCapability` request is sent from the server to the client to register a new capability\nhandler on the client side."+ },+ {+ "method": "client/unregisterCapability",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "UnregistrationParams"+ },+ "documentation": "The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability\nhandler on the client side."+ },+ {+ "method": "initialize",+ "result": {+ "kind": "reference",+ "name": "InitializeResult"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InitializeParams"+ },+ "errorData": {+ "kind": "reference",+ "name": "InitializeError"+ },+ "documentation": "The initialize request is sent from the client to the server.\nIt is sent once as the request after starting up the server.\nThe requests parameter is of type {@link InitializeParams}\nthe response if of type {@link InitializeResult} of a Thenable that\nresolves to such."+ },+ {+ "method": "shutdown",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "clientToServer",+ "documentation": "A shutdown request is sent from the client to the server.\nIt is sent once when the client decides to shutdown the\nserver. The only notification that is sent after a shutdown request\nis the exit event."+ },+ {+ "method": "window/showMessageRequest",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "MessageActionItem"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "ShowMessageRequestParams"+ },+ "documentation": "The show message request is sent from the server to the client to show a message\nand a set of options actions to the user."+ },+ {+ "method": "textDocument/willSaveWaitUntil",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WillSaveTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ "documentation": "A document will save request is sent from the client to the server before\nthe document is actually saved. The request can return an array of TextEdits\nwhich will be applied to the text document before it is saved. Please note that\nclients might drop results if computing the text edits took too long or if a\nserver constantly fails on this request. This is done to keep the save fast and\nreliable."+ },+ {+ "method": "textDocument/completion",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItem"+ }+ },+ {+ "kind": "reference",+ "name": "CompletionList"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CompletionParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItem"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "CompletionRegistrationOptions"+ },+ "documentation": "Request to request completion at a given text document position. The request's\nparameter is of type {@link TextDocumentPosition} the response\nis of type {@link CompletionItem CompletionItem[]} or {@link CompletionList}\nor a Thenable that resolves to such.\n\nThe request can delay the computation of the {@link CompletionItem.detail `detail`}\nand {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve`\nrequest. However, properties that are needed for the initial sorting and filtering, like `sortText`,\n`filterText`, `insertText`, and `textEdit`, must not be changed during resolve."+ },+ {+ "method": "completionItem/resolve",+ "result": {+ "kind": "reference",+ "name": "CompletionItem"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CompletionItem"+ },+ "documentation": "Request to resolve additional information for a given completion item.The request's\nparameter is of type {@link CompletionItem} the response\nis of type {@link CompletionItem} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/hover",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Hover"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "HoverParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "HoverRegistrationOptions"+ },+ "documentation": "Request to request hover information at a given text document position. The request's\nparameter is of type {@link TextDocumentPosition} the response is of\ntype {@link Hover} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/signatureHelp",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SignatureHelp"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SignatureHelpParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "SignatureHelpRegistrationOptions"+ }+ },+ {+ "method": "textDocument/definition",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Definition"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DefinitionParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DefinitionLink"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DefinitionRegistrationOptions"+ },+ "documentation": "A request to resolve the definition location of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPosition}\nthe response is of either type {@link Definition} or a typed array of\n{@link DefinitionLink} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/references",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "ReferenceParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "ReferenceRegistrationOptions"+ },+ "documentation": "A request to resolve project-wide references for the symbol denoted\nby the given text document position. The request's parameter is of\ntype {@link ReferenceParams} the response is of type\n{@link Location Location[]} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/documentHighlight",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentHighlight"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentHighlightParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentHighlight"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentHighlightRegistrationOptions"+ },+ "documentation": "Request to resolve a {@link DocumentHighlight} for a given\ntext document position. The request's parameter is of type {@link TextDocumentPosition}\nthe request response is an array of type {@link DocumentHighlight}\nor a Thenable that resolves to such."+ },+ {+ "method": "textDocument/documentSymbol",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolInformation"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentSymbol"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentSymbolParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolInformation"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentSymbol"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentSymbolRegistrationOptions"+ },+ "documentation": "A request to list all symbols found in a given text document. The request's\nparameter is of type {@link TextDocumentIdentifier} the\nresponse is of type {@link SymbolInformation SymbolInformation[]} or a Thenable\nthat resolves to such."+ },+ {+ "method": "textDocument/codeAction",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Command"+ },+ {+ "kind": "reference",+ "name": "CodeAction"+ }+ ]+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CodeActionParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Command"+ },+ {+ "kind": "reference",+ "name": "CodeAction"+ }+ ]+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "CodeActionRegistrationOptions"+ },+ "documentation": "A request to provide commands for the given text document and range."+ },+ {+ "method": "codeAction/resolve",+ "result": {+ "kind": "reference",+ "name": "CodeAction"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CodeAction"+ },+ "documentation": "Request to resolve additional information for a given code action.The request's\nparameter is of type {@link CodeAction} the response\nis of type {@link CodeAction} or a Thenable that resolves to such."+ },+ {+ "method": "workspace/symbol",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolInformation"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceSymbol"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WorkspaceSymbolParams"+ },+ "partialResult": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolInformation"+ }+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceSymbol"+ }+ }+ ]+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "WorkspaceSymbolRegistrationOptions"+ },+ "documentation": "A request to list project-wide symbols matching the query string given\nby the {@link WorkspaceSymbolParams}. The response is\nof type {@link SymbolInformation SymbolInformation[]} or a Thenable that\nresolves to such.\n\n@since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients\n need to advertise support for WorkspaceSymbols via the client capability\n `workspace.symbol.resolveSupport`.\n",+ "since": "3.17.0 - support for WorkspaceSymbol in the returned data. Clients\nneed to advertise support for WorkspaceSymbols via the client capability\n`workspace.symbol.resolveSupport`."+ },+ {+ "method": "workspaceSymbol/resolve",+ "result": {+ "kind": "reference",+ "name": "WorkspaceSymbol"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WorkspaceSymbol"+ },+ "documentation": "A request to resolve the range inside the workspace\nsymbol's location.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "textDocument/codeLens",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeLens"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CodeLensParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeLens"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "CodeLensRegistrationOptions"+ },+ "documentation": "A request to provide code lens for the given text document."+ },+ {+ "method": "codeLens/resolve",+ "result": {+ "kind": "reference",+ "name": "CodeLens"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CodeLens"+ },+ "documentation": "A request to resolve a command for a given code lens."+ },+ {+ "method": "workspace/codeLens/refresh",+ "result": {+ "kind": "base",+ "name": "null"+ },+ "messageDirection": "serverToClient",+ "documentation": "A request to refresh all code actions\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "textDocument/documentLink",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentLink"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentLinkParams"+ },+ "partialResult": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentLink"+ }+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentLinkRegistrationOptions"+ },+ "documentation": "A request to provide document links"+ },+ {+ "method": "documentLink/resolve",+ "result": {+ "kind": "reference",+ "name": "DocumentLink"+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentLink"+ },+ "documentation": "Request to resolve additional information for a given document link. The request's\nparameter is of type {@link DocumentLink} the response\nis of type {@link DocumentLink} or a Thenable that resolves to such."+ },+ {+ "method": "textDocument/formatting",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentFormattingParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentFormattingRegistrationOptions"+ },+ "documentation": "A request to format a whole document."+ },+ {+ "method": "textDocument/rangeFormatting",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentRangeFormattingParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentRangeFormattingRegistrationOptions"+ },+ "documentation": "A request to format a range in a document."+ },+ {+ "method": "textDocument/rangesFormatting",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentRangesFormattingParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentRangeFormattingRegistrationOptions"+ },+ "documentation": "A request to format ranges in a document.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "method": "textDocument/onTypeFormatting",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DocumentOnTypeFormattingParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DocumentOnTypeFormattingRegistrationOptions"+ },+ "documentation": "A request to format a document on type."+ },+ {+ "method": "textDocument/rename",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "RenameParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "RenameRegistrationOptions"+ },+ "documentation": "A request to rename a symbol."+ },+ {+ "method": "textDocument/prepareRename",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "PrepareRenameResult"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "PrepareRenameParams"+ },+ "documentation": "A request to test and perform the setup necessary for a rename.\n\n@since 3.16 - support for default behavior",+ "since": "3.16 - support for default behavior"+ },+ {+ "method": "workspace/executeCommand",+ "result": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "LSPAny"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "ExecuteCommandParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "ExecuteCommandRegistrationOptions"+ },+ "documentation": "A request send from the client to the server to execute a command. The request might return\na workspace edit which the client will apply to the workspace."+ },+ {+ "method": "workspace/applyEdit",+ "result": {+ "kind": "reference",+ "name": "ApplyWorkspaceEditResult"+ },+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "ApplyWorkspaceEditParams"+ },+ "documentation": "A request sent from the server to the client to modified certain resources."+ }+ ],+ "notifications": [+ {+ "method": "workspace/didChangeWorkspaceFolders",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidChangeWorkspaceFoldersParams"+ },+ "documentation": "The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace\nfolder configuration changes."+ },+ {+ "method": "window/workDoneProgress/cancel",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WorkDoneProgressCancelParams"+ },+ "documentation": "The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress\ninitiated on the server side."+ },+ {+ "method": "workspace/didCreateFiles",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "CreateFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The did create files notification is sent from the client to the server when\nfiles were created from within the client.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/didRenameFiles",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "RenameFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The did rename files notification is sent from the client to the server when\nfiles were renamed from within the client.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "workspace/didDeleteFiles",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DeleteFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "documentation": "The will delete files request is sent from the client to the server before files are actually\ndeleted as long as the deletion is triggered from within the client.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "method": "notebookDocument/didOpen",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidOpenNotebookDocumentParams"+ },+ "registrationMethod": "notebookDocument/sync",+ "registrationOptions": {+ "kind": "reference",+ "name": "NotebookDocumentSyncRegistrationOptions"+ },+ "documentation": "A notification sent when a notebook opens.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "notebookDocument/didChange",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidChangeNotebookDocumentParams"+ },+ "registrationMethod": "notebookDocument/sync",+ "registrationOptions": {+ "kind": "reference",+ "name": "NotebookDocumentSyncRegistrationOptions"+ }+ },+ {+ "method": "notebookDocument/didSave",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidSaveNotebookDocumentParams"+ },+ "registrationMethod": "notebookDocument/sync",+ "registrationOptions": {+ "kind": "reference",+ "name": "NotebookDocumentSyncRegistrationOptions"+ },+ "documentation": "A notification sent when a notebook document is saved.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "notebookDocument/didClose",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidCloseNotebookDocumentParams"+ },+ "registrationMethod": "notebookDocument/sync",+ "registrationOptions": {+ "kind": "reference",+ "name": "NotebookDocumentSyncRegistrationOptions"+ },+ "documentation": "A notification sent when a notebook closes.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "method": "initialized",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "InitializedParams"+ },+ "documentation": "The initialized notification is sent from the client to the\nserver after the client is fully initialized and the server\nis allowed to send requests from the server to the client."+ },+ {+ "method": "exit",+ "messageDirection": "clientToServer",+ "documentation": "The exit event is sent from the client to the server to\nask the server to exit its process."+ },+ {+ "method": "workspace/didChangeConfiguration",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidChangeConfigurationParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DidChangeConfigurationRegistrationOptions"+ },+ "documentation": "The configuration change notification is sent from the client to the server\nwhen the client's configuration has changed. The notification contains\nthe changed configuration as defined by the language client."+ },+ {+ "method": "window/showMessage",+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "ShowMessageParams"+ },+ "documentation": "The show message notification is sent from a server to a client to ask\nthe client to display a particular message in the user interface."+ },+ {+ "method": "window/logMessage",+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "LogMessageParams"+ },+ "documentation": "The log message notification is sent from the server to the client to ask\nthe client to log a particular message."+ },+ {+ "method": "telemetry/event",+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "documentation": "The telemetry event notification is sent from the server to the client to ask\nthe client to log telemetry data."+ },+ {+ "method": "textDocument/didOpen",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidOpenTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ "documentation": "The document open notification is sent from the client to the server to signal\nnewly opened text documents. The document's truth is now managed by the client\nand the server must not try to read the document's truth using the document's\nuri. Open in this sense means it is managed by the client. It doesn't necessarily\nmean that its content is presented in an editor. An open notification must not\nbe sent more than once without a corresponding close notification send before.\nThis means open and close notification must be balanced and the max open count\nis one."+ },+ {+ "method": "textDocument/didChange",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidChangeTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentChangeRegistrationOptions"+ },+ "documentation": "The document change notification is sent from the client to the server to signal\nchanges to a text document."+ },+ {+ "method": "textDocument/didClose",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidCloseTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ "documentation": "The document close notification is sent from the client to the server when\nthe document got closed in the client. The document's truth now exists where\nthe document's uri points to (e.g. if the document's uri is a file uri the\ntruth now exists on disk). As with the open notification the close notification\nis about managing the document's content. Receiving a close notification\ndoesn't mean that the document was open in an editor before. A close\nnotification requires a previous open notification to be sent."+ },+ {+ "method": "textDocument/didSave",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidSaveTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentSaveRegistrationOptions"+ },+ "documentation": "The document save notification is sent from the client to the server when\nthe document got saved in the client."+ },+ {+ "method": "textDocument/willSave",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "WillSaveTextDocumentParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ "documentation": "A document will save notification is sent from the client to the server before\nthe document is actually saved."+ },+ {+ "method": "workspace/didChangeWatchedFiles",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "DidChangeWatchedFilesParams"+ },+ "registrationOptions": {+ "kind": "reference",+ "name": "DidChangeWatchedFilesRegistrationOptions"+ },+ "documentation": "The watched files notification is sent from the client to the server when\nthe client detects changes to file watched by the language client."+ },+ {+ "method": "textDocument/publishDiagnostics",+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "PublishDiagnosticsParams"+ },+ "documentation": "Diagnostics notification are sent from the server to the client to signal\nresults of validation runs."+ },+ {+ "method": "$/setTrace",+ "messageDirection": "clientToServer",+ "params": {+ "kind": "reference",+ "name": "SetTraceParams"+ }+ },+ {+ "method": "$/logTrace",+ "messageDirection": "serverToClient",+ "params": {+ "kind": "reference",+ "name": "LogTraceParams"+ }+ },+ {+ "method": "$/cancelRequest",+ "messageDirection": "both",+ "params": {+ "kind": "reference",+ "name": "CancelParams"+ }+ },+ {+ "method": "$/progress",+ "messageDirection": "both",+ "params": {+ "kind": "reference",+ "name": "ProgressParams"+ }+ }+ ],+ "structures": [+ {+ "name": "ImplementationParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ]+ },+ {+ "name": "Location",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ }+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ }+ }+ ],+ "documentation": "Represents a location inside a resource, such as a line\ninside a text file."+ },+ {+ "name": "ImplementationRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "ImplementationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "TypeDefinitionParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ]+ },+ {+ "name": "TypeDefinitionRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "TypeDefinitionOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "WorkspaceFolder",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "The associated URI for this workspace folder."+ },+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of the workspace folder. Used to refer to this\nworkspace folder in the user interface."+ }+ ],+ "documentation": "A workspace folder inside a client."+ },+ {+ "name": "DidChangeWorkspaceFoldersParams",+ "properties": [+ {+ "name": "event",+ "type": {+ "kind": "reference",+ "name": "WorkspaceFoldersChangeEvent"+ },+ "documentation": "The actual workspace folder change event."+ }+ ],+ "documentation": "The parameters of a `workspace/didChangeWorkspaceFolders` notification."+ },+ {+ "name": "ConfigurationParams",+ "properties": [+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ConfigurationItem"+ }+ }+ }+ ],+ "documentation": "The parameters of a configuration request."+ },+ {+ "name": "DocumentColorParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link DocumentColorRequest}."+ },+ {+ "name": "ColorInformation",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range in the document where this color appears."+ },+ {+ "name": "color",+ "type": {+ "kind": "reference",+ "name": "Color"+ },+ "documentation": "The actual color value for this color range."+ }+ ],+ "documentation": "Represents a color range from a document."+ },+ {+ "name": "DocumentColorRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentColorOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "ColorPresentationParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "color",+ "type": {+ "kind": "reference",+ "name": "Color"+ },+ "documentation": "The color to request presentations for."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range where the color would be inserted. Serves as a context."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link ColorPresentationRequest}."+ },+ {+ "name": "ColorPresentation",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The label of this color presentation. It will be shown on the color\npicker header. By default this is also the text that is inserted when selecting\nthis color presentation."+ },+ {+ "name": "textEdit",+ "type": {+ "kind": "reference",+ "name": "TextEdit"+ },+ "optional": true,+ "documentation": "An {@link TextEdit edit} which is applied to a document when selecting\nthis presentation for the color. When `falsy` the {@link ColorPresentation.label label}\nis used."+ },+ {+ "name": "additionalTextEdits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ "optional": true,+ "documentation": "An optional array of additional {@link TextEdit text edits} that are applied when\nselecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves."+ }+ ]+ },+ {+ "name": "WorkDoneProgressOptions",+ "properties": [+ {+ "name": "workDoneProgress",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true+ }+ ]+ },+ {+ "name": "TextDocumentRegistrationOptions",+ "properties": [+ {+ "name": "documentSelector",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "DocumentSelector"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "A document selector to identify the scope of the registration. If set to null\nthe document selector provided on the client side will be used."+ }+ ],+ "documentation": "General text document registration options."+ },+ {+ "name": "FoldingRangeParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link FoldingRangeRequest}."+ },+ {+ "name": "FoldingRange",+ "properties": [+ {+ "name": "startLine",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The zero-based start line of the range to fold. The folded area starts after the line's last character.\nTo be valid, the end must be zero or larger and smaller than the number of lines in the document."+ },+ {+ "name": "startCharacter",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line."+ },+ {+ "name": "endLine",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The zero-based end line of the range to fold. The folded area ends with the line's last character.\nTo be valid, the end must be zero or larger and smaller than the number of lines in the document."+ },+ {+ "name": "endCharacter",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "FoldingRangeKind"+ },+ "optional": true,+ "documentation": "Describes the kind of the folding range such as 'comment' or 'region'. The kind\nis used to categorize folding ranges and used by commands like 'Fold all comments'.\nSee {@link FoldingRangeKind} for an enumeration of standardized kinds."+ },+ {+ "name": "collapsedText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The text that the client should show when the specified range is\ncollapsed. If not defined or not supported by the client, a default\nwill be chosen by the client.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Represents a folding range. To be valid, start and end line must be bigger than zero and smaller\nthan the number of lines in the document. Clients are free to ignore invalid ranges."+ },+ {+ "name": "FoldingRangeRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "FoldingRangeOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "DeclarationParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ]+ },+ {+ "name": "DeclarationRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "DeclarationOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "SelectionRangeParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "positions",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Position"+ }+ },+ "documentation": "The positions inside the text document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "A parameter literal used in selection range requests."+ },+ {+ "name": "SelectionRange",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The {@link Range range} of this selection range."+ },+ {+ "name": "parent",+ "type": {+ "kind": "reference",+ "name": "SelectionRange"+ },+ "optional": true,+ "documentation": "The parent selection range containing this range. Therefore `parent.range` must contain `this.range`."+ }+ ],+ "documentation": "A selection range represents a part of a selection hierarchy. A selection range\nmay have a parent selection range that contains it."+ },+ {+ "name": "SelectionRangeRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "SelectionRangeOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "WorkDoneProgressCreateParams",+ "properties": [+ {+ "name": "token",+ "type": {+ "kind": "reference",+ "name": "ProgressToken"+ },+ "documentation": "The token to be used to report progress."+ }+ ]+ },+ {+ "name": "WorkDoneProgressCancelParams",+ "properties": [+ {+ "name": "token",+ "type": {+ "kind": "reference",+ "name": "ProgressToken"+ },+ "documentation": "The token to be used to report progress."+ }+ ]+ },+ {+ "name": "CallHierarchyPrepareParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameter of a `textDocument/prepareCallHierarchy` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyItem",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of this item."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "SymbolKind"+ },+ "documentation": "The kind of this item."+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolTag"+ }+ },+ "optional": true,+ "documentation": "Tags for this item."+ },+ {+ "name": "detail",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "More detail for this item, e.g. the signature of a function."+ },+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The resource identifier of this item."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code."+ },+ {+ "name": "selectionRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.\nMust be contained by the {@link CallHierarchyItem.range `range`}."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved between a call hierarchy prepare and\nincoming calls or outgoing calls requests."+ }+ ],+ "documentation": "Represents programming constructs like functions or constructors in the context\nof call hierarchy.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "CallHierarchyOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Call hierarchy options used during static or dynamic registration.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyIncomingCallsParams",+ "properties": [+ {+ "name": "item",+ "type": {+ "kind": "reference",+ "name": "CallHierarchyItem"+ }+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameter of a `callHierarchy/incomingCalls` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyIncomingCall",+ "properties": [+ {+ "name": "from",+ "type": {+ "kind": "reference",+ "name": "CallHierarchyItem"+ },+ "documentation": "The item that makes the call."+ },+ {+ "name": "fromRanges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Range"+ }+ },+ "documentation": "The ranges at which the calls appear. This is relative to the caller\ndenoted by {@link CallHierarchyIncomingCall.from `this.from`}."+ }+ ],+ "documentation": "Represents an incoming call, e.g. a caller of a method or constructor.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyOutgoingCallsParams",+ "properties": [+ {+ "name": "item",+ "type": {+ "kind": "reference",+ "name": "CallHierarchyItem"+ }+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameter of a `callHierarchy/outgoingCalls` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CallHierarchyOutgoingCall",+ "properties": [+ {+ "name": "to",+ "type": {+ "kind": "reference",+ "name": "CallHierarchyItem"+ },+ "documentation": "The item that is called."+ },+ {+ "name": "fromRanges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Range"+ }+ },+ "documentation": "The range at which this item is called. This is the range relative to the caller, e.g the item\npassed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`}\nand not {@link CallHierarchyOutgoingCall.to `this.to`}."+ }+ ],+ "documentation": "Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokens",+ "properties": [+ {+ "name": "resultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional result id. If provided and clients support delta updating\nthe client will include the result id in the next semantic token request.\nA server can then instead of computing all semantic tokens again simply\nsend a delta."+ },+ {+ "name": "data",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "uinteger"+ }+ },+ "documentation": "The actual tokens."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensPartialResult",+ "properties": [+ {+ "name": "data",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "uinteger"+ }+ }+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "SemanticTokensOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensDeltaParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "previousResultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The result id of a previous response. The result Id can either point to a full response\nor a delta response depending on what was received last."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensDelta",+ "properties": [+ {+ "name": "resultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true+ },+ {+ "name": "edits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SemanticTokensEdit"+ }+ },+ "documentation": "The semantic token edits to transform a previous result into a new result."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensDeltaPartialResult",+ "properties": [+ {+ "name": "edits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SemanticTokensEdit"+ }+ }+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensRangeParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range the semantic tokens are requested for."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "ShowDocumentParams",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "The uri to show."+ },+ {+ "name": "external",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Indicates to show the resource in an external program.\nTo show, for example, `https://code.visualstudio.com/`\nin the default WEB browser set `external` to `true`."+ },+ {+ "name": "takeFocus",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "An optional property to indicate whether the editor\nshowing the document should take focus or not.\nClients might ignore this property if an external\nprogram is started."+ },+ {+ "name": "selection",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "optional": true,+ "documentation": "An optional selection range if the document is a text\ndocument. Clients might ignore the property if an\nexternal program is started or the file is not a text\nfile."+ }+ ],+ "documentation": "Params to show a resource in the UI.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "ShowDocumentResult",+ "properties": [+ {+ "name": "success",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "A boolean indicating if the show was successful."+ }+ ],+ "documentation": "The result of a showDocument request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "LinkedEditingRangeParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ]+ },+ {+ "name": "LinkedEditingRanges",+ "properties": [+ {+ "name": "ranges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Range"+ }+ },+ "documentation": "A list of ranges that can be edited together. The ranges must have\nidentical length and contain identical text content. The ranges cannot overlap."+ },+ {+ "name": "wordPattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional word pattern (regular expression) that describes valid contents for\nthe given ranges. If no pattern is provided, the client configuration's word\npattern will be used."+ }+ ],+ "documentation": "The result of a linked editing range request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "LinkedEditingRangeRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "LinkedEditingRangeOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ]+ },+ {+ "name": "CreateFilesParams",+ "properties": [+ {+ "name": "files",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileCreate"+ }+ },+ "documentation": "An array of all files/folders created in this operation."+ }+ ],+ "documentation": "The parameters sent in notifications/requests for user-initiated creation of\nfiles.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "WorkspaceEdit",+ "properties": [+ {+ "name": "changes",+ "type": {+ "kind": "map",+ "key": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "value": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ }+ },+ "optional": true,+ "documentation": "Holds changes to existing resources."+ },+ {+ "name": "documentChanges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextDocumentEdit"+ },+ {+ "kind": "reference",+ "name": "CreateFile"+ },+ {+ "kind": "reference",+ "name": "RenameFile"+ },+ {+ "kind": "reference",+ "name": "DeleteFile"+ }+ ]+ }+ },+ "optional": true,+ "documentation": "Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes\nare either an array of `TextDocumentEdit`s to express changes to n different text documents\nwhere each text document edit addresses a specific version of a text document. Or it can contain\nabove `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.\n\nWhether a client supports versioned document edits is expressed via\n`workspace.workspaceEdit.documentChanges` client capability.\n\nIf a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then\nonly plain `TextEdit`s using the `changes` property are supported."+ },+ {+ "name": "changeAnnotations",+ "type": {+ "kind": "map",+ "key": {+ "kind": "reference",+ "name": "ChangeAnnotationIdentifier"+ },+ "value": {+ "kind": "reference",+ "name": "ChangeAnnotation"+ }+ },+ "optional": true,+ "documentation": "A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and\ndelete file / folder operations.\n\nWhether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "A workspace edit represents changes to many resources managed in the workspace. The edit\nshould either provide `changes` or `documentChanges`. If documentChanges are present\nthey are preferred over `changes` if the client can handle versioned document edits.\n\nSince version 3.13.0 a workspace edit can contain resource operations as well. If resource\noperations are present clients need to execute the operations in the order in which they\nare provided. So a workspace edit for example can consist of the following two changes:\n(1) a create file a.txt and (2) a text document edit which insert text into file a.txt.\n\nAn invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will\ncause failure of the operation. How the client recovers from the failure is described by\nthe client capability: `workspace.workspaceEdit.failureHandling`"+ },+ {+ "name": "FileOperationRegistrationOptions",+ "properties": [+ {+ "name": "filters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileOperationFilter"+ }+ },+ "documentation": "The actual filters."+ }+ ],+ "documentation": "The options to register for file operations.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "RenameFilesParams",+ "properties": [+ {+ "name": "files",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileRename"+ }+ },+ "documentation": "An array of all files/folders renamed in this operation. When a folder is renamed, only\nthe folder will be included, and not its children."+ }+ ],+ "documentation": "The parameters sent in notifications/requests for user-initiated renames of\nfiles.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "DeleteFilesParams",+ "properties": [+ {+ "name": "files",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileDelete"+ }+ },+ "documentation": "An array of all files/folders deleted in this operation."+ }+ ],+ "documentation": "The parameters sent in notifications/requests for user-initiated deletes of\nfiles.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MonikerParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ]+ },+ {+ "name": "Moniker",+ "properties": [+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The scheme of the moniker. For example tsc or .Net"+ },+ {+ "name": "identifier",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The identifier of the moniker. The value is opaque in LSIF however\nschema owners are allowed to define the structure if they want."+ },+ {+ "name": "unique",+ "type": {+ "kind": "reference",+ "name": "UniquenessLevel"+ },+ "documentation": "The scope in which the moniker is unique"+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "MonikerKind"+ },+ "optional": true,+ "documentation": "The moniker kind if known."+ }+ ],+ "documentation": "Moniker definition to match LSIF 0.5 moniker definition.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MonikerRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "MonikerOptions"+ }+ ]+ },+ {+ "name": "TypeHierarchyPrepareParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameter of a `textDocument/prepareTypeHierarchy` request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TypeHierarchyItem",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of this item."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "SymbolKind"+ },+ "documentation": "The kind of this item."+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolTag"+ }+ },+ "optional": true,+ "documentation": "Tags for this item."+ },+ {+ "name": "detail",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "More detail for this item, e.g. the signature of a function."+ },+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The resource identifier of this item."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range enclosing this symbol not including leading/trailing whitespace\nbut everything else, e.g. comments and code."+ },+ {+ "name": "selectionRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range that should be selected and revealed when this symbol is being\npicked, e.g. the name of a function. Must be contained by the\n{@link TypeHierarchyItem.range `range`}."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved between a type hierarchy prepare and\nsupertypes or subtypes requests. It could also be used to identify the\ntype hierarchy in the server, helping improve the performance on\nresolving supertypes and subtypes."+ }+ ],+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TypeHierarchyRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "TypeHierarchyOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Type hierarchy options used during static or dynamic registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TypeHierarchySupertypesParams",+ "properties": [+ {+ "name": "item",+ "type": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameter of a `typeHierarchy/supertypes` request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TypeHierarchySubtypesParams",+ "properties": [+ {+ "name": "item",+ "type": {+ "kind": "reference",+ "name": "TypeHierarchyItem"+ }+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameter of a `typeHierarchy/subtypes` request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range for which inline values should be computed."+ },+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "InlineValueContext"+ },+ "documentation": "Additional information about the context in which inline values were\nrequested."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "A parameter literal used in inline value requests.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "InlineValueOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Inline value options used during static or dynamic registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHintParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range for which inlay hints should be computed."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "A parameter literal used in inlay hint requests.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHint",+ "properties": [+ {+ "name": "position",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The position of this hint.\n\nIf multiple hints have the same position, they will be shown in the order\nthey appear in the response."+ },+ {+ "name": "label",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlayHintLabelPart"+ }+ }+ ]+ },+ "documentation": "The label of this hint. A human readable string or an array of\nInlayHintLabelPart label parts.\n\n*Note* that neither the string nor the label part can be empty."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "InlayHintKind"+ },+ "optional": true,+ "documentation": "The kind of this hint. Can be omitted in which case the client\nshould fall back to a reasonable default."+ },+ {+ "name": "textEdits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ "optional": true,+ "documentation": "Optional text edits that are performed when accepting this inlay hint.\n\n*Note* that edits are expected to change the document so that the inlay\nhint (or its nearest variant) is now part of the document and the inlay\nhint itself is now obsolete."+ },+ {+ "name": "tooltip",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkupContent"+ }+ ]+ },+ "optional": true,+ "documentation": "The tooltip text when you hover over this item."+ },+ {+ "name": "paddingLeft",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Render padding before the hint.\n\nNote: Padding should use the editor's background color, not the\nbackground color of the hint itself. That means padding can be used\nto visually align/separate an inlay hint."+ },+ {+ "name": "paddingRight",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Render padding after the hint.\n\nNote: Padding should use the editor's background color, not the\nbackground color of the hint itself. That means padding can be used\nto visually align/separate an inlay hint."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on an inlay hint between\na `textDocument/inlayHint` and a `inlayHint/resolve` request."+ }+ ],+ "documentation": "Inlay hint information.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHintRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "InlayHintOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Inlay hint options used during static or dynamic registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DocumentDiagnosticParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "identifier",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The additional identifier provided during registration."+ },+ {+ "name": "previousResultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The result id of a previous response if provided."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters of the document diagnostic request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DocumentDiagnosticReportPartialResult",+ "properties": [+ {+ "name": "relatedDocuments",+ "type": {+ "kind": "map",+ "key": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "value": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "FullDocumentDiagnosticReport"+ },+ {+ "kind": "reference",+ "name": "UnchangedDocumentDiagnosticReport"+ }+ ]+ }+ }+ }+ ],+ "documentation": "A partial result for a document diagnostic report.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DiagnosticServerCancellationData",+ "properties": [+ {+ "name": "retriggerRequest",+ "type": {+ "kind": "base",+ "name": "boolean"+ }+ }+ ],+ "documentation": "Cancellation data returned from a diagnostic request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DiagnosticRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DiagnosticOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Diagnostic registration options.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceDiagnosticParams",+ "properties": [+ {+ "name": "identifier",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The additional identifier provided during registration."+ },+ {+ "name": "previousResultIds",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "PreviousResultId"+ }+ },+ "documentation": "The currently known diagnostic reports with their\nprevious result ids."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters of the workspace diagnostic request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceDiagnosticReport",+ "properties": [+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceDocumentDiagnosticReport"+ }+ }+ }+ ],+ "documentation": "A workspace diagnostic report.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceDiagnosticReportPartialResult",+ "properties": [+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceDocumentDiagnosticReport"+ }+ }+ }+ ],+ "documentation": "A partial result for a workspace diagnostic report.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DidOpenNotebookDocumentParams",+ "properties": [+ {+ "name": "notebookDocument",+ "type": {+ "kind": "reference",+ "name": "NotebookDocument"+ },+ "documentation": "The notebook document that got opened."+ },+ {+ "name": "cellTextDocuments",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentItem"+ }+ },+ "documentation": "The text documents that represent the content\nof a notebook cell."+ }+ ],+ "documentation": "The params sent in an open notebook document notification.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocumentSyncRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "NotebookDocumentSyncOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Registration options specific to a notebook.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DidChangeNotebookDocumentParams",+ "properties": [+ {+ "name": "notebookDocument",+ "type": {+ "kind": "reference",+ "name": "VersionedNotebookDocumentIdentifier"+ },+ "documentation": "The notebook document that did change. The version number points\nto the version after all provided changes have been applied. If\nonly the text document content of a cell changes the notebook version\ndoesn't necessarily have to change."+ },+ {+ "name": "change",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentChangeEvent"+ },+ "documentation": "The actual changes to the notebook document.\n\nThe changes describe single state changes to the notebook document.\nSo if there are two changes c1 (at array index 0) and c2 (at array\nindex 1) for a notebook in state S then c1 moves the notebook from\nS to S' and c2 from S' to S''. So c1 is computed on the state S and\nc2 is computed on the state S'.\n\nTo mirror the content of a notebook using change events use the following approach:\n- start with the same initial content\n- apply the 'notebookDocument/didChange' notifications in the order you receive them.\n- apply the `NotebookChangeEvent`s in a single notification in the order\n you receive them."+ }+ ],+ "documentation": "The params sent in a change notebook document notification.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DidSaveNotebookDocumentParams",+ "properties": [+ {+ "name": "notebookDocument",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentIdentifier"+ },+ "documentation": "The notebook document that got saved."+ }+ ],+ "documentation": "The params sent in a save notebook document notification.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DidCloseNotebookDocumentParams",+ "properties": [+ {+ "name": "notebookDocument",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentIdentifier"+ },+ "documentation": "The notebook document that got closed."+ },+ {+ "name": "cellTextDocuments",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ }+ },+ "documentation": "The text documents that represent the content\nof a notebook cell that got closed."+ }+ ],+ "documentation": "The params sent in a close notebook document notification.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineCompletionParams",+ "properties": [+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "InlineCompletionContext"+ },+ "documentation": "Additional information about the context in which inline completions were\nrequested."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "A parameter literal used in inline completion requests.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "InlineCompletionList",+ "properties": [+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InlineCompletionItem"+ }+ },+ "documentation": "The inline completion items"+ }+ ],+ "documentation": "Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "InlineCompletionItem",+ "properties": [+ {+ "name": "insertText",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "StringValue"+ }+ ]+ },+ "documentation": "The text to replace the range with. Must be set."+ },+ {+ "name": "filterText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "optional": true,+ "documentation": "The range to replace. Must begin and end on the same line."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "optional": true,+ "documentation": "An optional {@link Command} that is executed *after* inserting this completion."+ }+ ],+ "documentation": "An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "InlineCompletionRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "InlineCompletionOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "StaticRegistrationOptions"+ }+ ],+ "documentation": "Inline completion options used during static or dynamic registration.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "RegistrationParams",+ "properties": [+ {+ "name": "registrations",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Registration"+ }+ }+ }+ ]+ },+ {+ "name": "UnregistrationParams",+ "properties": [+ {+ "name": "unregisterations",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Unregistration"+ }+ }+ }+ ]+ },+ {+ "name": "InitializeParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "_InitializeParams"+ },+ {+ "kind": "reference",+ "name": "WorkspaceFoldersInitializeParams"+ }+ ]+ },+ {+ "name": "InitializeResult",+ "properties": [+ {+ "name": "capabilities",+ "type": {+ "kind": "reference",+ "name": "ServerCapabilities"+ },+ "documentation": "The capabilities the language server provides."+ },+ {+ "name": "serverInfo",+ "type": {+ "kind": "reference",+ "name": "ServerInfo"+ },+ "optional": true,+ "documentation": "Information about the server.\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "documentation": "The result returned from an initialize request."+ },+ {+ "name": "InitializeError",+ "properties": [+ {+ "name": "retry",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "Indicates whether the client execute the following retry logic:\n(1) show the message provided by the ResponseError to the user\n(2) user selects retry or cancel\n(3) if user selected retry the initialize method is sent again."+ }+ ],+ "documentation": "The data type of the ResponseError if the\ninitialize request fails."+ },+ {+ "name": "InitializedParams",+ "properties": []+ },+ {+ "name": "DidChangeConfigurationParams",+ "properties": [+ {+ "name": "settings",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "documentation": "The actual changed settings"+ }+ ],+ "documentation": "The parameters of a change configuration notification."+ },+ {+ "name": "DidChangeConfigurationRegistrationOptions",+ "properties": [+ {+ "name": "section",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ }+ ]+ },+ "optional": true+ }+ ]+ },+ {+ "name": "ShowMessageParams",+ "properties": [+ {+ "name": "type",+ "type": {+ "kind": "reference",+ "name": "MessageType"+ },+ "documentation": "The message type. See {@link MessageType}"+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The actual message."+ }+ ],+ "documentation": "The parameters of a notification message."+ },+ {+ "name": "ShowMessageRequestParams",+ "properties": [+ {+ "name": "type",+ "type": {+ "kind": "reference",+ "name": "MessageType"+ },+ "documentation": "The message type. See {@link MessageType}"+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The actual message."+ },+ {+ "name": "actions",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "MessageActionItem"+ }+ },+ "optional": true,+ "documentation": "The message action items to present."+ }+ ]+ },+ {+ "name": "MessageActionItem",+ "properties": [+ {+ "name": "title",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A short title like 'Retry', 'Open Log' etc."+ }+ ]+ },+ {+ "name": "LogMessageParams",+ "properties": [+ {+ "name": "type",+ "type": {+ "kind": "reference",+ "name": "MessageType"+ },+ "documentation": "The message type. See {@link MessageType}"+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The actual message."+ }+ ],+ "documentation": "The log message parameters."+ },+ {+ "name": "DidOpenTextDocumentParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentItem"+ },+ "documentation": "The document that was opened."+ }+ ],+ "documentation": "The parameters sent in an open text document notification"+ },+ {+ "name": "DidChangeTextDocumentParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "VersionedTextDocumentIdentifier"+ },+ "documentation": "The document that did change. The version number points\nto the version after all provided content changes have\nbeen applied."+ },+ {+ "name": "contentChanges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentContentChangeEvent"+ }+ },+ "documentation": "The actual content changes. The content changes describe single state changes\nto the document. So if there are two content changes c1 (at array index 0) and\nc2 (at array index 1) for a document in state S then c1 moves the document from\nS to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed\non the state S'.\n\nTo mirror the content of a document using change events use the following approach:\n- start with the same initial content\n- apply the 'textDocument/didChange' notifications in the order you receive them.\n- apply the `TextDocumentContentChangeEvent`s in a single notification in the order\n you receive them."+ }+ ],+ "documentation": "The change text document notification's parameters."+ },+ {+ "name": "TextDocumentChangeRegistrationOptions",+ "properties": [+ {+ "name": "syncKind",+ "type": {+ "kind": "reference",+ "name": "TextDocumentSyncKind"+ },+ "documentation": "How documents are synced to the server."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ }+ ],+ "documentation": "Describe options to be used when registered for text document change events."+ },+ {+ "name": "DidCloseTextDocumentParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document that was closed."+ }+ ],+ "documentation": "The parameters sent in a close text document notification"+ },+ {+ "name": "DidSaveTextDocumentParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document that was saved."+ },+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "Optional the content when saved. Depends on the includeText value\nwhen the save notification was requested."+ }+ ],+ "documentation": "The parameters sent in a save text document notification"+ },+ {+ "name": "TextDocumentSaveRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "SaveOptions"+ }+ ],+ "documentation": "Save registration options."+ },+ {+ "name": "WillSaveTextDocumentParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document that will be saved."+ },+ {+ "name": "reason",+ "type": {+ "kind": "reference",+ "name": "TextDocumentSaveReason"+ },+ "documentation": "The 'TextDocumentSaveReason'."+ }+ ],+ "documentation": "The parameters sent in a will save text document notification."+ },+ {+ "name": "TextEdit",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range of the text document to be manipulated. To insert\ntext into a document create a range where start === end."+ },+ {+ "name": "newText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The string to be inserted. For delete operations use an\nempty string."+ }+ ],+ "documentation": "A text edit applicable to a text document."+ },+ {+ "name": "DidChangeWatchedFilesParams",+ "properties": [+ {+ "name": "changes",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileEvent"+ }+ },+ "documentation": "The actual file events."+ }+ ],+ "documentation": "The watched files change notification's parameters."+ },+ {+ "name": "DidChangeWatchedFilesRegistrationOptions",+ "properties": [+ {+ "name": "watchers",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FileSystemWatcher"+ }+ },+ "documentation": "The watchers to register."+ }+ ],+ "documentation": "Describe options to be used when registered for text document change events."+ },+ {+ "name": "PublishDiagnosticsParams",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The URI for which diagnostic information is reported."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "optional": true,+ "documentation": "Optional the version number of the document the diagnostics are published for.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "diagnostics",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Diagnostic"+ }+ },+ "documentation": "An array of diagnostic information items."+ }+ ],+ "documentation": "The publish diagnostic notification's parameters."+ },+ {+ "name": "CompletionParams",+ "properties": [+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "CompletionContext"+ },+ "optional": true,+ "documentation": "The completion context. This is only available it the client specifies\nto send this using the client capability `textDocument.completion.contextSupport === true`"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Completion parameters"+ },+ {+ "name": "CompletionItem",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The label of this completion item.\n\nThe label property is also by default the text that\nis inserted when selecting this completion.\n\nIf label details are provided the label itself should\nbe an unqualified name of the completion item."+ },+ {+ "name": "labelDetails",+ "type": {+ "kind": "reference",+ "name": "CompletionItemLabelDetails"+ },+ "optional": true,+ "documentation": "Additional details for the label\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "CompletionItemKind"+ },+ "optional": true,+ "documentation": "The kind of this completion item. Based of the kind\nan icon is chosen by the editor."+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItemTag"+ }+ },+ "optional": true,+ "documentation": "Tags for this completion item.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "detail",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A human-readable string with additional information\nabout this item, like type or symbol information."+ },+ {+ "name": "documentation",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkupContent"+ }+ ]+ },+ "optional": true,+ "documentation": "A human-readable string that represents a doc-comment."+ },+ {+ "name": "deprecated",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Indicates if this item is deprecated.\n@deprecated Use `tags` instead.",+ "deprecated": "Use `tags` instead."+ },+ {+ "name": "preselect",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Select this item when showing.\n\n*Note* that only one completion item can be selected and that the\ntool / client decides which item that is. The rule is that the *first*\nitem of those that match best is selected."+ },+ {+ "name": "sortText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A string that should be used when comparing this item\nwith other items. When `falsy` the {@link CompletionItem.label label}\nis used."+ },+ {+ "name": "filterText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A string that should be used when filtering a set of\ncompletion items. When `falsy` the {@link CompletionItem.label label}\nis used."+ },+ {+ "name": "insertText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A string that should be inserted into a document when selecting\nthis completion. When `falsy` the {@link CompletionItem.label label}\nis used.\n\nThe `insertText` is subject to interpretation by the client side.\nSome tools might not take the string literally. For example\nVS Code when code complete is requested in this example\n`con<cursor position>` and a completion item with an `insertText` of\n`console` is provided it will only insert `sole`. Therefore it is\nrecommended to use `textEdit` instead since it avoids additional client\nside interpretation."+ },+ {+ "name": "insertTextFormat",+ "type": {+ "kind": "reference",+ "name": "InsertTextFormat"+ },+ "optional": true,+ "documentation": "The format of the insert text. The format applies to both the\n`insertText` property and the `newText` property of a provided\n`textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.\n\nPlease note that the insertTextFormat doesn't apply to\n`additionalTextEdits`."+ },+ {+ "name": "insertTextMode",+ "type": {+ "kind": "reference",+ "name": "InsertTextMode"+ },+ "optional": true,+ "documentation": "How whitespace and indentation is handled during completion\nitem insertion. If not provided the clients default value depends on\nthe `textDocument.completion.insertTextMode` client capability.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "textEdit",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextEdit"+ },+ {+ "kind": "reference",+ "name": "InsertReplaceEdit"+ }+ ]+ },+ "optional": true,+ "documentation": "An {@link TextEdit edit} which is applied to a document when selecting\nthis completion. When an edit is provided the value of\n{@link CompletionItem.insertText insertText} is ignored.\n\nMost editors support two different operations when accepting a completion\nitem. One is to insert a completion text and the other is to replace an\nexisting text with a completion text. Since this can usually not be\npredetermined by a server it can report both ranges. Clients need to\nsignal support for `InsertReplaceEdits` via the\n`textDocument.completion.insertReplaceSupport` client capability\nproperty.\n\n*Note 1:* The text edit's range as well as both ranges from an insert\nreplace edit must be a [single line] and they must contain the position\nat which completion has been requested.\n*Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range\nmust be a prefix of the edit's replace range, that means it must be\ncontained and starting at the same position.\n\n@since 3.16.0 additional type `InsertReplaceEdit`",+ "since": "3.16.0 additional type `InsertReplaceEdit`"+ },+ {+ "name": "textEditText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The edit text used if the completion item is part of a CompletionList and\nCompletionList defines an item default for the text edit range.\n\nClients will only honor this property if they opt into completion list\nitem defaults using the capability `completionList.itemDefaults`.\n\nIf not provided and a list's default range is provided the label\nproperty is used as a text.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "additionalTextEdits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextEdit"+ }+ },+ "optional": true,+ "documentation": "An optional array of additional {@link TextEdit text edits} that are applied when\nselecting this completion. Edits must not overlap (including the same insert position)\nwith the main {@link CompletionItem.textEdit edit} nor with themselves.\n\nAdditional text edits should be used to change text unrelated to the current cursor position\n(for example adding an import statement at the top of the file if the completion item will\ninsert an unqualified type)."+ },+ {+ "name": "commitCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "An optional set of characters that when pressed while this completion is active will accept it first and\nthen type that character. *Note* that all commit characters should have `length=1` and that superfluous\ncharacters will be ignored."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "optional": true,+ "documentation": "An optional {@link Command command} that is executed *after* inserting this completion. *Note* that\nadditional modifications to the current document should be described with the\n{@link CompletionItem.additionalTextEdits additionalTextEdits}-property."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on a completion item between a\n{@link CompletionRequest} and a {@link CompletionResolveRequest}."+ }+ ],+ "documentation": "A completion item represents a text snippet that is\nproposed to complete text that is being typed."+ },+ {+ "name": "CompletionList",+ "properties": [+ {+ "name": "isIncomplete",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "This list it not complete. Further typing results in recomputing this list.\n\nRecomputed lists have all their items replaced (not appended) in the\nincomplete completion sessions."+ },+ {+ "name": "itemDefaults",+ "type": {+ "kind": "reference",+ "name": "CompletionItemDefaults"+ },+ "optional": true,+ "documentation": "In many cases the items of an actual completion result share the same\nvalue for properties like `commitCharacters` or the range of a text\nedit. A completion list can therefore define item defaults which will\nbe used if a completion item itself doesn't specify the value.\n\nIf a completion list specifies a default value and a completion item\nalso specifies a corresponding value the one from the item is used.\n\nServers are only allowed to return default values if the client\nsignals support for this via the `completionList.itemDefaults`\ncapability.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItem"+ }+ },+ "documentation": "The completion items."+ }+ ],+ "documentation": "Represents a collection of {@link CompletionItem completion items} to be presented\nin the editor."+ },+ {+ "name": "CompletionRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "CompletionOptions"+ }+ ],+ "documentation": "Registration options for a {@link CompletionRequest}."+ },+ {+ "name": "HoverParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "Parameters for a {@link HoverRequest}."+ },+ {+ "name": "Hover",+ "properties": [+ {+ "name": "contents",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "MarkupContent"+ },+ {+ "kind": "reference",+ "name": "MarkedString"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "MarkedString"+ }+ }+ ]+ },+ "documentation": "The hover's content"+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "optional": true,+ "documentation": "An optional range inside the text document that is used to\nvisualize the hover, e.g. by changing the background color."+ }+ ],+ "documentation": "The result of a hover request."+ },+ {+ "name": "HoverRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "HoverOptions"+ }+ ],+ "documentation": "Registration options for a {@link HoverRequest}."+ },+ {+ "name": "SignatureHelpParams",+ "properties": [+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "SignatureHelpContext"+ },+ "optional": true,+ "documentation": "The signature help context. This is only available if the client specifies\nto send this using the client capability `textDocument.signatureHelp.contextSupport === true`\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "Parameters for a {@link SignatureHelpRequest}."+ },+ {+ "name": "SignatureHelp",+ "properties": [+ {+ "name": "signatures",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SignatureInformation"+ }+ },+ "documentation": "One or more signatures."+ },+ {+ "name": "activeSignature",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "The active signature. If omitted or the value lies outside the\nrange of `signatures` the value defaults to zero or is ignored if\nthe `SignatureHelp` has no signatures.\n\nWhenever possible implementors should make an active decision about\nthe active signature and shouldn't rely on a default value.\n\nIn future version of the protocol this property might become\nmandatory to better express this."+ },+ {+ "name": "activeParameter",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "uinteger"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "optional": true,+ "documentation": "The active parameter of the active signature.\n\nIf `null`, no parameter of the signature is active (for example a named\nargument that does not match any declared parameters). This is only valid\nif the client specifies the client capability\n`textDocument.signatureHelp.noActiveParameterSupport === true`\n\nIf omitted or the value lies outside the range of\n`signatures[activeSignature].parameters` defaults to 0 if the active\nsignature has parameters.\n\nIf the active signature has no parameters it is ignored.\n\nIn future version of the protocol this property might become\nmandatory (but still nullable) to better express the active parameter if\nthe active signature does have any."+ }+ ],+ "documentation": "Signature help represents the signature of something\ncallable. There can be multiple signature but only one\nactive and only one active parameter."+ },+ {+ "name": "SignatureHelpRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "SignatureHelpOptions"+ }+ ],+ "documentation": "Registration options for a {@link SignatureHelpRequest}."+ },+ {+ "name": "DefinitionParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link DefinitionRequest}."+ },+ {+ "name": "DefinitionRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DefinitionOptions"+ }+ ],+ "documentation": "Registration options for a {@link DefinitionRequest}."+ },+ {+ "name": "ReferenceParams",+ "properties": [+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "ReferenceContext"+ }+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link ReferencesRequest}."+ },+ {+ "name": "ReferenceRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "ReferenceOptions"+ }+ ],+ "documentation": "Registration options for a {@link ReferencesRequest}."+ },+ {+ "name": "DocumentHighlightParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link DocumentHighlightRequest}."+ },+ {+ "name": "DocumentHighlight",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range this highlight applies to."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "DocumentHighlightKind"+ },+ "optional": true,+ "documentation": "The highlight kind, default is {@link DocumentHighlightKind.Text text}."+ }+ ],+ "documentation": "A document highlight is a range inside a text document which deserves\nspecial attention. Usually a document highlight is visualized by changing\nthe background color of its range."+ },+ {+ "name": "DocumentHighlightRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentHighlightOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentHighlightRequest}."+ },+ {+ "name": "DocumentSymbolParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "Parameters for a {@link DocumentSymbolRequest}."+ },+ {+ "name": "SymbolInformation",+ "properties": [+ {+ "name": "deprecated",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Indicates if this symbol is deprecated.\n\n@deprecated Use tags instead",+ "deprecated": "Use tags instead"+ },+ {+ "name": "location",+ "type": {+ "kind": "reference",+ "name": "Location"+ },+ "documentation": "The location of this symbol. The location's range is used by a tool\nto reveal the location in the editor. If the symbol is selected in the\ntool the range's start information is used to position the cursor. So\nthe range usually spans more than the actual symbol's name and does\nnormally include things like visibility modifiers.\n\nThe range doesn't have to denote a node range in the sense of an abstract\nsyntax tree. It can therefore not be used to re-construct a hierarchy of\nthe symbols."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "BaseSymbolInformation"+ }+ ],+ "documentation": "Represents information about programming constructs like variables, classes,\ninterfaces etc."+ },+ {+ "name": "DocumentSymbol",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of this symbol. Will be displayed in the user interface and therefore must not be\nan empty string or a string only consisting of white spaces."+ },+ {+ "name": "detail",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "More detail for this symbol, e.g the signature of a function."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "SymbolKind"+ },+ "documentation": "The kind of this symbol."+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolTag"+ }+ },+ "optional": true,+ "documentation": "Tags for this document symbol.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "deprecated",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Indicates if this symbol is deprecated.\n\n@deprecated Use tags instead",+ "deprecated": "Use tags instead"+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range enclosing this symbol not including leading/trailing whitespace but everything else\nlike comments. This information is typically used to determine if the clients cursor is\ninside the symbol to reveal in the symbol in the UI."+ },+ {+ "name": "selectionRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.\nMust be contained by the `range`."+ },+ {+ "name": "children",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentSymbol"+ }+ },+ "optional": true,+ "documentation": "Children of this symbol, e.g. properties of a class."+ }+ ],+ "documentation": "Represents programming constructs like variables, classes, interfaces etc.\nthat appear in a document. Document symbols can be hierarchical and they\nhave two ranges: one that encloses its definition and one that points to\nits most interesting range, e.g. the range of an identifier."+ },+ {+ "name": "DocumentSymbolRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentSymbolOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentSymbolRequest}."+ },+ {+ "name": "CodeActionParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document in which the command was invoked."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range for which the command was invoked."+ },+ {+ "name": "context",+ "type": {+ "kind": "reference",+ "name": "CodeActionContext"+ },+ "documentation": "Context carrying additional information."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameters of a {@link CodeActionRequest}."+ },+ {+ "name": "Command",+ "properties": [+ {+ "name": "title",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "Title of the command, like `save`."+ },+ {+ "name": "tooltip",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional tooltip.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "command",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The identifier of the actual command handler."+ },+ {+ "name": "arguments",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "LSPAny"+ }+ },+ "optional": true,+ "documentation": "Arguments that the command handler should be\ninvoked with."+ }+ ],+ "documentation": "Represents a reference to a command. Provides a title which\nwill be used to represent a command in the UI and, optionally,\nan array of arguments which will be passed to the command handler\nfunction when invoked."+ },+ {+ "name": "CodeAction",+ "properties": [+ {+ "name": "title",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A short, human-readable, title for this code action."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "CodeActionKind"+ },+ "optional": true,+ "documentation": "The kind of the code action.\n\nUsed to filter code actions."+ },+ {+ "name": "diagnostics",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Diagnostic"+ }+ },+ "optional": true,+ "documentation": "The diagnostics that this code action resolves."+ },+ {+ "name": "isPreferred",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted\nby keybindings.\n\nA quick fix should be marked preferred if it properly addresses the underlying error.\nA refactoring should be marked preferred if it is the most reasonable choice of actions to take.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "disabled",+ "type": {+ "kind": "reference",+ "name": "CodeActionDisabled"+ },+ "optional": true,+ "documentation": "Marks that the code action cannot currently be applied.\n\nClients should follow the following guidelines regarding disabled code actions:\n\n - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)\n code action menus.\n\n - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type\n of code action, such as refactorings.\n\n - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)\n that auto applies a code action and only disabled code actions are returned, the client should show the user an\n error message with `reason` in the editor.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "edit",+ "type": {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ "optional": true,+ "documentation": "The workspace edit this code action performs."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "optional": true,+ "documentation": "A command this code action executes. If a code action\nprovides an edit and a command, first the edit is\nexecuted and then the command."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on a code action between\na `textDocument/codeAction` and a `codeAction/resolve` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "A code action represents a change that can be performed in code, e.g. to fix a problem or\nto refactor code.\n\nA CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed."+ },+ {+ "name": "CodeActionRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "CodeActionOptions"+ }+ ],+ "documentation": "Registration options for a {@link CodeActionRequest}."+ },+ {+ "name": "WorkspaceSymbolParams",+ "properties": [+ {+ "name": "query",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A query string to filter symbols by. Clients may send an empty\nstring here to request all symbols."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameters of a {@link WorkspaceSymbolRequest}."+ },+ {+ "name": "WorkspaceSymbol",+ "properties": [+ {+ "name": "location",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Location"+ },+ {+ "kind": "reference",+ "name": "LocationUriOnly"+ }+ ]+ },+ "documentation": "The location of the symbol. Whether a server is allowed to\nreturn a location without a range depends on the client\ncapability `workspace.symbol.resolveSupport`.\n\nSee SymbolInformation#location for more details."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on a workspace symbol between a\nworkspace symbol request and a workspace symbol resolve request."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "BaseSymbolInformation"+ }+ ],+ "documentation": "A special workspace symbol that supports locations without a range.\n\nSee also SymbolInformation.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceSymbolRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "WorkspaceSymbolOptions"+ }+ ],+ "documentation": "Registration options for a {@link WorkspaceSymbolRequest}."+ },+ {+ "name": "CodeLensParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to request code lens for."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameters of a {@link CodeLensRequest}."+ },+ {+ "name": "CodeLens",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range in which this code lens is valid. Should only span a single line."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "optional": true,+ "documentation": "The command this code lens represents."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on a code lens item between\na {@link CodeLensRequest} and a {@link CodeLensResolveRequest}"+ }+ ],+ "documentation": "A code lens represents a {@link Command command} that should be shown along with\nsource text, like the number of references, a way to run tests, etc.\n\nA code lens is _unresolved_ when no command is associated to it. For performance\nreasons the creation of a code lens and resolving should be done in two stages."+ },+ {+ "name": "CodeLensRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "CodeLensOptions"+ }+ ],+ "documentation": "Registration options for a {@link CodeLensRequest}."+ },+ {+ "name": "DocumentLinkParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to provide document links for."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ },+ {+ "kind": "reference",+ "name": "PartialResultParams"+ }+ ],+ "documentation": "The parameters of a {@link DocumentLinkRequest}."+ },+ {+ "name": "DocumentLink",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range this link applies to."+ },+ {+ "name": "target",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "optional": true,+ "documentation": "The uri this link points to. If missing a resolve request is sent later."+ },+ {+ "name": "tooltip",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The tooltip text when you hover over this link.\n\nIf a tooltip is provided, is will be displayed in a string that includes instructions on how to\ntrigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,\nuser settings, and localization.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved on a document link between a\nDocumentLinkRequest and a DocumentLinkResolveRequest."+ }+ ],+ "documentation": "A document link is a range in a text document that links to an internal or external resource, like another\ntext document or a web site."+ },+ {+ "name": "DocumentLinkRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentLinkOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentLinkRequest}."+ },+ {+ "name": "DocumentFormattingParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to format."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "FormattingOptions"+ },+ "documentation": "The format options."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameters of a {@link DocumentFormattingRequest}."+ },+ {+ "name": "DocumentFormattingRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentFormattingOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentFormattingRequest}."+ },+ {+ "name": "DocumentRangeFormattingParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to format."+ },+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range to format"+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "FormattingOptions"+ },+ "documentation": "The format options"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameters of a {@link DocumentRangeFormattingRequest}."+ },+ {+ "name": "DocumentRangeFormattingRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentRangeFormattingOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentRangeFormattingRequest}."+ },+ {+ "name": "DocumentRangesFormattingParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to format."+ },+ {+ "name": "ranges",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Range"+ }+ },+ "documentation": "The ranges to format"+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "FormattingOptions"+ },+ "documentation": "The format options"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameters of a {@link DocumentRangesFormattingRequest}.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "DocumentOnTypeFormattingParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to format."+ },+ {+ "name": "position",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The position around which the on type formatting should happen.\nThis is not necessarily the exact position where the character denoted\nby the property `ch` got typed."+ },+ {+ "name": "ch",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The character that has been typed that triggered the formatting\non type request. That is not necessarily the last character that\ngot inserted into the document since the client could auto insert\ncharacters as well (e.g. like automatic brace completion)."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "FormattingOptions"+ },+ "documentation": "The formatting options."+ }+ ],+ "documentation": "The parameters of a {@link DocumentOnTypeFormattingRequest}."+ },+ {+ "name": "DocumentOnTypeFormattingRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentOnTypeFormattingOptions"+ }+ ],+ "documentation": "Registration options for a {@link DocumentOnTypeFormattingRequest}."+ },+ {+ "name": "RenameParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The document to rename."+ },+ {+ "name": "position",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The position at which this request was sent."+ },+ {+ "name": "newName",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The new name of the symbol. If the given name is not valid the\nrequest must return a {@link ResponseError} with an\nappropriate message set."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameters of a {@link RenameRequest}."+ },+ {+ "name": "RenameRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentRegistrationOptions"+ },+ {+ "kind": "reference",+ "name": "RenameOptions"+ }+ ],+ "documentation": "Registration options for a {@link RenameRequest}."+ },+ {+ "name": "PrepareRenameParams",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentPositionParams"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ]+ },+ {+ "name": "ExecuteCommandParams",+ "properties": [+ {+ "name": "command",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The identifier of the actual command handler."+ },+ {+ "name": "arguments",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "LSPAny"+ }+ },+ "optional": true,+ "documentation": "Arguments that the command should be invoked with."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The parameters of a {@link ExecuteCommandRequest}."+ },+ {+ "name": "ExecuteCommandRegistrationOptions",+ "properties": [],+ "extends": [+ {+ "kind": "reference",+ "name": "ExecuteCommandOptions"+ }+ ],+ "documentation": "Registration options for a {@link ExecuteCommandRequest}."+ },+ {+ "name": "ApplyWorkspaceEditParams",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional label of the workspace edit. This label is\npresented in the user interface for example on an undo\nstack to undo the workspace edit."+ },+ {+ "name": "edit",+ "type": {+ "kind": "reference",+ "name": "WorkspaceEdit"+ },+ "documentation": "The edits to apply."+ }+ ],+ "documentation": "The parameters passed via an apply workspace edit request."+ },+ {+ "name": "ApplyWorkspaceEditResult",+ "properties": [+ {+ "name": "applied",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "Indicates whether the edit was applied or not."+ },+ {+ "name": "failureReason",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional textual description for why the edit was not applied.\nThis may be used by the server for diagnostic logging or to provide\na suitable error for a request that triggered the edit."+ },+ {+ "name": "failedChange",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "Depending on the client's failure handling strategy `failedChange` might\ncontain the index of the change that failed. This property is only available\nif the client signals a `failureHandlingStrategy` in its client capabilities."+ }+ ],+ "documentation": "The result returned from the apply workspace edit request.\n\n@since 3.17 renamed from ApplyWorkspaceEditResponse",+ "since": "3.17 renamed from ApplyWorkspaceEditResponse"+ },+ {+ "name": "WorkDoneProgressBegin",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "begin"+ }+ },+ {+ "name": "title",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "Mandatory title of the progress operation. Used to briefly inform about\nthe kind of operation being performed.\n\nExamples: \"Indexing\" or \"Linking dependencies\"."+ },+ {+ "name": "cancellable",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Controls if a cancel button should show to allow the user to cancel the\nlong running operation. Clients that don't support cancellation are allowed\nto ignore the setting."+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "Optional, more detailed associated progress message. Contains\ncomplementary information to the `title`.\n\nExamples: \"3/25 files\", \"project/src/module2\", \"node_modules/some_dep\".\nIf unset, the previous progress message (if any) is still valid."+ },+ {+ "name": "percentage",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "Optional progress percentage to display (value 100 is considered 100%).\nIf not provided infinite progress is assumed and clients are allowed\nto ignore the `percentage` value in subsequent in report notifications.\n\nThe value should be steadily rising. Clients are free to ignore values\nthat are not following this rule. The value range is [0, 100]."+ }+ ]+ },+ {+ "name": "WorkDoneProgressReport",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "report"+ }+ },+ {+ "name": "cancellable",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Controls enablement state of a cancel button.\n\nClients that don't support cancellation or don't support controlling the button's\nenablement state are allowed to ignore the property."+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "Optional, more detailed associated progress message. Contains\ncomplementary information to the `title`.\n\nExamples: \"3/25 files\", \"project/src/module2\", \"node_modules/some_dep\".\nIf unset, the previous progress message (if any) is still valid."+ },+ {+ "name": "percentage",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "Optional progress percentage to display (value 100 is considered 100%).\nIf not provided infinite progress is assumed and clients are allowed\nto ignore the `percentage` value in subsequent in report notifications.\n\nThe value should be steadily rising. Clients are free to ignore values\nthat are not following this rule. The value range is [0, 100]"+ }+ ]+ },+ {+ "name": "WorkDoneProgressEnd",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "end"+ }+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "Optional, a final message indicating to for example indicate the outcome\nof the operation."+ }+ ]+ },+ {+ "name": "SetTraceParams",+ "properties": [+ {+ "name": "value",+ "type": {+ "kind": "reference",+ "name": "TraceValue"+ }+ }+ ]+ },+ {+ "name": "LogTraceParams",+ "properties": [+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ }+ },+ {+ "name": "verbose",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true+ }+ ]+ },+ {+ "name": "CancelParams",+ "properties": [+ {+ "name": "id",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "string"+ }+ ]+ },+ "documentation": "The request id to cancel."+ }+ ]+ },+ {+ "name": "ProgressParams",+ "properties": [+ {+ "name": "token",+ "type": {+ "kind": "reference",+ "name": "ProgressToken"+ },+ "documentation": "The progress token provided by the client or server."+ },+ {+ "name": "value",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "documentation": "The progress data."+ }+ ]+ },+ {+ "name": "TextDocumentPositionParams",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ },+ "documentation": "The text document."+ },+ {+ "name": "position",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The position inside the text document."+ }+ ],+ "documentation": "A parameter literal used in requests to pass a text document and a position inside that\ndocument."+ },+ {+ "name": "WorkDoneProgressParams",+ "properties": [+ {+ "name": "workDoneToken",+ "type": {+ "kind": "reference",+ "name": "ProgressToken"+ },+ "optional": true,+ "documentation": "An optional token that a server can use to report work done progress."+ }+ ]+ },+ {+ "name": "PartialResultParams",+ "properties": [+ {+ "name": "partialResultToken",+ "type": {+ "kind": "reference",+ "name": "ProgressToken"+ },+ "optional": true,+ "documentation": "An optional token that a server can use to report partial results (e.g. streaming) to\nthe client."+ }+ ]+ },+ {+ "name": "LocationLink",+ "properties": [+ {+ "name": "originSelectionRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "optional": true,+ "documentation": "Span of the origin of this link.\n\nUsed as the underlined span for mouse interaction. Defaults to the word range at\nthe definition position."+ },+ {+ "name": "targetUri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The target resource identifier of this link."+ },+ {+ "name": "targetRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The full target range of this link. If the target for example is a symbol then target range is the\nrange enclosing this symbol not including leading/trailing whitespace but everything else\nlike comments. This information is typically used to highlight the range in the editor."+ },+ {+ "name": "targetSelectionRange",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range that should be selected and revealed when this link is being followed, e.g the name of a function.\nMust be contained by the `targetRange`. See also `DocumentSymbol#range`"+ }+ ],+ "documentation": "Represents the connection of two locations. Provides additional metadata over normal {@link Location locations},\nincluding an origin range."+ },+ {+ "name": "Range",+ "properties": [+ {+ "name": "start",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The range's start position."+ },+ {+ "name": "end",+ "type": {+ "kind": "reference",+ "name": "Position"+ },+ "documentation": "The range's end position."+ }+ ],+ "documentation": "A range in a text document expressed as (zero-based) start and end positions.\n\nIf you want to specify a range that contains a line including the line ending\ncharacter(s) then use an end position denoting the start of the next line.\nFor example:\n```ts\n{\n start: { line: 5, character: 23 }\n end : { line 6, character : 0 }\n}\n```"+ },+ {+ "name": "ImplementationOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "StaticRegistrationOptions",+ "properties": [+ {+ "name": "id",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The id used to register the request. The id can be used to deregister\nthe request again. See also Registration#id."+ }+ ],+ "documentation": "Static registration options to be returned in the initialize\nrequest."+ },+ {+ "name": "TypeDefinitionOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "WorkspaceFoldersChangeEvent",+ "properties": [+ {+ "name": "added",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceFolder"+ }+ },+ "documentation": "The array of added workspace folders"+ },+ {+ "name": "removed",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceFolder"+ }+ },+ "documentation": "The array of the removed workspace folders"+ }+ ],+ "documentation": "The workspace folder change event."+ },+ {+ "name": "ConfigurationItem",+ "properties": [+ {+ "name": "scopeUri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "optional": true,+ "documentation": "The scope to get the configuration section for."+ },+ {+ "name": "section",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The configuration section asked for."+ }+ ]+ },+ {+ "name": "TextDocumentIdentifier",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The text document's uri."+ }+ ],+ "documentation": "A literal to identify a text document in the client."+ },+ {+ "name": "Color",+ "properties": [+ {+ "name": "red",+ "type": {+ "kind": "base",+ "name": "decimal"+ },+ "documentation": "The red component of this color in the range [0-1]."+ },+ {+ "name": "green",+ "type": {+ "kind": "base",+ "name": "decimal"+ },+ "documentation": "The green component of this color in the range [0-1]."+ },+ {+ "name": "blue",+ "type": {+ "kind": "base",+ "name": "decimal"+ },+ "documentation": "The blue component of this color in the range [0-1]."+ },+ {+ "name": "alpha",+ "type": {+ "kind": "base",+ "name": "decimal"+ },+ "documentation": "The alpha component of this color in the range [0-1]."+ }+ ],+ "documentation": "Represents a color in RGBA space."+ },+ {+ "name": "DocumentColorOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "FoldingRangeOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "DeclarationOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "Position",+ "properties": [+ {+ "name": "line",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "Line position in a document (zero-based).\n\nIf a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.\nIf a line number is negative, it defaults to 0."+ },+ {+ "name": "character",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "Character offset on a line in a document (zero-based).\n\nThe meaning of this offset is determined by the negotiated\n`PositionEncodingKind`.\n\nIf the character value is greater than the line length it defaults back to the\nline length."+ }+ ],+ "documentation": "Position in a text document expressed as zero-based line and character\noffset. Prior to 3.17 the offsets were always based on a UTF-16 string\nrepresentation. So a string of the form `a𐐀b` the character offset of the\ncharacter `a` is 0, the character offset of `𐐀` is 1 and the character\noffset of b is 3 since `𐐀` is represented using two code units in UTF-16.\nSince 3.17 clients and servers can agree on a different string encoding\nrepresentation (e.g. UTF-8). The client announces it's supported encoding\nvia the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).\nThe value is an array of position encodings the client supports, with\ndecreasing preference (e.g. the encoding at index `0` is the most preferred\none). To stay backwards compatible the only mandatory encoding is UTF-16\nrepresented via the string `utf-16`. The server can pick one of the\nencodings offered by the client and signals that encoding back to the\nclient via the initialize result's property\n[`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value\n`utf-16` is missing from the client's capability `general.positionEncodings`\nservers can safely assume that the client supports UTF-16. If the server\nomits the position encoding in its initialize result the encoding defaults\nto the string value `utf-16`. Implementation considerations: since the\nconversion from one encoding into another requires the content of the\nfile / line the conversion is best done where the file is read which is\nusually on the server side.\n\nPositions are line end character agnostic. So you can not specify a position\nthat denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n\n@since 3.17.0 - support for negotiated position encoding.",+ "since": "3.17.0 - support for negotiated position encoding."+ },+ {+ "name": "SelectionRangeOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "CallHierarchyOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Call hierarchy options used during static registration.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensOptions",+ "properties": [+ {+ "name": "legend",+ "type": {+ "kind": "reference",+ "name": "SemanticTokensLegend"+ },+ "documentation": "The legend used by the server"+ },+ {+ "name": "range",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "literal",+ "value": {+ "properties": []+ }+ }+ ]+ },+ "optional": true,+ "documentation": "Server supports providing semantic tokens for a specific range\nof a document."+ },+ {+ "name": "full",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "SemanticTokensFullDelta"+ }+ ]+ },+ "optional": true,+ "documentation": "Server supports providing semantic tokens for a full document."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensEdit",+ "properties": [+ {+ "name": "start",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The start offset of the edit."+ },+ {+ "name": "deleteCount",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The count of elements to remove."+ },+ {+ "name": "data",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "uinteger"+ }+ },+ "optional": true,+ "documentation": "The elements to insert."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "LinkedEditingRangeOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "FileCreate",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A file:// URI for the location of the file/folder being created."+ }+ ],+ "documentation": "Represents information on a file/folder create.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "TextDocumentEdit",+ "properties": [+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "OptionalVersionedTextDocumentIdentifier"+ },+ "documentation": "The text document to change."+ },+ {+ "name": "edits",+ "type": {+ "kind": "array",+ "element": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextEdit"+ },+ {+ "kind": "reference",+ "name": "AnnotatedTextEdit"+ }+ ]+ }+ },+ "documentation": "The edits to be applied.\n\n@since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a\nclient capability.",+ "since": "3.16.0 - support for AnnotatedTextEdit. This is guarded using a\nclient capability."+ }+ ],+ "documentation": "Describes textual changes on a text document. A TextDocumentEdit describes all changes\non a document version Si and after they are applied move the document to version Si+1.\nSo the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any\nkind of ordering. However the edits must be non overlapping."+ },+ {+ "name": "CreateFile",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "create"+ },+ "documentation": "A create"+ },+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The resource to create."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "CreateFileOptions"+ },+ "optional": true,+ "documentation": "Additional options"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "ResourceOperation"+ }+ ],+ "documentation": "Create file operation."+ },+ {+ "name": "RenameFile",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "rename"+ },+ "documentation": "A rename"+ },+ {+ "name": "oldUri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The old (existing) location."+ },+ {+ "name": "newUri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The new location."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "RenameFileOptions"+ },+ "optional": true,+ "documentation": "Rename options."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "ResourceOperation"+ }+ ],+ "documentation": "Rename file operation"+ },+ {+ "name": "DeleteFile",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "delete"+ },+ "documentation": "A delete"+ },+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The file to delete."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "DeleteFileOptions"+ },+ "optional": true,+ "documentation": "Delete options."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "ResourceOperation"+ }+ ],+ "documentation": "Delete file operation"+ },+ {+ "name": "ChangeAnnotation",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A human-readable string describing the actual change. The string\nis rendered prominent in the user interface."+ },+ {+ "name": "needsConfirmation",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "A flag which indicates that user confirmation is needed\nbefore applying the change."+ },+ {+ "name": "description",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A human-readable string which is rendered less prominent in\nthe user interface."+ }+ ],+ "documentation": "Additional information that describes document changes.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "FileOperationFilter",+ "properties": [+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A Uri scheme like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "reference",+ "name": "FileOperationPattern"+ },+ "documentation": "The actual file operation pattern."+ }+ ],+ "documentation": "A filter to describe in which file operation requests or notifications\nthe server is interested in receiving.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "FileRename",+ "properties": [+ {+ "name": "oldUri",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A file:// URI for the original location of the file/folder being renamed."+ },+ {+ "name": "newUri",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A file:// URI for the new location of the file/folder being renamed."+ }+ ],+ "documentation": "Represents information on a file/folder rename.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "FileDelete",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A file:// URI for the location of the file/folder being deleted."+ }+ ],+ "documentation": "Represents information on a file/folder delete.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MonikerOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ]+ },+ {+ "name": "TypeHierarchyOptions",+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "properties": [],+ "documentation": "Type hierarchy options used during static registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueContext",+ "properties": [+ {+ "name": "frameId",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "documentation": "The stack frame (as a DAP Id) where the execution has stopped."+ },+ {+ "name": "stoppedLocation",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range where execution has stopped.\nTypically the end position of the range denotes the line where the inline values are shown."+ }+ ],+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueText",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range for which the inline value applies."+ },+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The text of the inline value."+ }+ ],+ "documentation": "Provide inline value as text.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueVariableLookup",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range for which the inline value applies.\nThe range is used to extract the variable name from the underlying document."+ },+ {+ "name": "variableName",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "If specified the name of the variable to look up."+ },+ {+ "name": "caseSensitiveLookup",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "How to perform the lookup."+ }+ ],+ "documentation": "Provide inline value through a variable lookup.\nIf only a range is specified, the variable name will be extracted from the underlying document.\nAn optional variable name can be used to override the extracted name.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueEvaluatableExpression",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The document range for which the inline value applies.\nThe range is used to extract the evaluatable expression from the underlying document."+ },+ {+ "name": "expression",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "If specified the expression overrides the extracted expression."+ }+ ],+ "documentation": "Provide an inline value through an expression evaluation.\nIf only a range is specified, the expression will be extracted from the underlying document.\nAn optional expression can be used to override the extracted expression.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueOptions",+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "properties": [],+ "documentation": "Inline value options used during static registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHintLabelPart",+ "properties": [+ {+ "name": "value",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The value of this label part."+ },+ {+ "name": "tooltip",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkupContent"+ }+ ]+ },+ "optional": true,+ "documentation": "The tooltip text when you hover over this label part. Depending on\nthe client capability `inlayHint.resolveSupport` clients might resolve\nthis property late using the resolve request."+ },+ {+ "name": "location",+ "type": {+ "kind": "reference",+ "name": "Location"+ },+ "optional": true,+ "documentation": "An optional source code location that represents this\nlabel part.\n\nThe editor will use this location for the hover and for code navigation\nfeatures: This part will become a clickable link that resolves to the\ndefinition of the symbol at the given location (not necessarily the\nlocation itself), it shows the hover that shows at the given location,\nand it shows a context menu with further code navigation commands.\n\nDepending on the client capability `inlayHint.resolveSupport` clients\nmight resolve this property late using the resolve request."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "optional": true,+ "documentation": "An optional command for this label part.\n\nDepending on the client capability `inlayHint.resolveSupport` clients\nmight resolve this property late using the resolve request."+ }+ ],+ "documentation": "An inlay hint label part allows for interactive and composite labels\nof inlay hints.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "MarkupContent",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "MarkupKind"+ },+ "documentation": "The type of the Markup"+ },+ {+ "name": "value",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The content itself"+ }+ ],+ "documentation": "A `MarkupContent` literal represents a string value which content is interpreted base on its\nkind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.\n\nIf the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.\nSee https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting\n\nHere is an example how such a string can be constructed using JavaScript / TypeScript:\n```ts\nlet markdown: MarkdownContent = {\n kind: MarkupKind.Markdown,\n value: [\n '# Header',\n 'Some text',\n '```typescript',\n 'someCode();',\n '```'\n ].join('\\n')\n};\n```\n\n*Please Note* that clients might sanitize the return markdown. A client could decide to\nremove HTML from the markdown to avoid script execution."+ },+ {+ "name": "InlayHintOptions",+ "properties": [+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server provides support to resolve additional\ninformation for an inlay hint item."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Inlay hint options used during static registration.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "RelatedFullDocumentDiagnosticReport",+ "properties": [+ {+ "name": "relatedDocuments",+ "type": {+ "kind": "map",+ "key": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "value": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "FullDocumentDiagnosticReport"+ },+ {+ "kind": "reference",+ "name": "UnchangedDocumentDiagnosticReport"+ }+ ]+ }+ },+ "optional": true,+ "documentation": "Diagnostics of related documents. This information is useful\nin programming languages where code in a file A can generate\ndiagnostics in a file B which A depends on. An example of\nsuch a language is C/C++ where marco definitions in a file\na.cpp and result in errors in a header file b.hpp.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "FullDocumentDiagnosticReport"+ }+ ],+ "documentation": "A full diagnostic report with a set of related documents.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "RelatedUnchangedDocumentDiagnosticReport",+ "properties": [+ {+ "name": "relatedDocuments",+ "type": {+ "kind": "map",+ "key": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "value": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "FullDocumentDiagnosticReport"+ },+ {+ "kind": "reference",+ "name": "UnchangedDocumentDiagnosticReport"+ }+ ]+ }+ },+ "optional": true,+ "documentation": "Diagnostics of related documents. This information is useful\nin programming languages where code in a file A can generate\ndiagnostics in a file B which A depends on. An example of\nsuch a language is C/C++ where marco definitions in a file\na.cpp and result in errors in a header file b.hpp.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "UnchangedDocumentDiagnosticReport"+ }+ ],+ "documentation": "An unchanged diagnostic report with a set of related documents.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "FullDocumentDiagnosticReport",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "full"+ },+ "documentation": "A full document diagnostic report."+ },+ {+ "name": "resultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional result id. If provided it will\nbe sent on the next diagnostic request for the\nsame document."+ },+ {+ "name": "items",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Diagnostic"+ }+ },+ "documentation": "The actual items."+ }+ ],+ "documentation": "A diagnostic report with a full set of problems.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "UnchangedDocumentDiagnosticReport",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "unchanged"+ },+ "documentation": "A document diagnostic report indicating\nno changes to the last result. A server can\nonly return `unchanged` if result ids are\nprovided."+ },+ {+ "name": "resultId",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A result id which will be sent on the next\ndiagnostic request for the same document."+ }+ ],+ "documentation": "A diagnostic report indicating that the last returned\nreport is still accurate.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DiagnosticOptions",+ "properties": [+ {+ "name": "identifier",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional identifier under which the diagnostics are\nmanaged by the client."+ },+ {+ "name": "interFileDependencies",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "Whether the language has inter file dependencies meaning that\nediting code in one file can result in a different diagnostic\nset in another file. Inter file dependencies are common for\nmost programming languages and typically uncommon for linters."+ },+ {+ "name": "workspaceDiagnostics",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "The server provides support for workspace diagnostics as well."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Diagnostic options.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "PreviousResultId",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The URI for which the client knowns a\nresult id."+ },+ {+ "name": "value",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The value of the previous result id."+ }+ ],+ "documentation": "A previous result id in a workspace pull request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocument",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "The notebook document's uri."+ },+ {+ "name": "notebookType",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The type of the notebook."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "documentation": "The version number of this document (it will increase after each\nchange, including undo/redo)."+ },+ {+ "name": "metadata",+ "type": {+ "kind": "reference",+ "name": "LSPObject"+ },+ "optional": true,+ "documentation": "Additional metadata stored with the notebook\ndocument.\n\nNote: should always be an object literal (e.g. LSPObject)"+ },+ {+ "name": "cells",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookCell"+ }+ },+ "documentation": "The cells of a notebook."+ }+ ],+ "documentation": "A notebook document.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TextDocumentItem",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The text document's uri."+ },+ {+ "name": "languageId",+ "type": {+ "kind": "reference",+ "name": "LanguageKind"+ },+ "documentation": "The text document's language identifier."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "documentation": "The version number of this document (it will increase after each\nchange, including undo/redo)."+ },+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The content of the opened text document."+ }+ ],+ "documentation": "An item to transfer a text document from the client to the\nserver."+ },+ {+ "name": "NotebookDocumentSyncOptions",+ "properties": [+ {+ "name": "notebookSelector",+ "type": {+ "kind": "array",+ "element": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "NotebookDocumentFilterWithNotebook"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilterWithCells"+ }+ ]+ }+ },+ "documentation": "The notebooks to be synced"+ },+ {+ "name": "save",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether save notification should be forwarded to\nthe server. Will only be honored if mode === `notebook`."+ }+ ],+ "documentation": "Options specific to a notebook plus its cells\nto be synced to the server.\n\nIf a selector provides a notebook document\nfilter but no cell selector all cells of a\nmatching notebook document will be synced.\n\nIf a selector provides no notebook document\nfilter but only a cell selector all notebook\ndocument that contain at least one matching\ncell will be synced.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "VersionedNotebookDocumentIdentifier",+ "properties": [+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "documentation": "The version number of this notebook document."+ },+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "The notebook document's uri."+ }+ ],+ "documentation": "A versioned notebook document identifier.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocumentChangeEvent",+ "properties": [+ {+ "name": "metadata",+ "type": {+ "kind": "reference",+ "name": "LSPObject"+ },+ "optional": true,+ "documentation": "The changed meta data if any.\n\nNote: should always be an object literal (e.g. LSPObject)"+ },+ {+ "name": "cells",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentCellChanges"+ },+ "optional": true,+ "documentation": "Changes to cells"+ }+ ],+ "documentation": "A change event for a notebook document.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocumentIdentifier",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "The notebook document's uri."+ }+ ],+ "documentation": "A literal to identify a notebook document in the client.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineCompletionContext",+ "properties": [+ {+ "name": "triggerKind",+ "type": {+ "kind": "reference",+ "name": "InlineCompletionTriggerKind"+ },+ "documentation": "Describes how the inline completion was triggered."+ },+ {+ "name": "selectedCompletionInfo",+ "type": {+ "kind": "reference",+ "name": "SelectedCompletionInfo"+ },+ "optional": true,+ "documentation": "Provides information about the currently selected item in the autocomplete widget if it is visible."+ }+ ],+ "documentation": "Provides information about the context in which an inline completion was requested.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "StringValue",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "stringLiteral",+ "value": "snippet"+ },+ "documentation": "The kind of string value."+ },+ {+ "name": "value",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The snippet string."+ }+ ],+ "documentation": "A string value used as a snippet is a template which allows to insert text\nand to control the editor cursor when insertion happens.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Variables are defined with `$name` and\n`${name:default value}`.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "InlineCompletionOptions",+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "properties": [],+ "documentation": "Inline completion options used during static registration.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "Registration",+ "properties": [+ {+ "name": "id",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The id used to register the request. The id can be used to deregister\nthe request again."+ },+ {+ "name": "method",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The method / capability to register for."+ },+ {+ "name": "registerOptions",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "Options necessary for the registration."+ }+ ],+ "documentation": "General parameters to register for a notification or to register a provider."+ },+ {+ "name": "Unregistration",+ "properties": [+ {+ "name": "id",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The id used to unregister the request or notification. Usually an id\nprovided during the register request."+ },+ {+ "name": "method",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The method to unregister for."+ }+ ],+ "documentation": "General parameters to unregister a request or notification."+ },+ {+ "name": "_InitializeParams",+ "properties": [+ {+ "name": "processId",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The process Id of the parent process that started\nthe server.\n\nIs `null` if the process has not been started by another process.\nIf the parent process is not alive then the server should exit."+ },+ {+ "name": "clientInfo",+ "type": {+ "kind": "reference",+ "name": "ClientInfo"+ },+ "optional": true,+ "documentation": "Information about the client\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "locale",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The locale the client is currently showing the user interface\nin. This must not necessarily be the locale of the operating\nsystem.\n\nUses IETF language tags as the value's syntax\n(See https://en.wikipedia.org/wiki/IETF_language_tag)\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "rootPath",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "optional": true,+ "documentation": "The rootPath of the workspace. Is null\nif no folder is open.\n\n@deprecated in favour of rootUri.",+ "deprecated": "in favour of rootUri."+ },+ {+ "name": "rootUri",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "DocumentUri"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The rootUri of the workspace. Is null if no\nfolder is open. If both `rootPath` and `rootUri` are set\n`rootUri` wins.\n\n@deprecated in favour of workspaceFolders.",+ "deprecated": "in favour of workspaceFolders."+ },+ {+ "name": "capabilities",+ "type": {+ "kind": "reference",+ "name": "ClientCapabilities"+ },+ "documentation": "The capabilities provided by the client (editor or tool)"+ },+ {+ "name": "initializationOptions",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "User provided initialization options."+ },+ {+ "name": "trace",+ "type": {+ "kind": "reference",+ "name": "TraceValue"+ },+ "optional": true,+ "documentation": "The initial trace setting. If omitted trace is disabled ('off')."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressParams"+ }+ ],+ "documentation": "The initialize parameters"+ },+ {+ "name": "WorkspaceFoldersInitializeParams",+ "properties": [+ {+ "name": "workspaceFolders",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "WorkspaceFolder"+ }+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "optional": true,+ "documentation": "The workspace folders configured in the client when the server starts.\n\nThis property is only available if the client supports workspace folders.\nIt can be `null` if the client supports workspace folders but none are\nconfigured.\n\n@since 3.6.0",+ "since": "3.6.0"+ }+ ]+ },+ {+ "name": "ServerCapabilities",+ "properties": [+ {+ "name": "positionEncoding",+ "type": {+ "kind": "reference",+ "name": "PositionEncodingKind"+ },+ "optional": true,+ "documentation": "The position encoding the server picked from the encodings offered\nby the client via the client capability `general.positionEncodings`.\n\nIf the client didn't provide any position encodings the only valid\nvalue that a server can return is 'utf-16'.\n\nIf omitted it defaults to 'utf-16'.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "textDocumentSync",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextDocumentSyncOptions"+ },+ {+ "kind": "reference",+ "name": "TextDocumentSyncKind"+ }+ ]+ },+ "optional": true,+ "documentation": "Defines how text documents are synced. Is either a detailed structure\ndefining each notification or for backwards compatibility the\nTextDocumentSyncKind number."+ },+ {+ "name": "notebookDocumentSync",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "NotebookDocumentSyncOptions"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentSyncRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "Defines how notebook documents are synced.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "completionProvider",+ "type": {+ "kind": "reference",+ "name": "CompletionOptions"+ },+ "optional": true,+ "documentation": "The server provides completion support."+ },+ {+ "name": "hoverProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "HoverOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides hover support."+ },+ {+ "name": "signatureHelpProvider",+ "type": {+ "kind": "reference",+ "name": "SignatureHelpOptions"+ },+ "optional": true,+ "documentation": "The server provides signature help support."+ },+ {+ "name": "declarationProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DeclarationOptions"+ },+ {+ "kind": "reference",+ "name": "DeclarationRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides Goto Declaration support."+ },+ {+ "name": "definitionProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DefinitionOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides goto definition support."+ },+ {+ "name": "typeDefinitionProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "TypeDefinitionOptions"+ },+ {+ "kind": "reference",+ "name": "TypeDefinitionRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides Goto Type Definition support."+ },+ {+ "name": "implementationProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "ImplementationOptions"+ },+ {+ "kind": "reference",+ "name": "ImplementationRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides Goto Implementation support."+ },+ {+ "name": "referencesProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "ReferenceOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides find references support."+ },+ {+ "name": "documentHighlightProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DocumentHighlightOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides document highlight support."+ },+ {+ "name": "documentSymbolProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DocumentSymbolOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides document symbol support."+ },+ {+ "name": "codeActionProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "CodeActionOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides code actions. CodeActionOptions may only be\nspecified if the client states that it supports\n`codeActionLiteralSupport` in its initial `initialize` request."+ },+ {+ "name": "codeLensProvider",+ "type": {+ "kind": "reference",+ "name": "CodeLensOptions"+ },+ "optional": true,+ "documentation": "The server provides code lens."+ },+ {+ "name": "documentLinkProvider",+ "type": {+ "kind": "reference",+ "name": "DocumentLinkOptions"+ },+ "optional": true,+ "documentation": "The server provides document link support."+ },+ {+ "name": "colorProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DocumentColorOptions"+ },+ {+ "kind": "reference",+ "name": "DocumentColorRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides color provider support."+ },+ {+ "name": "workspaceSymbolProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "WorkspaceSymbolOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides workspace symbol support."+ },+ {+ "name": "documentFormattingProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DocumentFormattingOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides document formatting."+ },+ {+ "name": "documentRangeFormattingProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "DocumentRangeFormattingOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides document range formatting."+ },+ {+ "name": "documentOnTypeFormattingProvider",+ "type": {+ "kind": "reference",+ "name": "DocumentOnTypeFormattingOptions"+ },+ "optional": true,+ "documentation": "The server provides document formatting on typing."+ },+ {+ "name": "renameProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "RenameOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides rename support. RenameOptions may only be\nspecified if the client states that it supports\n`prepareSupport` in its initial `initialize` request."+ },+ {+ "name": "foldingRangeProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "FoldingRangeOptions"+ },+ {+ "kind": "reference",+ "name": "FoldingRangeRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides folding provider support."+ },+ {+ "name": "selectionRangeProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "SelectionRangeOptions"+ },+ {+ "kind": "reference",+ "name": "SelectionRangeRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides selection range support."+ },+ {+ "name": "executeCommandProvider",+ "type": {+ "kind": "reference",+ "name": "ExecuteCommandOptions"+ },+ "optional": true,+ "documentation": "The server provides execute command support."+ },+ {+ "name": "callHierarchyProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "CallHierarchyOptions"+ },+ {+ "kind": "reference",+ "name": "CallHierarchyRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides call hierarchy support.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "linkedEditingRangeProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "LinkedEditingRangeOptions"+ },+ {+ "kind": "reference",+ "name": "LinkedEditingRangeRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides linked editing range support.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "semanticTokensProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "SemanticTokensOptions"+ },+ {+ "kind": "reference",+ "name": "SemanticTokensRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides semantic tokens support.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "monikerProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "MonikerOptions"+ },+ {+ "kind": "reference",+ "name": "MonikerRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides moniker support.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "typeHierarchyProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "TypeHierarchyOptions"+ },+ {+ "kind": "reference",+ "name": "TypeHierarchyRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides type hierarchy support.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlineValueProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "InlineValueOptions"+ },+ {+ "kind": "reference",+ "name": "InlineValueRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides inline values.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlayHintProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "InlayHintOptions"+ },+ {+ "kind": "reference",+ "name": "InlayHintRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server provides inlay hints.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "diagnosticProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "DiagnosticOptions"+ },+ {+ "kind": "reference",+ "name": "DiagnosticRegistrationOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "The server has support for pull model diagnostics.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlineCompletionProvider",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "InlineCompletionOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "Inline completion options used during static registration.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "workspace",+ "type": {+ "kind": "reference",+ "name": "WorkspaceOptions"+ },+ "optional": true,+ "documentation": "Workspace specific server capabilities."+ },+ {+ "name": "experimental",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "Experimental server capabilities."+ }+ ],+ "documentation": "Defines the capabilities provided by a language\nserver."+ },+ {+ "name": "ServerInfo",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of the server as defined by the server."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The server's version as defined by the server."+ }+ ],+ "documentation": "Information about the server\n\n@since 3.15.0\n@since 3.18.0 ServerInfo type name added.\n@proposed",+ "since": "3.18.0 ServerInfo type name added."+ },+ {+ "name": "VersionedTextDocumentIdentifier",+ "properties": [+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "documentation": "The version number of this document."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ }+ ],+ "documentation": "A text document identifier to denote a specific version of a text document."+ },+ {+ "name": "SaveOptions",+ "properties": [+ {+ "name": "includeText",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client is supposed to include the content on save."+ }+ ],+ "documentation": "Save options."+ },+ {+ "name": "FileEvent",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The file's uri."+ },+ {+ "name": "type",+ "type": {+ "kind": "reference",+ "name": "FileChangeType"+ },+ "documentation": "The change type."+ }+ ],+ "documentation": "An event describing a file change."+ },+ {+ "name": "FileSystemWatcher",+ "properties": [+ {+ "name": "globPattern",+ "type": {+ "kind": "reference",+ "name": "GlobPattern"+ },+ "documentation": "The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.\n\n@since 3.17.0 support for relative patterns.",+ "since": "3.17.0 support for relative patterns."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "WatchKind"+ },+ "optional": true,+ "documentation": "The kind of events of interest. If omitted it defaults\nto WatchKind.Create | WatchKind.Change | WatchKind.Delete\nwhich is 7."+ }+ ]+ },+ {+ "name": "Diagnostic",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range at which the message applies"+ },+ {+ "name": "severity",+ "type": {+ "kind": "reference",+ "name": "DiagnosticSeverity"+ },+ "optional": true,+ "documentation": "The diagnostic's severity. Can be omitted. If omitted it is up to the\nclient to interpret diagnostics as error, warning, info or hint."+ },+ {+ "name": "code",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "string"+ }+ ]+ },+ "optional": true,+ "documentation": "The diagnostic's code, which usually appear in the user interface."+ },+ {+ "name": "codeDescription",+ "type": {+ "kind": "reference",+ "name": "CodeDescription"+ },+ "optional": true,+ "documentation": "An optional property to describe the error code.\nRequires the code field (above) to be present/not null.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "source",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A human-readable string describing the source of this\ndiagnostic, e.g. 'typescript' or 'super lint'. It usually\nappears in the user interface."+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The diagnostic's message. It usually appears in the user interface"+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DiagnosticTag"+ }+ },+ "optional": true,+ "documentation": "Additional metadata about the diagnostic.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "relatedInformation",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DiagnosticRelatedInformation"+ }+ },+ "optional": true,+ "documentation": "An array of related diagnostic information, e.g. when symbol-names within\na scope collide all definitions can be marked via this property."+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A data entry field that is preserved between a `textDocument/publishDiagnostics`\nnotification and `textDocument/codeAction` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "Represents a diagnostic, such as a compiler error or warning. Diagnostic objects\nare only valid in the scope of a resource."+ },+ {+ "name": "CompletionContext",+ "properties": [+ {+ "name": "triggerKind",+ "type": {+ "kind": "reference",+ "name": "CompletionTriggerKind"+ },+ "documentation": "How the completion was triggered."+ },+ {+ "name": "triggerCharacter",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The trigger character (a single character) that has trigger code complete.\nIs undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`"+ }+ ],+ "documentation": "Contains additional information about the context in which a completion request is triggered."+ },+ {+ "name": "CompletionItemLabelDetails",+ "properties": [+ {+ "name": "detail",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional string which is rendered less prominently directly after {@link CompletionItem.label label},\nwithout any spacing. Should be used for function signatures and type annotations."+ },+ {+ "name": "description",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used\nfor fully qualified names and file paths."+ }+ ],+ "documentation": "Additional details for a completion item label.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InsertReplaceEdit",+ "properties": [+ {+ "name": "newText",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The string to be inserted."+ },+ {+ "name": "insert",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range if the insert is requested"+ },+ {+ "name": "replace",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range if the replace is requested."+ }+ ],+ "documentation": "A special text edit to provide an insert and a replace operation.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CompletionItemDefaults",+ "properties": [+ {+ "name": "commitCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "A default commit character set.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "editRange",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Range"+ },+ {+ "kind": "reference",+ "name": "EditRangeWithInsertReplace"+ }+ ]+ },+ "optional": true,+ "documentation": "A default edit range.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "insertTextFormat",+ "type": {+ "kind": "reference",+ "name": "InsertTextFormat"+ },+ "optional": true,+ "documentation": "A default insert text format.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "insertTextMode",+ "type": {+ "kind": "reference",+ "name": "InsertTextMode"+ },+ "optional": true,+ "documentation": "A default insert text mode.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "data",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "A default data value.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "In many cases the items of an actual completion result share the same\nvalue for properties like `commitCharacters` or the range of a text\nedit. A completion list can therefore define item defaults which will\nbe used if a completion item itself doesn't specify the value.\n\nIf a completion list specifies a default value and a completion item\nalso specifies a corresponding value the one from the item is used.\n\nServers are only allowed to return default values if the client\nsignals support for this via the `completionList.itemDefaults`\ncapability.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "CompletionOptions",+ "properties": [+ {+ "name": "triggerCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "Most tools trigger completion request automatically without explicitly requesting\nit using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user\nstarts to type an identifier. For example if the user types `c` in a JavaScript file\ncode complete will automatically pop up present `console` besides others as a\ncompletion item. Characters that make up identifiers don't need to be listed here.\n\nIf code complete should automatically be trigger on characters not being valid inside\nan identifier (for example `.` in JavaScript) list them in `triggerCharacters`."+ },+ {+ "name": "allCommitCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "The list of all possible characters that commit a completion. This field can be used\nif clients don't support individual commit characters per completion item. See\n`ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`\n\nIf a server provides both `allCommitCharacters` and commit characters on an individual\ncompletion item the ones on the completion item win.\n\n@since 3.2.0",+ "since": "3.2.0"+ },+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server provides support to resolve additional\ninformation for a completion item."+ },+ {+ "name": "completionItem",+ "type": {+ "kind": "reference",+ "name": "ServerCompletionItemOptions"+ },+ "optional": true,+ "documentation": "The server supports the following `CompletionItem` specific\ncapabilities.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Completion options."+ },+ {+ "name": "HoverOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Hover options."+ },+ {+ "name": "SignatureHelpContext",+ "properties": [+ {+ "name": "triggerKind",+ "type": {+ "kind": "reference",+ "name": "SignatureHelpTriggerKind"+ },+ "documentation": "Action that caused signature help to be triggered."+ },+ {+ "name": "triggerCharacter",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "Character that caused signature help to be triggered.\n\nThis is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`"+ },+ {+ "name": "isRetrigger",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "`true` if signature help was already showing when it was triggered.\n\nRetriggers occurs when the signature help is already active and can be caused by actions such as\ntyping a trigger character, a cursor move, or document content changes."+ },+ {+ "name": "activeSignatureHelp",+ "type": {+ "kind": "reference",+ "name": "SignatureHelp"+ },+ "optional": true,+ "documentation": "The currently active `SignatureHelp`.\n\nThe `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on\nthe user navigating through available signatures."+ }+ ],+ "documentation": "Additional information about the context in which a signature help request was triggered.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "SignatureInformation",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The label of this signature. Will be shown in\nthe UI."+ },+ {+ "name": "documentation",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkupContent"+ }+ ]+ },+ "optional": true,+ "documentation": "The human-readable doc-comment of this signature. Will be shown\nin the UI but can be omitted."+ },+ {+ "name": "parameters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ParameterInformation"+ }+ },+ "optional": true,+ "documentation": "The parameters of this signature."+ },+ {+ "name": "activeParameter",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "uinteger"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "optional": true,+ "documentation": "The index of the active parameter.\n\nIf `null`, no parameter of the signature is active (for example a named\nargument that does not match any declared parameters). This is only valid\nif the client specifies the client capability\n`textDocument.signatureHelp.noActiveParameterSupport === true`\n\nIf provided (or `null`), this is used in place of\n`SignatureHelp.activeParameter`.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "Represents the signature of something callable. A signature\ncan have a label, like a function-name, a doc-comment, and\na set of parameters."+ },+ {+ "name": "SignatureHelpOptions",+ "properties": [+ {+ "name": "triggerCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "List of characters that trigger signature help automatically."+ },+ {+ "name": "retriggerCharacters",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "List of characters that re-trigger signature help.\n\nThese trigger characters are only active when signature help is already showing. All trigger characters\nare also counted as re-trigger characters.\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Server Capabilities for a {@link SignatureHelpRequest}."+ },+ {+ "name": "DefinitionOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Server Capabilities for a {@link DefinitionRequest}."+ },+ {+ "name": "ReferenceContext",+ "properties": [+ {+ "name": "includeDeclaration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "Include the declaration of the current symbol."+ }+ ],+ "documentation": "Value-object that contains additional information when\nrequesting references."+ },+ {+ "name": "ReferenceOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Reference options."+ },+ {+ "name": "DocumentHighlightOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link DocumentHighlightRequest}."+ },+ {+ "name": "BaseSymbolInformation",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of this symbol."+ },+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "SymbolKind"+ },+ "documentation": "The kind of this symbol."+ },+ {+ "name": "tags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolTag"+ }+ },+ "optional": true,+ "documentation": "Tags for this symbol.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "containerName",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The name of the symbol containing this symbol. This information is for\nuser interface purposes (e.g. to render a qualifier in the user interface\nif necessary). It can't be used to re-infer a hierarchy for the document\nsymbols."+ }+ ],+ "documentation": "A base for all symbol information."+ },+ {+ "name": "DocumentSymbolOptions",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A human-readable string that is shown when multiple outlines trees\nare shown for the same document.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link DocumentSymbolRequest}."+ },+ {+ "name": "CodeActionContext",+ "properties": [+ {+ "name": "diagnostics",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Diagnostic"+ }+ },+ "documentation": "An array of diagnostics known on the client side overlapping the range provided to the\n`textDocument/codeAction` request. They are provided so that the server knows which\nerrors are currently presented to the user for the given range. There is no guarantee\nthat these accurately reflect the error state of the resource. The primary parameter\nto compute code actions is the provided range."+ },+ {+ "name": "only",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeActionKind"+ }+ },+ "optional": true,+ "documentation": "Requested kind of actions to return.\n\nActions not of this kind are filtered out by the client before being shown. So servers\ncan omit computing them."+ },+ {+ "name": "triggerKind",+ "type": {+ "kind": "reference",+ "name": "CodeActionTriggerKind"+ },+ "optional": true,+ "documentation": "The reason why code actions were requested.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Contains additional diagnostic information about the context in which\na {@link CodeActionProvider.provideCodeActions code action} is run."+ },+ {+ "name": "CodeActionDisabled",+ "properties": [+ {+ "name": "reason",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "Human readable description of why the code action is currently disabled.\n\nThis is displayed in the code actions UI."+ }+ ],+ "documentation": "Captures why the code action is currently disabled.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "CodeActionOptions",+ "properties": [+ {+ "name": "codeActionKinds",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeActionKind"+ }+ },+ "optional": true,+ "documentation": "CodeActionKinds that this server may return.\n\nThe list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server\nmay list out every specific kind they provide."+ },+ {+ "name": "documentation",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeActionKindDocumentation"+ }+ },+ "optional": true,+ "documentation": "Static documentation for a class of code actions.\n\nDocumentation from the provider should be shown in the code actions menu if either:\n\n- Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that\n most closely matches the requested code action kind. For example, if a provider has documentation for\n both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`,\n the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`.\n\n- Any code actions of `kind` are returned by the provider.\n\nAt most one documentation entry should be shown per provider.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server provides support to resolve additional\ninformation for a code action.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link CodeActionRequest}."+ },+ {+ "name": "LocationUriOnly",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ }+ }+ ],+ "documentation": "Location with only uri and does not include range.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "WorkspaceSymbolOptions",+ "properties": [+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server provides support to resolve additional\ninformation for a workspace symbol.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Server capabilities for a {@link WorkspaceSymbolRequest}."+ },+ {+ "name": "CodeLensOptions",+ "properties": [+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Code lens has a resolve provider as well."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Code Lens provider options of a {@link CodeLensRequest}."+ },+ {+ "name": "DocumentLinkOptions",+ "properties": [+ {+ "name": "resolveProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Document links have a resolve provider as well."+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link DocumentLinkRequest}."+ },+ {+ "name": "FormattingOptions",+ "properties": [+ {+ "name": "tabSize",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "Size of a tab in spaces."+ },+ {+ "name": "insertSpaces",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "Prefer spaces over tabs."+ },+ {+ "name": "trimTrailingWhitespace",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Trim trailing whitespace on a line.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "insertFinalNewline",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Insert a newline character at the end of the file if one does not exist.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "trimFinalNewlines",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Trim all newlines after the final newline at the end of the file.\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "documentation": "Value-object describing what options formatting should use."+ },+ {+ "name": "DocumentFormattingOptions",+ "properties": [],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link DocumentFormattingRequest}."+ },+ {+ "name": "DocumentRangeFormattingOptions",+ "properties": [+ {+ "name": "rangesSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the server supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link DocumentRangeFormattingRequest}."+ },+ {+ "name": "DocumentOnTypeFormattingOptions",+ "properties": [+ {+ "name": "firstTriggerCharacter",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A character on which formatting should be triggered, like `{`."+ },+ {+ "name": "moreTriggerCharacter",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "More trigger characters."+ }+ ],+ "documentation": "Provider options for a {@link DocumentOnTypeFormattingRequest}."+ },+ {+ "name": "RenameOptions",+ "properties": [+ {+ "name": "prepareProvider",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Renames should be checked and tested before being executed.\n\n@since version 3.12.0",+ "since": "version 3.12.0"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "Provider options for a {@link RenameRequest}."+ },+ {+ "name": "PrepareRenamePlaceholder",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ }+ },+ {+ "name": "placeholder",+ "type": {+ "kind": "base",+ "name": "string"+ }+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "PrepareRenameDefaultBehavior",+ "properties": [+ {+ "name": "defaultBehavior",+ "type": {+ "kind": "base",+ "name": "boolean"+ }+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ExecuteCommandOptions",+ "properties": [+ {+ "name": "commands",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The commands to be executed on the server"+ }+ ],+ "mixins": [+ {+ "kind": "reference",+ "name": "WorkDoneProgressOptions"+ }+ ],+ "documentation": "The server capabilities of a {@link ExecuteCommandRequest}."+ },+ {+ "name": "SemanticTokensLegend",+ "properties": [+ {+ "name": "tokenTypes",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The token types a server uses."+ },+ {+ "name": "tokenModifiers",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The token modifiers a server uses."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensFullDelta",+ "properties": [+ {+ "name": "delta",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server supports deltas for full documents."+ }+ ],+ "documentation": "Semantic tokens options to support deltas for full documents\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "OptionalVersionedTextDocumentIdentifier",+ "properties": [+ {+ "name": "version",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The version number of this document. If a versioned text document identifier\nis sent from the server to the client and the file is not open in the editor\n(the server has not received an open notification before) the server can send\n`null` to indicate that the version is unknown and the content on disk is the\ntruth (as specified with document content ownership)."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ }+ ],+ "documentation": "A text document identifier to optionally denote a specific version of a text document."+ },+ {+ "name": "AnnotatedTextEdit",+ "properties": [+ {+ "name": "annotationId",+ "type": {+ "kind": "reference",+ "name": "ChangeAnnotationIdentifier"+ },+ "documentation": "The actual identifier of the change annotation"+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "TextEdit"+ }+ ],+ "documentation": "A special text edit with an additional change annotation.\n\n@since 3.16.0.",+ "since": "3.16.0."+ },+ {+ "name": "ResourceOperation",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The resource operation kind."+ },+ {+ "name": "annotationId",+ "type": {+ "kind": "reference",+ "name": "ChangeAnnotationIdentifier"+ },+ "optional": true,+ "documentation": "An optional annotation identifier describing the operation.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "A generic resource operation."+ },+ {+ "name": "CreateFileOptions",+ "properties": [+ {+ "name": "overwrite",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Overwrite existing file. Overwrite wins over `ignoreIfExists`"+ },+ {+ "name": "ignoreIfExists",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Ignore if exists."+ }+ ],+ "documentation": "Options to create a file."+ },+ {+ "name": "RenameFileOptions",+ "properties": [+ {+ "name": "overwrite",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Overwrite target if existing. Overwrite wins over `ignoreIfExists`"+ },+ {+ "name": "ignoreIfExists",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Ignores if target exists."+ }+ ],+ "documentation": "Rename file options"+ },+ {+ "name": "DeleteFileOptions",+ "properties": [+ {+ "name": "recursive",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Delete the content recursively if a folder is denoted."+ },+ {+ "name": "ignoreIfNotExists",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Ignore the operation if the file doesn't exist."+ }+ ],+ "documentation": "Delete file options"+ },+ {+ "name": "FileOperationPattern",+ "properties": [+ {+ "name": "glob",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The glob pattern to match. Glob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)"+ },+ {+ "name": "matches",+ "type": {+ "kind": "reference",+ "name": "FileOperationPatternKind"+ },+ "optional": true,+ "documentation": "Whether to match files or folders with this pattern.\n\nMatches both if undefined."+ },+ {+ "name": "options",+ "type": {+ "kind": "reference",+ "name": "FileOperationPatternOptions"+ },+ "optional": true,+ "documentation": "Additional options used during matching."+ }+ ],+ "documentation": "A pattern to describe in which file operation requests or notifications\nthe server is interested in receiving.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "WorkspaceFullDocumentDiagnosticReport",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The URI for which diagnostic information is reported."+ },+ {+ "name": "version",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The version number for which the diagnostics are reported.\nIf the document is not marked as open `null` can be provided."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "FullDocumentDiagnosticReport"+ }+ ],+ "documentation": "A full document diagnostic report for a workspace diagnostic result.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceUnchangedDocumentDiagnosticReport",+ "properties": [+ {+ "name": "uri",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The URI for which diagnostic information is reported."+ },+ {+ "name": "version",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The version number for which the diagnostics are reported.\nIf the document is not marked as open `null` can be provided."+ }+ ],+ "extends": [+ {+ "kind": "reference",+ "name": "UnchangedDocumentDiagnosticReport"+ }+ ],+ "documentation": "An unchanged document diagnostic report for a workspace diagnostic result.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookCell",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "NotebookCellKind"+ },+ "documentation": "The cell's kind"+ },+ {+ "name": "document",+ "type": {+ "kind": "base",+ "name": "DocumentUri"+ },+ "documentation": "The URI of the cell's text document\ncontent."+ },+ {+ "name": "metadata",+ "type": {+ "kind": "reference",+ "name": "LSPObject"+ },+ "optional": true,+ "documentation": "Additional metadata stored with the cell.\n\nNote: should always be an object literal (e.g. LSPObject)"+ },+ {+ "name": "executionSummary",+ "type": {+ "kind": "reference",+ "name": "ExecutionSummary"+ },+ "optional": true,+ "documentation": "Additional execution summary information\nif supported by the client."+ }+ ],+ "documentation": "A notebook cell.\n\nA cell's document URI must be unique across ALL notebook\ncells and can therefore be used to uniquely identify a\nnotebook cell or the cell's text document.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocumentFilterWithNotebook",+ "properties": [+ {+ "name": "notebook",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilter"+ }+ ]+ },+ "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook."+ },+ {+ "name": "cells",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookCellLanguage"+ }+ },+ "optional": true,+ "documentation": "The cells of the matching notebook to be synced."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentFilterWithCells",+ "properties": [+ {+ "name": "notebook",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilter"+ }+ ]+ },+ "optional": true,+ "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook."+ },+ {+ "name": "cells",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookCellLanguage"+ }+ },+ "documentation": "The cells of the matching notebook to be synced."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentCellChanges",+ "properties": [+ {+ "name": "structure",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentCellChangeStructure"+ },+ "optional": true,+ "documentation": "Changes to the cell structure to add or\nremove cells."+ },+ {+ "name": "data",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookCell"+ }+ },+ "optional": true,+ "documentation": "Changes to notebook cells properties like its\nkind, execution summary or metadata."+ },+ {+ "name": "textContent",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookDocumentCellContentChanges"+ }+ },+ "optional": true,+ "documentation": "Changes to the text content of notebook cells."+ }+ ],+ "documentation": "Cell changes to a notebook document.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "SelectedCompletionInfo",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range that will be replaced if this completion item is accepted."+ },+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The text the range will be replaced with if this completion is accepted."+ }+ ],+ "documentation": "Describes the currently selected completion item.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "ClientInfo",+ "properties": [+ {+ "name": "name",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of the client as defined by the client."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The client's version as defined by the client."+ }+ ],+ "documentation": "Information about the client\n\n@since 3.15.0\n@since 3.18.0 ClientInfo type name added.\n@proposed",+ "since": "3.18.0 ClientInfo type name added."+ },+ {+ "name": "ClientCapabilities",+ "properties": [+ {+ "name": "workspace",+ "type": {+ "kind": "reference",+ "name": "WorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Workspace specific client capabilities."+ },+ {+ "name": "textDocument",+ "type": {+ "kind": "reference",+ "name": "TextDocumentClientCapabilities"+ },+ "optional": true,+ "documentation": "Text document specific client capabilities."+ },+ {+ "name": "notebookDocument",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the notebook document support.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "window",+ "type": {+ "kind": "reference",+ "name": "WindowClientCapabilities"+ },+ "optional": true,+ "documentation": "Window specific client capabilities."+ },+ {+ "name": "general",+ "type": {+ "kind": "reference",+ "name": "GeneralClientCapabilities"+ },+ "optional": true,+ "documentation": "General client capabilities.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "experimental",+ "type": {+ "kind": "reference",+ "name": "LSPAny"+ },+ "optional": true,+ "documentation": "Experimental client capabilities."+ }+ ],+ "documentation": "Defines the capabilities provided by the client."+ },+ {+ "name": "TextDocumentSyncOptions",+ "properties": [+ {+ "name": "openClose",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Open and close notifications are sent to the server. If omitted open close notification should not\nbe sent."+ },+ {+ "name": "change",+ "type": {+ "kind": "reference",+ "name": "TextDocumentSyncKind"+ },+ "optional": true,+ "documentation": "Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full\nand TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None."+ },+ {+ "name": "willSave",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "If present will save notifications are sent to the server. If omitted the notification should not be\nsent."+ },+ {+ "name": "willSaveWaitUntil",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "If present will save wait until requests are sent to the server. If omitted the request should not be\nsent."+ },+ {+ "name": "save",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "SaveOptions"+ }+ ]+ },+ "optional": true,+ "documentation": "If present save notifications are sent to the server. If omitted the notification should not be\nsent."+ }+ ]+ },+ {+ "name": "WorkspaceOptions",+ "properties": [+ {+ "name": "workspaceFolders",+ "type": {+ "kind": "reference",+ "name": "WorkspaceFoldersServerCapabilities"+ },+ "optional": true,+ "documentation": "The server supports workspace folder.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "fileOperations",+ "type": {+ "kind": "reference",+ "name": "FileOperationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in notifications/requests for operations on files.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "Defines workspace specific capabilities of the server.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "TextDocumentContentChangePartial",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "reference",+ "name": "Range"+ },+ "documentation": "The range of the document that changed."+ },+ {+ "name": "rangeLength",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "The optional length of the range that got replaced.\n\n@deprecated use range instead.",+ "deprecated": "use range instead."+ },+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The new text for the provided range."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "TextDocumentContentChangeWholeDocument",+ "properties": [+ {+ "name": "text",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The new text of the whole document."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "CodeDescription",+ "properties": [+ {+ "name": "href",+ "type": {+ "kind": "base",+ "name": "URI"+ },+ "documentation": "An URI to open with more information about the diagnostic error."+ }+ ],+ "documentation": "Structure to capture a description for an error code.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "DiagnosticRelatedInformation",+ "properties": [+ {+ "name": "location",+ "type": {+ "kind": "reference",+ "name": "Location"+ },+ "documentation": "The location of this related diagnostic information."+ },+ {+ "name": "message",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The message of this related diagnostic information."+ }+ ],+ "documentation": "Represents a related message and source code location for a diagnostic. This should be\nused to point to code locations that cause or related to a diagnostics, e.g when duplicating\na symbol in a scope."+ },+ {+ "name": "EditRangeWithInsertReplace",+ "properties": [+ {+ "name": "insert",+ "type": {+ "kind": "reference",+ "name": "Range"+ }+ },+ {+ "name": "replace",+ "type": {+ "kind": "reference",+ "name": "Range"+ }+ }+ ],+ "documentation": "Edit range variant that includes ranges for insert and replace operations.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ServerCompletionItemOptions",+ "properties": [+ {+ "name": "labelDetailsSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server has support for completion item label\ndetails (see also `CompletionItemLabelDetails`) when\nreceiving a completion item in a resolve call.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "MarkedStringWithLanguage",+ "properties": [+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ }+ },+ {+ "name": "value",+ "type": {+ "kind": "base",+ "name": "string"+ }+ }+ ],+ "documentation": "@since 3.18.0\n@proposed\n@deprecated use MarkupContent instead.",+ "since": "3.18.0",+ "deprecated": "use MarkupContent instead."+ },+ {+ "name": "ParameterInformation",+ "properties": [+ {+ "name": "label",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "tuple",+ "items": [+ {+ "kind": "base",+ "name": "uinteger"+ },+ {+ "kind": "base",+ "name": "uinteger"+ }+ ]+ }+ ]+ },+ "documentation": "The label of this parameter information.\n\nEither a string or an inclusive start and exclusive end offsets within its containing\nsignature label. (see SignatureInformation.label). The offsets are based on a UTF-16\nstring representation as `Position` and `Range` does.\n\nTo avoid ambiguities a server should use the [start, end] offset value instead of using\na substring. Whether a client support this is controlled via `labelOffsetSupport` client\ncapability.\n\n*Note*: a label of type string should be a substring of its containing signature label.\nIts intended use case is to highlight the parameter label part in the `SignatureInformation.label`."+ },+ {+ "name": "documentation",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkupContent"+ }+ ]+ },+ "optional": true,+ "documentation": "The human-readable doc-comment of this parameter. Will be shown\nin the UI but can be omitted."+ }+ ],+ "documentation": "Represents a parameter of a callable-signature. A parameter can\nhave a label and a doc-comment."+ },+ {+ "name": "CodeActionKindDocumentation",+ "properties": [+ {+ "name": "kind",+ "type": {+ "kind": "reference",+ "name": "CodeActionKind"+ },+ "documentation": "The kind of the code action being documented.\n\nIf the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any\nrefactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the\ndocumentation will only be shown when extract refactoring code actions are returned."+ },+ {+ "name": "command",+ "type": {+ "kind": "reference",+ "name": "Command"+ },+ "documentation": "Command that is ued to display the documentation to the user.\n\nThe title of this documentation code action is taken from {@linkcode Command.title}"+ }+ ],+ "documentation": "Documentation for a class of code actions.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "NotebookCellTextDocumentFilter",+ "properties": [+ {+ "name": "notebook",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilter"+ }+ ]+ },+ "documentation": "A filter that matches against the notebook\ncontaining the notebook cell. If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook."+ },+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A language id like `python`.\n\nWill be matched against the language id of the\nnotebook cell document. '*' matches every language."+ }+ ],+ "documentation": "A notebook cell text document filter denotes a cell text\ndocument by different properties.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "FileOperationPatternOptions",+ "properties": [+ {+ "name": "ignoreCase",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The pattern should be matched ignoring casing."+ }+ ],+ "documentation": "Matching options for the file operation pattern.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "ExecutionSummary",+ "properties": [+ {+ "name": "executionOrder",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "A strict monotonically increasing value\nindicating the execution order of a cell\ninside a notebook."+ },+ {+ "name": "success",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the execution was successful or\nnot if known by the client."+ }+ ]+ },+ {+ "name": "NotebookCellLanguage",+ "properties": [+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ }+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentCellChangeStructure",+ "properties": [+ {+ "name": "array",+ "type": {+ "kind": "reference",+ "name": "NotebookCellArrayChange"+ },+ "documentation": "The change to the cell array."+ },+ {+ "name": "didOpen",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentItem"+ }+ },+ "optional": true,+ "documentation": "Additional opened cell text documents."+ },+ {+ "name": "didClose",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentIdentifier"+ }+ },+ "optional": true,+ "documentation": "Additional closed cell text documents."+ }+ ],+ "documentation": "Structural changes to cells in a notebook document.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentCellContentChanges",+ "properties": [+ {+ "name": "document",+ "type": {+ "kind": "reference",+ "name": "VersionedTextDocumentIdentifier"+ }+ },+ {+ "name": "changes",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TextDocumentContentChangeEvent"+ }+ }+ }+ ],+ "documentation": "Content changes to a cell in a notebook document.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "WorkspaceClientCapabilities",+ "properties": [+ {+ "name": "applyEdit",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports applying batch edits\nto the workspace by supporting the request\n'workspace/applyEdit'"+ },+ {+ "name": "workspaceEdit",+ "type": {+ "kind": "reference",+ "name": "WorkspaceEditClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to `WorkspaceEdit`s."+ },+ {+ "name": "didChangeConfiguration",+ "type": {+ "kind": "reference",+ "name": "DidChangeConfigurationClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `workspace/didChangeConfiguration` notification."+ },+ {+ "name": "didChangeWatchedFiles",+ "type": {+ "kind": "reference",+ "name": "DidChangeWatchedFilesClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `workspace/didChangeWatchedFiles` notification."+ },+ {+ "name": "symbol",+ "type": {+ "kind": "reference",+ "name": "WorkspaceSymbolClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `workspace/symbol` request."+ },+ {+ "name": "executeCommand",+ "type": {+ "kind": "reference",+ "name": "ExecuteCommandClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `workspace/executeCommand` request."+ },+ {+ "name": "workspaceFolders",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for workspace folders.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "configuration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports `workspace/configuration` requests.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "semanticTokens",+ "type": {+ "kind": "reference",+ "name": "SemanticTokensWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the semantic token requests scoped to the\nworkspace.\n\n@since 3.16.0.",+ "since": "3.16.0."+ },+ {+ "name": "codeLens",+ "type": {+ "kind": "reference",+ "name": "CodeLensWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the code lens requests scoped to the\nworkspace.\n\n@since 3.16.0.",+ "since": "3.16.0."+ },+ {+ "name": "fileOperations",+ "type": {+ "kind": "reference",+ "name": "FileOperationClientCapabilities"+ },+ "optional": true,+ "documentation": "The client has support for file notifications/requests for user operations on files.\n\nSince 3.16.0"+ },+ {+ "name": "inlineValue",+ "type": {+ "kind": "reference",+ "name": "InlineValueWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the inline values requests scoped to the\nworkspace.\n\n@since 3.17.0.",+ "since": "3.17.0."+ },+ {+ "name": "inlayHint",+ "type": {+ "kind": "reference",+ "name": "InlayHintWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the inlay hint requests scoped to the\nworkspace.\n\n@since 3.17.0.",+ "since": "3.17.0."+ },+ {+ "name": "diagnostics",+ "type": {+ "kind": "reference",+ "name": "DiagnosticWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the diagnostic requests scoped to the\nworkspace.\n\n@since 3.17.0.",+ "since": "3.17.0."+ },+ {+ "name": "foldingRange",+ "type": {+ "kind": "reference",+ "name": "FoldingRangeWorkspaceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the folding range requests scoped to the workspace.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "Workspace specific client capabilities."+ },+ {+ "name": "TextDocumentClientCapabilities",+ "properties": [+ {+ "name": "synchronization",+ "type": {+ "kind": "reference",+ "name": "TextDocumentSyncClientCapabilities"+ },+ "optional": true,+ "documentation": "Defines which synchronization capabilities the client supports."+ },+ {+ "name": "completion",+ "type": {+ "kind": "reference",+ "name": "CompletionClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/completion` request."+ },+ {+ "name": "hover",+ "type": {+ "kind": "reference",+ "name": "HoverClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/hover` request."+ },+ {+ "name": "signatureHelp",+ "type": {+ "kind": "reference",+ "name": "SignatureHelpClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/signatureHelp` request."+ },+ {+ "name": "declaration",+ "type": {+ "kind": "reference",+ "name": "DeclarationClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/declaration` request.\n\n@since 3.14.0",+ "since": "3.14.0"+ },+ {+ "name": "definition",+ "type": {+ "kind": "reference",+ "name": "DefinitionClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/definition` request."+ },+ {+ "name": "typeDefinition",+ "type": {+ "kind": "reference",+ "name": "TypeDefinitionClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/typeDefinition` request.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "implementation",+ "type": {+ "kind": "reference",+ "name": "ImplementationClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/implementation` request.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "references",+ "type": {+ "kind": "reference",+ "name": "ReferenceClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/references` request."+ },+ {+ "name": "documentHighlight",+ "type": {+ "kind": "reference",+ "name": "DocumentHighlightClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/documentHighlight` request."+ },+ {+ "name": "documentSymbol",+ "type": {+ "kind": "reference",+ "name": "DocumentSymbolClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/documentSymbol` request."+ },+ {+ "name": "codeAction",+ "type": {+ "kind": "reference",+ "name": "CodeActionClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/codeAction` request."+ },+ {+ "name": "codeLens",+ "type": {+ "kind": "reference",+ "name": "CodeLensClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/codeLens` request."+ },+ {+ "name": "documentLink",+ "type": {+ "kind": "reference",+ "name": "DocumentLinkClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/documentLink` request."+ },+ {+ "name": "colorProvider",+ "type": {+ "kind": "reference",+ "name": "DocumentColorClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/documentColor` and the\n`textDocument/colorPresentation` request.\n\n@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "formatting",+ "type": {+ "kind": "reference",+ "name": "DocumentFormattingClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/formatting` request."+ },+ {+ "name": "rangeFormatting",+ "type": {+ "kind": "reference",+ "name": "DocumentRangeFormattingClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/rangeFormatting` request."+ },+ {+ "name": "onTypeFormatting",+ "type": {+ "kind": "reference",+ "name": "DocumentOnTypeFormattingClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/onTypeFormatting` request."+ },+ {+ "name": "rename",+ "type": {+ "kind": "reference",+ "name": "RenameClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/rename` request."+ },+ {+ "name": "foldingRange",+ "type": {+ "kind": "reference",+ "name": "FoldingRangeClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/foldingRange` request.\n\n@since 3.10.0",+ "since": "3.10.0"+ },+ {+ "name": "selectionRange",+ "type": {+ "kind": "reference",+ "name": "SelectionRangeClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/selectionRange` request.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "publishDiagnostics",+ "type": {+ "kind": "reference",+ "name": "PublishDiagnosticsClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/publishDiagnostics` notification."+ },+ {+ "name": "callHierarchy",+ "type": {+ "kind": "reference",+ "name": "CallHierarchyClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the various call hierarchy requests.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "semanticTokens",+ "type": {+ "kind": "reference",+ "name": "SemanticTokensClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the various semantic token request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "linkedEditingRange",+ "type": {+ "kind": "reference",+ "name": "LinkedEditingRangeClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/linkedEditingRange` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "moniker",+ "type": {+ "kind": "reference",+ "name": "MonikerClientCapabilities"+ },+ "optional": true,+ "documentation": "Client capabilities specific to the `textDocument/moniker` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "typeHierarchy",+ "type": {+ "kind": "reference",+ "name": "TypeHierarchyClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the various type hierarchy requests.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlineValue",+ "type": {+ "kind": "reference",+ "name": "InlineValueClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/inlineValue` request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlayHint",+ "type": {+ "kind": "reference",+ "name": "InlayHintClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `textDocument/inlayHint` request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "diagnostic",+ "type": {+ "kind": "reference",+ "name": "DiagnosticClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the diagnostic pull model.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "inlineCompletion",+ "type": {+ "kind": "reference",+ "name": "InlineCompletionClientCapabilities"+ },+ "optional": true,+ "documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "Text document specific client capabilities."+ },+ {+ "name": "NotebookDocumentClientCapabilities",+ "properties": [+ {+ "name": "synchronization",+ "type": {+ "kind": "reference",+ "name": "NotebookDocumentSyncClientCapabilities"+ },+ "documentation": "Capabilities specific to notebook document synchronization\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Capabilities specific to the notebook document support.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WindowClientCapabilities",+ "properties": [+ {+ "name": "workDoneProgress",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "It indicates whether the client supports server initiated\nprogress using the `window/workDoneProgress/create` request.\n\nThe capability also controls Whether client supports handling\nof progress notifications. If set servers are allowed to report a\n`workDoneProgress` property in the request specific server\ncapabilities.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "showMessage",+ "type": {+ "kind": "reference",+ "name": "ShowMessageRequestClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the showMessage request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "showDocument",+ "type": {+ "kind": "reference",+ "name": "ShowDocumentClientCapabilities"+ },+ "optional": true,+ "documentation": "Capabilities specific to the showDocument request.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ]+ },+ {+ "name": "GeneralClientCapabilities",+ "properties": [+ {+ "name": "staleRequestSupport",+ "type": {+ "kind": "reference",+ "name": "StaleRequestSupportOptions"+ },+ "optional": true,+ "documentation": "Client capability that signals how the client\nhandles stale requests (e.g. a request\nfor which the client will not process the response\nanymore since the information is outdated).\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "regularExpressions",+ "type": {+ "kind": "reference",+ "name": "RegularExpressionsClientCapabilities"+ },+ "optional": true,+ "documentation": "Client capabilities specific to regular expressions.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "markdown",+ "type": {+ "kind": "reference",+ "name": "MarkdownClientCapabilities"+ },+ "optional": true,+ "documentation": "Client capabilities specific to the client's markdown parser.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "positionEncodings",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "PositionEncodingKind"+ }+ },+ "optional": true,+ "documentation": "The position encodings supported by the client. Client and server\nhave to agree on the same position encoding to ensure that offsets\n(e.g. character position in a line) are interpreted the same on both\nsides.\n\nTo keep the protocol backwards compatible the following applies: if\nthe value 'utf-16' is missing from the array of position encodings\nservers can assume that the client supports UTF-16. UTF-16 is\ntherefore a mandatory encoding.\n\nIf omitted it defaults to ['utf-16'].\n\nImplementation considerations: since the conversion from one encoding\ninto another requires the content of the file / line the conversion\nis best done where the file is read which is usually on the server\nside.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "General client capabilities.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "WorkspaceFoldersServerCapabilities",+ "properties": [+ {+ "name": "supported",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The server has support for workspace folders"+ },+ {+ "name": "changeNotifications",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "base",+ "name": "boolean"+ }+ ]+ },+ "optional": true,+ "documentation": "Whether the server wants to receive workspace folder\nchange notifications.\n\nIf a string is provided the string is treated as an ID\nunder which the notification is registered on the client\nside. The ID can be used to unregister for these events\nusing the `client/unregisterCapability` request."+ }+ ]+ },+ {+ "name": "FileOperationOptions",+ "properties": [+ {+ "name": "didCreate",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving didCreateFiles notifications."+ },+ {+ "name": "willCreate",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving willCreateFiles requests."+ },+ {+ "name": "didRename",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving didRenameFiles notifications."+ },+ {+ "name": "willRename",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving willRenameFiles requests."+ },+ {+ "name": "didDelete",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving didDeleteFiles file notifications."+ },+ {+ "name": "willDelete",+ "type": {+ "kind": "reference",+ "name": "FileOperationRegistrationOptions"+ },+ "optional": true,+ "documentation": "The server is interested in receiving willDeleteFiles file requests."+ }+ ],+ "documentation": "Options for notifications/requests for user operations on files.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "RelativePattern",+ "properties": [+ {+ "name": "baseUri",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceFolder"+ },+ {+ "kind": "base",+ "name": "URI"+ }+ ]+ },+ "documentation": "A workspace folder or a base URI to which this pattern will be matched\nagainst relatively."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "reference",+ "name": "Pattern"+ },+ "documentation": "The actual glob pattern;"+ }+ ],+ "documentation": "A relative pattern is a helper to construct glob patterns that are matched\nrelatively to a base URI. The common value for a `baseUri` is a workspace\nfolder root, but it can be another absolute URI as well.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TextDocumentFilterLanguage",+ "properties": [+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A language id, like `typescript`."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."+ }+ ],+ "documentation": "A document filter where `language` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "TextDocumentFilterScheme",+ "properties": [+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A language id, like `typescript`."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."+ }+ ],+ "documentation": "A document filter where `scheme` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "TextDocumentFilterPattern",+ "properties": [+ {+ "name": "language",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A language id, like `typescript`."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."+ }+ ],+ "documentation": "A document filter where `pattern` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentFilterNotebookType",+ "properties": [+ {+ "name": "notebookType",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The type of the enclosing notebook."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A glob pattern."+ }+ ],+ "documentation": "A notebook document filter where `notebookType` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentFilterScheme",+ "properties": [+ {+ "name": "notebookType",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The type of the enclosing notebook."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A glob pattern."+ }+ ],+ "documentation": "A notebook document filter where `scheme` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookDocumentFilterPattern",+ "properties": [+ {+ "name": "notebookType",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The type of the enclosing notebook."+ },+ {+ "name": "scheme",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`."+ },+ {+ "name": "pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "A glob pattern."+ }+ ],+ "documentation": "A notebook document filter where `pattern` is required field.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "NotebookCellArrayChange",+ "properties": [+ {+ "name": "start",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The start oftest of the cell that changed."+ },+ {+ "name": "deleteCount",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "documentation": "The deleted cells"+ },+ {+ "name": "cells",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "NotebookCell"+ }+ },+ "optional": true,+ "documentation": "The new cells, if any"+ }+ ],+ "documentation": "A change describing how to move a `NotebookCell`\narray from state S to S'.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "WorkspaceEditClientCapabilities",+ "properties": [+ {+ "name": "documentChanges",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports versioned document changes in `WorkspaceEdit`s"+ },+ {+ "name": "resourceOperations",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "ResourceOperationKind"+ }+ },+ "optional": true,+ "documentation": "The resource operations the client supports. Clients should at least\nsupport 'create', 'rename' and 'delete' files and folders.\n\n@since 3.13.0",+ "since": "3.13.0"+ },+ {+ "name": "failureHandling",+ "type": {+ "kind": "reference",+ "name": "FailureHandlingKind"+ },+ "optional": true,+ "documentation": "The failure handling strategy of a client if applying the workspace edit\nfails.\n\n@since 3.13.0",+ "since": "3.13.0"+ },+ {+ "name": "normalizesLineEndings",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client normalizes line endings to the client specific\nsetting.\nIf set to `true` the client will normalize line ending characters\nin a workspace edit to the client-specified new line\ncharacter.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "changeAnnotationSupport",+ "type": {+ "kind": "reference",+ "name": "ChangeAnnotationsSupportOptions"+ },+ "optional": true,+ "documentation": "Whether the client in general supports change annotations on text edits,\ncreate file, rename file and delete file changes.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ]+ },+ {+ "name": "DidChangeConfigurationClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Did change configuration notification supports dynamic registration."+ }+ ]+ },+ {+ "name": "DidChangeWatchedFilesClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Did change watched files notification supports dynamic registration. Please note\nthat the current protocol doesn't support static configuration for file changes\nfrom the server side."+ },+ {+ "name": "relativePatternSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client has support for {@link RelativePattern relative pattern}\nor not.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ]+ },+ {+ "name": "WorkspaceSymbolClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Symbol request supports dynamic registration."+ },+ {+ "name": "symbolKind",+ "type": {+ "kind": "reference",+ "name": "ClientSymbolKindOptions"+ },+ "optional": true,+ "documentation": "Specific capabilities for the `SymbolKind` in the `workspace/symbol` request."+ },+ {+ "name": "tagSupport",+ "type": {+ "kind": "reference",+ "name": "ClientSymbolTagOptions"+ },+ "optional": true,+ "documentation": "The client supports tags on `SymbolInformation`.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "resolveSupport",+ "type": {+ "kind": "reference",+ "name": "ClientSymbolResolveOptions"+ },+ "optional": true,+ "documentation": "The client support partial workspace symbols. The client will send the\nrequest `workspaceSymbol/resolve` to the server to resolve additional\nproperties.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Client capabilities for a {@link WorkspaceSymbolRequest}."+ },+ {+ "name": "ExecuteCommandClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Execute command supports dynamic registration."+ }+ ],+ "documentation": "The client capabilities of a {@link ExecuteCommandRequest}."+ },+ {+ "name": "SemanticTokensWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\nsemantic tokens currently shown. It should be used with absolute care\nand is useful for situation where a server for example detects a project\nwide change that requires such a calculation."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "CodeLensWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ncode lenses currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detect a project wide\nchange that requires such a calculation."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "FileOperationClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports dynamic registration for file requests/notifications."+ },+ {+ "name": "didCreate",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending didCreateFiles notifications."+ },+ {+ "name": "willCreate",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending willCreateFiles requests."+ },+ {+ "name": "didRename",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending didRenameFiles notifications."+ },+ {+ "name": "willRename",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending willRenameFiles requests."+ },+ {+ "name": "didDelete",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending didDeleteFiles notifications."+ },+ {+ "name": "willDelete",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for sending willDeleteFiles requests."+ }+ ],+ "documentation": "Capabilities relating to events from file operations by the user in the client.\n\nThese events do not come from the file system, they come from user operations\nlike renaming a file in the UI.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "InlineValueWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ninline values currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation."+ }+ ],+ "documentation": "Client workspace capabilities specific to inline values.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHintWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\ninlay hints currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation."+ }+ ],+ "documentation": "Client workspace capabilities specific to inlay hints.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DiagnosticWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\npulled diagnostics currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation."+ }+ ],+ "documentation": "Workspace client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "FoldingRangeWorkspaceClientCapabilities",+ "properties": [+ {+ "name": "refreshSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\nfolding ranges currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "Client workspace capabilities specific to folding ranges\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "TextDocumentSyncClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether text document synchronization supports dynamic registration."+ },+ {+ "name": "willSave",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports sending will save notifications."+ },+ {+ "name": "willSaveWaitUntil",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports sending a will save request and\nwaits for a response providing text edits which will\nbe applied to the document before it is saved."+ },+ {+ "name": "didSave",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports did save notifications."+ }+ ]+ },+ {+ "name": "CompletionClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether completion supports dynamic registration."+ },+ {+ "name": "completionItem",+ "type": {+ "kind": "reference",+ "name": "ClientCompletionItemOptions"+ },+ "optional": true,+ "documentation": "The client supports the following `CompletionItem` specific\ncapabilities."+ },+ {+ "name": "completionItemKind",+ "type": {+ "kind": "reference",+ "name": "ClientCompletionItemOptionsKind"+ },+ "optional": true+ },+ {+ "name": "insertTextMode",+ "type": {+ "kind": "reference",+ "name": "InsertTextMode"+ },+ "optional": true,+ "documentation": "Defines how the client handles whitespace and indentation\nwhen accepting a completion item that uses multi line\ntext in either `insertText` or `textEdit`.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "contextSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports to send additional context information for a\n`textDocument/completion` request."+ },+ {+ "name": "completionList",+ "type": {+ "kind": "reference",+ "name": "CompletionListCapabilities"+ },+ "optional": true,+ "documentation": "The client supports the following `CompletionList` specific\ncapabilities.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Completion client capabilities"+ },+ {+ "name": "HoverClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether hover supports dynamic registration."+ },+ {+ "name": "contentFormat",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "MarkupKind"+ }+ },+ "optional": true,+ "documentation": "Client supports the following content formats for the content\nproperty. The order describes the preferred format of the client."+ }+ ]+ },+ {+ "name": "SignatureHelpClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether signature help supports dynamic registration."+ },+ {+ "name": "signatureInformation",+ "type": {+ "kind": "reference",+ "name": "ClientSignatureInformationOptions"+ },+ "optional": true,+ "documentation": "The client supports the following `SignatureInformation`\nspecific properties."+ },+ {+ "name": "contextSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports to send additional context information for a\n`textDocument/signatureHelp` request. A client that opts into\ncontextSupport will also support the `retriggerCharacters` on\n`SignatureHelpOptions`.\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "documentation": "Client Capabilities for a {@link SignatureHelpRequest}."+ },+ {+ "name": "DeclarationClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether declaration supports dynamic registration. If this is set to `true`\nthe client supports the new `DeclarationRegistrationOptions` return value\nfor the corresponding server capability as well."+ },+ {+ "name": "linkSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports additional metadata in the form of declaration links."+ }+ ],+ "documentation": "@since 3.14.0",+ "since": "3.14.0"+ },+ {+ "name": "DefinitionClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether definition supports dynamic registration."+ },+ {+ "name": "linkSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0",+ "since": "3.14.0"+ }+ ],+ "documentation": "Client Capabilities for a {@link DefinitionRequest}."+ },+ {+ "name": "TypeDefinitionClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `TypeDefinitionRegistrationOptions` return value\nfor the corresponding server capability as well."+ },+ {+ "name": "linkSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports additional metadata in the form of definition links.\n\nSince 3.14.0"+ }+ ],+ "documentation": "Since 3.6.0"+ },+ {+ "name": "ImplementationClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `ImplementationRegistrationOptions` return value\nfor the corresponding server capability as well."+ },+ {+ "name": "linkSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0",+ "since": "3.14.0"+ }+ ],+ "documentation": "@since 3.6.0",+ "since": "3.6.0"+ },+ {+ "name": "ReferenceClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether references supports dynamic registration."+ }+ ],+ "documentation": "Client Capabilities for a {@link ReferencesRequest}."+ },+ {+ "name": "DocumentHighlightClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether document highlight supports dynamic registration."+ }+ ],+ "documentation": "Client Capabilities for a {@link DocumentHighlightRequest}."+ },+ {+ "name": "DocumentSymbolClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether document symbol supports dynamic registration."+ },+ {+ "name": "symbolKind",+ "type": {+ "kind": "reference",+ "name": "ClientSymbolKindOptions"+ },+ "optional": true,+ "documentation": "Specific capabilities for the `SymbolKind` in the\n`textDocument/documentSymbol` request."+ },+ {+ "name": "hierarchicalDocumentSymbolSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports hierarchical document symbols."+ },+ {+ "name": "tagSupport",+ "type": {+ "kind": "reference",+ "name": "ClientSymbolTagOptions"+ },+ "optional": true,+ "documentation": "The client supports tags on `SymbolInformation`. Tags are supported on\n`DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "labelSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports an additional label presented in the UI when\nregistering a document symbol provider.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "Client Capabilities for a {@link DocumentSymbolRequest}."+ },+ {+ "name": "CodeActionClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code action supports dynamic registration."+ },+ {+ "name": "codeActionLiteralSupport",+ "type": {+ "kind": "reference",+ "name": "ClientCodeActionLiteralOptions"+ },+ "optional": true,+ "documentation": "The client support code action literals of type `CodeAction` as a valid\nresponse of the `textDocument/codeAction` request. If the property is not\nset the request can only return `Command` literals.\n\n@since 3.8.0",+ "since": "3.8.0"+ },+ {+ "name": "isPreferredSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code action supports the `isPreferred` property.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "disabledSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code action supports the `disabled` property.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "dataSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/codeAction` and a\n`codeAction/resolve` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "resolveSupport",+ "type": {+ "kind": "reference",+ "name": "ClientCodeActionResolveOptions"+ },+ "optional": true,+ "documentation": "Whether the client supports resolving additional code action\nproperties via a separate `codeAction/resolve` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "honorsChangeAnnotations",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\n`CodeAction#edit` property by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "documentationSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports documentation for a class of\ncode actions.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "The Client Capabilities of a {@link CodeActionRequest}."+ },+ {+ "name": "CodeLensClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code lens supports dynamic registration."+ }+ ],+ "documentation": "The client capabilities of a {@link CodeLensRequest}."+ },+ {+ "name": "DocumentLinkClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether document link supports dynamic registration."+ },+ {+ "name": "tooltipSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports the `tooltip` property on `DocumentLink`.\n\n@since 3.15.0",+ "since": "3.15.0"+ }+ ],+ "documentation": "The client capabilities of a {@link DocumentLinkRequest}."+ },+ {+ "name": "DocumentColorClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `DocumentColorRegistrationOptions` return value\nfor the corresponding server capability as well."+ }+ ]+ },+ {+ "name": "DocumentFormattingClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether formatting supports dynamic registration."+ }+ ],+ "documentation": "Client capabilities of a {@link DocumentFormattingRequest}."+ },+ {+ "name": "DocumentRangeFormattingClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether range formatting supports dynamic registration."+ },+ {+ "name": "rangesSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "Client capabilities of a {@link DocumentRangeFormattingRequest}."+ },+ {+ "name": "DocumentOnTypeFormattingClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether on type formatting supports dynamic registration."+ }+ ],+ "documentation": "Client capabilities of a {@link DocumentOnTypeFormattingRequest}."+ },+ {+ "name": "RenameClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether rename supports dynamic registration."+ },+ {+ "name": "prepareSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports testing for validity of rename operations\nbefore execution.\n\n@since 3.12.0",+ "since": "3.12.0"+ },+ {+ "name": "prepareSupportDefaultBehavior",+ "type": {+ "kind": "reference",+ "name": "PrepareSupportDefaultBehavior"+ },+ "optional": true,+ "documentation": "Client supports the default behavior result.\n\nThe value indicates the default behavior used by the\nclient.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "honorsChangeAnnotations",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\nrename request's workspace edit by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ]+ },+ {+ "name": "FoldingRangeClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration for folding range\nproviders. If this is set to `true` the client supports the new\n`FoldingRangeRegistrationOptions` return value for the corresponding\nserver capability as well."+ },+ {+ "name": "rangeLimit",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "optional": true,+ "documentation": "The maximum number of folding ranges that the client prefers to receive\nper document. The value serves as a hint, servers are free to follow the\nlimit."+ },+ {+ "name": "lineFoldingOnly",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "If set, the client signals that it only supports folding complete lines.\nIf set, client will ignore specified `startCharacter` and `endCharacter`\nproperties in a FoldingRange."+ },+ {+ "name": "foldingRangeKind",+ "type": {+ "kind": "reference",+ "name": "ClientFoldingRangeKindOptions"+ },+ "optional": true,+ "documentation": "Specific options for the folding range kind.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "foldingRange",+ "type": {+ "kind": "reference",+ "name": "ClientFoldingRangeOptions"+ },+ "optional": true,+ "documentation": "Specific options for the folding range.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ]+ },+ {+ "name": "SelectionRangeClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration for selection range providers. If this is set to `true`\nthe client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server\ncapability as well."+ }+ ]+ },+ {+ "name": "PublishDiagnosticsClientCapabilities",+ "properties": [+ {+ "name": "relatedInformation",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the clients accepts diagnostics with related information."+ },+ {+ "name": "tagSupport",+ "type": {+ "kind": "reference",+ "name": "ClientDiagnosticsTagOptions"+ },+ "optional": true,+ "documentation": "Client supports the tag property to provide meta data about a diagnostic.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "versionSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client interprets the version property of the\n`textDocument/publishDiagnostics` notification's parameter.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "codeDescriptionSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports a codeDescription property\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "dataSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/publishDiagnostics` and\n`textDocument/codeAction` request.\n\n@since 3.16.0",+ "since": "3.16.0"+ }+ ],+ "documentation": "The publish diagnostic client capabilities."+ },+ {+ "name": "CallHierarchyClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokensClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ },+ {+ "name": "requests",+ "type": {+ "kind": "reference",+ "name": "ClientSemanticTokensRequestOptions"+ },+ "documentation": "Which requests the client supports and might send to the server\ndepending on the server's capability. Please note that clients might not\nshow semantic tokens or degrade some of the user experience if a range\nor full request is advertised by the client but not provided by the\nserver. If for example the client capability `requests.full` and\n`request.range` are both set to true but the server only provides a\nrange provider the client might not render a minimap correctly or might\neven decide to not show any semantic tokens at all."+ },+ {+ "name": "tokenTypes",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The token types that the client supports."+ },+ {+ "name": "tokenModifiers",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The token modifiers that the client supports."+ },+ {+ "name": "formats",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "TokenFormat"+ }+ },+ "documentation": "The token formats the clients supports."+ },+ {+ "name": "overlappingTokenSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports tokens that can overlap each other."+ },+ {+ "name": "multilineTokenSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports tokens that can span multiple lines."+ },+ {+ "name": "serverCancelSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client allows the server to actively cancel a\nsemantic token request, e.g. supports returning\nLSPErrorCodes.ServerCancelled. If a server does the client\nneeds to retrigger the request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "augmentsSyntaxTokens",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client uses semantic tokens to augment existing\nsyntax tokens. If set to `true` client side created syntax\ntokens and semantic tokens are both used for colorization. If\nset to `false` the client only uses the returned semantic tokens\nfor colorization.\n\nIf the value is `undefined` then the client behavior is not\nspecified.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "LinkedEditingRangeClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ }+ ],+ "documentation": "Client capabilities for the linked editing range request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MonikerClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether moniker supports dynamic registration. If this is set to `true`\nthe client supports the new `MonikerRegistrationOptions` return value\nfor the corresponding server capability as well."+ }+ ],+ "documentation": "Client capabilities specific to the moniker request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "TypeHierarchyClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ }+ ],+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineValueClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration for inline value providers."+ }+ ],+ "documentation": "Client capabilities specific to inline values.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlayHintClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether inlay hints support dynamic registration."+ },+ {+ "name": "resolveSupport",+ "type": {+ "kind": "reference",+ "name": "ClientInlayHintResolveOptions"+ },+ "optional": true,+ "documentation": "Indicates which properties a client can resolve lazily on an inlay\nhint."+ }+ ],+ "documentation": "Inlay hint client capabilities.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DiagnosticClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ },+ {+ "name": "relatedDocumentSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the clients supports related documents for document diagnostic pulls."+ }+ ],+ "documentation": "Client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "InlineCompletionClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration for inline completion providers."+ }+ ],+ "documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "NotebookDocumentSyncClientCapabilities",+ "properties": [+ {+ "name": "dynamicRegistration",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether implementation supports dynamic registration. If this is\nset to `true` the client supports the new\n`(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."+ },+ {+ "name": "executionSummarySupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports sending execution summary data per cell."+ }+ ],+ "documentation": "Notebook specific client capabilities.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ShowMessageRequestClientCapabilities",+ "properties": [+ {+ "name": "messageActionItem",+ "type": {+ "kind": "reference",+ "name": "ClientShowMessageActionItemOptions"+ },+ "optional": true,+ "documentation": "Capabilities specific to the `MessageActionItem` type."+ }+ ],+ "documentation": "Show message request client capabilities"+ },+ {+ "name": "ShowDocumentClientCapabilities",+ "properties": [+ {+ "name": "support",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "The client has support for the showDocument\nrequest."+ }+ ],+ "documentation": "Client capabilities for the showDocument request.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "StaleRequestSupportOptions",+ "properties": [+ {+ "name": "cancel",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "documentation": "The client will actively cancel the request."+ },+ {+ "name": "retryOnContentModified",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The list of requests for which the client\nwill retry the request if it receives a\nresponse with error code `ContentModified`"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "RegularExpressionsClientCapabilities",+ "properties": [+ {+ "name": "engine",+ "type": {+ "kind": "reference",+ "name": "RegularExpressionEngineKind"+ },+ "documentation": "The engine's name."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The engine's version."+ }+ ],+ "documentation": "Client capabilities specific to regular expressions.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MarkdownClientCapabilities",+ "properties": [+ {+ "name": "parser",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The name of the parser."+ },+ {+ "name": "version",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "optional": true,+ "documentation": "The version of the parser."+ },+ {+ "name": "allowedTags",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "A list of HTML tags that the client allows / supports in\nMarkdown.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "Client capabilities specific to the used markdown parser.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "ChangeAnnotationsSupportOptions",+ "properties": [+ {+ "name": "groupsOnLabel",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client groups edits with equal labels into tree nodes,\nfor instance all edits labelled with \"Changes in Strings\" would\nbe a tree node."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSymbolKindOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolKind"+ }+ },+ "optional": true,+ "documentation": "The symbol kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe symbol kinds from `File` to `Array` as defined in\nthe initial version of the protocol."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSymbolTagOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "SymbolTag"+ }+ },+ "documentation": "The tags supported by the client."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSymbolResolveOptions",+ "properties": [+ {+ "name": "properties",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The properties that a client can resolve lazily. Usually\n`location.range`"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCompletionItemOptions",+ "properties": [+ {+ "name": "snippetSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports snippets as insert text.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Placeholders with equal identifiers are linked,\nthat is typing in one will update others too."+ },+ {+ "name": "commitCharactersSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports commit characters on a completion item."+ },+ {+ "name": "documentationFormat",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "MarkupKind"+ }+ },+ "optional": true,+ "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client."+ },+ {+ "name": "deprecatedSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports the deprecated property on a completion item."+ },+ {+ "name": "preselectSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client supports the preselect property on a completion item."+ },+ {+ "name": "tagSupport",+ "type": {+ "kind": "reference",+ "name": "CompletionItemTagOptions"+ },+ "optional": true,+ "documentation": "Client supports the tag property on a completion item. Clients supporting\ntags have to handle unknown tags gracefully. Clients especially need to\npreserve unknown tags when sending a completion item back to the server in\na resolve call.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "insertReplaceSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Client support insert replace edit to control different behavior if a\ncompletion item is inserted in the text or should replace text.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "resolveSupport",+ "type": {+ "kind": "reference",+ "name": "ClientCompletionItemResolveOptions"+ },+ "optional": true,+ "documentation": "Indicates which properties a client can resolve lazily on a completion\nitem. Before version 3.16.0 only the predefined properties `documentation`\nand `details` could be resolved lazily.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "insertTextModeSupport",+ "type": {+ "kind": "reference",+ "name": "ClientCompletionItemInsertTextModeOptions"+ },+ "optional": true,+ "documentation": "The client supports the `insertTextMode` property on\na completion item to override the whitespace handling mode\nas defined by the client (see `insertTextMode`).\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "labelDetailsSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client has support for completion item label\ndetails (see also `CompletionItemLabelDetails`).\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCompletionItemOptionsKind",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItemKind"+ }+ },+ "optional": true,+ "documentation": "The completion item kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe completion items kinds from `Text` to `Reference` as defined in\nthe initial version of the protocol."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "CompletionListCapabilities",+ "properties": [+ {+ "name": "itemDefaults",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "optional": true,+ "documentation": "The client supports the following itemDefaults on\na completion list.\n\nThe value lists the supported property names of the\n`CompletionList.itemDefaults` object. If omitted\nno properties are supported.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "The client supports the following `CompletionList` specific\ncapabilities.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ClientSignatureInformationOptions",+ "properties": [+ {+ "name": "documentationFormat",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "MarkupKind"+ }+ },+ "optional": true,+ "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client."+ },+ {+ "name": "parameterInformation",+ "type": {+ "kind": "reference",+ "name": "ClientSignatureParameterInformationOptions"+ },+ "optional": true,+ "documentation": "Client capabilities specific to parameter information."+ },+ {+ "name": "activeParameterSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports the `activeParameter` property on `SignatureInformation`\nliteral.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "noActiveParameterSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports the `activeParameter` property on\n`SignatureHelp`/`SignatureInformation` being set to `null` to\nindicate that no parameter should be active.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCodeActionLiteralOptions",+ "properties": [+ {+ "name": "codeActionKind",+ "type": {+ "kind": "reference",+ "name": "ClientCodeActionKindOptions"+ },+ "documentation": "The code action kind is support with the following value\nset."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCodeActionResolveOptions",+ "properties": [+ {+ "name": "properties",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The properties that a client can resolve lazily."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientFoldingRangeKindOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "FoldingRangeKind"+ }+ },+ "optional": true,+ "documentation": "The folding range kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientFoldingRangeOptions",+ "properties": [+ {+ "name": "collapsedText",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "If set, the client signals that it supports setting collapsedText on\nfolding ranges to display custom labels instead of the default text.\n\n@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientDiagnosticsTagOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DiagnosticTag"+ }+ },+ "documentation": "The tags supported by the client."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSemanticTokensRequestOptions",+ "properties": [+ {+ "name": "range",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "literal",+ "value": {+ "properties": []+ }+ }+ ]+ },+ "optional": true,+ "documentation": "The client will send the `textDocument/semanticTokens/range` request if\nthe server provides a corresponding handler."+ },+ {+ "name": "full",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "reference",+ "name": "ClientSemanticTokensRequestFullDelta"+ }+ ]+ },+ "optional": true,+ "documentation": "The client will send the `textDocument/semanticTokens/full` request if\nthe server provides a corresponding handler."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientInlayHintResolveOptions",+ "properties": [+ {+ "name": "properties",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The properties that a client can resolve lazily."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientShowMessageActionItemOptions",+ "properties": [+ {+ "name": "additionalPropertiesSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "Whether the client supports additional attributes which\nare preserved and send back to the server in the\nrequest's response."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "CompletionItemTagOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CompletionItemTag"+ }+ },+ "documentation": "The tags supported by the client."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCompletionItemResolveOptions",+ "properties": [+ {+ "name": "properties",+ "type": {+ "kind": "array",+ "element": {+ "kind": "base",+ "name": "string"+ }+ },+ "documentation": "The properties that a client can resolve lazily."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCompletionItemInsertTextModeOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "InsertTextMode"+ }+ }+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSignatureParameterInformationOptions",+ "properties": [+ {+ "name": "labelOffsetSupport",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client supports processing label offsets instead of a\nsimple label string.\n\n@since 3.14.0",+ "since": "3.14.0"+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientCodeActionKindOptions",+ "properties": [+ {+ "name": "valueSet",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "CodeActionKind"+ }+ },+ "documentation": "The code action kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "ClientSemanticTokensRequestFullDelta",+ "properties": [+ {+ "name": "delta",+ "type": {+ "kind": "base",+ "name": "boolean"+ },+ "optional": true,+ "documentation": "The client will send the `textDocument/semanticTokens/full/delta` request if\nthe server provides a corresponding handler."+ }+ ],+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0"+ }+ ],+ "enumerations": [+ {+ "name": "SemanticTokenTypes",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "namespace",+ "value": "namespace"+ },+ {+ "name": "type",+ "value": "type",+ "documentation": "Represents a generic type. Acts as a fallback for types which can't be mapped to\na specific type like class or enum."+ },+ {+ "name": "class",+ "value": "class"+ },+ {+ "name": "enum",+ "value": "enum"+ },+ {+ "name": "interface",+ "value": "interface"+ },+ {+ "name": "struct",+ "value": "struct"+ },+ {+ "name": "typeParameter",+ "value": "typeParameter"+ },+ {+ "name": "parameter",+ "value": "parameter"+ },+ {+ "name": "variable",+ "value": "variable"+ },+ {+ "name": "property",+ "value": "property"+ },+ {+ "name": "enumMember",+ "value": "enumMember"+ },+ {+ "name": "event",+ "value": "event"+ },+ {+ "name": "function",+ "value": "function"+ },+ {+ "name": "method",+ "value": "method"+ },+ {+ "name": "macro",+ "value": "macro"+ },+ {+ "name": "keyword",+ "value": "keyword"+ },+ {+ "name": "modifier",+ "value": "modifier"+ },+ {+ "name": "comment",+ "value": "comment"+ },+ {+ "name": "string",+ "value": "string"+ },+ {+ "name": "number",+ "value": "number"+ },+ {+ "name": "regexp",+ "value": "regexp"+ },+ {+ "name": "operator",+ "value": "operator"+ },+ {+ "name": "decorator",+ "value": "decorator",+ "documentation": "@since 3.17.0",+ "since": "3.17.0"+ }+ ],+ "supportsCustomValues": true,+ "documentation": "A set of predefined token types. This set is not fixed\nan clients can specify additional token types via the\ncorresponding client capabilities.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "SemanticTokenModifiers",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "declaration",+ "value": "declaration"+ },+ {+ "name": "definition",+ "value": "definition"+ },+ {+ "name": "readonly",+ "value": "readonly"+ },+ {+ "name": "static",+ "value": "static"+ },+ {+ "name": "deprecated",+ "value": "deprecated"+ },+ {+ "name": "abstract",+ "value": "abstract"+ },+ {+ "name": "async",+ "value": "async"+ },+ {+ "name": "modification",+ "value": "modification"+ },+ {+ "name": "documentation",+ "value": "documentation"+ },+ {+ "name": "defaultLibrary",+ "value": "defaultLibrary"+ }+ ],+ "supportsCustomValues": true,+ "documentation": "A set of predefined token modifiers. This set is not fixed\nan clients can specify additional token types via the\ncorresponding client capabilities.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "DocumentDiagnosticReportKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Full",+ "value": "full",+ "documentation": "A diagnostic report with a full\nset of problems."+ },+ {+ "name": "Unchanged",+ "value": "unchanged",+ "documentation": "A report indicating that the last\nreturned report is still accurate."+ }+ ],+ "documentation": "The document diagnostic report kinds.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ErrorCodes",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "values": [+ {+ "name": "ParseError",+ "value": -32700+ },+ {+ "name": "InvalidRequest",+ "value": -32600+ },+ {+ "name": "MethodNotFound",+ "value": -32601+ },+ {+ "name": "InvalidParams",+ "value": -32602+ },+ {+ "name": "InternalError",+ "value": -32603+ },+ {+ "name": "ServerNotInitialized",+ "value": -32002,+ "documentation": "Error code indicating that a server received a notification or\nrequest before the server has received the `initialize` request."+ },+ {+ "name": "UnknownErrorCode",+ "value": -32001+ }+ ],+ "supportsCustomValues": true,+ "documentation": "Predefined error codes."+ },+ {+ "name": "LSPErrorCodes",+ "type": {+ "kind": "base",+ "name": "integer"+ },+ "values": [+ {+ "name": "RequestFailed",+ "value": -32803,+ "documentation": "A request failed but it was syntactically correct, e.g the\nmethod name was known and the parameters were valid. The error\nmessage should contain human readable information about why\nthe request failed.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ServerCancelled",+ "value": -32802,+ "documentation": "The server cancelled the request. This error code should\nonly be used for requests that explicitly support being\nserver cancellable.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ContentModified",+ "value": -32801,+ "documentation": "The server detected that the content of a document got\nmodified outside normal conditions. A server should\nNOT send this error code if it detects a content change\nin it unprocessed messages. The result even computed\non an older state might still be useful for the client.\n\nIf a client decides that a result is not of any use anymore\nthe client should cancel the request."+ },+ {+ "name": "RequestCancelled",+ "value": -32800,+ "documentation": "The client has canceled a request and a server as detected\nthe cancel."+ }+ ],+ "supportsCustomValues": true+ },+ {+ "name": "FoldingRangeKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Comment",+ "value": "comment",+ "documentation": "Folding range for a comment"+ },+ {+ "name": "Imports",+ "value": "imports",+ "documentation": "Folding range for an import or include"+ },+ {+ "name": "Region",+ "value": "region",+ "documentation": "Folding range for a region (e.g. `#region`)"+ }+ ],+ "supportsCustomValues": true,+ "documentation": "A set of predefined range kinds."+ },+ {+ "name": "SymbolKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "File",+ "value": 1+ },+ {+ "name": "Module",+ "value": 2+ },+ {+ "name": "Namespace",+ "value": 3+ },+ {+ "name": "Package",+ "value": 4+ },+ {+ "name": "Class",+ "value": 5+ },+ {+ "name": "Method",+ "value": 6+ },+ {+ "name": "Property",+ "value": 7+ },+ {+ "name": "Field",+ "value": 8+ },+ {+ "name": "Constructor",+ "value": 9+ },+ {+ "name": "Enum",+ "value": 10+ },+ {+ "name": "Interface",+ "value": 11+ },+ {+ "name": "Function",+ "value": 12+ },+ {+ "name": "Variable",+ "value": 13+ },+ {+ "name": "Constant",+ "value": 14+ },+ {+ "name": "String",+ "value": 15+ },+ {+ "name": "Number",+ "value": 16+ },+ {+ "name": "Boolean",+ "value": 17+ },+ {+ "name": "Array",+ "value": 18+ },+ {+ "name": "Object",+ "value": 19+ },+ {+ "name": "Key",+ "value": 20+ },+ {+ "name": "Null",+ "value": 21+ },+ {+ "name": "EnumMember",+ "value": 22+ },+ {+ "name": "Struct",+ "value": 23+ },+ {+ "name": "Event",+ "value": 24+ },+ {+ "name": "Operator",+ "value": 25+ },+ {+ "name": "TypeParameter",+ "value": 26+ }+ ],+ "documentation": "A symbol kind."+ },+ {+ "name": "SymbolTag",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Deprecated",+ "value": 1,+ "documentation": "Render a symbol as obsolete, usually using a strike-out."+ }+ ],+ "documentation": "Symbol tags are extra annotations that tweak the rendering of a symbol.\n\n@since 3.16",+ "since": "3.16"+ },+ {+ "name": "UniquenessLevel",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "document",+ "value": "document",+ "documentation": "The moniker is only unique inside a document"+ },+ {+ "name": "project",+ "value": "project",+ "documentation": "The moniker is unique inside a project for which a dump got created"+ },+ {+ "name": "group",+ "value": "group",+ "documentation": "The moniker is unique inside the group to which a project belongs"+ },+ {+ "name": "scheme",+ "value": "scheme",+ "documentation": "The moniker is unique inside the moniker scheme."+ },+ {+ "name": "global",+ "value": "global",+ "documentation": "The moniker is globally unique"+ }+ ],+ "documentation": "Moniker uniqueness level to define scope of the moniker.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "MonikerKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "import",+ "value": "import",+ "documentation": "The moniker represent a symbol that is imported into a project"+ },+ {+ "name": "export",+ "value": "export",+ "documentation": "The moniker represents a symbol that is exported from a project"+ },+ {+ "name": "local",+ "value": "local",+ "documentation": "The moniker represents a symbol that is local to a project (e.g. a local\nvariable of a function, a class not visible outside the project, ...)"+ }+ ],+ "documentation": "The moniker kind.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "InlayHintKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Type",+ "value": 1,+ "documentation": "An inlay hint that for a type annotation."+ },+ {+ "name": "Parameter",+ "value": 2,+ "documentation": "An inlay hint that is for a parameter."+ }+ ],+ "documentation": "Inlay hint kinds.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "MessageType",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Error",+ "value": 1,+ "documentation": "An error message."+ },+ {+ "name": "Warning",+ "value": 2,+ "documentation": "A warning message."+ },+ {+ "name": "Info",+ "value": 3,+ "documentation": "An information message."+ },+ {+ "name": "Log",+ "value": 4,+ "documentation": "A log message."+ },+ {+ "name": "Debug",+ "value": 5,+ "documentation": "A debug message.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ }+ ],+ "documentation": "The message type"+ },+ {+ "name": "TextDocumentSyncKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "None",+ "value": 0,+ "documentation": "Documents should not be synced at all."+ },+ {+ "name": "Full",+ "value": 1,+ "documentation": "Documents are synced by always sending the full content\nof the document."+ },+ {+ "name": "Incremental",+ "value": 2,+ "documentation": "Documents are synced by sending the full content on open.\nAfter that only incremental updates to the document are\nsend."+ }+ ],+ "documentation": "Defines how the host (editor) should sync\ndocument changes to the language server."+ },+ {+ "name": "TextDocumentSaveReason",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Manual",+ "value": 1,+ "documentation": "Manually triggered, e.g. by the user pressing save, by starting debugging,\nor by an API call."+ },+ {+ "name": "AfterDelay",+ "value": 2,+ "documentation": "Automatic after a delay."+ },+ {+ "name": "FocusOut",+ "value": 3,+ "documentation": "When the editor lost focus."+ }+ ],+ "documentation": "Represents reasons why a text document is saved."+ },+ {+ "name": "CompletionItemKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Text",+ "value": 1+ },+ {+ "name": "Method",+ "value": 2+ },+ {+ "name": "Function",+ "value": 3+ },+ {+ "name": "Constructor",+ "value": 4+ },+ {+ "name": "Field",+ "value": 5+ },+ {+ "name": "Variable",+ "value": 6+ },+ {+ "name": "Class",+ "value": 7+ },+ {+ "name": "Interface",+ "value": 8+ },+ {+ "name": "Module",+ "value": 9+ },+ {+ "name": "Property",+ "value": 10+ },+ {+ "name": "Unit",+ "value": 11+ },+ {+ "name": "Value",+ "value": 12+ },+ {+ "name": "Enum",+ "value": 13+ },+ {+ "name": "Keyword",+ "value": 14+ },+ {+ "name": "Snippet",+ "value": 15+ },+ {+ "name": "Color",+ "value": 16+ },+ {+ "name": "File",+ "value": 17+ },+ {+ "name": "Reference",+ "value": 18+ },+ {+ "name": "Folder",+ "value": 19+ },+ {+ "name": "EnumMember",+ "value": 20+ },+ {+ "name": "Constant",+ "value": 21+ },+ {+ "name": "Struct",+ "value": 22+ },+ {+ "name": "Event",+ "value": 23+ },+ {+ "name": "Operator",+ "value": 24+ },+ {+ "name": "TypeParameter",+ "value": 25+ }+ ],+ "documentation": "The kind of a completion entry."+ },+ {+ "name": "CompletionItemTag",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Deprecated",+ "value": 1,+ "documentation": "Render a completion as obsolete, usually using a strike-out."+ }+ ],+ "documentation": "Completion item tags are extra annotations that tweak the rendering of a completion\nitem.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "InsertTextFormat",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "PlainText",+ "value": 1,+ "documentation": "The primary text to be inserted is treated as a plain string."+ },+ {+ "name": "Snippet",+ "value": 2,+ "documentation": "The primary text to be inserted is treated as a snippet.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Placeholders with equal identifiers are linked,\nthat is typing in one will update others too.\n\nSee also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax"+ }+ ],+ "documentation": "Defines whether the insert text in a completion item should be interpreted as\nplain text or a snippet."+ },+ {+ "name": "InsertTextMode",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "asIs",+ "value": 1,+ "documentation": "The insertion or replace strings is taken as it is. If the\nvalue is multi line the lines below the cursor will be\ninserted using the indentation defined in the string value.\nThe client will not apply any kind of adjustments to the\nstring."+ },+ {+ "name": "adjustIndentation",+ "value": 2,+ "documentation": "The editor adjusts leading whitespace of new lines so that\nthey match the indentation up to the cursor of the line for\nwhich the item is accepted.\n\nConsider a line like this: <2tabs><cursor><3tabs>foo. Accepting a\nmulti line completion item is indented using 2 tabs and all\nfollowing lines inserted will be indented using 2 tabs as well."+ }+ ],+ "documentation": "How whitespace and indentation is handled during completion\nitem insertion.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "DocumentHighlightKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Text",+ "value": 1,+ "documentation": "A textual occurrence."+ },+ {+ "name": "Read",+ "value": 2,+ "documentation": "Read-access of a symbol, like reading a variable."+ },+ {+ "name": "Write",+ "value": 3,+ "documentation": "Write-access of a symbol, like writing to a variable."+ }+ ],+ "documentation": "A document highlight kind."+ },+ {+ "name": "CodeActionKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Empty",+ "value": "",+ "documentation": "Empty kind."+ },+ {+ "name": "QuickFix",+ "value": "quickfix",+ "documentation": "Base kind for quickfix actions: 'quickfix'"+ },+ {+ "name": "Refactor",+ "value": "refactor",+ "documentation": "Base kind for refactoring actions: 'refactor'"+ },+ {+ "name": "RefactorExtract",+ "value": "refactor.extract",+ "documentation": "Base kind for refactoring extraction actions: 'refactor.extract'\n\nExample extract actions:\n\n- Extract method\n- Extract function\n- Extract variable\n- Extract interface from class\n- ..."+ },+ {+ "name": "RefactorInline",+ "value": "refactor.inline",+ "documentation": "Base kind for refactoring inline actions: 'refactor.inline'\n\nExample inline actions:\n\n- Inline function\n- Inline variable\n- Inline constant\n- ..."+ },+ {+ "name": "RefactorMove",+ "value": "refactor.move",+ "documentation": "Base kind for refactoring move actions: `refactor.move`\n\nExample move actions:\n\n- Move a function to a new file\n- Move a property between classes\n- Move method to base class\n- ...\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "RefactorRewrite",+ "value": "refactor.rewrite",+ "documentation": "Base kind for refactoring rewrite actions: 'refactor.rewrite'\n\nExample rewrite actions:\n\n- Convert JavaScript function to class\n- Add or remove parameter\n- Encapsulate field\n- Make method static\n- Move method to base class\n- ..."+ },+ {+ "name": "Source",+ "value": "source",+ "documentation": "Base kind for source actions: `source`\n\nSource code actions apply to the entire file."+ },+ {+ "name": "SourceOrganizeImports",+ "value": "source.organizeImports",+ "documentation": "Base kind for an organize imports source action: `source.organizeImports`"+ },+ {+ "name": "SourceFixAll",+ "value": "source.fixAll",+ "documentation": "Base kind for auto-fix source actions: `source.fixAll`.\n\nFix all actions automatically fix errors that have a clear fix that do not require user input.\nThey should not suppress errors or perform unsafe fixes such as generating new types or classes.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "Notebook",+ "value": "notebook",+ "documentation": "Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using\nthis should always begin with `notebook.`\n\n@since 3.18.0",+ "since": "3.18.0"+ }+ ],+ "supportsCustomValues": true,+ "documentation": "A set of predefined code action kinds"+ },+ {+ "name": "TraceValue",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Off",+ "value": "off",+ "documentation": "Turn tracing off."+ },+ {+ "name": "Messages",+ "value": "messages",+ "documentation": "Trace messages only."+ },+ {+ "name": "Verbose",+ "value": "verbose",+ "documentation": "Verbose message tracing."+ }+ ]+ },+ {+ "name": "MarkupKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "PlainText",+ "value": "plaintext",+ "documentation": "Plain text is supported as a content format"+ },+ {+ "name": "Markdown",+ "value": "markdown",+ "documentation": "Markdown is supported as a content format"+ }+ ],+ "documentation": "Describes the content type that a client supports in various\nresult literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n\nPlease note that `MarkupKinds` must not start with a `$`. This kinds\nare reserved for internal usage."+ },+ {+ "name": "LanguageKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "ABAP",+ "value": "abap"+ },+ {+ "name": "WindowsBat",+ "value": "bat"+ },+ {+ "name": "BibTeX",+ "value": "bibtex"+ },+ {+ "name": "Clojure",+ "value": "clojure"+ },+ {+ "name": "Coffeescript",+ "value": "coffeescript"+ },+ {+ "name": "C",+ "value": "c"+ },+ {+ "name": "CPP",+ "value": "cpp"+ },+ {+ "name": "CSharp",+ "value": "csharp"+ },+ {+ "name": "CSS",+ "value": "css"+ },+ {+ "name": "D",+ "value": "d",+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "Delphi",+ "value": "pascal",+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "Diff",+ "value": "diff"+ },+ {+ "name": "Dart",+ "value": "dart"+ },+ {+ "name": "Dockerfile",+ "value": "dockerfile"+ },+ {+ "name": "Elixir",+ "value": "elixir"+ },+ {+ "name": "Erlang",+ "value": "erlang"+ },+ {+ "name": "FSharp",+ "value": "fsharp"+ },+ {+ "name": "GitCommit",+ "value": "git-commit"+ },+ {+ "name": "GitRebase",+ "value": "rebase"+ },+ {+ "name": "Go",+ "value": "go"+ },+ {+ "name": "Groovy",+ "value": "groovy"+ },+ {+ "name": "Handlebars",+ "value": "handlebars"+ },+ {+ "name": "Haskell",+ "value": "haskell"+ },+ {+ "name": "HTML",+ "value": "html"+ },+ {+ "name": "Ini",+ "value": "ini"+ },+ {+ "name": "Java",+ "value": "java"+ },+ {+ "name": "JavaScript",+ "value": "javascript"+ },+ {+ "name": "JavaScriptReact",+ "value": "javascriptreact"+ },+ {+ "name": "JSON",+ "value": "json"+ },+ {+ "name": "LaTeX",+ "value": "latex"+ },+ {+ "name": "Less",+ "value": "less"+ },+ {+ "name": "Lua",+ "value": "lua"+ },+ {+ "name": "Makefile",+ "value": "makefile"+ },+ {+ "name": "Markdown",+ "value": "markdown"+ },+ {+ "name": "ObjectiveC",+ "value": "objective-c"+ },+ {+ "name": "ObjectiveCPP",+ "value": "objective-cpp"+ },+ {+ "name": "Pascal",+ "value": "pascal",+ "documentation": "@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "Perl",+ "value": "perl"+ },+ {+ "name": "Perl6",+ "value": "perl6"+ },+ {+ "name": "PHP",+ "value": "php"+ },+ {+ "name": "Powershell",+ "value": "powershell"+ },+ {+ "name": "Pug",+ "value": "jade"+ },+ {+ "name": "Python",+ "value": "python"+ },+ {+ "name": "R",+ "value": "r"+ },+ {+ "name": "Razor",+ "value": "razor"+ },+ {+ "name": "Ruby",+ "value": "ruby"+ },+ {+ "name": "Rust",+ "value": "rust"+ },+ {+ "name": "SCSS",+ "value": "scss"+ },+ {+ "name": "SASS",+ "value": "sass"+ },+ {+ "name": "Scala",+ "value": "scala"+ },+ {+ "name": "ShaderLab",+ "value": "shaderlab"+ },+ {+ "name": "ShellScript",+ "value": "shellscript"+ },+ {+ "name": "SQL",+ "value": "sql"+ },+ {+ "name": "Swift",+ "value": "swift"+ },+ {+ "name": "TypeScript",+ "value": "typescript"+ },+ {+ "name": "TypeScriptReact",+ "value": "typescriptreact"+ },+ {+ "name": "TeX",+ "value": "tex"+ },+ {+ "name": "VisualBasic",+ "value": "vb"+ },+ {+ "name": "XML",+ "value": "xml"+ },+ {+ "name": "XSL",+ "value": "xsl"+ },+ {+ "name": "YAML",+ "value": "yaml"+ }+ ],+ "supportsCustomValues": true,+ "documentation": "Predefined Language kinds\n@since 3.18.0\n@proposed",+ "since": "3.18.0"+ },+ {+ "name": "InlineCompletionTriggerKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Invoked",+ "value": 1,+ "documentation": "Completion was triggered explicitly by a user gesture."+ },+ {+ "name": "Automatic",+ "value": 2,+ "documentation": "Completion was triggered automatically while editing."+ }+ ],+ "documentation": "Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.\n\n@since 3.18.0\n@proposed",+ "since": "3.18.0",+ "proposed": true+ },+ {+ "name": "PositionEncodingKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "UTF8",+ "value": "utf-8",+ "documentation": "Character offsets count UTF-8 code units (e.g. bytes)."+ },+ {+ "name": "UTF16",+ "value": "utf-16",+ "documentation": "Character offsets count UTF-16 code units.\n\nThis is the default and must always be supported\nby servers"+ },+ {+ "name": "UTF32",+ "value": "utf-32",+ "documentation": "Character offsets count UTF-32 code units.\n\nImplementation note: these are the same as Unicode codepoints,\nso this `PositionEncodingKind` may also be used for an\nencoding-agnostic representation of character offsets."+ }+ ],+ "supportsCustomValues": true,+ "documentation": "A set of predefined position encoding kinds.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "FileChangeType",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Created",+ "value": 1,+ "documentation": "The file got created."+ },+ {+ "name": "Changed",+ "value": 2,+ "documentation": "The file got changed."+ },+ {+ "name": "Deleted",+ "value": 3,+ "documentation": "The file got deleted."+ }+ ],+ "documentation": "The file event type"+ },+ {+ "name": "WatchKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Create",+ "value": 1,+ "documentation": "Interested in create events."+ },+ {+ "name": "Change",+ "value": 2,+ "documentation": "Interested in change events"+ },+ {+ "name": "Delete",+ "value": 4,+ "documentation": "Interested in delete events"+ }+ ],+ "supportsCustomValues": true+ },+ {+ "name": "DiagnosticSeverity",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Error",+ "value": 1,+ "documentation": "Reports an error."+ },+ {+ "name": "Warning",+ "value": 2,+ "documentation": "Reports a warning."+ },+ {+ "name": "Information",+ "value": 3,+ "documentation": "Reports an information."+ },+ {+ "name": "Hint",+ "value": 4,+ "documentation": "Reports a hint."+ }+ ],+ "documentation": "The diagnostic's severity."+ },+ {+ "name": "DiagnosticTag",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Unnecessary",+ "value": 1,+ "documentation": "Unused or unnecessary code.\n\nClients are allowed to render diagnostics with this tag faded out instead of having\nan error squiggle."+ },+ {+ "name": "Deprecated",+ "value": 2,+ "documentation": "Deprecated or obsolete code.\n\nClients are allowed to rendered diagnostics with this tag strike through."+ }+ ],+ "documentation": "The diagnostic tags.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "CompletionTriggerKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Invoked",+ "value": 1,+ "documentation": "Completion was triggered by typing an identifier (24x7 code\ncomplete), manual invocation (e.g Ctrl+Space) or via API."+ },+ {+ "name": "TriggerCharacter",+ "value": 2,+ "documentation": "Completion was triggered by a trigger character specified by\nthe `triggerCharacters` properties of the `CompletionRegistrationOptions`."+ },+ {+ "name": "TriggerForIncompleteCompletions",+ "value": 3,+ "documentation": "Completion was re-triggered as current completion list is incomplete"+ }+ ],+ "documentation": "How a completion was triggered"+ },+ {+ "name": "SignatureHelpTriggerKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Invoked",+ "value": 1,+ "documentation": "Signature help was invoked manually by the user or by a command."+ },+ {+ "name": "TriggerCharacter",+ "value": 2,+ "documentation": "Signature help was triggered by a trigger character."+ },+ {+ "name": "ContentChange",+ "value": 3,+ "documentation": "Signature help was triggered by the cursor moving or by the document content changing."+ }+ ],+ "documentation": "How a signature help was triggered.\n\n@since 3.15.0",+ "since": "3.15.0"+ },+ {+ "name": "CodeActionTriggerKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Invoked",+ "value": 1,+ "documentation": "Code actions were explicitly requested by the user or by an extension."+ },+ {+ "name": "Automatic",+ "value": 2,+ "documentation": "Code actions were requested automatically.\n\nThis typically happens when current selection in a file changes, but can\nalso be triggered when file content changes."+ }+ ],+ "documentation": "The reason why code actions were requested.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "FileOperationPatternKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "file",+ "value": "file",+ "documentation": "The pattern matches a file only."+ },+ {+ "name": "folder",+ "value": "folder",+ "documentation": "The pattern matches a folder only."+ }+ ],+ "documentation": "A pattern kind describing if a glob pattern matches a file a folder or\nboth.\n\n@since 3.16.0",+ "since": "3.16.0"+ },+ {+ "name": "NotebookCellKind",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Markup",+ "value": 1,+ "documentation": "A markup-cell is formatted source that is used for display."+ },+ {+ "name": "Code",+ "value": 2,+ "documentation": "A code-cell is source code."+ }+ ],+ "documentation": "A notebook cell kind.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "ResourceOperationKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Create",+ "value": "create",+ "documentation": "Supports creating new files and folders."+ },+ {+ "name": "Rename",+ "value": "rename",+ "documentation": "Supports renaming existing files and folders."+ },+ {+ "name": "Delete",+ "value": "delete",+ "documentation": "Supports deleting existing files and folders."+ }+ ]+ },+ {+ "name": "FailureHandlingKind",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Abort",+ "value": "abort",+ "documentation": "Applying the workspace change is simply aborted if one of the changes provided\nfails. All operations executed before the failing operation stay executed."+ },+ {+ "name": "Transactional",+ "value": "transactional",+ "documentation": "All operations are executed transactional. That means they either all\nsucceed or no changes at all are applied to the workspace."+ },+ {+ "name": "TextOnlyTransactional",+ "value": "textOnlyTransactional",+ "documentation": "If the workspace edit contains only textual file changes they are executed transactional.\nIf resource changes (create, rename or delete file) are part of the change the failure\nhandling strategy is abort."+ },+ {+ "name": "Undo",+ "value": "undo",+ "documentation": "The client tries to undo the operations already executed. But there is no\nguarantee that this is succeeding."+ }+ ]+ },+ {+ "name": "PrepareSupportDefaultBehavior",+ "type": {+ "kind": "base",+ "name": "uinteger"+ },+ "values": [+ {+ "name": "Identifier",+ "value": 1,+ "documentation": "The client's default behavior is to select the identifier\naccording the to language's syntax rule."+ }+ ]+ },+ {+ "name": "TokenFormat",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "values": [+ {+ "name": "Relative",+ "value": "relative"+ }+ ]+ }+ ],+ "typeAliases": [+ {+ "name": "Definition",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Location"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ }+ ]+ },+ "documentation": "The definition of a symbol represented as one or many {@link Location locations}.\nFor most programming languages there is only one location at which a symbol is\ndefined.\n\nServers should prefer returning `DefinitionLink` over `Definition` if supported\nby the client."+ },+ {+ "name": "DefinitionLink",+ "type": {+ "kind": "reference",+ "name": "LocationLink"+ },+ "documentation": "Information about where a symbol is defined.\n\nProvides additional metadata over normal {@link Location location} definitions, including the range of\nthe defining symbol"+ },+ {+ "name": "LSPArray",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "LSPAny"+ }+ },+ "documentation": "LSP arrays.\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "LSPAny",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "LSPObject"+ },+ {+ "kind": "reference",+ "name": "LSPArray"+ },+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "uinteger"+ },+ {+ "kind": "base",+ "name": "decimal"+ },+ {+ "kind": "base",+ "name": "boolean"+ },+ {+ "kind": "base",+ "name": "null"+ }+ ]+ },+ "documentation": "The LSP any type.\nPlease note that strictly speaking a property with the value `undefined`\ncan't be converted into JSON preserving the property name. However for\nconvenience it is allowed and assumed that all these properties are\noptional as well.\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "Declaration",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Location"+ },+ {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "Location"+ }+ }+ ]+ },+ "documentation": "The declaration of a symbol representation as one or many {@link Location locations}."+ },+ {+ "name": "DeclarationLink",+ "type": {+ "kind": "reference",+ "name": "LocationLink"+ },+ "documentation": "Information about where a symbol is declared.\n\nProvides additional metadata over normal {@link Location location} declarations, including the range of\nthe declaring symbol.\n\nServers should prefer returning `DeclarationLink` over `Declaration` if supported\nby the client."+ },+ {+ "name": "InlineValue",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "InlineValueText"+ },+ {+ "kind": "reference",+ "name": "InlineValueVariableLookup"+ },+ {+ "kind": "reference",+ "name": "InlineValueEvaluatableExpression"+ }+ ]+ },+ "documentation": "Inline value information can be provided by different means:\n- directly as a text value (class InlineValueText).\n- as a name to use for a variable lookup (class InlineValueVariableLookup)\n- as an evaluatable expression (class InlineValueEvaluatableExpression)\nThe InlineValue types combines all inline value types into one type.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "DocumentDiagnosticReport",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "RelatedFullDocumentDiagnosticReport"+ },+ {+ "kind": "reference",+ "name": "RelatedUnchangedDocumentDiagnosticReport"+ }+ ]+ },+ "documentation": "The result of a document diagnostic pull request. A report can\neither be a full report containing all diagnostics for the\nrequested document or an unchanged report indicating that nothing\nhas changed in terms of diagnostics in comparison to the last\npull request.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "PrepareRenameResult",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Range"+ },+ {+ "kind": "reference",+ "name": "PrepareRenamePlaceholder"+ },+ {+ "kind": "reference",+ "name": "PrepareRenameDefaultBehavior"+ }+ ]+ }+ },+ {+ "name": "DocumentSelector",+ "type": {+ "kind": "array",+ "element": {+ "kind": "reference",+ "name": "DocumentFilter"+ }+ },+ "documentation": "A document selector is the combination of one or many document filters.\n\n@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;\n\nThe use of a string as a document filter is deprecated @since 3.16.0.",+ "since": "3.16.0."+ },+ {+ "name": "ProgressToken",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "integer"+ },+ {+ "kind": "base",+ "name": "string"+ }+ ]+ }+ },+ {+ "name": "ChangeAnnotationIdentifier",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "An identifier to refer to a change annotation stored with a workspace edit."+ },+ {+ "name": "WorkspaceDocumentDiagnosticReport",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "WorkspaceFullDocumentDiagnosticReport"+ },+ {+ "kind": "reference",+ "name": "WorkspaceUnchangedDocumentDiagnosticReport"+ }+ ]+ },+ "documentation": "A workspace diagnostic document report.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TextDocumentContentChangeEvent",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextDocumentContentChangePartial"+ },+ {+ "kind": "reference",+ "name": "TextDocumentContentChangeWholeDocument"+ }+ ]+ },+ "documentation": "An event describing a change to a text document. If only a text is provided\nit is considered to be the full content of the document."+ },+ {+ "name": "MarkedString",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "base",+ "name": "string"+ },+ {+ "kind": "reference",+ "name": "MarkedStringWithLanguage"+ }+ ]+ },+ "documentation": "MarkedString can be used to render human readable text. It is either a markdown string\nor a code-block that provides a language and a code snippet. The language identifier\nis semantically equal to the optional language identifier in fenced code blocks in GitHub\nissues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting\n\nThe pair of a language and a value is an equivalent to markdown:\n```${language}\n${value}\n```\n\nNote that markdown strings will be sanitized - that means html will be escaped.\n@deprecated use MarkupContent instead.",+ "deprecated": "use MarkupContent instead."+ },+ {+ "name": "DocumentFilter",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextDocumentFilter"+ },+ {+ "kind": "reference",+ "name": "NotebookCellTextDocumentFilter"+ }+ ]+ },+ "documentation": "A document filter describes a top level text document or\na notebook cell document.\n\n@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.",+ "since": "3.17.0 - proposed support for NotebookCellTextDocumentFilter."+ },+ {+ "name": "LSPObject",+ "type": {+ "kind": "map",+ "key": {+ "kind": "base",+ "name": "string"+ },+ "value": {+ "kind": "reference",+ "name": "LSPAny"+ }+ },+ "documentation": "LSP object definition.\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "GlobPattern",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "Pattern"+ },+ {+ "kind": "reference",+ "name": "RelativePattern"+ }+ ]+ },+ "documentation": "The glob pattern. Either a string pattern or a relative pattern.\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "TextDocumentFilter",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "TextDocumentFilterLanguage"+ },+ {+ "kind": "reference",+ "name": "TextDocumentFilterScheme"+ },+ {+ "kind": "reference",+ "name": "TextDocumentFilterPattern"+ }+ ]+ },+ "documentation": "A document filter denotes a document by different properties like\nthe {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of\nits resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.\n\nGlob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)\n\n@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`\n@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "NotebookDocumentFilter",+ "type": {+ "kind": "or",+ "items": [+ {+ "kind": "reference",+ "name": "NotebookDocumentFilterNotebookType"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilterScheme"+ },+ {+ "kind": "reference",+ "name": "NotebookDocumentFilterPattern"+ }+ ]+ },+ "documentation": "A notebook document filter denotes a notebook document by\ndifferent properties. The properties will be match\nagainst the notebook's URI (same as with documents)\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "Pattern",+ "type": {+ "kind": "base",+ "name": "string"+ },+ "documentation": "The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)\n\n@since 3.17.0",+ "since": "3.17.0"+ },+ {+ "name": "RegularExpressionEngineKind",+ "type": {+ "kind": "base",+ "name": "string"+ }+ }+ ]+}
+ metamodel/Language/LSP/MetaModel.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE TemplateHaskell #-}++module Language.LSP.MetaModel (module Export, metaModel) where++import Language.LSP.MetaModel.Types as Export++import Data.FileEmbed (makeRelativeToProject)++-- | The metamodel used to generate the LSP types in this package.+metaModel :: MetaModel+metaModel = $(loadMetaModelFromFile =<< makeRelativeToProject "metaModel.json")
+ metamodel/Language/LSP/MetaModel/Types.hs view
@@ -0,0 +1,258 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TemplateHaskell #-}++{- |+This defines the types of the LSP "metamodel", which is a machine-readable format specifying the+types used in the LSP protocol.++The type system is quite typescript-y, which isn't surprising given that the whole protocol is+very typescript-y.++A typescript version of the metamodel types can be found here, which is useful for constructing+this Haskell model of them:+https://github.com/microsoft/vscode-languageserver-node/blob/main/tools/src/metaModel.ts+-}+module Language.LSP.MetaModel.Types where++import Data.Aeson hiding (Null, String)+import Data.Aeson qualified as JSON+import Data.Aeson.TH qualified as JSON+import Data.Char qualified as Char+import Data.Text (Text)++import Control.Lens+import Control.Monad.IO.Class+import Data.List.NonEmpty qualified as NE++import Language.Haskell.TH.Syntax (Exp, Lift (..), Q, addDependentFile)++-- | What direction is this message sent in: server to client, client to server, or both?+data MessageDirection = ServerToClient | ClientToServer | Both+ deriving stock (Show, Eq, Ord, Lift)++instance ToJSON MessageDirection where+ toJSON ServerToClient = toJSON @String "serverToClient"+ toJSON ClientToServer = toJSON @String "clientToServer"+ toJSON Both = toJSON @String "both"++instance FromJSON MessageDirection where+ parseJSON = withText "MessageDirection" $ \case+ "serverToClient" -> pure ServerToClient+ "clientToServer" -> pure ClientToServer+ "both" -> pure Both+ t -> fail $ "unknown message direction " ++ show t++-- | The "base types" in the metamodel.+data BaseTypeName = URI | DocumentUri | Integer | UInteger | Decimal | RegExp | String | Boolean | Null+ deriving stock (Show, Eq, Ord, Lift)++-- | A property of a structure.+data Property = Property+ { name :: Text+ , type_ :: Type+ , optional :: Maybe Bool+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | An anonymous structure type.+data StructureLiteral = StructureLiteral+ { properties :: [Property]+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | The various kinds of type in the metamodel.+data Type+ = BaseType {btName :: BaseTypeName}+ | ReferenceType {rtName :: Text}+ | ArrayType {atElement :: Type}+ | MapType {mKey :: Type, mValue :: Type}+ | AndType {aItems :: NE.NonEmpty Type}+ | OrType {oItems :: NE.NonEmpty Type}+ | TupleType {tItems :: [Type]}+ | StructureLiteralType {stlValue :: StructureLiteral}+ | StringLiteralType {slValue :: Text}+ | IntegerLiteralType {ilValue :: Integer}+ | BooleanLiteralType {blValue :: Bool}+ deriving stock (Show, Eq, Ord, Lift)++-- | A request message.+data Request = Request+ { method :: Text+ , params :: Maybe Type -- typescript says it can be [Type], but it never is so whatever+ , result :: Type+ , partialResult :: Maybe Type+ , errorData :: Maybe Type+ , registrationOptions :: Maybe Type+ , messageDirection :: MessageDirection+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | A notification message.+data Notification = Notification+ { method :: Text+ , params :: Maybe Type+ , registrationOptions :: Maybe Type+ , messageDirection :: MessageDirection+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | A structure type.+data Structure = Structure+ { name :: Text+ , extends :: Maybe [Type]+ , mixins :: Maybe [Type]+ , properties :: [Property]+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | A type alias.+data TypeAlias = TypeAlias+ { name :: Text+ , type_ :: Type+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++{- | This is just 'string | int' on the typescript side, but+ it's convenient to have a proper type here.+-}+data TextOrInteger = T Text | I Integer+ deriving stock (Show, Eq, Ord, Lift)++-- | An entry in an enumeration.+data EnumerationEntry = EnumerationEntry+ { name :: Text+ , value :: TextOrInteger+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | An enumeration type.+data Enumeration = Enumeration+ { name :: Text+ , type_ :: Type+ , values :: [EnumerationEntry]+ , supportsCustomValues :: Maybe Bool+ , documentation :: Maybe Text+ , since :: Maybe Text+ , proposed :: Maybe Bool+ , deprecated :: Maybe Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | Metadata about the metamodel iteslf.+data MetaData = MetaData+ { version :: Text+ }+ deriving stock (Show, Eq, Ord, Lift)++-- | The entire metamodel.+data MetaModel = MetaModel+ { metaData :: MetaData+ , requests :: [Request]+ , notifications :: [Notification]+ , structures :: [Structure]+ , enumerations :: [Enumeration]+ , typeAliases :: [TypeAlias]+ }+ deriving stock (Show, Eq, Ord, Lift)++-- We need to do some massaging to make sure that we get the right aeson instances for+-- these types and can actually parse the incoming data!+$( let+ -- "type" is a very common field name, we use "type_" on the Haskell side+ defOpts = defaultOptions{fieldLabelModifier = \case "type_" -> "type"; x -> x}++ propertyInst = JSON.deriveJSON defOpts ''Property+ slInst = JSON.deriveJSON defOpts ''StructureLiteral++ -- 'BaseType' is a union of strings, so we encode it as an untagged sum with some+ -- mangling of the constructor names+ baseTyNameToTag :: String -> String+ baseTyNameToTag = \case+ "Integer" -> "integer"+ "UInteger" -> "uinteger"+ "Decimal" -> "decimal"+ "String" -> "string"+ "Boolean" -> "boolean"+ "Null" -> "null"+ x -> x+ baseTyNameInst = JSON.deriveJSON (defOpts{sumEncoding = JSON.UntaggedValue, constructorTagModifier = baseTyNameToTag}) ''BaseTypeName++ -- 'Type' is a *tagged* union, but the tag is a string field (sigh), fortunately+ -- aeson can deal with this. Also needs some constructor mangling.+ typeToTag :: String -> String+ typeToTag = \case+ "BaseType" -> "base"+ "ReferenceType" -> "reference"+ "ArrayType" -> "array"+ "MapType" -> "map"+ "AndType" -> "and"+ "OrType" -> "or"+ "TupleType" -> "tuple"+ "StructureLiteralType" -> "literal"+ "StringLiteralType" -> "stringLiteral"+ "IntegerLiteralType" -> "integerLiteral"+ "BooleanLiteralType" -> "booleanLiteral"+ x -> x+ typeOpts =+ defOpts+ { sumEncoding = JSON.defaultTaggedObject{tagFieldName = "kind"}+ , constructorTagModifier = typeToTag+ , fieldLabelModifier = \s -> over _head Char.toLower $ Prelude.dropWhile Char.isLower s+ }+ typeInst = JSON.deriveJSON typeOpts ''Type++ -- The rest are mostly normal+ reqInst = JSON.deriveJSON defOpts ''Request+ notInst = JSON.deriveJSON defOpts ''Notification+ sInst = JSON.deriveJSON defOpts ''Structure+ taInst = JSON.deriveJSON defOpts ''TypeAlias+ -- TextOrInteger is also an untagged sum+ tiInst = JSON.deriveJSON (defOpts{sumEncoding = UntaggedValue}) ''TextOrInteger+ eeInst = JSON.deriveJSON defOpts ''EnumerationEntry+ eInst = JSON.deriveJSON defOpts ''Enumeration+ mdInst = JSON.deriveJSON defOpts ''MetaData+ mmInst = JSON.deriveJSON defOpts ''MetaModel+ in+ mconcat <$> sequence [propertyInst, slInst, baseTyNameInst, typeInst, reqInst, notInst, sInst, taInst, tiInst, eeInst, eInst, mdInst, mmInst]+ )++loadMetaModelFromFile :: FilePath -> Q Exp+loadMetaModelFromFile fp = do+ addDependentFile fp+ res <- liftIO $ JSON.eitherDecodeFileStrict' fp+ case res of+ Left e -> fail e+ Right (mm :: MetaModel) -> lift mm
+ quickcheck/Language/LSP/Protocol/QuickCheck.hs view
@@ -0,0 +1,6 @@+-- | Provides 'Arbitrary' instances for protocol types.+module Language.LSP.Protocol.QuickCheck (module Export) where++import Language.LSP.Protocol.QuickCheck.Common as Export+import Language.LSP.Protocol.QuickCheck.Message as Export+import Language.LSP.Protocol.QuickCheck.Types as Export
+ quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE UndecidableInstances #-}++module Language.LSP.Protocol.QuickCheck.Common where++import Data.Foldable+import Data.Row qualified as R+import Data.Row.Records qualified as R+import GHC.TypeLits+import Language.LSP.Protocol.Message+import Language.LSP.Protocol.Types+import Test.QuickCheck+import Test.QuickCheck.Instances ()++instance (Arbitrary a, Arbitrary b) => Arbitrary (a |? b) where+ arbitrary = oneof [InL <$> arbitrary, InR <$> arbitrary]+ shrink = genericShrink++instance Arbitrary Null where+ arbitrary = pure Null++instance (R.AllUniqueLabels r, R.Forall r Arbitrary) => Arbitrary (R.Rec r) where+ arbitrary = R.fromLabelsA @Arbitrary $ \_l -> arbitrary+ shrink record = R.traverse @Arbitrary @[] shrink record++instance Arbitrary UInt where+ arbitrary = fromInteger <$> arbitrary++instance Arbitrary Uri where+ arbitrary = Uri <$> arbitrary+ shrink = genericShrink++instance Arbitrary (LspId m) where+ arbitrary = oneof [IdInt <$> arbitrary, IdString <$> arbitrary]+ shrink = genericShrink++instance (LspEnum a) => Arbitrary (AsLspEnum a) where+ arbitrary = elements $ AsLspEnum <$> toList knownValues++instance (KnownSymbol s) => Arbitrary (AString s) where+ arbitrary = pure $ AString++instance (KnownNat n) => Arbitrary (AnInteger n) where+ arbitrary = pure $ AnInteger
+ quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs view
@@ -0,0 +1,82 @@+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+-- See Note [Arbitary Maybe Void]+{-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-}++module Language.LSP.Protocol.QuickCheck.Message where++import Data.Row qualified as R+import Data.Row.Records qualified as R+import Data.Void+import Language.LSP.Protocol.Message+import Language.LSP.Protocol.QuickCheck.Types+import Language.LSP.Protocol.Types+import Test.QuickCheck+import Test.QuickCheck.Arbitrary.Generic+import Test.QuickCheck.Instances ()++deriving via (GenericArbitrary RequestMessage) instance Arbitrary RequestMessage+deriving via (GenericArbitrary ResponseMessage) instance Arbitrary ResponseMessage+deriving via (GenericArbitrary NotificationMessage) instance Arbitrary NotificationMessage++-- See Note [Arbitary Maybe Void]+instance {-# OVERLAPS #-} Arbitrary (Maybe Void) where+ arbitrary = pure Nothing++-- FIXME: there is something funny with the way we're representing error data.+-- Should be able to have these instances!+{-+deriving via (GenericArbitrary ResponseError) instance Arbitrary ResponseError++deriving via+ (GenericArbitrary (TResponseError m))+ instance+ (Arbitrary (ErrorData m)) => Arbitrary (TResponseError m)++deriving via+ (GenericArbitrary (TResponseMEssage m))+ instance+ (Arbitrary (MessageResult m), Arbitrary (ErrorData m)) => Arbitrary (TResponseMEssage m)+-}++instance (ErrorData m ~ Maybe Void) => Arbitrary (TResponseError m) where+ arbitrary = TResponseError <$> arbitrary <*> arbitrary <*> pure Nothing+ shrink = genericShrink++instance Arbitrary ResponseError where+ arbitrary = ResponseError <$> arbitrary <*> arbitrary <*> pure Nothing+ shrink = genericShrink++-- See Note [Arbitary Maybe Void]+deriving via+ (GenericArbitrary (TResponseMessage m))+ instance+ (Arbitrary (MessageResult m), ErrorData m ~ Maybe Void) => Arbitrary (TResponseMessage m)++-- These require a method singleton. We need something like SingI from+-- singletons to pass that into the class instance+{-+instance (Arbitrary (MessageParams m)) => Arbitrary (TRequestMessage m) where+ arbitrary = TRequestMessage <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary+ shrink = genericShrink++instance (Arbitrary (MessageParams m)) => Arbitrary (TNotificationMessage m) where+ arbitrary = TNotificationMessage <$> arbitrary <*> arbitrary <*> arbitrary+ shrink = genericShrink+-}++{- Note [Arbitary Maybe Void]+For methods that don't have error data, we say that their error data type is 'Void'.+This means that the error data field has type 'Maybe Void', i.e. can only be 'Nothing',+which is what we want.++However, we have a problem with the Arbitrary instance. There is an 'Arbitrary (Maybe a)'+instance which depends on an 'Arbitrary a' instance - but there is no 'Arbitrary Void'+instance, and apparently can't be since we can't make an empty generator.++So we cheat a bit:+- Define an overlapping 'Arbitrary (Maybe Void)' instance+- Define the instances for response messages to require 'Arbitrary (Maybe (ErrorData m))',+ which delays GHC picking the actual instance until the use site, so it can pick+ the overlapping one.+-}
+ quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE TemplateHaskell #-}++module Language.LSP.Protocol.QuickCheck.Types where++import Data.Traversable+import Language.Haskell.TH+import Language.LSP.Protocol.Meta+import Language.LSP.Protocol.QuickCheck.Common+import Language.LSP.Protocol.Types+import Test.QuickCheck+import Test.QuickCheck.Arbitrary.Generic++$( let+ sderiving = for structNames $ \sname ->+ let viaT = ConT ''GenericArbitrary `AppT` ConT sname+ arb = ConT ''Arbitrary `AppT` ConT sname+ in pure $ StandaloneDerivD (Just (ViaStrategy viaT)) [] arb+ aderiving = for aliasNames $ \aname ->+ let arb = ConT ''Arbitrary `AppT` ConT aname+ in pure $ StandaloneDerivD (Just NewtypeStrategy) [] arb+ ederiving = for enumNames $ \ename ->+ let viaT = ConT ''AsLspEnum `AppT` ConT ename+ arb = ConT ''Arbitrary `AppT` ConT ename+ in pure $ StandaloneDerivD (Just (ViaStrategy viaT)) [] arb+ in+ mconcat <$> sequence [sderiving, aderiving, ederiving]+ )
src/Data/IxMap.hs view
@@ -1,15 +1,12 @@-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE ViewPatterns #-}-{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-} module Data.IxMap where -import qualified Data.Map.Strict as M-import Data.Some import Data.Kind+import Data.Map.Strict qualified as M+import Data.Some import Unsafe.Coerce -- a `compare` b <=> toBase a `compare` toBase b@@ -18,11 +15,11 @@ type Base f toBase :: forall a. f a -> Base f -newtype IxMap (k :: a -> Type) (f :: a -> Type) = IxMap { getMap :: M.Map (Base k) (Some f) }+newtype IxMap (k :: a -> Type) (f :: a -> Type) = IxMap {getMap :: M.Map (Base k) (Some f)} emptyIxMap :: IxMap k f emptyIxMap = IxMap M.empty- + insertIxMap :: IxOrd k => k m -> f m -> IxMap k f -> Maybe (IxMap k f) insertIxMap (toBase -> i) x (IxMap m) | M.notMember i m = Just $ IxMap $ M.insert i (mkSome x) m@@ -37,5 +34,5 @@ pickFromIxMap :: IxOrd k => k m -> IxMap k f -> (Maybe (f m), IxMap k f) pickFromIxMap i (IxMap m) = case M.updateLookupWithKey (\_ _ -> Nothing) (toBase i) m of- (Nothing,!m') -> (Nothing,IxMap m')- (Just (Some k),!m') -> (Just (unsafeCoerce k),IxMap m')+ (Nothing, !m') -> (Nothing, IxMap m')+ (Just (Some k), !m') -> (Just (unsafeCoerce k), IxMap m')
+ src/Data/Row/Aeson.hs view
@@ -0,0 +1,97 @@+{-# LANGUAGE UndecidableInstances #-}+{-# OPTIONS_GHC -Wno-orphans #-}++{- |+This module defines orphan `aeson` instances for `Data.Row`.+They differ from the instances in `row-types-aeson` in one crucial respect: they+serialise `Nothing` fields by *omitting* them in the resulting object, and parse absent fields as `Nothing`.+`aeson` can be configured to have this behviour for instances for datatypes, but we want to do this+for record types generically.++This is crucial to match what LSP clients expect.+-}+module Data.Row.Aeson where++import Data.Aeson+import Data.Aeson.Types (Parser, typeMismatch)+import Data.List (intercalate)++import Data.Row+import Data.Row.Internal+import Data.Row.Records qualified as Rec++import Data.Bifunctor (second)+import Data.Functor.Const+import Data.Functor.Identity+import Data.Proxy+import Data.String++import Language.LSP.Protocol.Types.Common ((.:!?))++-- `aeson` does not need such a typeclass because it generates code per-instance+-- that handles this, whereas we want to work generically.++{- | Serialise a value as an entry in a JSON object. This allows customizing the+ behaviour in the object context, in order to e.g. omit the field.+-}+class ToJSONEntry a where+ -- We use String so we can use fromString on it to get a key that works+ -- in both aeson-1 and aeson-2+ toJSONEntry :: String -> a -> Object++instance {-# OVERLAPPING #-} ToJSON a => ToJSONEntry (Maybe a) where+ -- Omit Nothing fields+ toJSONEntry _ Nothing = mempty+ toJSONEntry k v = fromString k .= toJSON v++instance {-# OVERLAPPABLE #-} ToJSON a => ToJSONEntry a where+ toJSONEntry k v = fromString k .= toJSON v++class FromJSONEntry a where+ parseJSONEntry :: Object -> String -> Parser a++instance {-# OVERLAPPING #-} FromJSON a => FromJSONEntry (Maybe a) where+ -- Parse Nothing fields as optional, accepting Null to mean "missing"+ parseJSONEntry o k = o .:!? (fromString k)++instance {-# OVERLAPPABLE #-} FromJSON a => FromJSONEntry a where+ parseJSONEntry o k = o .: (fromString k)++------++instance Forall r ToJSONEntry => ToJSON (Rec r) where+ -- Sadly, there appears to be no helper we can use that gives us access to the keys, so I just used metamorph directly+ -- adapted from 'eraseWithLabels'+ toJSON rc = Object $ getConst $ metamorph @_ @r @ToJSONEntry @(,) @Rec @(Const Object) @Identity Proxy doNil doUncons doCons rc+ where+ doNil :: Rec Empty -> Const Object Empty+ doNil _ = Const mempty+ doUncons ::+ forall l r'.+ (KnownSymbol l) =>+ Label l ->+ Rec r' ->+ (Rec (r' .- l), Identity (r' .! l))+ doUncons l = second Identity . lazyUncons l+ doCons ::+ forall l t r'.+ (KnownSymbol l, ToJSONEntry t) =>+ Label l ->+ (Const Object r', Identity t) ->+ Const Object (Extend l t r')+ doCons l (Const c, Identity x) = Const $ toJSONEntry (show' l) x <> c++instance (AllUniqueLabels r, Forall r FromJSONEntry) => FromJSON (Rec r) where+ parseJSON (Object o) = do+ r <- Rec.fromLabelsA @FromJSONEntry $ \l -> do+ x <- parseJSONEntry o (fromString $ show l)+ x `seq` pure x+ r `seq` pure r+ parseJSON v = typeMismatch msg v+ where+ msg = "REC: {" ++ intercalate "," (labels @r @FromJSONEntry) ++ "}"++--- Copied from the library, as it's private++lazyUncons :: KnownSymbol l => Label l -> Rec r -> (Rec (r .- l), r .! l)+lazyUncons l r = (Rec.lazyRemove l r, r .! l)
+ src/Data/Row/Hashable.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE UndecidableInstances #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Data.Row.Hashable where++import Data.Hashable++import Data.Row+import Data.Row.Records qualified as Rec++instance (Forall r Hashable, Forall r Eq) => Hashable (Rec r) where+ hashWithSalt s record = hashWithSalt s (Rec.erase @Hashable (hashWithSalt s) record)
+ src/Language/LSP/Protocol/Capabilities.hs view
@@ -0,0 +1,994 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++module Language.LSP.Protocol.Capabilities (+ LSPVersion (..),++ -- * Client capabilities+ ClientCapability,+ clientCapability,+ fullLatestClientCaps,+ fullClientCapsForVersion,+ fullClientCapsForVersionAndMethod,+ dynamicRegistrationSupported,++ -- * Server capabilities+ ServerCapability,+ serverCapability,+) where++import Control.Lens+import Data.Kind (Type)+import Data.Maybe+import Data.Set qualified as Set+import Data.Void+import Language.LSP.Protocol.Lens qualified as L+import Language.LSP.Protocol.Message+import Language.LSP.Protocol.Types+import Prelude hiding (min)++-- | A specific version of the LSP specification.+data LSPVersion = LSPVersion Int Int++---- CLIENT CAPABILITIES++type ClientCapability :: forall f t. Method f t -> Type++-- See Note [Capability mappings]++{- | The client capability associated with a given method.++Where several methods are provided together (e.g. the three `callHierarchy` methods), we associate all of them+with the capaiblity, even if there is one "primary" method.+-}+type family ClientCapability (m :: Method f t) where+ ClientCapability Method_TextDocumentDeclaration = DeclarationClientCapabilities+ ClientCapability Method_TextDocumentImplementation = ImplementationClientCapabilities+ ClientCapability Method_TextDocumentTypeDefinition = TypeDefinitionClientCapabilities+ ClientCapability Method_TextDocumentHover = HoverClientCapabilities+ ClientCapability Method_TextDocumentSignatureHelp = SignatureHelpClientCapabilities+ ClientCapability Method_TextDocumentDefinition = DefinitionClientCapabilities+ ClientCapability Method_TextDocumentReferences = ReferenceClientCapabilities+ ClientCapability Method_TextDocumentDocumentHighlight = DocumentHighlightClientCapabilities+ ClientCapability Method_TextDocumentDocumentSymbol = DocumentSymbolClientCapabilities+ ClientCapability Method_TextDocumentFoldingRange = FoldingRangeClientCapabilities+ ClientCapability Method_TextDocumentSelectionRange = SelectionRangeClientCapabilities+ ClientCapability Method_WorkspaceExecuteCommand = ExecuteCommandClientCapabilities+ ClientCapability Method_TextDocumentLinkedEditingRange = LinkedEditingRangeClientCapabilities+ ClientCapability Method_TextDocumentMoniker = MonikerClientCapabilities+ ClientCapability Method_WorkspaceWorkspaceFolders = Bool+ ClientCapability Method_TextDocumentCompletion = CompletionClientCapabilities+ ClientCapability Method_CompletionItemResolve = CompletionClientCapabilities+ ClientCapability Method_TextDocumentCodeAction = CodeActionClientCapabilities+ ClientCapability Method_CodeActionResolve = CodeActionClientCapabilities+ ClientCapability Method_TextDocumentCodeLens = CodeLensClientCapabilities+ ClientCapability Method_CodeLensResolve = CodeLensClientCapabilities+ ClientCapability Method_WorkspaceCodeLensRefresh = CodeLensWorkspaceClientCapabilities+ ClientCapability Method_TextDocumentDocumentLink = DocumentLinkClientCapabilities+ ClientCapability Method_DocumentLinkResolve = DocumentLinkClientCapabilities+ ClientCapability Method_WorkspaceSymbol = WorkspaceSymbolClientCapabilities+ ClientCapability Method_WorkspaceSymbolResolve = WorkspaceSymbolClientCapabilities+ ClientCapability Method_TextDocumentRename = RenameClientCapabilities+ ClientCapability Method_TextDocumentPrepareRename = RenameClientCapabilities+ ClientCapability Method_TextDocumentDocumentColor = DocumentColorClientCapabilities+ ClientCapability Method_TextDocumentColorPresentation = DocumentColorClientCapabilities+ ClientCapability Method_TextDocumentFormatting = DocumentFormattingClientCapabilities+ ClientCapability Method_TextDocumentRangeFormatting = DocumentRangeFormattingClientCapabilities+ ClientCapability Method_TextDocumentOnTypeFormatting = DocumentOnTypeFormattingClientCapabilities+ ClientCapability Method_TextDocumentPrepareCallHierarchy = CallHierarchyClientCapabilities+ ClientCapability Method_CallHierarchyIncomingCalls = CallHierarchyClientCapabilities+ ClientCapability Method_CallHierarchyOutgoingCalls = CallHierarchyClientCapabilities+ ClientCapability Method_TextDocumentSemanticTokensFull = SemanticTokensClientCapabilities+ ClientCapability Method_TextDocumentSemanticTokensFullDelta = SemanticTokensClientCapabilities+ ClientCapability Method_TextDocumentSemanticTokensRange = SemanticTokensClientCapabilities+ ClientCapability Method_WorkspaceSemanticTokensRefresh = SemanticTokensWorkspaceClientCapabilities+ ClientCapability Method_TextDocumentPrepareTypeHierarchy = TypeHierarchyClientCapabilities+ ClientCapability Method_TypeHierarchySupertypes = TypeHierarchyClientCapabilities+ ClientCapability Method_TypeHierarchySubtypes = TypeHierarchyClientCapabilities+ ClientCapability Method_TextDocumentInlineValue = InlineValueClientCapabilities+ ClientCapability Method_WorkspaceInlineValueRefresh = InlineValueWorkspaceClientCapabilities+ ClientCapability Method_TextDocumentInlayHint = InlayHintClientCapabilities+ ClientCapability Method_InlayHintResolve = InlayHintClientCapabilities+ ClientCapability Method_WorkspaceInlayHintRefresh = InlayHintWorkspaceClientCapabilities+ ClientCapability Method_TextDocumentDiagnostic = DiagnosticClientCapabilities+ ClientCapability Method_WorkspaceDiagnostic = DiagnosticWorkspaceClientCapabilities+ ClientCapability Method_WorkspaceDiagnosticRefresh = DiagnosticWorkspaceClientCapabilities+ ClientCapability Method_WorkspaceWillCreateFiles = FileOperationClientCapabilities+ ClientCapability Method_WorkspaceWillRenameFiles = FileOperationClientCapabilities+ ClientCapability Method_WorkspaceWillDeleteFiles = FileOperationClientCapabilities+ ClientCapability Method_WorkspaceDidCreateFiles = FileOperationClientCapabilities+ ClientCapability Method_WorkspaceDidRenameFiles = FileOperationClientCapabilities+ ClientCapability Method_WorkspaceDidDeleteFiles = FileOperationClientCapabilities+ ClientCapability Method_TextDocumentDidOpen = TextDocumentSyncClientCapabilities+ ClientCapability Method_TextDocumentDidChange = TextDocumentSyncClientCapabilities+ ClientCapability Method_TextDocumentDidClose = TextDocumentSyncClientCapabilities+ ClientCapability Method_TextDocumentDidSave = TextDocumentSyncClientCapabilities+ ClientCapability Method_TextDocumentWillSave = TextDocumentSyncClientCapabilities+ ClientCapability Method_TextDocumentWillSaveWaitUntil = TextDocumentSyncClientCapabilities+ ClientCapability Method_NotebookDocumentDidOpen = NotebookDocumentSyncClientCapabilities+ ClientCapability Method_NotebookDocumentDidChange = NotebookDocumentSyncClientCapabilities+ ClientCapability Method_NotebookDocumentDidSave = NotebookDocumentSyncClientCapabilities+ ClientCapability Method_NotebookDocumentDidClose = NotebookDocumentSyncClientCapabilities+ ClientCapability Method_WorkspaceDidChangeConfiguration = DidChangeConfigurationClientCapabilities+ ClientCapability Method_WorkspaceDidChangeWatchedFiles = DidChangeWatchedFilesClientCapabilities+ ClientCapability Method_WorkspaceDidChangeWorkspaceFolders = Void+ ClientCapability Method_TextDocumentPublishDiagnostics = PublishDiagnosticsClientCapabilities+ ClientCapability Method_WorkspaceConfiguration = Bool+ ClientCapability Method_WorkspaceApplyEdit = Bool+ ClientCapability Method_WindowWorkDoneProgressCreate = Bool+ ClientCapability Method_WindowWorkDoneProgressCancel = Bool+ ClientCapability Method_WindowShowMessage = ShowMessageRequestClientCapabilities+ ClientCapability Method_WindowShowMessageRequest = ShowMessageRequestClientCapabilities+ ClientCapability Method_WindowShowDocument = ShowDocumentClientCapabilities+ -- All required by default, no capabilities+ ClientCapability Method_Progress = Void+ ClientCapability Method_WindowLogMessage = Void+ ClientCapability Method_ClientRegisterCapability = Void+ ClientCapability Method_ClientUnregisterCapability = Void+ ClientCapability Method_Initialize = Void+ ClientCapability Method_Initialized = Void+ ClientCapability Method_Shutdown = Void+ ClientCapability Method_Exit = Void+ ClientCapability Method_TelemetryEvent = Void+ ClientCapability Method_SetTrace = Void+ ClientCapability Method_LogTrace = Void+ ClientCapability Method_CancelRequest = Void+ ClientCapability (Method_CustomMethod s) = Void++-- See Note [Capability mappings]++-- | A lens which focusses on the (possibly absent) client capability associated with a method.+clientCapability :: forall m. SMethod m -> Lens' ClientCapabilities (Maybe (ClientCapability m))+clientCapability = \case+ SMethod_TextDocumentDeclaration -> td . L.declaration+ SMethod_TextDocumentImplementation -> td . L.implementation+ SMethod_TextDocumentTypeDefinition -> td . L.typeDefinition+ SMethod_TextDocumentHover -> td . L.hover+ SMethod_TextDocumentSignatureHelp -> td . L.signatureHelp+ SMethod_TextDocumentDefinition -> td . L.definition+ SMethod_TextDocumentReferences -> td . L.references+ SMethod_TextDocumentDocumentHighlight -> td . L.documentHighlight+ SMethod_TextDocumentDocumentSymbol -> td . L.documentSymbol+ SMethod_TextDocumentFoldingRange -> td . L.foldingRange+ SMethod_TextDocumentSelectionRange -> td . L.selectionRange+ SMethod_WorkspaceExecuteCommand -> ws . L.executeCommand+ SMethod_TextDocumentMoniker -> td . L.moniker+ SMethod_TextDocumentCompletion -> td . L.completion+ SMethod_CompletionItemResolve -> td . L.completion+ SMethod_TextDocumentCodeAction -> td . L.codeAction+ SMethod_CodeActionResolve -> td . L.codeAction+ SMethod_TextDocumentCodeLens -> td . L.codeLens+ SMethod_CodeLensResolve -> td . L.codeLens+ SMethod_WorkspaceCodeLensRefresh -> ws . L.codeLens+ SMethod_TextDocumentDocumentLink -> td . L.documentLink+ SMethod_DocumentLinkResolve -> td . L.documentLink+ SMethod_TextDocumentDocumentColor -> td . L.colorProvider+ SMethod_TextDocumentColorPresentation -> td . L.colorProvider+ SMethod_WorkspaceSymbol -> ws . L.symbol+ SMethod_WorkspaceSymbolResolve -> ws . L.symbol+ SMethod_TextDocumentFormatting -> td . L.formatting+ SMethod_TextDocumentRangeFormatting -> td . L.rangeFormatting+ SMethod_TextDocumentOnTypeFormatting -> td . L.onTypeFormatting+ SMethod_TextDocumentRename -> td . L.rename+ SMethod_TextDocumentPrepareRename -> td . L.rename+ SMethod_TextDocumentPrepareCallHierarchy -> td . L.callHierarchy+ SMethod_CallHierarchyIncomingCalls -> td . L.callHierarchy+ SMethod_CallHierarchyOutgoingCalls -> td . L.callHierarchy+ SMethod_TextDocumentLinkedEditingRange -> td . L.linkedEditingRange+ SMethod_TextDocumentSemanticTokensFull -> td . L.semanticTokens+ SMethod_TextDocumentSemanticTokensFullDelta -> td . L.semanticTokens+ SMethod_TextDocumentSemanticTokensRange -> td . L.semanticTokens+ SMethod_WorkspaceSemanticTokensRefresh -> ws . L.semanticTokens+ SMethod_TextDocumentPrepareTypeHierarchy -> td . L.typeHierarchy+ SMethod_TypeHierarchySubtypes -> td . L.typeHierarchy+ SMethod_TypeHierarchySupertypes -> td . L.typeHierarchy+ SMethod_TextDocumentInlineValue -> td . L.inlineValue+ SMethod_WorkspaceInlineValueRefresh -> ws . L.inlineValue+ SMethod_TextDocumentInlayHint -> td . L.inlayHint+ SMethod_InlayHintResolve -> td . L.inlayHint+ SMethod_WorkspaceInlayHintRefresh -> ws . L.inlayHint+ SMethod_TextDocumentDiagnostic -> td . L.diagnostic+ SMethod_WorkspaceDiagnostic -> ws . L.diagnostics+ SMethod_WorkspaceDiagnosticRefresh -> ws . L.diagnostics+ SMethod_WorkspaceWorkspaceFolders -> ws . L.workspaceFolders+ SMethod_WorkspaceWillCreateFiles -> ws . L.fileOperations+ SMethod_WorkspaceWillRenameFiles -> ws . L.fileOperations+ SMethod_WorkspaceWillDeleteFiles -> ws . L.fileOperations+ SMethod_WorkspaceDidCreateFiles -> ws . L.fileOperations+ SMethod_WorkspaceDidRenameFiles -> ws . L.fileOperations+ SMethod_WorkspaceDidDeleteFiles -> ws . L.fileOperations+ SMethod_TextDocumentDidOpen -> td . L.synchronization+ SMethod_TextDocumentDidChange -> td . L.synchronization+ SMethod_TextDocumentDidClose -> td . L.synchronization+ SMethod_TextDocumentDidSave -> td . L.synchronization+ SMethod_TextDocumentWillSave -> td . L.synchronization+ SMethod_TextDocumentWillSaveWaitUntil -> td . L.synchronization+ SMethod_NotebookDocumentDidOpen -> nbs+ SMethod_NotebookDocumentDidChange -> nbs+ SMethod_NotebookDocumentDidSave -> nbs+ SMethod_NotebookDocumentDidClose -> nbs+ SMethod_WorkspaceDidChangeConfiguration -> ws . L.didChangeConfiguration+ SMethod_WorkspaceDidChangeWatchedFiles -> ws . L.didChangeWatchedFiles+ SMethod_TextDocumentPublishDiagnostics -> td . L.publishDiagnostics+ SMethod_WorkspaceConfiguration -> ws . L.configuration+ SMethod_WindowWorkDoneProgressCreate -> wd . L.workDoneProgress+ SMethod_WindowWorkDoneProgressCancel -> wd . L.workDoneProgress+ SMethod_WorkspaceApplyEdit -> ws . L.applyEdit+ SMethod_WindowShowDocument -> wd . L.showDocument+ SMethod_WindowShowMessageRequest -> wd . L.showMessage+ SMethod_WindowShowMessage -> wd . L.showMessage+ SMethod_WorkspaceDidChangeWorkspaceFolders -> noCap+ SMethod_Progress -> noCap+ SMethod_WindowLogMessage -> noCap+ SMethod_ClientRegisterCapability -> noCap+ SMethod_ClientUnregisterCapability -> noCap+ SMethod_Initialize -> noCap+ SMethod_Initialized -> noCap+ SMethod_Shutdown -> noCap+ SMethod_Exit -> noCap+ SMethod_TelemetryEvent -> noCap+ SMethod_SetTrace -> noCap+ SMethod_LogTrace -> noCap+ SMethod_CancelRequest -> noCap+ (SMethod_CustomMethod _s) -> noCap+ where+ ws :: Lens' ClientCapabilities WorkspaceClientCapabilities+ ws = L.workspace . non emptyWorkspaceClientCaps+ wd :: Lens' ClientCapabilities WindowClientCapabilities+ wd = L.window . non emptyWindowClientCaps+ td :: Lens' ClientCapabilities TextDocumentClientCapabilities+ td = L.textDocument . non emptyTextDocumentClientCaps+ -- This is messed up because, unlike literally everything else, `NotebookDocumentClientCapabilities.synchronization` is+ -- a mandatory field, so if we don't have it we need to unset the parent `notebookDocument` field. Maybe.+ nbs :: Lens' ClientCapabilities (Maybe NotebookDocumentSyncClientCapabilities)+ nbs = lens g s+ where+ g c = c ^. L.notebookDocument . non emptyNotebookDocumentClientCaps . L.synchronization . to Just+ s c Nothing = c & L.notebookDocument .~ Nothing+ s c (Just v) = c & L.notebookDocument . non emptyNotebookDocumentClientCaps . L.synchronization .~ v++-- TODO: can we do this generically somehow?++{- | Whether the client supports dynamic registration for the given method.++Note that here we only consider the "main" method against which you dynamically register, so+even though e.g. we associate the client capabilities for code lenses with `codeLens/resolve`,+we don't ever say that you can dynamically register `codeLens/resolve`, because you in fact+need to register `textDocument/codeLens`.+-}+dynamicRegistrationSupported :: SMethod m -> ClientCapabilities -> Bool+dynamicRegistrationSupported m caps = fromMaybe False $ case m of+ SMethod_WorkspaceDidChangeConfiguration -> caps ^? dyn m+ SMethod_WorkspaceDidChangeWatchedFiles -> caps ^? dyn m+ SMethod_WorkspaceSymbol -> caps ^? dyn m+ SMethod_WorkspaceExecuteCommand -> caps ^? dyn m+ SMethod_WorkspaceWillCreateFiles -> caps ^? dyn m+ SMethod_WorkspaceDidCreateFiles -> caps ^? dyn m+ SMethod_WorkspaceWillDeleteFiles -> caps ^? dyn m+ SMethod_WorkspaceDidDeleteFiles -> caps ^? dyn m+ SMethod_TextDocumentDidOpen -> caps ^? dyn m+ SMethod_TextDocumentDidChange -> caps ^? dyn m+ SMethod_TextDocumentDidClose -> caps ^? dyn m+ SMethod_TextDocumentCompletion -> caps ^? dyn m+ SMethod_TextDocumentHover -> caps ^? dyn m+ SMethod_TextDocumentSignatureHelp -> caps ^? dyn m+ SMethod_TextDocumentDeclaration -> caps ^? dyn m+ SMethod_TextDocumentDefinition -> caps ^? dyn m+ SMethod_TextDocumentTypeDefinition -> caps ^? dyn m+ SMethod_TextDocumentImplementation -> caps ^? dyn m+ SMethod_TextDocumentReferences -> caps ^? dyn m+ SMethod_TextDocumentDocumentHighlight -> caps ^? dyn m+ SMethod_TextDocumentDocumentSymbol -> caps ^? dyn m+ SMethod_TextDocumentCodeAction -> caps ^? dyn m+ SMethod_TextDocumentCodeLens -> caps ^? dyn m+ SMethod_TextDocumentDocumentLink -> caps ^? dyn m+ SMethod_TextDocumentDocumentColor -> caps ^? dyn m+ SMethod_TextDocumentColorPresentation -> caps ^? dyn m+ SMethod_TextDocumentFormatting -> caps ^? dyn m+ SMethod_TextDocumentRangeFormatting -> caps ^? dyn m+ SMethod_TextDocumentOnTypeFormatting -> caps ^? dyn m+ SMethod_TextDocumentRename -> caps ^? dyn m+ SMethod_TextDocumentFoldingRange -> caps ^? dyn m+ SMethod_TextDocumentSelectionRange -> caps ^? dyn m+ SMethod_TextDocumentLinkedEditingRange -> caps ^? dyn m+ SMethod_TextDocumentPrepareCallHierarchy -> caps ^? dyn m+ SMethod_TextDocumentInlayHint -> caps ^? dyn m+ SMethod_TextDocumentInlineValue -> caps ^? dyn m+ SMethod_TextDocumentMoniker -> caps ^? dyn m+ SMethod_TextDocumentPrepareTypeHierarchy -> caps ^? dyn m+ SMethod_TextDocumentDiagnostic -> caps ^? dyn m+ -- semantic tokens is messed up due to it having you register with an otherwise non-existent method+ -- SMethod_TextDocumentSemanticTokens -> capDyn $ clientCaps ^? L.textDocument . _Just . L.semanticTokens . _Just+ -- Notebook document methods alway support dynamic registration, it seems?+ _ -> Just False+ where+ dyn :: L.HasDynamicRegistration (ClientCapability m) (Maybe Bool) => SMethod m -> Traversal' ClientCapabilities Bool+ dyn m1 = clientCapability m1 . _Just . L.dynamicRegistration . _Just++-- | Client capabilities for full support of the current LSP specification.+fullLatestClientCaps :: ClientCapabilities+fullLatestClientCaps = fullClientCapsForVersion (LSPVersion maxBound maxBound)++{-+TODO: the "since" conditions are out-of-date/needs an audit+TODO: can we generate this? process the 'since' annotations in the metamodel?+-}++-- | Client capabilities for full support of the LSP specification up until a version.+fullClientCapsForVersion :: LSPVersion -> ClientCapabilities+fullClientCapsForVersion v@(LSPVersion maj min) = caps+ where+ methCaps :: SMethod m -> Maybe (ClientCapability m)+ methCaps = fullClientCapsForVersionAndMethod v++ caps =+ ClientCapabilities+ { _workspace = Just workspace+ , _textDocument = Just td+ , _window = Just window+ , _general = since 3 16 general+ , _notebookDocument = NotebookDocumentClientCapabilities <$> methCaps SMethod_NotebookDocumentDidOpen+ , _experimental = Nothing+ }++ window =+ WindowClientCapabilities+ { _workDoneProgress = methCaps SMethod_WindowWorkDoneProgressCreate+ , _showMessage = methCaps SMethod_WindowShowMessageRequest+ , _showDocument = methCaps SMethod_WindowShowDocument+ }++ general =+ GeneralClientCapabilities+ { _staleRequestSupport = since 3 16 (StaleRequestSupportOptions{_cancel = True, _retryOnContentModified = []})+ , _regularExpressions = since 3 16 $ RegularExpressionsClientCapabilities (RegularExpressionEngineKind "") Nothing+ , _markdown = since 3 16 $ MarkdownClientCapabilities "" Nothing (Just [])+ , _positionEncodings = since 3 17 [PositionEncodingKind_UTF16]+ }++ workspace =+ WorkspaceClientCapabilities+ { _applyEdit = methCaps SMethod_WorkspaceApplyEdit+ , _workspaceEdit =+ Just+ ( WorkspaceEditClientCapabilities+ (Just True)+ (since 3 13 [ResourceOperationKind_Create, ResourceOperationKind_Delete, ResourceOperationKind_Rename])+ Nothing+ (since 3 16 True)+ (since 3 16 (ChangeAnnotationsSupportOptions{_groupsOnLabel = Just True}))+ )+ , _didChangeConfiguration = methCaps SMethod_WorkspaceDidChangeConfiguration+ , _didChangeWatchedFiles = methCaps SMethod_WorkspaceDidChangeWatchedFiles+ , _symbol = methCaps SMethod_WorkspaceSymbol+ , _executeCommand = methCaps SMethod_WorkspaceExecuteCommand+ , _codeLens = methCaps SMethod_WorkspaceCodeLensRefresh+ , _workspaceFolders = methCaps SMethod_WorkspaceWorkspaceFolders+ , _configuration = methCaps SMethod_WorkspaceConfiguration+ , _semanticTokens = methCaps SMethod_WorkspaceSemanticTokensRefresh+ , _inlayHint = methCaps SMethod_WorkspaceInlayHintRefresh+ , _fileOperations = methCaps SMethod_WorkspaceDidCreateFiles+ , _inlineValue = methCaps SMethod_WorkspaceInlineValueRefresh+ , _diagnostics = methCaps SMethod_WorkspaceDiagnostic+ }++ td =+ TextDocumentClientCapabilities+ { _synchronization = methCaps SMethod_TextDocumentDidOpen+ , _completion = methCaps SMethod_TextDocumentCompletion+ , _hover = methCaps SMethod_TextDocumentHover+ , _signatureHelp = methCaps SMethod_TextDocumentSignatureHelp+ , _references = methCaps SMethod_TextDocumentReferences+ , _documentHighlight = methCaps SMethod_TextDocumentDocumentHighlight+ , _documentSymbol = methCaps SMethod_TextDocumentDocumentSymbol+ , _formatting = methCaps SMethod_TextDocumentFormatting+ , _rangeFormatting = methCaps SMethod_TextDocumentRangeFormatting+ , _onTypeFormatting = methCaps SMethod_TextDocumentOnTypeFormatting+ , _declaration = methCaps SMethod_TextDocumentDeclaration+ , _definition = methCaps SMethod_TextDocumentDefinition+ , _typeDefinition = methCaps SMethod_TextDocumentTypeDefinition+ , _implementation = methCaps SMethod_TextDocumentImplementation+ , _codeAction = methCaps SMethod_TextDocumentCodeAction+ , _codeLens = methCaps SMethod_TextDocumentCodeLens+ , _documentLink = methCaps SMethod_TextDocumentDocumentLink+ , _colorProvider = methCaps SMethod_TextDocumentDocumentColor+ , _rename = methCaps SMethod_TextDocumentRename+ , _publishDiagnostics = methCaps SMethod_TextDocumentPublishDiagnostics+ , _foldingRange = methCaps SMethod_TextDocumentFoldingRange+ , _selectionRange = methCaps SMethod_TextDocumentSelectionRange+ , _callHierarchy = methCaps SMethod_TextDocumentPrepareCallHierarchy+ , _semanticTokens = methCaps SMethod_TextDocumentSemanticTokensFull+ , _linkedEditingRange = methCaps SMethod_TextDocumentLinkedEditingRange+ , _moniker = methCaps SMethod_TextDocumentMoniker+ , _inlayHint = methCaps SMethod_TextDocumentInlayHint+ , _typeHierarchy = methCaps SMethod_TextDocumentPrepareTypeHierarchy+ , _inlineValue = methCaps SMethod_TextDocumentInlineValue+ , _diagnostic = methCaps SMethod_TextDocumentDiagnostic+ }++ since :: Int -> Int -> a -> Maybe a+ since x y a+ | maj >= x && min >= y = Just a+ | otherwise = Nothing++-- TODO: make this only include the caps that are necessary for that specific method. That will require+-- some code to merge capabilities...++-- | Client capabilities for full support of a specific method in the LSP specification up until a version.+fullClientCapsForVersionAndMethod :: LSPVersion -> SMethod m -> Maybe (ClientCapability m)+fullClientCapsForVersionAndMethod (LSPVersion maj min) = \case+ SMethod_TextDocumentDeclaration -> declaration+ SMethod_TextDocumentImplementation -> implementation+ SMethod_TextDocumentTypeDefinition -> typeDefinition+ SMethod_TextDocumentHover -> hover+ SMethod_TextDocumentSignatureHelp -> signatureHelp+ SMethod_TextDocumentDefinition -> definition+ SMethod_TextDocumentReferences -> references+ SMethod_TextDocumentDocumentHighlight -> documentHighlight+ SMethod_TextDocumentDocumentSymbol -> documentSymbol+ SMethod_TextDocumentFoldingRange -> foldingRange+ SMethod_TextDocumentSelectionRange -> selectionRange+ SMethod_WorkspaceExecuteCommand -> executeCommand+ SMethod_TextDocumentMoniker -> moniker+ SMethod_TextDocumentCompletion -> completion+ SMethod_CompletionItemResolve -> completion+ SMethod_TextDocumentCodeAction -> codeAction+ SMethod_CodeActionResolve -> codeAction+ SMethod_TextDocumentCodeLens -> codeLens+ SMethod_CodeLensResolve -> codeLens+ SMethod_WorkspaceCodeLensRefresh -> wsCodeLens+ SMethod_TextDocumentDocumentLink -> documentLink+ SMethod_DocumentLinkResolve -> documentLink+ SMethod_TextDocumentDocumentColor -> colorProvider+ SMethod_TextDocumentColorPresentation -> colorProvider+ SMethod_WorkspaceSymbol -> wsSymbol+ SMethod_WorkspaceSymbolResolve -> wsSymbol+ SMethod_TextDocumentFormatting -> formatting+ SMethod_TextDocumentRangeFormatting -> rangeFormatting+ SMethod_TextDocumentOnTypeFormatting -> onTypeFormatting+ SMethod_TextDocumentRename -> rename+ SMethod_TextDocumentPrepareRename -> rename+ SMethod_TextDocumentPrepareCallHierarchy -> callHierarchy+ SMethod_CallHierarchyIncomingCalls -> callHierarchy+ SMethod_CallHierarchyOutgoingCalls -> callHierarchy+ SMethod_TextDocumentLinkedEditingRange -> linkedEditingRange+ SMethod_TextDocumentSemanticTokensFull -> semanticTokens+ SMethod_TextDocumentSemanticTokensFullDelta -> semanticTokens+ SMethod_TextDocumentSemanticTokensRange -> semanticTokens+ SMethod_WorkspaceSemanticTokensRefresh -> wsSemanticTokens+ SMethod_TextDocumentPrepareTypeHierarchy -> typeHierarchy+ SMethod_TypeHierarchySubtypes -> typeHierarchy+ SMethod_TypeHierarchySupertypes -> typeHierarchy+ SMethod_TextDocumentInlineValue -> inlineValue+ SMethod_WorkspaceInlineValueRefresh -> wsInlineValue+ SMethod_TextDocumentInlayHint -> inlayHint+ SMethod_InlayHintResolve -> inlayHint+ SMethod_WorkspaceInlayHintRefresh -> wsInlayHint+ SMethod_TextDocumentDiagnostic -> diagnostic+ SMethod_WorkspaceDiagnostic -> diagnostics+ SMethod_WorkspaceDiagnosticRefresh -> diagnostics+ SMethod_WorkspaceWorkspaceFolders -> workspaceFolders+ SMethod_WorkspaceWillCreateFiles -> fileOperations+ SMethod_WorkspaceWillRenameFiles -> fileOperations+ SMethod_WorkspaceWillDeleteFiles -> fileOperations+ SMethod_WorkspaceDidCreateFiles -> fileOperations+ SMethod_WorkspaceDidRenameFiles -> fileOperations+ SMethod_WorkspaceDidDeleteFiles -> fileOperations+ SMethod_TextDocumentDidOpen -> synchronization+ SMethod_TextDocumentDidChange -> synchronization+ SMethod_TextDocumentDidClose -> synchronization+ SMethod_TextDocumentDidSave -> synchronization+ SMethod_TextDocumentWillSave -> synchronization+ SMethod_TextDocumentWillSaveWaitUntil -> synchronization+ SMethod_NotebookDocumentDidOpen -> notebookDocumentSync+ SMethod_NotebookDocumentDidChange -> notebookDocumentSync+ SMethod_NotebookDocumentDidSave -> notebookDocumentSync+ SMethod_NotebookDocumentDidClose -> notebookDocumentSync+ SMethod_WorkspaceDidChangeConfiguration -> didChangeConfiguration+ SMethod_WorkspaceDidChangeWatchedFiles -> didChangeWatchedFiles+ SMethod_TextDocumentPublishDiagnostics -> publishDiagnostics+ SMethod_WorkspaceConfiguration -> configuration+ SMethod_WindowWorkDoneProgressCreate -> workDoneProgress+ SMethod_WindowWorkDoneProgressCancel -> workDoneProgress+ SMethod_WorkspaceApplyEdit -> applyEdit+ SMethod_WindowShowDocument -> showDocument+ SMethod_WindowShowMessageRequest -> showMessage+ SMethod_WindowShowMessage -> showMessage+ SMethod_WorkspaceDidChangeWorkspaceFolders -> Nothing+ SMethod_Progress -> Nothing+ SMethod_WindowLogMessage -> Nothing+ SMethod_ClientRegisterCapability -> Nothing+ SMethod_ClientUnregisterCapability -> Nothing+ SMethod_Initialize -> Nothing+ SMethod_Initialized -> Nothing+ SMethod_Shutdown -> Nothing+ SMethod_Exit -> Nothing+ SMethod_TelemetryEvent -> Nothing+ SMethod_SetTrace -> Nothing+ SMethod_LogTrace -> Nothing+ SMethod_CancelRequest -> Nothing+ (SMethod_CustomMethod _s) -> Nothing+ where+ workDoneProgress = since 3 15 True+ showMessage = since 3 16 $ ShowMessageRequestClientCapabilities Nothing+ showDocument = since 3 16 $ ShowDocumentClientCapabilities True+ applyEdit = Just True+ didChangeConfiguration = Just (DidChangeConfigurationClientCapabilities dynamicReg)+ didChangeWatchedFiles = Just (DidChangeWatchedFilesClientCapabilities dynamicReg (Just True))+ wsSymbol =+ Just $+ WorkspaceSymbolClientCapabilities+ dynamicReg+ (since 3 4 (ClientSymbolKindOptions{_valueSet = Just sKs}))+ (since 3 16 (ClientSymbolTagOptions{_valueSet = [SymbolTag_Deprecated]}))+ (since 3 17 (ClientSymbolResolveOptions{_properties = []}))+ executeCommand = Just (ExecuteCommandClientCapabilities dynamicReg)+ wsCodeLens = Just (CodeLensWorkspaceClientCapabilities $ Just True)+ workspaceFolders = since 3 6 True+ configuration = since 3 6 True+ wsSemanticTokens = since 3 16 (SemanticTokensWorkspaceClientCapabilities $ Just True)+ wsInlayHint = since 3 17 (InlayHintWorkspaceClientCapabilities $ Just True)+ fileOperations =+ since 3 16 $+ FileOperationClientCapabilities+ dynamicReg+ (Just True)+ (Just True)+ (Just True)+ (Just True)+ (Just True)+ (Just True)+ wsInlineValue = since 3 17 (InlineValueWorkspaceClientCapabilities $ Just True)+ diagnostics = since 3 17 (DiagnosticWorkspaceClientCapabilities $ Just True)++ notebookDocumentSync = since 3 17 $ NotebookDocumentSyncClientCapabilities dynamicReg (Just True)++ synchronization =+ Just $+ TextDocumentSyncClientCapabilities{_dynamicRegistration = dynamicReg, _willSave = Just True, _willSaveWaitUntil = Just True, _didSave = Just True}+ completion =+ Just $+ CompletionClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _completionItem = Just completionItemCapabilities+ , _completionItemKind = since 3 4 (ClientCompletionItemOptionsKind{_valueSet = Just ciKs})+ , _insertTextMode = since 3 17 InsertTextMode_AsIs+ , _contextSupport = since 3 3 True+ , _completionList = since 3 17 (CompletionListCapabilities{_itemDefaults = Just []})+ }+ hover =+ Just $+ HoverClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _contentFormat = since 3 3 allMarkups+ }+ signatureHelp =+ Just $+ SignatureHelpClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _signatureInformation =+ Just $+ ClientSignatureInformationOptions+ { _documentationFormat = Just allMarkups+ , _parameterInformation = Just (ClientSignatureParameterInformationOptions{_labelOffsetSupport = Just True})+ , _activeParameterSupport = Just True+ }+ , _contextSupport = since 3 16 True+ }+ references = Just $ ReferenceClientCapabilities dynamicReg+ documentHighlight = Just $ DocumentHighlightClientCapabilities dynamicReg+ documentSymbol =+ Just $+ DocumentSymbolClientCapabilities+ { _dynamicRegistration = dynamicReg+ , -- same as workspace symbol kinds+ _symbolKind = Just (ClientSymbolKindOptions{_valueSet = Just sKs})+ , _hierarchicalDocumentSymbolSupport = since 3 10 True+ , _tagSupport = since 3 16 (ClientSymbolTagOptions{_valueSet = [SymbolTag_Deprecated]})+ , _labelSupport = since 3 16 True+ }+ formatting = Just $ DocumentFormattingClientCapabilities dynamicReg+ rangeFormatting = Just $ DocumentRangeFormattingClientCapabilities dynamicReg+ onTypeFormatting = Just $ DocumentOnTypeFormattingClientCapabilities dynamicReg+ declaration = since 3 14 (DeclarationClientCapabilities dynamicReg (Just True))+ definition = Just (DefinitionClientCapabilities dynamicReg (since 3 14 True))+ typeDefinition = since 3 6 (TypeDefinitionClientCapabilities dynamicReg (since 3 14 True))+ implementation = since 3 6 (ImplementationClientCapabilities dynamicReg (since 3 14 True))+ codeAction =+ Just $+ CodeActionClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _codeActionLiteralSupport = since 3 8 (ClientCodeActionLiteralOptions{_codeActionKind = ClientCodeActionKindOptions{_valueSet = Set.toList knownValues}})+ , _isPreferredSupport = since 3 15 True+ , _disabledSupport = since 3 16 True+ , _dataSupport = since 3 16 True+ , _resolveSupport = since 3 16 (ClientCodeActionResolveOptions{_properties = []})+ , _honorsChangeAnnotations = since 3 16 True+ }+ codeLens = Just (CodeLensClientCapabilities dynamicReg)+ documentLink = Just (DocumentLinkClientCapabilities dynamicReg (since 3 15 True))+ colorProvider = since 3 6 (DocumentColorClientCapabilities dynamicReg)+ rename = Just (RenameClientCapabilities dynamicReg (since 3 12 True) (since 3 16 PrepareSupportDefaultBehavior_Identifier) (since 3 16 True))+ publishDiagnostics =+ Just+ PublishDiagnosticsClientCapabilities+ { _relatedInformation = since 3 7 True+ , _tagSupport = since 3 15 (ClientDiagnosticsTagOptions{_valueSet = [DiagnosticTag_Unnecessary, DiagnosticTag_Deprecated]})+ , _versionSupport = since 3 15 True+ , _codeDescriptionSupport = since 3 16 True+ , _dataSupport = since 3 16 True+ }+ foldingRange =+ since 3 10 $+ FoldingRangeClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _rangeLimit = Nothing+ , _lineFoldingOnly = Nothing+ , _foldingRangeKind = since 3 17 (ClientFoldingRangeKindOptions{_valueSet = Just []})+ , _foldingRange = since 3 16 (ClientFoldingRangeOptions{_collapsedText = Just True})+ }+ selectionRange = since 3 5 (SelectionRangeClientCapabilities dynamicReg)+ callHierarchy = since 3 16 (CallHierarchyClientCapabilities dynamicReg)+ semanticTokens =+ since 3 16 $+ SemanticTokensClientCapabilities+ { _dynamicRegistration = Just True+ , _requests = ClientSemanticTokensRequestOptions{_range = Just (InL True), _full = Just (InR (ClientSemanticTokensRequestFullDelta{_delta = Just True}))}+ , _tokenTypes = toEnumBaseType <$> Set.toList (knownValues @SemanticTokenTypes)+ , _tokenModifiers = toEnumBaseType <$> Set.toList (knownValues @SemanticTokenModifiers)+ , _formats = tfs+ , _overlappingTokenSupport = Just True+ , _multilineTokenSupport = Just True+ , _serverCancelSupport = Just True+ , _augmentsSyntaxTokens = Just True+ }+ linkedEditingRange = since 3 16 (LinkedEditingRangeClientCapabilities dynamicReg)+ moniker = since 3 16 (MonikerClientCapabilities dynamicReg)+ inlayHint =+ since 3 17 $+ InlayHintClientCapabilities+ { _dynamicRegistration = dynamicReg+ , _resolveSupport = Just (ClientInlayHintResolveOptions{_properties = []})+ }+ typeHierarchy = since 3 17 (TypeHierarchyClientCapabilities dynamicReg)+ inlineValue = since 3 17 (InlineValueClientCapabilities dynamicReg)+ diagnostic = since 3 17 (DiagnosticClientCapabilities dynamicReg (Just True))++ completionItemCapabilities =+ ClientCompletionItemOptions+ { _snippetSupport = Just True+ , _commitCharactersSupport = Just True+ , _documentationFormat = since 3 3 allMarkups+ , _deprecatedSupport = Just True+ , _preselectSupport = since 3 9 True+ , _tagSupport = since 3 15 (CompletionItemTagOptions{_valueSet = []})+ , _insertReplaceSupport = since 3 16 True+ , _resolveSupport = since 3 16 (ClientCompletionItemResolveOptions{_properties = ["documentation", "details"]})+ , _insertTextModeSupport = since 3 16 (ClientCompletionItemInsertTextModeOptions{_valueSet = []})+ , _labelDetailsSupport = since 3 17 True+ }++ sKs+ | maj >= 3 && min >= 4 = oldSKs ++ newSKs+ | otherwise = oldSKs++ oldSKs =+ [ SymbolKind_File+ , SymbolKind_Module+ , SymbolKind_Namespace+ , SymbolKind_Package+ , SymbolKind_Class+ , SymbolKind_Method+ , SymbolKind_Property+ , SymbolKind_Field+ , SymbolKind_Constructor+ , SymbolKind_Enum+ , SymbolKind_Interface+ , SymbolKind_Function+ , SymbolKind_Variable+ , SymbolKind_Constant+ , SymbolKind_String+ , SymbolKind_Number+ , SymbolKind_Boolean+ , SymbolKind_Array+ ]++ newSKs =+ [ SymbolKind_Object+ , SymbolKind_Key+ , SymbolKind_Null+ , SymbolKind_EnumMember+ , SymbolKind_Struct+ , SymbolKind_Event+ , SymbolKind_Operator+ , SymbolKind_TypeParameter+ ]++ ciKs+ | maj >= 3 && min >= 4 = oldCiKs ++ newCiKs+ | otherwise = oldCiKs++ oldCiKs =+ [ CompletionItemKind_Text+ , CompletionItemKind_Method+ , CompletionItemKind_Function+ , CompletionItemKind_Constructor+ , CompletionItemKind_Field+ , CompletionItemKind_Variable+ , CompletionItemKind_Class+ , CompletionItemKind_Interface+ , CompletionItemKind_Module+ , CompletionItemKind_Property+ , CompletionItemKind_Unit+ , CompletionItemKind_Value+ , CompletionItemKind_Enum+ , CompletionItemKind_Keyword+ , CompletionItemKind_Snippet+ , CompletionItemKind_Color+ , CompletionItemKind_File+ , CompletionItemKind_Reference+ ]++ newCiKs =+ [ CompletionItemKind_Folder+ , CompletionItemKind_EnumMember+ , CompletionItemKind_Constant+ , CompletionItemKind_Struct+ , CompletionItemKind_Event+ , CompletionItemKind_Operator+ , CompletionItemKind_TypeParameter+ ]++ allMarkups = [MarkupKind_PlainText, MarkupKind_Markdown]++ tfs = [TokenFormat_Relative]++ dynamicReg+ | maj >= 3 = Just True+ | otherwise = Nothing+ since :: Int -> Int -> a -> Maybe a+ since x y a+ | maj >= x && min >= y = Just a+ | otherwise = Nothing++---- SERVER CAPABILITIES++type DocumentSyncCaps = TextDocumentSyncOptions |? TextDocumentSyncKind+type NotebookDocumentSyncCaps = NotebookDocumentSyncOptions |? NotebookDocumentSyncRegistrationOptions++type ServerCapability :: forall f t. Method f t -> Type++-- See Note [Capability mappings]++{- | The server capability associated with a given method.++Where several methods are provided together (e.g. the three `callHierarchy` methods), we associate all of them+with the capaiblity, even if there is one "primary" method.++For methods which strictly only need a client capability but which are closely related to a server capability+(e.g. `codeLens/refresh`), we also associate them with that server capability.+-}+type family ServerCapability (m :: Method f t) where+ ServerCapability Method_TextDocumentDeclaration = Bool |? (DeclarationOptions |? DeclarationRegistrationOptions)+ ServerCapability Method_TextDocumentImplementation = Bool |? (ImplementationOptions |? ImplementationRegistrationOptions)+ ServerCapability Method_TextDocumentTypeDefinition = Bool |? (TypeDefinitionOptions |? TypeDefinitionRegistrationOptions)+ ServerCapability Method_TextDocumentHover = Bool |? HoverOptions+ ServerCapability Method_TextDocumentSignatureHelp = SignatureHelpOptions+ ServerCapability Method_TextDocumentDefinition = Bool |? DefinitionOptions+ ServerCapability Method_TextDocumentReferences = Bool |? ReferenceOptions+ ServerCapability Method_TextDocumentDocumentHighlight = Bool |? DocumentHighlightOptions+ ServerCapability Method_TextDocumentDocumentSymbol = Bool |? DocumentSymbolOptions+ ServerCapability Method_TextDocumentFoldingRange = Bool |? (FoldingRangeOptions |? FoldingRangeRegistrationOptions)+ ServerCapability Method_TextDocumentSelectionRange = Bool |? (SelectionRangeOptions |? SelectionRangeRegistrationOptions)+ ServerCapability Method_WorkspaceExecuteCommand = ExecuteCommandOptions+ ServerCapability Method_TextDocumentLinkedEditingRange = Bool |? (LinkedEditingRangeOptions |? LinkedEditingRangeRegistrationOptions)+ ServerCapability Method_TextDocumentMoniker = Bool |? (MonikerOptions |? MonikerRegistrationOptions)+ ServerCapability Method_WorkspaceWorkspaceFolders = WorkspaceFoldersServerCapabilities+ ServerCapability Method_TextDocumentCompletion = CompletionOptions+ ServerCapability Method_CompletionItemResolve = CompletionOptions+ ServerCapability Method_TextDocumentCodeAction = Bool |? CodeActionOptions+ ServerCapability Method_CodeActionResolve = Bool |? CodeActionOptions+ ServerCapability Method_TextDocumentCodeLens = CodeLensOptions+ ServerCapability Method_CodeLensResolve = CodeLensOptions+ ServerCapability Method_WorkspaceCodeLensRefresh = CodeLensOptions+ ServerCapability Method_TextDocumentDocumentLink = DocumentLinkOptions+ ServerCapability Method_DocumentLinkResolve = DocumentLinkOptions+ ServerCapability Method_WorkspaceSymbol = Bool |? WorkspaceSymbolOptions+ ServerCapability Method_WorkspaceSymbolResolve = Bool |? WorkspaceSymbolOptions+ ServerCapability Method_TextDocumentRename = Bool |? RenameOptions+ ServerCapability Method_TextDocumentPrepareRename = Bool |? RenameOptions+ ServerCapability Method_TextDocumentDocumentColor = Bool |? (DocumentColorOptions |? DocumentColorRegistrationOptions)+ ServerCapability Method_TextDocumentColorPresentation = Bool |? (DocumentColorOptions |? DocumentColorRegistrationOptions)+ ServerCapability Method_TextDocumentFormatting = Bool |? DocumentFormattingOptions+ ServerCapability Method_TextDocumentRangeFormatting = Bool |? DocumentRangeFormattingOptions+ ServerCapability Method_TextDocumentOnTypeFormatting = DocumentOnTypeFormattingOptions+ ServerCapability Method_TextDocumentPrepareCallHierarchy = Bool |? (CallHierarchyOptions |? CallHierarchyRegistrationOptions)+ ServerCapability Method_CallHierarchyIncomingCalls = Bool |? (CallHierarchyOptions |? CallHierarchyRegistrationOptions)+ ServerCapability Method_CallHierarchyOutgoingCalls = Bool |? (CallHierarchyOptions |? CallHierarchyRegistrationOptions)+ ServerCapability Method_TextDocumentSemanticTokensFull = SemanticTokensOptions |? SemanticTokensRegistrationOptions+ ServerCapability Method_TextDocumentSemanticTokensFullDelta = SemanticTokensOptions |? SemanticTokensRegistrationOptions+ ServerCapability Method_TextDocumentSemanticTokensRange = SemanticTokensOptions |? SemanticTokensRegistrationOptions+ ServerCapability Method_WorkspaceSemanticTokensRefresh = SemanticTokensOptions |? SemanticTokensRegistrationOptions+ ServerCapability Method_TextDocumentPrepareTypeHierarchy = Bool |? (TypeHierarchyOptions |? TypeHierarchyRegistrationOptions)+ ServerCapability Method_TypeHierarchySupertypes = Bool |? (TypeHierarchyOptions |? TypeHierarchyRegistrationOptions)+ ServerCapability Method_TypeHierarchySubtypes = Bool |? (TypeHierarchyOptions |? TypeHierarchyRegistrationOptions)+ ServerCapability Method_TextDocumentInlineValue = Bool |? (InlineValueOptions |? InlineValueRegistrationOptions)+ ServerCapability Method_WorkspaceInlineValueRefresh = Bool |? (InlineValueOptions |? InlineValueRegistrationOptions)+ ServerCapability Method_TextDocumentInlayHint = Bool |? (InlayHintOptions |? InlayHintRegistrationOptions)+ ServerCapability Method_InlayHintResolve = Bool |? (InlayHintOptions |? InlayHintRegistrationOptions)+ ServerCapability Method_WorkspaceInlayHintRefresh = Bool |? (InlayHintOptions |? InlayHintRegistrationOptions)+ ServerCapability Method_TextDocumentDiagnostic = DiagnosticOptions |? DiagnosticRegistrationOptions+ ServerCapability Method_WorkspaceDiagnostic = DiagnosticOptions |? DiagnosticRegistrationOptions+ ServerCapability Method_WorkspaceDiagnosticRefresh = DiagnosticOptions |? DiagnosticRegistrationOptions+ ServerCapability Method_WorkspaceWillCreateFiles = FileOperationOptions+ ServerCapability Method_WorkspaceWillRenameFiles = FileOperationOptions+ ServerCapability Method_WorkspaceWillDeleteFiles = FileOperationOptions+ ServerCapability Method_WorkspaceDidCreateFiles = FileOperationOptions+ ServerCapability Method_WorkspaceDidRenameFiles = FileOperationOptions+ ServerCapability Method_WorkspaceDidDeleteFiles = FileOperationOptions+ ServerCapability Method_TextDocumentDidOpen = DocumentSyncCaps+ ServerCapability Method_TextDocumentDidChange = DocumentSyncCaps+ ServerCapability Method_TextDocumentDidClose = DocumentSyncCaps+ ServerCapability Method_TextDocumentDidSave = DocumentSyncCaps+ ServerCapability Method_TextDocumentWillSave = DocumentSyncCaps+ ServerCapability Method_TextDocumentWillSaveWaitUntil = DocumentSyncCaps+ ServerCapability Method_NotebookDocumentDidOpen = NotebookDocumentSyncCaps+ ServerCapability Method_NotebookDocumentDidChange = NotebookDocumentSyncCaps+ ServerCapability Method_NotebookDocumentDidSave = NotebookDocumentSyncCaps+ ServerCapability Method_NotebookDocumentDidClose = NotebookDocumentSyncCaps+ -- Dynamic registration only+ ServerCapability Method_WorkspaceDidChangeConfiguration = Void+ ServerCapability Method_WorkspaceDidChangeWatchedFiles = Void+ ServerCapability Method_WorkspaceDidChangeWorkspaceFolders = Void+ -- Client capability only+ ServerCapability Method_TextDocumentPublishDiagnostics = Void+ ServerCapability Method_WorkspaceConfiguration = Void+ -- All required by default, no capabilities+ ServerCapability Method_WindowWorkDoneProgressCreate = Void+ ServerCapability Method_WindowWorkDoneProgressCancel = Void+ ServerCapability Method_Progress = Void+ ServerCapability Method_WindowShowDocument = Void+ ServerCapability Method_WindowShowMessageRequest = Void+ ServerCapability Method_WindowShowMessage = Void+ ServerCapability Method_WindowLogMessage = Void+ ServerCapability Method_ClientRegisterCapability = Void+ ServerCapability Method_ClientUnregisterCapability = Void+ ServerCapability Method_Initialize = Void+ ServerCapability Method_Initialized = Void+ ServerCapability Method_Shutdown = Void+ ServerCapability Method_Exit = Void+ ServerCapability Method_WorkspaceApplyEdit = Void+ ServerCapability Method_TelemetryEvent = Void+ ServerCapability Method_SetTrace = Void+ ServerCapability Method_LogTrace = Void+ ServerCapability Method_CancelRequest = Void+ ServerCapability (Method_CustomMethod s) = Void++-- See Note [Capability mappings]++-- | A lens which focusses on the (possibly absent) server capability associated with a method.+serverCapability :: forall m. SMethod m -> Lens' ServerCapabilities (Maybe (ServerCapability m))+serverCapability = \case+ SMethod_TextDocumentDeclaration -> L.declarationProvider+ SMethod_TextDocumentImplementation -> L.implementationProvider+ SMethod_TextDocumentTypeDefinition -> L.typeDefinitionProvider+ SMethod_TextDocumentHover -> L.hoverProvider+ SMethod_TextDocumentSignatureHelp -> L.signatureHelpProvider+ SMethod_TextDocumentDefinition -> L.definitionProvider+ SMethod_TextDocumentReferences -> L.referencesProvider+ SMethod_TextDocumentDocumentHighlight -> L.documentHighlightProvider+ SMethod_TextDocumentDocumentSymbol -> L.documentSymbolProvider+ SMethod_TextDocumentFoldingRange -> L.foldingRangeProvider+ SMethod_TextDocumentSelectionRange -> L.selectionRangeProvider+ SMethod_WorkspaceExecuteCommand -> L.executeCommandProvider+ SMethod_TextDocumentMoniker -> L.monikerProvider+ SMethod_TextDocumentCompletion -> L.completionProvider+ SMethod_CompletionItemResolve -> L.completionProvider+ SMethod_TextDocumentCodeAction -> L.codeActionProvider+ SMethod_CodeActionResolve -> L.codeActionProvider+ SMethod_TextDocumentCodeLens -> L.codeLensProvider+ SMethod_CodeLensResolve -> L.codeLensProvider+ SMethod_WorkspaceCodeLensRefresh -> L.codeLensProvider+ SMethod_TextDocumentDocumentLink -> L.documentLinkProvider+ SMethod_DocumentLinkResolve -> L.documentLinkProvider+ SMethod_TextDocumentDocumentColor -> L.colorProvider+ SMethod_TextDocumentColorPresentation -> L.colorProvider+ SMethod_WorkspaceSymbol -> L.workspaceSymbolProvider+ SMethod_WorkspaceSymbolResolve -> L.workspaceSymbolProvider+ SMethod_TextDocumentFormatting -> L.documentFormattingProvider+ SMethod_TextDocumentRangeFormatting -> L.documentRangeFormattingProvider+ SMethod_TextDocumentOnTypeFormatting -> L.documentOnTypeFormattingProvider+ SMethod_TextDocumentRename -> L.renameProvider+ SMethod_TextDocumentPrepareRename -> L.renameProvider+ SMethod_TextDocumentPrepareCallHierarchy -> L.callHierarchyProvider+ SMethod_CallHierarchyIncomingCalls -> L.callHierarchyProvider+ SMethod_CallHierarchyOutgoingCalls -> L.callHierarchyProvider+ SMethod_TextDocumentLinkedEditingRange -> L.linkedEditingRangeProvider+ SMethod_TextDocumentSemanticTokensFull -> L.semanticTokensProvider+ SMethod_TextDocumentSemanticTokensFullDelta -> L.semanticTokensProvider+ SMethod_TextDocumentSemanticTokensRange -> L.semanticTokensProvider+ SMethod_WorkspaceSemanticTokensRefresh -> L.semanticTokensProvider+ SMethod_TextDocumentPrepareTypeHierarchy -> L.typeHierarchyProvider+ SMethod_TypeHierarchySubtypes -> L.typeHierarchyProvider+ SMethod_TypeHierarchySupertypes -> L.typeHierarchyProvider+ SMethod_TextDocumentInlineValue -> L.inlineValueProvider+ SMethod_WorkspaceInlineValueRefresh -> L.inlineValueProvider+ SMethod_TextDocumentInlayHint -> L.inlayHintProvider+ SMethod_InlayHintResolve -> L.inlayHintProvider+ SMethod_WorkspaceInlayHintRefresh -> L.inlayHintProvider+ SMethod_TextDocumentDiagnostic -> L.diagnosticProvider+ SMethod_WorkspaceDiagnostic -> L.diagnosticProvider+ SMethod_WorkspaceDiagnosticRefresh -> L.diagnosticProvider+ SMethod_WorkspaceWorkspaceFolders -> L.workspace . non emptyWorkspaceServerCaps . L.workspaceFolders+ SMethod_WorkspaceWillCreateFiles -> fileOps+ SMethod_WorkspaceWillRenameFiles -> fileOps+ SMethod_WorkspaceWillDeleteFiles -> fileOps+ SMethod_WorkspaceDidCreateFiles -> fileOps+ SMethod_WorkspaceDidRenameFiles -> fileOps+ SMethod_WorkspaceDidDeleteFiles -> fileOps+ SMethod_TextDocumentDidOpen -> documentSync+ SMethod_TextDocumentDidChange -> documentSync+ SMethod_TextDocumentDidClose -> documentSync+ SMethod_TextDocumentDidSave -> documentSync+ SMethod_TextDocumentWillSave -> documentSync+ SMethod_TextDocumentWillSaveWaitUntil -> documentSync+ SMethod_NotebookDocumentDidOpen -> notebookDocumentSync+ SMethod_NotebookDocumentDidChange -> notebookDocumentSync+ SMethod_NotebookDocumentDidSave -> notebookDocumentSync+ SMethod_NotebookDocumentDidClose -> notebookDocumentSync+ SMethod_WorkspaceDidChangeConfiguration -> noCap+ SMethod_WorkspaceDidChangeWatchedFiles -> noCap+ SMethod_WorkspaceDidChangeWorkspaceFolders -> noCap+ SMethod_TextDocumentPublishDiagnostics -> noCap+ SMethod_WorkspaceConfiguration -> noCap+ SMethod_WindowWorkDoneProgressCreate -> noCap+ SMethod_WindowWorkDoneProgressCancel -> noCap+ SMethod_Progress -> noCap+ SMethod_WindowShowDocument -> noCap+ SMethod_WindowShowMessageRequest -> noCap+ SMethod_WindowShowMessage -> noCap+ SMethod_WindowLogMessage -> noCap+ SMethod_ClientRegisterCapability -> noCap+ SMethod_ClientUnregisterCapability -> noCap+ SMethod_Initialize -> noCap+ SMethod_Initialized -> noCap+ SMethod_Shutdown -> noCap+ SMethod_Exit -> noCap+ SMethod_WorkspaceApplyEdit -> noCap+ SMethod_TelemetryEvent -> noCap+ SMethod_SetTrace -> noCap+ SMethod_LogTrace -> noCap+ SMethod_CancelRequest -> noCap+ (SMethod_CustomMethod _s) -> noCap+ where+ fileOps :: Lens' ServerCapabilities (Maybe FileOperationOptions)+ fileOps = L.workspace . non emptyWorkspaceServerCaps . L.fileOperations+ documentSync :: Lens' ServerCapabilities (Maybe DocumentSyncCaps)+ documentSync = L.textDocumentSync+ notebookDocumentSync :: Lens' ServerCapabilities (Maybe NotebookDocumentSyncCaps)+ notebookDocumentSync = L.notebookDocumentSync++noCap :: Lens' a (Maybe Void)+noCap = lens g s+ where+ g _ = Nothing+ s a Nothing = a+ s _ (Just v) = absurd v++-- TODO: this is silly+emptyWorkspaceClientCaps :: WorkspaceClientCapabilities+emptyWorkspaceClientCaps = WorkspaceClientCapabilities Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing+emptyWindowClientCaps :: WindowClientCapabilities+emptyWindowClientCaps = WindowClientCapabilities Nothing Nothing Nothing+emptyTextDocumentClientCaps :: TextDocumentClientCapabilities+emptyTextDocumentClientCaps = TextDocumentClientCapabilities Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing+emptyNotebookDocumentClientCaps :: NotebookDocumentClientCapabilities+emptyNotebookDocumentClientCaps = NotebookDocumentClientCapabilities (NotebookDocumentSyncClientCapabilities Nothing Nothing)++emptyWorkspaceServerCaps :: WorkspaceOptions+emptyWorkspaceServerCaps = WorkspaceOptions Nothing Nothing++{- Note [Capability mappings]+Sadly these are all manually defined as we don't have the information in the metamodel to do them automatically.+-}
+ src/Language/LSP/Protocol/Lens.hs view
@@ -0,0 +1,8 @@+module Language.LSP.Protocol.Lens (+ -- * Generated lens classes+ module TypesLens,+ module MessageLens,+) where++import Language.LSP.Protocol.Message.Lens as MessageLens+import Language.LSP.Protocol.Types.Lens as TypesLens
+ src/Language/LSP/Protocol/Message.hs view
@@ -0,0 +1,30 @@+module Language.LSP.Protocol.Message (+ -- * Messages++ -- ** LSP protocol message types and metadata+ module Message,+ module LspId,+ module Meta,++ -- ** Parsing LSP messages+ module Parsing,++ -- * Methods++ -- ** Main LSP method types and functions+ module Generated,++ -- ** Helpers for working with methods+ module Method,++ -- * LSP registrations+ module Registration,+) where++import Language.LSP.Protocol.Internal.Method as Generated+import Language.LSP.Protocol.Message.LspId as LspId+import Language.LSP.Protocol.Message.Meta as Meta+import Language.LSP.Protocol.Message.Method as Method+import Language.LSP.Protocol.Message.Parsing as Parsing+import Language.LSP.Protocol.Message.Registration as Registration+import Language.LSP.Protocol.Message.Types as Message
+ src/Language/LSP/Protocol/Message/Lens.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Message.Lens where++import Control.Lens.TH+import Language.LSP.Protocol.Message.Registration+import Language.LSP.Protocol.Message.Types+import Language.LSP.Protocol.Types.Lens++makeFieldsNoPrefix ''TRegistration+makeFieldsNoPrefix ''TUnregistration+makeFieldsNoPrefix ''RequestMessage+makeFieldsNoPrefix ''ResponseMessage+makeFieldsNoPrefix ''NotificationMessage+makeFieldsNoPrefix ''ResponseError+makeFieldsNoPrefix ''TRequestMessage+makeFieldsNoPrefix ''TResponseMessage+makeFieldsNoPrefix ''TNotificationMessage+makeFieldsNoPrefix ''TResponseError
+ src/Language/LSP/Protocol/Message/LspId.hs view
@@ -0,0 +1,57 @@+{-# LANGUAGE DataKinds #-}++module Language.LSP.Protocol.Message.LspId where++import Data.Aeson qualified as A+import Data.Hashable+import Data.IxMap+import Data.Text (Text)+import GHC.Generics+import Prettyprinter++import Language.LSP.Protocol.Internal.Method+import Language.LSP.Protocol.Message.Meta+import Language.LSP.Protocol.Types.Common+import Language.LSP.Protocol.Utils.Misc++-- | Id used for a request, Can be either a String or an Int+data LspId (m :: Method f Request) = IdInt !Int32 | IdString !Text+ deriving stock (Show, Read, Eq, Ord, Generic)++instance A.ToJSON (LspId m) where+ toJSON (IdInt i) = A.toJSON i+ toJSON (IdString s) = A.toJSON s++instance A.FromJSON (LspId m) where+ parseJSON v@(A.Number _) = IdInt <$> A.parseJSON v+ parseJSON (A.String s) = return (IdString s)+ parseJSON _ = fail "LspId"++deriving via ViaJSON (LspId m) instance Pretty (LspId m)++instance IxOrd LspId where+ type Base LspId = SomeLspId+ toBase = SomeLspId++instance Hashable (LspId m) where+ hashWithSalt n (IdInt i) = hashWithSalt n i+ hashWithSalt n (IdString t) = hashWithSalt n t++data SomeLspId where+ SomeLspId :: !(LspId m) -> SomeLspId++deriving stock instance Show SomeLspId+instance Eq SomeLspId where+ SomeLspId (IdInt a) == SomeLspId (IdInt b) = a == b+ SomeLspId (IdString a) == SomeLspId (IdString b) = a == b+ _ == _ = False+instance Ord SomeLspId where+ compare (SomeLspId x) (SomeLspId y) = go x y+ where+ go (IdInt a) (IdInt b) = a `compare` b+ go (IdString a) (IdString b) = a `compare` b+ go (IdInt _) (IdString _) = LT+ go (IdString _) (IdInt _) = GT++instance Hashable SomeLspId where+ hashWithSalt n (SomeLspId lspId) = hashWithSalt n lspId
+ src/Language/LSP/Protocol/Message/Meta.hs view
@@ -0,0 +1,19 @@+module Language.LSP.Protocol.Message.Meta where++-- | Which direction messages are sent in.+data MessageDirection = ServerToClient | ClientToServer++-- | What kind of message is sent.+data MessageKind = Notification | Request++-- | Singleton type for 'MessageDirection'.+data SMessageDirection (f :: MessageDirection) where+ SClientToServer :: SMessageDirection ClientToServer+ SServerToClient :: SMessageDirection ServerToClient+ SBothDirections :: SMessageDirection f++-- | Singleton type for 'MessageKind'.+data SMessageKind (f :: MessageKind) where+ SNotification :: SMessageKind Notification+ SRequest :: SMessageKind Request+ SBothTypes :: SMessageKind f
+ src/Language/LSP/Protocol/Message/Method.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE MagicHash #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE UndecidableSuperClasses #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Message.Method where++import Data.Aeson.Types+import Data.Function (on)+import Data.GADT.Compare+import Data.List (isPrefixOf)+import Data.Proxy+import Data.Type.Equality+import GHC.Exts (Int (..), dataToTag#)+import GHC.TypeLits (+ KnownSymbol,+ sameSymbol,+ symbolVal,+ )+import Language.LSP.Protocol.Internal.Method+import Language.LSP.Protocol.Message.Meta+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import Unsafe.Coerce++---------------+-- SomeMethod+---------------++-- | Is this an "optional" method which servers and clients are allowed to ignore?+isOptionalMethod :: SomeMethod -> Bool+-- See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#dollarRequests+isOptionalMethod m = "$/" `isPrefixOf` someMethodToMethodString m++deriving stock instance Show SomeMethod+instance Eq SomeMethod where+ (==) = (==) `on` someMethodToMethodString+instance Ord SomeMethod where+ compare = compare `on` someMethodToMethodString++instance ToJSON SomeMethod where+ toJSON sm = toJSON $ someMethodToMethodString sm++instance FromJSON SomeMethod where+ parseJSON v = do+ s <- parseJSON v+ pure $ methodStringToSomeMethod s++deriving via ViaJSON SomeMethod instance Pretty SomeMethod++---------------+-- SMethod+---------------++-- This instance is written manually rather than derived to avoid a dependency+-- on 'dependent-sum-template'.+instance GEq SMethod where+ geq x y = case gcompare x y of+ GLT -> Nothing+ GEQ -> Just Refl+ GGT -> Nothing++-- This instance is written manually rather than derived to avoid a dependency+-- on 'dependent-sum-template'.+instance GCompare SMethod where+ gcompare (SMethod_CustomMethod x) (SMethod_CustomMethod y) = case symbolVal x `compare` symbolVal y of+ LT -> GLT+ EQ -> unsafeCoerce GEQ+ GT -> GGT+ -- This is much more compact than matching on every pair of constructors, which+ -- is what we would need to do for GHC to 'see' that this is correct. Nonetheless+ -- it is safe: since there is only one constructor of 'SMethod' for each 'Method',+ -- the argument types can only be equal if the constructor tag is equal.+ gcompare x y = case I# (dataToTag# x) `compare` I# (dataToTag# y) of+ LT -> GLT+ EQ -> unsafeCoerce GEQ+ GT -> GGT++instance Eq (SMethod m) where+ -- This defers to 'GEq', ensuring that this version is compatible.+ (==) = defaultEq++instance Ord (SMethod m) where+ -- This defers to 'GCompare', ensuring that this version is compatible.+ compare = defaultCompare++deriving stock instance Show (SMethod m)++instance ToJSON (SMethod m) where+ toJSON m = toJSON (SomeMethod m)++instance KnownSymbol s => FromJSON (SMethod ('Method_CustomMethod s :: Method f t)) where+ parseJSON v = do+ sm <- parseJSON v+ case sm of+ SomeMethod (SMethod_CustomMethod x) -> case sameSymbol x (Proxy :: Proxy s) of+ Just Refl -> pure $ SMethod_CustomMethod x+ Nothing -> mempty+ _ -> mempty++-- TODO: generate these with everything else?+-- Generates lots of instances like this in terms of the FromJSON SomeMethod instance+-- instance FromJSON (SMethod Method_X)+makeSingletonFromJSON 'SomeMethod ''SMethod ['SMethod_CustomMethod]++deriving via ViaJSON (SMethod m) instance Pretty (SMethod m)++---------------+-- Extras+---------------++-- Some useful type synonyms+type SClientMethod (m :: Method ClientToServer t) = SMethod m+type SServerMethod (m :: Method ServerToClient t) = SMethod m++data SomeClientMethod = forall t (m :: Method ClientToServer t). SomeClientMethod (SMethod m)+deriving stock instance Show SomeClientMethod++data SomeServerMethod = forall t (m :: Method ServerToClient t). SomeServerMethod (SMethod m)+deriving stock instance Show SomeServerMethod++someClientMethod :: SMethod m -> Maybe SomeClientMethod+someClientMethod s = case messageDirection s of+ SClientToServer -> Just $ SomeClientMethod s+ SServerToClient -> Nothing+ -- See Note [Parsing methods that go both ways]+ SBothDirections -> Just $ SomeClientMethod $ unsafeCoerce s++someServerMethod :: SMethod m -> Maybe SomeServerMethod+someServerMethod s = case messageDirection s of+ SServerToClient -> Just $ SomeServerMethod s+ SClientToServer -> Nothing+ -- See Note [Parsing methods that go both ways]+ SBothDirections -> Just $ SomeServerMethod $ unsafeCoerce s++instance FromJSON SomeClientMethod where+ parseJSON v = do+ (SomeMethod sm) <- parseJSON v+ case someClientMethod sm of+ Just scm -> pure scm+ Nothing -> mempty++instance ToJSON SomeClientMethod where+ toJSON (SomeClientMethod sm) = toJSON $ someMethodToMethodString $ SomeMethod sm++deriving via ViaJSON SomeClientMethod instance Pretty SomeClientMethod++instance FromJSON SomeServerMethod where+ parseJSON v = do+ (SomeMethod sm) <- parseJSON v+ case someServerMethod sm of+ Just scm -> pure scm+ Nothing -> mempty++instance ToJSON SomeServerMethod where+ toJSON (SomeServerMethod sm) = toJSON $ someMethodToMethodString $ SomeMethod sm++deriving via ViaJSON SomeServerMethod instance Pretty SomeServerMethod++{- Note [Parsing methods that go both ways]++In order to parse a method as a client or server method, we use 'messageDirection'+to get a proof that the message direction is what we say it is. But this just doesn't+work for the both directions case: because we are awkwardly representing "both directions"+as "the type variable is free". So the types don't line up and we use an awful hack.++A better solution might be to move away from using an unconstrained type parameter to+mean "both directions".+-}
+ src/Language/LSP/Protocol/Message/Parsing.hs view
@@ -0,0 +1,375 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE LambdaCase #-}++module Language.LSP.Protocol.Message.Parsing where++import Language.LSP.Protocol.Internal.Method+import Language.LSP.Protocol.Message.LspId+import Language.LSP.Protocol.Message.Meta+import Language.LSP.Protocol.Message.Method+import Language.LSP.Protocol.Message.Types++import Data.Aeson+import Data.Aeson.Types+import Data.Function (on)+import Data.GADT.Compare+import Data.Kind+import Data.Proxy+import Data.Type.Equality+import GHC.TypeLits (sameSymbol)++-- ---------------------------------------------------------------------+-- Working with arbitrary messages+-- ---------------------------------------------------------------------++data FromServerMessage' a where+ FromServerMess :: forall t (m :: Method ServerToClient t) a. SMethod m -> TMessage m -> FromServerMessage' a+ FromServerRsp :: forall (m :: Method ClientToServer Request) a. a m -> TResponseMessage m -> FromServerMessage' a++type FromServerMessage = FromServerMessage' SMethod++instance Eq FromServerMessage where+ (==) = (==) `on` toJSON+instance Show FromServerMessage where+ show = show . toJSON++instance ToJSON FromServerMessage where+ toJSON (FromServerMess m p) = serverMethodJSON m (toJSON p)+ toJSON (FromServerRsp m p) = clientResponseJSON m (toJSON p)++fromServerNot ::+ forall (m :: Method ServerToClient Notification).+ TMessage m ~ TNotificationMessage m =>+ TNotificationMessage m ->+ FromServerMessage+fromServerNot m@TNotificationMessage{_method = meth} = FromServerMess meth m++fromServerReq ::+ forall (m :: Method ServerToClient Request).+ TMessage m ~ TRequestMessage m =>+ TRequestMessage m ->+ FromServerMessage+fromServerReq m@TRequestMessage{_method = meth} = FromServerMess meth m++data FromClientMessage' a where+ FromClientMess :: forall t (m :: Method ClientToServer t) a. SMethod m -> TMessage m -> FromClientMessage' a+ FromClientRsp :: forall (m :: Method ServerToClient Request) a. a m -> TResponseMessage m -> FromClientMessage' a++type FromClientMessage = FromClientMessage' SMethod++instance ToJSON FromClientMessage where+ toJSON (FromClientMess m p) = clientMethodJSON m (toJSON p)+ toJSON (FromClientRsp m p) = serverResponseJSON m (toJSON p)++fromClientNot ::+ forall (m :: Method ClientToServer Notification).+ TMessage m ~ TNotificationMessage m =>+ TNotificationMessage m ->+ FromClientMessage+fromClientNot m@TNotificationMessage{_method = meth} = FromClientMess meth m++fromClientReq ::+ forall (m :: Method ClientToServer Request).+ TMessage m ~ TRequestMessage m =>+ TRequestMessage m ->+ FromClientMessage+fromClientReq m@TRequestMessage{_method = meth} = FromClientMess meth m++-- ---------------------------------------------------------------------+-- Parsing+-- ---------------------------------------------------------------------++type LookupFunc f a = forall (m :: Method f Request). LspId m -> Maybe (SMethod m, a m)++{-+Message Types we must handle are the following++Request | jsonrpc | id | method | params?+Response | jsonrpc | id | | | response? | error?+Notification | jsonrpc | | method | params?+-}++{-# INLINE parseServerMessage #-}+parseServerMessage :: LookupFunc ClientToServer a -> Value -> Parser (FromServerMessage' a)+parseServerMessage lookupId v@(Object o) = do+ methMaybe <- o .:! "method"+ idMaybe <- o .:! "id"+ case methMaybe of+ -- Request or Notification+ Just (SomeServerMethod m) ->+ case splitServerMethod m of+ IsServerNot -> FromServerMess m <$> parseJSON v+ IsServerReq -> FromServerMess m <$> parseJSON v+ IsServerEither | SMethod_CustomMethod (p :: Proxy s') <- m -> do+ case idMaybe of+ -- Request+ Just _ ->+ let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ServerToClient Request))+ in FromServerMess m' <$> parseJSON v+ Nothing ->+ let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ServerToClient Notification))+ in FromServerMess m' <$> parseJSON v+ Nothing -> do+ case idMaybe of+ Just i -> do+ case lookupId i of+ Just (m, res) -> clientResponseJSON m $ FromServerRsp res <$> parseJSON v+ Nothing -> fail $ unwords ["Failed in looking up response type of", show v]+ Nothing -> fail $ unwords ["Got unexpected message without method or id"]+parseServerMessage _ v = fail $ unwords ["parseServerMessage expected object, got:", show v]++{-# INLINE parseClientMessage #-}+parseClientMessage :: LookupFunc ServerToClient a -> Value -> Parser (FromClientMessage' a)+parseClientMessage lookupId v@(Object o) = do+ methMaybe <- o .:! "method"+ idMaybe <- o .:! "id"+ case methMaybe of+ -- Request or Notification+ Just (SomeClientMethod m) ->+ case splitClientMethod m of+ IsClientNot -> FromClientMess m <$> parseJSON v+ IsClientReq -> FromClientMess m <$> parseJSON v+ IsClientEither | SMethod_CustomMethod (p :: Proxy s') <- m -> do+ case idMaybe of+ -- Request+ Just _ ->+ let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ClientToServer Request))+ in FromClientMess m' <$> parseJSON v+ Nothing ->+ let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ClientToServer Notification))+ in FromClientMess m' <$> parseJSON v+ Nothing -> do+ case idMaybe of+ Just i -> do+ case lookupId i of+ Just (m, res) -> serverResponseJSON m $ FromClientRsp res <$> parseJSON v+ Nothing -> fail $ unwords ["Failed in looking up response type of", show v]+ Nothing -> fail $ unwords ["Got unexpected message without method or id"]+parseClientMessage _ v = fail $ unwords ["parseClientMessage expected object, got:", show v]++-- ---------------------------------------------------------------------+-- Helper Utilities+-- ---------------------------------------------------------------------++{-# INLINE clientResponseJSON #-}+clientResponseJSON :: SClientMethod m -> (HasJSON (TResponseMessage m) => x) -> x+clientResponseJSON m x = case splitClientMethod m of+ IsClientReq -> x+ IsClientEither -> x++{-# INLINE serverResponseJSON #-}+serverResponseJSON :: SServerMethod m -> (HasJSON (TResponseMessage m) => x) -> x+serverResponseJSON m x = case splitServerMethod m of+ IsServerReq -> x+ IsServerEither -> x++{-# INLINE clientMethodJSON #-}+clientMethodJSON :: SClientMethod m -> (ToJSON (TClientMessage m) => x) -> x+clientMethodJSON m x =+ case splitClientMethod m of+ IsClientNot -> x+ IsClientReq -> x+ IsClientEither -> x++{-# INLINE serverMethodJSON #-}+serverMethodJSON :: SServerMethod m -> (ToJSON (TServerMessage m) => x) -> x+serverMethodJSON m x =+ case splitServerMethod m of+ IsServerNot -> x+ IsServerReq -> x+ IsServerEither -> x++type HasJSON a = (ToJSON a, FromJSON a, Eq a)++-- Reify universal properties about Client/Server Messages++type ClientNotOrReq :: forall t. Method ClientToServer t -> Type+data ClientNotOrReq m where+ IsClientNot ::+ ( HasJSON (TClientMessage m)+ , TMessage m ~ TNotificationMessage m+ ) =>+ ClientNotOrReq (m :: Method ClientToServer Notification)+ IsClientReq ::+ forall (m :: Method ClientToServer Request).+ ( HasJSON (TClientMessage m)+ , HasJSON (TResponseMessage m)+ , TMessage m ~ TRequestMessage m+ ) =>+ ClientNotOrReq m+ IsClientEither ::+ ClientNotOrReq (Method_CustomMethod s)++type ServerNotOrReq :: forall t. Method ServerToClient t -> Type+data ServerNotOrReq m where+ IsServerNot ::+ ( HasJSON (TServerMessage m)+ , TMessage m ~ TNotificationMessage m+ ) =>+ ServerNotOrReq (m :: Method ServerToClient Notification)+ IsServerReq ::+ forall (m :: Method ServerToClient Request).+ ( HasJSON (TServerMessage m)+ , HasJSON (TResponseMessage m)+ , TMessage m ~ TRequestMessage m+ ) =>+ ServerNotOrReq m+ IsServerEither ::+ ServerNotOrReq (Method_CustomMethod s)++{-# INLINE splitClientMethod #-}+splitClientMethod :: SClientMethod m -> ClientNotOrReq m+splitClientMethod = \case+ SMethod_Initialize -> IsClientReq+ SMethod_Initialized -> IsClientNot+ SMethod_Shutdown -> IsClientReq+ SMethod_Exit -> IsClientNot+ SMethod_WorkspaceDidChangeWorkspaceFolders -> IsClientNot+ SMethod_WorkspaceDidChangeConfiguration -> IsClientNot+ SMethod_WorkspaceDidChangeWatchedFiles -> IsClientNot+ SMethod_WorkspaceSymbol -> IsClientReq+ SMethod_WorkspaceExecuteCommand -> IsClientReq+ SMethod_WindowWorkDoneProgressCancel -> IsClientNot+ SMethod_TextDocumentDidOpen -> IsClientNot+ SMethod_TextDocumentDidChange -> IsClientNot+ SMethod_TextDocumentWillSave -> IsClientNot+ SMethod_TextDocumentWillSaveWaitUntil -> IsClientReq+ SMethod_TextDocumentDidSave -> IsClientNot+ SMethod_TextDocumentDidClose -> IsClientNot+ SMethod_TextDocumentCompletion -> IsClientReq+ SMethod_TextDocumentHover -> IsClientReq+ SMethod_TextDocumentSignatureHelp -> IsClientReq+ SMethod_TextDocumentDeclaration -> IsClientReq+ SMethod_TextDocumentDefinition -> IsClientReq+ SMethod_TextDocumentTypeDefinition -> IsClientReq+ SMethod_TextDocumentImplementation -> IsClientReq+ SMethod_TextDocumentReferences -> IsClientReq+ SMethod_TextDocumentDocumentHighlight -> IsClientReq+ SMethod_TextDocumentDocumentSymbol -> IsClientReq+ SMethod_TextDocumentCodeAction -> IsClientReq+ SMethod_TextDocumentCodeLens -> IsClientReq+ SMethod_TextDocumentDocumentLink -> IsClientReq+ SMethod_TextDocumentDocumentColor -> IsClientReq+ SMethod_TextDocumentColorPresentation -> IsClientReq+ SMethod_TextDocumentFormatting -> IsClientReq+ SMethod_TextDocumentRangeFormatting -> IsClientReq+ SMethod_TextDocumentOnTypeFormatting -> IsClientReq+ SMethod_TextDocumentRename -> IsClientReq+ SMethod_TextDocumentPrepareRename -> IsClientReq+ SMethod_TextDocumentFoldingRange -> IsClientReq+ SMethod_TextDocumentSelectionRange -> IsClientReq+ SMethod_TextDocumentPrepareCallHierarchy -> IsClientReq+ SMethod_TextDocumentLinkedEditingRange -> IsClientReq+ SMethod_CallHierarchyIncomingCalls -> IsClientReq+ SMethod_CallHierarchyOutgoingCalls -> IsClientReq+ SMethod_TextDocumentSemanticTokensFull -> IsClientReq+ SMethod_TextDocumentSemanticTokensFullDelta -> IsClientReq+ SMethod_TextDocumentSemanticTokensRange -> IsClientReq+ SMethod_WorkspaceWillCreateFiles -> IsClientReq+ SMethod_WorkspaceWillDeleteFiles -> IsClientReq+ SMethod_WorkspaceWillRenameFiles -> IsClientReq+ SMethod_WorkspaceDidCreateFiles -> IsClientNot+ SMethod_WorkspaceDidDeleteFiles -> IsClientNot+ SMethod_WorkspaceDidRenameFiles -> IsClientNot+ SMethod_TextDocumentMoniker -> IsClientReq+ SMethod_TextDocumentPrepareTypeHierarchy -> IsClientReq+ SMethod_TypeHierarchySubtypes -> IsClientReq+ SMethod_TypeHierarchySupertypes -> IsClientReq+ SMethod_TextDocumentInlineValue -> IsClientReq+ SMethod_TextDocumentInlayHint -> IsClientReq+ SMethod_TextDocumentDiagnostic -> IsClientReq+ SMethod_WorkspaceDiagnostic -> IsClientReq+ SMethod_CodeLensResolve -> IsClientReq+ SMethod_InlayHintResolve -> IsClientReq+ SMethod_CodeActionResolve -> IsClientReq+ SMethod_DocumentLinkResolve -> IsClientReq+ SMethod_CompletionItemResolve -> IsClientReq+ SMethod_WorkspaceSymbolResolve -> IsClientReq+ SMethod_NotebookDocumentDidChange -> IsClientNot+ SMethod_NotebookDocumentDidClose -> IsClientNot+ SMethod_NotebookDocumentDidOpen -> IsClientNot+ SMethod_NotebookDocumentDidSave -> IsClientNot+ SMethod_SetTrace -> IsClientNot+ SMethod_Progress -> IsClientNot+ SMethod_CancelRequest -> IsClientNot+ (SMethod_CustomMethod _) -> IsClientEither++{-# INLINE splitServerMethod #-}+splitServerMethod :: SServerMethod m -> ServerNotOrReq m+splitServerMethod = \case+ SMethod_WindowShowMessage -> IsServerNot+ SMethod_WindowShowMessageRequest -> IsServerReq+ SMethod_WindowShowDocument -> IsServerReq+ SMethod_WindowLogMessage -> IsServerNot+ SMethod_WindowWorkDoneProgressCreate -> IsServerReq+ SMethod_Progress -> IsServerNot+ SMethod_TelemetryEvent -> IsServerNot+ SMethod_ClientRegisterCapability -> IsServerReq+ SMethod_ClientUnregisterCapability -> IsServerReq+ SMethod_WorkspaceWorkspaceFolders -> IsServerReq+ SMethod_WorkspaceConfiguration -> IsServerReq+ SMethod_WorkspaceApplyEdit -> IsServerReq+ SMethod_TextDocumentPublishDiagnostics -> IsServerNot+ SMethod_LogTrace -> IsServerNot+ SMethod_CancelRequest -> IsServerNot+ SMethod_WorkspaceCodeLensRefresh -> IsServerReq+ SMethod_WorkspaceSemanticTokensRefresh -> IsServerReq+ SMethod_WorkspaceInlineValueRefresh -> IsServerReq+ SMethod_WorkspaceInlayHintRefresh -> IsServerReq+ SMethod_WorkspaceDiagnosticRefresh -> IsServerReq+ (SMethod_CustomMethod _) -> IsServerEither++-- | Given a witness that two custom methods are of the same type, produce a witness that the methods are the same+data CustomEq m1 m2 where+ CustomEq ::+ (m1 ~ (Method_CustomMethod s :: Method f t1), m2 ~ (Method_CustomMethod s :: Method f t2)) =>+ {runCustomEq :: (t1 ~ t2 => m1 :~~: m2)} ->+ CustomEq m1 m2++runEq ::+ (t1 ~ t2) =>+ (SMethod m1 -> SMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))) ->+ SMethod (m1 :: Method f t1) ->+ SMethod (m2 :: Method f t2) ->+ Maybe (m1 :~~: m2)+runEq f m1 m2 = do+ res <- f m1 m2+ pure $ case res of+ Right eq -> eq+ Left ceq -> runCustomEq ceq++-- | Heterogeneous equality on singleton server methods+mEqServer :: SServerMethod m1 -> SServerMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))+mEqServer m1 m2 = go (splitServerMethod m1) (splitServerMethod m2)+ where+ go IsServerNot IsServerNot = do+ Refl <- geq m1 m2+ pure $ Right HRefl+ go IsServerReq IsServerReq = do+ Refl <- geq m1 m2+ pure $ Right HRefl+ go IsServerEither IsServerEither+ | SMethod_CustomMethod p1 <- m1+ , SMethod_CustomMethod p2 <- m2 =+ case sameSymbol p1 p2 of+ Just Refl -> Just $ Left $ CustomEq HRefl+ _ -> Nothing+ go _ _ = Nothing++-- | Heterogeneous equality on singleton client methods+mEqClient :: SClientMethod m1 -> SClientMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))+mEqClient m1 m2 = go (splitClientMethod m1) (splitClientMethod m2)+ where+ go IsClientNot IsClientNot = do+ Refl <- geq m1 m2+ pure $ Right HRefl+ go IsClientReq IsClientReq = do+ Refl <- geq m1 m2+ pure $ Right HRefl+ go IsClientEither IsClientEither+ | SMethod_CustomMethod p1 <- m1+ , SMethod_CustomMethod p2 <- m2 =+ case sameSymbol p1 p2 of+ Just Refl -> Just $ Left $ CustomEq HRefl+ _ -> Nothing+ go _ _ = Nothing
+ src/Language/LSP/Protocol/Message/Registration.hs view
@@ -0,0 +1,119 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TemplateHaskell #-}++module Language.LSP.Protocol.Message.Registration where++import Language.LSP.Protocol.Internal.Method+import Language.LSP.Protocol.Message.Meta+import Language.LSP.Protocol.Message.Method+import Language.LSP.Protocol.Types+import Language.LSP.Protocol.Utils.Misc++import Data.Aeson+import Data.Text (Text)+import Data.Text qualified as T+import GHC.Generics+import Prettyprinter++-- | Typed dynamic registration type, with correct options.+data TRegistration (m :: Method ClientToServer t) = TRegistration+ { _id :: Text+ -- ^ The id used to register the request. The id can be used to deregister+ -- the request again.+ , _method :: SClientMethod m+ -- ^ The method / capability to register for.+ , _registerOptions :: !(Maybe (RegistrationOptions m))+ -- ^ Options necessary for the registration.+ -- Make this strict to aid the pattern matching exhaustiveness checker+ }+ deriving stock (Generic)++deriving stock instance Eq (RegistrationOptions m) => Eq (TRegistration m)+deriving stock instance Show (RegistrationOptions m) => Show (TRegistration m)++-- TODO: can we do this generically somehow?+-- This generates the function+-- regHelper :: SMethod m+-- -> (( Show (RegistrationOptions m)+-- , ToJSON (RegistrationOptions m)+-- , FromJSON ($regOptTcon m)+-- => x)+-- -> x+makeRegHelper ''RegistrationOptions++instance ToJSON (TRegistration m) where+ toJSON x@(TRegistration _ m _) = regHelper m (genericToJSON lspOptions x)++deriving via ViaJSON (TRegistration m) instance Pretty (TRegistration m)++data SomeRegistration = forall t (m :: Method ClientToServer t). SomeRegistration (TRegistration m)++instance ToJSON SomeRegistration where+ toJSON (SomeRegistration r) = toJSON r++instance FromJSON SomeRegistration where+ parseJSON = withObject "Registration" $ \o -> do+ SomeClientMethod m <- o .: "method"+ r <- TRegistration <$> o .: "id" <*> pure m <*> regHelper m (o .: "registerOptions")+ pure (SomeRegistration r)++instance Show SomeRegistration where+ show (SomeRegistration r@(TRegistration _ m _)) = regHelper m (show r)++deriving via ViaJSON SomeRegistration instance Pretty SomeRegistration++toUntypedRegistration :: TRegistration m -> Registration+toUntypedRegistration (TRegistration i meth opts) = Registration i (T.pack $ someMethodToMethodString $ SomeMethod meth) (Just $ regHelper meth (toJSON opts))++toSomeRegistration :: Registration -> Maybe SomeRegistration+toSomeRegistration r =+ let v = toJSON r+ in case fromJSON v of+ Success r' -> Just r'+ _ -> Nothing++-- ---------------------------------------------------------------------++-- | Typed dynamic unregistration type.+data TUnregistration (m :: Method ClientToServer t) = TUnregistration+ { _id :: Text+ -- ^ The id used to unregister the request or notification. Usually an id+ -- provided during the register request.+ , _method :: SMethod m+ -- ^ The method / capability to unregister for.+ }+ deriving stock (Generic)++deriving stock instance Eq (TUnregistration m)+deriving stock instance Show (TUnregistration m)++instance ToJSON (TUnregistration m) where+ toJSON x@(TUnregistration _ m) = regHelper m (genericToJSON lspOptions x)++deriving via ViaJSON (TUnregistration m) instance Pretty (TUnregistration m)++data SomeUnregistration = forall t (m :: Method ClientToServer t). SomeUnregistration (TUnregistration m)++instance ToJSON SomeUnregistration where+ toJSON (SomeUnregistration r) = toJSON r++instance FromJSON SomeUnregistration where+ parseJSON = withObject "Unregistration" $ \o -> do+ SomeClientMethod m <- o .: "method"+ r <- TUnregistration <$> o .: "id" <*> pure m+ pure (SomeUnregistration r)++deriving via ViaJSON SomeUnregistration instance Pretty SomeUnregistration++toUntypedUnregistration :: TUnregistration m -> Unregistration+toUntypedUnregistration (TUnregistration i meth) = Unregistration i (T.pack $ someMethodToMethodString $ SomeMethod meth)++toSomeUnregistration :: Unregistration -> Maybe SomeUnregistration+toSomeUnregistration r =+ let v = toJSON r+ in case fromJSON v of+ Success r' -> Just r'+ _ -> Nothing
+ src/Language/LSP/Protocol/Message/Types.hs view
@@ -0,0 +1,270 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TemplateHaskell #-}++module Language.LSP.Protocol.Message.Types where++import Language.LSP.Protocol.Internal.Method+import Language.LSP.Protocol.Message.LspId+import Language.LSP.Protocol.Message.Meta+import Language.LSP.Protocol.Message.Method ()+import Language.LSP.Protocol.Types+import Language.LSP.Protocol.Utils.Misc++import Data.Aeson hiding (Null)+import Data.Aeson qualified as J+import Data.Aeson.TH+import Data.Kind+import Data.String (IsString (..))+import Data.Text (Text)+import GHC.Generics+import GHC.TypeLits (KnownSymbol)+import Prettyprinter++-- 'RequestMessage', 'ResponseMessage', 'ResponseError', and 'NotificationMessage'+-- aren't present in the metamodel, although they should be.+-- https://github.com/microsoft/vscode-languageserver-node/issues/1079++-- | Notification message type as defined in the spec.+data NotificationMessage = NotificationMessage+ { _jsonrpc :: Text+ , _method :: Text+ , _params :: Maybe Value+ }+ deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''NotificationMessage+deriving via ViaJSON NotificationMessage instance Pretty NotificationMessage++-- This isn't present in the metamodel.++-- | Request message type as defined in the spec.+data RequestMessage = RequestMessage+ { _jsonrpc :: Text+ , _id :: Int32 |? Text+ , _method :: Text+ , _params :: Maybe Value+ }+ deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''RequestMessage+deriving via ViaJSON RequestMessage instance Pretty RequestMessage++-- | Response error type as defined in the spec.+data ResponseError = ResponseError+ { _code :: LSPErrorCodes |? ErrorCodes+ , _message :: Text+ , _xdata :: Maybe Value+ }+ deriving stock (Show, Eq, Generic)++{- Note [ErrorCodes and LSPErrorCodes]++Confusingly, the metamodel defines _two_ enums for error codes. One of+these covers JSON RPC errors and one covers LSP-specific errors. We want+to accept either, mostly so we can make use of the pre-specified enum values.++However, _both_ of them are listed as accepting custom values. This means+that `LSPErrorCodes |? ErrorCodes` isn't quite right: when we parse it from+JSON, if we get an error code that isn't a known value of `LSPErrorCodes`, we+will just use the custom value constructor, without trying `ErrorCodes`.++It's hard to find any other good way of representing things properly with what+we've got, so in the end we decided to patch up the JSON parsing with a custom+instance.+-}+deriveToJSON lspOptions ''ResponseError+instance FromJSON ResponseError where+ parseJSON =+ let errorCode = withObject "ResponseError" $ \v ->+ ResponseError+ <$> v .: "code"+ <*> v .: "message"+ <*> v .:!? "data"+ in fmap go . errorCode+ where+ go :: ResponseError -> ResponseError+ go x@(ResponseError (InL (LSPErrorCodes_Custom n)) _ _) =+ x{_code = InR (fromOpenEnumBaseType n)}+ go x = x++deriving via ViaJSON ResponseError instance Pretty ResponseError++-- | Response message type as defined in the spec.+data ResponseMessage = ResponseMessage+ { _jsonrpc :: Text+ , _id :: Int32 |? Text |? Null+ , _result :: Maybe Value+ , _error :: Maybe ResponseError+ }+ deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''ResponseMessage++deriving via ViaJSON ResponseMessage instance Pretty ResponseMessage++-----++-- | Typed notification message, containing the correct parameter payload.+data TNotificationMessage (m :: Method f Notification) = TNotificationMessage+ { _jsonrpc :: Text+ , _method :: SMethod m+ , _params :: MessageParams m+ }+ deriving stock (Generic)++deriving stock instance Eq (MessageParams m) => Eq (TNotificationMessage m)+deriving stock instance Show (MessageParams m) => Show (TNotificationMessage m)++{- Note [Missing 'params']+The 'params' field on requrests and notificaoins may be omitted according to the+JSON-RPC spec, but that doesn't quite work the way we want with the generic aeson+instance. Even if the 'MessageParams' type family happens to resolve to a 'Maybe',+we handle it generically and so we end up asserting that it must be present.++We fix this in a slightly dumb way by just adding the field in if it is missing,+set to null (which parses correctly for those 'Maybe' parameters also).+-}++instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (TNotificationMessage m) where+ -- See Note [Missing 'params']+ parseJSON = genericParseJSON lspOptions . addNullField "params"+instance (ToJSON (MessageParams m)) => ToJSON (TNotificationMessage m) where+ toJSON = genericToJSON lspOptions+ toEncoding = genericToEncoding lspOptions++deriving via ViaJSON (TNotificationMessage m) instance (ToJSON (MessageParams m)) => Pretty (TNotificationMessage m)++-- | Typed request message, containing the correct parameter payload.+data TRequestMessage (m :: Method f Request) = TRequestMessage+ { _jsonrpc :: Text+ , _id :: LspId m+ , _method :: SMethod m+ , _params :: MessageParams m+ }+ deriving stock (Generic)++deriving stock instance Eq (MessageParams m) => Eq (TRequestMessage m)+deriving stock instance Show (MessageParams m) => Show (TRequestMessage m)++instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (TRequestMessage m) where+ -- See Note [Missing 'params']+ parseJSON = genericParseJSON lspOptions . addNullField "params"+instance (ToJSON (MessageParams m)) => ToJSON (TRequestMessage m) where+ toJSON = genericToJSON lspOptions+ toEncoding = genericToEncoding lspOptions++deriving via ViaJSON (TRequestMessage m) instance (ToJSON (MessageParams m)) => Pretty (TRequestMessage m)++data TResponseError (m :: Method f Request) = TResponseError+ { _code :: LSPErrorCodes |? ErrorCodes+ , _message :: Text+ , _xdata :: Maybe (ErrorData m)+ }+ deriving stock (Generic)++deriving stock instance Eq (ErrorData m) => Eq (TResponseError m)+deriving stock instance Show (ErrorData m) => Show (TResponseError m)++instance (FromJSON (ErrorData m)) => FromJSON (TResponseError m) where+ parseJSON =+ let errorCode = withObject "ResponseError" $ \v ->+ TResponseError+ <$> v .: "code"+ <*> v .: "message"+ <*> v .:!? "data"+ in fmap go . errorCode+ where+ go :: TResponseError m -> TResponseError m+ go x@(TResponseError (InL (LSPErrorCodes_Custom n)) _ _) =+ x{_code = InR (fromOpenEnumBaseType n)}+ go x = x+instance (ToJSON (ErrorData m)) => ToJSON (TResponseError m) where+ toJSON = genericToJSON lspOptions+ toEncoding = genericToEncoding lspOptions++deriving via ViaJSON (TResponseError m) instance (ToJSON (ErrorData m)) => Pretty (TResponseError m)++-- TODO: similar functions for the others?+toUntypedResponseError :: (ToJSON (ErrorData m)) => TResponseError m -> ResponseError+toUntypedResponseError (TResponseError c m d) = ResponseError c m (fmap toJSON d)++-- | A typed response message with a correct result payload.+data TResponseMessage (m :: Method f Request) = TResponseMessage+ { _jsonrpc :: Text+ , _id :: Maybe (LspId m)+ , _result :: Either (TResponseError m) (MessageResult m)+ }+ deriving stock (Generic)++deriving stock instance (Eq (MessageResult m), Eq (ErrorData m)) => Eq (TResponseMessage m)+deriving stock instance (Show (MessageResult m), Show (ErrorData m)) => Show (TResponseMessage m)++instance (ToJSON (MessageResult m), ToJSON (ErrorData m)) => ToJSON (TResponseMessage m) where+ toJSON TResponseMessage{_jsonrpc = jsonrpc, _id = lspid, _result = result} =+ object+ [ "jsonrpc" .= jsonrpc+ , "id" .= lspid+ , case result of+ Left err -> "error" .= err+ Right a -> "result" .= a+ ]++instance (FromJSON (MessageResult a), FromJSON (ErrorData a)) => FromJSON (TResponseMessage a) where+ parseJSON = withObject "Response" $ \o -> do+ _jsonrpc <- o .: "jsonrpc"+ _id <- o .: "id"+ _result <- o .:!? "result"+ _error <- o .:!? "error"+ result <- case (_error, _result) of+ (Just err, Nothing) -> pure $ Left err+ (Nothing, Just res) -> pure $ Right res+ (Just _err, Just _res) -> fail $ "both error and result cannot be present: " ++ show o+ (Nothing, Nothing) -> fail "both error and result cannot be Nothing"+ return $ TResponseMessage _jsonrpc _id result++deriving via ViaJSON (TResponseMessage m) instance (ToJSON (MessageResult m), ToJSON (ErrorData m)) => Pretty (TResponseMessage m)++{- | A typed custom message. A special data type is needed to distinguish between+ notifications and requests, since a CustomMethod can be both!+-}+data TCustomMessage s f t where+ ReqMess :: TRequestMessage (Method_CustomMethod s :: Method f Request) -> TCustomMessage s f Request+ NotMess :: TNotificationMessage (Method_CustomMethod s :: Method f Notification) -> TCustomMessage s f Notification++deriving stock instance Show (TCustomMessage s f t)++instance ToJSON (TCustomMessage s f t) where+ toJSON (ReqMess a) = toJSON a+ toJSON (NotMess a) = toJSON a++instance KnownSymbol s => FromJSON (TCustomMessage s f Request) where+ parseJSON v = ReqMess <$> parseJSON v+instance KnownSymbol s => FromJSON (TCustomMessage s f Notification) where+ parseJSON v = NotMess <$> parseJSON v++deriving via ViaJSON (TCustomMessage s f t) instance (KnownSymbol s) => Pretty (TCustomMessage s f t)++-- ---------------------------------------------------------------------+-- Helper Type Families+-- ---------------------------------------------------------------------++{- | Map a method to the Request/Notification type with the correct+ payload.+-}+type TMessage :: forall f t. Method f t -> Type+type family TMessage m where+ TMessage (Method_CustomMethod s :: Method f t) = TCustomMessage s f t+ TMessage (m :: Method f Request) = TRequestMessage m+ TMessage (m :: Method f Notification) = TNotificationMessage m++-- Some helpful type synonyms+type TClientMessage (m :: Method ClientToServer t) = TMessage m+type TServerMessage (m :: Method ServerToClient t) = TMessage m++{- | Replace a missing field in an object with a null field, to simplify parsing+ This is a hack to allow other types than Maybe to work like Maybe in allowing the field to be missing.+ See also this issue: https://github.com/haskell/aeson/issues/646+-}+addNullField :: String -> Value -> Value+addNullField s (Object o) = Object $ o <> fromString s .= J.Null+addNullField _ v = v
+ src/Language/LSP/Protocol/Meta.hs view
@@ -0,0 +1,3 @@+module Language.LSP.Protocol.Meta (module Export) where++import Language.LSP.Protocol.Internal.Meta as Export
+ src/Language/LSP/Protocol/Types.hs view
@@ -0,0 +1,57 @@+-- The OSPath import sometimes looks unused+{-# OPTIONS_GHC -Wno-unused-imports #-}++module Language.LSP.Protocol.Types (+ -- * Basic types and functions+ module Common,++ -- ** URIs+ module Uri,++ -- ** Locations+ module Locations,++ -- ** LSP enumerations+ module LspEnum,++ -- ** Singleton types+ module Singletons,++ -- * Helpers for working with LSP types++ -- ** Edits+ module Edits,++ -- ** Markup+ module Markup,++ -- ** Code actions+ module CodeAction,++ -- ** Progress+ module Progress,++ -- ** Semantic tokens+ module SemanticTokens,++ -- ** WatchKinds+ module WatchKinds,++ -- * Main LSP types and functions+ module Generated,+) where++import Language.LSP.Protocol.Internal.Types as Generated+import Language.LSP.Protocol.Types.CodeAction as CodeAction+import Language.LSP.Protocol.Types.Common as Common+import Language.LSP.Protocol.Types.Edit as Edits+import Language.LSP.Protocol.Types.Location as Locations+import Language.LSP.Protocol.Types.LspEnum as LspEnum+import Language.LSP.Protocol.Types.MarkupContent as Markup+import Language.LSP.Protocol.Types.Orphans ()+import Language.LSP.Protocol.Types.Progress as Progress+import Language.LSP.Protocol.Types.SemanticTokens as SemanticTokens+import Language.LSP.Protocol.Types.Singletons as Singletons+import Language.LSP.Protocol.Types.Uri as Uri+import Language.LSP.Protocol.Types.Uri.OsPath as Uri+import Language.LSP.Protocol.Types.WatchKinds as WatchKinds
+ src/Language/LSP/Protocol/Types/CodeAction.hs view
@@ -0,0 +1,10 @@+module Language.LSP.Protocol.Types.CodeAction where++import Data.Text qualified as T+import Language.LSP.Protocol.Internal.Types+import Language.LSP.Protocol.Types.LspEnum++-- | Does the first 'CodeActionKind' subsume the other one, hierarchically. Reflexive.+codeActionKindSubsumes :: CodeActionKind -> CodeActionKind -> Bool+-- Simple but ugly implementation: prefix on the string representation+codeActionKindSubsumes parent child = toEnumBaseType parent `T.isPrefixOf` toEnumBaseType child
+ src/Language/LSP/Protocol/Types/Common.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE LambdaCase #-}++-- | Common types that aren't in the specification+module Language.LSP.Protocol.Types.Common (+ type (|?) (..),+ toEither,+ _L,+ _R,+ Int32,+ UInt,+ Null (..),+ absorbNull,+ nullToMaybe,+ maybeToNull,+ (.=?),+ (.:!?),+) where++import Control.Applicative+import Control.DeepSeq+import Control.Lens+import Data.Aeson hiding (Null)+import Data.Aeson qualified as J+import Data.Aeson.KeyMap qualified as KM+import Data.Aeson.Types qualified as J+import Data.Hashable+import Data.Int (Int32)+import Data.Mod.Word+import Data.Set as Set+import Data.String (fromString)+import GHC.Generics hiding (UInt)+import GHC.TypeNats hiding (Mod)+import Language.LSP.Protocol.Utils.Misc+import Prettyprinter+import Text.Read (Read (readPrec))++{- | The "uinteger" type in the LSP spec.++ Unusually, this is a **31**-bit unsigned integer, not a 32-bit one.+-}+newtype UInt = UInt (Mod (2 ^ 31))+ deriving newtype (Num, Bounded, Enum, Eq, Ord)+ deriving stock (Generic)+ deriving anyclass (NFData)++instance Hashable UInt where hashWithSalt s (UInt n) = hashWithSalt s (unMod n)++instance Show UInt where+ show (UInt u) = show $ unMod u++instance Read UInt where+ readPrec = fromInteger <$> readPrec++instance Pretty UInt where+ pretty = viaShow++instance Real UInt where+ toRational (UInt u) = toRational $ unMod u++instance Integral UInt where+ quotRem (UInt x) (UInt y) = bimap fromIntegral fromIntegral $ quotRem (unMod x) (unMod y)+ toInteger (UInt u) = toInteger $ unMod u++instance ToJSON UInt where+ toJSON u = toJSON (toInteger u)++instance FromJSON UInt where+ parseJSON v = fromInteger <$> parseJSON v++{- | An alternative type (isomorphic to 'Either'), but which+ is encoded into JSON without a tag for the alternative.++ This corresponds to @a | b@ types in the LSP specification.+-}+data a |? b+ = InL a+ | InR b+ deriving stock (Read, Show, Eq, Ord, Generic)+ deriving anyclass (NFData, Hashable)+ deriving (Pretty) via (ViaJSON (a |? b))++infixr 9 |?++-- | Prism for the left-hand side of an '(|?)'.+_L :: Prism' (a |? b) a+_L = prism' InL $ \case+ InL a -> Just a+ InR _ -> Nothing++-- | Prism for the right-hand side of an '(|?)'.+_R :: Prism' (a |? b) b+_R = prism' InR $ \case+ InL _ -> Nothing+ InR b -> Just b++toEither :: a |? b -> Either a b+toEither (InL a) = Left a+toEither (InR b) = Right b++instance (ToJSON a, ToJSON b) => ToJSON (a |? b) where+ toJSON (InL x) = toJSON x+ toJSON (InR x) = toJSON x++instance (FromJSON a, ToJSON a, FromJSON b, ToJSON b) => FromJSON (a |? b) where+ -- Truly atrocious and abominable hack. The issue is tha we may have siutations+ -- where some input JSON can parse correctly as both sides of the union, because+ -- we have no tag. What do we do in this situation? It's very unclear, and the+ -- spec is no help. The heuristic we adopt here is that it is better to take+ -- the version with "more fields". How do we work that out? By converting back+ -- to JSON and looking at the object fields.+ --+ -- Possibly we could do better by relying on Generic instances for a and b+ -- in order to work out which has more fields on the Haskell side.+ parseJSON v = do+ let ra :: Result a = fromJSON v+ rb :: Result b = fromJSON v+ case (ra, rb) of+ (Success a, Error _) -> pure $ InL a+ (Error _, Success b) -> pure $ InR b+ (Error e, Error _) -> fail e+ (Success a, Success b) -> case (toJSON a, toJSON b) of+ -- Both sides encode to the same thing, just pick one arbitrarily+ (l, r) | l == r -> pure $ InL a+ (Object oa, Object ob) ->+ let ka = Set.fromList $ KM.keys oa+ kb = Set.fromList $ KM.keys ob+ in if kb `Set.isSubsetOf` ka+ then pure $ InL a+ else+ if ka `Set.isSubsetOf` kb+ then pure $ InR b+ else fail $ "Could not decide which type of value to produce, left encodes to an object with keys: " ++ show ka ++ "; right has keys " ++ show kb+ (l, r) -> fail $ "Could not decide which type of value to produce, left encodes to: " ++ show l ++ "; right encodes to: " ++ show r++-- We could use 'Proxy' for this, as aeson also serializes it to/from null,+-- but this is more explicit.++{- | A type for that is precisely null and nothing else.++ This is useful since the LSP specification often includes types like @a | null@+ as distinct from an optional value of type @a@.+-}+data Null = Null+ deriving stock (Eq, Ord, Show, Generic)+ deriving anyclass (NFData, Hashable)+ deriving (Pretty) via (ViaJSON Null)++instance ToJSON Null where+ toJSON Null = J.Null+instance FromJSON Null where+ parseJSON J.Null = pure Null+ parseJSON _ = fail "expected 'null'"++absorbNull :: Monoid a => a |? Null -> a+absorbNull (InL a) = a+absorbNull (InR _) = mempty++nullToMaybe :: a |? Null -> Maybe a+nullToMaybe (InL a) = Just a+nullToMaybe (InR _) = Nothing++maybeToNull :: Maybe a -> a |? Null+maybeToNull (Just x) = InL x+maybeToNull Nothing = InR Null++-- This is equivalent to the instance for 'Maybe s'+instance Semigroup s => Semigroup (s |? Null) where+ InL x <> InL y = InL (x <> y)+ InL x <> InR _ = InL x+ InR _ <> InL x = InL x+ InR _ <> InR y = InR y++-- We use String so we can use fromString on it to get a key that works+-- in both aeson-1 and aeson-2++-- | Include a value in an JSON object optionally, omitting it if it is 'Nothing'.+#if MIN_VERSION_aeson(2,2,0)+(.=?) :: (J.KeyValue e kv, J.ToJSON v) => String -> Maybe v -> [kv]+#else+(.=?) :: (J.KeyValue kv, J.ToJSON v) => String -> Maybe v -> [kv]+#endif+k .=? v = case v of+ Just v' -> [fromString k J..= v']+ Nothing -> mempty++{- |+Parse a value optionally. This behaves similarly to 'J..:!' and+'J..:?', but differs in how it handles 'Null':++ * If 'Null' can be converted to the desired type...+ * 'J.:?': the result is success with 'Nothing'+ * 'J.:!': the result is success with 'Just <value>'+ * '.:!?': the result is success with 'Just <value>'+ * If 'Null' cannot be converted to the desired type...+ * 'J.:?': the result is success with 'Nothing'+ * 'J.:!': the result is failure+ * '.:!?': the result is success with 'Nothing'++That is, we allow 'Null' to mean either 'Nothing' or 'Just <value>',+with the latter taking priority.+-}+(.:!?) :: (J.FromJSON v) => Object -> Key -> J.Parser (Maybe v)+o .:!? k =+ -- If 'Null' can be converted to the desired type this succeeds+ -- with Just the converted value+ o J..:! k+ -- otherwise...+ <|>+ -- If 'Null' cannot be converted to the desired type this succeeds+ -- with Nothing+ o J..:? k
+ src/Language/LSP/Protocol/Types/Edit.hs view
@@ -0,0 +1,59 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}++module Language.LSP.Protocol.Types.Edit where++import Data.Text (Text)+import Data.Text qualified as T++import Control.Lens hiding (index)+import Language.LSP.Protocol.Internal.Types+import Language.LSP.Protocol.Types.Common++-- | Convenience alias for the type in the 'WorkspaceEdit._documentChanges' field.+type DocumentChange = TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile++-- TODO: get rid of this in favour of the more correct things in VFS++{- | Applies a 'TextEdit' to some 'Text'.++ >>> applyTextEdit (TextEdit (Range (Position 0 1) (Position 0 2)) "i") "foo"+ "fio"+-}+applyTextEdit :: TextEdit -> Text -> Text+applyTextEdit (TextEdit (Range sp ep) newText) oldText =+ let (_, afterEnd) = splitAtPos ep oldText+ (beforeStart, _) = splitAtPos sp oldText+ in mconcat [beforeStart, newText, afterEnd]+ where+ splitAtPos :: Position -> Text -> (Text, Text)+ splitAtPos (Position sl sc) t =+ -- If we are looking for a line beyond the end of the text, this will give us an index+ -- past the end. Fortunately, T.splitAt is fine with this, and just gives us the whole+ -- string and an empty string, which is what we want.+ let index = sc + startLineIndex sl t+ in T.splitAt (fromIntegral index) t++ -- The index of the first character of line 'line'+ startLineIndex :: UInt -> Text -> UInt+ startLineIndex 0 _ = 0+ startLineIndex line t' =+ case T.findIndex (== '\n') t' of+ Just i -> fromIntegral i + 1 + startLineIndex (line - 1) (T.drop (i + 1) t')+ -- i != 0, and there are no newlines, so this is a line beyond the end of the text.+ -- In this case give the "start index" as the end, so we will at least append the text.+ Nothing -> fromIntegral $ T.length t'++-- | 'editTextEdit' @outer@ @inner@ applies @inner@ to the text inside @outer@.+editTextEdit :: TextEdit -> TextEdit -> TextEdit+editTextEdit (TextEdit origRange origText) innerEdit =+ let newText = applyTextEdit innerEdit origText+ in TextEdit origRange newText++-- | Conversion between 'OptionalVersionedTextDocumentIdentifier' and 'VersionedTextDocumentIdentifier'.+_versionedTextDocumentIdentifier :: Prism' OptionalVersionedTextDocumentIdentifier VersionedTextDocumentIdentifier+_versionedTextDocumentIdentifier = prism down up+ where+ down (VersionedTextDocumentIdentifier uri v) = OptionalVersionedTextDocumentIdentifier uri (InL v)+ up (OptionalVersionedTextDocumentIdentifier uri (InL v)) = Right $ VersionedTextDocumentIdentifier uri v+ up i@(OptionalVersionedTextDocumentIdentifier _ (InR _)) = Left i
+ src/Language/LSP/Protocol/Types/Lens.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Types.Lens where++import Language.LSP.Protocol.Internal.Meta+import Language.LSP.Protocol.Types.SemanticTokens+import Language.LSP.Protocol.Utils.Misc++$(genLenses (structNames ++ [''SemanticTokenAbsolute, ''SemanticTokenRelative]))
+ src/Language/LSP/Protocol/Types/Location.hs view
@@ -0,0 +1,20 @@+-- | Additional and utilities for 'Position' and 'Range'.+module Language.LSP.Protocol.Types.Location where++import Language.LSP.Protocol.Internal.Types.Position+import Language.LSP.Protocol.Internal.Types.Range+import Language.LSP.Protocol.Types.Common++{- | A helper function for creating ranges.+ prop> mkRange l c l' c' = Range (Position l c) (Position l' c')+-}+mkRange :: UInt -> UInt -> UInt -> UInt -> Range+mkRange l c l' c' = Range (Position l c) (Position l' c')++-- | 'isSubrangeOf' returns true if for every 'Position' in the first 'Range', it's also in the second 'Range'.+isSubrangeOf :: Range -> Range -> Bool+isSubrangeOf smallRange range = _start smallRange >= _start range && _end smallRange <= _end range++-- | 'positionInRange' returns true if the given 'Position' is in the 'Range'.+positionInRange :: Position -> Range -> Bool+positionInRange p (Range sp ep) = sp <= p && p < ep -- Range's end position is exclusive.
+ src/Language/LSP/Protocol/Types/LspEnum.hs view
@@ -0,0 +1,58 @@+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE TypeFamilies #-}++module Language.LSP.Protocol.Types.LspEnum where++import Data.Aeson qualified as Aeson+import Data.Kind+import Data.Set qualified as Set+import Data.String (IsString (..))+import Data.Text qualified as Text++{- | A class for types that represent a LSP enum type.++ This class carries conversion functions to and from the 'base type' of the enum.+ Not all base type values may have corresponding enum values.+-}+class LspEnum a where+ -- | The base type of the enum.+ type EnumBaseType a :: Type++ -- | The known values of this type, the ones listed in the LSP specification.+ knownValues :: Set.Set a+ knownValues = Set.empty++ -- | Convert an enum value to the base type.+ toEnumBaseType :: a -> EnumBaseType a++ -- | Convert a base type value to an enum value, failing if it does not correspond to+ -- an enum value.+ fromEnumBaseType :: EnumBaseType a -> Maybe a+ default fromEnumBaseType :: (LspOpenEnum a) => EnumBaseType a -> Maybe a+ fromEnumBaseType = Just . fromOpenEnumBaseType++{- | A class for types that represent a LSP open enum type.++ Open enum types allow any base type value to be used as a 'custom' enum value.+-}+class LspEnum a => LspOpenEnum a where+ -- | Convert a base type to an enum value. All base type values can be converted this way.+ fromOpenEnumBaseType :: EnumBaseType a -> a++{- | Newtype for @deriving via@ to get standard JSON and 'IsString' instances in terms of the 'LspEnum'+ class methods.+-}+newtype AsLspEnum a = AsLspEnum a++instance (LspEnum a, EnumBaseType a ~ b, Aeson.ToJSON b) => Aeson.ToJSON (AsLspEnum a) where+ toJSON (AsLspEnum e) = Aeson.toJSON (toEnumBaseType e)++instance (LspEnum a, EnumBaseType a ~ b, Aeson.FromJSON b, Show b) => Aeson.FromJSON (AsLspEnum a) where+ parseJSON val = do+ v <- Aeson.parseJSON val+ case fromEnumBaseType v of+ Just x -> pure $ AsLspEnum x+ Nothing -> fail $ "unrecognized enum value " ++ show v++instance (LspOpenEnum a, EnumBaseType a ~ b, b ~ Text.Text) => IsString (AsLspEnum a) where+ fromString s = AsLspEnum $ fromOpenEnumBaseType (Text.pack s)
+ src/Language/LSP/Protocol/Types/MarkupContent.hs view
@@ -0,0 +1,47 @@+{-# OPTIONS_GHC -Wno-orphans #-}++-- | Additional instances and utilities for 'MarkupContent'.+module Language.LSP.Protocol.Types.MarkupContent where++import Data.String+import Data.Text (Text)+import Data.Text qualified as T+import Language.LSP.Protocol.Internal.Types.MarkupContent+import Language.LSP.Protocol.Internal.Types.MarkupKind++-- | Create a 'MarkupContent' containing plain text.+mkPlainText :: Text -> MarkupContent+mkPlainText = MarkupContent MarkupKind_PlainText++-- | Create a 'MarkupContent' containing markdown.+mkMarkdown :: Text -> MarkupContent+mkMarkdown = MarkupContent MarkupKind_Markdown++-- | Create a 'MarkupContent' containing a language-annotated code block only.+mkMarkdownCodeBlock :: Text -> Text -> MarkupContent+mkMarkdownCodeBlock lang quote =+ MarkupContent MarkupKind_Markdown ("\n```" <> lang <> "\n" <> quote <> "\n```\n")++-- | Markdown for a section separator in Markdown, being a horizontal line.+sectionSeparator :: Text+sectionSeparator = "* * *\n"++{- | Given some plaintext, convert it into some equivalent markdown text.+ This is not *quite* the identity function.+-}+plainTextToMarkdown :: Text -> Text+-- Line breaks in markdown paragraphs are ignored unless the line ends with two spaces.+-- In order to respect the line breaks in the original plaintext, we stick two spaces on the end of every line.+plainTextToMarkdown = T.unlines . fmap (<> " ") . T.lines++instance Semigroup MarkupContent where+ MarkupContent MarkupKind_PlainText s1 <> MarkupContent MarkupKind_PlainText s2 = MarkupContent MarkupKind_PlainText (s1 `mappend` s2)+ MarkupContent MarkupKind_Markdown s1 <> MarkupContent MarkupKind_Markdown s2 = MarkupContent MarkupKind_Markdown (s1 `mappend` s2)+ MarkupContent MarkupKind_PlainText s1 <> MarkupContent MarkupKind_Markdown s2 = MarkupContent MarkupKind_Markdown (plainTextToMarkdown s1 `mappend` s2)+ MarkupContent MarkupKind_Markdown s1 <> MarkupContent MarkupKind_PlainText s2 = MarkupContent MarkupKind_Markdown (s1 `mappend` plainTextToMarkdown s2)++instance Monoid MarkupContent where+ mempty = MarkupContent MarkupKind_PlainText ""++instance IsString MarkupContent where+ fromString = mkPlainText . T.pack
+ src/Language/LSP/Protocol/Types/Orphans.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Types.Orphans where++import Data.Default+import Data.Semigroup ()+import Language.LSP.Protocol.Internal.Types++instance Semigroup WorkspaceEdit where+ (WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')+instance Monoid WorkspaceEdit where+ mempty = WorkspaceEdit Nothing Nothing Nothing++instance Default ClientCapabilities where+ def = ClientCapabilities def def def def def Nothing+instance Default WorkspaceClientCapabilities+instance Default TextDocumentClientCapabilities+instance Default NotebookDocumentClientCapabilities+instance Default NotebookDocumentSyncClientCapabilities+instance Default WindowClientCapabilities+instance Default GeneralClientCapabilities
+ src/Language/LSP/Protocol/Types/Progress.hs view
@@ -0,0 +1,31 @@+module Language.LSP.Protocol.Types.Progress (+ _workDoneProgressBegin,+ _workDoneProgressEnd,+ _workDoneProgressReport,+)+where++import Control.Lens+import Data.Aeson++import Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport++-- From lens-aeson+_JSON :: (ToJSON a, FromJSON a) => Prism' Value a+_JSON = prism toJSON $ \x -> case fromJSON x of+ Success y -> Right y+ _ -> Left x++-- | Prism for extracting the 'WorkDoneProgressBegin' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressBegin :: Prism' Value WorkDoneProgressBegin+_workDoneProgressBegin = _JSON++-- | Prism for extracting the 'WorkDoneProgressEnd' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressEnd :: Prism' Value WorkDoneProgressEnd+_workDoneProgressEnd = _JSON++-- | Prism for extracting the 'WorkDoneProgressReport' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressReport :: Prism' Value WorkDoneProgressReport+_workDoneProgressReport = _JSON
+ src/Language/LSP/Protocol/Types/SemanticTokens.hs view
@@ -0,0 +1,189 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}++module Language.LSP.Protocol.Types.SemanticTokens where++import Data.Text (Text)++import Control.Monad.Except++import Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers+import Language.LSP.Protocol.Internal.Types.SemanticTokenTypes+import Language.LSP.Protocol.Internal.Types.SemanticTokens+import Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+import Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import Language.LSP.Protocol.Types.Common+import Language.LSP.Protocol.Types.LspEnum++import Data.Algorithm.Diff qualified as Diff+import Data.Bits qualified as Bits+import Data.DList qualified as DList+import Data.Foldable hiding (+ length,+ )+import Data.Map qualified as Map+import Data.Maybe (+ fromMaybe,+ maybeToList,+ )+import Data.String++defaultSemanticTokensLegend :: SemanticTokensLegend+defaultSemanticTokensLegend =+ SemanticTokensLegend+ (fmap toEnumBaseType . toList $ knownValues @SemanticTokenTypes)+ (fmap toEnumBaseType . toList $ knownValues @SemanticTokenModifiers)++----------------------------------------------------------+-- Tools for working with semantic tokens.+----------------------------------------------------------++{- | A single 'semantic token' as described in the LSP specification, using absolute positions.+ This is the kind of token that is usually easiest for editors to produce.+-}+data SemanticTokenAbsolute = SemanticTokenAbsolute+ { _line :: UInt+ , _startChar :: UInt+ , _length :: UInt+ , _tokenType :: SemanticTokenTypes+ , _tokenModifiers :: [SemanticTokenModifiers]+ }+ deriving stock (Show, Eq, Ord)++-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the+-- order of the constructors++-- | A single 'semantic token' as described in the LSP specification, using relative positions.+data SemanticTokenRelative = SemanticTokenRelative+ { _deltaLine :: UInt+ , _deltaStartChar :: UInt+ , _length :: UInt+ , _tokenType :: SemanticTokenTypes+ , _tokenModifiers :: [SemanticTokenModifiers]+ }+ deriving stock (Show, Eq, Ord)++-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the+-- order of the constructors++{- | Turn a list of absolutely-positioned tokens into a list of relatively-positioned tokens. The tokens are assumed to be in the+ order that they appear in the document!+-}+relativizeTokens :: [SemanticTokenAbsolute] -> [SemanticTokenRelative]+relativizeTokens xs = DList.toList $ go 0 0 xs mempty+ where+ -- Pass an accumulator to make this tail-recursive+ go :: UInt -> UInt -> [SemanticTokenAbsolute] -> DList.DList SemanticTokenRelative -> DList.DList SemanticTokenRelative+ go _ _ [] acc = acc+ go lastLine lastChar (SemanticTokenAbsolute l c len ty mods : ts) acc =+ let+ lastCharInLine = if l == lastLine then lastChar else 0+ dl = l - lastLine+ dc = c - lastCharInLine+ in+ go l c ts (DList.snoc acc (SemanticTokenRelative dl dc len ty mods))++{- | Turn a list of relatively-positioned tokens into a list of absolutely-positioned tokens. The tokens are assumed to be in the+ order that they appear in the document!+-}+absolutizeTokens :: [SemanticTokenRelative] -> [SemanticTokenAbsolute]+absolutizeTokens xs = DList.toList $ go 0 0 xs mempty+ where+ -- Pass an accumulator to make this tail-recursive+ go :: UInt -> UInt -> [SemanticTokenRelative] -> DList.DList SemanticTokenAbsolute -> DList.DList SemanticTokenAbsolute+ go _ _ [] acc = acc+ go lastLine lastChar (SemanticTokenRelative dl dc len ty mods : ts) acc =+ let+ lastCharInLine = if dl == 0 then lastChar else 0+ l = lastLine + dl+ c = lastCharInLine + dc+ in+ go l c ts (DList.snoc acc (SemanticTokenAbsolute l c len ty mods))++-- | Encode a series of relatively-positioned semantic tokens into an integer array following the given legend.+encodeTokens :: SemanticTokensLegend -> [SemanticTokenRelative] -> Either Text [UInt]+encodeTokens SemanticTokensLegend{_tokenTypes = tts, _tokenModifiers = tms} sts =+ DList.toList . DList.concat <$> traverse encodeToken sts+ where+ -- Note that there's no "fast" version of these (e.g. backed by an IntMap or similar)+ -- in general, due to the possibility of unknown token types which are only identified by strings.+ tyMap :: Map.Map SemanticTokenTypes UInt+ tyMap = Map.fromList $ zip (fmap fromOpenEnumBaseType tts) [0 ..]+ modMap :: Map.Map SemanticTokenModifiers Int+ modMap = Map.fromList $ zip (fmap fromOpenEnumBaseType tms) [0 ..]++ lookupTy :: SemanticTokenTypes -> Either Text UInt+ lookupTy ty = case Map.lookup ty tyMap of+ Just tycode -> pure tycode+ Nothing -> throwError $ "Semantic token type " <> fromString (show ty) <> " did not appear in the legend"+ lookupMod :: SemanticTokenModifiers -> Either Text Int+ lookupMod modifier = case Map.lookup modifier modMap of+ Just modcode -> pure modcode+ Nothing -> throwError $ "Semantic token modifier " <> fromString (show modifier) <> " did not appear in the legend"++ -- Use a DList here for better efficiency when concatenating all these together+ encodeToken :: SemanticTokenRelative -> Either Text (DList.DList UInt)+ encodeToken (SemanticTokenRelative dl dc len ty mods) = do+ tycode <- lookupTy ty+ modcodes <- traverse lookupMod mods+ let combinedModcode :: Int = foldl' Bits.setBit Bits.zeroBits modcodes++ pure [dl, dc, len, tycode, fromIntegral combinedModcode]++-- This is basically 'SemanticTokensEdit', but slightly easier to work with.++-- | An edit to a buffer of items.+data Edit a = Edit {editStart :: UInt, editDeleteCount :: UInt, editInsertions :: [a]}+ deriving stock (Read, Show, Eq, Ord)++-- | Compute a list of edits that will turn the first list into the second list.+computeEdits :: Eq a => [a] -> [a] -> [Edit a]+computeEdits l r = DList.toList $ go 0 Nothing (Diff.getGroupedDiff l r) mempty+ where+ {-+ Strategy: traverse the list of diffs, keeping the current index and (maybe) an in-progress 'Edit'.+ Whenever we see a 'Diff' that's only one side or the other, we can bundle that in to our in-progress+ 'Edit'. We only have to stop if we see a 'Diff' that's on both sides (i.e. unchanged), then we+ dump the 'Edit' into the accumulator.+ We need the index, because 'Edit's need to say where they start.+ -}+ go :: UInt -> Maybe (Edit a) -> [Diff.Diff [a]] -> DList.DList (Edit a) -> DList.DList (Edit a)+ -- No more diffs: append the current edit if there is one and return+ go _ e [] acc = acc <> DList.fromList (maybeToList e)+ -- Items only on the left (i.e. deletions): increment the current index, and record the count of deletions,+ -- starting a new edit if necessary.+ go ix e (Diff.First ds : rest) acc =+ let+ deleteCount = fromIntegral $ Prelude.length ds+ edit = fromMaybe (Edit ix 0 []) e+ in+ go (ix + deleteCount) (Just (edit{editDeleteCount = editDeleteCount edit + deleteCount})) rest acc+ -- Items only on the right (i.e. insertions): don't increment the current index, and record the insertions,+ -- starting a new edit if necessary.+ go ix e (Diff.Second as : rest) acc =+ let edit = fromMaybe (Edit ix 0 []) e+ in go ix (Just (edit{editInsertions = editInsertions edit <> as})) rest acc+ -- Items on both sides: increment the current index appropriately (since the items appear on the left),+ -- and append the current edit (if there is one) to our list of edits (since we can't continue it with a break).+ go ix e (Diff.Both bs _bs : rest) acc =+ let bothCount = fromIntegral $ Prelude.length bs+ in go (ix + bothCount) Nothing rest (acc <> DList.fromList (maybeToList e))++-- | Convenience method for making a 'SemanticTokens' from a list of 'SemanticTokenAbsolute's. An error may be returned if++-- The resulting 'SemanticTokens' lacks a result ID, which must be set separately if you are using that.+makeSemanticTokens :: SemanticTokensLegend -> [SemanticTokenAbsolute] -> Either Text SemanticTokens+makeSemanticTokens legend sts = do+ encoded <- encodeTokens legend $ relativizeTokens sts+ pure $ SemanticTokens Nothing encoded++{- | Convenience function for making a 'SemanticTokensDelta' from a previous and current 'SemanticTokens'.+ The resulting 'SemanticTokensDelta' lacks a result ID, which must be set separately if you are using that.+-}+makeSemanticTokensDelta :: SemanticTokens -> SemanticTokens -> SemanticTokensDelta+makeSemanticTokensDelta SemanticTokens{_data_ = prevTokens} SemanticTokens{_data_ = curTokens} =+ let edits = computeEdits prevTokens curTokens+ stEdits = fmap (\(Edit s ds as) -> SemanticTokensEdit s ds (Just as)) edits+ in SemanticTokensDelta Nothing stEdits
+ src/Language/LSP/Protocol/Types/Singletons.hs view
@@ -0,0 +1,78 @@+module Language.LSP.Protocol.Types.Singletons where++import Control.DeepSeq+import Data.Aeson+import Data.Hashable+import Data.Proxy+import Data.Text qualified as T+import GHC.TypeLits (+ KnownNat,+ KnownSymbol,+ Nat,+ Symbol,+ natVal,+ symbolVal,+ )+import Prettyprinter++{- | A type whose only inhabitant is a single, statically-known string.++ This corresponds to types like @"hello"@ in the LSP specification that+ are exactly types with a single inhabitant.+-}+data AString (s :: Symbol) where+ AString :: KnownSymbol s => AString s++instance Show (AString s) where+ show AString = symbolVal (Proxy @s)+instance Pretty (AString s) where+ pretty = viaShow+instance Eq (AString s) where+ _ == _ = True+instance Ord (AString s) where+ compare _ _ = EQ+instance NFData (AString s) where+ rnf a = seq a ()+instance Hashable (AString sym) where+ hashWithSalt s AString = hashWithSalt s (symbolVal (Proxy @sym))++instance ToJSON (AString s) where+ toJSON AString = toJSON (T.pack (symbolVal (Proxy @s)))++instance KnownSymbol s => FromJSON (AString s) where+ parseJSON = withText "string literal type" $ \s -> do+ let sym = symbolVal (Proxy @s)+ if s == T.pack sym+ then pure AString+ else fail $ "wrong string, got: " <> show s <> " expected " <> sym++{- | A type whose only inhabitant is a single, statically-known integer.++ This corresponds to types like @1@ in the LSP specification that+ are exactly types with a single inhabitant.+-}+data AnInteger (n :: Nat) where+ AnInteger :: KnownNat n => AnInteger n++instance Show (AnInteger n) where+ show AnInteger = show $ natVal (Proxy @n)+instance Pretty (AnInteger n) where+ pretty = viaShow+instance Eq (AnInteger n) where+ _ == _ = True+instance Ord (AnInteger n) where+ compare _ _ = EQ+instance NFData (AnInteger s) where+ rnf a = seq a ()+instance Hashable (AnInteger i) where+ hashWithSalt s AnInteger = hashWithSalt s (natVal (Proxy @i))++instance ToJSON (AnInteger n) where+ toJSON AnInteger = toJSON (natVal (Proxy @n))++instance KnownNat n => FromJSON (AnInteger n) where+ parseJSON = withScientific "integer literal type" $ \n -> do+ let nat = natVal (Proxy @n)+ if truncate n == nat+ then pure AnInteger+ else fail $ "wrong integer, got: " <> show n <> " expected " <> show nat
+ src/Language/LSP/Protocol/Types/Uri.hs view
@@ -0,0 +1,259 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Language.LSP.Protocol.Types.Uri (+ Uri (..),+ uriToFilePath,+ filePathToUri,+ NormalizedUri (..),+ toNormalizedUri,+ fromNormalizedUri,+ NormalizedFilePath,+ toNormalizedFilePath,+ fromNormalizedFilePath,+ normalizedFilePathToUri,+ uriToNormalizedFilePath,+ emptyNormalizedFilePath,+ emptyNormalizedUri,+ -- Private functions+ platformAwareUriToFilePath,+ platformAwareFilePathToUri,+)+where++import Control.DeepSeq+import Data.Aeson qualified as A+import Data.Binary (Binary, Get, get, put)+import Data.Hashable+import Data.List (stripPrefix)+import Data.String (IsString (fromString))+import Data.Text (Text)+import Data.Text qualified as T+import GHC.Generics+import Network.URI hiding (authority)+import Prettyprinter+import Safe (tailMay)+import System.FilePath qualified as FP+import System.FilePath.Posix qualified as FPP+import System.FilePath.Windows qualified as FPW+import System.Info qualified++-- | The @Uri@ type in the LSP specification.+newtype Uri = Uri {getUri :: Text}+ deriving stock (Eq, Ord, Read, Show, Generic)+ deriving newtype (A.FromJSON, A.ToJSON, Hashable, A.ToJSONKey, A.FromJSONKey, Pretty)++instance NFData Uri++{- | A normalized 'Uri'.++If you want to use a URI as a map key, use this type. It is important to normalize+the percent encoding in the URI since URIs that only differ+when it comes to the percent-encoding should be treated as equivalent.++'NormalizedUri' has a cached hash in order to make it especially fast in a hash map.+-}+data NormalizedUri = NormalizedUri !Int !Text+ deriving stock (Read, Show, Generic, Eq)++-- Slow but compares paths alphabetically as you would expect.+instance Ord NormalizedUri where+ compare (NormalizedUri _ u1) (NormalizedUri _ u2) = compare u1 u2++instance Hashable NormalizedUri where+ hash (NormalizedUri h _) = h+ hashWithSalt salt (NormalizedUri h _) = hashWithSalt salt h++instance Pretty NormalizedUri where+ pretty (NormalizedUri _ t) = pretty t++instance NFData NormalizedUri++isUnescapedInUriPath :: SystemOS -> Char -> Bool+isUnescapedInUriPath systemOS c+ | systemOS == windowsOS = isUnreserved c || c `elem` [':', '\\', '/']+ | otherwise = isUnreserved c || c == '/'++normalizeUriEscaping :: String -> String+normalizeUriEscaping uri =+ case stripPrefix (fileScheme ++ "//") uri of+ Just p -> fileScheme ++ "//" ++ escapeURIPath (unEscapeString p)+ Nothing -> escapeURIString isUnescapedInURI $ unEscapeString uri+ where+ escapeURIPath = escapeURIString (isUnescapedInUriPath System.Info.os)++toNormalizedUri :: Uri -> NormalizedUri+toNormalizedUri uri = NormalizedUri (hash norm) norm+ where+ (Uri t) = maybe uri filePathToUri (uriToFilePath uri)+ -- To ensure all `Uri`s have the file path normalized+ norm = T.pack (normalizeUriEscaping (T.unpack t))++fromNormalizedUri :: NormalizedUri -> Uri+fromNormalizedUri (NormalizedUri _ t) = Uri t++fileScheme :: String+fileScheme = "file:"++windowsOS :: String+windowsOS = "mingw32"++type SystemOS = String++uriToFilePath :: Uri -> Maybe FilePath+uriToFilePath = platformAwareUriToFilePath System.Info.os++{-# WARNING platformAwareUriToFilePath "This function is considered private. Use normalizedFilePathToUri instead." #-}+platformAwareUriToFilePath :: String -> Uri -> Maybe FilePath+platformAwareUriToFilePath systemOS (Uri uri) = do+ URI{..} <- parseURI $ T.unpack uri+ if uriScheme == fileScheme+ then+ return $+ platformAdjustFromUriPath systemOS (uriRegName <$> uriAuthority) $+ unEscapeString uriPath+ else Nothing++{- | We pull in the authority because in relative file paths the Uri likes to put everything before the slash+ into the authority field+-}+platformAdjustFromUriPath ::+ SystemOS ->+ -- | authority+ Maybe String ->+ -- | path+ String ->+ FilePath+platformAdjustFromUriPath systemOS authority srcPath =+ maybe id (++) authority $+ if systemOS /= windowsOS+ then srcPath+ else case FPP.splitDirectories <$> tailMay srcPath of+ Just (firstSegment : rest) ->+ -- Drop leading '/' for absolute Windows paths+ let drive =+ if FPW.isDrive firstSegment+ then FPW.addTrailingPathSeparator firstSegment+ else firstSegment+ in FPW.joinDrive drive $ FPW.joinPath rest+ _ -> srcPath++filePathToUri :: FilePath -> Uri+filePathToUri = platformAwareFilePathToUri System.Info.os . FP.normalise++{-# WARNING platformAwareFilePathToUri "This function is considered private. Use normalizedUriToFilePath instead." #-}+platformAwareFilePathToUri :: SystemOS -> FilePath -> Uri+platformAwareFilePathToUri systemOS fp =+ Uri . T.pack . show $+ URI+ { uriScheme = fileScheme+ , uriAuthority = Just $ URIAuth "" "" ""+ , uriPath = platformAdjustToUriPath systemOS fp+ , uriQuery = ""+ , uriFragment = ""+ }++platformAdjustToUriPath :: SystemOS -> FilePath -> String+platformAdjustToUriPath systemOS srcPath+ | systemOS == windowsOS = '/' : escapedPath+ | otherwise = escapedPath+ where+ (splitDirectories, splitDrive)+ | systemOS == windowsOS =+ (FPW.splitDirectories, FPW.splitDrive)+ | otherwise =+ (FPP.splitDirectories, FPP.splitDrive)+ escapedPath =+ case splitDrive srcPath of+ (drv, rest) ->+ convertDrive drv+ `FPP.joinDrive` FPP.joinPath (map (escapeURIString (isUnescapedInUriPath systemOS)) $ splitDirectories rest)+ -- splitDirectories does not remove the path separator after the drive so+ -- we do a final replacement of \ to /+ convertDrive drv+ | systemOS == windowsOS && FPW.hasTrailingPathSeparator drv =+ FPP.addTrailingPathSeparator (init drv)+ | otherwise = drv++{- Note [Adoption Plan of OsPath]+Currently we store 'Text' in 'NormalizedFilePath'. We may change it to OsPath in the future if+the following steps are executed.++1. In the client codebase, use 'osPathToNormalizedFilePath' and 'normalizedFilePathToOsPath' instead of 'fromNormalizedFilePath'+ and 'toNormalizedFilePath'. For HLS, we could wait until GHC 9.6 becomes the oldest+ GHC we support, then change 'FilePath' to OsPath everywhere in the codebase.+2. Deprecate and remove 'fromNormalizedFilePath' and 'toNormalizedFilePath'.+3. Change 'Text' to OsPath and benchmark it to make sure performance doesn't go down. Don't forget to check Windows,+ as OsPath on Windows uses UTF-16, which may consume more memory.++See [#453](https://github.com/haskell/lsp/pull/453) and [#446](https://github.com/haskell/lsp/pull/446)+for more discussions on this topic.+-}++{- | A file path that is already normalized.++The 'NormalizedUri' is cached to avoided+repeated normalisation when we need to compute them (which is a lot).++This is one of the most performance critical parts of HLS, do not+modify it without profiling.+-}+data NormalizedFilePath = NormalizedFilePath !NormalizedUri {-# UNPACK #-} !Text+ deriving stock (Generic, Eq, Ord)++instance NFData NormalizedFilePath++instance Binary NormalizedFilePath where+ put (NormalizedFilePath _ fp) = put fp+ get = do+ v <- Data.Binary.get :: Get Text+ return (NormalizedFilePath (internalNormalizedFilePathToUri (T.unpack v)) v)++{- | Internal helper that takes a file path that is assumed to+ already be normalized to a URI. It is up to the caller+ to ensure normalization.+-}+internalNormalizedFilePathToUri :: FilePath -> NormalizedUri+internalNormalizedFilePathToUri fp = nuri+ where+ uriPath = platformAdjustToUriPath System.Info.os fp+ nuriStr = T.pack $ fileScheme <> "//" <> uriPath+ nuri = NormalizedUri (hash nuriStr) nuriStr++instance Show NormalizedFilePath where+ show (NormalizedFilePath _ fp) = "NormalizedFilePath " ++ show fp++instance Hashable NormalizedFilePath where+ hash (NormalizedFilePath uri _) = hash uri+ hashWithSalt salt (NormalizedFilePath uri _) = hashWithSalt salt uri++instance IsString NormalizedFilePath where+ fromString :: String -> NormalizedFilePath+ fromString = toNormalizedFilePath++toNormalizedFilePath :: FilePath -> NormalizedFilePath+toNormalizedFilePath fp = NormalizedFilePath nuri . T.pack $ nfp+ where+ nfp = FP.normalise fp+ nuri = internalNormalizedFilePathToUri nfp++-- | Extracts 'FilePath' from 'NormalizedFilePath'.+fromNormalizedFilePath :: NormalizedFilePath -> FilePath+fromNormalizedFilePath (NormalizedFilePath _ fp) = T.unpack fp++normalizedFilePathToUri :: NormalizedFilePath -> NormalizedUri+normalizedFilePathToUri (NormalizedFilePath uri _) = uri++uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath+uriToNormalizedFilePath nuri = fmap (NormalizedFilePath nuri . T.pack) mbFilePath+ where+ mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)++emptyNormalizedUri :: NormalizedUri+emptyNormalizedUri =+ let s = "file://"+ in NormalizedUri (hash s) s++-- | 'NormalizedFilePath' that contains an empty file path+emptyNormalizedFilePath :: NormalizedFilePath+emptyNormalizedFilePath = NormalizedFilePath emptyNormalizedUri ""
+ src/Language/LSP/Protocol/Types/Uri/OsPath.hs view
@@ -0,0 +1,54 @@+{- ORMOLU_DISABLE -}++{-# LANGUAGE CPP #-}++#if MIN_VERSION_filepath(1,4,100)+#define OS_PATH 1+#endif++module Language.LSP.Protocol.Types.Uri.OsPath+ (+#ifdef OS_PATH+ osPathToNormalizedFilePath+ , normalizedFilePathToOsPath+ , EncodingException+#endif+ ) where++#ifdef OS_PATH++import Control.Exception hiding (try)+import Control.Monad.Catch+import GHC.IO.Encoding (getFileSystemEncoding)+import Language.LSP.Protocol.Types.Uri+import System.IO+import System.IO.Unsafe (unsafePerformIO)+import System.OsPath+import System.OsPath.Encoding (EncodingException)++{-|+Constructs 'NormalizedFilePath' from 'OsPath'. Throws 'EncodingException' if the conversion fails.++We store a 'Text' in 'NormalizedFilePath', which is UTF-16 or UTF-8 depending on the verion of text library.+'OsPath' may have a different encoding than 'Text', so this function may fail.+But DO NOTE THAT encoding mismatch doesn't always mean an exception will be thrown.+[Possibly your encoding simply won't throw exception on failure](https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.IO.Encoding.html#initFileSystemEncoding).+Possibly the conversion function can't find any invalid byte sequence, giving a sucessful but wrong result.+-}+osPathToNormalizedFilePath :: MonadThrow m => OsPath -> m NormalizedFilePath+osPathToNormalizedFilePath = fmap toNormalizedFilePath . liftException . decodeWith systemEnc utf16le++{-|+Extracts 'OsPath' from 'NormalizedFilePath'. Throws 'EncodingException' if the conversion fails.+-}+normalizedFilePathToOsPath :: MonadThrow m => NormalizedFilePath -> m OsPath+normalizedFilePathToOsPath = liftException . encodeWith systemEnc utf16le . fromNormalizedFilePath++liftException :: (MonadThrow m, Exception e) => Either e a -> m a+liftException (Right x) = pure x+liftException (Left err) = throwM err++systemEnc :: TextEncoding+systemEnc = unsafePerformIO getFileSystemEncoding++#endif
+ src/Language/LSP/Protocol/Types/WatchKinds.hs view
@@ -0,0 +1,38 @@+module Language.LSP.Protocol.Types.WatchKinds where++import Data.Set (Set, toList)+import Language.LSP.Protocol.Internal.Types (WatchKind (..))+import Language.LSP.Protocol.Types.LspEnum (fromOpenEnumBaseType, toEnumBaseType)++-- WatchKind is better represented as a Set than as enum. As the lsp spec+-- defines them as an enum, these helper functions help bridge the difference.++-- | Tests whether `WatchKind_Create` is contained in the provided WatchKind enum+containsCreate :: WatchKind -> Bool+containsCreate WatchKind_Create = True+containsCreate (WatchKind_Custom 3) = True+containsCreate (WatchKind_Custom 5) = True+containsCreate (WatchKind_Custom 7) = True+containsCreate _ = False++-- | Tests whether `WatchKind_Change` is contained in the provided WatchKind enum+containsChange :: WatchKind -> Bool+containsChange WatchKind_Change = True+containsChange (WatchKind_Custom 3) = True+containsChange (WatchKind_Custom 6) = True+containsChange (WatchKind_Custom 7) = True+containsChange _ = False++-- | Tests whether `WatchKind_Delete` is contained in the provided WatchKind enum+containsDelete :: WatchKind -> Bool+containsDelete WatchKind_Delete = True+containsDelete (WatchKind_Custom 5) = True+containsDelete (WatchKind_Custom 6) = True+containsDelete (WatchKind_Custom 7) = True+containsDelete _ = False++{- | Combine a set of WatchKind types into a new WatchKind type that accurately+ represents the set+-}+combineWatchKinds :: Set WatchKind -> WatchKind+combineWatchKinds s = fromOpenEnumBaseType $ sum $ toEnumBaseType <$> toList s
+ src/Language/LSP/Protocol/Utils/Misc.hs view
@@ -0,0 +1,153 @@+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TemplateHaskell #-}++module Language.LSP.Protocol.Utils.Misc (+ rdrop,+ makeSingletonFromJSON,+ makeRegHelper,+ lspOptions,+ lspOptionsUntagged,+ prettyJSON,+ ViaJSON (..),+ genLenses,+) where++import Control.Lens.Internal.FieldTH+import Control.Lens.TH+import Control.Monad+import Control.Monad.State+import Data.Aeson+import Data.Aeson.Text as Aeson+import Data.Foldable qualified as F+import Data.Foldable.WithIndex qualified as F+import Data.Functor.WithIndex.Instances qualified ()+import Data.List hiding (group)+import Data.Maybe (mapMaybe)+import Language.Haskell.TH as TH+import Prettyprinter++-- ---------------------------------------------------------------------++rdrop :: Int -> [a] -> [a]+rdrop cnt = reverse . drop cnt . reverse++{- | Given a wrapper and a singleton GADT, construct FromJSON+ instances for each constructor return type by invoking the+ FromJSON instance for the wrapper and unwrapping+-}+makeSingletonFromJSON :: Name -> Name -> [Name] -> Q [Dec]+makeSingletonFromJSON wrap gadt skip = do+ TyConI (DataD _ _ _ _ cons _) <- reify gadt+ concat <$> (sequence $ mapMaybe (makeInst wrap skip) cons)++{-+instance FromJSON (SMethod $method) where+ parseJSON = parseJSON >=> \case+ SomeMethod $singleton-method -> pure $singleton-method+ _ -> mempty+-}+makeInst :: Name -> [Name] -> Con -> Maybe (Q [Dec])+makeInst _ skip (GadtC [sConstructor] _ _) | sConstructor `elem` skip = Nothing+makeInst wrap _ (GadtC [sConstructor] args t) = Just $ do+ ns <- replicateM (length args) (newName "x")+ let wrappedPat = conP wrap [conP sConstructor (map varP ns)]+ unwrappedE = pure $ foldl' AppE (ConE sConstructor) (map VarE ns)+ [d|+ instance FromJSON $(pure t) where+ parseJSON =+ parseJSON >=> \case+ $wrappedPat -> pure $unwrappedE+ _ -> mempty+ |]+makeInst wrap skip (ForallC _ _ con) = makeInst wrap skip con -- Cancel and Custom requests+makeInst _ _ _ = Just $ fail "makeInst only defined for GADT constructors"++makeRegHelper :: Name -> DecsQ+makeRegHelper regOptTypeName = do+ Just sMethodTypeName <- lookupTypeName "SMethod"+ Just fromClientName <- lookupValueName "ClientToServer"+ TyConI (DataD _ _ _ _ allCons _) <- reify sMethodTypeName++ let isConsFromClient (GadtC _ _ (AppT _ method)) = isMethodFromClient method+ isConsFromClient _ = return False+ isMethodFromClient :: Type -> Q Bool+ isMethodFromClient (PromotedT method) = do+ DataConI _ typ _ <- reify method+ case typ of+ AppT (AppT _ (PromotedT n)) _ -> return $ n == fromClientName+ _ -> return False+ isMethodFromClient _ = fail "Didn't expect this type of Method!"++ cons <- filterM isConsFromClient allCons++ let conNames = mapMaybe (\case (GadtC [name] _ _) -> Just name; _ -> Nothing) cons+ helperName = mkName "regHelper"+ mkClause name = do+ x <- newName "x"+ clause+ [conP name [], varP x]+ (normalB (varE x))+ []+ regOptTcon = conT regOptTypeName+ fun <- funD helperName (map mkClause conNames)++ typSig <-+ sigD helperName $+ [t|+ forall m x.+ $(conT sMethodTypeName) m ->+ (Show ($regOptTcon m) => ToJSON ($regOptTcon m) => FromJSON ($regOptTcon m) => x) ->+ x+ |]+ return [typSig, fun]++{- | Standard options for use when generating JSON instances+ NOTE: This needs to be in a separate file because of the TH stage restriction+-}+lspOptions :: Options+lspOptions = defaultOptions{omitNothingFields = True, fieldLabelModifier = modifier}+ where+ modifier :: String -> String+ -- For fields called data and type in the spec, we call them xdata and xtype+ -- in haskell-lsp-types to avoid it clashing with the Haskell keywords. This+ -- fixes up the json derivation+ modifier "_xdata" = "data"+ modifier "_xtype" = "type"+ modifier xs = drop 1 xs++-- | Standard options for use when generating JSON instances for an untagged union+lspOptionsUntagged :: Options+lspOptionsUntagged = lspOptions{sumEncoding = UntaggedValue}++prettyJSON :: Value -> Doc ann+prettyJSON = \case+ Array vec ->+ let docs = fmap prettyJSON (F.toList vec)+ separator = ","+ in group $ nest 2 ("[" <> line <> vsep (punctuate separator docs)) <> line <> "]"+ Object km ->+ let docs = fmap (\(k, v) -> pretty (show k) <> ":" <+> prettyJSON v) (F.itoList km)+ separator = ","+ in group $ nest 2 ("{" <> line <> vsep (punctuate separator docs)) <> line <> "}"+ -- for atomic objects, piggyback off aeson's encoding+ v -> pretty $ Aeson.encodeToLazyText v++newtype ViaJSON a = ViaJSON a++instance ToJSON a => Pretty (ViaJSON a) where+ pretty (ViaJSON a) = prettyJSON $ toJSON a++{- | Given a list of type names, make a splice that generates the lens typeclass declarations+for all of them. Defined here to avoid stage restrictions.+-}+genLenses :: [TH.Name] -> TH.Q [TH.Dec]+genLenses names = do+ let+ -- We need to use the internals of the lens TH machinery so that we can do this+ -- in one go without generating duplicate classes.+ opticMaker :: TH.Name -> HasFieldClasses [TH.Dec]+ opticMaker n = do+ (TH.TyConI d) <- lift $ TH.reify n+ makeFieldOpticsForDec' classUnderscoreNoPrefixFields d+ decss <- flip evalStateT mempty $ traverse opticMaker names+ pure $ concat decss
+ src/Language/LSP/Protocol/Utils/SMethodMap.hs view
@@ -0,0 +1,70 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE MagicHash #-}++module Language.LSP.Protocol.Utils.SMethodMap (+ SMethodMap,+ singleton,+ insert,+ delete,+ member,+ lookup,+ map,+) where++import Data.IntMap (IntMap)+import Data.IntMap.Strict qualified as IntMap+import Data.Kind (Type)+import Data.Map (Map)+import Data.Map.Strict qualified as Map+import GHC.Exts (Any, Int (..), dataToTag#)+import Unsafe.Coerce (unsafeCoerce)+import Prelude hiding (lookup, map)++import GHC.TypeLits (symbolVal)+import Language.LSP.Protocol.Message (Method (..), SMethod (..))++-- This type exists to avoid a dependency on 'dependent-map'. It is less+-- safe (since we use 'unsafeCoerce') but much simpler and hence easier to include.++-- | A specialized alternative to a full dependent map for use with 'SMethod'.+data SMethodMap (v :: Method f t -> Type)+ = -- This works by using an 'IntMap' indexed by constructor tag for the majority+ -- of 'SMethod's, which have no parameters, and hence can only appear once as keys+ -- in the map. We do not attempt to be truly dependent here, and instead exploit+ -- 'usafeCoerce' to go to and from 'v Any'.+ -- The sole exception is 'SCustomMethod', for which we keep a separate map from+ -- its 'Text' parameter+ SMethodMap !(IntMap (v Any)) !(Map String (v Any))++toIx :: SMethod a -> Int+toIx k = I# (dataToTag# k)++singleton :: SMethod a -> v a -> SMethodMap v+singleton (SMethod_CustomMethod t) v = SMethodMap mempty (Map.singleton (symbolVal t) (unsafeCoerce v))+singleton k v = SMethodMap (IntMap.singleton (toIx k) (unsafeCoerce v)) mempty++insert :: SMethod a -> v a -> SMethodMap v -> SMethodMap v+insert (SMethod_CustomMethod t) v (SMethodMap xs ys) = SMethodMap xs (Map.insert (symbolVal t) (unsafeCoerce v) ys)+insert k v (SMethodMap xs ys) = SMethodMap (IntMap.insert (toIx k) (unsafeCoerce v) xs) ys++delete :: SMethod a -> SMethodMap v -> SMethodMap v+delete (SMethod_CustomMethod t) (SMethodMap xs ys) = SMethodMap xs (Map.delete (symbolVal t) ys)+delete k (SMethodMap xs ys) = SMethodMap (IntMap.delete (toIx k) xs) ys++member :: SMethod a -> SMethodMap v -> Bool+member (SMethod_CustomMethod t) (SMethodMap _ ys) = Map.member (symbolVal t) ys+member k (SMethodMap xs _) = IntMap.member (toIx k) xs++lookup :: SMethod a -> SMethodMap v -> Maybe (v a)+lookup (SMethod_CustomMethod t) (SMethodMap _ ys) = unsafeCoerce (Map.lookup (symbolVal t) ys)+lookup k (SMethodMap xs _) = unsafeCoerce (IntMap.lookup (toIx k) xs)++map :: (forall a. u a -> v a) -> SMethodMap u -> SMethodMap v+map f (SMethodMap xs ys) = SMethodMap (IntMap.map f xs) (Map.map f ys)++instance Semigroup (SMethodMap v) where+ SMethodMap xs ys <> SMethodMap xs' ys' = SMethodMap (xs <> xs') (ys <> ys')++instance Monoid (SMethodMap v) where+ mempty = SMethodMap mempty mempty
− src/Language/LSP/Types.hs
@@ -1,92 +0,0 @@-module Language.LSP.Types- ( module Language.LSP.Types.CallHierarchy- , module Language.LSP.Types.Cancellation- , module Language.LSP.Types.CodeAction- , module Language.LSP.Types.CodeLens- , module Language.LSP.Types.Command- , module Language.LSP.Types.Common- , module Language.LSP.Types.Completion- , module Language.LSP.Types.Configuration- , module Language.LSP.Types.Declaration- , module Language.LSP.Types.Definition- , module Language.LSP.Types.Diagnostic- , module Language.LSP.Types.DocumentColor- , module Language.LSP.Types.DocumentFilter- , module Language.LSP.Types.DocumentHighlight- , module Language.LSP.Types.DocumentLink- , module Language.LSP.Types.DocumentSymbol- , module Language.LSP.Types.FoldingRange- , module Language.LSP.Types.Formatting- , module Language.LSP.Types.Hover- , module Language.LSP.Types.Implementation- , module Language.LSP.Types.Initialize- , module Language.LSP.Types.Location- , module Language.LSP.Types.LspId- , module Language.LSP.Types.MarkupContent- , module Language.LSP.Types.Method- , module Language.LSP.Types.Message- , module Language.LSP.Types.Parsing- , module Language.LSP.Types.Progress- , module Language.LSP.Types.References- , module Language.LSP.Types.Registration- , module Language.LSP.Types.Rename- , module Language.LSP.Types.SignatureHelp- , module Language.LSP.Types.StaticRegistrationOptions- , module Language.LSP.Types.SelectionRange- , module Language.LSP.Types.SemanticTokens- , module Language.LSP.Types.TextDocument- , module Language.LSP.Types.TypeDefinition- , module Language.LSP.Types.Uri- , module Language.LSP.Types.Uri.OsPath- , module Language.LSP.Types.WatchedFiles- , module Language.LSP.Types.Window- , module Language.LSP.Types.WorkspaceEdit- , module Language.LSP.Types.WorkspaceFolders- , module Language.LSP.Types.WorkspaceSymbol- )-where--import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.Cancellation-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.Completion-import Language.LSP.Types.Configuration-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentFilter-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.Initialize-import Language.LSP.Types.Location-import Language.LSP.Types.LspId-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Message-import Language.LSP.Types.Method-import Language.LSP.Types.Parsing-import Language.LSP.Types.Progress-import Language.LSP.Types.References-import Language.LSP.Types.Registration-import Language.LSP.Types.Rename-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Uri-import Language.LSP.Types.Uri.OsPath-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.Window-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.WorkspaceFolders-import Language.LSP.Types.WorkspaceSymbol
− src/Language/LSP/Types/CallHierarchy.hs
@@ -1,100 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--{- | Since LSP 3.16.0 -}-module Language.LSP.Types.CallHierarchy where--import Data.Aeson.TH-import Data.Aeson.Types ( Value )-import Data.Text ( Text )--import Language.LSP.Types.Common-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---data CallHierarchyClientCapabilities =- CallHierarchyClientCapabilities- { _dynamicRegistration :: Maybe Bool }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyClientCapabilities--makeExtendingDatatype "CallHierarchyOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''CallHierarchyOptions--makeExtendingDatatype "CallHierarchyRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''CallHierarchyOptions- , ''StaticRegistrationOptions- ]- []-deriveJSON lspOptions ''CallHierarchyRegistrationOptions--makeExtendingDatatype "CallHierarchyPrepareParams"- [''TextDocumentPositionParams, ''WorkDoneProgressParams] []-deriveJSON lspOptions ''CallHierarchyPrepareParams--data CallHierarchyItem =- CallHierarchyItem- { _name :: Text- , _kind :: SymbolKind- , _tags :: Maybe (List SymbolTag)- -- | More detail for this item, e.g. the signature of a function.- , _detail :: Maybe Text- , _uri :: Uri- , _range :: Range- -- | The range that should be selected and revealed when this symbol- -- is being picked, e.g. the name of a function. Must be contained by- -- the @_range@.- , _selectionRange :: Range- -- | A data entry field that is preserved between a call hierarchy- -- prepare and incoming calls or outgoing calls requests.- , _xdata :: Maybe Value- }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyItem---- ---------------------------------------makeExtendingDatatype "CallHierarchyIncomingCallsParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_item", [t| CallHierarchyItem |])]-deriveJSON lspOptions ''CallHierarchyIncomingCallsParams--data CallHierarchyIncomingCall =- CallHierarchyIncomingCall- { -- | The item that makes the call.- _from :: CallHierarchyItem- -- | The ranges at which the calls appear. This is relative to the caller- -- denoted by @_from@.- , _fromRanges :: List Range- }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyIncomingCall---- ---------------------------------------makeExtendingDatatype "CallHierarchyOutgoingCallsParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_item", [t| CallHierarchyItem |])]-deriveJSON lspOptions ''CallHierarchyOutgoingCallsParams--data CallHierarchyOutgoingCall =- CallHierarchyOutgoingCall- { -- | The item that is called.- _to :: CallHierarchyItem- -- | The range at which this item is called. THis is the range relative to- -- the caller, e.g the item passed to `callHierarchy/outgoingCalls` request.- , _fromRanges :: List Range- }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyOutgoingCall
− src/Language/LSP/Types/Cancellation.hs
@@ -1,28 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE ExistentialQuantification #-}-module Language.LSP.Types.Cancellation where- -import Data.Aeson.TH-import Language.LSP.Types.LspId-import Language.LSP.Types.Utils--data CancelParams = forall m.- CancelParams- { -- | The request id to cancel.- _id :: LspId m- }--deriving instance Read CancelParams-deriving instance Show CancelParams-instance Eq CancelParams where- (CancelParams a) == CancelParams b =- case (a,b) of- (IdInt x, IdInt y) -> x == y- (IdString x, IdString y) -> x == y- _ -> False--deriveJSON lspOptions ''CancelParams
− src/Language/LSP/Types/Capabilities.hs
@@ -1,290 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-module Language.LSP.Types.Capabilities- (- module Language.LSP.Types.ClientCapabilities- , module Language.LSP.Types.ServerCapabilities- , module Language.LSP.Types.WorkspaceEdit- , fullCaps- , LSPVersion(..)- , capsForVersion- ) where--import Prelude hiding (min)-import Language.LSP.Types.ClientCapabilities-import Language.LSP.Types.ServerCapabilities-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types---- | Capabilities for full conformance to the current (v3.15) LSP specification.-fullCaps :: ClientCapabilities-fullCaps = capsForVersion (LSPVersion maxBound maxBound)---- | A specific version of the LSP specification.-data LSPVersion = LSPVersion Int Int -- ^ Construct a major.minor version---- | Capabilities for full conformance to the LSP specification up until a version.--- Some important milestones:------ * 3.12 textDocument/prepareRename request--- * 3.11 CodeActionOptions provided by the server--- * 3.10 hierarchical document symbols, folding ranges--- * 3.9 completion item preselect--- * 3.8 codeAction literals--- * 3.7 related information in diagnostics--- * 3.6 workspace folders, colors, goto type/implementation--- * 3.4 extended completion item and symbol item kinds--- * 3.0 dynamic registration-capsForVersion :: LSPVersion -> ClientCapabilities-capsForVersion (LSPVersion maj min) = ClientCapabilities (Just w) (Just td) (Just window) (since 3 16 general) Nothing- where- w = WorkspaceClientCapabilities- (Just True)- (Just (WorkspaceEditClientCapabilities- (Just True)- (since 3 13 resourceOperations)- Nothing- (since 3 16 True)- (since 3 16 (WorkspaceEditChangeAnnotationClientCapabilities (Just True)))))- (Just (DidChangeConfigurationClientCapabilities dynamicReg))- (Just (DidChangeWatchedFilesClientCapabilities dynamicReg))- (Just symbolCapabilities)- (Just (ExecuteCommandClientCapabilities dynamicReg))- (since 3 6 True)- (since 3 6 True)- (since 3 16 (SemanticTokensWorkspaceClientCapabilities $ Just True))-- resourceOperations = List- [ ResourceOperationCreate- , ResourceOperationDelete- , ResourceOperationRename- ]-- symbolCapabilities = WorkspaceSymbolClientCapabilities- dynamicReg- (since 3 4 symbolKindCapabilities)- (since 3 16 symbolTagCapabilities)-- symbolKindCapabilities =- WorkspaceSymbolKindClientCapabilities (Just sKs)-- symbolTagCapabilities =- WorkspaceSymbolTagClientCapabilities (Just (List [StDeprecated]))-- sKs- | maj >= 3 && min >= 4 = List (oldSKs ++ newSKs)- | otherwise = List oldSKs-- oldSKs = [ SkFile- , SkModule- , SkNamespace- , SkPackage- , SkClass- , SkMethod- , SkProperty- , SkField- , SkConstructor- , SkEnum- , SkInterface- , SkFunction- , SkVariable- , SkConstant- , SkString- , SkNumber- , SkBoolean- , SkArray- ]-- newSKs = [ SkObject- , SkKey- , SkNull- , SkEnumMember- , SkStruct- , SkEvent- , SkOperator- , SkTypeParameter- ]-- -- Only one token format for now, just list it here- tfs = List [ TokenFormatRelative ]-- semanticTokensCapabilities = SemanticTokensClientCapabilities- (Just True)- (SemanticTokensRequestsClientCapabilities- (Just $ SemanticTokensRangeBool True)- (Just (SemanticTokensFullDelta (SemanticTokensDeltaClientCapabilities $ Just True))))- (List knownSemanticTokenTypes)- (List knownSemanticTokenModifiers)- tfs- (Just True)- (Just True)-- td = TextDocumentClientCapabilities- (Just sync)- (Just completionCapability)- (Just hoverCapability)- (Just signatureHelpCapability)- (Just (ReferencesClientCapabilities dynamicReg))- (Just (DocumentHighlightClientCapabilities dynamicReg))- (Just documentSymbolCapability)- (Just (DocumentFormattingClientCapabilities dynamicReg))- (Just (DocumentRangeFormattingClientCapabilities dynamicReg))- (Just (DocumentOnTypeFormattingClientCapabilities dynamicReg))- (since 3 14 (DeclarationClientCapabilities dynamicReg (Just True)))- (Just (DefinitionClientCapabilities dynamicReg (since 3 14 True)))- (since 3 6 (TypeDefinitionClientCapabilities dynamicReg (since 3 14 True)))- (since 3 6 (ImplementationClientCapabilities dynamicReg (since 3 14 True)))- (Just codeActionCapability)- (Just (CodeLensClientCapabilities dynamicReg))- (Just (DocumentLinkClientCapabilities dynamicReg (since 3 15 True)))- (since 3 6 (DocumentColorClientCapabilities dynamicReg))- (Just (RenameClientCapabilities dynamicReg (since 3 12 True) (since 3 16 PsIdentifier) (since 3 16 True)))- (Just publishDiagnosticsCapabilities)- (since 3 10 foldingRangeCapability)- (since 3 5 (SelectionRangeClientCapabilities dynamicReg))- (since 3 16 (CallHierarchyClientCapabilities dynamicReg))- (since 3 16 semanticTokensCapabilities)-- sync =- TextDocumentSyncClientCapabilities- dynamicReg- (Just True)- (Just True)- (Just True)-- completionCapability =- CompletionClientCapabilities- dynamicReg- (Just completionItemCapabilities)- (since 3 4 completionItemKindCapabilities)- (since 3 3 True)-- completionItemCapabilities = CompletionItemClientCapabilities- (Just True)- (Just True)- (since 3 3 (List [MkPlainText, MkMarkdown]))- (Just True)- (since 3 9 True)- (since 3 15 completionItemTagsCapabilities)- (since 3 16 True)- (since 3 16 (CompletionItemResolveClientCapabilities (List ["documentation", "details"])))- (since 3 16 (CompletionItemInsertTextModeClientCapabilities (List [])))-- completionItemKindCapabilities =- CompletionItemKindClientCapabilities (Just ciKs)-- completionItemTagsCapabilities =- CompletionItemTagsClientCapabilities (List [ CitDeprecated ])-- ciKs- | maj >= 3 && min >= 4 = List (oldCiKs ++ newCiKs)- | otherwise = List oldCiKs-- oldCiKs = [ CiText- , CiMethod- , CiFunction- , CiConstructor- , CiField- , CiVariable- , CiClass- , CiInterface- , CiModule- , CiProperty- , CiUnit- , CiValue- , CiEnum- , CiKeyword- , CiSnippet- , CiColor- , CiFile- , CiReference- ]-- newCiKs = [ CiFolder- , CiEnumMember- , CiConstant- , CiStruct- , CiEvent- , CiOperator- , CiTypeParameter- ]-- hoverCapability =- HoverClientCapabilities- dynamicReg- (since 3 3 (List [MkPlainText, MkMarkdown]))-- codeActionCapability- = CodeActionClientCapabilities- dynamicReg- (since 3 8 (CodeActionLiteralSupport caKs))- (since 3 15 True)- (since 3 16 True)- (since 3 16 True)- (since 3 16 (CodeActionResolveClientCapabilities (List [])))- (since 3 16 True)- caKs = CodeActionKindClientCapabilities- (List specCodeActionKinds)-- signatureHelpCapability =- SignatureHelpClientCapabilities- dynamicReg- (Just signatureInformationCapability)- Nothing-- signatureInformationCapability =- SignatureHelpSignatureInformation- (Just (List [MkPlainText, MkMarkdown]))- (Just signatureParameterCapability)- (since 3 16 True)-- signatureParameterCapability =- SignatureHelpParameterInformation (since 3 14 True)-- documentSymbolCapability =- DocumentSymbolClientCapabilities- dynamicReg- (since 3 4 documentSymbolKind)- (since 3 10 True)- (since 3 16 documentSymbolTag)- (since 3 16 True)-- documentSymbolKind =- DocumentSymbolKindClientCapabilities- (Just sKs) -- same as workspace symbol kinds-- documentSymbolTag =- DocumentSymbolTagClientCapabilities (Just (List [StDeprecated]))-- foldingRangeCapability =- FoldingRangeClientCapabilities- dynamicReg- Nothing- (Just False)-- publishDiagnosticsCapabilities =- PublishDiagnosticsClientCapabilities- (since 3 7 True)- (since 3 15 publishDiagnosticsTagsCapabilities)- (since 3 15 True)-- publishDiagnosticsTagsCapabilities =- PublishDiagnosticsTagsClientCapabilities- (List [ DtUnnecessary, DtDeprecated ])-- dynamicReg- | maj >= 3 = Just True- | otherwise = Nothing- since x y a- | maj >= x && min >= y = Just a- | otherwise = Nothing-- window =- WindowClientCapabilities- (since 3 15 True)- (since 3 16 $ ShowMessageRequestClientCapabilities Nothing)- (since 3 16 $ ShowDocumentClientCapabilities True)-- general = GeneralClientCapabilities- (since 3 16 $ StaleRequestClientCapabilities True (List []))- (since 3 16 $ RegularExpressionsClientCapabilities "" Nothing)- (since 3 16 $ MarkdownClientCapabilities "" Nothing)
− src/Language/LSP/Types/ClientCapabilities.hs
@@ -1,295 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.ClientCapabilities where--import Data.Aeson.TH-import qualified Data.Aeson as A-import Data.Default-import Data.Text (Text)--import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Completion-import Language.LSP.Types.Configuration-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.WorkspaceSymbol-import Language.LSP.Types.MarkupContent (MarkdownClientCapabilities)-import Language.LSP.Types.Common (List)---data WorkspaceClientCapabilities =- WorkspaceClientCapabilities- { -- | The client supports applying batch edits to the workspace by supporting- -- the request 'workspace/applyEdit'- _applyEdit :: Maybe Bool-- -- | Capabilities specific to `WorkspaceEdit`s- , _workspaceEdit :: Maybe WorkspaceEditClientCapabilities-- -- | Capabilities specific to the `workspace/didChangeConfiguration` notification.- , _didChangeConfiguration :: Maybe DidChangeConfigurationClientCapabilities-- -- | Capabilities specific to the `workspace/didChangeWatchedFiles` notification.- , _didChangeWatchedFiles :: Maybe DidChangeWatchedFilesClientCapabilities-- -- | Capabilities specific to the `workspace/symbol` request.- , _symbol :: Maybe WorkspaceSymbolClientCapabilities-- -- | Capabilities specific to the `workspace/executeCommand` request.- , _executeCommand :: Maybe ExecuteCommandClientCapabilities-- -- | The client has support for workspace folders.- , _workspaceFolders :: Maybe Bool-- -- | The client supports `workspace/configuration` requests.- , _configuration :: Maybe Bool-- -- | Capabilities specific to the semantic token requests scoped to the- -- workspace.- --- -- @since 3.16.0- , _semanticTokens :: Maybe SemanticTokensWorkspaceClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceClientCapabilities--instance Default WorkspaceClientCapabilities where- def = WorkspaceClientCapabilities def def def def def def def def def---- ---------------------------------------data TextDocumentClientCapabilities =- TextDocumentClientCapabilities- { _synchronization :: Maybe TextDocumentSyncClientCapabilities-- -- | Capabilities specific to the `textDocument/completion`- , _completion :: Maybe CompletionClientCapabilities-- -- | Capabilities specific to the `textDocument/hover`- , _hover :: Maybe HoverClientCapabilities-- -- | Capabilities specific to the `textDocument/signatureHelp`- , _signatureHelp :: Maybe SignatureHelpClientCapabilities-- -- | Capabilities specific to the `textDocument/references`- , _references :: Maybe ReferencesClientCapabilities-- -- | Capabilities specific to the `textDocument/documentHighlight`- , _documentHighlight :: Maybe DocumentHighlightClientCapabilities-- -- | Capabilities specific to the `textDocument/documentSymbol`- , _documentSymbol :: Maybe DocumentSymbolClientCapabilities-- -- | Capabilities specific to the `textDocument/formatting`- , _formatting :: Maybe DocumentFormattingClientCapabilities-- -- | Capabilities specific to the `textDocument/rangeFormatting`- , _rangeFormatting :: Maybe DocumentRangeFormattingClientCapabilities-- -- | Capabilities specific to the `textDocument/onTypeFormatting`- , _onTypeFormatting :: Maybe DocumentOnTypeFormattingClientCapabilities-- -- | Capabilities specific to the `textDocument/declaration` request.- --- -- Since LSP 3.14.0- , _declaration :: Maybe DeclarationClientCapabilities-- -- | Capabilities specific to the `textDocument/definition`- , _definition :: Maybe DefinitionClientCapabilities-- -- | Capabilities specific to the `textDocument/typeDefinition`- , _typeDefinition :: Maybe TypeDefinitionClientCapabilities-- -- | Capabilities specific to the `textDocument/implementation`- , _implementation :: Maybe ImplementationClientCapabilities-- -- | Capabilities specific to the `textDocument/codeAction`- , _codeAction :: Maybe CodeActionClientCapabilities-- -- | Capabilities specific to the `textDocument/codeLens`- , _codeLens :: Maybe CodeLensClientCapabilities-- -- | Capabilities specific to the `textDocument/documentLink`- , _documentLink :: Maybe DocumentLinkClientCapabilities-- -- | Capabilities specific to the `textDocument/documentColor` and the- -- `textDocument/colorPresentation` request- , _colorProvider :: Maybe DocumentColorClientCapabilities-- -- | Capabilities specific to the `textDocument/rename`- , _rename :: Maybe RenameClientCapabilities-- -- | Capabilities specific to `textDocument/publishDiagnostics`- , _publishDiagnostics :: Maybe PublishDiagnosticsClientCapabilities-- -- | Capabilities specific to the `textDocument/foldingRange` request.- -- Since LSP 3.10.- --- -- @since 0.7.0.0- , _foldingRange :: Maybe FoldingRangeClientCapabilities-- -- | Capabilities specific to the `textDocument/selectionRange` request.- -- Since LSP 3.15.0- , _selectionRange :: Maybe SelectionRangeClientCapabilities-- -- | Call hierarchy specific to the `textDocument/prepareCallHierarchy` request.- -- Since LSP 3.16.0- , _callHierarchy :: Maybe CallHierarchyClientCapabilities-- -- | Capabilities specific to the various semantic token requests.- --- -- @since 3.16.0- , _semanticTokens :: Maybe SemanticTokensClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentClientCapabilities--instance Default TextDocumentClientCapabilities where- def = TextDocumentClientCapabilities def def def def def def def def- def def def def def def def def- def def def def def def def def---- ------------------------------------------------------------------------- | Capabilities specific to the `MessageActionItem` type.-data MessageActionItemClientCapabilities =- MessageActionItemClientCapabilities- {- -- | Whether the client supports additional attributes which- -- are preserved and sent back to the server in the- -- request's response.- _additionalPropertiesSupport :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''MessageActionItemClientCapabilities---- | Show message request client capabilities-data ShowMessageRequestClientCapabilities =- ShowMessageRequestClientCapabilities- { -- | Capabilities specific to the `MessageActionItem` type.- _messageActionItem :: Maybe MessageActionItemClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowMessageRequestClientCapabilities---- | Client capabilities for the show document request.------ @since 3.16.0-data ShowDocumentClientCapabilities =- ShowDocumentClientCapabilities- { -- | The client has support for the show document request- _support :: Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentClientCapabilities---- | Window specific client capabilities.-data WindowClientCapabilities =- WindowClientCapabilities- { -- | Whether client supports handling progress notifications.- --- -- @since 3.15.0- _workDoneProgress :: Maybe Bool- -- | Capabilities specific to the showMessage request- --- -- @since 3.16.0- , _showMessage :: Maybe ShowMessageRequestClientCapabilities- -- | Capabilities specific to the showDocument request- --- -- @since 3.16.0- , _showDocument :: Maybe ShowDocumentClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WindowClientCapabilities--instance Default WindowClientCapabilities where- def = WindowClientCapabilities def def def---- ------------------------------------------------------------------------- | Client capability that signals how the client--- handles stale requests (e.g. a request--- for which the client will not process the response--- anymore since the information is outdated).--- @since 3.17.0-data StaleRequestClientCapabilities =- StaleRequestClientCapabilities- { _cancel :: Bool- , _retryOnContentModified :: List Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''StaleRequestClientCapabilities---- | Client capabilities specific to the used markdown parser.--- @since 3.16.0-data RegularExpressionsClientCapabilities =- RegularExpressionsClientCapabilities- { _engine :: Text- , _version :: Maybe Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RegularExpressionsClientCapabilities---- | General client capabilities.--- @since 3.16.0-data GeneralClientCapabilities =- GeneralClientCapabilities- {- _staleRequestSupport :: Maybe StaleRequestClientCapabilities- -- | Client capabilities specific to regular expressions.- -- @since 3.16.0- , _regularExpressions :: Maybe RegularExpressionsClientCapabilities- -- | Client capabilities specific to the client's markdown parser.- -- @since 3.16.0- , _markdown :: Maybe MarkdownClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''GeneralClientCapabilities--instance Default GeneralClientCapabilities where- def = GeneralClientCapabilities def def def---- -----------------------------------------------------------------------data ClientCapabilities =- ClientCapabilities- { -- | Workspace specific client capabilities- _workspace :: Maybe WorkspaceClientCapabilities- -- | Text document specific client capabilities- , _textDocument :: Maybe TextDocumentClientCapabilities- -- | Window specific client capabilities.- , _window :: Maybe WindowClientCapabilities- -- | General client capabilities.- -- @since 3.16.0- , _general :: Maybe GeneralClientCapabilities- -- | Experimental client capabilities.- , _experimental :: Maybe A.Object- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ClientCapabilities--instance Default ClientCapabilities where- def = ClientCapabilities def def def def def
− src/Language/LSP/Types/CodeAction.hs
@@ -1,268 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.CodeAction where--import Data.Aeson.TH-import Data.Aeson.Types-import Data.Default-import Data.String-import Data.Text ( Text )-import qualified Data.Text as T-import Language.LSP.Types.Command-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceEdit---data CodeActionKind- = -- | Empty kind.- CodeActionEmpty- | -- | Base kind for quickfix actions: @quickfix@.- CodeActionQuickFix- | -- | Base kind for refactoring actions: @refactor@.- CodeActionRefactor- | -- | Base kind for refactoring extraction actions: @refactor.extract@.- -- Example extract actions:- --- -- - Extract method- -- - Extract function- -- - Extract variable- -- - Extract interface from class- -- - ...- CodeActionRefactorExtract- | -- | Base kind for refactoring inline actions: @refactor.inline@.- --- -- Example inline actions:- --- -- - Inline function- -- - Inline variable- -- - Inline constant- -- - ...- CodeActionRefactorInline- | -- | Base kind for refactoring rewrite actions: @refactor.rewrite@.- --- -- Example rewrite actions:- --- -- - Convert JavaScript function to class- -- - Add or remove parameter- -- - Encapsulate field- -- - Make method static- -- - Move method to base class- -- - ...- CodeActionRefactorRewrite- | -- | Base kind for source actions: @source@.- --- -- Source code actions apply to the entire file.- CodeActionSource- | -- | Base kind for an organize imports source action: @source.organizeImports@.- CodeActionSourceOrganizeImports- | CodeActionUnknown Text- deriving (Read, Show, Eq)--fromHierarchicalString :: Text -> CodeActionKind-fromHierarchicalString t = case t of- "" -> CodeActionEmpty- "quickfix" -> CodeActionQuickFix- "refactor" -> CodeActionRefactor- "refactor.extract" -> CodeActionRefactorExtract- "refactor.inline" -> CodeActionRefactorInline- "refactor.rewrite" -> CodeActionRefactorRewrite- "source" -> CodeActionSource- "source.organizeImports" -> CodeActionSourceOrganizeImports- s -> CodeActionUnknown s--toHierarchicalString :: CodeActionKind -> Text-toHierarchicalString k = case k of- CodeActionEmpty -> ""- CodeActionQuickFix -> "quickfix"- CodeActionRefactor -> "refactor"- CodeActionRefactorExtract -> "refactor.extract"- CodeActionRefactorInline -> "refactor.inline"- CodeActionRefactorRewrite -> "refactor.rewrite"- CodeActionSource -> "source"- CodeActionSourceOrganizeImports -> "source.organizeImports"- (CodeActionUnknown s) -> s--instance IsString CodeActionKind where- fromString = fromHierarchicalString . T.pack--instance ToJSON CodeActionKind where- toJSON = String . toHierarchicalString--instance FromJSON CodeActionKind where- parseJSON (String s) = pure $ fromHierarchicalString s- parseJSON _ = fail "CodeActionKind"---- | Does the first 'CodeActionKind' subsume the other one, hierarchically. Reflexive.-codeActionKindSubsumes :: CodeActionKind -> CodeActionKind -> Bool--- Simple but ugly implementation: prefix on the string representation-codeActionKindSubsumes parent child = toHierarchicalString parent `T.isPrefixOf` toHierarchicalString child---- | The 'CodeActionKind's listed in the LSP spec specifically.-specCodeActionKinds :: [CodeActionKind]-specCodeActionKinds = [- CodeActionQuickFix- , CodeActionRefactor- , CodeActionRefactorExtract- , CodeActionRefactorInline- , CodeActionRefactorRewrite- , CodeActionSource- , CodeActionSourceOrganizeImports- ]---- ---------------------------------------data CodeActionKindClientCapabilities =- CodeActionKindClientCapabilities- { -- | The code action kind values the client supports. When this- -- property exists the client also guarantees that it will- -- handle values outside its set gracefully and falls back- -- to a default value when unknown.- _valueSet :: List CodeActionKind- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionKindClientCapabilities--instance Default CodeActionKindClientCapabilities where- def = CodeActionKindClientCapabilities (List specCodeActionKinds)--data CodeActionLiteralSupport =- CodeActionLiteralSupport- { _codeActionKind :: CodeActionKindClientCapabilities -- ^ The code action kind is support with the following value set.- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionLiteralSupport--data CodeActionResolveClientCapabilities =- CodeActionResolveClientCapabilities- { _properties :: List Text -- ^ The properties that a client can resolve lazily.- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionResolveClientCapabilities--data CodeActionClientCapabilities = CodeActionClientCapabilities- { -- | Whether code action supports dynamic registration.- _dynamicRegistration :: Maybe Bool,- -- | The client support code action literals as a valid response- -- of the `textDocument/codeAction` request.- -- Since 3.8.0- _codeActionLiteralSupport :: Maybe CodeActionLiteralSupport,- -- | Whether code action supports the `isPreferred` property. Since LSP 3.15.0- _isPreferredSupport :: Maybe Bool,- -- | Whether code action supports the `disabled` property.- --- -- @since 3.16.0- _disabledSupport :: Maybe Bool,- -- | Whether code action supports the `data` property which is- -- preserved between a `textDocument/codeAction` and a- -- `codeAction/resolve` request.- --- -- @since 3.16.0- _dataSupport :: Maybe Bool,- -- | Whether the client supports resolving additional code action- -- properties via a separate `codeAction/resolve` request.- --- -- @since 3.16.0- _resolveSupport :: Maybe CodeActionResolveClientCapabilities,- -- | Whether the client honors the change annotations in- -- text edits and resource operations returned via the- -- `CodeAction#edit` property by for example presenting- -- the workspace edit in the user interface and asking- -- for confirmation.- --- -- @since 3.16.0- _honorsChangeAnnotations :: Maybe Bool- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionClientCapabilities---- ---------------------------------------makeExtendingDatatype "CodeActionOptions" [''WorkDoneProgressOptions]- [("_codeActionKinds", [t| Maybe (List CodeActionKind) |]), ("_resolveProvider", [t| Maybe Bool |]) ]-deriveJSON lspOptions ''CodeActionOptions--makeExtendingDatatype "CodeActionRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''CodeActionOptions- ] []-deriveJSON lspOptions ''CodeActionRegistrationOptions---- ----------------------------------------- | Contains additional diagnostic information about the context in which a--- code action is run.-data CodeActionContext = CodeActionContext- { -- | An array of diagnostics known on the client side overlapping the range provided to the- -- @textDocument/codeAction@ request. They are provided so that the server knows which- -- errors are currently presented to the user for the given range. There is no guarantee- -- that these accurately reflect the error state of the resource. The primary parameter- -- to compute code actions is the provided range.- _diagnostics :: List Diagnostic- -- | Requested kind of actions to return.- --- -- Actions not of this kind are filtered out by the client before being shown. So servers- -- can omit computing them.- , _only :: Maybe (List CodeActionKind)- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''CodeActionContext--makeExtendingDatatype "CodeActionParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [ ("_textDocument", [t|TextDocumentIdentifier|]),- ("_range", [t|Range|]),- ("_context", [t|CodeActionContext|])- ]-deriveJSON lspOptions ''CodeActionParams--newtype Reason = Reason {_reason :: Text}- deriving (Read, Show, Eq)--deriveJSON lspOptions ''Reason---- | A code action represents a change that can be performed in code, e.g. to fix a problem or--- to refactor code.------ A CodeAction must set either '_edit' and/or a '_command'. If both are supplied,--- the '_edit' is applied first, then the '_command' is executed.-data CodeAction =- CodeAction- { -- | A short, human-readable, title for this code action.- _title :: Text,- -- | The kind of the code action. Used to filter code actions.- _kind :: Maybe CodeActionKind,- -- | The diagnostics that this code action resolves.- _diagnostics :: Maybe (List Diagnostic),- -- | Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted- -- by keybindings.- --- -- A quick fix should be marked preferred if it properly addresses the underlying error.- -- A refactoring should be marked preferred if it is the most reasonable choice of actions to take.- --- -- Since LSP 3.15.0- _isPreferred :: Maybe Bool,- _disabled :: Maybe Reason, -- ^ Marks that the code action cannot currently be applied.- -- | The workspace edit this code action performs.- _edit :: Maybe WorkspaceEdit,- -- | A command this code action executes. If a code action- -- provides an edit and a command, first the edit is- -- executed and then the command.- _command :: Maybe Command,- -- | A data entry field that is preserved on a code action between- -- a `textDocument/codeAction` and a `codeAction/resolve` request.- --- -- @since 3.16.0- _xdata :: Maybe Value- }- deriving (Read, Show, Eq)-deriveJSON lspOptions ''CodeAction
− src/Language/LSP/Types/CodeLens.hs
@@ -1,64 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.CodeLens where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Command-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils---- ---------------------------------------data CodeLensClientCapabilities =- CodeLensClientCapabilities- { -- | Whether code lens supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeLensClientCapabilities---- ---------------------------------------makeExtendingDatatype "CodeLensOptions" [''WorkDoneProgressOptions]- [ ("_resolveProvider", [t| Maybe Bool |] )]-deriveJSON lspOptions ''CodeLensOptions--makeExtendingDatatype "CodeLensRegistrationOptions" - [ ''TextDocumentRegistrationOptions- , ''CodeLensOptions- ] []-deriveJSON lspOptions ''CodeLensRegistrationOptions---- ---------------------------------------makeExtendingDatatype "CodeLensParams"- [ ''WorkDoneProgressParams,- ''PartialResultParams- ]- [("_textDocument", [t|TextDocumentIdentifier|])]-deriveJSON lspOptions ''CodeLensParams---- ----------------------------------------- | A code lens represents a command that should be shown along with source--- text, like the number of references, a way to run tests, etc.--- --- A code lens is _unresolved_ when no command is associated to it. For--- performance reasons the creation of a code lens and resolving should be done--- in two stages.-data CodeLens =- CodeLens- { -- | The range in which this code lens is valid. Should only span a single line.- _range :: Range- , -- | The command this code lens represents.- _command :: Maybe Command- , -- | A data entry field that is preserved on a code lens item between- -- a code lens and a code lens resolve request.- _xdata :: Maybe Value- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CodeLens
− src/Language/LSP/Types/Command.hs
@@ -1,51 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.Command where--import Data.Aeson-import Data.Aeson.TH-import Data.Text-import Language.LSP.Types.Common-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils---- ---------------------------------------data ExecuteCommandClientCapabilities =- ExecuteCommandClientCapabilities- { _dynamicRegistration :: Maybe Bool -- ^Execute command supports dynamic- -- registration.- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ExecuteCommandClientCapabilities---- ---------------------------------------makeExtendingDatatype "ExecuteCommandOptions" [''WorkDoneProgressOptions]- [("_commands", [t| List Text |])]-deriveJSON lspOptions ''ExecuteCommandOptions--makeExtendingDatatype "ExecuteCommandRegistrationOptions" [''ExecuteCommandOptions] []-deriveJSON lspOptions ''ExecuteCommandRegistrationOptions---- ---------------------------------------makeExtendingDatatype "ExecuteCommandParams" [''WorkDoneProgressParams]- [ ("_command", [t| Text |])- , ("_arguments", [t| Maybe (List Value) |])- ]-deriveJSON lspOptions ''ExecuteCommandParams--data Command =- Command- { -- | Title of the command, like @save@.- _title :: Text- , -- | The identifier of the actual command handler.- _command :: Text- , -- | Arguments that the command handler should be invoked with.- _arguments :: Maybe (List Value)- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''Command-
− src/Language/LSP/Types/Common.hs
@@ -1,103 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveAnyClass #-}-{-# LANGUAGE DeriveTraversable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE DerivingStrategies #-}-{-# LANGUAGE TypeOperators #-}---- | Common types that aren't in the specification-module Language.LSP.Types.Common (- type (|?) (..)- , toEither- , List (..)- , Empty (..)- , Int32- , UInt ) where--import Control.Applicative-import Control.DeepSeq-import Data.Aeson-import Data.Hashable-import Data.Int (Int32)-import Data.Mod.Word-import Text.Read (Read(readPrec))-import GHC.Generics hiding (UInt)-import GHC.TypeNats hiding (Mod)-import Data.Bifunctor (bimap)---- | The "uinteger" type in the LSP spec.------ Unusually, this is a **31**-bit unsigned integer, not a 32-bit one.-newtype UInt = UInt (Mod (2^31))- deriving newtype (Num, Bounded, Enum, Eq, Ord)- deriving stock (Generic)- deriving anyclass (NFData)--instance Hashable UInt where hashWithSalt s (UInt n) = hashWithSalt s (unMod n)--instance Show UInt where- show (UInt u) = show $ unMod u--instance Read UInt where- readPrec = fromInteger <$> readPrec--instance Real UInt where- toRational (UInt u) = toRational $ unMod u--instance Integral UInt where- quotRem (UInt x) (UInt y) = bimap fromIntegral fromIntegral $ quotRem (unMod x) (unMod y)- toInteger (UInt u) = toInteger $ unMod u--instance ToJSON UInt where- toJSON u = toJSON (toInteger u)--instance FromJSON UInt where- parseJSON v = fromInteger <$> parseJSON v---- | A terser, isomorphic data type for 'Either', that does not get tagged when--- converting to and from JSON.-data a |? b = InL a- | InR b- deriving (Read,Show,Eq,Ord,Generic)-infixr |?--toEither :: a |? b -> Either a b-toEither (InL a) = Left a-toEither (InR b) = Right b--instance (ToJSON a, ToJSON b) => ToJSON (a |? b) where- toJSON (InL x) = toJSON x- toJSON (InR x) = toJSON x--instance (FromJSON a, FromJSON b) => FromJSON (a |? b) where- -- Important: Try to parse the **rightmost** type first, as in the specification- -- the more complex types tend to appear on the right of the |, i.e.- -- @colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;@- parseJSON v = InR <$> parseJSON v <|> InL <$> parseJSON v--instance (NFData a, NFData b) => NFData (a |? b)---- | All LSP types representing a list **must** use this type rather than '[]'.--- In particular this is necessary to change the 'FromJSON' instance to be compatible--- with Elisp (where empty lists show up as 'null')-newtype List a = List [a]- deriving stock (Traversable,Generic)- deriving newtype (Show,Read,Eq,Ord,Semigroup,Monoid,Functor,Foldable)--instance NFData a => NFData (List a)--instance (ToJSON a) => ToJSON (List a) where- toJSON (List ls) = toJSON ls--instance (FromJSON a) => FromJSON (List a) where- parseJSON Null = return (List [])- parseJSON v = List <$> parseJSON v--data Empty = Empty deriving (Eq,Ord,Show)-instance ToJSON Empty where- toJSON Empty = Null-instance FromJSON Empty where- parseJSON Null = pure Empty- parseJSON (Object o) | o == mempty = pure Empty- parseJSON _ = fail "expected 'null' or '{}'"
− src/Language/LSP/Types/Completion.hs
@@ -1,418 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Completion where--import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Scientific ( Scientific )-import Data.Text ( Text )-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.Location (Range)--data CompletionItemKind = CiText- | CiMethod- | CiFunction- | CiConstructor- | CiField- | CiVariable- | CiClass- | CiInterface- | CiModule- | CiProperty- | CiUnit- | CiValue- | CiEnum- | CiKeyword- | CiSnippet- | CiColor- | CiFile- | CiReference- | CiFolder- | CiEnumMember- | CiConstant- | CiStruct- | CiEvent- | CiOperator- | CiTypeParameter- deriving (Read,Show,Eq,Ord)--instance A.ToJSON CompletionItemKind where- toJSON CiText = A.Number 1- toJSON CiMethod = A.Number 2- toJSON CiFunction = A.Number 3- toJSON CiConstructor = A.Number 4- toJSON CiField = A.Number 5- toJSON CiVariable = A.Number 6- toJSON CiClass = A.Number 7- toJSON CiInterface = A.Number 8- toJSON CiModule = A.Number 9- toJSON CiProperty = A.Number 10- toJSON CiUnit = A.Number 11- toJSON CiValue = A.Number 12- toJSON CiEnum = A.Number 13- toJSON CiKeyword = A.Number 14- toJSON CiSnippet = A.Number 15- toJSON CiColor = A.Number 16- toJSON CiFile = A.Number 17- toJSON CiReference = A.Number 18- toJSON CiFolder = A.Number 19- toJSON CiEnumMember = A.Number 20- toJSON CiConstant = A.Number 21- toJSON CiStruct = A.Number 22- toJSON CiEvent = A.Number 23- toJSON CiOperator = A.Number 24- toJSON CiTypeParameter = A.Number 25--instance A.FromJSON CompletionItemKind where- parseJSON (A.Number 1) = pure CiText- parseJSON (A.Number 2) = pure CiMethod- parseJSON (A.Number 3) = pure CiFunction- parseJSON (A.Number 4) = pure CiConstructor- parseJSON (A.Number 5) = pure CiField- parseJSON (A.Number 6) = pure CiVariable- parseJSON (A.Number 7) = pure CiClass- parseJSON (A.Number 8) = pure CiInterface- parseJSON (A.Number 9) = pure CiModule- parseJSON (A.Number 10) = pure CiProperty- parseJSON (A.Number 11) = pure CiUnit- parseJSON (A.Number 12) = pure CiValue- parseJSON (A.Number 13) = pure CiEnum- parseJSON (A.Number 14) = pure CiKeyword- parseJSON (A.Number 15) = pure CiSnippet- parseJSON (A.Number 16) = pure CiColor- parseJSON (A.Number 17) = pure CiFile- parseJSON (A.Number 18) = pure CiReference- parseJSON (A.Number 19) = pure CiFolder- parseJSON (A.Number 20) = pure CiEnumMember- parseJSON (A.Number 21) = pure CiConstant- parseJSON (A.Number 22) = pure CiStruct- parseJSON (A.Number 23) = pure CiEvent- parseJSON (A.Number 24) = pure CiOperator- parseJSON (A.Number 25) = pure CiTypeParameter- parseJSON _ = fail "CompletionItemKind"--data CompletionItemTag- -- | Render a completion as obsolete, usually using a strike-out.- = CitDeprecated- | CitUnknown Scientific- deriving (Eq, Ord, Show, Read)--instance A.ToJSON CompletionItemTag where- toJSON CitDeprecated = A.Number 1- toJSON (CitUnknown i) = A.Number i--instance A.FromJSON CompletionItemTag where- parseJSON (A.Number 1) = pure CitDeprecated- parseJSON _ = fail "CompletionItemTag"--data CompletionItemTagsClientCapabilities =- CompletionItemTagsClientCapabilities- { -- | The tag supported by the client.- _valueSet :: List CompletionItemTag- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemTagsClientCapabilities--data CompletionItemResolveClientCapabilities =- CompletionItemResolveClientCapabilities- { -- | The properties that a client can resolve lazily.- _properties :: List Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemResolveClientCapabilities--{-|-How whitespace and indentation is handled during completion-item insertion.--@since 3.16.0--}-data InsertTextMode =- -- | The insertion or replace strings is taken as it is. If the- -- value is multi line the lines below the cursor will be- -- inserted using the indentation defined in the string value.- -- The client will not apply any kind of adjustments to the- -- string.- AsIs- -- | The editor adjusts leading whitespace of new lines so that- -- they match the indentation up to the cursor of the line for- -- which the item is accepted.- --- -- Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a- -- multi line completion item is indented using 2 tabs and all- -- following lines inserted will be indented using 2 tabs as well.- | AdjustIndentation- deriving (Read,Show,Eq)--instance A.ToJSON InsertTextMode where- toJSON AsIs = A.Number 1- toJSON AdjustIndentation = A.Number 2--instance A.FromJSON InsertTextMode where- parseJSON (A.Number 1) = pure AsIs- parseJSON (A.Number 2) = pure AdjustIndentation- parseJSON _ = fail "InsertTextMode"--data CompletionItemInsertTextModeClientCapabilities =- CompletionItemInsertTextModeClientCapabilities- { _valueSet :: List InsertTextMode- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemInsertTextModeClientCapabilities--data CompletionItemClientCapabilities =- CompletionItemClientCapabilities- { -- | Client supports snippets as insert text.- --- -- A snippet can define tab stops and placeholders with `$1`, `$2` and- -- `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of- -- the snippet. Placeholders with equal identifiers are linked, that is- -- typing in one will update others too.- _snippetSupport :: Maybe Bool-- -- | Client supports commit characters on a completion item.- , _commitCharactersSupport :: Maybe Bool-- -- | Client supports the follow content formats for the documentation- -- property. The order describes the preferred format of the client.- , _documentationFormat :: Maybe (List MarkupKind)-- -- | Client supports the deprecated property on a completion item.- , _deprecatedSupport :: Maybe Bool-- -- | Client supports the preselect property on a completion item.- , _preselectSupport :: Maybe Bool-- -- | Client supports the tag property on a completion item. Clients- -- supporting tags have to handle unknown tags gracefully. Clients- -- especially need to preserve unknown tags when sending a- -- completion item back to the server in a resolve call.- --- -- @since 3.15.0- , _tagSupport :: Maybe CompletionItemTagsClientCapabilities- -- | Client supports insert replace edit to control different behavior if- -- completion item is inserted in the text or should replace text.- --- -- @since 3.16.0- , _insertReplaceSupport :: Maybe Bool- -- | Indicates which properties a client can resolve lazily on a- -- completion item. Before version 3.16.0 only the predefined properties- -- `documentation` and `details` could be resolved lazily.- --- -- @since 3.16.0- , _resolveSupport :: Maybe CompletionItemResolveClientCapabilities- -- | The client supports the `insertTextMode` property on- -- a completion item to override the whitespace handling mode- -- as defined by the client (see `insertTextMode`).- --- -- @since 3.16.0- , _insertTextModeSupport :: Maybe CompletionItemInsertTextModeClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemClientCapabilities--data CompletionItemKindClientCapabilities =- CompletionItemKindClientCapabilities- { -- | The completion item kind values the client supports. When this- -- property exists the client also guarantees that it will- -- handle values outside its set gracefully and falls back- -- to a default value when unknown.- _valueSet :: Maybe (List CompletionItemKind)- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemKindClientCapabilities--data CompletionClientCapabilities =- CompletionClientCapabilities- { _dynamicRegistration :: Maybe Bool -- ^ Whether completion supports dynamic- -- registration.- , _completionItem :: Maybe CompletionItemClientCapabilities- , _completionItemKind :: Maybe CompletionItemKindClientCapabilities- , _contextSupport :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionClientCapabilities---- ---------------------------------------data InsertTextFormat- = PlainText -- ^The primary text to be inserted is treated as a plain string.- | Snippet- -- ^ The primary text to be inserted is treated as a snippet.- --- -- A snippet can define tab stops and placeholders with `$1`, `$2`- -- and `${3:foo}`. `$0` defines the final tab stop, it defaults to- -- the end of the snippet. Placeholders with equal identifiers are linked,- -- that is typing in one will update others too.- --- -- See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md- deriving (Show, Read, Eq)--instance A.ToJSON InsertTextFormat where- toJSON PlainText = A.Number 1- toJSON Snippet = A.Number 2--instance A.FromJSON InsertTextFormat where- parseJSON (A.Number 1) = pure PlainText- parseJSON (A.Number 2) = pure Snippet- parseJSON _ = fail "InsertTextFormat"--data CompletionDoc = CompletionDocString Text- | CompletionDocMarkup MarkupContent- deriving (Show, Read, Eq)--deriveJSON lspOptionsUntagged ''CompletionDoc--data InsertReplaceEdit =- InsertReplaceEdit- { _newText :: Text -- ^ The string to be inserted.- , _insert :: Range -- ^ The range if the insert is requested- , _repalce :: Range -- ^ The range if the replace is requested.- }- deriving (Read,Show,Eq)-deriveJSON lspOptions ''InsertReplaceEdit--data CompletionEdit = CompletionEditText TextEdit | CompletionEditInsertReplace InsertReplaceEdit- deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''CompletionEdit--data CompletionItem =- CompletionItem- { _label :: Text -- ^ The label of this completion item. By default also- -- the text that is inserted when selecting this- -- completion.- , _kind :: Maybe CompletionItemKind- , _tags :: Maybe (List CompletionItemTag) -- ^ Tags for this completion item.- , _detail :: Maybe Text -- ^ A human-readable string with additional- -- information about this item, like type or- -- symbol information.- , _documentation :: Maybe CompletionDoc -- ^ A human-readable string that represents- -- a doc-comment.- , _deprecated :: Maybe Bool -- ^ Indicates if this item is deprecated.- , _preselect :: Maybe Bool- -- ^ Select this item when showing.- -- *Note* that only one completion item can be selected and that the- -- tool / client decides which item that is. The rule is that the *first*- -- item of those that match best is selected.- , _sortText :: Maybe Text -- ^ A string that should be used when filtering- -- a set of completion items. When `falsy` the- -- label is used.- , _filterText :: Maybe Text -- ^ A string that should be used when- -- filtering a set of completion items. When- -- `falsy` the label is used.- , _insertText :: Maybe Text -- ^ A string that should be inserted a- -- document when selecting this completion.- -- When `falsy` the label is used.- , _insertTextFormat :: Maybe InsertTextFormat- -- ^ The format of the insert text. The format applies to both the- -- `insertText` property and the `newText` property of a provided- -- `textEdit`.- , _insertTextMode :: Maybe InsertTextMode- -- ^ How whitespace and indentation is handled during completion- -- item insertion. If not provided the client's default value depends on- -- the @textDocument.completion.insertTextMode@ client capability.- , _textEdit :: Maybe CompletionEdit- -- ^ An edit which is applied to a document when selecting this- -- completion. When an edit is provided the value of `insertText` is- -- ignored.- --- -- *Note:* The range of the edit must be a single line range and it- -- must contain the position at which completion has been requested.- , _additionalTextEdits :: Maybe (List TextEdit)- -- ^ An optional array of additional text edits that are applied when- -- selecting this completion. Edits must not overlap with the main edit- -- nor with themselves.- , _commitCharacters :: Maybe (List Text)- -- ^ An optional set of characters that when pressed while this completion- -- is active will accept it first and then type that character. *Note*- -- that all commit characters should have `length=1` and that superfluous- -- characters will be ignored.- , _command :: Maybe Command- -- ^ An optional command that is executed *after* inserting this- -- completion. *Note* that additional modifications to the current- -- document should be described with the additionalTextEdits-property.- , _xdata :: Maybe A.Value -- ^ An data entry field that is preserved on a- -- completion item between a completion and a- -- completion resolve request.- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CompletionItem---- | Represents a collection of 'CompletionItem's to be presented in the editor.-data CompletionList =- CompletionList- { _isIncomplete :: Bool -- ^ This list it not complete. Further typing- -- should result in recomputing this list.- , _items :: List CompletionItem -- ^ The completion items.- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CompletionList---- | How a completion was triggered-data CompletionTriggerKind = -- | Completion was triggered by typing an identifier (24x7 code- -- complete), manual invocation (e.g Ctrl+Space) or via API.- CtInvoked- -- | Completion was triggered by a trigger character specified by- -- the `triggerCharacters` properties of the `CompletionRegistrationOptions`.- | CtTriggerCharacter- -- | Completion was re-triggered as the current completion list is incomplete.- | CtTriggerForIncompleteCompletions- -- | An unknown 'CompletionTriggerKind' not yet supported in haskell-lsp.- | CtUnknown Scientific- deriving (Read, Show, Eq)--instance A.ToJSON CompletionTriggerKind where- toJSON CtInvoked = A.Number 1- toJSON CtTriggerCharacter = A.Number 2- toJSON CtTriggerForIncompleteCompletions = A.Number 3- toJSON (CtUnknown x) = A.Number x--instance A.FromJSON CompletionTriggerKind where- parseJSON (A.Number 1) = pure CtInvoked- parseJSON (A.Number 2) = pure CtTriggerCharacter- parseJSON (A.Number 3) = pure CtTriggerForIncompleteCompletions- parseJSON (A.Number x) = pure (CtUnknown x)- parseJSON _ = fail "CompletionTriggerKind"--makeExtendingDatatype "CompletionOptions" [''WorkDoneProgressOptions]- [ ("_triggerCharacters", [t| Maybe [Text] |])- , ("_allCommitCharacters", [t| Maybe [Text] |])- , ("_resolveProvider", [t| Maybe Bool|])- ]-deriveJSON lspOptions ''CompletionOptions--makeExtendingDatatype "CompletionRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''CompletionOptions- ]- []-deriveJSON lspOptions ''CompletionRegistrationOptions--data CompletionContext =- CompletionContext- { _triggerKind :: CompletionTriggerKind -- ^ How the completion was triggered.- , _triggerCharacter :: Maybe Text- -- ^ The trigger character (a single character) that has trigger code complete.- -- Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''CompletionContext--makeExtendingDatatype "CompletionParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ]- [ ("_context", [t| Maybe CompletionContext |]) ]-deriveJSON lspOptions ''CompletionParams-
− src/Language/LSP/Types/Configuration.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Configuration where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Utils---- ---------------------------------------data DidChangeConfigurationClientCapabilities =- DidChangeConfigurationClientCapabilities- { _dynamicRegistration :: Maybe Bool -- ^Did change configuration- -- notification supports dynamic- -- registration.- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidChangeConfigurationClientCapabilities--data DidChangeConfigurationParams =- DidChangeConfigurationParams- { _settings :: Value -- ^ The actual changed settings- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidChangeConfigurationParams---- -----------------------------------------------------------------------data ConfigurationItem =- ConfigurationItem- { _scopeUri :: Maybe Text -- ^ The scope to get the configuration section for.- , _section :: Maybe Text -- ^ The configuration section asked for.- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ConfigurationItem--data ConfigurationParams =- ConfigurationParams- { _items :: List ConfigurationItem- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ConfigurationParams
− src/Language/LSP/Types/Declaration.hs
@@ -1,39 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.Declaration where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DeclarationClientCapabilities =- DeclarationClientCapabilities- { -- | Whether declaration supports dynamic registration. If this is set to 'true'- -- the client supports the new 'DeclarationRegistrationOptions' return value- -- for the corresponding server capability as well.- _dynamicRegistration :: Maybe Bool- -- | The client supports additional metadata in the form of declaration links.- , _linkSupport :: Maybe Bool- }- deriving (Read, Show, Eq)-deriveJSON lspOptions ''DeclarationClientCapabilities--makeExtendingDatatype "DeclarationOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DeclarationOptions--makeExtendingDatatype "DeclarationRegistrationOptions"- [ ''DeclarationOptions- , ''TextDocumentRegistrationOptions- , ''StaticRegistrationOptions- ] []-deriveJSON lspOptions ''DeclarationRegistrationOptions--makeExtendingDatatype "DeclarationParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ] []-deriveJSON lspOptions ''DeclarationParams
− src/Language/LSP/Types/Definition.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.Definition where- -import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DefinitionClientCapabilities =- DefinitionClientCapabilities- { -- | Whether definition supports dynamic registration.- _dynamicRegistration :: Maybe Bool- -- | The client supports additional metadata in the form of definition- -- links.- -- Since LSP 3.14.0- , _linkSupport :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DefinitionClientCapabilities--makeExtendingDatatype "DefinitionOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DefinitionOptions--makeExtendingDatatype "DefinitionRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DefinitionOptions- ] []-deriveJSON lspOptions ''DefinitionRegistrationOptions--makeExtendingDatatype "DefinitionParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ] []-deriveJSON lspOptions ''DefinitionParams
− src/Language/LSP/Types/Diagnostic.hs
@@ -1,139 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE TypeOperators #-}--module Language.LSP.Types.Diagnostic where--import Control.DeepSeq-import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Text-import GHC.Generics hiding (UInt)-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---- -----------------------------------------------------------------------data DiagnosticSeverity- = DsError -- ^ Error = 1,- | DsWarning -- ^ Warning = 2,- | DsInfo -- ^ Info = 3,- | DsHint -- ^ Hint = 4- deriving (Eq,Ord,Show,Read, Generic)--instance NFData DiagnosticSeverity--instance A.ToJSON DiagnosticSeverity where- toJSON DsError = A.Number 1- toJSON DsWarning = A.Number 2- toJSON DsInfo = A.Number 3- toJSON DsHint = A.Number 4--instance A.FromJSON DiagnosticSeverity where- parseJSON (A.Number 1) = pure DsError- parseJSON (A.Number 2) = pure DsWarning- parseJSON (A.Number 3) = pure DsInfo- parseJSON (A.Number 4) = pure DsHint- parseJSON _ = fail "DiagnosticSeverity"--data DiagnosticTag- -- | Unused or unnecessary code.- --- -- Clients are allowed to render diagnostics with this tag faded out- -- instead of having an error squiggle.- = DtUnnecessary- -- | Deprecated or obsolete code.- --- -- Clients are allowed to rendered diagnostics with this tag strike- -- through.- | DtDeprecated- deriving (Eq, Ord, Show, Read, Generic)--instance NFData DiagnosticTag--instance A.ToJSON DiagnosticTag where- toJSON DtUnnecessary = A.Number 1- toJSON DtDeprecated = A.Number 2--instance A.FromJSON DiagnosticTag where- parseJSON (A.Number 1) = pure DtUnnecessary- parseJSON (A.Number 2) = pure DtDeprecated- parseJSON _ = fail "DiagnosticTag"---- -----------------------------------------------------------------------data DiagnosticRelatedInformation =- DiagnosticRelatedInformation- { _location :: Location- , _message :: Text- } deriving (Show, Read, Eq, Ord, Generic)--instance NFData DiagnosticRelatedInformation--deriveJSON lspOptions ''DiagnosticRelatedInformation---- -----------------------------------------------------------------------type DiagnosticSource = Text-data Diagnostic =- Diagnostic- { _range :: Range- , _severity :: Maybe DiagnosticSeverity- , _code :: Maybe (Int32 |? Text)- , _source :: Maybe DiagnosticSource- , _message :: Text- , _tags :: Maybe (List DiagnosticTag)- , _relatedInformation :: Maybe (List DiagnosticRelatedInformation)- } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Diagnostic--deriveJSON lspOptions ''Diagnostic---- ---------------------------------------data PublishDiagnosticsTagsClientCapabilities =- PublishDiagnosticsTagsClientCapabilities- { -- | The tags supported by the client.- _valueSet :: List DiagnosticTag- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''PublishDiagnosticsTagsClientCapabilities--data PublishDiagnosticsClientCapabilities =- PublishDiagnosticsClientCapabilities- { -- | Whether the clients accepts diagnostics with related information.- _relatedInformation :: Maybe Bool- -- | Client supports the tag property to provide metadata about a- -- diagnostic.- --- -- Clients supporting tags have to handle unknown tags gracefully.- -- - -- Since LSP 3.15.0- , _tagSupport :: Maybe PublishDiagnosticsTagsClientCapabilities- -- | Whether the client interprets the version property of the- -- @textDocument/publishDiagnostics@ notification's parameter.- -- - -- Since LSP 3.15.0- , _versionSupport :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''PublishDiagnosticsClientCapabilities--data PublishDiagnosticsParams =- PublishDiagnosticsParams- { -- | The URI for which diagnostic information is reported.- _uri :: Uri- -- | Optional the version number of the document the diagnostics are- -- published for.- -- - -- Since LSP 3.15.0- , _version :: Maybe UInt- -- | An array of diagnostic information items.- , _diagnostics :: List Diagnostic- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''PublishDiagnosticsParams
− src/Language/LSP/Types/DocumentColor.hs
@@ -1,91 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.DocumentColor where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceEdit--data DocumentColorClientCapabilities =- DocumentColorClientCapabilities- { -- | Whether document color supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentColorClientCapabilities---- ---------------------------------------makeExtendingDatatype "DocumentColorOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentColorOptions--makeExtendingDatatype "DocumentColorRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''StaticRegistrationOptions- , ''DocumentColorOptions- ] []-deriveJSON lspOptions ''DocumentColorRegistrationOptions---- ---------------------------------------makeExtendingDatatype "DocumentColorParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentColorParams---- ----------------------------------------- | Represents a color in RGBA space.-data Color =- Color- { _red :: Float -- ^ The red component of this color in the range [0-1].- , _green :: Float -- ^ The green component of this color in the range [0-1].- , _blue :: Float -- ^ The blue component of this color in the range [0-1].- , _alpha :: Float -- ^ The alpha component of this color in the range [0-1].- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''Color--data ColorInformation =- ColorInformation- { _range :: Range -- ^ The range in the document where this color appears.- , _color :: Color -- ^ The actual color value for this color range.- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''ColorInformation---- ---------------------------------------makeExtendingDatatype "ColorPresentationParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [ ("_textDocument", [t| TextDocumentIdentifier |])- , ("_color", [t| Color |])- , ("_range", [t| Range |])- ]-deriveJSON lspOptions ''ColorPresentationParams---- ---------------------------------------data ColorPresentation =- ColorPresentation- { -- | The label of this color presentation. It will be shown on the color- -- picker header. By default this is also the text that is inserted when selecting- -- this color presentation.- _label :: Text- -- | A 'TextEdit' which is applied to a document when selecting- -- this presentation for the color. When `falsy` the '_label'- -- is used.- , _textEdit :: Maybe TextEdit- -- | An optional array of additional 'TextEdit's that are applied when- -- selecting this color presentation. Edits must not overlap with the main- -- '_textEdit' nor with themselves.- , _additionalTextEdits :: Maybe (List TextEdit)- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''ColorPresentation
− src/Language/LSP/Types/DocumentFilter.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.DocumentFilter where--import Data.Aeson.TH-import Data.Text ( Text )-import Language.LSP.Types.Common-import Language.LSP.Types.Utils---- -----------------------------------------------------------------------data DocumentFilter =- DocumentFilter- { -- | A language id, like `typescript`.- _language :: Maybe Text- -- | A Uri scheme, like @file@ or @untitled@.- , _scheme :: Maybe Text- , -- | A glob pattern, like `*.{ts,js}`.- --- -- Glob patterns can have the following syntax:- -- - @*@ to match one or more characters in a path segment- -- - @?@ to match on one character in a path segment- -- - @**@ to match any number of path segments, including none- -- - @{}@ to group conditions (e.g. @**/*.{ts,js}@ matches all TypeScript and JavaScript files)- -- - @[]@ to declare a range of characters to match in a path segment (e.g., @example.[0-9]@ to match on @example.0@, @example.1@, …)- -- - @[!...]@ to negate a range of characters to match in a path segment (e.g., @example.[!0-9]@ to match on @example.a@, @example.b@, but not @example.0@)- _pattern :: Maybe Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentFilter--{--A document selector is the combination of one or many document filters.--export type DocumentSelector = DocumentFilter[];--}-type DocumentSelector = List DocumentFilter
− src/Language/LSP/Types/DocumentHighlight.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.DocumentHighlight where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils---- ---------------------------------------data DocumentHighlightClientCapabilities =- DocumentHighlightClientCapabilities- { -- | Whether document highlight supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentHighlightClientCapabilities--makeExtendingDatatype "DocumentHighlightOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentHighlightOptions--makeExtendingDatatype "DocumentHighlightRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DocumentHighlightOptions- ] []-deriveJSON lspOptions ''DocumentHighlightRegistrationOptions--makeExtendingDatatype "DocumentHighlightParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ] []-deriveJSON lspOptions ''DocumentHighlightParams--data DocumentHighlightKind- = -- | A textual occurrence.- HkText- | -- | Read-access of a symbol, like reading a variable.- HkRead- | -- | Write-access of a symbol, like writing to a variable.- HkWrite- deriving (Read, Show, Eq)--instance ToJSON DocumentHighlightKind where- toJSON HkText = Number 1- toJSON HkRead = Number 2- toJSON HkWrite = Number 3--instance FromJSON DocumentHighlightKind where- parseJSON (Number 1) = pure HkText- parseJSON (Number 2) = pure HkRead- parseJSON (Number 3) = pure HkWrite- parseJSON _ = mempty "DocumentHighlightKind"---- ----------------------------------------- | A document highlight is a range inside a text document which deserves--- special attention. Usually a document highlight is visualized by changing the--- background color of its range.-data DocumentHighlight =- DocumentHighlight- { -- | The range this highlight applies to.- _range :: Range- -- | The highlight kind, default is 'HkText'.- , _kind :: Maybe DocumentHighlightKind- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DocumentHighlight
− src/Language/LSP/Types/DocumentLink.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.DocumentLink where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Data.Text (Text)--data DocumentLinkClientCapabilities =- DocumentLinkClientCapabilities- { -- | Whether document link supports dynamic registration.- _dynamicRegistration :: Maybe Bool- -- | Whether the client supports the `tooltip` property on `DocumentLink`.- --- -- Since LSP 3.15.0- , _tooltipSupport :: Maybe Bool- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentLinkClientCapabilities---- ---------------------------------------makeExtendingDatatype "DocumentLinkOptions" [''WorkDoneProgressOptions]- [("_resolveProvider", [t| Maybe Bool |])]-deriveJSON lspOptions ''DocumentLinkOptions--makeExtendingDatatype "DocumentLinkRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DocumentLinkOptions- ] []-deriveJSON lspOptions ''DocumentLinkRegistrationOptions---- ---------------------------------------makeExtendingDatatype "DocumentLinkParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentLinkParams---- ----------------------------------------- | A document link is a range in a text document that links to an internal or--- external resource, like another text document or a web site.-data DocumentLink =- DocumentLink- { -- | The range this link applies to.- _range :: Range- -- | The uri this link points to. If missing a resolve request is sent- -- later.- , _target :: Maybe Uri- -- | The tooltip text when you hover over this link.- --- -- If a tooltip is provided, is will be displayed in a string that includes- -- instructions on how to trigger the link, such as @{0} (ctrl + click)@.- -- The specific instructions vary depending on OS, user settings, and- -- localization.- --- -- Since LSP 3.15.0- , _tooltip :: Maybe Text- -- | A data entry field that is preserved on a document link between a- -- DocumentLinkRequest and a DocumentLinkResolveRequest.- , _xdata :: Maybe Value- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentLink
− src/Language/LSP/Types/DocumentSymbol.hs
@@ -1,253 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.DocumentSymbol where--import Data.Aeson-import Data.Aeson.TH-import Data.Scientific-import Data.Text (Text)--import Language.LSP.Types.TextDocument-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils---- -----------------------------------------------------------------------makeExtendingDatatype "DocumentSymbolOptions"- [''WorkDoneProgressOptions]- [ ("_label", [t| Maybe Bool |])]-deriveJSON lspOptions ''DocumentSymbolOptions--makeExtendingDatatype "DocumentSymbolRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DocumentSymbolOptions- ] []-deriveJSON lspOptions ''DocumentSymbolRegistrationOptions---- -----------------------------------------------------------------------makeExtendingDatatype "DocumentSymbolParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [ ("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentSymbolParams---- ---------------------------------------data SymbolKind- = SkFile- | SkModule- | SkNamespace- | SkPackage- | SkClass- | SkMethod- | SkProperty- | SkField- | SkConstructor- | SkEnum- | SkInterface- | SkFunction- | SkVariable- | SkConstant- | SkString- | SkNumber- | SkBoolean- | SkArray- | SkObject- | SkKey- | SkNull- | SkEnumMember- | SkStruct- | SkEvent- | SkOperator- | SkTypeParameter- | SkUnknown Scientific- deriving (Read,Show,Eq)--instance ToJSON SymbolKind where- toJSON SkFile = Number 1- toJSON SkModule = Number 2- toJSON SkNamespace = Number 3- toJSON SkPackage = Number 4- toJSON SkClass = Number 5- toJSON SkMethod = Number 6- toJSON SkProperty = Number 7- toJSON SkField = Number 8- toJSON SkConstructor = Number 9- toJSON SkEnum = Number 10- toJSON SkInterface = Number 11- toJSON SkFunction = Number 12- toJSON SkVariable = Number 13- toJSON SkConstant = Number 14- toJSON SkString = Number 15- toJSON SkNumber = Number 16- toJSON SkBoolean = Number 17- toJSON SkArray = Number 18- toJSON SkObject = Number 19- toJSON SkKey = Number 20- toJSON SkNull = Number 21- toJSON SkEnumMember = Number 22- toJSON SkStruct = Number 23- toJSON SkEvent = Number 24- toJSON SkOperator = Number 25- toJSON SkTypeParameter = Number 26- toJSON (SkUnknown x) = Number x--instance FromJSON SymbolKind where- parseJSON (Number 1) = pure SkFile- parseJSON (Number 2) = pure SkModule- parseJSON (Number 3) = pure SkNamespace- parseJSON (Number 4) = pure SkPackage- parseJSON (Number 5) = pure SkClass- parseJSON (Number 6) = pure SkMethod- parseJSON (Number 7) = pure SkProperty- parseJSON (Number 8) = pure SkField- parseJSON (Number 9) = pure SkConstructor- parseJSON (Number 10) = pure SkEnum- parseJSON (Number 11) = pure SkInterface- parseJSON (Number 12) = pure SkFunction- parseJSON (Number 13) = pure SkVariable- parseJSON (Number 14) = pure SkConstant- parseJSON (Number 15) = pure SkString- parseJSON (Number 16) = pure SkNumber- parseJSON (Number 17) = pure SkBoolean- parseJSON (Number 18) = pure SkArray- parseJSON (Number 19) = pure SkObject- parseJSON (Number 20) = pure SkKey- parseJSON (Number 21) = pure SkNull- parseJSON (Number 22) = pure SkEnumMember- parseJSON (Number 23) = pure SkStruct- parseJSON (Number 24) = pure SkEvent- parseJSON (Number 25) = pure SkOperator- parseJSON (Number 26) = pure SkTypeParameter- parseJSON (Number x) = pure (SkUnknown x)- parseJSON _ = fail "SymbolKind"--{-|-Symbol tags are extra annotations that tweak the rendering of a symbol.--@since 3.16.0--}-data SymbolTag =- StDeprecated -- ^ Render a symbol as obsolete, usually using a strike-out.- | StUnknown Scientific- deriving (Read, Show, Eq)--instance ToJSON SymbolTag where- toJSON StDeprecated = Number 1- toJSON (StUnknown x) = Number x--instance FromJSON SymbolTag where- parseJSON (Number 1) = pure StDeprecated- parseJSON (Number x) = pure (StUnknown x)- parseJSON _ = fail "SymbolTag"- --- ---------------------------------------data DocumentSymbolKindClientCapabilities =- DocumentSymbolKindClientCapabilities- { -- | The symbol kind values the client supports. When this- -- property exists the client also guarantees that it will- -- handle values outside its set gracefully and falls back- -- to a default value when unknown.- --- -- If this property is not present the client only supports- -- the symbol kinds from `File` to `Array` as defined in- -- the initial version of the protocol.- _valueSet :: Maybe (List SymbolKind)- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolKindClientCapabilities--data DocumentSymbolTagClientCapabilities =- DocumentSymbolTagClientCapabilities- { -- | The tags supported by the client.- _valueSet :: Maybe (List SymbolTag)- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolTagClientCapabilities--data DocumentSymbolClientCapabilities =- DocumentSymbolClientCapabilities- { -- | Whether document symbol supports dynamic registration.- _dynamicRegistration :: Maybe Bool- -- | Specific capabilities for the `SymbolKind`.- , _symbolKind :: Maybe DocumentSymbolKindClientCapabilities- , _hierarchicalDocumentSymbolSupport :: Maybe Bool- -- | The client supports tags on `SymbolInformation`.- -- Clients supporting tags have to handle unknown tags gracefully.- --- -- @since 3.16.0- , _tagSupport :: Maybe DocumentSymbolTagClientCapabilities- -- | The client supports an additional label presented in the UI when- -- registering a document symbol provider.- --- -- @since 3.16.0- , _labelSupport :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolClientCapabilities---- ------------------------------------------------------------------------- | Represents programming constructs like variables, classes, interfaces etc.--- that appear in a document. Document symbols can be hierarchical and they--- have two ranges: one that encloses its definition and one that points to its--- most interesting range, e.g. the range of an identifier.-data DocumentSymbol =- DocumentSymbol- { _name :: Text -- ^ The name of this symbol.- -- | More detail for this symbol, e.g the signature of a function. If not- -- provided the name is used.- , _detail :: Maybe Text- , _kind :: SymbolKind -- ^ The kind of this symbol.- , _tags :: Maybe (List SymbolTag) -- ^ Tags for this document symbol.- , _deprecated :: Maybe Bool -- ^ Indicates if this symbol is deprecated. Deprecated, use tags instead.- -- | The range enclosing this symbol not including leading/trailing- -- whitespace but everything else like comments. This information is- -- typically used to determine if the the clients cursor is inside the symbol- -- to reveal in the symbol in the UI.- , _range :: Range- -- | The range that should be selected and revealed when this symbol is being- -- picked, e.g the name of a function. Must be contained by the the '_range'.- , _selectionRange :: Range- -- | Children of this symbol, e.g. properties of a class.- , _children :: Maybe (List DocumentSymbol)- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DocumentSymbol---- ------------------------------------------------------------------------- | Represents information about programming constructs like variables, classes,--- interfaces etc.-data SymbolInformation =- SymbolInformation- { _name :: Text -- ^ The name of this symbol.- , _kind :: SymbolKind -- ^ The kind of this symbol.- , _tags :: Maybe (List SymbolTag) -- ^ Tags for this symbol.- , _deprecated :: Maybe Bool -- ^ Indicates if this symbol is deprecated. Deprecated, use tags instead.- -- | The location of this symbol. The location's range is used by a tool- -- to reveal the location in the editor. If the symbol is selected in the- -- tool the range's start information is used to position the cursor. So- -- the range usually spans more then the actual symbol's name and does- -- normally include things like visibility modifiers.- --- -- The range doesn't have to denote a node range in the sense of a abstract- -- syntax tree. It can therefore not be used to re-construct a hierarchy of- -- the symbols.- , _location :: Location- -- | The name of the symbol containing this symbol. This information is for- -- user interface purposes (e.g. to render a qualifier in the user interface- -- if necessary). It can't be used to re-infer a hierarchy for the document- -- symbols.- , _containerName :: Maybe Text- } deriving (Read,Show,Eq)-{-# DEPRECATED _deprecated "Use tags instead" #-}--deriveJSON lspOptions ''SymbolInformation
− src/Language/LSP/Types/FoldingRange.hs
@@ -1,100 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.FoldingRange where--import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils----- ---------------------------------------data FoldingRangeClientCapabilities =- FoldingRangeClientCapabilities- { -- | Whether implementation supports dynamic registration for folding range- -- providers. If this is set to `true` the client supports the new- -- `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`- -- return value for the corresponding server capability as well.- _dynamicRegistration :: Maybe Bool- -- | The maximum number of folding ranges that the client prefers to receive- -- per document. The value serves as a hint, servers are free to follow the limit.- , _rangeLimit :: Maybe UInt- -- | If set, the client signals that it only supports folding complete lines. If set,- -- client will ignore specified `startCharacter` and `endCharacter` properties in a- -- FoldingRange.- , _lineFoldingOnly :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''FoldingRangeClientCapabilities--makeExtendingDatatype "FoldingRangeOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''FoldingRangeOptions--makeExtendingDatatype "FoldingRangeRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''FoldingRangeOptions- , ''StaticRegistrationOptions- ] []-deriveJSON lspOptions ''FoldingRangeRegistrationOptions---makeExtendingDatatype "FoldingRangeParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''FoldingRangeParams---- | Enum of known range kinds-data FoldingRangeKind = FoldingRangeComment- -- ^ Folding range for a comment- | FoldingRangeImports- -- ^ Folding range for a imports or includes- | FoldingRangeRegion- -- ^ Folding range for a region (e.g. #region)- | FoldingRangeUnknown Text- -- ^ Folding range that haskell-lsp-types does- -- not yet support- deriving (Read, Show, Eq)--instance A.ToJSON FoldingRangeKind where- toJSON FoldingRangeComment = A.String "comment"- toJSON FoldingRangeImports = A.String "imports"- toJSON FoldingRangeRegion = A.String "region"- toJSON (FoldingRangeUnknown x) = A.String x--instance A.FromJSON FoldingRangeKind where- parseJSON (A.String "comment") = pure FoldingRangeComment- parseJSON (A.String "imports") = pure FoldingRangeImports- parseJSON (A.String "region") = pure FoldingRangeRegion- parseJSON (A.String x) = pure (FoldingRangeUnknown x)- parseJSON _ = fail "FoldingRangeKind"---- | Represents a folding range.-data FoldingRange =- FoldingRange- { -- | The zero-based line number from where the folded range starts.- _startLine :: UInt- -- | The zero-based character offset from where the folded range- -- starts. If not defined, defaults to the length of the start line.- , _startCharacter :: Maybe UInt- -- | The zero-based line number where the folded range ends.- , _endLine :: UInt- -- | The zero-based character offset before the folded range ends.- -- If not defined, defaults to the length of the end line.- , _endCharacter :: Maybe UInt- -- | Describes the kind of the folding range such as 'comment' or- -- 'region'. The kind is used to categorize folding ranges and used- -- by commands like 'Fold all comments'. See 'FoldingRangeKind' for- -- an enumeration of standardized kinds.- , _kind :: Maybe FoldingRangeKind- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''FoldingRange
− src/Language/LSP/Types/Formatting.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.Formatting where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DocumentFormattingClientCapabilities =- DocumentFormattingClientCapabilities- { -- | Whether formatting supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentFormattingClientCapabilities--makeExtendingDatatype "DocumentFormattingOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentFormattingOptions--makeExtendingDatatype "DocumentFormattingRegistrationOptions"- [ ''TextDocumentRegistrationOptions,- ''DocumentFormattingOptions- ]- []-deriveJSON lspOptions ''DocumentFormattingRegistrationOptions---- | Value-object describing what options formatting should use.-data FormattingOptions = FormattingOptions- { -- | Size of a tab in spaces.- _tabSize :: UInt,- -- | Prefer spaces over tabs- _insertSpaces :: Bool,- -- | Trim trailing whitespace on a line.- --- -- Since LSP 3.15.0- _trimTrailingWhitespace :: Maybe Bool,- -- | Insert a newline character at the end of the file if one does not exist.- --- -- Since LSP 3.15.0- _insertFinalNewline :: Maybe Bool,- -- | Trim all newlines after the final newline at the end of the file.- -- - -- Since LSP 3.15.0- _trimFinalNewlines :: Maybe Bool- -- Note: May be more properties- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''FormattingOptions-makeExtendingDatatype "DocumentFormattingParams" [''WorkDoneProgressParams]- [ ("_textDocument", [t| TextDocumentIdentifier |])- , ("_options", [t| FormattingOptions |])- ]-deriveJSON lspOptions ''DocumentFormattingParams---- ---------------------------------------data DocumentRangeFormattingClientCapabilities =- DocumentRangeFormattingClientCapabilities- { -- | Whether formatting supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentRangeFormattingClientCapabilities--makeExtendingDatatype "DocumentRangeFormattingOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentRangeFormattingOptions--makeExtendingDatatype "DocumentRangeFormattingRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DocumentRangeFormattingOptions- ]- []-deriveJSON lspOptions ''DocumentRangeFormattingRegistrationOptions--makeExtendingDatatype "DocumentRangeFormattingParams" [''WorkDoneProgressParams]- [ ("_textDocument", [t| TextDocumentIdentifier |])- , ("_range", [t| Range |])- , ("_options", [t| FormattingOptions |])- ]-deriveJSON lspOptions ''DocumentRangeFormattingParams---- ---------------------------------------data DocumentOnTypeFormattingClientCapabilities =- DocumentOnTypeFormattingClientCapabilities- { -- | Whether formatting supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentOnTypeFormattingClientCapabilities--data DocumentOnTypeFormattingOptions =- DocumentOnTypeFormattingOptions- { -- | A character on which formatting should be triggered, like @}@.- _firstTriggerCharacter :: Text- , -- | More trigger characters.- _moreTriggerCharacter :: Maybe [Text]- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''DocumentOnTypeFormattingOptions--makeExtendingDatatype "DocumentOnTypeFormattingRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''DocumentOnTypeFormattingOptions- ]- []-deriveJSON lspOptions ''DocumentOnTypeFormattingRegistrationOptions--makeExtendingDatatype "DocumentOnTypeFormattingParams" [''TextDocumentPositionParams]- [ ("_ch", [t| Text |])- , ("_options", [t| FormattingOptions |])- ]-deriveJSON lspOptions ''DocumentOnTypeFormattingParams
− src/Language/LSP/Types/Hover.hs
@@ -1,84 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.Hover where--import Data.Aeson.TH-import Data.Text ( Text )--import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils----- ---------------------------------------data HoverClientCapabilities =- HoverClientCapabilities- { _dynamicRegistration :: Maybe Bool- , _contentFormat :: Maybe (List MarkupKind)- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''HoverClientCapabilities--makeExtendingDatatype "HoverOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''HoverOptions--makeExtendingDatatype "HoverRegistrationOptions" [''TextDocumentRegistrationOptions, ''HoverOptions] []-deriveJSON lspOptions ''HoverRegistrationOptions--makeExtendingDatatype "HoverParams" [''TextDocumentPositionParams, ''WorkDoneProgressParams] []-deriveJSON lspOptions ''HoverParams---- ---------------------------------------data LanguageString =- LanguageString- { _language :: Text- , _value :: Text- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''LanguageString--{-# DEPRECATED MarkedString, PlainString, CodeString "Use MarkupContent instead, since 3.3.0 (11/24/2017)" #-}-data MarkedString =- PlainString Text- | CodeString LanguageString- deriving (Eq,Read,Show)--deriveJSON lspOptionsUntagged ''MarkedString---- ---------------------------------------data HoverContents =- HoverContentsMS (List MarkedString)- | HoverContents MarkupContent- deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''HoverContents---- ---------------------------------------instance Semigroup HoverContents where- HoverContents h1 <> HoverContents h2 = HoverContents (h1 `mappend` h2)- HoverContents h1 <> HoverContentsMS (List h2s) = HoverContents (mconcat (h1: (map toMarkupContent h2s)))- HoverContentsMS (List h1s) <> HoverContents h2 = HoverContents (mconcat ((map toMarkupContent h1s) ++ [h2]))- HoverContentsMS (List h1s) <> HoverContentsMS (List h2s) = HoverContentsMS (List (h1s `mappend` h2s))--instance Monoid HoverContents where- mempty = HoverContentsMS (List [])--toMarkupContent :: MarkedString -> MarkupContent-toMarkupContent (PlainString s) = unmarkedUpContent s-toMarkupContent (CodeString (LanguageString lang s)) = markedUpContent lang s---- ---------------------------------------data Hover =- Hover- { _contents :: HoverContents- , _range :: Maybe Range- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''Hover
− src/Language/LSP/Types/Implementation.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.Implementation where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data ImplementationClientCapabilities = ImplementationClientCapabilities- { -- | Whether implementation supports dynamic registration. If this is set- -- to 'True'- -- the client supports the new 'ImplementationRegistrationOptions' return- -- value for the corresponding server capability as well.- _dynamicRegistration :: Maybe Bool,- -- | The client supports additional metadata in the form of definition links.- --- -- Since LSP 3.14.0- _linkSupport :: Maybe Bool- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''ImplementationClientCapabilities--makeExtendingDatatype "ImplementationOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''ImplementationOptions--makeExtendingDatatype "ImplementationRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''ImplementationOptions- , ''StaticRegistrationOptions- ] []-deriveJSON lspOptions ''ImplementationRegistrationOptions--makeExtendingDatatype "ImplementationParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ] []-deriveJSON lspOptions ''ImplementationParams
− src/Language/LSP/Types/Initialize.hs
@@ -1,96 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.Initialize where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import qualified Data.Text as T-import Language.LSP.Types.ClientCapabilities-import Language.LSP.Types.Common-import Language.LSP.Types.Progress-import Language.LSP.Types.ServerCapabilities-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceFolders--data Trace = TraceOff | TraceMessages | TraceVerbose- deriving (Show, Read, Eq)--instance ToJSON Trace where- toJSON TraceOff = String (T.pack "off")- toJSON TraceMessages = String (T.pack "messages")- toJSON TraceVerbose = String (T.pack "verbose")--instance FromJSON Trace where- parseJSON (String s) = case T.unpack s of- "off" -> return TraceOff- "messages" -> return TraceMessages- "verbose" -> return TraceVerbose- _ -> fail "Trace"- parseJSON _ = fail "Trace"--data ClientInfo =- ClientInfo- { -- | The name of the client as defined by the client.- _name :: Text- -- | The client's version as defined by the client.- , _version :: Maybe Text- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ClientInfo--makeExtendingDatatype "InitializeParams" [''WorkDoneProgressParams]- [ ("_processId", [t| Maybe Int32|])- , ("_clientInfo", [t| Maybe ClientInfo |])- , ("_rootPath", [t| Maybe Text |])- , ("_rootUri", [t| Maybe Uri |])- , ("_initializationOptions", [t| Maybe Value |])- , ("_capabilities", [t| ClientCapabilities |])- , ("_trace", [t| Maybe Trace |])- , ("_workspaceFolders", [t| Maybe (List WorkspaceFolder) |])- ]--deriveJSON lspOptions ''InitializeParams--data InitializeError =- InitializeError- { _retry :: Bool- } deriving (Read, Show, Eq)--deriveJSON lspOptions ''InitializeError--data ServerInfo =- ServerInfo- { -- | The name of the server as defined by the server.- _name :: Text- -- | The server's version as defined by the server.- , _version :: Maybe Text- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ServerInfo--data InitializeResult =- InitializeResult- { -- | The capabilities the language server provides.- _capabilities :: ServerCapabilities- -- | Information about the server.- -- Since LSP 3.15.0- , _serverInfo :: Maybe ServerInfo- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''InitializeResult---- -----------------------------------------------------------------------data InitializedParams =- InitializedParams- {- } deriving (Show, Read, Eq)--instance FromJSON InitializedParams where- parseJSON (Object _) = pure InitializedParams- parseJSON _ = fail "InitializedParams"--instance ToJSON InitializedParams where- toJSON InitializedParams = Object mempty-
− src/Language/LSP/Types/Lens.hs
@@ -1,399 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE FunctionalDependencies #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE ExplicitNamespaces #-}--module Language.LSP.Types.Lens where--import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.Cancellation-import Language.LSP.Types.ClientCapabilities-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.Command-import Language.LSP.Types.Common (type (|?))-import Language.LSP.Types.Completion-import Language.LSP.Types.Configuration-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.DocumentFilter-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.Initialize-import Language.LSP.Types.Location-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Progress-import Language.LSP.Types.Registration-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.ServerCapabilities-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Window-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.WorkspaceFolders-import Language.LSP.Types.WorkspaceSymbol-import Language.LSP.Types.Message-import Language.LSP.Types.SemanticTokens-import Control.Lens.TH---- TODO: This is out of date and very unmaintainable, use TH to call all these!!---- client capabilities-makeFieldsNoPrefix ''MessageActionItemClientCapabilities-makeFieldsNoPrefix ''ShowMessageRequestClientCapabilities-makeFieldsNoPrefix ''ShowDocumentClientCapabilities-makeFieldsNoPrefix ''StaleRequestClientCapabilities-makeFieldsNoPrefix ''RegularExpressionsClientCapabilities-makeFieldsNoPrefix ''GeneralClientCapabilities-makeFieldsNoPrefix ''WorkspaceClientCapabilities-makeFieldsNoPrefix ''WindowClientCapabilities-makeFieldsNoPrefix ''ClientCapabilities---- -----------------------------------------------------------------------makeFieldsNoPrefix ''SaveOptions-makeFieldsNoPrefix ''WorkspaceServerCapabilities-makeFieldsNoPrefix ''WorkspaceFoldersServerCapabilities-makeFieldsNoPrefix ''ServerCapabilities-makeFieldsNoPrefix ''Registration-makeFieldsNoPrefix ''RegistrationParams-makeFieldsNoPrefix ''Unregistration-makeFieldsNoPrefix ''UnregistrationParams-makeFieldsNoPrefix ''ParameterInformation-makeFieldsNoPrefix ''SignatureInformation-makeFieldsNoPrefix ''ApplyWorkspaceEditParams-makeFieldsNoPrefix ''ApplyWorkspaceEditResponseBody---- ------------------------------------------------------------------------- Initialize-makeFieldsNoPrefix ''InitializeParams-makeFieldsNoPrefix ''InitializeError-makeFieldsNoPrefix ''InitializeResult-makeFieldsNoPrefix ''ClientInfo-makeFieldsNoPrefix ''ServerInfo-makeFieldsNoPrefix ''InitializedParams---- Configuration-makeFieldsNoPrefix ''DidChangeConfigurationParams-makeFieldsNoPrefix ''ConfigurationItem-makeFieldsNoPrefix ''ConfigurationParams-makeFieldsNoPrefix ''DidChangeConfigurationClientCapabilities---- Watched files-makeFieldsNoPrefix ''DidChangeWatchedFilesClientCapabilities-makeFieldsNoPrefix ''DidChangeWatchedFilesRegistrationOptions-makeFieldsNoPrefix ''FileSystemWatcher-makeFieldsNoPrefix ''WatchKind-makeFieldsNoPrefix ''FileEvent-makeFieldsNoPrefix ''DidChangeWatchedFilesParams---- Workspace symbols-makeFieldsNoPrefix ''WorkspaceSymbolKindClientCapabilities-makeFieldsNoPrefix ''WorkspaceSymbolClientCapabilities-makeFieldsNoPrefix ''WorkspaceSymbolOptions-makeFieldsNoPrefix ''WorkspaceSymbolRegistrationOptions-makeFieldsNoPrefix ''WorkspaceSymbolParams---- Location-makeFieldsNoPrefix ''Position-makeFieldsNoPrefix ''Range-makeFieldsNoPrefix ''Location-makeFieldsNoPrefix ''LocationLink---- Markup-makeFieldsNoPrefix ''MarkupContent-makeFieldsNoPrefix ''MarkdownClientCapabilities---- Completion-makeFieldsNoPrefix ''CompletionDoc-makeFieldsNoPrefix ''CompletionEdit-makeFieldsNoPrefix ''CompletionItem-makeFieldsNoPrefix ''CompletionContext-makeFieldsNoPrefix ''CompletionList-makeFieldsNoPrefix ''CompletionParams-makeFieldsNoPrefix ''CompletionOptions-makeFieldsNoPrefix ''CompletionRegistrationOptions-makeFieldsNoPrefix ''CompletionItemTagsClientCapabilities-makeFieldsNoPrefix ''CompletionItemResolveClientCapabilities-makeFieldsNoPrefix ''CompletionItemInsertTextModeClientCapabilities-makeFieldsNoPrefix ''CompletionItemClientCapabilities-makeFieldsNoPrefix ''CompletionItemKindClientCapabilities-makeFieldsNoPrefix ''CompletionClientCapabilities-makeFieldsNoPrefix ''InsertReplaceEdit---- Declaration-makeFieldsNoPrefix ''DeclarationClientCapabilities-makeFieldsNoPrefix ''DeclarationOptions-makeFieldsNoPrefix ''DeclarationRegistrationOptions-makeFieldsNoPrefix ''DeclarationParams---- CodeActions-makeFieldsNoPrefix ''CodeActionKindClientCapabilities-makeFieldsNoPrefix ''CodeActionLiteralSupport-makeFieldsNoPrefix ''CodeActionClientCapabilities-makeFieldsNoPrefix ''CodeActionResolveClientCapabilities-makeFieldsNoPrefix ''CodeActionOptions-makeFieldsNoPrefix ''CodeActionRegistrationOptions-makeFieldsNoPrefix ''CodeActionContext-makeFieldsNoPrefix ''CodeActionParams-makeFieldsNoPrefix ''CodeAction---- CodeLens-makeFieldsNoPrefix ''CodeLensClientCapabilities-makeFieldsNoPrefix ''CodeLensOptions-makeFieldsNoPrefix ''CodeLensRegistrationOptions-makeFieldsNoPrefix ''CodeLensParams-makeFieldsNoPrefix ''CodeLens---- DocumentLink-makeFieldsNoPrefix ''DocumentLinkClientCapabilities-makeFieldsNoPrefix ''DocumentLinkOptions-makeFieldsNoPrefix ''DocumentLinkRegistrationOptions-makeFieldsNoPrefix ''DocumentLinkParams-makeFieldsNoPrefix ''DocumentLink---- DocumentColor-makeFieldsNoPrefix ''DocumentColorClientCapabilities-makeFieldsNoPrefix ''DocumentColorOptions-makeFieldsNoPrefix ''DocumentColorRegistrationOptions-makeFieldsNoPrefix ''DocumentColorParams-makeFieldsNoPrefix ''Color-makeFieldsNoPrefix ''ColorInformation---- ColorPresentation-makeFieldsNoPrefix ''ColorPresentationParams-makeFieldsNoPrefix ''ColorPresentation---- Formatting-makeFieldsNoPrefix ''DocumentFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentFormattingOptions-makeFieldsNoPrefix ''DocumentFormattingRegistrationOptions-makeFieldsNoPrefix ''FormattingOptions-makeFieldsNoPrefix ''DocumentFormattingParams---- RangeFormatting-makeFieldsNoPrefix ''DocumentRangeFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentRangeFormattingOptions-makeFieldsNoPrefix ''DocumentRangeFormattingRegistrationOptions-makeFieldsNoPrefix ''DocumentRangeFormattingParams---- OnTypeFormatting-makeFieldsNoPrefix ''DocumentOnTypeFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentOnTypeFormattingOptions-makeFieldsNoPrefix ''DocumentOnTypeFormattingRegistrationOptions-makeFieldsNoPrefix ''DocumentOnTypeFormattingParams---- Rename-makeFieldsNoPrefix ''RenameClientCapabilities-makeFieldsNoPrefix ''RenameOptions-makeFieldsNoPrefix ''RenameRegistrationOptions-makeFieldsNoPrefix ''RenameParams-makeFieldsNoPrefix ''PrepareSupportDefaultBehavior---- PrepareRename-makeFieldsNoPrefix ''PrepareRenameParams-makeFieldsNoPrefix ''RangeWithPlaceholder---- References-makeFieldsNoPrefix ''ReferencesClientCapabilities-makeFieldsNoPrefix ''ReferenceOptions-makeFieldsNoPrefix ''ReferenceRegistrationOptions-makeFieldsNoPrefix ''ReferenceContext-makeFieldsNoPrefix ''ReferenceParams---- FoldingRange-makeFieldsNoPrefix ''FoldingRangeClientCapabilities-makeFieldsNoPrefix ''FoldingRangeOptions-makeFieldsNoPrefix ''FoldingRangeRegistrationOptions-makeFieldsNoPrefix ''FoldingRangeParams-makeFieldsNoPrefix ''FoldingRange---- SelectionRange-makeFieldsNoPrefix ''SelectionRangeClientCapabilities-makeFieldsNoPrefix ''SelectionRangeOptions-makeFieldsNoPrefix ''SelectionRangeRegistrationOptions-makeFieldsNoPrefix ''SelectionRangeParams-makeFieldsNoPrefix ''SelectionRange---- DocumentHighlight-makeFieldsNoPrefix ''DocumentHighlightClientCapabilities-makeFieldsNoPrefix ''DocumentHighlightOptions-makeFieldsNoPrefix ''DocumentHighlightRegistrationOptions-makeFieldsNoPrefix ''DocumentHighlightParams-makeFieldsNoPrefix ''DocumentHighlight---- DocumentSymbol-makeFieldsNoPrefix ''DocumentSymbolKindClientCapabilities-makeFieldsNoPrefix ''DocumentSymbolClientCapabilities-makeFieldsNoPrefix ''DocumentSymbolOptions-makeFieldsNoPrefix ''DocumentSymbolRegistrationOptions-makeFieldsNoPrefix ''DocumentSymbolParams-makeFieldsNoPrefix ''DocumentSymbol-makeFieldsNoPrefix ''SymbolInformation---- DocumentFilter-makeFieldsNoPrefix ''DocumentFilter---- WorkspaceEdit-makeFieldsNoPrefix ''TextEdit-makeFieldsNoPrefix ''ChangeAnnotation-makeFieldsNoPrefix ''AnnotatedTextEdit-makeFieldsNoPrefix ''VersionedTextDocumentIdentifier-makeFieldsNoPrefix ''TextDocumentEdit-makeFieldsNoPrefix ''CreateFileOptions-makeFieldsNoPrefix ''CreateFile-makeFieldsNoPrefix ''RenameFileOptions-makeFieldsNoPrefix ''RenameFile-makeFieldsNoPrefix ''DeleteFileOptions-makeFieldsNoPrefix ''DeleteFile-makeFieldsNoPrefix ''WorkspaceEdit-makeFieldsNoPrefix ''WorkspaceEditClientCapabilities-makeFieldsNoPrefix ''WorkspaceEditChangeAnnotationClientCapabilities---- Workspace Folders-makeFieldsNoPrefix ''WorkspaceFolder-makeFieldsNoPrefix ''WorkspaceFoldersChangeEvent-makeFieldsNoPrefix ''DidChangeWorkspaceFoldersParams---- Message-makeFieldsNoPrefix ''RequestMessage-makeFieldsNoPrefix ''ResponseError-makeFieldsNoPrefix ''ResponseMessage-makeFieldsNoPrefix ''NotificationMessage-makeFieldsNoPrefix ''CancelParams---- TextDocument-makeFieldsNoPrefix ''TextDocumentItem-makeFieldsNoPrefix ''TextDocumentIdentifier-makeFieldsNoPrefix ''TextDocumentPositionParams-makeFieldsNoPrefix ''TextDocumentSyncClientCapabilities-makeFieldsNoPrefix ''TextDocumentClientCapabilities-makeFieldsNoPrefix ''TextDocumentRegistrationOptions-makeFieldsNoPrefix ''TextDocumentSyncOptions-makeFieldsNoPrefix ''DidOpenTextDocumentParams-makeFieldsNoPrefix ''TextDocumentContentChangeEvent-makeFieldsNoPrefix ''DidChangeTextDocumentParams-makeFieldsNoPrefix ''TextDocumentChangeRegistrationOptions-makeFieldsNoPrefix ''WillSaveTextDocumentParams-makeFieldsNoPrefix ''DidSaveTextDocumentParams-makeFieldsNoPrefix ''TextDocumentSaveRegistrationOptions-makeFieldsNoPrefix ''DidCloseTextDocumentParams---- Command-makeFieldsNoPrefix ''Command-makeFieldsNoPrefix ''ExecuteCommandParams-makeFieldsNoPrefix ''ExecuteCommandRegistrationOptions-makeFieldsNoPrefix ''ExecuteCommandClientCapabilities-makeFieldsNoPrefix ''ExecuteCommandOptions---- Diagnostic-makeFieldsNoPrefix ''DiagnosticRelatedInformation-makeFieldsNoPrefix ''Diagnostic-makeFieldsNoPrefix ''PublishDiagnosticsTagsClientCapabilities-makeFieldsNoPrefix ''PublishDiagnosticsClientCapabilities-makeFieldsNoPrefix ''PublishDiagnosticsParams---- Hover-makeFieldsNoPrefix ''HoverClientCapabilities-makeFieldsNoPrefix ''Hover-makeFieldsNoPrefix ''HoverParams-makeFieldsNoPrefix ''HoverOptions-makeFieldsNoPrefix ''HoverRegistrationOptions-makeFieldsNoPrefix ''LanguageString---- Implementation-makeFieldsNoPrefix ''ImplementationClientCapabilities-makeFieldsNoPrefix ''ImplementationOptions-makeFieldsNoPrefix ''ImplementationRegistrationOptions-makeFieldsNoPrefix ''ImplementationParams---- Definition-makeFieldsNoPrefix ''DefinitionOptions-makeFieldsNoPrefix ''DefinitionRegistrationOptions-makeFieldsNoPrefix ''DefinitionParams-makeFieldsNoPrefix ''DefinitionClientCapabilities---- Type Definition-makeFieldsNoPrefix ''TypeDefinitionOptions-makeFieldsNoPrefix ''TypeDefinitionRegistrationOptions-makeFieldsNoPrefix ''TypeDefinitionParams-makeFieldsNoPrefix ''TypeDefinitionClientCapabilities---- Window-makeFieldsNoPrefix ''ShowMessageParams-makeFieldsNoPrefix ''MessageActionItem-makeFieldsNoPrefix ''ShowMessageRequestParams-makeFieldsNoPrefix ''ShowDocumentParams-makeFieldsNoPrefix ''ShowDocumentResult-makeFieldsNoPrefix ''LogMessageParams-makeFieldsNoPrefix ''ProgressParams-makeFieldsNoPrefix ''WorkDoneProgressBeginParams-makeFieldsNoPrefix ''WorkDoneProgressReportParams-makeFieldsNoPrefix ''WorkDoneProgressEndParams-makeFieldsNoPrefix ''WorkDoneProgressCancelParams-makeFieldsNoPrefix ''WorkDoneProgressCreateParams-makeFieldsNoPrefix ''WorkDoneProgressOptions-makeFieldsNoPrefix ''WorkDoneProgressParams-makeFieldsNoPrefix ''PartialResultParams---- Signature Help-makeFieldsNoPrefix ''SignatureHelpSignatureInformation-makeFieldsNoPrefix ''SignatureHelpParameterInformation-makeFieldsNoPrefix ''SignatureHelpParams-makeFieldsNoPrefix ''SignatureHelpClientCapabilities-makeFieldsNoPrefix ''SignatureHelpOptions-makeFieldsNoPrefix ''SignatureHelpRegistrationOptions-makeFieldsNoPrefix ''SignatureHelp---- Static registration-makeFieldsNoPrefix ''StaticRegistrationOptions---- Call hierarchy-makeFieldsNoPrefix ''CallHierarchyClientCapabilities-makeFieldsNoPrefix ''CallHierarchyOptions-makeFieldsNoPrefix ''CallHierarchyRegistrationOptions-makeFieldsNoPrefix ''CallHierarchyPrepareParams-makeFieldsNoPrefix ''CallHierarchyIncomingCallsParams-makeFieldsNoPrefix ''CallHierarchyIncomingCall-makeFieldsNoPrefix ''CallHierarchyOutgoingCallsParams-makeFieldsNoPrefix ''CallHierarchyOutgoingCall-makeFieldsNoPrefix ''CallHierarchyItem---- Semantic tokens-makeFieldsNoPrefix ''SemanticTokensLegend-makeFieldsNoPrefix ''SemanticTokensDeltaClientCapabilities-makeFieldsNoPrefix ''SemanticTokensRequestsClientCapabilities-makeFieldsNoPrefix ''SemanticTokensClientCapabilities-makeFieldsNoPrefix ''SemanticTokensParams-makeFieldsNoPrefix ''SemanticTokensDeltaParams-makeFieldsNoPrefix ''SemanticTokensRangeParams-makeFieldsNoPrefix ''SemanticTokens-makeFieldsNoPrefix ''SemanticTokensPartialResult-makeFieldsNoPrefix ''SemanticTokensEdit-makeFieldsNoPrefix ''SemanticTokensDelta-makeFieldsNoPrefix ''SemanticTokensDeltaPartialResult-makeFieldsNoPrefix ''SemanticTokensWorkspaceClientCapabilities---- Unions-makePrisms ''(|?)
− src/Language/LSP/Types/Location.hs
@@ -1,94 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Location where--import Control.DeepSeq-import Data.Aeson.TH-import Data.Hashable-import GHC.Generics hiding (UInt)-import Language.LSP.Types.Common-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---- ------------------------------------------------------------------------- | A position in a document. Note that the character offsets in a line--- are given in UTF-16 code units, *not* Unicode code points.-data Position =- Position- { -- | Line position in a document (zero-based).- _line :: UInt- -- | Character offset on a line in a document (zero-based). Assuming that- -- the line is represented as a string, the @character@ value represents the- -- gap between the @character@ and @character + 1@.- , _character :: UInt- } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Position-deriveJSON lspOptions ''Position--instance Hashable Position---- -----------------------------------------------------------------------data Range =- Range- { _start :: Position -- ^ The range's start position. (inclusive)- , _end :: Position -- ^ The range's end position. (exclusive, see: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range )- } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Range-deriveJSON lspOptions ''Range--instance Hashable Range---- -----------------------------------------------------------------------data Location =- Location- { _uri :: Uri- , _range :: Range- } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Location-deriveJSON lspOptions ''Location--instance Hashable Location---- ------------------------------------------------------------------------- | Represents a link between a source and a target location.-data LocationLink =- LocationLink- { -- | Span of the origin of this link.- -- Used as the underlined span for mouse interaction. Defaults to the word- -- range at the mouse position.- _originSelectionRange :: Maybe Range- -- | The target resource identifier of this link.- , _targetUri :: Uri- -- | The full target range of this link. If the target for example is a- -- symbol then target range is the range enclosing this symbol not including- -- leading/trailing whitespace but everything else like comments. This- -- information is typically used to highlight the range in the editor.- , _targetRange :: Range- -- | The range that should be selected and revealed when this link is being- -- followed, e.g the name of a function. Must be contained by the the- -- 'targetRange'. See also @DocumentSymbol._range@- , _targetSelectionRange :: Range- } deriving (Read, Show, Eq)-deriveJSON lspOptions ''LocationLink---- ------------------------------------------------------------------------- | A helper function for creating ranges.--- prop> mkRange l c l' c' = Range (Position l c) (Position l' c')-mkRange :: UInt -> UInt -> UInt -> UInt -> Range-mkRange l c l' c' = Range (Position l c) (Position l' c')---- | 'isSubrangeOf' returns true if for every 'Position' in the first 'Range', it's also in the second 'Range'.-isSubrangeOf :: Range -> Range -> Bool-isSubrangeOf smallRange range = _start smallRange >= _start range && _end smallRange <= _end range---- | 'positionInRange' returns true if the given 'Position' is in the 'Range'.-positionInRange :: Position -> Range -> Bool-positionInRange p (Range sp ep) = sp <= p && p < ep -- Range's end position is exclusive.
− src/Language/LSP/Types/LspId.hs
@@ -1,55 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE TypeInType #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-module Language.LSP.Types.LspId where--import qualified Data.Aeson as A-import Data.Hashable-import Data.Int (Int32)-import Data.IxMap-import Data.Text (Text)--import Language.LSP.Types.Method---- | Id used for a request, Can be either a String or an Int-data LspId (m :: Method f Request) = IdInt !Int32 | IdString !Text- deriving (Show,Read,Eq,Ord)--instance A.ToJSON (LspId m) where- toJSON (IdInt i) = A.toJSON i- toJSON (IdString s) = A.toJSON s--instance A.FromJSON (LspId m) where- parseJSON v@(A.Number _) = IdInt <$> A.parseJSON v- parseJSON (A.String s) = return (IdString s)- parseJSON _ = fail "LspId"--instance IxOrd LspId where- type Base LspId = SomeLspId- toBase = SomeLspId--instance Hashable (LspId m) where- hashWithSalt n (IdInt i) = hashWithSalt n i- hashWithSalt n (IdString t) = hashWithSalt n t--data SomeLspId where- SomeLspId :: !(LspId m) -> SomeLspId--deriving instance Show SomeLspId-instance Eq SomeLspId where- SomeLspId (IdInt a) == SomeLspId (IdInt b) = a == b- SomeLspId (IdString a) == SomeLspId (IdString b) = a == b- _ == _ = False-instance Ord SomeLspId where- compare (SomeLspId x) (SomeLspId y) = go x y- where- go (IdInt a) (IdInt b) = a `compare` b- go (IdString a) (IdString b) = a `compare` b- go (IdInt _) (IdString _) = LT- go (IdString _) (IdInt _) = GT--instance Hashable SomeLspId where- hashWithSalt n (SomeLspId lspId) = hashWithSalt n lspId
− src/Language/LSP/Types/MarkupContent.hs
@@ -1,111 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}---- | A MarkupContent literal represents a string value which content can--- be represented in different formats.--- Currently plaintext and markdown are supported formats.--- A MarkupContent is usually used in documentation properties of result--- literals like CompletionItem or SignatureInformation.-module Language.LSP.Types.MarkupContent where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import qualified Data.Text as T-import Language.LSP.Types.Utils---- | Describes the content type that a client supports in various--- result literals like `Hover`, `ParameterInfo` or `CompletionItem`.-data MarkupKind = MkPlainText -- ^ Plain text is supported as a content format- | MkMarkdown -- ^ Markdown is supported as a content format- deriving (Read, Show, Eq)--instance ToJSON MarkupKind where- toJSON MkPlainText = String "plaintext"- toJSON MkMarkdown = String "markdown"--instance FromJSON MarkupKind where- parseJSON (String "plaintext") = pure MkPlainText- parseJSON (String "markdown") = pure MkMarkdown- parseJSON _ = fail "MarkupKind"---- | A `MarkupContent` literal represents a string value which content is interpreted base on its--- | kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.--- |--- | If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.--- | See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting--- |--- | Here is an example how such a string can be constructed using JavaScript / TypeScript:--- | ```ts--- | let markdown: MarkdownContent = {--- | kind: MarkupKind.Markdown,--- | value: [--- | '# Header',--- | 'Some text',--- | '```typescript',--- | 'someCode();',--- | '```'--- | ].join('\n')--- | };--- | ```--- |--- | *Please Note* that clients might sanitize the return markdown. A client could decide to--- | remove HTML from the markdown to avoid script execution.-data MarkupContent =- MarkupContent- { _kind :: MarkupKind -- ^ The type of the Markup- , _value :: Text -- ^ The content itself- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''MarkupContent---- ------------------------------------------------------------------------- | Create a 'MarkupContent' containing a quoted language string only.-markedUpContent :: Text -> Text -> MarkupContent-markedUpContent lang quote- = MarkupContent MkMarkdown ("\n```" <> lang <> "\n" <> quote <> "\n```\n")---- ------------------------------------------------------------------------- | Create a 'MarkupContent' containing unquoted text-unmarkedUpContent :: Text -> MarkupContent-unmarkedUpContent str = MarkupContent MkPlainText str---- ------------------------------------------------------------------------- | Markdown for a section separator in Markdown, being a horizontal line-sectionSeparator :: Text-sectionSeparator = "* * *\n"---- ------------------------------------------------------------------------- | Given some plaintext, convert it into some equivalent markdown text.--- This is not *quite* the identity function.-plainTextToMarkdown :: Text -> Text--- Line breaks in markdown paragraphs are ignored unless the line ends with two spaces.--- In order to respect the line breaks in the original plaintext, we stick two spaces on the end of every line.-plainTextToMarkdown = T.unlines . fmap (<> " ") . T.lines--instance Semigroup MarkupContent where- MarkupContent MkPlainText s1 <> MarkupContent MkPlainText s2 = MarkupContent MkPlainText (s1 `mappend` s2)- MarkupContent MkMarkdown s1 <> MarkupContent MkMarkdown s2 = MarkupContent MkMarkdown (s1 `mappend` s2)- MarkupContent MkPlainText s1 <> MarkupContent MkMarkdown s2 = MarkupContent MkMarkdown (plainTextToMarkdown s1 `mappend` s2)- MarkupContent MkMarkdown s1 <> MarkupContent MkPlainText s2 = MarkupContent MkMarkdown (s1 `mappend` plainTextToMarkdown s2)--instance Monoid MarkupContent where- mempty = MarkupContent MkPlainText ""---- ------------------------------------------------------------------------- | Client capabilities specific to the used markdown parser.--- @since 3.16.0-data MarkdownClientCapabilities =- MarkdownClientCapabilities- { _parser :: Text- , _version :: Maybe Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''MarkdownClientCapabilities
− src/Language/LSP/Types/Message.hs
@@ -1,423 +0,0 @@-{-# LANGUAGE GADTs #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TupleSections #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}--module Language.LSP.Types.Message where--import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.Cancellation-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.Configuration-import Language.LSP.Types.Completion-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.Initialize-import Language.LSP.Types.Location-import Language.LSP.Types.LspId-import Language.LSP.Types.Method-import Language.LSP.Types.Progress-import Language.LSP.Types.Registration-import Language.LSP.Types.Rename-import Language.LSP.Types.References-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.Window-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.WorkspaceFolders-import Language.LSP.Types.WorkspaceSymbol--import Data.Kind-import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Data.Scientific-import Data.String-import GHC.Generics---- ------------------------------------------------------------------------ PARAMS definition--- Map Methods to params/responses--- ------------------------------------------------------------------------- | Map a method to the message payload type-type family MessageParams (m :: Method f t) :: Type where--- Client- -- General- MessageParams Initialize = InitializeParams- MessageParams Initialized = Maybe InitializedParams- MessageParams Shutdown = Empty- MessageParams Exit = Empty- -- Workspace- MessageParams WorkspaceDidChangeWorkspaceFolders = DidChangeWorkspaceFoldersParams- MessageParams WorkspaceDidChangeConfiguration = DidChangeConfigurationParams- MessageParams WorkspaceDidChangeWatchedFiles = DidChangeWatchedFilesParams- MessageParams WorkspaceSymbol = WorkspaceSymbolParams- MessageParams WorkspaceExecuteCommand = ExecuteCommandParams- -- Sync/Document state- MessageParams TextDocumentDidOpen = DidOpenTextDocumentParams- MessageParams TextDocumentDidChange = DidChangeTextDocumentParams- MessageParams TextDocumentWillSave = WillSaveTextDocumentParams- MessageParams TextDocumentWillSaveWaitUntil = WillSaveTextDocumentParams- MessageParams TextDocumentDidSave = DidSaveTextDocumentParams- MessageParams TextDocumentDidClose = DidCloseTextDocumentParams- -- Completion- MessageParams TextDocumentCompletion = CompletionParams- MessageParams CompletionItemResolve = CompletionItem- -- Language Queries- MessageParams TextDocumentHover = HoverParams- MessageParams TextDocumentSignatureHelp = SignatureHelpParams- MessageParams TextDocumentDeclaration = DeclarationParams- MessageParams TextDocumentDefinition = DefinitionParams- MessageParams TextDocumentTypeDefinition = TypeDefinitionParams- MessageParams TextDocumentImplementation = ImplementationParams- MessageParams TextDocumentReferences = ReferenceParams- MessageParams TextDocumentDocumentHighlight = DocumentHighlightParams- MessageParams TextDocumentDocumentSymbol = DocumentSymbolParams- -- Code Action/Lens/Link- MessageParams TextDocumentCodeAction = CodeActionParams- MessageParams TextDocumentCodeLens = CodeLensParams- MessageParams CodeLensResolve = CodeLens- MessageParams TextDocumentDocumentLink = DocumentLinkParams- MessageParams DocumentLinkResolve = DocumentLink- -- Syntax highlighting/coloring- MessageParams TextDocumentDocumentColor = DocumentColorParams- MessageParams TextDocumentColorPresentation = ColorPresentationParams- -- Formatting- MessageParams TextDocumentFormatting = DocumentFormattingParams- MessageParams TextDocumentRangeFormatting = DocumentRangeFormattingParams- MessageParams TextDocumentOnTypeFormatting = DocumentOnTypeFormattingParams- -- Rename- MessageParams TextDocumentRename = RenameParams- MessageParams TextDocumentPrepareRename = PrepareRenameParams- -- Folding Range- MessageParams TextDocumentFoldingRange = FoldingRangeParams- -- Selection Range- MessageParams TextDocumentSelectionRange = SelectionRangeParams- -- Call hierarchy- MessageParams TextDocumentPrepareCallHierarchy = CallHierarchyPrepareParams- MessageParams CallHierarchyIncomingCalls = CallHierarchyIncomingCallsParams- MessageParams CallHierarchyOutgoingCalls = CallHierarchyOutgoingCallsParams- -- Semantic tokens - MessageParams TextDocumentSemanticTokens = Empty- MessageParams TextDocumentSemanticTokensFull = SemanticTokensParams- MessageParams TextDocumentSemanticTokensFullDelta = SemanticTokensDeltaParams- MessageParams TextDocumentSemanticTokensRange = SemanticTokensRangeParams - MessageParams WorkspaceSemanticTokensRefresh = Empty--- Server- -- Window- MessageParams WindowShowMessage = ShowMessageParams- MessageParams WindowShowMessageRequest = ShowMessageRequestParams- MessageParams WindowShowDocument = ShowDocumentParams- MessageParams WindowLogMessage = LogMessageParams- -- Progress- MessageParams WindowWorkDoneProgressCreate = WorkDoneProgressCreateParams- MessageParams WindowWorkDoneProgressCancel = WorkDoneProgressCancelParams- MessageParams Progress = ProgressParams SomeProgressParams- -- Telemetry- MessageParams TelemetryEvent = Value- -- Client- MessageParams ClientRegisterCapability = RegistrationParams- MessageParams ClientUnregisterCapability = UnregistrationParams- -- Workspace- MessageParams WorkspaceWorkspaceFolders = Empty- MessageParams WorkspaceConfiguration = ConfigurationParams- MessageParams WorkspaceApplyEdit = ApplyWorkspaceEditParams- -- Document/Diagnostic- MessageParams TextDocumentPublishDiagnostics = PublishDiagnosticsParams- -- Cancel- MessageParams CancelRequest = CancelParams- -- Custom- MessageParams CustomMethod = Value---- | Map a request method to the response payload type-type family ResponseResult (m :: Method f Request) :: Type where--- Even though the specification mentions that the result types are--- @x | y | ... | null@, they don't actually need to be wrapped in a Maybe since--- (we think) this is just to account for how the response field is always--- nullable. I.e. if it is null, then the error field is set---- Client- -- General- ResponseResult Initialize = InitializeResult- ResponseResult Shutdown = Empty- -- Workspace- ResponseResult WorkspaceSymbol = List SymbolInformation- ResponseResult WorkspaceExecuteCommand = Value- -- Sync/Document state- ResponseResult TextDocumentWillSaveWaitUntil = List TextEdit- -- Completion- ResponseResult TextDocumentCompletion = List CompletionItem |? CompletionList- ResponseResult CompletionItemResolve = CompletionItem- -- Language Queries- ResponseResult TextDocumentHover = Maybe Hover- ResponseResult TextDocumentSignatureHelp = SignatureHelp- ResponseResult TextDocumentDeclaration = Location |? List Location |? List LocationLink- ResponseResult TextDocumentDefinition = Location |? List Location |? List LocationLink- ResponseResult TextDocumentTypeDefinition = Location |? List Location |? List LocationLink- ResponseResult TextDocumentImplementation = Location |? List Location |? List LocationLink- ResponseResult TextDocumentReferences = List Location- ResponseResult TextDocumentDocumentHighlight = List DocumentHighlight- ResponseResult TextDocumentDocumentSymbol = List DocumentSymbol |? List SymbolInformation- -- Code Action/Lens/Link- ResponseResult TextDocumentCodeAction = List (Command |? CodeAction)- ResponseResult TextDocumentCodeLens = List CodeLens- ResponseResult CodeLensResolve = CodeLens- ResponseResult TextDocumentDocumentLink = List DocumentLink- ResponseResult DocumentLinkResolve = DocumentLink- -- Syntax highlighting/coloring- ResponseResult TextDocumentDocumentColor = List ColorInformation- ResponseResult TextDocumentColorPresentation = List ColorPresentation- -- Formatting- ResponseResult TextDocumentFormatting = List TextEdit- ResponseResult TextDocumentRangeFormatting = List TextEdit- ResponseResult TextDocumentOnTypeFormatting = List TextEdit- -- Rename- ResponseResult TextDocumentRename = WorkspaceEdit- ResponseResult TextDocumentPrepareRename = Maybe (Range |? RangeWithPlaceholder)- -- FoldingRange- ResponseResult TextDocumentFoldingRange = List FoldingRange- ResponseResult TextDocumentSelectionRange = List SelectionRange- -- Call hierarchy- ResponseResult TextDocumentPrepareCallHierarchy = Maybe (List CallHierarchyItem)- ResponseResult CallHierarchyIncomingCalls = Maybe (List CallHierarchyIncomingCall)- ResponseResult CallHierarchyOutgoingCalls = Maybe (List CallHierarchyOutgoingCall)- -- Semantic tokens - ResponseResult TextDocumentSemanticTokens = Empty- ResponseResult TextDocumentSemanticTokensFull = Maybe SemanticTokens- ResponseResult TextDocumentSemanticTokensFullDelta = Maybe (SemanticTokens |? SemanticTokensDelta)- ResponseResult TextDocumentSemanticTokensRange = Maybe SemanticTokens - ResponseResult WorkspaceSemanticTokensRefresh = Empty- -- Custom can be either a notification or a message--- Server- -- Window- ResponseResult WindowShowMessageRequest = Maybe MessageActionItem- ResponseResult WindowShowDocument = ShowDocumentResult- ResponseResult WindowWorkDoneProgressCreate = Empty- -- Capability- ResponseResult ClientRegisterCapability = Empty- ResponseResult ClientUnregisterCapability = Empty- -- Workspace- ResponseResult WorkspaceWorkspaceFolders = Maybe (List WorkspaceFolder)- ResponseResult WorkspaceConfiguration = List Value- ResponseResult WorkspaceApplyEdit = ApplyWorkspaceEditResponseBody--- Custom- ResponseResult CustomMethod = Value----- ----------------------------------------------------------------------{--$ Notifications and Requests--Notification and requests ids starting with '$/' are messages which are protocol-implementation dependent and might not be implementable in all clients or-servers. For example if the server implementation uses a single threaded-synchronous programming language then there is little a server can do to react-to a '$/cancelRequest'. If a server or client receives notifications or requests-starting with '$/' it is free to ignore them if they are unknown.---}--data NotificationMessage (m :: Method f Notification) =- NotificationMessage- { _jsonrpc :: Text- , _method :: SMethod m- , _params :: MessageParams m- } deriving Generic--deriving instance Eq (MessageParams m) => Eq (NotificationMessage m)-deriving instance Show (MessageParams m) => Show (NotificationMessage m)--instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (NotificationMessage m) where- parseJSON = genericParseJSON lspOptions . addNullField "params"-instance (ToJSON (MessageParams m)) => ToJSON (NotificationMessage m) where- toJSON = genericToJSON lspOptions- toEncoding = genericToEncoding lspOptions--data RequestMessage (m :: Method f Request) = RequestMessage- { _jsonrpc :: Text- , _id :: LspId m- , _method :: SMethod m- , _params :: MessageParams m- } deriving Generic--deriving instance Eq (MessageParams m) => Eq (RequestMessage m)-deriving instance (Read (SMethod m), Read (MessageParams m)) => Read (RequestMessage m)-deriving instance Show (MessageParams m) => Show (RequestMessage m)---- | Replace a missing field in an object with a null field, to simplify parsing--- This is a hack to allow other types than Maybe to work like Maybe in allowing the field to be missing.--- See also this issue: https://github.com/haskell/aeson/issues/646-addNullField :: String -> Value -> Value-addNullField s (Object o) = Object $ o <> fromString s .= Null-addNullField _ v = v--instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (RequestMessage m) where- parseJSON = genericParseJSON lspOptions . addNullField "params"-instance (ToJSON (MessageParams m), FromJSON (SMethod m)) => ToJSON (RequestMessage m) where- toJSON = genericToJSON lspOptions- toEncoding = genericToEncoding lspOptions---- | A custom message data type is needed to distinguish between--- notifications and requests, since a CustomMethod can be both!-data CustomMessage f t where- ReqMess :: RequestMessage (CustomMethod :: Method f Request) -> CustomMessage f Request- NotMess :: NotificationMessage (CustomMethod :: Method f Notification) -> CustomMessage f Notification--deriving instance Show (CustomMessage p t)--instance ToJSON (CustomMessage p t) where- toJSON (ReqMess a) = toJSON a- toJSON (NotMess a) = toJSON a--instance FromJSON (CustomMessage p Request) where- parseJSON v = ReqMess <$> parseJSON v-instance FromJSON (CustomMessage p Notification) where- parseJSON v = NotMess <$> parseJSON v---- ------------------------------------------------------------------------ Response Message--- -----------------------------------------------------------------------data ErrorCode = ParseError- | InvalidRequest- | MethodNotFound- | InvalidParams- | InternalError- | ServerErrorStart- | ServerErrorEnd- | ServerNotInitialized- | UnknownErrorCode- | RequestCancelled- | ContentModified- | ServerCancelled- | RequestFailed- | ErrorCodeCustom Int32- -- ^ Note: server error codes are reserved from -32099 to -32000- deriving (Read,Show,Eq)--instance ToJSON ErrorCode where- toJSON ParseError = Number (-32700)- toJSON InvalidRequest = Number (-32600)- toJSON MethodNotFound = Number (-32601)- toJSON InvalidParams = Number (-32602)- toJSON InternalError = Number (-32603)- toJSON ServerErrorStart = Number (-32099)- toJSON ServerErrorEnd = Number (-32000)- toJSON ServerNotInitialized = Number (-32002)- toJSON UnknownErrorCode = Number (-32001)- toJSON RequestCancelled = Number (-32800)- toJSON ContentModified = Number (-32801)- toJSON ServerCancelled = Number (-32802)- toJSON RequestFailed = Number (-32803)- toJSON (ErrorCodeCustom n) = Number (fromIntegral n)--instance FromJSON ErrorCode where- parseJSON (Number (-32700)) = pure ParseError- parseJSON (Number (-32600)) = pure InvalidRequest- parseJSON (Number (-32601)) = pure MethodNotFound- parseJSON (Number (-32602)) = pure InvalidParams- parseJSON (Number (-32603)) = pure InternalError- parseJSON (Number (-32099)) = pure ServerErrorStart- parseJSON (Number (-32000)) = pure ServerErrorEnd- parseJSON (Number (-32002)) = pure ServerNotInitialized- parseJSON (Number (-32001)) = pure UnknownErrorCode- parseJSON (Number (-32800)) = pure RequestCancelled- parseJSON (Number (-32801)) = pure ContentModified- parseJSON (Number (-32802)) = pure ServerCancelled- parseJSON (Number (-32803)) = pure RequestFailed- parseJSON (Number n ) = case toBoundedInteger n of- Just i -> pure (ErrorCodeCustom i)- Nothing -> fail "Couldn't convert ErrorCode to bounded integer."- parseJSON _ = fail "Couldn't parse ErrorCode"---- ---------------------------------------data ResponseError =- ResponseError- { _code :: ErrorCode- , _message :: Text- , _xdata :: Maybe Value- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''ResponseError---- | Either result or error must be Just.-data ResponseMessage (m :: Method f Request) =- ResponseMessage- { _jsonrpc :: Text- , _id :: Maybe (LspId m)- , _result :: Either ResponseError (ResponseResult m)- } deriving Generic--deriving instance Eq (ResponseResult m) => Eq (ResponseMessage m)-deriving instance Read (ResponseResult m) => Read (ResponseMessage m)-deriving instance Show (ResponseResult m) => Show (ResponseMessage m)--instance (ToJSON (ResponseResult m)) => ToJSON (ResponseMessage m) where- toJSON ResponseMessage { _jsonrpc = jsonrpc, _id = lspid, _result = result }- = object- [ "jsonrpc" .= jsonrpc- , "id" .= lspid- , case result of- Left err -> "error" .= err- Right a -> "result" .= a- ]--instance FromJSON (ResponseResult a) => FromJSON (ResponseMessage a) where- parseJSON = withObject "Response" $ \o -> do- _jsonrpc <- o .: "jsonrpc"- _id <- o .: "id"- -- It is important to use .:! so that "result = null" (without error) gets decoded as Just Null- _result <- o .:! "result"- _error <- o .:? "error"- result <- case (_error, _result) of- (Just err, Nothing) -> pure $ Left err- (Nothing, Just res) -> pure $ Right res- (Just _err, Just _res) -> fail $ "both error and result cannot be present: " ++ show o- (Nothing, Nothing) -> fail "both error and result cannot be Nothing"- return $ ResponseMessage _jsonrpc _id result---- ------------------------------------------------------------------------ Helper Type Families--- ------------------------------------------------------------------------- | Map a method to the Request/Notification type with the correct--- payload-type family Message (m :: Method f t) :: Type where- Message (CustomMethod :: Method f t) = CustomMessage f t- Message (m :: Method f Request) = RequestMessage m- Message (m :: Method f Notification) = NotificationMessage m---- Some helpful type synonyms-type ClientMessage (m :: Method FromClient t) = Message m-type ServerMessage (m :: Method FromServer t) = Message m
− src/Language/LSP/Types/Method.hs
@@ -1,455 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-module Language.LSP.Types.Method where--import qualified Data.Aeson as A-import Data.Aeson.Types-import Data.Text (Text)-import Language.LSP.Types.Utils-import Data.Function (on)-import Control.Applicative-import Data.GADT.Compare-import Data.Type.Equality-import GHC.Exts (Int(..), dataToTag#)-import Unsafe.Coerce---- -----------------------------------------------------------------------data From = FromServer | FromClient-data MethodType = Notification | Request--data Method (f :: From) (t :: MethodType) where--- Client Methods- -- General- Initialize :: Method FromClient Request- Initialized :: Method FromClient Notification- Shutdown :: Method FromClient Request- Exit :: Method FromClient Notification- -- Workspace- WorkspaceDidChangeWorkspaceFolders :: Method FromClient Notification- WorkspaceDidChangeConfiguration :: Method FromClient Notification- WorkspaceDidChangeWatchedFiles :: Method FromClient Notification- WorkspaceSymbol :: Method FromClient Request- WorkspaceExecuteCommand :: Method FromClient Request- -- Document- TextDocumentDidOpen :: Method FromClient Notification- TextDocumentDidChange :: Method FromClient Notification- TextDocumentWillSave :: Method FromClient Notification- TextDocumentWillSaveWaitUntil :: Method FromClient Request- TextDocumentDidSave :: Method FromClient Notification- TextDocumentDidClose :: Method FromClient Notification- -- Completion- TextDocumentCompletion :: Method FromClient Request- CompletionItemResolve :: Method FromClient Request- -- LanguageQueries- TextDocumentHover :: Method FromClient Request- TextDocumentSignatureHelp :: Method FromClient Request- TextDocumentDeclaration :: Method FromClient Request- TextDocumentDefinition :: Method FromClient Request- TextDocumentTypeDefinition :: Method FromClient Request- TextDocumentImplementation :: Method FromClient Request- TextDocumentReferences :: Method FromClient Request- TextDocumentDocumentHighlight :: Method FromClient Request- TextDocumentDocumentSymbol :: Method FromClient Request- -- Code Action/Lens/Link- TextDocumentCodeAction :: Method FromClient Request- TextDocumentCodeLens :: Method FromClient Request- CodeLensResolve :: Method FromClient Request- TextDocumentDocumentLink :: Method FromClient Request- DocumentLinkResolve :: Method FromClient Request- -- Syntax highlighting/Coloring- TextDocumentDocumentColor :: Method FromClient Request- TextDocumentColorPresentation :: Method FromClient Request- -- Formatting- TextDocumentFormatting :: Method FromClient Request- TextDocumentRangeFormatting :: Method FromClient Request- TextDocumentOnTypeFormatting :: Method FromClient Request- -- Rename- TextDocumentRename :: Method FromClient Request- TextDocumentPrepareRename :: Method FromClient Request- -- FoldingRange- TextDocumentFoldingRange :: Method FromClient Request- TextDocumentSelectionRange :: Method FromClient Request- -- Call hierarchy- TextDocumentPrepareCallHierarchy :: Method FromClient Request- CallHierarchyIncomingCalls :: Method FromClient Request- CallHierarchyOutgoingCalls :: Method FromClient Request- -- SemanticTokens- TextDocumentSemanticTokens :: Method FromClient Request- TextDocumentSemanticTokensFull :: Method FromClient Request- TextDocumentSemanticTokensFullDelta :: Method FromClient Request- TextDocumentSemanticTokensRange :: Method FromClient Request---- ServerMethods- -- Window- WindowShowMessage :: Method FromServer Notification- WindowShowMessageRequest :: Method FromServer Request- WindowShowDocument :: Method FromServer Request- WindowLogMessage :: Method FromServer Notification- WindowWorkDoneProgressCancel :: Method FromClient Notification- WindowWorkDoneProgressCreate :: Method FromServer Request- -- Progress- Progress :: Method FromServer Notification- -- Telemetry- TelemetryEvent :: Method FromServer Notification- -- Client- ClientRegisterCapability :: Method FromServer Request- ClientUnregisterCapability :: Method FromServer Request- -- Workspace- WorkspaceWorkspaceFolders :: Method FromServer Request- WorkspaceConfiguration :: Method FromServer Request- WorkspaceApplyEdit :: Method FromServer Request- WorkspaceSemanticTokensRefresh :: Method FromServer Request- -- Document- TextDocumentPublishDiagnostics :: Method FromServer Notification---- Cancelling- CancelRequest :: Method f Notification---- Custom- -- A custom message type. It is not enforced that this starts with $/.- CustomMethod :: Method f t--data SMethod (m :: Method f t) where- SInitialize :: SMethod Initialize- SInitialized :: SMethod Initialized- SShutdown :: SMethod Shutdown- SExit :: SMethod Exit- SWorkspaceDidChangeWorkspaceFolders :: SMethod WorkspaceDidChangeWorkspaceFolders- SWorkspaceDidChangeConfiguration :: SMethod WorkspaceDidChangeConfiguration- SWorkspaceDidChangeWatchedFiles :: SMethod WorkspaceDidChangeWatchedFiles- SWorkspaceSymbol :: SMethod WorkspaceSymbol- SWorkspaceExecuteCommand :: SMethod WorkspaceExecuteCommand- STextDocumentDidOpen :: SMethod TextDocumentDidOpen- STextDocumentDidChange :: SMethod TextDocumentDidChange- STextDocumentWillSave :: SMethod TextDocumentWillSave- STextDocumentWillSaveWaitUntil :: SMethod TextDocumentWillSaveWaitUntil- STextDocumentDidSave :: SMethod TextDocumentDidSave- STextDocumentDidClose :: SMethod TextDocumentDidClose- STextDocumentCompletion :: SMethod TextDocumentCompletion- SCompletionItemResolve :: SMethod CompletionItemResolve- STextDocumentHover :: SMethod TextDocumentHover- STextDocumentSignatureHelp :: SMethod TextDocumentSignatureHelp- STextDocumentDeclaration :: SMethod TextDocumentDeclaration- STextDocumentDefinition :: SMethod TextDocumentDefinition- STextDocumentTypeDefinition :: SMethod TextDocumentTypeDefinition- STextDocumentImplementation :: SMethod TextDocumentImplementation- STextDocumentReferences :: SMethod TextDocumentReferences- STextDocumentDocumentHighlight :: SMethod TextDocumentDocumentHighlight- STextDocumentDocumentSymbol :: SMethod TextDocumentDocumentSymbol- STextDocumentCodeAction :: SMethod TextDocumentCodeAction- STextDocumentCodeLens :: SMethod TextDocumentCodeLens- SCodeLensResolve :: SMethod CodeLensResolve- STextDocumentDocumentLink :: SMethod TextDocumentDocumentLink- SDocumentLinkResolve :: SMethod DocumentLinkResolve- STextDocumentDocumentColor :: SMethod TextDocumentDocumentColor- STextDocumentColorPresentation :: SMethod TextDocumentColorPresentation- STextDocumentFormatting :: SMethod TextDocumentFormatting- STextDocumentRangeFormatting :: SMethod TextDocumentRangeFormatting- STextDocumentOnTypeFormatting :: SMethod TextDocumentOnTypeFormatting- STextDocumentRename :: SMethod TextDocumentRename- STextDocumentPrepareRename :: SMethod TextDocumentPrepareRename- STextDocumentFoldingRange :: SMethod TextDocumentFoldingRange- STextDocumentSelectionRange :: SMethod TextDocumentSelectionRange- STextDocumentPrepareCallHierarchy :: SMethod TextDocumentPrepareCallHierarchy- SCallHierarchyIncomingCalls :: SMethod CallHierarchyIncomingCalls- SCallHierarchyOutgoingCalls :: SMethod CallHierarchyOutgoingCalls-- STextDocumentSemanticTokens :: SMethod TextDocumentSemanticTokens- STextDocumentSemanticTokensFull :: SMethod TextDocumentSemanticTokensFull- STextDocumentSemanticTokensFullDelta :: SMethod TextDocumentSemanticTokensFullDelta- STextDocumentSemanticTokensRange :: SMethod TextDocumentSemanticTokensRange- SWorkspaceSemanticTokensRefresh :: SMethod WorkspaceSemanticTokensRefresh-- SWindowShowMessage :: SMethod WindowShowMessage- SWindowShowMessageRequest :: SMethod WindowShowMessageRequest- SWindowShowDocument :: SMethod WindowShowDocument- SWindowLogMessage :: SMethod WindowLogMessage- SWindowWorkDoneProgressCreate :: SMethod WindowWorkDoneProgressCreate- SWindowWorkDoneProgressCancel :: SMethod WindowWorkDoneProgressCancel- SProgress :: SMethod Progress- STelemetryEvent :: SMethod TelemetryEvent- SClientRegisterCapability :: SMethod ClientRegisterCapability- SClientUnregisterCapability :: SMethod ClientUnregisterCapability- SWorkspaceWorkspaceFolders :: SMethod WorkspaceWorkspaceFolders- SWorkspaceConfiguration :: SMethod WorkspaceConfiguration- SWorkspaceApplyEdit :: SMethod WorkspaceApplyEdit- STextDocumentPublishDiagnostics :: SMethod TextDocumentPublishDiagnostics-- SCancelRequest :: SMethod CancelRequest- SCustomMethod :: Text -> SMethod CustomMethod---- This instance is written manually rather than derived to avoid a dependency--- on 'dependent-sum-template'.-instance GEq SMethod where- geq x y = case gcompare x y of- GLT -> Nothing- GEQ -> Just Refl- GGT -> Nothing---- This instance is written manually rather than derived to avoid a dependency--- on 'dependent-sum-template'.-instance GCompare SMethod where- gcompare (SCustomMethod x) (SCustomMethod y) = case x `compare` y of- LT -> GLT- EQ -> GEQ- GT -> GGT- -- This is much more compact than matching on every pair of constructors, which- -- is what we would need to do for GHC to 'see' that this is correct. Nonetheless- -- it is safe: since there is only one constructor of 'SMethod' for each 'Method',- -- the argument types can only be equal if the constructor tag is equal.- gcompare x y = case I# (dataToTag# x) `compare` I# (dataToTag# y) of- LT -> GLT- EQ -> unsafeCoerce GEQ- GT -> GGT--instance Eq (SMethod m) where- -- This defers to 'GEq', ensuring that this version is compatible.- (==) = defaultEq--instance Ord (SMethod m) where- -- This defers to 'GCompare', ensuring that this version is compatible.- compare = defaultCompare--deriving instance Show (SMethod m)---- Some useful type synonyms-type SClientMethod (m :: Method FromClient t) = SMethod m-type SServerMethod (m :: Method FromServer t) = SMethod m--data SomeClientMethod = forall t (m :: Method FromClient t). SomeClientMethod (SMethod m)-data SomeServerMethod = forall t (m :: Method FromServer t). SomeServerMethod (SMethod m)--data SomeMethod where- SomeMethod :: forall m. SMethod m -> SomeMethod--deriving instance Show SomeMethod-instance Eq SomeMethod where- (==) = (==) `on` toJSON-instance Ord SomeMethod where- compare = compare `on` (getString . toJSON)- where- getString (A.String t) = t- getString _ = error "ToJSON instance for some method isn't string"-deriving instance Show SomeClientMethod-instance Eq SomeClientMethod where- (==) = (==) `on` toJSON-instance Ord SomeClientMethod where- compare = compare `on` (getString . toJSON)- where- getString (A.String t) = t- getString _ = error "ToJSON instance for some method isn't string"-deriving instance Show SomeServerMethod-instance Eq SomeServerMethod where- (==) = (==) `on` toJSON-instance Ord SomeServerMethod where- compare = compare `on` (getString . toJSON)- where- getString (A.String t) = t- getString _ = error "ToJSON instance for some method isn't string"---- ------------------------------------------------------------------------ From JSON--- -----------------------------------------------------------------------instance FromJSON SomeMethod where- parseJSON v = client <|> server- where- client = do- c <- parseJSON v- case c of- -- Don't parse the client custom method so that we can still- -- parse the server methods- SomeClientMethod (SCustomMethod _) -> mempty- SomeClientMethod m -> pure $ SomeMethod m- server = do- c <- parseJSON v- case c of- SomeServerMethod m -> pure $ SomeMethod m--instance FromJSON SomeClientMethod where- -- General- parseJSON (A.String "initialize") = pure $ SomeClientMethod SInitialize- parseJSON (A.String "initialized") = pure $ SomeClientMethod SInitialized- parseJSON (A.String "shutdown") = pure $ SomeClientMethod SShutdown- parseJSON (A.String "exit") = pure $ SomeClientMethod SExit- -- Workspace- parseJSON (A.String "workspace/didChangeWorkspaceFolders") = pure $ SomeClientMethod SWorkspaceDidChangeWorkspaceFolders- parseJSON (A.String "workspace/didChangeConfiguration") = pure $ SomeClientMethod SWorkspaceDidChangeConfiguration- parseJSON (A.String "workspace/didChangeWatchedFiles") = pure $ SomeClientMethod SWorkspaceDidChangeWatchedFiles- parseJSON (A.String "workspace/symbol") = pure $ SomeClientMethod SWorkspaceSymbol- parseJSON (A.String "workspace/executeCommand") = pure $ SomeClientMethod SWorkspaceExecuteCommand- -- Document- parseJSON (A.String "textDocument/didOpen") = pure $ SomeClientMethod STextDocumentDidOpen- parseJSON (A.String "textDocument/didChange") = pure $ SomeClientMethod STextDocumentDidChange- parseJSON (A.String "textDocument/willSave") = pure $ SomeClientMethod STextDocumentWillSave- parseJSON (A.String "textDocument/willSaveWaitUntil") = pure $ SomeClientMethod STextDocumentWillSaveWaitUntil- parseJSON (A.String "textDocument/didSave") = pure $ SomeClientMethod STextDocumentDidSave- parseJSON (A.String "textDocument/didClose") = pure $ SomeClientMethod STextDocumentDidClose- parseJSON (A.String "textDocument/completion") = pure $ SomeClientMethod STextDocumentCompletion- parseJSON (A.String "completionItem/resolve") = pure $ SomeClientMethod SCompletionItemResolve- parseJSON (A.String "textDocument/hover") = pure $ SomeClientMethod STextDocumentHover- parseJSON (A.String "textDocument/signatureHelp") = pure $ SomeClientMethod STextDocumentSignatureHelp- parseJSON (A.String "textDocument/declaration") = pure $ SomeClientMethod STextDocumentDeclaration- parseJSON (A.String "textDocument/definition") = pure $ SomeClientMethod STextDocumentDefinition- parseJSON (A.String "textDocument/typeDefinition") = pure $ SomeClientMethod STextDocumentTypeDefinition- parseJSON (A.String "textDocument/implementation") = pure $ SomeClientMethod STextDocumentImplementation- parseJSON (A.String "textDocument/references") = pure $ SomeClientMethod STextDocumentReferences- parseJSON (A.String "textDocument/documentHighlight") = pure $ SomeClientMethod STextDocumentDocumentHighlight- parseJSON (A.String "textDocument/documentSymbol") = pure $ SomeClientMethod STextDocumentDocumentSymbol- parseJSON (A.String "textDocument/codeAction") = pure $ SomeClientMethod STextDocumentCodeAction- parseJSON (A.String "textDocument/codeLens") = pure $ SomeClientMethod STextDocumentCodeLens- parseJSON (A.String "codeLens/resolve") = pure $ SomeClientMethod SCodeLensResolve- parseJSON (A.String "textDocument/documentLink") = pure $ SomeClientMethod STextDocumentDocumentLink- parseJSON (A.String "documentLink/resolve") = pure $ SomeClientMethod SDocumentLinkResolve- parseJSON (A.String "textDocument/documentColor") = pure $ SomeClientMethod STextDocumentDocumentColor- parseJSON (A.String "textDocument/colorPresentation") = pure $ SomeClientMethod STextDocumentColorPresentation- parseJSON (A.String "textDocument/formatting") = pure $ SomeClientMethod STextDocumentFormatting- parseJSON (A.String "textDocument/rangeFormatting") = pure $ SomeClientMethod STextDocumentRangeFormatting- parseJSON (A.String "textDocument/onTypeFormatting") = pure $ SomeClientMethod STextDocumentOnTypeFormatting- parseJSON (A.String "textDocument/rename") = pure $ SomeClientMethod STextDocumentRename- parseJSON (A.String "textDocument/prepareRename") = pure $ SomeClientMethod STextDocumentPrepareRename- parseJSON (A.String "textDocument/foldingRange") = pure $ SomeClientMethod STextDocumentFoldingRange- parseJSON (A.String "textDocument/selectionRange") = pure $ SomeClientMethod STextDocumentSelectionRange- parseJSON (A.String "textDocument/prepareCallHierarchy") = pure $ SomeClientMethod STextDocumentPrepareCallHierarchy- parseJSON (A.String "callHierarchy/incomingCalls") = pure $ SomeClientMethod SCallHierarchyIncomingCalls- parseJSON (A.String "callHierarchy/outgoingCalls") = pure $ SomeClientMethod SCallHierarchyOutgoingCalls- parseJSON (A.String "textDocument/semanticTokens") = pure $ SomeClientMethod STextDocumentSemanticTokens- parseJSON (A.String "textDocument/semanticTokens/full") = pure $ SomeClientMethod STextDocumentSemanticTokensFull- parseJSON (A.String "textDocument/semanticTokens/full/delta") = pure $ SomeClientMethod STextDocumentSemanticTokensFullDelta- parseJSON (A.String "textDocument/semanticTokens/range") = pure $ SomeClientMethod STextDocumentSemanticTokensRange- parseJSON (A.String "window/workDoneProgress/cancel") = pure $ SomeClientMethod SWindowWorkDoneProgressCancel--- Cancelling- parseJSON (A.String "$/cancelRequest") = pure $ SomeClientMethod SCancelRequest--- Custom- parseJSON (A.String m) = pure $ SomeClientMethod (SCustomMethod m)- parseJSON _ = fail "SomeClientMethod"--instance A.FromJSON SomeServerMethod where--- Server- -- Window- parseJSON (A.String "window/showMessage") = pure $ SomeServerMethod SWindowShowMessage- parseJSON (A.String "window/showMessageRequest") = pure $ SomeServerMethod SWindowShowMessageRequest- parseJSON (A.String "window/showDocument") = pure $ SomeServerMethod SWindowShowDocument- parseJSON (A.String "window/logMessage") = pure $ SomeServerMethod SWindowLogMessage- parseJSON (A.String "window/workDoneProgress/create") = pure $ SomeServerMethod SWindowWorkDoneProgressCreate- parseJSON (A.String "$/progress") = pure $ SomeServerMethod SProgress- parseJSON (A.String "telemetry/event") = pure $ SomeServerMethod STelemetryEvent- -- Client- parseJSON (A.String "client/registerCapability") = pure $ SomeServerMethod SClientRegisterCapability- parseJSON (A.String "client/unregisterCapability") = pure $ SomeServerMethod SClientUnregisterCapability- -- Workspace- parseJSON (A.String "workspace/workspaceFolders") = pure $ SomeServerMethod SWorkspaceWorkspaceFolders- parseJSON (A.String "workspace/configuration") = pure $ SomeServerMethod SWorkspaceConfiguration- parseJSON (A.String "workspace/applyEdit") = pure $ SomeServerMethod SWorkspaceApplyEdit- parseJSON (A.String "workspace/semanticTokens/refresh") = pure $ SomeServerMethod SWorkspaceSemanticTokensRefresh- -- Document- parseJSON (A.String "textDocument/publishDiagnostics") = pure $ SomeServerMethod STextDocumentPublishDiagnostics---- Cancelling- parseJSON (A.String "$/cancelRequest") = pure $ SomeServerMethod SCancelRequest---- Custom- parseJSON (A.String m) = pure $ SomeServerMethod (SCustomMethod m)- parseJSON _ = fail "SomeServerMethod"---- instance FromJSON (SMethod m)---- ------------------------------------------------------------------------ TO JSON--- -----------------------------------------------------------------------instance ToJSON SomeMethod where- toJSON (SomeMethod m) = toJSON m--instance ToJSON SomeClientMethod where- toJSON (SomeClientMethod m) = toJSON m-instance ToJSON SomeServerMethod where- toJSON (SomeServerMethod m) = toJSON m--instance A.ToJSON (SMethod m) where--- Client- -- General- toJSON SInitialize = A.String "initialize"- toJSON SInitialized = A.String "initialized"- toJSON SShutdown = A.String "shutdown"- toJSON SExit = A.String "exit"- -- Workspace- toJSON SWorkspaceDidChangeWorkspaceFolders = A.String "workspace/didChangeWorkspaceFolders"- toJSON SWorkspaceDidChangeConfiguration = A.String "workspace/didChangeConfiguration"- toJSON SWorkspaceDidChangeWatchedFiles = A.String "workspace/didChangeWatchedFiles"- toJSON SWorkspaceSymbol = A.String "workspace/symbol"- toJSON SWorkspaceExecuteCommand = A.String "workspace/executeCommand"- -- Document- toJSON STextDocumentDidOpen = A.String "textDocument/didOpen"- toJSON STextDocumentDidChange = A.String "textDocument/didChange"- toJSON STextDocumentWillSave = A.String "textDocument/willSave"- toJSON STextDocumentWillSaveWaitUntil = A.String "textDocument/willSaveWaitUntil"- toJSON STextDocumentDidSave = A.String "textDocument/didSave"- toJSON STextDocumentDidClose = A.String "textDocument/didClose"- toJSON STextDocumentCompletion = A.String "textDocument/completion"- toJSON SCompletionItemResolve = A.String "completionItem/resolve"- toJSON STextDocumentHover = A.String "textDocument/hover"- toJSON STextDocumentSignatureHelp = A.String "textDocument/signatureHelp"- toJSON STextDocumentReferences = A.String "textDocument/references"- toJSON STextDocumentDocumentHighlight = A.String "textDocument/documentHighlight"- toJSON STextDocumentDocumentSymbol = A.String "textDocument/documentSymbol"- toJSON STextDocumentDeclaration = A.String "textDocument/declaration"- toJSON STextDocumentDefinition = A.String "textDocument/definition"- toJSON STextDocumentTypeDefinition = A.String "textDocument/typeDefinition"- toJSON STextDocumentImplementation = A.String "textDocument/implementation"- toJSON STextDocumentCodeAction = A.String "textDocument/codeAction"- toJSON STextDocumentCodeLens = A.String "textDocument/codeLens"- toJSON SCodeLensResolve = A.String "codeLens/resolve"- toJSON STextDocumentDocumentColor = A.String "textDocument/documentColor"- toJSON STextDocumentColorPresentation = A.String "textDocument/colorPresentation"- toJSON STextDocumentFormatting = A.String "textDocument/formatting"- toJSON STextDocumentRangeFormatting = A.String "textDocument/rangeFormatting"- toJSON STextDocumentOnTypeFormatting = A.String "textDocument/onTypeFormatting"- toJSON STextDocumentRename = A.String "textDocument/rename"- toJSON STextDocumentPrepareRename = A.String "textDocument/prepareRename"- toJSON STextDocumentFoldingRange = A.String "textDocument/foldingRange"- toJSON STextDocumentSelectionRange = A.String "textDocument/selectionRange"- toJSON STextDocumentPrepareCallHierarchy = A.String "textDocument/prepareCallHierarchy"- toJSON SCallHierarchyIncomingCalls = A.String "callHierarchy/incomingCalls"- toJSON SCallHierarchyOutgoingCalls = A.String "callHierarchy/outgoingCalls"- toJSON STextDocumentSemanticTokens = A.String "textDocument/semanticTokens"- toJSON STextDocumentSemanticTokensFull = A.String "textDocument/semanticTokens/full"- toJSON STextDocumentSemanticTokensFullDelta = A.String "textDocument/semanticTokens/full/delta"- toJSON STextDocumentSemanticTokensRange = A.String "textDocument/semanticTokens/range"- toJSON STextDocumentDocumentLink = A.String "textDocument/documentLink"- toJSON SDocumentLinkResolve = A.String "documentLink/resolve"- toJSON SWindowWorkDoneProgressCancel = A.String "window/workDoneProgress/cancel"--- Server- -- Window- toJSON SWindowShowMessage = A.String "window/showMessage"- toJSON SWindowShowMessageRequest = A.String "window/showMessageRequest"- toJSON SWindowShowDocument = A.String "window/showDocument"- toJSON SWindowLogMessage = A.String "window/logMessage"- toJSON SWindowWorkDoneProgressCreate = A.String "window/workDoneProgress/create"- toJSON SProgress = A.String "$/progress"- toJSON STelemetryEvent = A.String "telemetry/event"- -- Client- toJSON SClientRegisterCapability = A.String "client/registerCapability"- toJSON SClientUnregisterCapability = A.String "client/unregisterCapability"- -- Workspace- toJSON SWorkspaceWorkspaceFolders = A.String "workspace/workspaceFolders"- toJSON SWorkspaceConfiguration = A.String "workspace/configuration"- toJSON SWorkspaceApplyEdit = A.String "workspace/applyEdit"- toJSON SWorkspaceSemanticTokensRefresh = A.String "workspace/semanticTokens/refresh"- -- Document- toJSON STextDocumentPublishDiagnostics = A.String "textDocument/publishDiagnostics"- -- Cancelling- toJSON SCancelRequest = A.String "$/cancelRequest"--- Custom- toJSON (SCustomMethod m) = A.String m--makeSingletonFromJSON 'SomeMethod ''SMethod
− src/Language/LSP/Types/Parsing.hs
@@ -1,340 +0,0 @@-{-# LANGUAGE GADTs #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE TypeApplications #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-{-# LANGUAGE ScopedTypeVariables #-}--module Language.LSP.Types.Parsing where--import Language.LSP.Types.LspId-import Language.LSP.Types.Method-import Language.LSP.Types.Message--import Data.Aeson-import Data.Aeson.Types-import Data.GADT.Compare-import Data.Type.Equality-import Data.Function (on)---- ------------------------------------------------------------------------ Working with arbitrary messages--- -----------------------------------------------------------------------data FromServerMessage' a where- FromServerMess :: forall t (m :: Method FromServer t) a. SMethod m -> Message m -> FromServerMessage' a- FromServerRsp :: forall (m :: Method FromClient Request) a. a m -> ResponseMessage m -> FromServerMessage' a--type FromServerMessage = FromServerMessage' SMethod--instance Eq FromServerMessage where- (==) = (==) `on` toJSON-instance Show FromServerMessage where- show = show . toJSON--instance ToJSON FromServerMessage where- toJSON (FromServerMess m p) = serverMethodJSON m (toJSON p)- toJSON (FromServerRsp m p) = clientResponseJSON m (toJSON p)--fromServerNot :: forall (m :: Method FromServer Notification).- Message m ~ NotificationMessage m => NotificationMessage m -> FromServerMessage-fromServerNot m@NotificationMessage{_method=meth} = FromServerMess meth m--fromServerReq :: forall (m :: Method FromServer Request).- Message m ~ RequestMessage m => RequestMessage m -> FromServerMessage-fromServerReq m@RequestMessage{_method=meth} = FromServerMess meth m--data FromClientMessage' a where- FromClientMess :: forall t (m :: Method FromClient t) a. SMethod m -> Message m -> FromClientMessage' a- FromClientRsp :: forall (m :: Method FromServer Request) a. a m -> ResponseMessage m -> FromClientMessage' a--type FromClientMessage = FromClientMessage' SMethod--instance ToJSON FromClientMessage where- toJSON (FromClientMess m p) = clientMethodJSON m (toJSON p)- toJSON (FromClientRsp m p) = serverResponseJSON m (toJSON p)--fromClientNot :: forall (m :: Method FromClient Notification).- Message m ~ NotificationMessage m => NotificationMessage m -> FromClientMessage-fromClientNot m@NotificationMessage{_method=meth} = FromClientMess meth m--fromClientReq :: forall (m :: Method FromClient Request).- Message m ~ RequestMessage m => RequestMessage m -> FromClientMessage-fromClientReq m@RequestMessage{_method=meth} = FromClientMess meth m---- ------------------------------------------------------------------------ Parsing--- -----------------------------------------------------------------------type LookupFunc f a = forall (m :: Method f Request). LspId m -> Maybe (SMethod m, a m)--{--Message Types we must handle are the following--Request | jsonrpc | id | method | params?-Response | jsonrpc | id | | | response? | error?-Notification | jsonrpc | | method | params?--}--{-# INLINE parseServerMessage #-}-parseServerMessage :: LookupFunc FromClient a -> Value -> Parser (FromServerMessage' a)-parseServerMessage lookupId v@(Object o) = do- methMaybe <- o .:! "method"- idMaybe <- o .:! "id"- case methMaybe of- -- Request or Notification- Just (SomeServerMethod m) ->- case splitServerMethod m of- IsServerNot -> FromServerMess m <$> parseJSON v- IsServerReq -> FromServerMess m <$> parseJSON v- IsServerEither | SCustomMethod cm <- m -> do- case idMaybe of- -- Request- Just _ ->- let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromServer Request))- in FromServerMess m' <$> parseJSON v- Nothing ->- let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromServer Notification))- in FromServerMess m' <$> parseJSON v- Nothing -> do- case idMaybe of- Just i -> do- case lookupId i of- Just (m,res) -> clientResponseJSON m $ FromServerRsp res <$> parseJSON v- Nothing -> fail $ unwords ["Failed in looking up response type of", show v]- Nothing -> fail $ unwords ["Got unexpected message without method or id"]-parseServerMessage _ v = fail $ unwords ["parseServerMessage expected object, got:",show v]--{-# INLINE parseClientMessage #-}-parseClientMessage :: LookupFunc FromServer a -> Value -> Parser (FromClientMessage' a)-parseClientMessage lookupId v@(Object o) = do- methMaybe <- o .:! "method"- idMaybe <- o .:! "id"- case methMaybe of- -- Request or Notification- Just (SomeClientMethod m) ->- case splitClientMethod m of- IsClientNot -> FromClientMess m <$> parseJSON v- IsClientReq -> FromClientMess m <$> parseJSON v- IsClientEither | SCustomMethod cm <- m -> do- case idMaybe of- -- Request- Just _ ->- let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromClient Request))- in FromClientMess m' <$> parseJSON v- Nothing ->- let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromClient Notification))- in FromClientMess m' <$> parseJSON v- Nothing -> do- case idMaybe of- Just i -> do- case lookupId i of- Just (m,res) -> serverResponseJSON m $ FromClientRsp res <$> parseJSON v- Nothing -> fail $ unwords ["Failed in looking up response type of", show v]- Nothing -> fail $ unwords ["Got unexpected message without method or id"]-parseClientMessage _ v = fail $ unwords ["parseClientMessage expected object, got:",show v]---- ------------------------------------------------------------------------ Helper Utilities--- -----------------------------------------------------------------------{-# INLINE clientResponseJSON #-}-clientResponseJSON :: SClientMethod m -> (HasJSON (ResponseMessage m) => x) -> x-clientResponseJSON m x = case splitClientMethod m of- IsClientReq -> x- IsClientEither -> x--{-# INLINE serverResponseJSON #-}-serverResponseJSON :: SServerMethod m -> (HasJSON (ResponseMessage m) => x) -> x-serverResponseJSON m x = case splitServerMethod m of- IsServerReq -> x- IsServerEither -> x--{-# INLINE clientMethodJSON#-}-clientMethodJSON :: SClientMethod m -> (ToJSON (ClientMessage m) => x) -> x-clientMethodJSON m x =- case splitClientMethod m of- IsClientNot -> x- IsClientReq -> x- IsClientEither -> x--{-# INLINE serverMethodJSON #-}-serverMethodJSON :: SServerMethod m -> (ToJSON (ServerMessage m) => x) -> x-serverMethodJSON m x =- case splitServerMethod m of- IsServerNot -> x- IsServerReq -> x- IsServerEither -> x--type HasJSON a = (ToJSON a,FromJSON a,Eq a)---- Reify universal properties about Client/Server Messages--data ClientNotOrReq (m :: Method FromClient t) where- IsClientNot- :: ( HasJSON (ClientMessage m)- , Message m ~ NotificationMessage m)- => ClientNotOrReq (m :: Method FromClient Notification)- IsClientReq- :: forall (m :: Method FromClient Request).- ( HasJSON (ClientMessage m)- , HasJSON (ResponseMessage m)- , Message m ~ RequestMessage m)- => ClientNotOrReq m- IsClientEither- :: ClientNotOrReq CustomMethod--data ServerNotOrReq (m :: Method FromServer t) where- IsServerNot- :: ( HasJSON (ServerMessage m)- , Message m ~ NotificationMessage m)- => ServerNotOrReq (m :: Method FromServer Notification)- IsServerReq- :: forall (m :: Method FromServer Request).- ( HasJSON (ServerMessage m)- , HasJSON (ResponseMessage m)- , Message m ~ RequestMessage m)- => ServerNotOrReq m- IsServerEither- :: ServerNotOrReq CustomMethod--{-# INLINE splitClientMethod #-}-splitClientMethod :: SClientMethod m -> ClientNotOrReq m-splitClientMethod SInitialize = IsClientReq-splitClientMethod SInitialized = IsClientNot-splitClientMethod SShutdown = IsClientReq-splitClientMethod SExit = IsClientNot-splitClientMethod SWorkspaceDidChangeWorkspaceFolders = IsClientNot-splitClientMethod SWorkspaceDidChangeConfiguration = IsClientNot-splitClientMethod SWorkspaceDidChangeWatchedFiles = IsClientNot-splitClientMethod SWorkspaceSymbol = IsClientReq-splitClientMethod SWorkspaceExecuteCommand = IsClientReq-splitClientMethod SWindowWorkDoneProgressCancel = IsClientNot-splitClientMethod STextDocumentDidOpen = IsClientNot-splitClientMethod STextDocumentDidChange = IsClientNot-splitClientMethod STextDocumentWillSave = IsClientNot-splitClientMethod STextDocumentWillSaveWaitUntil = IsClientReq-splitClientMethod STextDocumentDidSave = IsClientNot-splitClientMethod STextDocumentDidClose = IsClientNot-splitClientMethod STextDocumentCompletion = IsClientReq-splitClientMethod SCompletionItemResolve = IsClientReq-splitClientMethod STextDocumentHover = IsClientReq-splitClientMethod STextDocumentSignatureHelp = IsClientReq-splitClientMethod STextDocumentDeclaration = IsClientReq-splitClientMethod STextDocumentDefinition = IsClientReq-splitClientMethod STextDocumentTypeDefinition = IsClientReq-splitClientMethod STextDocumentImplementation = IsClientReq-splitClientMethod STextDocumentReferences = IsClientReq-splitClientMethod STextDocumentDocumentHighlight = IsClientReq-splitClientMethod STextDocumentDocumentSymbol = IsClientReq-splitClientMethod STextDocumentCodeAction = IsClientReq-splitClientMethod STextDocumentCodeLens = IsClientReq-splitClientMethod SCodeLensResolve = IsClientReq-splitClientMethod STextDocumentDocumentLink = IsClientReq-splitClientMethod SDocumentLinkResolve = IsClientReq-splitClientMethod STextDocumentDocumentColor = IsClientReq-splitClientMethod STextDocumentColorPresentation = IsClientReq-splitClientMethod STextDocumentFormatting = IsClientReq-splitClientMethod STextDocumentRangeFormatting = IsClientReq-splitClientMethod STextDocumentOnTypeFormatting = IsClientReq-splitClientMethod STextDocumentRename = IsClientReq-splitClientMethod STextDocumentPrepareRename = IsClientReq-splitClientMethod STextDocumentFoldingRange = IsClientReq-splitClientMethod STextDocumentSelectionRange = IsClientReq-splitClientMethod STextDocumentPrepareCallHierarchy = IsClientReq-splitClientMethod SCallHierarchyIncomingCalls = IsClientReq-splitClientMethod SCallHierarchyOutgoingCalls = IsClientReq-splitClientMethod STextDocumentSemanticTokens = IsClientReq-splitClientMethod STextDocumentSemanticTokensFull = IsClientReq-splitClientMethod STextDocumentSemanticTokensFullDelta = IsClientReq-splitClientMethod STextDocumentSemanticTokensRange = IsClientReq-splitClientMethod SCancelRequest = IsClientNot-splitClientMethod SCustomMethod{} = IsClientEither--{-# INLINE splitServerMethod #-}-splitServerMethod :: SServerMethod m -> ServerNotOrReq m--- Window-splitServerMethod SWindowShowMessage = IsServerNot-splitServerMethod SWindowShowMessageRequest = IsServerReq-splitServerMethod SWindowShowDocument = IsServerReq-splitServerMethod SWindowLogMessage = IsServerNot-splitServerMethod SWindowWorkDoneProgressCreate = IsServerReq-splitServerMethod SProgress = IsServerNot-splitServerMethod STelemetryEvent = IsServerNot--- Client-splitServerMethod SClientRegisterCapability = IsServerReq-splitServerMethod SClientUnregisterCapability = IsServerReq--- Workspace-splitServerMethod SWorkspaceWorkspaceFolders = IsServerReq-splitServerMethod SWorkspaceConfiguration = IsServerReq-splitServerMethod SWorkspaceApplyEdit = IsServerReq-splitServerMethod SWorkspaceSemanticTokensRefresh = IsServerReq--- Document-splitServerMethod STextDocumentPublishDiagnostics = IsServerNot--- Cancelling-splitServerMethod SCancelRequest = IsServerNot--- Custom-splitServerMethod SCustomMethod{} = IsServerEither---- | Given a witness that two custom methods are of the same type, produce a witness that the methods are the same-data CustomEq m1 m2 where- CustomEq- :: (m1 ~ (CustomMethod :: Method f t1), m2 ~ (CustomMethod :: Method f t2))- => { runCustomEq :: (t1 ~ t2 => m1 :~~: m2) }- -> CustomEq m1 m2--runEq :: (t1 ~ t2)- => (SMethod m1 -> SMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2)))- -> SMethod (m1 :: Method f t1)- -> SMethod (m2 :: Method f t2)- -> Maybe (m1 :~~: m2)-runEq f m1 m2 = do- res <- f m1 m2- pure $ case res of- Right eq -> eq- Left ceq -> runCustomEq ceq---- | Heterogeneous equality on singleton server methods-mEqServer :: SServerMethod m1 -> SServerMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))-mEqServer m1 m2 = go (splitServerMethod m1) (splitServerMethod m2)- where- go IsServerNot IsServerNot = do- Refl <- geq m1 m2- pure $ Right HRefl- go IsServerReq IsServerReq = do- Refl <- geq m1 m2- pure $ Right HRefl- go IsServerEither IsServerEither- | SCustomMethod c1 <- m1- , SCustomMethod c2 <- m2- , c1 == c2- = Just $ Left $ CustomEq HRefl- go _ _ = Nothing---- | Heterogeneous equality on singleton client methods-mEqClient :: SClientMethod m1 -> SClientMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))-mEqClient m1 m2 = go (splitClientMethod m1) (splitClientMethod m2)- where- go IsClientNot IsClientNot = do- Refl <- geq m1 m2- pure $ Right HRefl- go IsClientReq IsClientReq = do- Refl <- geq m1 m2- pure $ Right HRefl- go IsClientEither IsClientEither- | SCustomMethod c1 <- m1- , SCustomMethod c2 <- m2- , c1 == c2- = Just $ Left $ CustomEq HRefl- go _ _ = Nothing
− src/Language/LSP/Types/Progress.hs
@@ -1,214 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE OverloadedStrings #-}--module Language.LSP.Types.Progress where--import Control.Monad (unless)-import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Maybe (catMaybes)-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Utils---- | A token used to report progress back or return partial results for a--- specific request.--- @since 0.17.0.0-data ProgressToken- = ProgressNumericToken Int32- | ProgressTextToken Text- deriving (Show, Read, Eq, Ord)--deriveJSON lspOptionsUntagged ''ProgressToken---- | Parameters for a $/progress notification.-data ProgressParams t =- ProgressParams {- _token :: ProgressToken- , _value :: t- } deriving (Show, Read, Eq, Functor)--deriveJSON lspOptions ''ProgressParams---- | Parameters for 'WorkDoneProgressBeginNotification'.------ @since 0.10.0.0-data WorkDoneProgressBeginParams =- WorkDoneProgressBeginParams {- -- | Mandatory title of the progress operation.- -- Used to briefly inform about the kind of operation being- -- performed. Examples: "Indexing" or "Linking dependencies".- _title :: Text- -- | Controls if a cancel button should show to allow the user to cancel the- -- long running operation. Clients that don't support cancellation are allowed- -- to ignore the setting.- , _cancellable :: Maybe Bool- -- | Optional, more detailed associated progress- -- message. Contains complementary information to the- -- '_title'. Examples: "3/25 files",- -- "project/src/module2", "node_modules/some_dep". If- -- unset, the previous progress message (if any) is- -- still valid.- , _message :: Maybe Text- -- | Optional progress percentage to display (value 100 is considered 100%).- -- If not provided infinite progress is assumed and clients are allowed- -- to ignore the '_percentage' value in subsequent in report notifications.- --- -- The value should be steadily rising. Clients are free to ignore values- -- that are not following this rule.- , _percentage :: Maybe UInt- } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressBeginParams where- toJSON WorkDoneProgressBeginParams{..} =- A.object $ catMaybes- [ Just $ "kind" A..= ("begin" :: Text)- , Just $ "title" A..= _title- , ("cancellable" A..=) <$> _cancellable- , ("message" A..=) <$> _message- , ("percentage" A..=) <$> _percentage- ]--instance A.FromJSON WorkDoneProgressBeginParams where- parseJSON = A.withObject "WorkDoneProgressBegin" $ \o -> do- kind <- o A..: "kind"- unless (kind == ("begin" :: Text)) $ fail $ "Expected kind \"begin\" but got " ++ show kind- _title <- o A..: "title"- _cancellable <- o A..:? "cancellable"- _message <- o A..:? "message"- _percentage <- o A..:? "percentage"- pure WorkDoneProgressBeginParams{..}---- The $/progress begin notification is sent from the server to the--- client to ask the client to start progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressReportNotification'------ @since 0.10.0.0-data WorkDoneProgressReportParams =- WorkDoneProgressReportParams {- _cancellable :: Maybe Bool- -- | Optional, more detailed associated progress- -- message. Contains complementary information to the- -- '_title'. Examples: "3/25 files",- -- "project/src/module2", "node_modules/some_dep". If- -- unset, the previous progress message (if any) is- -- still valid.- , _message :: Maybe Text- -- | Optional progress percentage to display (value 100 is considered 100%).- -- If infinite progress was indicated in the start notification client- -- are allowed to ignore the value. In addition the value should be steadily- -- rising. Clients are free to ignore values that are not following this rule.- , _percentage :: Maybe UInt- } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressReportParams where- toJSON WorkDoneProgressReportParams{..} =- A.object $ catMaybes- [ Just $ "kind" A..= ("report" :: Text)- , ("cancellable" A..=) <$> _cancellable- , ("message" A..=) <$> _message- , ("percentage" A..=) <$> _percentage- ]--instance A.FromJSON WorkDoneProgressReportParams where- parseJSON = A.withObject "WorkDoneProgressReport" $ \o -> do- kind <- o A..: "kind"- unless (kind == ("report" :: Text)) $ fail $ "Expected kind \"report\" but got " ++ show kind- _cancellable <- o A..:? "cancellable"- _message <- o A..:? "message"- _percentage <- o A..:? "percentage"- pure WorkDoneProgressReportParams{..}---- The workdone $/progress report notification is sent from the server to the--- client to report progress for a previously started progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressEndNotification'.------ @since 0.10.0.0-data WorkDoneProgressEndParams =- WorkDoneProgressEndParams {- _message :: Maybe Text- } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressEndParams where- toJSON WorkDoneProgressEndParams{..} =- A.object $ catMaybes- [ Just $ "kind" A..= ("end" :: Text)- , ("message" A..=) <$> _message- ]--instance A.FromJSON WorkDoneProgressEndParams where- parseJSON = A.withObject "WorkDoneProgressEnd" $ \o -> do- kind <- o A..: "kind"- unless (kind == ("end" :: Text)) $ fail $ "Expected kind \"end\" but got " ++ show kind- _message <- o A..:? "message"- pure WorkDoneProgressEndParams{..}---- The $/progress end notification is sent from the server to the--- client to stop a previously started progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressCancelNotification'.------ @since 0.10.0.0-data WorkDoneProgressCancelParams =- WorkDoneProgressCancelParams {- -- | A unique identifier to associate multiple progress- -- notifications with the same progress.- _token :: ProgressToken- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkDoneProgressCancelParams---- The window/workDoneProgress/cancel notification is sent from the client to the server--- to inform the server that the user has pressed the cancel button on the progress UX.--- A server receiving a cancel request must still close a progress using the done notification.------ @since 0.10.0.0--data WorkDoneProgressCreateParams =- WorkDoneProgressCreateParams {- _token :: ProgressToken- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkDoneProgressCreateParams--data WorkDoneProgressOptions =- WorkDoneProgressOptions- { _workDoneProgress :: Maybe Bool- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkDoneProgressOptions--data WorkDoneProgressParams =- WorkDoneProgressParams- { -- | An optional token that a server can use to report work done progress- _workDoneToken :: Maybe ProgressToken- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''WorkDoneProgressParams--data SomeProgressParams- = Begin WorkDoneProgressBeginParams- | Report WorkDoneProgressReportParams- | End WorkDoneProgressEndParams- deriving Eq--deriveJSON lspOptionsUntagged ''SomeProgressParams--data PartialResultParams =- PartialResultParams- { -- | An optional token that a server can use to report partial results- -- (e.g. streaming) to the client.- _partialResultToken :: Maybe ProgressToken- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''PartialResultParams
− src/Language/LSP/Types/References.hs
@@ -1,43 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--- | Find References Request--- https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#textDocument_references-module Language.LSP.Types.References where--import Data.Aeson.TH--import Language.LSP.Types.TextDocument-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils--data ReferencesClientCapabilities =- ReferencesClientCapabilities- { -- | Whether references supports dynamic registration.- _dynamicRegistration :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ReferencesClientCapabilities--makeExtendingDatatype "ReferenceOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''ReferenceOptions--makeExtendingDatatype "ReferenceRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''ReferenceOptions- ]- []-deriveJSON lspOptions ''ReferenceRegistrationOptions--data ReferenceContext =- ReferenceContext- { -- | Include the declaration of the current symbol.- _includeDeclaration :: Bool- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''ReferenceContext--makeExtendingDatatype "ReferenceParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_context", [t| ReferenceContext |])]-deriveJSON lspOptions ''ReferenceParams
− src/Language/LSP/Types/Registration.hs
@@ -1,179 +0,0 @@-{-# LANGUAGE GADTs #-}-{-# LANGUAGE TypeApplications #-}-{-# LANGUAGE TypeFamilyDependencies #-}-{-# LANGUAGE ExistentialQuantification #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE DeriveAnyClass #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-{-# OPTIONS_GHC -Werror=incomplete-patterns #-}--module Language.LSP.Types.Registration where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Data.Function (on)-import Data.Kind-import Data.Void (Void)-import GHC.Generics-import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.Completion-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.Method-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.WorkspaceSymbol----- ------------------------------------------------------------------------- | Matches up the registration options for a specific method-type family RegistrationOptions (m :: Method FromClient t) :: Type where- -- Workspace- RegistrationOptions WorkspaceDidChangeWorkspaceFolders = Empty- RegistrationOptions WorkspaceDidChangeConfiguration = Empty- RegistrationOptions WorkspaceDidChangeWatchedFiles = DidChangeWatchedFilesRegistrationOptions- RegistrationOptions WorkspaceSymbol = WorkspaceSymbolRegistrationOptions- RegistrationOptions WorkspaceExecuteCommand = ExecuteCommandRegistrationOptions-- -- Text synchronisation- RegistrationOptions TextDocumentDidOpen = TextDocumentRegistrationOptions- RegistrationOptions TextDocumentDidChange = TextDocumentChangeRegistrationOptions- RegistrationOptions TextDocumentWillSave = TextDocumentRegistrationOptions- RegistrationOptions TextDocumentWillSaveWaitUntil = TextDocumentRegistrationOptions- RegistrationOptions TextDocumentDidSave = TextDocumentSaveRegistrationOptions- RegistrationOptions TextDocumentDidClose = TextDocumentRegistrationOptions-- -- Language features- RegistrationOptions TextDocumentCompletion = CompletionRegistrationOptions- RegistrationOptions TextDocumentHover = HoverRegistrationOptions- RegistrationOptions TextDocumentSignatureHelp = SignatureHelpRegistrationOptions- RegistrationOptions TextDocumentDeclaration = DeclarationRegistrationOptions- RegistrationOptions TextDocumentDefinition = DefinitionRegistrationOptions- RegistrationOptions TextDocumentTypeDefinition = TypeDefinitionRegistrationOptions- RegistrationOptions TextDocumentImplementation = ImplementationRegistrationOptions- RegistrationOptions TextDocumentReferences = ReferenceRegistrationOptions- RegistrationOptions TextDocumentDocumentHighlight = DocumentHighlightRegistrationOptions- RegistrationOptions TextDocumentDocumentSymbol = DocumentSymbolRegistrationOptions- RegistrationOptions TextDocumentCodeAction = CodeActionRegistrationOptions- RegistrationOptions TextDocumentCodeLens = CodeLensRegistrationOptions- RegistrationOptions TextDocumentDocumentLink = DocumentLinkRegistrationOptions- RegistrationOptions TextDocumentDocumentColor = DocumentColorRegistrationOptions- RegistrationOptions TextDocumentFormatting = DocumentFormattingRegistrationOptions- RegistrationOptions TextDocumentRangeFormatting = DocumentRangeFormattingRegistrationOptions- RegistrationOptions TextDocumentOnTypeFormatting = DocumentOnTypeFormattingRegistrationOptions- RegistrationOptions TextDocumentRename = RenameRegistrationOptions- RegistrationOptions TextDocumentFoldingRange = FoldingRangeRegistrationOptions- RegistrationOptions TextDocumentSelectionRange = SelectionRangeRegistrationOptions- RegistrationOptions TextDocumentPrepareCallHierarchy = CallHierarchyRegistrationOptions- RegistrationOptions TextDocumentSemanticTokens = SemanticTokensRegistrationOptions- RegistrationOptions m = Void--data Registration (m :: Method FromClient t) =- Registration- { -- | The id used to register the request. The id can be used to deregister- -- the request again.- _id :: Text- -- | The method / capability to register for.- , _method :: SClientMethod m- -- | Options necessary for the registration.- -- Make this strict to aid the pattern matching exhaustiveness checker- , _registerOptions :: !(RegistrationOptions m)- }- deriving Generic--deriving instance Eq (RegistrationOptions m) => Eq (Registration m)-deriving instance Show (RegistrationOptions m) => Show (Registration m)---- This generates the function--- regHelper :: SMethod m--- -> (( Show (RegistrationOptions m)--- , ToJSON (RegistrationOptions m)--- , FromJSON ($regOptTcon m)--- => x)--- -> x-makeRegHelper ''RegistrationOptions--instance ToJSON (Registration m) where- toJSON x@(Registration _ m _) = regHelper m (genericToJSON lspOptions x)--data SomeRegistration = forall t (m :: Method FromClient t). SomeRegistration (Registration m)--instance ToJSON SomeRegistration where- toJSON (SomeRegistration r) = toJSON r--instance FromJSON SomeRegistration where- parseJSON = withObject "Registration" $ \o -> do- SomeClientMethod m <- o .: "method"- r <- Registration <$> o .: "id" <*> pure m <*> regHelper m (o .: "registerOptions")- pure (SomeRegistration r)--instance Eq SomeRegistration where- (==) = (==) `on` toJSON--instance Show SomeRegistration where- show (SomeRegistration r@(Registration _ m _)) = regHelper m (show r)--data RegistrationParams =- RegistrationParams { _registrations :: List SomeRegistration }- deriving (Show, Eq)--deriveJSON lspOptions ''RegistrationParams----- ------------------------------------------------------------------------- | General parameters to unregister a capability.-data Unregistration =- Unregistration- { -- | The id used to unregister the request or notification. Usually an id- -- provided during the register request.- _id :: Text- -- | The method / capability to unregister for.- , _method :: SomeClientMethod- } deriving (Show, Eq)--deriveJSON lspOptions ''Unregistration--data UnregistrationParams =- UnregistrationParams- { -- | This should correctly be named @unregistrations@. However changing this- -- is a breaking change and needs to wait until we deliver a 4.x version- -- of the specification.- _unregisterations :: List Unregistration- } deriving (Show, Eq)--deriveJSON lspOptions ''UnregistrationParams
− src/Language/LSP/Types/Rename.hs
@@ -1,85 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.Rename where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Data.Scientific (Scientific)--import Language.LSP.Types.Location-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils--data PrepareSupportDefaultBehavior =- PsIdentifier |- PsUnknown Scientific- deriving (Read, Show, Eq)--instance ToJSON PrepareSupportDefaultBehavior where- toJSON PsIdentifier = Number 1- toJSON (PsUnknown i) = Number i--instance FromJSON PrepareSupportDefaultBehavior where- parseJSON (Number 1) = pure PsIdentifier- parseJSON _ = fail "PrepareSupportDefaultBehavior"--data RenameClientCapabilities =- RenameClientCapabilities- { -- | Whether rename supports dynamic registration.- _dynamicRegistration :: Maybe Bool- -- | Client supports testing for validity of rename operations- -- before execution.- --- -- Since LSP 3.12.0- , _prepareSupport :: Maybe Bool- -- | Client supports the default behavior result- -- (`{ defaultBehavior: boolean }`).- --- -- The value indicates the default behavior used by the client.- --- -- @since 3.16.0- , prepareSupportDefaultBehavior :: Maybe PrepareSupportDefaultBehavior- -- | Whether the client honors the change annotations in- -- text edits and resource operations returned via the- -- rename request's workspace edit by for example presenting- -- the workspace edit in the user interface and asking- -- for confirmation.- --- -- @since 3.16.0- , honorsChangeAnnotations :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RenameClientCapabilities--makeExtendingDatatype "RenameOptions" [''WorkDoneProgressOptions]- [("_prepareProvider", [t| Maybe Bool |])]-deriveJSON lspOptions ''RenameOptions--makeExtendingDatatype "RenameRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''RenameOptions- ] []-deriveJSON lspOptions ''RenameRegistrationOptions--makeExtendingDatatype "RenameParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- ]- [("_newName", [t| Text |])]-deriveJSON lspOptions ''RenameParams---- -------------------------------------------makeExtendingDatatype "PrepareRenameParams" [''TextDocumentPositionParams] []-deriveJSON lspOptions ''PrepareRenameParams--data RangeWithPlaceholder =- RangeWithPlaceholder- {- _range :: Range- , _placeholder :: Text- } deriving Eq-deriveJSON lspOptions ''RangeWithPlaceholder
− src/Language/LSP/Types/SMethodMap.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE RankNTypes #-}--module Language.LSP.Types.SMethodMap- ( SMethodMap- , singleton- , insert- , delete- , member- , lookup- , map- ) where--import Prelude hiding (lookup, map)-import Data.IntMap (IntMap)-import qualified Data.IntMap.Strict as IntMap-import Data.Kind (Type)-import Data.Map (Map)-import qualified Data.Map.Strict as Map-import Data.Text (Text)-import GHC.Exts (Int(..), dataToTag#, Any)-import Unsafe.Coerce (unsafeCoerce)--import Language.LSP.Types.Method (Method(..), SMethod(..))---- This type exists to avoid a dependency on 'dependent-map'. It is less--- safe (since we use 'unsafeCoerce') but much simpler and hence easier to include.--- | A specialized alternative to a full dependent map for use with 'SMethod'.-data SMethodMap (v :: Method f t -> Type) =- -- This works by using an 'IntMap' indexed by constructor tag for the majority- -- of 'SMethod's, which have no parameters, and hence can only appear once as keys- -- in the map. We do not attempt to be truly dependent here, and instead exploit- -- 'usafeCoerce' to go to and from 'v Any'.- -- The sole exception is 'SCustomMethod', for which we keep a separate map from- -- its 'Text' parameter (and where we can get the type indices right).- SMethodMap !(IntMap (v Any)) !(Map Text (v 'CustomMethod))--toIx :: SMethod a -> Int-toIx k = I# (dataToTag# k)--singleton :: SMethod a -> v a -> SMethodMap v-singleton (SCustomMethod t) v = SMethodMap mempty (Map.singleton t v)-singleton k v = SMethodMap (IntMap.singleton (toIx k) (unsafeCoerce v)) mempty--insert :: SMethod a -> v a -> SMethodMap v -> SMethodMap v-insert (SCustomMethod t) v (SMethodMap xs ys) = SMethodMap xs (Map.insert t v ys)-insert k v (SMethodMap xs ys) = SMethodMap (IntMap.insert (toIx k) (unsafeCoerce v) xs) ys--delete :: SMethod a -> SMethodMap v -> SMethodMap v-delete (SCustomMethod t) (SMethodMap xs ys) = SMethodMap xs (Map.delete t ys)-delete k (SMethodMap xs ys) = SMethodMap (IntMap.delete (toIx k) xs) ys--member :: SMethod a -> SMethodMap v -> Bool-member (SCustomMethod t) (SMethodMap _ ys) = Map.member t ys-member k (SMethodMap xs _) = IntMap.member (toIx k) xs--lookup :: SMethod a -> SMethodMap v -> Maybe (v a)-lookup (SCustomMethod t) (SMethodMap _ ys) = Map.lookup t ys-lookup k (SMethodMap xs _) = unsafeCoerce (IntMap.lookup (toIx k) xs)--map :: (forall a. u a -> v a) -> SMethodMap u -> SMethodMap v-map f (SMethodMap xs ys) = SMethodMap (IntMap.map f xs) (Map.map f ys)--instance Semigroup (SMethodMap v) where- SMethodMap xs ys <> SMethodMap xs' ys' = SMethodMap (xs <> xs') (ys <> ys')--instance Monoid (SMethodMap v) where- mempty = SMethodMap mempty mempty
− src/Language/LSP/Types/SelectionRange.hs
@@ -1,54 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.SelectionRange where--import Data.Aeson.TH-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data SelectionRangeClientCapabilities = SelectionRangeClientCapabilities- { -- | Whether implementation supports dynamic registration for selection range providers. If this is set to 'True'- -- the client supports the new 'SelectionRangeRegistrationOptions' return value for the corresponding server- -- capability as well.- _dynamicRegistration :: Maybe Bool- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''SelectionRangeClientCapabilities--makeExtendingDatatype "SelectionRangeOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''SelectionRangeOptions--makeExtendingDatatype- "SelectionRangeRegistrationOptions"- [ ''SelectionRangeOptions,- ''TextDocumentRegistrationOptions,- ''StaticRegistrationOptions- ]- []-deriveJSON lspOptions ''SelectionRangeRegistrationOptions--makeExtendingDatatype- "SelectionRangeParams"- [ ''WorkDoneProgressParams,- ''PartialResultParams- ]- [ ("_textDocument", [t|TextDocumentIdentifier|]),- ("_positions", [t|List Position|])- ]-deriveJSON lspOptions ''SelectionRangeParams--data SelectionRange = SelectionRange- { -- | The 'range' of this selection range.- _range :: Range,- -- | The parent selection range containing this range. Therefore @parent.range@ must contain @this.range@.- _parent :: Maybe SelectionRange- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''SelectionRange
− src/Language/LSP/Types/SemanticTokens.hs
@@ -1,500 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedLists #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.SemanticTokens where--import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Text (Text)--import Control.Monad.Except--import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--import qualified Data.Algorithm.Diff as Diff-import qualified Data.Bits as Bits-import qualified Data.DList as DList-import Data.Default-import Data.Foldable hiding (length)-import qualified Data.Map as Map-import Data.Maybe (fromMaybe,- maybeToList)-import Data.String--data SemanticTokenTypes =- SttNamespace- | SttType- | SttClass- | SttEnum- | SttInterface- | SttStruct- | SttTypeParameter- | SttParameter- | SttVariable- | SttProperty- | SttEnumMember- | SttEvent- | SttFunction- | SttMethod- | SttMacro- | SttKeyword- | SttModifier- | SttComment- | SttString- | SttNumber- | SttRegexp- | SttOperator- | SttUnknown Text- deriving (Show, Read, Eq, Ord)--instance A.ToJSON SemanticTokenTypes where- toJSON SttNamespace = A.String "namespace"- toJSON SttType = A.String "type"- toJSON SttClass = A.String "class"- toJSON SttEnum = A.String "enum"- toJSON SttInterface = A.String "interface"- toJSON SttStruct = A.String "struct"- toJSON SttTypeParameter = A.String "typeParameter"- toJSON SttParameter = A.String "parameter"- toJSON SttVariable = A.String "variable"- toJSON SttProperty = A.String "property"- toJSON SttEnumMember = A.String "enumMember"- toJSON SttEvent = A.String "event"- toJSON SttFunction = A.String "function"- toJSON SttMethod = A.String "method"- toJSON SttMacro = A.String "macro"- toJSON SttKeyword = A.String "keyword"- toJSON SttModifier = A.String "modifier"- toJSON SttComment = A.String "comment"- toJSON SttString = A.String "string"- toJSON SttNumber = A.String "number"- toJSON SttRegexp = A.String "regexp"- toJSON SttOperator = A.String "operator"- toJSON (SttUnknown t) = A.String t--instance A.FromJSON SemanticTokenTypes where- parseJSON (A.String "namespace") = pure SttNamespace- parseJSON (A.String "type") = pure SttType- parseJSON (A.String "class") = pure SttClass- parseJSON (A.String "enum") = pure SttEnum- parseJSON (A.String "interface") = pure SttInterface- parseJSON (A.String "struct") = pure SttStruct- parseJSON (A.String "typeParameter") = pure SttTypeParameter- parseJSON (A.String "parameter") = pure SttParameter- parseJSON (A.String "variable") = pure SttVariable- parseJSON (A.String "property") = pure SttProperty- parseJSON (A.String "enumMember") = pure SttEnumMember- parseJSON (A.String "event") = pure SttEvent- parseJSON (A.String "function") = pure SttFunction- parseJSON (A.String "method") = pure SttMethod- parseJSON (A.String "macro") = pure SttMacro- parseJSON (A.String "keyword") = pure SttKeyword- parseJSON (A.String "modifier") = pure SttModifier- parseJSON (A.String "comment") = pure SttComment- parseJSON (A.String "string") = pure SttString- parseJSON (A.String "number") = pure SttNumber- parseJSON (A.String "regexp") = pure SttRegexp- parseJSON (A.String "operator") = pure SttOperator- parseJSON (A.String t) = pure $ SttUnknown t- parseJSON _ = mempty---- | The set of semantic token types which are "known" (i.e. listed in the LSP spec).-knownSemanticTokenTypes :: [SemanticTokenTypes]-knownSemanticTokenTypes = [- SttNamespace- , SttType- , SttClass- , SttEnum- , SttInterface- , SttStruct- , SttTypeParameter- , SttParameter- , SttVariable- , SttProperty- , SttEnumMember- , SttEvent- , SttFunction- , SttMethod- , SttMacro- , SttKeyword- , SttModifier- , SttComment- , SttString- , SttNumber- , SttRegexp- , SttOperator- ]--data SemanticTokenModifiers =- StmDeclaration- | StmDefinition- | StmReadonly- | StmStatic- | StmDeprecated- | StmAbstract- | StmAsync- | StmModification- | StmDocumentation- | StmDefaultLibrary- | StmUnknown Text- deriving (Show, Read, Eq, Ord)--instance A.ToJSON SemanticTokenModifiers where- toJSON StmDeclaration = A.String "declaration"- toJSON StmDefinition = A.String "definition"- toJSON StmReadonly = A.String "readonly"- toJSON StmStatic = A.String "static"- toJSON StmDeprecated = A.String "deprecated"- toJSON StmAbstract = A.String "abstract"- toJSON StmAsync = A.String "async"- toJSON StmModification = A.String "modification"- toJSON StmDocumentation = A.String "documentation"- toJSON StmDefaultLibrary = A.String "defaultLibrary"- toJSON (StmUnknown t) = A.String t--instance A.FromJSON SemanticTokenModifiers where- parseJSON (A.String "declaration") = pure StmDeclaration- parseJSON (A.String "definition") = pure StmDefinition- parseJSON (A.String "readonly") = pure StmReadonly- parseJSON (A.String "static") = pure StmStatic- parseJSON (A.String "deprecated") = pure StmDeprecated- parseJSON (A.String "abstract") = pure StmAbstract- parseJSON (A.String "async") = pure StmAsync- parseJSON (A.String "modification") = pure StmModification- parseJSON (A.String "documentation") = pure StmDocumentation- parseJSON (A.String "defaultLibrary") = pure StmDefaultLibrary- parseJSON (A.String t) = pure $ StmUnknown t- parseJSON _ = mempty---- | The set of semantic token modifiers which are "known" (i.e. listed in the LSP spec).-knownSemanticTokenModifiers :: [SemanticTokenModifiers]-knownSemanticTokenModifiers = [- StmDeclaration- , StmDefinition- , StmReadonly- , StmStatic- , StmDeprecated- , StmAbstract- , StmAsync- , StmModification- , StmDocumentation- , StmDefaultLibrary- ]--data TokenFormat = TokenFormatRelative- deriving (Show, Read, Eq)--instance A.ToJSON TokenFormat where- toJSON TokenFormatRelative = A.String "relative"--instance A.FromJSON TokenFormat where- parseJSON (A.String "relative") = pure TokenFormatRelative- parseJSON _ = mempty--data SemanticTokensLegend = SemanticTokensLegend {- -- | The token types a server uses.- _tokenTypes :: List SemanticTokenTypes,- -- | The token modifiers a server uses.- _tokenModifiers :: List SemanticTokenModifiers-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensLegend---- We give a default legend which just lists the "known" types and modifiers in the order they're listed.-instance Default SemanticTokensLegend where- def = SemanticTokensLegend (List knownSemanticTokenTypes) (List knownSemanticTokenModifiers)--data SemanticTokensRangeClientCapabilities = SemanticTokensRangeBool Bool | SemanticTokensRangeObj A.Value- deriving (Show, Read, Eq)-deriveJSON lspOptionsUntagged ''SemanticTokensRangeClientCapabilities--data SemanticTokensDeltaClientCapabilities = SemanticTokensDeltaClientCapabilities {- -- | The client will send the `textDocument/semanticTokens/full/delta`- -- request if the server provides a corresponding handler.- _delta :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDeltaClientCapabilities--data SemanticTokensFullClientCapabilities = SemanticTokensFullBool Bool | SemanticTokensFullDelta SemanticTokensDeltaClientCapabilities- deriving (Show, Read, Eq)-deriveJSON lspOptionsUntagged ''SemanticTokensFullClientCapabilities--data SemanticTokensRequestsClientCapabilities = SemanticTokensRequestsClientCapabilities {- -- | The client will send the `textDocument/semanticTokens/range` request- -- if the server provides a corresponding handler.- _range :: Maybe SemanticTokensRangeClientCapabilities,- -- | The client will send the `textDocument/semanticTokens/full` request- -- if the server provides a corresponding handler.- _full :: Maybe SemanticTokensFullClientCapabilities-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensRequestsClientCapabilities--data SemanticTokensClientCapabilities = SemanticTokensClientCapabilities {- -- | Whether implementation supports dynamic registration. If this is set to- -- `true` the client supports the new `(TextDocumentRegistrationOptions &- -- StaticRegistrationOptions)` return value for the corresponding server- -- capability as well.- _dynamicRegistration :: Maybe Bool,-- -- | Which requests the client supports and might send to the server- -- depending on the server's capability. Please note that clients might not- -- show semantic tokens or degrade some of the user experience if a range- -- or full request is advertised by the client but not provided by the- -- server. If for example the client capability `requests.full` and- -- `request.range` are both set to true but the server only provides a- -- range provider the client might not render a minimap correctly or might- -- even decide to not show any semantic tokens at all.- _requests :: SemanticTokensRequestsClientCapabilities,-- -- | The token types that the client supports.- _tokenTypes :: List SemanticTokenTypes,-- -- | The token modifiers that the client supports.- _tokenModifiers :: List SemanticTokenModifiers,-- -- | The formats the clients supports.- _formats :: List TokenFormat,-- -- | Whether the client supports tokens that can overlap each other.- _overlappingTokenSupport :: Maybe Bool,-- -- | Whether the client supports tokens that can span multiple lines.- _multilineTokenSupport :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensClientCapabilities--makeExtendingDatatype "SemanticTokensOptions" [''WorkDoneProgressOptions]- [ ("_legend", [t| SemanticTokensLegend |])- , ("_range", [t| Maybe SemanticTokensRangeClientCapabilities |])- , ("_full", [t| Maybe SemanticTokensFullClientCapabilities |])- ]-deriveJSON lspOptions ''SemanticTokensOptions--makeExtendingDatatype "SemanticTokensRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''SemanticTokensOptions- , ''StaticRegistrationOptions] []-deriveJSON lspOptions ''SemanticTokensRegistrationOptions--makeExtendingDatatype "SemanticTokensParams"- [''WorkDoneProgressParams- , ''PartialResultParams]- [ ("_textDocument", [t| TextDocumentIdentifier |]) ]-deriveJSON lspOptions ''SemanticTokensParams--data SemanticTokens = SemanticTokens {- -- | An optional result id. If provided and clients support delta updating- -- the client will include the result id in the next semantic token request.- -- A server can then instead of computing all semantic tokens again simply- -- send a delta.- _resultId :: Maybe Text,-- -- | The actual tokens.- _xdata :: List UInt-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokens--data SemanticTokensPartialResult = SemanticTokensPartialResult {- _xdata :: List UInt-}-deriveJSON lspOptions ''SemanticTokensPartialResult--makeExtendingDatatype "SemanticTokensDeltaParams"- [''WorkDoneProgressParams- , ''PartialResultParams]- [ ("_textDocument", [t| TextDocumentIdentifier |])- , ("_previousResultId", [t| Text |])- ]-deriveJSON lspOptions ''SemanticTokensDeltaParams--data SemanticTokensEdit = SemanticTokensEdit {- -- | The start offset of the edit.- _start :: UInt,- -- | The count of elements to remove.- _deleteCount :: UInt,- -- | The elements to insert.- _xdata :: Maybe (List UInt)-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensEdit--data SemanticTokensDelta = SemanticTokensDelta {- _resultId :: Maybe Text,- -- | The semantic token edits to transform a previous result into a new- -- result.- _edits :: List SemanticTokensEdit-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDelta--data SemanticTokensDeltaPartialResult = SemantictokensDeltaPartialResult {- _edits :: List SemanticTokensEdit-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDeltaPartialResult--makeExtendingDatatype "SemanticTokensRangeParams"- [''WorkDoneProgressParams- , ''PartialResultParams]- [ ("_textDocument", [t| TextDocumentIdentifier |])- , ("_range", [t| Range |])- ]-deriveJSON lspOptions ''SemanticTokensRangeParams--data SemanticTokensWorkspaceClientCapabilities = SemanticTokensWorkspaceClientCapabilities {- -- | Whether the client implementation supports a refresh request sent from- -- the server to the client.- --- -- Note that this event is global and will force the client to refresh all- -- semantic tokens currently shown. It should be used with absolute care- -- and is useful for situation where a server for example detect a project- -- wide change that requires such a calculation.- _refreshSupport :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensWorkspaceClientCapabilities--------------------------------------------------------------- Tools for working with semantic tokens.--------------------------------------------------------------- | A single 'semantic token' as described in the LSP specification, using absolute positions.--- This is the kind of token that is usually easiest for editors to produce.-data SemanticTokenAbsolute = SemanticTokenAbsolute {- line :: UInt,- startChar :: UInt,- length :: UInt,- tokenType :: SemanticTokenTypes,- tokenModifiers :: [SemanticTokenModifiers]-} deriving (Show, Read, Eq, Ord)--- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the--- order of the constructors---- | A single 'semantic token' as described in the LSP specification, using relative positions.-data SemanticTokenRelative = SemanticTokenRelative {- deltaLine :: UInt,- deltaStartChar :: UInt,- length :: UInt,- tokenType :: SemanticTokenTypes,- tokenModifiers :: [SemanticTokenModifiers]-} deriving (Show, Read, Eq, Ord)--- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the--- order of the constructors---- | Turn a list of absolutely-positioned tokens into a list of relatively-positioned tokens. The tokens are assumed to be in the--- order that they appear in the document!-relativizeTokens :: [SemanticTokenAbsolute] -> [SemanticTokenRelative]-relativizeTokens xs = DList.toList $ go 0 0 xs mempty- where- -- Pass an accumulator to make this tail-recursive- go :: UInt -> UInt -> [SemanticTokenAbsolute] -> DList.DList SemanticTokenRelative -> DList.DList SemanticTokenRelative- go _ _ [] acc = acc- go lastLine lastChar (SemanticTokenAbsolute l c len ty mods:ts) acc =- let- lastCharInLine = if l == lastLine then lastChar else 0- dl = l - lastLine- dc = c - lastCharInLine- in go l c ts (DList.snoc acc (SemanticTokenRelative dl dc len ty mods))---- | Turn a list of relatively-positioned tokens into a list of absolutely-positioned tokens. The tokens are assumed to be in the--- order that they appear in the document!-absolutizeTokens :: [SemanticTokenRelative] -> [SemanticTokenAbsolute]-absolutizeTokens xs = DList.toList $ go 0 0 xs mempty- where- -- Pass an accumulator to make this tail-recursive- go :: UInt -> UInt -> [SemanticTokenRelative] -> DList.DList SemanticTokenAbsolute -> DList.DList SemanticTokenAbsolute- go _ _ [] acc = acc- go lastLine lastChar (SemanticTokenRelative dl dc len ty mods:ts) acc =- let- lastCharInLine = if dl == 0 then lastChar else 0- l = lastLine + dl- c = lastCharInLine + dc- in go l c ts (DList.snoc acc (SemanticTokenAbsolute l c len ty mods))---- | Encode a series of relatively-positioned semantic tokens into an integer array following the given legend.-encodeTokens :: SemanticTokensLegend -> [SemanticTokenRelative] -> Either Text [UInt]-encodeTokens SemanticTokensLegend{_tokenTypes=List tts,_tokenModifiers=List tms} sts =- DList.toList . DList.concat <$> traverse encodeToken sts- where- -- Note that there's no "fast" version of these (e.g. backed by an IntMap or similar)- -- in general, due to the possibility of unknown token types which are only identified by strings.- tyMap :: Map.Map SemanticTokenTypes UInt- tyMap = Map.fromList $ zip tts [0..]- modMap :: Map.Map SemanticTokenModifiers Int- modMap = Map.fromList $ zip tms [0..]-- lookupTy :: SemanticTokenTypes -> Either Text UInt- lookupTy ty = case Map.lookup ty tyMap of- Just tycode -> pure tycode- Nothing -> throwError $ "Semantic token type " <> fromString (show ty) <> " did not appear in the legend"- lookupMod :: SemanticTokenModifiers -> Either Text Int- lookupMod modifier = case Map.lookup modifier modMap of- Just modcode -> pure modcode- Nothing -> throwError $ "Semantic token modifier " <> fromString (show modifier) <> " did not appear in the legend"-- -- Use a DList here for better efficiency when concatenating all these together- encodeToken :: SemanticTokenRelative -> Either Text (DList.DList UInt)- encodeToken (SemanticTokenRelative dl dc len ty mods) = do- tycode <- lookupTy ty- modcodes <- traverse lookupMod mods- let combinedModcode :: Int = foldl' Bits.setBit Bits.zeroBits modcodes-- pure [dl, dc, len, tycode, fromIntegral combinedModcode ]---- This is basically 'SemanticTokensEdit', but slightly easier to work with.--- | An edit to a buffer of items. -data Edit a = Edit { editStart :: UInt, editDeleteCount :: UInt, editInsertions :: [a] }- deriving (Read, Show, Eq, Ord)---- | Compute a list of edits that will turn the first list into the second list.-computeEdits :: Eq a => [a] -> [a] -> [Edit a]-computeEdits l r = DList.toList $ go 0 Nothing (Diff.getGroupedDiff l r) mempty- where- {-- Strategy: traverse the list of diffs, keeping the current index and (maybe) an in-progress 'Edit'.- Whenever we see a 'Diff' that's only one side or the other, we can bundle that in to our in-progress- 'Edit'. We only have to stop if we see a 'Diff' that's on both sides (i.e. unchanged), then we- dump the 'Edit' into the accumulator.- We need the index, because 'Edit's need to say where they start.- -}- go :: UInt -> Maybe (Edit a) -> [Diff.Diff [a]] -> DList.DList (Edit a) -> DList.DList (Edit a)- -- No more diffs: append the current edit if there is one and return- go _ e [] acc = acc <> DList.fromList (maybeToList e)-- -- Items only on the left (i.e. deletions): increment the current index, and record the count of deletions,- -- starting a new edit if necessary.- go ix e (Diff.First ds : rest) acc =- let- deleteCount = fromIntegral $ Prelude.length ds- edit = fromMaybe (Edit ix 0 []) e- in go (ix + deleteCount) (Just (edit{editDeleteCount=editDeleteCount edit + deleteCount})) rest acc- -- Items only on the right (i.e. insertions): don't increment the current index, and record the insertions,- -- starting a new edit if necessary.- go ix e (Diff.Second as : rest) acc =- let edit = fromMaybe (Edit ix 0 []) e- in go ix (Just (edit{editInsertions=editInsertions edit <> as})) rest acc-- -- Items on both sides: increment the current index appropriately (since the items appear on the left),- -- and append the current edit (if there is one) to our list of edits (since we can't continue it with a break).- go ix e (Diff.Both bs _bs : rest) acc =- let bothCount = fromIntegral $ Prelude.length bs- in go (ix + bothCount) Nothing rest (acc <> DList.fromList (maybeToList e))---- | Convenience method for making a 'SemanticTokens' from a list of 'SemanticTokenAbsolute's. An error may be returned if---- The resulting 'SemanticTokens' lacks a result ID, which must be set separately if you are using that.-makeSemanticTokens :: SemanticTokensLegend -> [SemanticTokenAbsolute] -> Either Text SemanticTokens-makeSemanticTokens legend sts = do- encoded <- encodeTokens legend $ relativizeTokens sts- pure $ SemanticTokens Nothing (List encoded)---- | Convenience function for making a 'SemanticTokensDelta' from a previous and current 'SemanticTokens'.--- The resulting 'SemanticTokensDelta' lacks a result ID, which must be set separately if you are using that.-makeSemanticTokensDelta :: SemanticTokens -> SemanticTokens -> SemanticTokensDelta-makeSemanticTokensDelta SemanticTokens{_xdata=List prevTokens} SemanticTokens{_xdata=List curTokens} =- let edits = computeEdits prevTokens curTokens- stEdits = fmap (\(Edit s ds as) -> SemanticTokensEdit s ds (Just $ List as)) edits- in SemanticTokensDelta Nothing (List stEdits)-
− src/Language/LSP/Types/ServerCapabilities.hs
@@ -1,137 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.ServerCapabilities where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.Completion-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceSymbol---- -----------------------------------------------------------------------data WorkspaceFoldersServerCapabilities =- WorkspaceFoldersServerCapabilities- { -- | The server has support for workspace folders- _supported :: Maybe Bool- -- | Whether the server wants to receive workspace folder- -- change notifications.- -- If a strings is provided the string is treated as a ID- -- under which the notification is registered on the client- -- side. The ID can be used to unregister for these events- -- using the `client/unregisterCapability` request.- , _changeNotifications :: Maybe (Text |? Bool)- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceFoldersServerCapabilities--data WorkspaceServerCapabilities =- WorkspaceServerCapabilities- { -- | The server supports workspace folder. Since LSP 3.6- --- -- @since 0.7.0.0- _workspaceFolders :: Maybe WorkspaceFoldersServerCapabilities- }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''WorkspaceServerCapabilities--data ServerCapabilities =- ServerCapabilities- { -- | Defines how text documents are synced. Is either a detailed structure- -- defining each notification or for backwards compatibility the- -- 'TextDocumentSyncKind' number.- -- If omitted it defaults to 'TdSyncNone'.- _textDocumentSync :: Maybe (TextDocumentSyncOptions |? TextDocumentSyncKind)- -- | The server provides hover support.- , _hoverProvider :: Maybe (Bool |? HoverOptions)- -- | The server provides completion support.- , _completionProvider :: Maybe CompletionOptions- -- | The server provides signature help support.- , _signatureHelpProvider :: Maybe SignatureHelpOptions- -- | The server provides go to declaration support.- --- -- Since LSP 3.14.0- , _declarationProvider :: Maybe (Bool |? DeclarationOptions |? DeclarationRegistrationOptions)- -- | The server provides goto definition support.- , _definitionProvider :: Maybe (Bool |? DefinitionOptions)- -- | The server provides Goto Type Definition support. Since LSP 3.6- --- -- @since 0.7.0.0- , _typeDefinitionProvider :: Maybe (Bool |? TypeDefinitionOptions |? TypeDefinitionRegistrationOptions)- -- | The server provides Goto Implementation support. Since LSP 3.6- --- -- @since 0.7.0.0- , _implementationProvider :: Maybe (Bool |? ImplementationOptions |? ImplementationRegistrationOptions)- -- | The server provides find references support.- , _referencesProvider :: Maybe (Bool |? ReferenceOptions)- -- | The server provides document highlight support.- , _documentHighlightProvider :: Maybe (Bool |? DocumentHighlightOptions)- -- | The server provides document symbol support.- , _documentSymbolProvider :: Maybe (Bool |? DocumentSymbolOptions)- -- | The server provides code actions.- , _codeActionProvider :: Maybe (Bool |? CodeActionOptions)- -- | The server provides code lens.- , _codeLensProvider :: Maybe CodeLensOptions- -- | The server provides document link support.- , _documentLinkProvider :: Maybe DocumentLinkOptions- -- | The server provides color provider support. Since LSP 3.6- --- -- @since 0.7.0.0- , _colorProvider :: Maybe (Bool |? DocumentColorOptions |? DocumentColorRegistrationOptions)- -- | The server provides document formatting.- , _documentFormattingProvider :: Maybe (Bool |? DocumentFormattingOptions)- -- | The server provides document range formatting.- , _documentRangeFormattingProvider :: Maybe (Bool |? DocumentRangeFormattingOptions)- -- | The server provides document formatting on typing.- , _documentOnTypeFormattingProvider :: Maybe DocumentOnTypeFormattingOptions- -- | The server provides rename support.- , _renameProvider :: Maybe (Bool |? RenameOptions)- -- | The server provides folding provider support. Since LSP 3.10- --- -- @since 0.7.0.0- , _foldingRangeProvider :: Maybe (Bool |? FoldingRangeOptions |? FoldingRangeRegistrationOptions)- -- | The server provides execute command support.- , _executeCommandProvider :: Maybe ExecuteCommandOptions- -- | The server provides selection range support. Since LSP 3.15- , _selectionRangeProvider :: Maybe (Bool |? SelectionRangeOptions |? SelectionRangeRegistrationOptions)- -- | The server provides call hierarchy support.- , _callHierarchyProvider :: Maybe (Bool |? CallHierarchyOptions |? CallHierarchyRegistrationOptions)- -- | The server provides semantic tokens support.- --- -- @since 3.16.0- , _semanticTokensProvider :: Maybe (SemanticTokensOptions |? SemanticTokensRegistrationOptions)- -- | The server provides workspace symbol support.- , _workspaceSymbolProvider :: Maybe (Bool |? WorkspaceSymbolOptions)- -- | Workspace specific server capabilities- , _workspace :: Maybe WorkspaceServerCapabilities- -- | Experimental server capabilities.- , _experimental :: Maybe Value- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ServerCapabilities
− src/Language/LSP/Types/SignatureHelp.hs
@@ -1,207 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--- | Signature Help Request--- https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#signature-help-request-module Language.LSP.Types.SignatureHelp where- -import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Control.Applicative (Alternative((<|>)))---- ---------------------------------------data SignatureHelpParameterInformation =- SignatureHelpParameterInformation- { -- | The client supports processing label offsets instead of a simple- -- label string.- --- -- @since 3.14.0- _labelOffsetSupport :: Maybe Bool- }- deriving (Read, Show, Eq)-deriveJSON lspOptions ''SignatureHelpParameterInformation--data SignatureHelpSignatureInformation =- SignatureHelpSignatureInformation- { -- | Client supports the follow content formats for the documentation- -- property. The order describes the preferred format of the client.- _documentationFormat :: Maybe (List MarkupKind)- -- | Client capabilities specific to parameter information.- , _parameterInformation :: Maybe SignatureHelpParameterInformation- -- | The client supports the `activeParameter` property on- -- 'SignatureInformation' literal.- --- -- @since 3.16.0- , _activeParameterSuport :: Maybe Bool- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''SignatureHelpSignatureInformation--data SignatureHelpClientCapabilities =- SignatureHelpClientCapabilities- { -- | Whether signature help supports dynamic registration.- _dynamicRegistration :: Maybe Bool- -- | The client supports the following 'SignatureInformation'- -- specific properties.- , _signatureInformation :: Maybe SignatureHelpSignatureInformation- -- | The client supports to send additional context information for a- -- @textDocument/signatureHelp@ request. A client that opts into- -- contextSupport will also support the '_retriggerCharacters' on- -- 'SignatureHelpOptions'.- --- -- @since 3.15.0- , _contextSupport :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''SignatureHelpClientCapabilities---- ---------------------------------------makeExtendingDatatype "SignatureHelpOptions" [''WorkDoneProgressOptions]- [ ("_triggerCharacters", [t| Maybe (List Text) |])- , ("_retriggerCharacters", [t| Maybe (List Text) |])- ]-deriveJSON lspOptions ''SignatureHelpOptions--makeExtendingDatatype "SignatureHelpRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''SignatureHelpOptions- ] []-deriveJSON lspOptions ''SignatureHelpRegistrationOptions---- ---------------------------------------data SignatureHelpDoc = SignatureHelpDocString Text | SignatureHelpDocMarkup MarkupContent- deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''SignatureHelpDoc---- ---------------------------------------data ParameterLabel = ParameterLabelString Text | ParameterLabelOffset UInt UInt- deriving (Read,Show,Eq)--instance ToJSON ParameterLabel where- toJSON (ParameterLabelString t) = toJSON t- toJSON (ParameterLabelOffset l h) = toJSON [l, h]--instance FromJSON ParameterLabel where- parseJSON x = ParameterLabelString <$> parseJSON x <|> parseInterval x- where- parseInterval v@(Array _) = do- is <- parseJSON v- case is of- [l, h] -> pure $ ParameterLabelOffset l h- _ -> fail "ParameterLabel"- parseInterval _ = fail "ParameterLabel"---- ---------------------------------------{-| -Represents a parameter of a callable-signature. A parameter can-have a label and a doc-comment.--}-data ParameterInformation =- ParameterInformation- { _label :: ParameterLabel -- ^ The label of this parameter information.- , _documentation :: Maybe SignatureHelpDoc -- ^ The human-readable doc-comment of this parameter.- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''ParameterInformation---- ---------------------------------------{-|-Represents the signature of something callable. A signature-can have a label, like a function-name, a doc-comment, and-a set of parameters.--}-data SignatureInformation =- SignatureInformation- { _label :: Text -- ^ The label of the signature.- , _documentation :: Maybe SignatureHelpDoc -- ^ The human-readable doc-comment of this signature.- , _parameters :: Maybe (List ParameterInformation) -- ^ The parameters of this signature.- , _activeParameter :: Maybe UInt -- ^ The index of the active parameter.- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''SignatureInformation---{-|-Signature help represents the signature of something-callable. There can be multiple signature but only one-active and only one active parameter.--}-data SignatureHelp =- SignatureHelp- { _signatures :: List SignatureInformation -- ^ One or more signatures.- , _activeSignature :: Maybe UInt -- ^ The active signature.- , _activeParameter :: Maybe UInt -- ^ The active parameter of the active signature.- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''SignatureHelp---- ----------------------------------------- | How a signature help was triggered.------ @since 3.15.0-data SignatureHelpTriggerKind = SHTKInvoked -- ^ Signature help was invoked manually by the user or by a command.- | SHTKTriggerCharacter -- ^ Signature help was triggered by a trigger character.- | SHTKContentChange -- ^ Signature help was triggered by the cursor moving or by the document content changing.- deriving (Read,Show,Eq)--instance ToJSON SignatureHelpTriggerKind where- toJSON SHTKInvoked = Number 1- toJSON SHTKTriggerCharacter = Number 2- toJSON SHTKContentChange = Number 3--instance FromJSON SignatureHelpTriggerKind where- parseJSON (Number 1) = pure SHTKInvoked- parseJSON (Number 2) = pure SHTKTriggerCharacter- parseJSON (Number 3) = pure SHTKContentChange- parseJSON _ = fail "SignatureHelpTriggerKind"---- | Additional information about the context in which a signature help request--- was triggered.------ @since 3.15.0-data SignatureHelpContext = - SignatureHelpContext- { -- | Action that caused signature help to be triggered.- _triggerKind :: SignatureHelpTriggerKind- -- | Character that caused signature help to be triggered. This is- -- undefined when @triggerKind !==- -- SignatureHelpTriggerKind.TriggerCharacter@- , _triggerCharacter :: Maybe Text- -- | 'True' if signature help was already showing when it was triggered.- -- - -- Retriggers occur when the signature help is already active and can be- -- caused by actions such as typing a trigger character, a cursor move, or- -- document content changes.- , _isRetrigger :: Bool- -- | The currently active 'SignatureHelp'.- -- - -- The '_activeSignatureHelp' has its @SignatureHelp.activeSignature@- -- field updated based on the user navigating through available- -- signatures.- , _activeSignatureHelp :: Maybe SignatureHelp- }- deriving (Read,Show,Eq)-deriveJSON lspOptions ''SignatureHelpContext--makeExtendingDatatype "SignatureHelpParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- ]- [ ("_context", [t| Maybe SignatureHelpContext |])- ]-deriveJSON lspOptions ''SignatureHelpParams--
− src/Language/LSP/Types/StaticRegistrationOptions.hs
@@ -1,13 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}--- Cyclic dependencies mean we have to put poor StaticRegistrationOptions on its own-module Language.LSP.Types.StaticRegistrationOptions where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Utils--data StaticRegistrationOptions =- StaticRegistrationOptions- { _id :: Maybe Text- } deriving (Read,Show,Eq)-deriveJSON lspOptions ''StaticRegistrationOptions
− src/Language/LSP/Types/TextDocument.hs
@@ -1,264 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeOperators #-}-module Language.LSP.Types.TextDocument where--import Data.Aeson-import Data.Aeson.TH-import Data.Default-import Data.Text ( Text )--import Language.LSP.Types.Common-import Language.LSP.Types.DocumentFilter-import Language.LSP.Types.Location-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---- -----------------------------------------------------------------------data TextDocumentIdentifier =- TextDocumentIdentifier- { _uri :: Uri- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''TextDocumentIdentifier--type TextDocumentVersion = Maybe Int32--makeExtendingDatatype "VersionedTextDocumentIdentifier" [''TextDocumentIdentifier]- [ ("_version", [t| TextDocumentVersion |])]-deriveJSON lspOptions ''VersionedTextDocumentIdentifier--data TextDocumentItem =- TextDocumentItem {- _uri :: Uri- , _languageId :: Text- , _version :: Int32- , _text :: Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentItem---- -----------------------------------------------------------------------data TextDocumentPositionParams =- TextDocumentPositionParams- { -- | The text document.- _textDocument :: TextDocumentIdentifier- , -- | The position inside the text document.- _position :: Position- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentPositionParams---- ----------------------------------------- Text document synchronisation---data TextDocumentSyncClientCapabilities =- TextDocumentSyncClientCapabilities- { -- | Whether text document synchronization supports dynamic registration.- _dynamicRegistration :: Maybe Bool-- -- | The client supports sending will save notifications.- , _willSave :: Maybe Bool-- -- | The client supports sending a will save request and waits for a- -- response providing text edits which will be applied to the document- -- before it is saved.- , _willSaveWaitUntil :: Maybe Bool-- -- | The client supports did save notifications.- , _didSave :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentSyncClientCapabilities--instance Default TextDocumentSyncClientCapabilities where- def = TextDocumentSyncClientCapabilities def def def def---- ---------------------------------------data SaveOptions =- SaveOptions- { -- | The client is supposed to include the content on save.- _includeText :: Maybe Bool- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''SaveOptions---- ----------------------------------------- | Defines how the host (editor) should sync document changes to the language server.-data TextDocumentSyncKind- = -- | Documents should not be synced at all.- TdSyncNone- | -- | Documents are synced by always sending the full content of the document.- TdSyncFull- | -- | Documents are synced by sending the full content on open. After that only incremental updates to the document are send.- TdSyncIncremental- deriving (Read, Eq, Show)--instance ToJSON TextDocumentSyncKind where- toJSON TdSyncNone = Number 0- toJSON TdSyncFull = Number 1- toJSON TdSyncIncremental = Number 2--instance FromJSON TextDocumentSyncKind where- parseJSON (Number 0) = pure TdSyncNone- parseJSON (Number 1) = pure TdSyncFull- parseJSON (Number 2) = pure TdSyncIncremental- parseJSON _ = fail "TextDocumentSyncKind"--data TextDocumentSyncOptions =- TextDocumentSyncOptions- { -- | Open and close notifications are sent to the server. If omitted open- -- close notification should not be sent.- _openClose :: Maybe Bool- , -- | Change notifications are sent to the server. See- -- TextDocumentSyncKind.None, TextDocumentSyncKind.Full- -- and TextDocumentSyncKind.Incremental. If omitted it defaults to- -- TextDocumentSyncKind.None.- _change :: Maybe TextDocumentSyncKind- -- | If present will save notifications are sent to the server. If omitted the notification should not be- -- sent.- , _willSave :: Maybe Bool- -- | If present will save wait until requests are sent to the server. If omitted the request should not be- -- sent.- , _willSaveWaitUntil :: Maybe Bool- -- | If present save notifications are sent to the server. If omitted the- -- notification should not be sent.- , _save :: Maybe (Bool |? SaveOptions)- } deriving (Show, Read, Eq)-deriveJSON lspOptions ''TextDocumentSyncOptions---- ---------------------------------------{--Since most of the registration options require to specify a document selector-there is a base interface that can be used.--}--data TextDocumentRegistrationOptions =- TextDocumentRegistrationOptions- { _documentSelector :: Maybe DocumentSelector- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentRegistrationOptions---- ---------------------------------------data DidOpenTextDocumentParams =- DidOpenTextDocumentParams- { -- | The document that was opened.- _textDocument :: TextDocumentItem- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidOpenTextDocumentParams---- ---------------------------------------makeExtendingDatatype "TextDocumentChangeRegistrationOptions"- [''TextDocumentRegistrationOptions]- [("_syncKind", [t| TextDocumentSyncKind |])]--deriveJSON lspOptions ''TextDocumentChangeRegistrationOptions--data TextDocumentContentChangeEvent =- TextDocumentContentChangeEvent- { -- | The range of the document that changed.- _range :: Maybe Range- -- | The optional length of the range that got replaced.- -- Deprecated, use _range instead- , _rangeLength :: Maybe UInt- -- | The new text for the provided range, if provided.- -- Otherwise the new text of the whole document.- , _text :: Text- }- deriving (Read,Show,Eq)--deriveJSON lspOptions ''TextDocumentContentChangeEvent---- ---------------------------------------data DidChangeTextDocumentParams =- DidChangeTextDocumentParams- { -- | The document that did change. The version number points- -- to the version after all provided content changes have- -- been applied.- _textDocument :: VersionedTextDocumentIdentifier- -- | The actual content changes. The content changes describe single state changes- -- to the document. So if there are two content changes c1 (at array index 0) and- -- c2 (at array index 1) for a document in state S then c1 moves the document from- -- S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed- -- on the state S'.- --- -- To mirror the content of a document using change events use the following approach:- -- - start with the same initial content- -- - apply the 'textDocument/didChange' notifications in the order you recevie them.- -- - apply the `TextDocumentContentChangeEvent`s in a single notification in the order- -- you receive them.- , _contentChanges :: List TextDocumentContentChangeEvent- } deriving (Show,Read,Eq)--deriveJSON lspOptions ''DidChangeTextDocumentParams---- ---------------------------------------data TextDocumentSaveReason- = SaveManual- -- ^ Manually triggered, e.g. by the user pressing save, by starting- -- debugging, or by an API call.- | SaveAfterDelay -- ^ Automatic after a delay- | SaveFocusOut -- ^ When the editor lost focus- deriving (Show, Read, Eq)--instance ToJSON TextDocumentSaveReason where- toJSON SaveManual = Number 1- toJSON SaveAfterDelay = Number 2- toJSON SaveFocusOut = Number 3--instance FromJSON TextDocumentSaveReason where- parseJSON (Number 1) = pure SaveManual- parseJSON (Number 2) = pure SaveAfterDelay- parseJSON (Number 3) = pure SaveFocusOut- parseJSON _ = fail "TextDocumentSaveReason"--data WillSaveTextDocumentParams =- WillSaveTextDocumentParams- { -- | The document that will be saved.- _textDocument :: TextDocumentIdentifier- -- | The 'TextDocumentSaveReason'.- , _reason :: TextDocumentSaveReason- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WillSaveTextDocumentParams---- ----------------------------------------makeExtendingDatatype "TextDocumentSaveRegistrationOptions"- [''TextDocumentRegistrationOptions]- [("_includeText", [t| Maybe Bool |])]--deriveJSON lspOptions ''TextDocumentSaveRegistrationOptions--data DidSaveTextDocumentParams =- DidSaveTextDocumentParams- { -- | The document that was saved.- _textDocument :: TextDocumentIdentifier- -- | Optional the content when saved. Depends on the includeText value- -- when the save notification was requested.- , _text :: Maybe Text- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidSaveTextDocumentParams---- ---------------------------------------data DidCloseTextDocumentParams =- DidCloseTextDocumentParams- { -- | The document that was closed.- _textDocument :: TextDocumentIdentifier- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidCloseTextDocumentParams
− src/Language/LSP/Types/TypeDefinition.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.TypeDefinition where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data TypeDefinitionClientCapabilities = TypeDefinitionClientCapabilities- { -- | Whether implementation supports dynamic registration. If this is set- -- to 'True'- -- the client supports the new 'TypeDefinitionRegistrationOptions' return- -- value for the corresponding server capability as well.- _dynamicRegistration :: Maybe Bool,- -- | The client supports additional metadata in the form of definition links.- --- -- Since LSP 3.14.0- _linkSupport :: Maybe Bool- }- deriving (Read, Show, Eq)--deriveJSON lspOptions ''TypeDefinitionClientCapabilities--makeExtendingDatatype "TypeDefinitionOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''TypeDefinitionOptions--makeExtendingDatatype "TypeDefinitionRegistrationOptions"- [ ''TextDocumentRegistrationOptions- , ''TypeDefinitionOptions- , ''StaticRegistrationOptions- ] []-deriveJSON lspOptions ''TypeDefinitionRegistrationOptions--makeExtendingDatatype "TypeDefinitionParams"- [ ''TextDocumentPositionParams- , ''WorkDoneProgressParams- , ''PartialResultParams- ] []-deriveJSON lspOptions ''TypeDefinitionParams
− src/Language/LSP/Types/Uri.hs
@@ -1,241 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE InstanceSigs #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeSynonymInstances #-}--module Language.LSP.Types.Uri- ( Uri(..)- , uriToFilePath- , filePathToUri- , NormalizedUri(..)- , toNormalizedUri- , fromNormalizedUri- , NormalizedFilePath- , toNormalizedFilePath- , fromNormalizedFilePath- , normalizedFilePathToUri- , uriToNormalizedFilePath- , emptyNormalizedFilePath- -- Private functions- , platformAwareUriToFilePath- , platformAwareFilePathToUri- )- where--import Control.DeepSeq-import qualified Data.Aeson as A-import Data.Binary (Binary, Get, get, put)-import Data.Hashable-import Data.List (stripPrefix)-import Data.String (IsString (fromString))-import Data.Text (Text)-import qualified Data.Text as T-import GHC.Generics-import Network.URI hiding (authority)-import Safe (tailMay)-import qualified System.FilePath as FP-import qualified System.FilePath.Posix as FPP-import qualified System.FilePath.Windows as FPW-import qualified System.Info--newtype Uri = Uri { getUri :: Text }- deriving (Eq,Ord,Read,Show,Generic,A.FromJSON,A.ToJSON,Hashable,A.ToJSONKey,A.FromJSONKey)--instance NFData Uri---- If you care about performance then you should use a hash map. The keys--- are cached in order to make hashing very fast.-data NormalizedUri = NormalizedUri !Int !Text- deriving (Read,Show,Generic, Eq)---- Slow but compares paths alphabetically as you would expect.-instance Ord NormalizedUri where- compare (NormalizedUri _ u1) (NormalizedUri _ u2) = compare u1 u2--instance Hashable NormalizedUri where- hash (NormalizedUri h _) = h- hashWithSalt salt (NormalizedUri h _) = hashWithSalt salt h--instance NFData NormalizedUri--isUnescapedInUriPath :: SystemOS -> Char -> Bool-isUnescapedInUriPath systemOS c- | systemOS == windowsOS = isUnreserved c || c `elem` [':', '\\', '/']- | otherwise = isUnreserved c || c == '/'---- | When URIs are supposed to be used as keys, it is important to normalize--- the percent encoding in the URI since URIs that only differ--- when it comes to the percent-encoding should be treated as equivalent.-normalizeUriEscaping :: String -> String-normalizeUriEscaping uri =- case stripPrefix (fileScheme ++ "//") uri of- Just p -> fileScheme ++ "//" ++ escapeURIPath (unEscapeString p)- Nothing -> escapeURIString isUnescapedInURI $ unEscapeString uri- where escapeURIPath = escapeURIString (isUnescapedInUriPath System.Info.os)--toNormalizedUri :: Uri -> NormalizedUri-toNormalizedUri uri = NormalizedUri (hash norm) norm- where (Uri t) = maybe uri filePathToUri (uriToFilePath uri)- -- To ensure all `Uri`s have the file path normalized- norm = T.pack (normalizeUriEscaping (T.unpack t))--fromNormalizedUri :: NormalizedUri -> Uri-fromNormalizedUri (NormalizedUri _ t) = Uri t--fileScheme :: String-fileScheme = "file:"--windowsOS :: String-windowsOS = "mingw32"--type SystemOS = String--uriToFilePath :: Uri -> Maybe FilePath-uriToFilePath = platformAwareUriToFilePath System.Info.os--{-# WARNING platformAwareUriToFilePath "This function is considered private. Use normalizedFilePathToUri instead." #-}-platformAwareUriToFilePath :: String -> Uri -> Maybe FilePath-platformAwareUriToFilePath systemOS (Uri uri) = do- URI{..} <- parseURI $ T.unpack uri- if uriScheme == fileScheme- then return $- platformAdjustFromUriPath systemOS (uriRegName <$> uriAuthority) $ unEscapeString uriPath- else Nothing---- | We pull in the authority because in relative file paths the Uri likes to put everything before the slash--- into the authority field-platformAdjustFromUriPath :: SystemOS- -> Maybe String -- ^ authority- -> String -- ^ path- -> FilePath-platformAdjustFromUriPath systemOS authority srcPath =- maybe id (++) authority $- if systemOS /= windowsOS- then srcPath- else case FPP.splitDirectories <$> tailMay srcPath of- Just (firstSegment:rest) -> -- Drop leading '/' for absolute Windows paths- let drive = if FPW.isDrive firstSegment- then FPW.addTrailingPathSeparator firstSegment- else firstSegment- in FPW.joinDrive drive $ FPW.joinPath rest- _ -> srcPath--filePathToUri :: FilePath -> Uri-filePathToUri = platformAwareFilePathToUri System.Info.os . FP.normalise--{-# WARNING platformAwareFilePathToUri "This function is considered private. Use normalizedUriToFilePath instead." #-}-platformAwareFilePathToUri :: SystemOS -> FilePath -> Uri-platformAwareFilePathToUri systemOS fp = Uri . T.pack . show $ URI- { uriScheme = fileScheme- , uriAuthority = Just $ URIAuth "" "" ""- , uriPath = platformAdjustToUriPath systemOS fp- , uriQuery = ""- , uriFragment = ""- }--platformAdjustToUriPath :: SystemOS -> FilePath -> String-platformAdjustToUriPath systemOS srcPath- | systemOS == windowsOS = '/' : escapedPath- | otherwise = escapedPath- where- (splitDirectories, splitDrive)- | systemOS == windowsOS =- (FPW.splitDirectories, FPW.splitDrive)- | otherwise =- (FPP.splitDirectories, FPP.splitDrive)- escapedPath =- case splitDrive srcPath of- (drv, rest) ->- convertDrive drv `FPP.joinDrive`- FPP.joinPath (map (escapeURIString (isUnescapedInUriPath systemOS)) $ splitDirectories rest)- -- splitDirectories does not remove the path separator after the drive so- -- we do a final replacement of \ to /- convertDrive drv- | systemOS == windowsOS && FPW.hasTrailingPathSeparator drv =- FPP.addTrailingPathSeparator (init drv)- | otherwise = drv--{-| A file path that is already normalized.--The 'NormalizedUri' is cached to avoided-repeated normalisation when we need to compute them (which is a lot).--This is one of the most performance critical parts of HLS, do not-modify it without profiling.--== Adoption Plan of OsPath--Currently we store 'Text'. We may change it to OsPath in the future if-the following steps are executed.--1. In the client codebase, use 'osPathToNormalizedFilePath' and 'normalizedFilePathToOsPath' instead of 'fromNormalizedFilePath'- and 'toNormalizedFilePath'. For HLS, we could wait until GHC 9.6 becomes the oldest- GHC we support, then change 'FilePath' to OsPath everywhere in the codebase.-2. Deprecate and remove 'fromNormalizedFilePath' and 'toNormalizedFilePath'.-3. Change 'Text' to OsPath and benchmark it to make sure performance doesn't go down. Don't forget to check Windows,- as OsPath on Windows uses UTF-16, which may consume more memory.--See [#453](https://github.com/haskell/lsp/pull/453) and [#446](https://github.com/haskell/lsp/pull/446)-for more discussions on this topic.--}-data NormalizedFilePath = NormalizedFilePath !NormalizedUri {-# UNPACK #-} !Text- deriving (Generic, Eq, Ord)--instance NFData NormalizedFilePath--instance Binary NormalizedFilePath where- put (NormalizedFilePath _ fp) = put fp- get = do- v <- Data.Binary.get :: Get Text- return (NormalizedFilePath (internalNormalizedFilePathToUri (T.unpack v)) v)---- | Internal helper that takes a file path that is assumed to--- already be normalized to a URI. It is up to the caller--- to ensure normalization.-internalNormalizedFilePathToUri :: FilePath -> NormalizedUri-internalNormalizedFilePathToUri fp = nuri- where- uriPath = platformAdjustToUriPath System.Info.os fp- nuriStr = T.pack $ fileScheme <> "//" <> uriPath- nuri = NormalizedUri (hash nuriStr) nuriStr--instance Show NormalizedFilePath where- show (NormalizedFilePath _ fp) = "NormalizedFilePath " ++ show fp--instance Hashable NormalizedFilePath where- hash (NormalizedFilePath uri _) = hash uri- hashWithSalt salt (NormalizedFilePath uri _) = hashWithSalt salt uri--instance IsString NormalizedFilePath where- fromString :: String -> NormalizedFilePath- fromString = toNormalizedFilePath--toNormalizedFilePath :: FilePath -> NormalizedFilePath-toNormalizedFilePath fp = NormalizedFilePath nuri . T.pack $ nfp- where- nfp = FP.normalise fp- nuri = internalNormalizedFilePathToUri nfp---- | Extracts 'FilePath' from 'NormalizedFilePath'.-fromNormalizedFilePath :: NormalizedFilePath -> FilePath-fromNormalizedFilePath (NormalizedFilePath _ fp) = T.unpack fp--normalizedFilePathToUri :: NormalizedFilePath -> NormalizedUri-normalizedFilePathToUri (NormalizedFilePath uri _) = uri--uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath-uriToNormalizedFilePath nuri = fmap (NormalizedFilePath nuri . T.pack) mbFilePath- where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)--emptyNormalizedUri :: NormalizedUri-emptyNormalizedUri =- let s = "file://"- in NormalizedUri (hash s) s---- | 'NormalizedFilePath' that contains an empty file path-emptyNormalizedFilePath :: NormalizedFilePath-emptyNormalizedFilePath = NormalizedFilePath emptyNormalizedUri ""-
− src/Language/LSP/Types/Uri/OsPath.hs
@@ -1,53 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE ScopedTypeVariables #-}--#if MIN_VERSION_filepath(1,4,100)-#define OS_PATH 1-#endif--module Language.LSP.Types.Uri.OsPath- (-#ifdef OS_PATH- osPathToNormalizedFilePath- , normalizedFilePathToOsPath- , EncodingException-#endif- ) where--#ifdef OS_PATH--import Control.Exception hiding (try)-import Control.Monad.Catch-import GHC.IO.Encoding (getFileSystemEncoding)-import Language.LSP.Types.Uri-import System.IO-import System.IO.Unsafe (unsafePerformIO)-import System.OsPath-import System.OsPath.Encoding (EncodingException)--{-|-Constructs 'NormalizedFilePath' from 'OsPath'. Throws 'EncodingException' if the conversion fails.--We store a 'Text' in 'NormalizedFilePath', which is UTF-16 or UTF-8 depending on the verion of text library.-'OsPath' may have a different encoding than 'Text', so this function may fail.-But DO NOTE THAT encoding mismatch doesn't always mean an exception will be thrown.-[Possibly your encoding simply won't throw exception on failure](https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.IO.Encoding.html#initFileSystemEncoding).-Possibly the conversion function can't find any invalid byte sequence, giving a sucessful but wrong result.--}-osPathToNormalizedFilePath :: MonadThrow m => OsPath -> m NormalizedFilePath-osPathToNormalizedFilePath = fmap toNormalizedFilePath . liftException . decodeWith systemEnc utf16le--{-|-Extracts 'OsPath' from 'NormalizedFilePath'. Throws 'EncodingException' if the conversion fails.--}-normalizedFilePathToOsPath :: MonadThrow m => NormalizedFilePath -> m OsPath-normalizedFilePathToOsPath = liftException . encodeWith systemEnc utf16le . fromNormalizedFilePath--liftException :: (MonadThrow m, Exception e) => Either e a -> m a-liftException (Right x) = pure x-liftException (Left err) = throwM err--systemEnc :: TextEncoding-systemEnc = unsafePerformIO getFileSystemEncoding--#endif
− src/Language/LSP/Types/Utils.hs
@@ -1,123 +0,0 @@-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE LambdaCase #-}--- | Internal helpers for generating definitions-module Language.LSP.Types.Utils- ( rdrop- , makeSingletonFromJSON- , makeRegHelper- , makeExtendingDatatype- , lspOptions- , lspOptionsUntagged- ) where--import Control.Monad-import Data.Aeson-import Data.List-import Language.Haskell.TH---- -----------------------------------------------------------------------rdrop :: Int -> [a] -> [a]-rdrop cnt = reverse . drop cnt . reverse---- | Given a wrapper and a singleton GADT, construct FromJSON--- instances for each constructor return type by invoking the--- FromJSON instance for the wrapper and unwrapping-makeSingletonFromJSON :: Name -> Name -> Q [Dec]-makeSingletonFromJSON wrap gadt = do- TyConI (DataD _ _ _ _ cons _) <- reify gadt- concat <$> mapM (makeInst wrap) cons--{--instance FromJSON (SMethod $method) where- parseJSON = parseJSON >=> \case- SomeMethod $singleton-method -> pure $singleton-method- _ -> mempty--}-makeInst :: Name -> Con -> Q [Dec]-makeInst wrap (GadtC [sConstructor] args t) = do- ns <- replicateM (length args) (newName "x")- let wrappedPat = conP wrap [conP sConstructor (map varP ns)]- unwrappedE = pure $ foldl' AppE (ConE sConstructor) (map VarE ns)- [d| instance FromJSON $(pure t) where- parseJSON = parseJSON >=> \case- $wrappedPat -> pure $unwrappedE- _ -> mempty- |]-makeInst wrap (ForallC _ _ con) = makeInst wrap con -- Cancel and Custom requests-makeInst _ _ = fail "makeInst only defined for GADT constructors"--makeRegHelper :: Name -> DecsQ-makeRegHelper regOptTypeName = do- Just sMethodTypeName <- lookupTypeName "SMethod"- Just fromClientName <- lookupValueName "FromClient"- TyConI (DataD _ _ _ _ allCons _) <- reify sMethodTypeName-- let isConsFromClient (GadtC _ _ (AppT _ method)) = isMethodFromClient method- isConsFromClient _ = return False- isMethodFromClient :: Type -> Q Bool- isMethodFromClient (PromotedT method) = do- DataConI _ typ _ <- reify method- case typ of- AppT (AppT _ (PromotedT n)) _ -> return $ n == fromClientName- _ -> return False- isMethodFromClient _ = fail "Didn't expect this type of Method!"-- cons <- filterM isConsFromClient allCons-- let conNames = map (\(GadtC [name] _ _) -> name) cons- helperName = mkName "regHelper"- mkClause name = do- x <- newName "x"- clause [ conP name [], varP x ]- (normalB (varE x))- []- regOptTcon = conT regOptTypeName- fun <- funD helperName (map mkClause conNames)-- typSig <- sigD helperName $- [t| forall m x. $(conT sMethodTypeName) m- -> (Show ($regOptTcon m) => ToJSON ($regOptTcon m) => FromJSON ($regOptTcon m) => x)- -> x |]- return [typSig, fun]---- | @makeExtendingDatatype name extends fields@ generates a record datatype--- that contains all the fields of @extends@, plus the additional fields in--- @fields@.--- e.g.--- data Foo = { a :: Int }--- makeExtendingDatatype "bar" [''Foo] [("b", [t| String |])]--- Will generate--- data Bar = { a :: Int, b :: String }-makeExtendingDatatype :: String -> [Name] -> [(String, TypeQ)] -> DecsQ-makeExtendingDatatype datatypeNameStr extends fields = do- extendFields <- fmap concat $ forM extends $ \e -> do- TyConI (DataD _ _ _ _ [RecC _ eFields] _) <- reify e- return eFields- let datatypeName = mkName datatypeNameStr- insts = [[t| Read |], [t| Show |], [t| Eq |]]- constructor = recC datatypeName combinedFields- userFields = flip map fields $ \(s, typ) -> do- varBangType (mkName s) (bangType (bang noSourceUnpackedness noSourceStrictness) typ)- combinedFields = (map pure extendFields) <> userFields- derivs = [derivClause Nothing insts]- (\a -> [a]) <$> dataD (cxt []) datatypeName [] Nothing [constructor] derivs---- | Standard options for use when generating JSON instances--- NOTE: This needs to be in a separate file because of the TH stage restriction-lspOptions :: Options-lspOptions = defaultOptions { omitNothingFields = True, fieldLabelModifier = modifier }- where- modifier :: String -> String- -- For fields called data and type in the spec, we call them xdata and xtype- -- in haskell-lsp-types to avoid it clashing with the Haskell keywords. This- -- fixes up the json derivation- modifier "_xdata" = "data"- modifier "_xtype" = "type"- modifier xs = drop 1 xs---- | Standard options for use when generating JSON instances for an untagged union-lspOptionsUntagged :: Options-lspOptionsUntagged = lspOptions { sumEncoding = UntaggedValue }-
− src/Language/LSP/Types/WatchedFiles.hs
@@ -1,113 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.WatchedFiles where--import Data.Aeson-import Data.Aeson.TH-import Data.Bits-import Data.Scientific-import Language.LSP.Types.Common-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Data.Text (Text)---- ---------------------------------------data DidChangeWatchedFilesClientCapabilities = DidChangeWatchedFilesClientCapabilities- { -- | Did change watched files notification supports dynamic- -- registration.- _dynamicRegistration :: Maybe Bool- }- deriving (Show, Read, Eq)-deriveJSON lspOptions ''DidChangeWatchedFilesClientCapabilities---- | Describe options to be used when registering for file system change events.-data DidChangeWatchedFilesRegistrationOptions =- DidChangeWatchedFilesRegistrationOptions- { -- | The watchers to register.- _watchers :: List FileSystemWatcher- } deriving (Show, Read, Eq)--data FileSystemWatcher =- FileSystemWatcher- { -- | The glob pattern to watch.- -- Glob patterns can have the following syntax:- -- - @*@ to match one or more characters in a path segment- -- - @?@ to match on one character in a path segment- -- - @**@ to match any number of path segments, including none- -- - @{}@ to group conditions (e.g. @**/*.{ts,js}@ matches all TypeScript and JavaScript files)- -- - @[]@ to declare a range of characters to match in a path segment (e.g., @example.[0-9]@ to match on @example.0@, @example.1@, …)- -- - @[!...]@ to negate a range of characters to match in a path segment (e.g., @example.[!0-9]@ to match on @example.a@, @example.b@, but not @example.0@)- _globPattern :: Text,- -- | The kind of events of interest. If omitted it defaults- -- to WatchKind.Create | WatchKind.Change | WatchKind.Delete- -- which is 7.- _kind :: Maybe WatchKind- } deriving (Show, Read, Eq)--data WatchKind =- WatchKind {- -- | Watch for create events- _watchCreate :: Bool,- -- | Watch for change events- _watchChange :: Bool,- -- | Watch for delete events- _watchDelete :: Bool- } deriving (Show, Read, Eq)--instance ToJSON WatchKind where- toJSON wk = Number (createNum + changeNum + deleteNum)- where- createNum = if _watchCreate wk then 0x1 else 0x0- changeNum = if _watchChange wk then 0x2 else 0x0- deleteNum = if _watchDelete wk then 0x4 else 0x0--instance FromJSON WatchKind where- parseJSON (Number n)- | Right i <- floatingOrInteger n :: Either Double Int- , 0 <= i && i <= 7 =- pure $ WatchKind (testBit i 0x0) (testBit i 0x1) (testBit i 0x2)- | otherwise = fail "WatchKind"- parseJSON _ = fail "WatchKind"--deriveJSON lspOptions ''FileSystemWatcher-deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions--- | The file event type.-data FileChangeType = FcCreated -- ^ The file got created.- | FcChanged -- ^ The file got changed.- | FcDeleted -- ^ The file got deleted.- deriving (Read,Show,Eq)--instance ToJSON FileChangeType where- toJSON FcCreated = Number 1- toJSON FcChanged = Number 2- toJSON FcDeleted = Number 3--instance FromJSON FileChangeType where- parseJSON (Number 1) = pure FcCreated- parseJSON (Number 2) = pure FcChanged- parseJSON (Number 3) = pure FcDeleted- parseJSON _ = fail "FileChangetype"----- ----------------------------------------- | An event describing a file change.-data FileEvent =- FileEvent- { -- | The file's URI.- _uri :: Uri- -- | The change type.- , _xtype :: FileChangeType- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''FileEvent--data DidChangeWatchedFilesParams =- DidChangeWatchedFilesParams- { -- | The actual file events.- _changes :: List FileEvent- } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidChangeWatchedFilesParams
− src/Language/LSP/Types/Window.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Window where--import qualified Data.Aeson as A-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Utils-import Language.LSP.Types.Uri-import Language.LSP.Types.Location---- -----------------------------------------------------------------------data MessageType = MtError -- ^ Error = 1,- | MtWarning -- ^ Warning = 2,- | MtInfo -- ^ Info = 3,- | MtLog -- ^ Log = 4- deriving (Eq,Ord,Show,Read,Enum)--instance A.ToJSON MessageType where- toJSON MtError = A.Number 1- toJSON MtWarning = A.Number 2- toJSON MtInfo = A.Number 3- toJSON MtLog = A.Number 4--instance A.FromJSON MessageType where- parseJSON (A.Number 1) = pure MtError- parseJSON (A.Number 2) = pure MtWarning- parseJSON (A.Number 3) = pure MtInfo- parseJSON (A.Number 4) = pure MtLog- parseJSON _ = fail "MessageType"---- ------------------------------------------data ShowMessageParams =- ShowMessageParams {- _xtype :: MessageType- , _message :: Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowMessageParams---- -----------------------------------------------------------------------data MessageActionItem =- MessageActionItem- { _title :: Text- } deriving (Show,Read,Eq)--deriveJSON lspOptions ''MessageActionItem---data ShowMessageRequestParams =- ShowMessageRequestParams- { _xtype :: MessageType- , _message :: Text- , _actions :: Maybe [MessageActionItem]- } deriving (Show,Read,Eq)--deriveJSON lspOptions ''ShowMessageRequestParams---- ------------------------------------------------------------------------- | Params to show a document.------ @since 3.16.0-data ShowDocumentParams =- ShowDocumentParams {- -- | The document uri to show.- _uri :: Uri-- -- | Indicates to show the resource in an external program.- -- To show for example `https://code.visualstudio.com/`- -- in the default WEB browser set `external` to `true`.- , _external :: Maybe Bool-- -- | An optional property to indicate whether the editor- -- showing the document should take focus or not.- -- Clients might ignore this property if an external- -- program is started.- , _takeFocus :: Maybe Bool-- -- | An optional selection range if the document is a text- -- document. Clients might ignore the property if an- -- external program is started or the file is not a text- -- file.- , _selection :: Maybe Range- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentParams---- | The result of an show document request.------ @since 3.16.0-data ShowDocumentResult =- ShowDocumentResult {- -- | A boolean indicating if the show was successful.- _success :: Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentResult---- -----------------------------------------------------------------------data LogMessageParams =- LogMessageParams {- _xtype :: MessageType- , _message :: Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''LogMessageParams
− src/Language/LSP/Types/WorkspaceEdit.hs
@@ -1,404 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}--module Language.LSP.Types.WorkspaceEdit where--import Control.Monad (unless)-import Data.Aeson-import Data.Aeson.TH-import qualified Data.HashMap.Strict as H-import Data.Maybe (catMaybes)-import Data.Text (Text)-import qualified Data.Text as T-import Data.Hashable--import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---- -----------------------------------------------------------------------data TextEdit =- TextEdit- { _range :: Range- , _newText :: Text- } deriving (Show,Read,Eq)--deriveJSON lspOptions ''TextEdit---- -----------------------------------------------------------------------{-|-Additional information that describes document changes.--@since 3.16.0--}-data ChangeAnnotation =- ChangeAnnotation- { -- | A human-readable string describing the actual change. The string- -- is rendered prominent in the user interface.- _label :: Text- -- | A flag which indicates that user confirmation is needed- -- before applying the change.- , _needsConfirmation :: Maybe Bool- -- | A human-readable string which is rendered less prominent in- -- the user interface.- , _description :: Maybe Text- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ChangeAnnotation--{-|-An identifier referring to a change annotation managed by a workspace-edit.--@since 3.16.0--}-newtype ChangeAnnotationIdentifier = ChangeAnnotationIdentifierId Text- deriving (Show, Read, Eq, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Hashable)--makeExtendingDatatype "AnnotatedTextEdit" [''TextEdit]- [("_annotationId", [t| ChangeAnnotationIdentifier |]) ]-deriveJSON lspOptions ''AnnotatedTextEdit---- -----------------------------------------------------------------------data TextDocumentEdit =- TextDocumentEdit- { _textDocument :: VersionedTextDocumentIdentifier- , _edits :: List (TextEdit |? AnnotatedTextEdit)- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentEdit---- ------------------------------------------------------------------------- | Options to create a file.-data CreateFileOptions =- CreateFileOptions- { -- | Overwrite existing file. Overwrite wins over `ignoreIfExists`- _overwrite :: Maybe Bool- -- | Ignore if exists.- , _ignoreIfExists :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CreateFileOptions---- | Create file operation-data CreateFile =- CreateFile- { -- | The resource to create.- _uri :: Uri- -- | Additional options- , _options :: Maybe CreateFileOptions- -- | An optional annotation identifer describing the operation.- --- -- @since 3.16.0- , _annotationId :: Maybe ChangeAnnotationIdentifier- } deriving (Show, Read, Eq)--instance ToJSON CreateFile where- toJSON CreateFile{..} =- object $ catMaybes- [ Just $ "kind" .= ("create" :: Text)- , Just $ "uri" .= _uri- , ("options" .=) <$> _options- , ("annotationId" .=) <$> _annotationId- ]--instance FromJSON CreateFile where- parseJSON = withObject "CreateFile" $ \o -> do- kind <- o .: "kind"- unless (kind == ("create" :: Text)) - $ fail $ "Expected kind \"create\" but got " ++ show kind- _uri <- o .: "uri"- _options <- o .:? "options"- _annotationId <- o .:? "annotationId"- pure CreateFile{..}---- Rename file options-data RenameFileOptions =- RenameFileOptions- { -- | Overwrite target if existing. Overwrite wins over `ignoreIfExists`- _overwrite :: Maybe Bool- -- | Ignores if target exists.- , _ignoreIfExists :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RenameFileOptions---- | Rename file operation-data RenameFile =- RenameFile- { -- | The old (existing) location.- _oldUri :: Uri- -- | The new location.- , _newUri :: Uri- -- | Rename options.- , _options :: Maybe RenameFileOptions- -- | An optional annotation identifer describing the operation.- --- -- @since 3.16.0- , _annotationId :: Maybe ChangeAnnotationIdentifier- } deriving (Show, Read, Eq)--instance ToJSON RenameFile where- toJSON RenameFile{..} =- object $ catMaybes- [ Just $ "kind" .= ("rename" :: Text)- , Just $ "oldUri" .= _oldUri- , Just $ "newUri" .= _newUri- , ("options" .=) <$> _options- , ("annotationId" .=) <$> _annotationId- ]--instance FromJSON RenameFile where- parseJSON = withObject "RenameFile" $ \o -> do- kind <- o .: "kind"- unless (kind == ("rename" :: Text)) - $ fail $ "Expected kind \"rename\" but got " ++ show kind- _oldUri <- o .: "oldUri"- _newUri <- o .: "newUri"- _options <- o .:? "options"- _annotationId <- o .:? "annotationId"- pure RenameFile{..}---- Delete file options-data DeleteFileOptions =- DeleteFileOptions- { -- | Delete the content recursively if a folder is denoted.- _recursive :: Maybe Bool- -- | Ignore the operation if the file doesn't exist.- , _ignoreIfNotExists :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DeleteFileOptions---- | Delete file operation-data DeleteFile =- DeleteFile- { -- | The file to delete.- _uri :: Uri- -- | Delete options.- , _options :: Maybe DeleteFileOptions- -- | An optional annotation identifer describing the operation.- --- -- @since 3.16.0- , _annotationId :: Maybe ChangeAnnotationIdentifier- } deriving (Show, Read, Eq)--instance ToJSON DeleteFile where- toJSON DeleteFile{..} =- object $ catMaybes- [ Just $ "kind" .= ("delete" :: Text)- , Just $ "uri" .= _uri- , ("options" .=) <$> _options- , ("annotationId" .=) <$> _annotationId- ]--instance FromJSON DeleteFile where- parseJSON = withObject "DeleteFile" $ \o -> do- kind <- o .: "kind"- unless (kind == ("delete" :: Text)) - $ fail $ "Expected kind \"delete\" but got " ++ show kind- _uri <- o .: "uri"- _options <- o .:? "options"- _annotationId <- o .:? "annotationId"- pure DeleteFile{..}---- ------------------------------------------------------------------------- | `TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile` is a bit mouthful, here's the synonym-type DocumentChange = TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile---- -----------------------------------------------------------------------type WorkspaceEditMap = H.HashMap Uri (List TextEdit)-type ChangeAnnotationMap = H.HashMap ChangeAnnotationIdentifier ChangeAnnotation--data WorkspaceEdit =- WorkspaceEdit- {- -- | Holds changes to existing resources.- _changes :: Maybe WorkspaceEditMap- -- | Depending on the client capability- -- `workspace.workspaceEdit.resourceOperations` document changes are either- -- an array of `TextDocumentEdit`s to express changes to n different text- -- documents where each text document edit addresses a specific version of- -- a text document. Or it can contain above `TextDocumentEdit`s mixed with- -- create, rename and delete file / folder operations.- --- -- Whether a client supports versioned document edits is expressed via- -- `workspace.workspaceEdit.documentChanges` client capability.- --- -- If a client neither supports `documentChanges` nor- -- `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s- -- using the `changes` property are supported.- , _documentChanges :: Maybe (List DocumentChange)- -- | A map of change annotations that can be referenced in- -- `AnnotatedTextEdit`s or create, rename and delete file / folder- -- operations.- --- -- Whether clients honor this property depends on the client capability- -- `workspace.changeAnnotationSupport`.- --- -- @since 3.16.0- , _changeAnnotations :: Maybe ChangeAnnotationMap- } deriving (Show, Read, Eq)--instance Semigroup WorkspaceEdit where- (WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')-instance Monoid WorkspaceEdit where- mempty = WorkspaceEdit Nothing Nothing Nothing--deriveJSON lspOptions ''WorkspaceEdit---- ---------------------------------------data ResourceOperationKind- = ResourceOperationCreate -- ^ Supports creating new files and folders.- | ResourceOperationRename -- ^ Supports renaming existing files and folders.- | ResourceOperationDelete -- ^ Supports deleting existing files and folders.- deriving (Read, Show, Eq)- -instance ToJSON ResourceOperationKind where- toJSON ResourceOperationCreate = String "create"- toJSON ResourceOperationRename = String "rename"- toJSON ResourceOperationDelete = String "delete"--instance FromJSON ResourceOperationKind where- parseJSON (String "create") = pure ResourceOperationCreate- parseJSON (String "rename") = pure ResourceOperationRename- parseJSON (String "delete") = pure ResourceOperationDelete- parseJSON _ = fail "ResourceOperationKind"--data FailureHandlingKind- = FailureHandlingAbort -- ^ Applying the workspace change is simply aborted if one of the changes provided fails. All operations executed before the failing operation stay executed.- | FailureHandlingTransactional -- ^ All operations are executed transactional. That means they either all succeed or no changes at all are applied to the workspace.- | FailureHandlingTextOnlyTransactional -- ^ If the workspace edit contains only textual file changes they are executed transactional. If resource changes (create, rename or delete file) are part of the change the failure handling strategy is abort.- | FailureHandlingUndo -- ^ The client tries to undo the operations already executed. But there is no guarantee that this is succeeding.- deriving (Read, Show, Eq)- -instance ToJSON FailureHandlingKind where- toJSON FailureHandlingAbort = String "abort"- toJSON FailureHandlingTransactional = String "transactional"- toJSON FailureHandlingTextOnlyTransactional = String "textOnlyTransactional"- toJSON FailureHandlingUndo = String "undo"--instance FromJSON FailureHandlingKind where- parseJSON (String "abort") = pure FailureHandlingAbort- parseJSON (String "transactional") = pure FailureHandlingTransactional- parseJSON (String "textOnlyTransactional") = pure FailureHandlingTextOnlyTransactional- parseJSON (String "undo") = pure FailureHandlingUndo- parseJSON _ = fail "FailureHandlingKind"--data WorkspaceEditChangeAnnotationClientCapabilities =- WorkspaceEditChangeAnnotationClientCapabilities- {- -- | Whether the client groups edits with equal labels into tree nodes,- -- for instance all edits labelled with "Changes in Strings" would- -- be a tree node.- groupsOnLabel :: Maybe Bool- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceEditChangeAnnotationClientCapabilities--data WorkspaceEditClientCapabilities =- WorkspaceEditClientCapabilities- { _documentChanges :: Maybe Bool -- ^The client supports versioned document- -- changes in 'WorkspaceEdit's- -- | The resource operations the client supports. Clients should at least- -- support @create@, @rename@ and @delete@ files and folders.- , _resourceOperations :: Maybe (List ResourceOperationKind)- -- | The failure handling strategy of a client if applying the workspace edit- -- fails.- , _failureHandling :: Maybe FailureHandlingKind- -- | Whether the client normalizes line endings to the client specific- -- setting.- --- -- If set to `true` the client will normalize line ending characters- -- in a workspace edit to the client specific new line character(s).- --- -- @since 3.16.0- , _normalizesLineEndings :: Maybe Bool- -- | Whether the client in general supports change annotations on text edits,- -- create file, rename file and delete file changes.- --- -- @since 3.16.0- , _changeAnnotationSupport :: Maybe WorkspaceEditChangeAnnotationClientCapabilities- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceEditClientCapabilities---- -----------------------------------------------------------------------data ApplyWorkspaceEditParams =- ApplyWorkspaceEditParams- { -- | An optional label of the workspace edit. This label is- -- presented in the user interface for example on an undo- -- stack to undo the workspace edit.- _label :: Maybe Text- -- | The edits to apply- , _edit :: WorkspaceEdit- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ApplyWorkspaceEditParams--data ApplyWorkspaceEditResponseBody =- ApplyWorkspaceEditResponseBody- { -- | Indicates whether the edit was applied or not.- _applied :: Bool- -- | An optional textual description for why the edit was not applied.- -- This may be used may be used by the server for diagnostic- -- logging or to provide a suitable error for a request that- -- triggered the edit.- , _failureReason :: Maybe Text- -- | Depending on the client's failure handling strategy `failedChange`- -- might contain the index of the change that failed. This property is- -- only available if the client signals a `failureHandling` strategy- -- in its client capabilities.- , _failedChange :: Maybe UInt- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ApplyWorkspaceEditResponseBody---- ------------------------------------------------------------------------- | Applies a 'TextEdit' to some 'Text'.--- >>> applyTextEdit (TextEdit (Range (Position 0 1) (Position 0 2)) "i") "foo"--- "fio"-applyTextEdit :: TextEdit -> Text -> Text-applyTextEdit (TextEdit (Range sp ep) newText) oldText =- let (_, afterEnd) = splitAtPos ep oldText- (beforeStart, _) = splitAtPos sp oldText- in mconcat [beforeStart, newText, afterEnd]- where- splitAtPos :: Position -> Text -> (Text, Text)- splitAtPos (Position sl sc) t =- -- If we are looking for a line beyond the end of the text, this will give us an index- -- past the end. Fortunately, T.splitAt is fine with this, and just gives us the whole- -- string and an empty string, which is what we want.- let index = sc + startLineIndex sl t- in T.splitAt (fromIntegral index) t-- -- The index of the first character of line 'line'- startLineIndex :: UInt -> Text -> UInt- startLineIndex 0 _ = 0- startLineIndex line t' =- case T.findIndex (== '\n') t' of- Just i -> fromIntegral i + 1 + startLineIndex (line - 1) (T.drop (i + 1) t')- -- i != 0, and there are no newlines, so this is a line beyond the end of the text.- -- In this case give the "start index" as the end, so we will at least append the text.- Nothing -> fromIntegral $ T.length t'---- | 'editTextEdit' @outer@ @inner@ applies @inner@ to the text inside @outer@.-editTextEdit :: TextEdit -> TextEdit -> TextEdit-editTextEdit (TextEdit origRange origText) innerEdit =- let newText = applyTextEdit innerEdit origText- in TextEdit origRange newText
− src/Language/LSP/Types/WorkspaceFolders.hs
@@ -1,37 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.WorkspaceFolders where--import Data.Aeson.TH-import Data.Text ( Text )--import Language.LSP.Types.Common-import Language.LSP.Types.Utils--data WorkspaceFolder =- WorkspaceFolder- { -- | The URI of the workspace folder.- _uri :: Text- -- | The name of the workspace folder. Defaults to the uri's basename.- , _name :: Text- } deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkspaceFolder---- | The workspace folder change event.-data WorkspaceFoldersChangeEvent =- WorkspaceFoldersChangeEvent- { _added :: List WorkspaceFolder -- ^ The array of added workspace folders- , _removed :: List WorkspaceFolder -- ^ The array of the removed workspace folders- } deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkspaceFoldersChangeEvent--data DidChangeWorkspaceFoldersParams = - DidChangeWorkspaceFoldersParams- { _event :: WorkspaceFoldersChangeEvent- -- ^ The actual workspace folder change event.- } deriving (Read, Show, Eq)--deriveJSON lspOptions ''DidChangeWorkspaceFoldersParams-
− src/Language/LSP/Types/WorkspaceSymbol.hs
@@ -1,91 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.WorkspaceSymbol where--import Data.Aeson.TH-import Data.Default-import Language.LSP.Types.Common-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils-import Data.Text (Text)--data WorkspaceSymbolKindClientCapabilities =- WorkspaceSymbolKindClientCapabilities- { -- | The symbol kind values the client supports. When this- -- property exists the client also guarantees that it will- -- handle values outside its set gracefully and falls back- -- to a default value when unknown.- --- -- If this property is not present the client only supports- -- the symbol kinds from `File` to `Array` as defined in- -- the initial version of the protocol.- _valueSet :: Maybe (List SymbolKind)- } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolKindClientCapabilities--data WorkspaceSymbolTagClientCapabilities =- WorkspaceSymbolTagClientCapabilities- { -- | The tags supported by the client.- _valueSet :: Maybe (List SymbolTag)- }- deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolTagClientCapabilities--instance Default WorkspaceSymbolKindClientCapabilities where- def = WorkspaceSymbolKindClientCapabilities (Just $ List allKinds)- where allKinds = [ SkFile- , SkModule- , SkNamespace- , SkPackage- , SkClass- , SkMethod- , SkProperty- , SkField- , SkConstructor- , SkEnum- , SkInterface- , SkFunction- , SkVariable- , SkConstant- , SkString- , SkNumber- , SkBoolean- , SkArray- ]--data WorkspaceSymbolClientCapabilities =- WorkspaceSymbolClientCapabilities- { _dynamicRegistration :: Maybe Bool -- ^Symbol request supports dynamic- -- registration.- , _symbolKind :: Maybe WorkspaceSymbolKindClientCapabilities -- ^ Specific capabilities for the `SymbolKind`.- -- | The client supports tags on `SymbolInformation`.- -- Clients supporting tags have to handle unknown tags gracefully.- --- -- @since 3.16.0- , _tagSupport :: Maybe WorkspaceSymbolTagClientCapabilities - } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolClientCapabilities---- ---------------------------------------makeExtendingDatatype "WorkspaceSymbolOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''WorkspaceSymbolOptions--makeExtendingDatatype "WorkspaceSymbolRegistrationOptions"- [''WorkspaceSymbolOptions] []-deriveJSON lspOptions ''WorkspaceSymbolRegistrationOptions---- ---------------------------------------makeExtendingDatatype "WorkspaceSymbolParams"- [ ''WorkDoneProgressParams- , ''PartialResultParams- ]- [("_query", [t| Text |])]--deriveJSON lspOptions ''WorkspaceSymbolParams
test/CapabilitiesSpec.hs view
@@ -1,16 +1,11 @@ module CapabilitiesSpec where -import Language.LSP.Types-import Language.LSP.Types.Capabilities+import Language.LSP.Protocol.Capabilities+import Prettyprinter import Test.Hspec+import Test.Hspec.Golden spec :: Spec spec = describe "capabilities" $ do- it "gives 3.10 capabilities" $- let ClientCapabilities _ (Just tdcs) _ _ _ = capsForVersion (LSPVersion 3 10)- Just (DocumentSymbolClientCapabilities _ _ mHierarchical _ _ ) = _documentSymbol tdcs- in mHierarchical `shouldBe` Just True- it "gives pre 3.10 capabilities" $- let ClientCapabilities _ (Just tdcs) _ _ _ = capsForVersion (LSPVersion 3 9)- Just (DocumentSymbolClientCapabilities _ _ mHierarchical _ _) = _documentSymbol tdcs- in mHierarchical `shouldBe` Nothing+ it "produces full latest client capabilities" $ defaultGolden "fullCaps" $ show $ pretty fullLatestClientCaps+ it "produces pre-3.10 client capabilities" $ defaultGolden "oldCaps" $ show $ pretty $ fullClientCapsForVersion (LSPVersion 3 9)
test/JsonSpec.hs view
@@ -1,173 +1,106 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeSynonymInstances #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}--- For the use of MarkedString+-- we're using some deprecated stuff from the LSP spec, that's fine {-# OPTIONS_GHC -fno-warn-deprecations #-}+ -- | Test for JSON serialization module JsonSpec where -import Language.LSP.Types+import Language.LSP.Protocol.Message+import Language.LSP.Protocol.Types -import qualified Data.Aeson as J-import Data.List(isPrefixOf)-import Test.Hspec-import Test.Hspec.QuickCheck-import Test.QuickCheck hiding (Success)-import Test.QuickCheck.Instances ()+import Language.LSP.Protocol.QuickCheck () --- import Debug.Trace--- ---------------------------------------------------------------------+import Data.Aeson qualified as J+import Data.List (isPrefixOf)+import Test.Hspec+import Test.Hspec.QuickCheck+import Test.QuickCheck hiding (Success)+import Test.QuickCheck.Instances () -{-# ANN module ("HLint: ignore Redundant do" :: String) #-}+-- --------------------------------------------------------------------- -main :: IO ()-main = hspec spec+{-# ANN module ("HLint: ignore Redundant do" :: String) #-} spec :: Spec spec = do- describe "dispatcher" jsonSpec- describe "ResponseMessage" responseMessageSpec+ describe "MarkedString" $ do+ prop "roundtrip" (propertyJsonRoundtrip :: MarkedString -> Property) --- ---------------------------------------------------------------------+ describe "MarkupContent" $ do+ prop "roundtrip" (propertyJsonRoundtrip :: MarkupContent -> Property) -jsonSpec :: Spec-jsonSpec = do- describe "General JSON instances round trip" $ do- -- DataTypesJSON- prop "LanguageString" (propertyJsonRoundtrip :: LanguageString -> Property)- prop "MarkedString" (propertyJsonRoundtrip :: MarkedString -> Property)- prop "MarkupContent" (propertyJsonRoundtrip :: MarkupContent -> Property)- prop "HoverContents" (propertyJsonRoundtrip :: HoverContents -> Property)- prop "ResponseError" (propertyJsonRoundtrip :: ResponseError -> Property)- prop "WatchedFiles" (propertyJsonRoundtrip :: DidChangeWatchedFilesRegistrationOptions -> Property)- prop "ResponseMessage Initialize"- (propertyJsonRoundtrip :: ResponseMessage 'TextDocumentHover -> Property)- -- prop "ResponseMessage JSON value"- -- (propertyJsonRoundtrip :: ResponseMessage J.Value -> Property)- describe "JSON decoding regressions" $- it "CompletionItem" $- (J.decode "{\"jsonrpc\":\"2.0\",\"result\":[{\"label\":\"raisebox\"}],\"id\":1}" :: Maybe (ResponseMessage 'TextDocumentCompletion))- `shouldNotBe` Nothing+ describe "TextDocumentContentChangeEvent" $ do+ prop "roundtrip" (propertyJsonRoundtrip :: TextDocumentContentChangeEvent -> Property) + describe "WatchedFiles" $ do+ prop "roundtrip" (propertyJsonRoundtrip :: DidChangeWatchedFilesRegistrationOptions -> Property) -responseMessageSpec :: Spec-responseMessageSpec = do- describe "edge cases" $ do- it "decodes result = null" $ do- let input = "{\"jsonrpc\": \"2.0\", \"id\": 123, \"result\": null}"- in J.decode input `shouldBe` Just- ((ResponseMessage "2.0" (Just (IdInt 123)) (Right J.Null)) :: ResponseMessage 'WorkspaceExecuteCommand)+ describe "Registration" $ do+ -- Registration has a 'Maybe Value' field, so this test checks that 'Maybe Null' roundtrips properly+ prop "roundtrip" (propertyJsonRoundtrip :: Registration -> Property)++ describe "CompletionList" $ do+ it "handles optional field set to null in record" $ do+ J.eitherDecode "{ \"isIncomplete\" : true, \"itemDefaults\" : { \"data\" : null }, \"items\": [] }"+ `shouldBe` Right+ ( CompletionList+ True+ (Just (CompletionItemDefaults{_commitCharacters = Nothing, _editRange = Nothing, _insertTextFormat = Nothing, _insertTextMode = Nothing, _data_ = Just J.Null}))+ mempty+ )++ describe "CompletionItem" $ do+ it "example" $+ (J.decode "{\"jsonrpc\":\"2.0\",\"result\":[{\"label\":\"raisebox\"}],\"id\":1}" :: Maybe (TResponseMessage 'Method_TextDocumentCompletion))+ `shouldNotBe` Nothing++ describe "RequestMessage" $ do it "handles missing params field" $ do J.eitherDecode "{ \"jsonrpc\": \"2.0\", \"id\": 15, \"method\": \"shutdown\"}"- `shouldBe` Right (RequestMessage "2.0" (IdInt 15) SShutdown Empty)- describe "invalid JSON" $ do+ `shouldBe` Right (TRequestMessage "2.0" (IdInt 15) SMethod_Shutdown Nothing)+ -- The 'params' field on a RequestMessage is optional _and_ null is _not_ a valid value. Check that we correctly parse null as 'Nothing'+ it "handles params field set to null" $ do+ J.eitherDecode "{ \"jsonrpc\": \"2.0\", \"id\": 15, \"method\": \"shutdown\", \"params\": null }"+ `shouldBe` Right (TRequestMessage "2.0" (IdInt 15) SMethod_Shutdown Nothing)++ describe "ResponseMessage" $ do+ prop+ "Hover roundtrip"+ (propertyJsonRoundtrip :: TResponseMessage 'Method_TextDocumentHover -> Property)+ -- The 'data' field on a ResponseError is optional _and_ null is a valid value. Check that we correctly parse null as 'Just Null'+ it "decodes error data = null" $ do+ let input = "{\"jsonrpc\": \"2.0\", \"id\": 123, \"error\": { \"code\": -32700, \"message\": \"oh no\", \"data\": null }}"+ in J.decode input+ `shouldBe` Just+ ( (TResponseMessage "2.0" (Just (IdInt 123)) (Left $ TResponseError (InR ErrorCodes_ParseError) "oh no" (Just J.Null))) ::+ TResponseMessage ('Method_CustomMethod "hello")+ ) it "throws if neither result nor error is present" $ do- (J.eitherDecode "{\"jsonrpc\":\"2.0\",\"id\":1}" :: Either String (ResponseMessage 'Initialize))+ (J.eitherDecode "{\"jsonrpc\":\"2.0\",\"id\":1}" :: Either String (TResponseMessage 'Method_Initialize)) `shouldBe` Left ("Error in $: both error and result cannot be Nothing") it "throws if both result and error are present" $ do- (J.eitherDecode- "{\"jsonrpc\":\"2.0\",\"id\": 1,\"result\":{\"capabilities\": {}},\"error\":{\"code\":-32700,\"message\":\"\",\"data\":null}}"- :: Either String (ResponseMessage 'Initialize))- `shouldSatisfy`- (either (\err -> "Error in $: both error and result cannot be present" `isPrefixOf` err) (\_ -> False))+ ( J.eitherDecode+ "{\"jsonrpc\":\"2.0\",\"id\": 1,\"result\":{\"capabilities\": {}},\"error\":{\"code\":-32700,\"message\":\"\",\"data\":{ \"retry\":false}}}" ::+ Either String (TResponseMessage 'Method_Initialize)+ )+ `shouldSatisfy` (either (\err -> "Error in $: both error and result cannot be present" `isPrefixOf` err) (\_ -> False))+ it "decodes result = null" $ do+ let input = "{\"jsonrpc\": \"2.0\", \"id\": 123, \"result\": null}"+ in J.decode input+ `shouldBe` Just+ ((TResponseMessage "2.0" (Just (IdInt 123)) (Right $ InL J.Null)) :: TResponseMessage 'Method_WorkspaceExecuteCommand) + describe "NotificationMessage" $ do+ it "handles missing params field" $ do+ J.eitherDecode "{ \"jsonrpc\": \"2.0\", \"method\": \"exit\"}"+ `shouldBe` Right (TNotificationMessage "2.0" SMethod_Exit Nothing)+ -- --------------------------------------------------------------------- propertyJsonRoundtrip :: (Eq a, Show a, J.ToJSON a, J.FromJSON a) => a -> Property propertyJsonRoundtrip a = J.Success a === J.fromJSON (J.toJSON a)---- -----------------------------------------------------------------------instance Arbitrary LanguageString where- arbitrary = LanguageString <$> arbitrary <*> arbitrary--instance Arbitrary MarkedString where- arbitrary = oneof [PlainString <$> arbitrary, CodeString <$> arbitrary]--instance Arbitrary MarkupContent where- arbitrary = MarkupContent <$> arbitrary <*> arbitrary--instance Arbitrary MarkupKind where- arbitrary = oneof [pure MkPlainText,pure MkMarkdown]--instance Arbitrary HoverContents where- arbitrary = oneof [ HoverContentsMS <$> arbitrary- , HoverContents <$> arbitrary- ]--instance Arbitrary UInt where- arbitrary = fromInteger <$> arbitrary--instance Arbitrary Uri where- arbitrary = Uri <$> arbitrary--instance Arbitrary Position where- arbitrary = Position <$> arbitrary <*> arbitrary--instance Arbitrary Location where- arbitrary = Location <$> arbitrary <*> arbitrary--instance Arbitrary Range where- arbitrary = Range <$> arbitrary <*> arbitrary--instance Arbitrary Hover where- arbitrary = Hover <$> arbitrary <*> arbitrary--instance Arbitrary (ResponseResult m) => Arbitrary (ResponseMessage m) where- arbitrary =- oneof- [ ResponseMessage- <$> arbitrary- <*> arbitrary- <*> (Right <$> arbitrary)- , ResponseMessage- <$> arbitrary- <*> arbitrary- <*> (Left <$> arbitrary)- ]--instance Arbitrary (LspId m) where- arbitrary = oneof [IdInt <$> arbitrary, IdString <$> arbitrary]--instance Arbitrary ResponseError where- arbitrary = ResponseError <$> arbitrary <*> arbitrary <*> pure Nothing--instance Arbitrary ErrorCode where- arbitrary =- elements- [ ParseError- , InvalidRequest- , MethodNotFound- , InvalidParams- , InternalError- , ServerErrorStart- , ServerErrorEnd- , ServerNotInitialized- , UnknownErrorCode- , RequestCancelled- , ContentModified- ]---- | make lists of maximum length 3 for test performance-smallList :: Gen a -> Gen [a]-smallList = resize 3 . listOf--instance (Arbitrary a) => Arbitrary (List a) where- arbitrary = List <$> arbitrary---- -----------------------------------------------------------------------instance Arbitrary DidChangeWatchedFilesRegistrationOptions where- arbitrary = DidChangeWatchedFilesRegistrationOptions <$> arbitrary--instance Arbitrary FileSystemWatcher where- arbitrary = FileSystemWatcher <$> arbitrary <*> arbitrary--instance Arbitrary WatchKind where- arbitrary = WatchKind <$> arbitrary <*> arbitrary <*> arbitrary---- ---------------------------------------------------------------------
test/LocationSpec.hs view
@@ -2,8 +2,8 @@ module LocationSpec where -import Language.LSP.Types-import Test.Hspec+import Language.LSP.Protocol.Types+import Test.Hspec main :: IO () main = hspec spec
test/Main.hs view
@@ -1,7 +1,7 @@ module Main where +import Spec qualified import Test.Hspec.Runner-import qualified Spec main :: IO () main = hspec Spec.spec
test/MethodSpec.hs view
@@ -1,12 +1,13 @@-{-# LANGUAGE OverloadedStrings, DataKinds #-}-module MethodSpec where+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE OverloadedStrings #-} +module MethodSpec where -import Control.Monad-import qualified Data.Aeson as J-import qualified Language.LSP.Types as J-import Test.Hspec-import qualified Data.Text as T+import Control.Monad+import Data.Aeson qualified as J+import Data.Text qualified as T+import Language.LSP.Protocol.Message qualified as J+import Test.Hspec -- --------------------------------------------------------------------- @@ -19,68 +20,68 @@ -- --------------------------------------------------------------------- clientMethods :: [T.Text]-clientMethods = [- -- General- "initialize"- ,"initialized"- ,"shutdown"- ,"exit"- ,"$/cancelRequest"- -- Workspace- ,"workspace/didChangeConfiguration"- ,"workspace/didChangeWatchedFiles"- ,"workspace/symbol"- ,"workspace/executeCommand"- ,"workspace/semanticTokens/refresh"- -- Document- ,"textDocument/didOpen"- ,"textDocument/didChange"- ,"textDocument/willSave"- ,"textDocument/willSaveWaitUntil"- ,"textDocument/didSave"- ,"textDocument/didClose"- ,"textDocument/completion"- ,"completionItem/resolve"- ,"textDocument/hover"- ,"textDocument/signatureHelp"- ,"textDocument/references"- ,"textDocument/documentHighlight"- ,"textDocument/documentSymbol"- ,"textDocument/formatting"- ,"textDocument/rangeFormatting"- ,"textDocument/onTypeFormatting"- ,"textDocument/definition"- ,"textDocument/codeAction"- ,"textDocument/codeLens"- ,"codeLens/resolve"- ,"textDocument/documentLink"- ,"documentLink/resolve"- ,"textDocument/rename"- ,"textDocument/prepareRename"- ,"textDocument/prepareCallHierarchy"- ,"callHierarchy/incomingCalls"- ,"callHierarchy/outgoingCalls"-- ,"textDocument/semanticTokens"- ,"textDocument/semanticTokens/full"- ,"textDocument/semanticTokens/full/delta"- ,"textDocument/semanticTokens/range"+clientMethods =+ [ -- General+ "initialize"+ , "initialized"+ , "shutdown"+ , "exit"+ , "$/cancelRequest"+ , -- Workspace+ "workspace/didChangeConfiguration"+ , "workspace/didChangeWatchedFiles"+ , "workspace/symbol"+ , "workspace/executeCommand"+ , -- Document+ "textDocument/didOpen"+ , "textDocument/didChange"+ , "textDocument/willSave"+ , "textDocument/willSaveWaitUntil"+ , "textDocument/didSave"+ , "textDocument/didClose"+ , "textDocument/completion"+ , "completionItem/resolve"+ , "textDocument/hover"+ , "textDocument/signatureHelp"+ , "textDocument/references"+ , "textDocument/documentHighlight"+ , "textDocument/documentSymbol"+ , "textDocument/formatting"+ , "textDocument/rangeFormatting"+ , "textDocument/onTypeFormatting"+ , "textDocument/definition"+ , "textDocument/codeAction"+ , "textDocument/codeLens"+ , "codeLens/resolve"+ , "textDocument/documentLink"+ , "documentLink/resolve"+ , "textDocument/rename"+ , "textDocument/prepareRename"+ , "textDocument/prepareCallHierarchy"+ , "callHierarchy/incomingCalls"+ , "callHierarchy/outgoingCalls"+ , -- FIXME: weird method+ -- ,"textDocument/semanticTokens"+ "textDocument/semanticTokens/full"+ , "textDocument/semanticTokens/full/delta"+ , "textDocument/semanticTokens/range" ] serverMethods :: [T.Text]-serverMethods = [- -- Window- "window/showMessage"- ,"window/showMessageRequest"- ,"window/logMessage"- ,"telemetry/event"- -- Client- ,"client/registerCapability"- ,"client/unregisterCapability"- -- Workspace- ,"workspace/applyEdit"- -- Document- ,"textDocument/publishDiagnostics"+serverMethods =+ [ -- Window+ "window/showMessage"+ , "window/showMessageRequest"+ , "window/logMessage"+ , "telemetry/event"+ , -- Client+ "client/registerCapability"+ , "client/unregisterCapability"+ , -- Workspace+ "workspace/applyEdit"+ , "workspace/semanticTokens/refresh"+ , -- Document+ "textDocument/publishDiagnostics" ] diagnosticsSpec :: Spec@@ -96,4 +97,4 @@ (J.toJSON <$> (J.fromJSON (J.String m) :: J.Result (J.SomeServerMethod))) `shouldBe` (J.Success $ J.String m) - -- ---------------------------------+-- ---------------------------------
test/SemanticTokensSpec.hs view
@@ -1,44 +1,49 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+ module SemanticTokensSpec where -import Test.Hspec-import Language.LSP.Types-import Data.List (unfoldr) import Data.Either (isRight)+import Data.List (unfoldr)+import Language.LSP.Protocol.Types+import Test.Hspec spec :: Spec spec = do- let exampleLegend = SemanticTokensLegend (List [SttProperty, SttType, SttClass]) (List [StmUnknown "private", StmStatic])- exampleTokens1 = [- SemanticTokenAbsolute 2 5 3 SttProperty [StmUnknown "private", StmStatic]- , SemanticTokenAbsolute 2 10 4 SttType []- , SemanticTokenAbsolute 5 2 7 SttClass []- ]- exampleTokens2 = [- SemanticTokenAbsolute 3 5 3 SttProperty [StmUnknown "private", StmStatic]- , SemanticTokenAbsolute 3 10 4 SttType []- , SemanticTokenAbsolute 6 2 7 SttClass []- ]+ let+ allMods = [SemanticTokenModifiers_Abstract, SemanticTokenModifiers_Static]+ exampleLegend =+ SemanticTokensLegend+ (fmap toEnumBaseType [SemanticTokenTypes_Property, SemanticTokenTypes_Type, SemanticTokenTypes_Class])+ (fmap toEnumBaseType allMods)+ exampleTokens1 =+ [ SemanticTokenAbsolute 2 5 3 SemanticTokenTypes_Property allMods+ , SemanticTokenAbsolute 2 10 4 SemanticTokenTypes_Type []+ , SemanticTokenAbsolute 5 2 7 SemanticTokenTypes_Class []+ ]+ exampleTokens2 =+ [ SemanticTokenAbsolute 3 5 3 SemanticTokenTypes_Property allMods+ , SemanticTokenAbsolute 3 10 4 SemanticTokenTypes_Type []+ , SemanticTokenAbsolute 6 2 7 SemanticTokenTypes_Class []+ ] - bigNumber :: UInt- bigNumber = 100000- bigTokens =- unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenAbsolute i 1 1 SttType [StmUnknown "private", StmStatic], i+1)) 0- -- Relativized version of bigTokens- bigTokensRel =- unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenRelative (if i == 0 then 0 else 1) 1 1 SttType [StmUnknown "private", StmStatic], i+1)) 0+ bigNumber :: UInt+ bigNumber = 100000+ bigTokens =+ unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenAbsolute i 1 1 SemanticTokenTypes_Type allMods, i + 1)) 0+ -- Relativized version of bigTokens+ bigTokensRel =+ unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenRelative (if i == 0 then 0 else 1) 1 1 SemanticTokenTypes_Type allMods, i + 1)) 0 - -- One more order of magnitude makes diffing more-or-less hang - possibly we need a better diffing algorithm, since this is only ~= 200 tokens at 5 ints per token- -- (I checked and it is the diffing that's slow, not turning it into edits)- smallerBigNumber :: UInt- smallerBigNumber = 1000- bigInts :: [UInt]- bigInts =- unfoldr (\i -> if i == smallerBigNumber then Nothing else Just (1, i+1)) 0- bigInts2 :: [UInt]- bigInts2 =- unfoldr (\i -> if i == smallerBigNumber then Nothing else Just (if even i then 2 else 1, i+1)) 0+ -- One more order of magnitude makes diffing more-or-less hang - possibly we need a better diffing algorithm, since this is only ~= 200 tokens at 5 ints per token+ -- (I checked and it is the diffing that's slow, not turning it into edits)+ smallerBigNumber :: UInt+ smallerBigNumber = 1000+ bigInts :: [UInt]+ bigInts =+ unfoldr (\i -> if i == smallerBigNumber then Nothing else Just (1, i + 1)) 0+ bigInts2 :: [UInt]+ bigInts2 =+ unfoldr (\i -> if i == smallerBigNumber then Nothing else Just (if even i then 2 else 1, i + 1)) 0 describe "relativize/absolutizeTokens" $ do it "round-trips" $ do@@ -50,25 +55,25 @@ context "when running the LSP examples" $ do it "encodes example 1 correctly" $ let encoded = encodeTokens exampleLegend (relativizeTokens exampleTokens1)- in encoded `shouldBe` Right [{- token 1 -}2,5,3,0,3,{- token 2 -}0,5,4,1,0,{- token 3 -}3,2,7,2,0]+ in encoded `shouldBe` Right [{- token 1 -} 2, 5, 3, 0, 3 {- token 2 -}, 0, 5, 4, 1, 0 {- token 3 -}, 3, 2, 7, 2, 0] it "encodes example 2 correctly" $ let encoded = encodeTokens exampleLegend (relativizeTokens exampleTokens2)- in encoded `shouldBe` Right [{- token 1 -}3,5,3,0,3,{- token 2 -}0,5,4,1,0,{- token 3 -}3,2,7,2,0]+ in encoded `shouldBe` Right [{- token 1 -} 3, 5, 3, 0, 3 {- token 2 -}, 0, 5, 4, 1, 0 {- token 3 -}, 3, 2, 7, 2, 0] it "handles big tokens" $ encodeTokens exampleLegend bigTokensRel `shouldSatisfy` isRight describe "computeEdits" $ do it "handles an edit in the middle" $- computeEdits @Int [1,2,3] [1,4,5,3] `shouldBe` [Edit 1 1 [4,5]]+ computeEdits @Int [1, 2, 3] [1, 4, 5, 3] `shouldBe` [Edit 1 1 [4, 5]] it "handles an edit at the end" $- computeEdits @Int [1,2,3] [1,2,4,5] `shouldBe` [Edit 2 1 [4,5]]+ computeEdits @Int [1, 2, 3] [1, 2, 4, 5] `shouldBe` [Edit 2 1 [4, 5]] it "handles an edit at the beginning" $- computeEdits @Int [1,2,3] [4,5,2,3] `shouldBe` [Edit 0 1 [4,5]]+ computeEdits @Int [1, 2, 3] [4, 5, 2, 3] `shouldBe` [Edit 0 1 [4, 5]] it "handles an ambiguous edit" $- computeEdits @Int [1,2,3] [1,3,4,3] `shouldBe` [Edit 1 1 [], Edit 3 0 [4,3]]+ computeEdits @Int [1, 2, 3] [1, 3, 4, 3] `shouldBe` [Edit 1 1 [], Edit 3 0 [4, 3]] it "handles a long edit" $- computeEdits @Int [1,2,3,4,5] [1,7,7,7,7,7,5] `shouldBe` [Edit 1 3 [7,7,7,7,7]]+ computeEdits @Int [1, 2, 3, 4, 5] [1, 7, 7, 7, 7, 7, 5] `shouldBe` [Edit 1 3 [7, 7, 7, 7, 7]] it "handles multiple edits" $- computeEdits @Int [1,2,3,4,5] [1,6,3,7,7,5] `shouldBe` [Edit 1 1 [6], Edit 3 1 [7,7]]+ computeEdits @Int [1, 2, 3, 4, 5] [1, 6, 3, 7, 7, 5] `shouldBe` [Edit 1 1 [6], Edit 3 1 [7, 7]] it "handles big tokens" $ -- It's a little hard to specify a useful predicate here, the main point is that it should not take too long computeEdits @UInt bigInts bigInts2 `shouldSatisfy` (not . null)
test/ServerCapabilitiesSpec.hs view
@@ -1,11 +1,14 @@+{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE OverloadedStrings #-}+ module ServerCapabilitiesSpec where import Control.Lens.Operators-import Data.Aeson-import Language.LSP.Types-import Language.LSP.Types.Capabilities-import Language.LSP.Types.Lens+import Data.Aeson hiding (Null)+import Data.Maybe (fromJust)+import Language.LSP.Protocol.Lens+import Language.LSP.Protocol.Message+import Language.LSP.Protocol.Types import Test.Hspec spec :: Spec@@ -13,28 +16,32 @@ describe "folding range options" $ do describe "decodes" $ do it "just id" $- let input = "{\"id\": \"abc123\"}"- in decode input `shouldBe` Just (FoldingRangeRegistrationOptions Nothing Nothing (Just "abc123"))+ let input = "{\"id\": \"abc123\", \"documentSelector\": null}"+ in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (InR Null) Nothing (Just "abc123")) it "id and document selector" $ let input = "{\"id\": \"foo\", \"documentSelector\": " <> documentFiltersJson <> "}"- in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (Just documentFilters) Nothing (Just "foo"))+ in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (InL documentFilters) Nothing (Just "foo")) it "static boolean" $ let input = "true"- in decode input `shouldBe` Just True+ in decode input `shouldBe` Just True describe "encodes" $ it "just id" $- encode (FoldingRangeRegistrationOptions Nothing Nothing (Just "foo")) `shouldBe` "{\"id\":\"foo\"}"+ encode (FoldingRangeRegistrationOptions (InR Null) Nothing (Just "foo")) `shouldBe` "{\"documentSelector\":null,\"id\":\"foo\"}" it "decodes" $ let input = "{\"hoverProvider\": true, \"colorProvider\": {\"id\": \"abc123\", \"documentSelector\": " <> documentFiltersJson <> "}}"- Just caps = decode input :: Maybe ServerCapabilities- in caps ^. colorProvider `shouldBe` Just (InR $ InR $ DocumentColorRegistrationOptions (Just documentFilters) (Just "abc123") Nothing)+ caps :: ServerCapabilities = fromJust $ decode input+ in caps ^. colorProvider `shouldBe` Just (InR $ InR $ DocumentColorRegistrationOptions (InL documentFilters) Nothing (Just "abc123")) describe "client/registerCapability" $ it "allows empty registerOptions" $ let input = "{\"registrations\":[{\"registerOptions\":{},\"method\":\"workspace/didChangeConfiguration\",\"id\":\"4a56f5ca-7188-4f4c-a366-652d6f9d63aa\"}]}"- Just registrationParams = decode input :: Maybe RegistrationParams- in registrationParams ^. registrations `shouldBe`- List [SomeRegistration $ Registration "4a56f5ca-7188-4f4c-a366-652d6f9d63aa"- SWorkspaceDidChangeConfiguration Empty]- where- documentFilters = List [DocumentFilter (Just "haskell") Nothing Nothing]- documentFiltersJson = "[{\"language\": \"haskell\"}]"+ registrationParams :: RegistrationParams = fromJust $ decode input+ in registrationParams ^. registrations+ `shouldBe` [ toUntypedRegistration $+ TRegistration+ "4a56f5ca-7188-4f4c-a366-652d6f9d63aa"+ SMethod_WorkspaceDidChangeConfiguration+ (Just $ DidChangeConfigurationRegistrationOptions Nothing)+ ]+ where+ documentFilters = DocumentSelector [DocumentFilter $ InL $ TextDocumentFilter $ InL $ TextDocumentFilterLanguage{_language = "haskell", _scheme = Nothing, _pattern = Nothing}]+ documentFiltersJson = "[{\"language\": \"haskell\"}]"
test/Spec.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}+ {- See https://github.com/hspec/hspec/tree/master/hspec-discover#readme
test/TypesSpec.hs view
@@ -1,30 +1,19 @@ {-# LANGUAGE OverloadedStrings #-}-module TypesSpec where -import qualified Language.LSP.Types as J-import Test.Hspec---- ---------------------------------------------------------------------+module TypesSpec where -main :: IO ()-main = hspec spec+import Language.LSP.Protocol.Types qualified as J+import Test.Hspec spec :: Spec-spec = diagnosticsSpec---- -----------------------------------------------------------------------diagnosticsSpec :: Spec-diagnosticsSpec = do+spec = do describe "MarkupContent" $ do it "appends two plainstrings" $ do- J.unmarkedUpContent "string1\n" <> J.unmarkedUpContent "string2\n"- `shouldBe` J.unmarkedUpContent "string1\nstring2\n"+ J.mkPlainText "string1\n" <> J.mkPlainText "string2\n"+ `shouldBe` J.mkPlainText "string1\nstring2\n" it "appends a marked up and a plain string" $ do- J.markedUpContent "haskell" "foo :: Int" <> J.unmarkedUpContent "string2\nstring3\n"- `shouldBe` J.MarkupContent J.MkMarkdown "\n```haskell\nfoo :: Int\n```\nstring2 \nstring3 \n"+ J.mkMarkdownCodeBlock "haskell" "foo :: Int" <> J.mkPlainText "string2\nstring3\n"+ `shouldBe` J.MarkupContent J.MarkupKind_Markdown "\n```haskell\nfoo :: Int\n```\nstring2 \nstring3 \n" it "appends a plain string and a marked up string" $ do- J.unmarkedUpContent "string2\n" <> J.markedUpContent "haskell" "foo :: Int"- `shouldBe` J.MarkupContent J.MkMarkdown "string2 \n\n```haskell\nfoo :: Int\n```\n"---- ---------------------------------------------------------------------+ J.mkPlainText "string2\n" <> J.mkMarkdownCodeBlock "haskell" "foo :: Int"+ `shouldBe` J.MarkupContent J.MarkupKind_Markdown "string2 \n\n```haskell\nfoo :: Int\n```\n"
test/URIFilePathSpec.hs view
@@ -1,8 +1,11 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-}+-- We're testing our own deprecated function here!+{-# OPTIONS_GHC -Wno-deprecations #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} #if MIN_VERSION_filepath(1,4,100)+ #define OS_PATH #endif @@ -10,23 +13,23 @@ #ifdef OS_PATH import qualified System.OsPath as OsPath+import Control.Exception (throwIO)+import Data.Maybe (fromJust) #endif -import Control.Monad (when)-import Data.List-import Data.Text (Text, pack)-import Language.LSP.Types+import Control.Monad (when)+import Data.List+import Data.Text (Text, pack)+import Language.LSP.Protocol.Types -import Control.Exception (IOException, throwIO)-import Data.Maybe (fromJust)-import GHC.IO.Encoding (setFileSystemEncoding)-import Network.URI-import System.FilePath (normalise)-import qualified System.FilePath.Windows as FPW-import qualified System.Info-import System.IO-import Test.Hspec-import Test.QuickCheck+import GHC.IO.Encoding (setFileSystemEncoding)+import Network.URI+import System.FilePath (normalise)+import System.FilePath.Windows qualified as FPW+import System.IO+import System.Info qualified+import Test.Hspec+import Test.QuickCheck -- --------------------------------------------------------------------- @@ -89,30 +92,31 @@ it "converts a Windows file path to a URI" $ do let theFilePath = platformAwareFilePathToUri windowsOS "c:/Functional.hs"- theFilePath `shouldBe` (Uri "file:///c:/Functional.hs")+ theFilePath `shouldBe` Uri "file:///c:/Functional.hs" it "converts a POSIX file path to a URI and back" $ do let theFilePath = platformAwareFilePathToUri "posix" "./Functional.hs"- theFilePath `shouldBe` (Uri "file://./Functional.hs")- let Just (URI scheme' auth' path' query' frag') = parseURI "file://./Functional.hs"- (scheme',auth',path',query',frag') `shouldBe`- ("file:"- ,Just (URIAuth {uriUserInfo = "", uriRegName = ".", uriPort = ""}) -- AZ: Seems odd- ,"/Functional.hs"- ,""- ,"")+ theFilePath `shouldBe` Uri "file://./Functional.hs"+ let Just (URI scheme' auth' path' query' frag') = parseURI "file://./Functional.hs"+ (scheme', auth', path', query', frag')+ `shouldBe` ( "file:"+ , Just (URIAuth{uriUserInfo = "", uriRegName = ".", uriPort = ""}) -- AZ: Seems odd+ , "/Functional.hs"+ , ""+ , ""+ ) Just "./Functional.hs" `shouldBe` platformAwareUriToFilePath "posix" theFilePath it "converts a Posix file path to a URI and back" $ property $ forAll genPosixFilePath $ \fp -> do- let uri = platformAwareFilePathToUri "posix" fp- platformAwareUriToFilePath "posix" uri `shouldBe` Just fp+ let uri = platformAwareFilePathToUri "posix" fp+ platformAwareUriToFilePath "posix" uri `shouldBe` Just fp it "converts a Windows file path to a URI and back" $ property $ forAll genWindowsFilePath $ \fp -> do- let uri = platformAwareFilePathToUri windowsOS fp- -- We normalise to account for changes in the path separator.- -- But driver letters are *not* normalized so we skip them- when (not $ "c:" `isPrefixOf` fp) $- platformAwareUriToFilePath windowsOS uri `shouldBe` Just (FPW.normalise fp)+ let uri = platformAwareFilePathToUri windowsOS fp+ -- We normalise to account for changes in the path separator.+ -- But driver letters are *not* normalized so we skip them+ when (not $ "c:" `isPrefixOf` fp) $+ platformAwareUriToFilePath windowsOS uri `shouldBe` Just (FPW.normalise fp) it "converts a relative POSIX file path to a URI and back" $ do let uri = platformAwareFilePathToUri "posix" relativePosixFilePath@@ -120,52 +124,65 @@ let back = platformAwareUriToFilePath "posix" uri back `shouldBe` Just relativePosixFilePath - testUri :: Uri-testUri | isWindows = Uri "file:///C:/Users/myself/example.hs"- | otherwise = Uri "file:///home/myself/example.hs"+testUri+ | isWindows = Uri "file:///C:/Users/myself/example.hs"+ | otherwise = Uri "file:///home/myself/example.hs" testFilePath :: FilePath-testFilePath | isWindows = "C:\\Users\\myself\\example.hs"- | otherwise = "/home/myself/example.hs"+testFilePath+ | isWindows = "C:\\Users\\myself\\example.hs"+ | otherwise = "/home/myself/example.hs" withCurrentDirFilePath :: FilePath-withCurrentDirFilePath | isWindows = "C:\\Users\\.\\myself\\.\\.\\example.hs"- | otherwise = "/home/./myself/././example.hs"+withCurrentDirFilePath+ | isWindows = "C:\\Users\\.\\myself\\.\\.\\example.hs"+ | otherwise = "/home/./myself/././example.hs" fromRelativefilePathUri :: Uri-fromRelativefilePathUri | isWindows = Uri "file:///myself/example.hs"- | otherwise = Uri "file://myself/example.hs"+fromRelativefilePathUri+ | isWindows = Uri "file:///myself/example.hs"+ | otherwise = Uri "file://myself/example.hs" relativeFilePath :: FilePath-relativeFilePath | isWindows = "myself\\example.hs"- | otherwise = "myself/example.hs"+relativeFilePath+ | isWindows = "myself\\example.hs"+ | otherwise = "myself/example.hs" withLowerCaseDriveLetterFilePath :: FilePath withLowerCaseDriveLetterFilePath = "c:\\Users\\.\\myself\\.\\.\\example.hs" withInitialCurrentDirUriStr :: String-withInitialCurrentDirUriStr | isWindows = "file:///Functional.hs"- | otherwise = "file://Functional.hs"+withInitialCurrentDirUriStr+ | isWindows = "file:///Functional.hs"+ | otherwise = "file://Functional.hs" -withInitialCurrentDirUriParts :: (String, Maybe URIAuth, String, String, String)+withInitialCurrentDirUriParts :: (String, Maybe URIAuth, String, String, String) withInitialCurrentDirUriParts | isWindows =- ("file:"- ,Just (URIAuth {uriUserInfo = "", uriRegName = "", uriPort = ""}) -- JNS: And asymmetrical- ,"/Functional.hs","","")+ ( "file:"+ , Just (URIAuth{uriUserInfo = "", uriRegName = "", uriPort = ""}) -- JNS: And asymmetrical+ , "/Functional.hs"+ , ""+ , ""+ ) | otherwise =- ("file:"- ,Just (URIAuth {uriUserInfo = "", uriRegName = "Functional.hs", uriPort = ""}) -- AZ: Seems odd- ,"","","")+ ( "file:"+ , Just (URIAuth{uriUserInfo = "", uriRegName = "Functional.hs", uriPort = ""}) -- AZ: Seems odd+ , ""+ , ""+ , ""+ ) withInitialCurrentDirFilePath :: FilePath-withInitialCurrentDirFilePath | isWindows = ".\\Functional.hs"- | otherwise = "./Functional.hs"+withInitialCurrentDirFilePath+ | isWindows = ".\\Functional.hs"+ | otherwise = "./Functional.hs" noNormalizedUriTxt :: Text-noNormalizedUriTxt | isWindows = "file:///c:/Users/./myself/././example.hs"- | otherwise = "file:///home/./myself/././example.hs"+noNormalizedUriTxt+ | isWindows = "file:///c:/Users/./myself/././example.hs"+ | otherwise = "file:///home/./myself/././example.hs" noNormalizedUri :: Uri noNormalizedUri = Uri noNormalizedUriTxt@@ -190,8 +207,8 @@ theUri `shouldBe` testUri it "converts a file path to a URI and back" $ property $ forAll genFilePath $ \fp -> do- let uri = filePathToUri fp- uriToFilePath uri `shouldBe` Just (normalise fp)+ let uri = filePathToUri fp+ uriToFilePath uri `shouldBe` Just (normalise fp) it "converts a relative file path to a URI and back" $ do let uri = filePathToUri relativeFilePath@@ -201,23 +218,22 @@ it "converts a file path with initial current dir to a URI and back" $ do let uri = filePathToUri withInitialCurrentDirFilePath- uri `shouldBe` (Uri (pack withInitialCurrentDirUriStr))- let Just (URI scheme' auth' path' query' frag') = parseURI withInitialCurrentDirUriStr- (scheme',auth',path',query',frag') `shouldBe` withInitialCurrentDirUriParts+ uri `shouldBe` Uri (pack withInitialCurrentDirUriStr)+ let Just (URI scheme' auth' path' query' frag') = parseURI withInitialCurrentDirUriStr+ (scheme', auth', path', query', frag') `shouldBe` withInitialCurrentDirUriParts Just "Functional.hs" `shouldBe` uriToFilePath uri uriNormalizeSpec :: Spec uriNormalizeSpec = do- it "ignores differences in percent-encoding" $ property $ \uri ->- toNormalizedUri (Uri $ pack $ escapeURIString isUnescapedInURI uri) `shouldBe`- toNormalizedUri (Uri $ pack $ escapeURIString (const False) uri)+ toNormalizedUri (Uri $ pack $ escapeURIString isUnescapedInURI uri)+ `shouldBe` toNormalizedUri (Uri $ pack $ escapeURIString (const False) uri) it "ignores differences in percent-encoding (examples)" $ do- toNormalizedUri (Uri $ pack "http://server/path%C3%B1?param=%C3%B1") `shouldBe`- toNormalizedUri (Uri $ pack "http://server/path%c3%b1?param=%c3%b1")- toNormalizedUri (Uri $ pack "file:///path%2A") `shouldBe`- toNormalizedUri (Uri $ pack "file:///path%2a")+ toNormalizedUri (Uri $ pack "http://server/path%C3%B1?param=%C3%B1")+ `shouldBe` toNormalizedUri (Uri $ pack "http://server/path%c3%b1?param=%c3%b1")+ toNormalizedUri (Uri $ pack "file:///path%2A")+ `shouldBe` toNormalizedUri (Uri $ pack "file:///path%2a") it "normalizes uri file path when converting from uri to normalized uri" $ do let (NormalizedUri _ uri) = toNormalizedUri noNormalizedUri@@ -240,29 +256,33 @@ let nuri = toNormalizedUri (filePathToUri fp) case uriToFilePath (fromNormalizedUri nuri) of Just nfp -> nfp `shouldBe` (normalise fp)- Nothing -> return () -- Some unicode paths creates invalid uris, ignoring for now+ Nothing -> return () -- Some unicode paths creates invalid uris, ignoring for now genFilePath :: Gen FilePath-genFilePath | isWindows = genWindowsFilePath- | otherwise = genPosixFilePath+genFilePath+ | isWindows = genWindowsFilePath+ | otherwise = genPosixFilePath genWindowsFilePath :: Gen FilePath genWindowsFilePath = do- segments <- listOf1 pathSegment- pathSep <- elements ['/', '\\']- driveLetter <- elements ["C:", "c:"]- pure (driveLetter <> [pathSep] <> intercalate [pathSep] segments)- where pathSegment = listOf1 (genValidUnicodeChar `suchThat` (`notElem` ['/', '\\', ':']))+ segments <- listOf1 pathSegment+ pathSep <- elements ['/', '\\']+ driveLetter <- elements ["C:", "c:"]+ pure (driveLetter <> [pathSep] <> intercalate [pathSep] segments)+ where+ pathSegment = listOf1 (genValidUnicodeChar `suchThat` (`notElem` ['/', '\\', ':'])) genPosixFilePath :: Gen FilePath genPosixFilePath = do- segments <- listOf1 pathSegment- pure ("/" <> intercalate "/" segments)- where pathSegment = listOf1 (genValidUnicodeChar `suchThat` (`notElem` ['/']))+ segments <- listOf1 pathSegment+ pure ("/" <> intercalate "/" segments)+ where+ pathSegment = listOf1 (genValidUnicodeChar `suchThat` (`notElem` ['/'])) genValidUnicodeChar :: Gen Char genValidUnicodeChar = arbitraryUnicodeChar `suchThat` isCharacter- where isCharacter x = x /= '\65534' && x /= '\65535'+ where+ isCharacter x = x /= '\65534' && x /= '\65535' normalizedFilePathSpec :: Spec normalizedFilePathSpec = beforeAll (setFileSystemEncoding utf8) $ do@@ -274,8 +294,7 @@ let nuri = normalizedFilePathToUri (toNormalizedFilePath fp) case uriToNormalizedFilePath nuri of Just nfp -> fromNormalizedFilePath nfp `shouldBe` (normalise fp)- Nothing -> return () -- Some unicode paths creates invalid uris, ignoring for now-+ Nothing -> return () -- Some unicode paths creates invalid uris, ignoring for now it "converts a file path with reserved uri chars to a normalized URI and back" $ do let start = if isWindows then "C:\\" else "/" let fp = start ++ "path;part#fragmen?param=val"
test/WorkspaceEditSpec.hs view
@@ -1,28 +1,29 @@ {-# LANGUAGE OverloadedStrings #-}+ module WorkspaceEditSpec where +import Language.LSP.Protocol.Types import Test.Hspec-import Language.LSP.Types spec :: Spec spec = do describe "applyTextEdit" $ do it "inserts text" $ let te = TextEdit (Range (Position 1 2) (Position 1 2)) "foo"- in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nipfoosum\ndolor"+ in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nipfoosum\ndolor" it "deletes text" $ let te = TextEdit (Range (Position 0 2) (Position 1 2)) ""- in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "losum\ndolor"+ in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "losum\ndolor" it "edits a multiline text" $ let te = TextEdit (Range (Position 1 0) (Position 2 0)) "slorem"- in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nsloremdolor"+ in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nsloremdolor" it "inserts text past the last line" $ let te = TextEdit (Range (Position 3 2) (Position 3 2)) "foo"- in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nipsum\ndolorfoo"+ in applyTextEdit te "lorem\nipsum\ndolor" `shouldBe` "lorem\nipsum\ndolorfoo" describe "editTextEdit" $ it "edits a multiline text edit" $ let orig = TextEdit (Range (Position 1 1) (Position 2 2)) "hello\nworld" inner = TextEdit (Range (Position 0 3) (Position 1 3)) "ios\ngo" expected = TextEdit (Range (Position 1 1) (Position 2 2)) "helios\ngold"- in editTextEdit orig inner `shouldBe` expected+ in editTextEdit orig inner `shouldBe` expected