{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.ClientCapabilities where
import Data.Aeson.TH
import qualified Data.Aeson as A
import Data.Default
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.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
data WorkspaceClientCapabilities =
WorkspaceClientCapabilities
{
WorkspaceClientCapabilities -> Maybe Bool
_applyEdit :: Maybe Bool
, WorkspaceClientCapabilities
-> Maybe WorkspaceEditClientCapabilities
_workspaceEdit :: Maybe WorkspaceEditClientCapabilities
, WorkspaceClientCapabilities
-> Maybe DidChangeConfigurationClientCapabilities
_didChangeConfiguration :: Maybe DidChangeConfigurationClientCapabilities
, WorkspaceClientCapabilities
-> Maybe DidChangeWatchedFilesClientCapabilities
_didChangeWatchedFiles :: Maybe DidChangeWatchedFilesClientCapabilities
, WorkspaceClientCapabilities
-> Maybe WorkspaceSymbolClientCapabilities
_symbol :: Maybe WorkspaceSymbolClientCapabilities
, WorkspaceClientCapabilities
-> Maybe ExecuteCommandClientCapabilities
_executeCommand :: Maybe ExecuteCommandClientCapabilities
, WorkspaceClientCapabilities -> Maybe Bool
_workspaceFolders :: Maybe Bool
, WorkspaceClientCapabilities -> Maybe Bool
_configuration :: Maybe Bool
} deriving (Int -> WorkspaceClientCapabilities -> ShowS
[WorkspaceClientCapabilities] -> ShowS
WorkspaceClientCapabilities -> String
(Int -> WorkspaceClientCapabilities -> ShowS)
-> (WorkspaceClientCapabilities -> String)
-> ([WorkspaceClientCapabilities] -> ShowS)
-> Show WorkspaceClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceClientCapabilities] -> ShowS
$cshowList :: [WorkspaceClientCapabilities] -> ShowS
show :: WorkspaceClientCapabilities -> String
$cshow :: WorkspaceClientCapabilities -> String
showsPrec :: Int -> WorkspaceClientCapabilities -> ShowS
$cshowsPrec :: Int -> WorkspaceClientCapabilities -> ShowS
Show, ReadPrec [WorkspaceClientCapabilities]
ReadPrec WorkspaceClientCapabilities
Int -> ReadS WorkspaceClientCapabilities
ReadS [WorkspaceClientCapabilities]
(Int -> ReadS WorkspaceClientCapabilities)
-> ReadS [WorkspaceClientCapabilities]
-> ReadPrec WorkspaceClientCapabilities
-> ReadPrec [WorkspaceClientCapabilities]
-> Read WorkspaceClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceClientCapabilities]
$creadListPrec :: ReadPrec [WorkspaceClientCapabilities]
readPrec :: ReadPrec WorkspaceClientCapabilities
$creadPrec :: ReadPrec WorkspaceClientCapabilities
readList :: ReadS [WorkspaceClientCapabilities]
$creadList :: ReadS [WorkspaceClientCapabilities]
readsPrec :: Int -> ReadS WorkspaceClientCapabilities
$creadsPrec :: Int -> ReadS WorkspaceClientCapabilities
Read, WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
(WorkspaceClientCapabilities
-> WorkspaceClientCapabilities -> Bool)
-> (WorkspaceClientCapabilities
-> WorkspaceClientCapabilities -> Bool)
-> Eq WorkspaceClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
$c/= :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
== :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
$c== :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''WorkspaceClientCapabilities
instance Default WorkspaceClientCapabilities where
def :: WorkspaceClientCapabilities
def = Maybe Bool
-> Maybe WorkspaceEditClientCapabilities
-> Maybe DidChangeConfigurationClientCapabilities
-> Maybe DidChangeWatchedFilesClientCapabilities
-> Maybe WorkspaceSymbolClientCapabilities
-> Maybe ExecuteCommandClientCapabilities
-> Maybe Bool
-> Maybe Bool
-> WorkspaceClientCapabilities
WorkspaceClientCapabilities Maybe Bool
forall a. Default a => a
def Maybe WorkspaceEditClientCapabilities
forall a. Default a => a
def Maybe DidChangeConfigurationClientCapabilities
forall a. Default a => a
def Maybe DidChangeWatchedFilesClientCapabilities
forall a. Default a => a
def Maybe WorkspaceSymbolClientCapabilities
forall a. Default a => a
def Maybe ExecuteCommandClientCapabilities
forall a. Default a => a
def Maybe Bool
forall a. Default a => a
def Maybe Bool
forall a. Default a => a
def
data TextDocumentClientCapabilities =
TextDocumentClientCapabilities
{ TextDocumentClientCapabilities
-> Maybe TextDocumentSyncClientCapabilities
_synchronization :: Maybe TextDocumentSyncClientCapabilities
, TextDocumentClientCapabilities
-> Maybe CompletionClientCapabilities
_completion :: Maybe CompletionClientCapabilities
, TextDocumentClientCapabilities -> Maybe HoverClientCapabilities
_hover :: Maybe HoverClientCapabilities
, TextDocumentClientCapabilities
-> Maybe SignatureHelpClientCapabilities
_signatureHelp :: Maybe SignatureHelpClientCapabilities
, TextDocumentClientCapabilities
-> Maybe ReferencesClientCapabilities
_references :: Maybe ReferencesClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentHighlightClientCapabilities
_documentHighlight :: Maybe DocumentHighlightClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentSymbolClientCapabilities
_documentSymbol :: Maybe DocumentSymbolClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentFormattingClientCapabilities
_formatting :: Maybe DocumentFormattingClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentRangeFormattingClientCapabilities
_rangeFormatting :: Maybe DocumentRangeFormattingClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentOnTypeFormattingClientCapabilities
_onTypeFormatting :: Maybe DocumentOnTypeFormattingClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DeclarationClientCapabilities
_declaration :: Maybe DeclarationClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DefinitionClientCapabilities
_definition :: Maybe DefinitionClientCapabilities
, TextDocumentClientCapabilities
-> Maybe TypeDefinitionClientCapabilities
_typeDefinition :: Maybe TypeDefinitionClientCapabilities
, TextDocumentClientCapabilities
-> Maybe ImplementationClientCapabilities
_implementation :: Maybe ImplementationClientCapabilities
, TextDocumentClientCapabilities
-> Maybe CodeActionClientCapabilities
_codeAction :: Maybe CodeActionClientCapabilities
, TextDocumentClientCapabilities -> Maybe CodeLensClientCapabilities
_codeLens :: Maybe CodeLensClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentLinkClientCapabilities
_documentLink :: Maybe DocumentLinkClientCapabilities
, TextDocumentClientCapabilities
-> Maybe DocumentColorClientCapabilities
_colorProvider :: Maybe DocumentColorClientCapabilities
, TextDocumentClientCapabilities -> Maybe RenameClientCapabilities
_rename :: Maybe RenameClientCapabilities
, TextDocumentClientCapabilities
-> Maybe PublishDiagnosticsClientCapabilities
_publishDiagnostics :: Maybe PublishDiagnosticsClientCapabilities
, TextDocumentClientCapabilities
-> Maybe FoldingRangeClientCapabilities
_foldingRange :: Maybe FoldingRangeClientCapabilities
, TextDocumentClientCapabilities
-> Maybe SelectionRangeClientCapabilities
_selectionRange :: Maybe SelectionRangeClientCapabilities
} deriving (Int -> TextDocumentClientCapabilities -> ShowS
[TextDocumentClientCapabilities] -> ShowS
TextDocumentClientCapabilities -> String
(Int -> TextDocumentClientCapabilities -> ShowS)
-> (TextDocumentClientCapabilities -> String)
-> ([TextDocumentClientCapabilities] -> ShowS)
-> Show TextDocumentClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TextDocumentClientCapabilities] -> ShowS
$cshowList :: [TextDocumentClientCapabilities] -> ShowS
show :: TextDocumentClientCapabilities -> String
$cshow :: TextDocumentClientCapabilities -> String
showsPrec :: Int -> TextDocumentClientCapabilities -> ShowS
$cshowsPrec :: Int -> TextDocumentClientCapabilities -> ShowS
Show, ReadPrec [TextDocumentClientCapabilities]
ReadPrec TextDocumentClientCapabilities
Int -> ReadS TextDocumentClientCapabilities
ReadS [TextDocumentClientCapabilities]
(Int -> ReadS TextDocumentClientCapabilities)
-> ReadS [TextDocumentClientCapabilities]
-> ReadPrec TextDocumentClientCapabilities
-> ReadPrec [TextDocumentClientCapabilities]
-> Read TextDocumentClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TextDocumentClientCapabilities]
$creadListPrec :: ReadPrec [TextDocumentClientCapabilities]
readPrec :: ReadPrec TextDocumentClientCapabilities
$creadPrec :: ReadPrec TextDocumentClientCapabilities
readList :: ReadS [TextDocumentClientCapabilities]
$creadList :: ReadS [TextDocumentClientCapabilities]
readsPrec :: Int -> ReadS TextDocumentClientCapabilities
$creadsPrec :: Int -> ReadS TextDocumentClientCapabilities
Read, TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
(TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool)
-> (TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool)
-> Eq TextDocumentClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
$c/= :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
== :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
$c== :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''TextDocumentClientCapabilities
instance Default TextDocumentClientCapabilities where
def :: TextDocumentClientCapabilities
def = Maybe TextDocumentSyncClientCapabilities
-> Maybe CompletionClientCapabilities
-> Maybe HoverClientCapabilities
-> Maybe SignatureHelpClientCapabilities
-> Maybe ReferencesClientCapabilities
-> Maybe DocumentHighlightClientCapabilities
-> Maybe DocumentSymbolClientCapabilities
-> Maybe DocumentFormattingClientCapabilities
-> Maybe DocumentRangeFormattingClientCapabilities
-> Maybe DocumentOnTypeFormattingClientCapabilities
-> Maybe DeclarationClientCapabilities
-> Maybe DefinitionClientCapabilities
-> Maybe TypeDefinitionClientCapabilities
-> Maybe ImplementationClientCapabilities
-> Maybe CodeActionClientCapabilities
-> Maybe CodeLensClientCapabilities
-> Maybe DocumentLinkClientCapabilities
-> Maybe DocumentColorClientCapabilities
-> Maybe RenameClientCapabilities
-> Maybe PublishDiagnosticsClientCapabilities
-> Maybe FoldingRangeClientCapabilities
-> Maybe SelectionRangeClientCapabilities
-> TextDocumentClientCapabilities
TextDocumentClientCapabilities Maybe TextDocumentSyncClientCapabilities
forall a. Default a => a
def Maybe CompletionClientCapabilities
forall a. Default a => a
def Maybe HoverClientCapabilities
forall a. Default a => a
def Maybe SignatureHelpClientCapabilities
forall a. Default a => a
def Maybe ReferencesClientCapabilities
forall a. Default a => a
def Maybe DocumentHighlightClientCapabilities
forall a. Default a => a
def Maybe DocumentSymbolClientCapabilities
forall a. Default a => a
def Maybe DocumentFormattingClientCapabilities
forall a. Default a => a
def
Maybe DocumentRangeFormattingClientCapabilities
forall a. Default a => a
def Maybe DocumentOnTypeFormattingClientCapabilities
forall a. Default a => a
def Maybe DeclarationClientCapabilities
forall a. Default a => a
def Maybe DefinitionClientCapabilities
forall a. Default a => a
def Maybe TypeDefinitionClientCapabilities
forall a. Default a => a
def Maybe ImplementationClientCapabilities
forall a. Default a => a
def Maybe CodeActionClientCapabilities
forall a. Default a => a
def Maybe CodeLensClientCapabilities
forall a. Default a => a
def
Maybe DocumentLinkClientCapabilities
forall a. Default a => a
def Maybe DocumentColorClientCapabilities
forall a. Default a => a
def Maybe RenameClientCapabilities
forall a. Default a => a
def Maybe PublishDiagnosticsClientCapabilities
forall a. Default a => a
def Maybe FoldingRangeClientCapabilities
forall a. Default a => a
def Maybe SelectionRangeClientCapabilities
forall a. Default a => a
def
data WindowClientCapabilities =
WindowClientCapabilities
{
WindowClientCapabilities -> Maybe Bool
_workDoneProgress :: Maybe Bool
} deriving (Int -> WindowClientCapabilities -> ShowS
[WindowClientCapabilities] -> ShowS
WindowClientCapabilities -> String
(Int -> WindowClientCapabilities -> ShowS)
-> (WindowClientCapabilities -> String)
-> ([WindowClientCapabilities] -> ShowS)
-> Show WindowClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WindowClientCapabilities] -> ShowS
$cshowList :: [WindowClientCapabilities] -> ShowS
show :: WindowClientCapabilities -> String
$cshow :: WindowClientCapabilities -> String
showsPrec :: Int -> WindowClientCapabilities -> ShowS
$cshowsPrec :: Int -> WindowClientCapabilities -> ShowS
Show, ReadPrec [WindowClientCapabilities]
ReadPrec WindowClientCapabilities
Int -> ReadS WindowClientCapabilities
ReadS [WindowClientCapabilities]
(Int -> ReadS WindowClientCapabilities)
-> ReadS [WindowClientCapabilities]
-> ReadPrec WindowClientCapabilities
-> ReadPrec [WindowClientCapabilities]
-> Read WindowClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WindowClientCapabilities]
$creadListPrec :: ReadPrec [WindowClientCapabilities]
readPrec :: ReadPrec WindowClientCapabilities
$creadPrec :: ReadPrec WindowClientCapabilities
readList :: ReadS [WindowClientCapabilities]
$creadList :: ReadS [WindowClientCapabilities]
readsPrec :: Int -> ReadS WindowClientCapabilities
$creadsPrec :: Int -> ReadS WindowClientCapabilities
Read, WindowClientCapabilities -> WindowClientCapabilities -> Bool
(WindowClientCapabilities -> WindowClientCapabilities -> Bool)
-> (WindowClientCapabilities -> WindowClientCapabilities -> Bool)
-> Eq WindowClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
$c/= :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
== :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
$c== :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''WindowClientCapabilities
instance Default WindowClientCapabilities where
def :: WindowClientCapabilities
def = Maybe Bool -> WindowClientCapabilities
WindowClientCapabilities Maybe Bool
forall a. Default a => a
def
data ClientCapabilities =
ClientCapabilities
{ ClientCapabilities -> Maybe WorkspaceClientCapabilities
_workspace :: Maybe WorkspaceClientCapabilities
, ClientCapabilities -> Maybe TextDocumentClientCapabilities
_textDocument :: Maybe TextDocumentClientCapabilities
, ClientCapabilities -> Maybe WindowClientCapabilities
_window :: Maybe WindowClientCapabilities
, ClientCapabilities -> Maybe Object
_experimental :: Maybe A.Object
} deriving (Int -> ClientCapabilities -> ShowS
[ClientCapabilities] -> ShowS
ClientCapabilities -> String
(Int -> ClientCapabilities -> ShowS)
-> (ClientCapabilities -> String)
-> ([ClientCapabilities] -> ShowS)
-> Show ClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientCapabilities] -> ShowS
$cshowList :: [ClientCapabilities] -> ShowS
show :: ClientCapabilities -> String
$cshow :: ClientCapabilities -> String
showsPrec :: Int -> ClientCapabilities -> ShowS
$cshowsPrec :: Int -> ClientCapabilities -> ShowS
Show, ReadPrec [ClientCapabilities]
ReadPrec ClientCapabilities
Int -> ReadS ClientCapabilities
ReadS [ClientCapabilities]
(Int -> ReadS ClientCapabilities)
-> ReadS [ClientCapabilities]
-> ReadPrec ClientCapabilities
-> ReadPrec [ClientCapabilities]
-> Read ClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClientCapabilities]
$creadListPrec :: ReadPrec [ClientCapabilities]
readPrec :: ReadPrec ClientCapabilities
$creadPrec :: ReadPrec ClientCapabilities
readList :: ReadS [ClientCapabilities]
$creadList :: ReadS [ClientCapabilities]
readsPrec :: Int -> ReadS ClientCapabilities
$creadsPrec :: Int -> ReadS ClientCapabilities
Read, ClientCapabilities -> ClientCapabilities -> Bool
(ClientCapabilities -> ClientCapabilities -> Bool)
-> (ClientCapabilities -> ClientCapabilities -> Bool)
-> Eq ClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientCapabilities -> ClientCapabilities -> Bool
$c/= :: ClientCapabilities -> ClientCapabilities -> Bool
== :: ClientCapabilities -> ClientCapabilities -> Bool
$c== :: ClientCapabilities -> ClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''ClientCapabilities
instance Default ClientCapabilities where
def :: ClientCapabilities
def = Maybe WorkspaceClientCapabilities
-> Maybe TextDocumentClientCapabilities
-> Maybe WindowClientCapabilities
-> Maybe Object
-> ClientCapabilities
ClientCapabilities Maybe WorkspaceClientCapabilities
forall a. Default a => a
def Maybe TextDocumentClientCapabilities
forall a. Default a => a
def Maybe WindowClientCapabilities
forall a. Default a => a
def Maybe Object
forall a. Default a => a
def