{-# 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'
      WorkspaceClientCapabilities -> Maybe Bool
_applyEdit :: Maybe Bool

      -- | Capabilities specific to `WorkspaceEdit`s
    , WorkspaceClientCapabilities
-> Maybe WorkspaceEditClientCapabilities
_workspaceEdit :: Maybe WorkspaceEditClientCapabilities

      -- | Capabilities specific to the `workspace/didChangeConfiguration` notification.
    , WorkspaceClientCapabilities
-> Maybe DidChangeConfigurationClientCapabilities
_didChangeConfiguration :: Maybe DidChangeConfigurationClientCapabilities

       -- | Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
    , WorkspaceClientCapabilities
-> Maybe DidChangeWatchedFilesClientCapabilities
_didChangeWatchedFiles :: Maybe DidChangeWatchedFilesClientCapabilities

      -- | Capabilities specific to the `workspace/symbol` request.
    , WorkspaceClientCapabilities
-> Maybe WorkspaceSymbolClientCapabilities
_symbol :: Maybe WorkspaceSymbolClientCapabilities

      -- | Capabilities specific to the `workspace/executeCommand` request.
    , WorkspaceClientCapabilities
-> Maybe ExecuteCommandClientCapabilities
_executeCommand :: Maybe ExecuteCommandClientCapabilities

      -- | The client has support for workspace folders.
    , WorkspaceClientCapabilities -> Maybe Bool
_workspaceFolders :: Maybe Bool

      -- | The client supports `workspace/configuration` requests.
    , WorkspaceClientCapabilities -> Maybe Bool
_configuration :: Maybe Bool

      -- | Capabilities specific to the semantic token requests scoped to the
      -- workspace.
      --
      -- @since 3.16.0
    , WorkspaceClientCapabilities
-> Maybe SemanticTokensWorkspaceClientCapabilities
_semanticTokens :: Maybe SemanticTokensWorkspaceClientCapabilities
    } 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
$cshowsPrec :: Int -> WorkspaceClientCapabilities -> ShowS
showsPrec :: Int -> WorkspaceClientCapabilities -> ShowS
$cshow :: WorkspaceClientCapabilities -> String
show :: WorkspaceClientCapabilities -> String
$cshowList :: [WorkspaceClientCapabilities] -> ShowS
showList :: [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
$creadsPrec :: Int -> ReadS WorkspaceClientCapabilities
readsPrec :: Int -> ReadS WorkspaceClientCapabilities
$creadList :: ReadS [WorkspaceClientCapabilities]
readList :: ReadS [WorkspaceClientCapabilities]
$creadPrec :: ReadPrec WorkspaceClientCapabilities
readPrec :: ReadPrec WorkspaceClientCapabilities
$creadListPrec :: ReadPrec [WorkspaceClientCapabilities]
readListPrec :: ReadPrec [WorkspaceClientCapabilities]
Read, WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
(WorkspaceClientCapabilities
 -> WorkspaceClientCapabilities -> Bool)
-> (WorkspaceClientCapabilities
    -> WorkspaceClientCapabilities -> Bool)
-> Eq WorkspaceClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
== :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
$c/= :: WorkspaceClientCapabilities -> WorkspaceClientCapabilities -> Bool
/= :: 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
-> Maybe SemanticTokensWorkspaceClientCapabilities
-> 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 Maybe SemanticTokensWorkspaceClientCapabilities
forall a. Default a => a
def

-- -------------------------------------

data TextDocumentClientCapabilities =
  TextDocumentClientCapabilities
    { TextDocumentClientCapabilities
-> Maybe TextDocumentSyncClientCapabilities
_synchronization :: Maybe TextDocumentSyncClientCapabilities

      -- | Capabilities specific to the `textDocument/completion`
    , TextDocumentClientCapabilities
-> Maybe CompletionClientCapabilities
_completion :: Maybe CompletionClientCapabilities

      -- | Capabilities specific to the `textDocument/hover`
    , TextDocumentClientCapabilities -> Maybe HoverClientCapabilities
_hover :: Maybe HoverClientCapabilities

      -- | Capabilities specific to the `textDocument/signatureHelp`
    , TextDocumentClientCapabilities
-> Maybe SignatureHelpClientCapabilities
_signatureHelp :: Maybe SignatureHelpClientCapabilities

      -- | Capabilities specific to the `textDocument/references`
    , TextDocumentClientCapabilities
-> Maybe ReferencesClientCapabilities
_references :: Maybe ReferencesClientCapabilities

      -- | Capabilities specific to the `textDocument/documentHighlight`
    , TextDocumentClientCapabilities
-> Maybe DocumentHighlightClientCapabilities
_documentHighlight :: Maybe DocumentHighlightClientCapabilities

      -- | Capabilities specific to the `textDocument/documentSymbol`
    , TextDocumentClientCapabilities
-> Maybe DocumentSymbolClientCapabilities
_documentSymbol :: Maybe DocumentSymbolClientCapabilities

      -- | Capabilities specific to the `textDocument/formatting`
    , TextDocumentClientCapabilities
-> Maybe DocumentFormattingClientCapabilities
_formatting :: Maybe DocumentFormattingClientCapabilities

      -- | Capabilities specific to the `textDocument/rangeFormatting`
    , TextDocumentClientCapabilities
-> Maybe DocumentRangeFormattingClientCapabilities
_rangeFormatting :: Maybe DocumentRangeFormattingClientCapabilities

      -- | Capabilities specific to the `textDocument/onTypeFormatting`
    , TextDocumentClientCapabilities
-> Maybe DocumentOnTypeFormattingClientCapabilities
_onTypeFormatting :: Maybe DocumentOnTypeFormattingClientCapabilities

      -- | Capabilities specific to the `textDocument/declaration` request.
      --
      -- Since LSP 3.14.0
    , TextDocumentClientCapabilities
-> Maybe DeclarationClientCapabilities
_declaration :: Maybe DeclarationClientCapabilities

      -- | Capabilities specific to the `textDocument/definition`
    , TextDocumentClientCapabilities
-> Maybe DefinitionClientCapabilities
_definition :: Maybe DefinitionClientCapabilities

      -- | Capabilities specific to the `textDocument/typeDefinition`
    , TextDocumentClientCapabilities
-> Maybe TypeDefinitionClientCapabilities
_typeDefinition :: Maybe TypeDefinitionClientCapabilities

      -- | Capabilities specific to the `textDocument/implementation`
    , TextDocumentClientCapabilities
-> Maybe ImplementationClientCapabilities
_implementation :: Maybe ImplementationClientCapabilities

      -- | Capabilities specific to the `textDocument/codeAction`
    , TextDocumentClientCapabilities
-> Maybe CodeActionClientCapabilities
_codeAction :: Maybe CodeActionClientCapabilities

      -- | Capabilities specific to the `textDocument/codeLens`
    , TextDocumentClientCapabilities -> Maybe CodeLensClientCapabilities
_codeLens :: Maybe CodeLensClientCapabilities

      -- | Capabilities specific to the `textDocument/documentLink`
    , TextDocumentClientCapabilities
-> Maybe DocumentLinkClientCapabilities
_documentLink :: Maybe DocumentLinkClientCapabilities

      -- | Capabilities specific to the `textDocument/documentColor` and the
      -- `textDocument/colorPresentation` request
    , TextDocumentClientCapabilities
-> Maybe DocumentColorClientCapabilities
_colorProvider :: Maybe DocumentColorClientCapabilities

      -- | Capabilities specific to the `textDocument/rename`
    , TextDocumentClientCapabilities -> Maybe RenameClientCapabilities
_rename :: Maybe RenameClientCapabilities

      -- | Capabilities specific to `textDocument/publishDiagnostics`
    , TextDocumentClientCapabilities
-> Maybe PublishDiagnosticsClientCapabilities
_publishDiagnostics :: Maybe PublishDiagnosticsClientCapabilities

      -- | Capabilities specific to the `textDocument/foldingRange` request.
      -- Since LSP 3.10.
      --
      -- @since 0.7.0.0
    , TextDocumentClientCapabilities
-> Maybe FoldingRangeClientCapabilities
_foldingRange :: Maybe FoldingRangeClientCapabilities

      -- | Capabilities specific to the `textDocument/selectionRange` request.
      -- Since LSP 3.15.0
    , TextDocumentClientCapabilities
-> Maybe SelectionRangeClientCapabilities
_selectionRange :: Maybe SelectionRangeClientCapabilities

      -- | Call hierarchy specific to the `textDocument/prepareCallHierarchy` request.
      -- Since LSP 3.16.0
    , TextDocumentClientCapabilities
-> Maybe CallHierarchyClientCapabilities
_callHierarchy :: Maybe CallHierarchyClientCapabilities

    -- | Capabilities specific to the various semantic token requests.
    --
    -- @since 3.16.0
    , TextDocumentClientCapabilities
-> Maybe SemanticTokensClientCapabilities
_semanticTokens :: Maybe SemanticTokensClientCapabilities
    } 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
$cshowsPrec :: Int -> TextDocumentClientCapabilities -> ShowS
showsPrec :: Int -> TextDocumentClientCapabilities -> ShowS
$cshow :: TextDocumentClientCapabilities -> String
show :: TextDocumentClientCapabilities -> String
$cshowList :: [TextDocumentClientCapabilities] -> ShowS
showList :: [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
$creadsPrec :: Int -> ReadS TextDocumentClientCapabilities
readsPrec :: Int -> ReadS TextDocumentClientCapabilities
$creadList :: ReadS [TextDocumentClientCapabilities]
readList :: ReadS [TextDocumentClientCapabilities]
$creadPrec :: ReadPrec TextDocumentClientCapabilities
readPrec :: ReadPrec TextDocumentClientCapabilities
$creadListPrec :: ReadPrec [TextDocumentClientCapabilities]
readListPrec :: ReadPrec [TextDocumentClientCapabilities]
Read, TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
(TextDocumentClientCapabilities
 -> TextDocumentClientCapabilities -> Bool)
-> (TextDocumentClientCapabilities
    -> TextDocumentClientCapabilities -> Bool)
-> Eq TextDocumentClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
== :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
$c/= :: TextDocumentClientCapabilities
-> TextDocumentClientCapabilities -> Bool
/= :: 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
-> Maybe CallHierarchyClientCapabilities
-> Maybe SemanticTokensClientCapabilities
-> 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 Maybe CallHierarchyClientCapabilities
forall a. Default a => a
def Maybe SemanticTokensClientCapabilities
forall a. Default a => a
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.
      MessageActionItemClientCapabilities -> Maybe Bool
_additionalPropertiesSupport :: Maybe Bool
    } deriving (Int -> MessageActionItemClientCapabilities -> ShowS
[MessageActionItemClientCapabilities] -> ShowS
MessageActionItemClientCapabilities -> String
(Int -> MessageActionItemClientCapabilities -> ShowS)
-> (MessageActionItemClientCapabilities -> String)
-> ([MessageActionItemClientCapabilities] -> ShowS)
-> Show MessageActionItemClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MessageActionItemClientCapabilities -> ShowS
showsPrec :: Int -> MessageActionItemClientCapabilities -> ShowS
$cshow :: MessageActionItemClientCapabilities -> String
show :: MessageActionItemClientCapabilities -> String
$cshowList :: [MessageActionItemClientCapabilities] -> ShowS
showList :: [MessageActionItemClientCapabilities] -> ShowS
Show, ReadPrec [MessageActionItemClientCapabilities]
ReadPrec MessageActionItemClientCapabilities
Int -> ReadS MessageActionItemClientCapabilities
ReadS [MessageActionItemClientCapabilities]
(Int -> ReadS MessageActionItemClientCapabilities)
-> ReadS [MessageActionItemClientCapabilities]
-> ReadPrec MessageActionItemClientCapabilities
-> ReadPrec [MessageActionItemClientCapabilities]
-> Read MessageActionItemClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS MessageActionItemClientCapabilities
readsPrec :: Int -> ReadS MessageActionItemClientCapabilities
$creadList :: ReadS [MessageActionItemClientCapabilities]
readList :: ReadS [MessageActionItemClientCapabilities]
$creadPrec :: ReadPrec MessageActionItemClientCapabilities
readPrec :: ReadPrec MessageActionItemClientCapabilities
$creadListPrec :: ReadPrec [MessageActionItemClientCapabilities]
readListPrec :: ReadPrec [MessageActionItemClientCapabilities]
Read, MessageActionItemClientCapabilities
-> MessageActionItemClientCapabilities -> Bool
(MessageActionItemClientCapabilities
 -> MessageActionItemClientCapabilities -> Bool)
-> (MessageActionItemClientCapabilities
    -> MessageActionItemClientCapabilities -> Bool)
-> Eq MessageActionItemClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MessageActionItemClientCapabilities
-> MessageActionItemClientCapabilities -> Bool
== :: MessageActionItemClientCapabilities
-> MessageActionItemClientCapabilities -> Bool
$c/= :: MessageActionItemClientCapabilities
-> MessageActionItemClientCapabilities -> Bool
/= :: MessageActionItemClientCapabilities
-> MessageActionItemClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''MessageActionItemClientCapabilities

-- | Show message request client capabilities
data ShowMessageRequestClientCapabilities =
  ShowMessageRequestClientCapabilities
    { -- | Capabilities specific to the `MessageActionItem` type.
      ShowMessageRequestClientCapabilities
-> Maybe MessageActionItemClientCapabilities
_messageActionItem :: Maybe MessageActionItemClientCapabilities
    } deriving (Int -> ShowMessageRequestClientCapabilities -> ShowS
[ShowMessageRequestClientCapabilities] -> ShowS
ShowMessageRequestClientCapabilities -> String
(Int -> ShowMessageRequestClientCapabilities -> ShowS)
-> (ShowMessageRequestClientCapabilities -> String)
-> ([ShowMessageRequestClientCapabilities] -> ShowS)
-> Show ShowMessageRequestClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ShowMessageRequestClientCapabilities -> ShowS
showsPrec :: Int -> ShowMessageRequestClientCapabilities -> ShowS
$cshow :: ShowMessageRequestClientCapabilities -> String
show :: ShowMessageRequestClientCapabilities -> String
$cshowList :: [ShowMessageRequestClientCapabilities] -> ShowS
showList :: [ShowMessageRequestClientCapabilities] -> ShowS
Show, ReadPrec [ShowMessageRequestClientCapabilities]
ReadPrec ShowMessageRequestClientCapabilities
Int -> ReadS ShowMessageRequestClientCapabilities
ReadS [ShowMessageRequestClientCapabilities]
(Int -> ReadS ShowMessageRequestClientCapabilities)
-> ReadS [ShowMessageRequestClientCapabilities]
-> ReadPrec ShowMessageRequestClientCapabilities
-> ReadPrec [ShowMessageRequestClientCapabilities]
-> Read ShowMessageRequestClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ShowMessageRequestClientCapabilities
readsPrec :: Int -> ReadS ShowMessageRequestClientCapabilities
$creadList :: ReadS [ShowMessageRequestClientCapabilities]
readList :: ReadS [ShowMessageRequestClientCapabilities]
$creadPrec :: ReadPrec ShowMessageRequestClientCapabilities
readPrec :: ReadPrec ShowMessageRequestClientCapabilities
$creadListPrec :: ReadPrec [ShowMessageRequestClientCapabilities]
readListPrec :: ReadPrec [ShowMessageRequestClientCapabilities]
Read, ShowMessageRequestClientCapabilities
-> ShowMessageRequestClientCapabilities -> Bool
(ShowMessageRequestClientCapabilities
 -> ShowMessageRequestClientCapabilities -> Bool)
-> (ShowMessageRequestClientCapabilities
    -> ShowMessageRequestClientCapabilities -> Bool)
-> Eq ShowMessageRequestClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ShowMessageRequestClientCapabilities
-> ShowMessageRequestClientCapabilities -> Bool
== :: ShowMessageRequestClientCapabilities
-> ShowMessageRequestClientCapabilities -> Bool
$c/= :: ShowMessageRequestClientCapabilities
-> ShowMessageRequestClientCapabilities -> Bool
/= :: ShowMessageRequestClientCapabilities
-> ShowMessageRequestClientCapabilities -> Bool
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
      ShowDocumentClientCapabilities -> Bool
_support :: Bool
    } deriving (Int -> ShowDocumentClientCapabilities -> ShowS
[ShowDocumentClientCapabilities] -> ShowS
ShowDocumentClientCapabilities -> String
(Int -> ShowDocumentClientCapabilities -> ShowS)
-> (ShowDocumentClientCapabilities -> String)
-> ([ShowDocumentClientCapabilities] -> ShowS)
-> Show ShowDocumentClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ShowDocumentClientCapabilities -> ShowS
showsPrec :: Int -> ShowDocumentClientCapabilities -> ShowS
$cshow :: ShowDocumentClientCapabilities -> String
show :: ShowDocumentClientCapabilities -> String
$cshowList :: [ShowDocumentClientCapabilities] -> ShowS
showList :: [ShowDocumentClientCapabilities] -> ShowS
Show, ReadPrec [ShowDocumentClientCapabilities]
ReadPrec ShowDocumentClientCapabilities
Int -> ReadS ShowDocumentClientCapabilities
ReadS [ShowDocumentClientCapabilities]
(Int -> ReadS ShowDocumentClientCapabilities)
-> ReadS [ShowDocumentClientCapabilities]
-> ReadPrec ShowDocumentClientCapabilities
-> ReadPrec [ShowDocumentClientCapabilities]
-> Read ShowDocumentClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ShowDocumentClientCapabilities
readsPrec :: Int -> ReadS ShowDocumentClientCapabilities
$creadList :: ReadS [ShowDocumentClientCapabilities]
readList :: ReadS [ShowDocumentClientCapabilities]
$creadPrec :: ReadPrec ShowDocumentClientCapabilities
readPrec :: ReadPrec ShowDocumentClientCapabilities
$creadListPrec :: ReadPrec [ShowDocumentClientCapabilities]
readListPrec :: ReadPrec [ShowDocumentClientCapabilities]
Read, ShowDocumentClientCapabilities
-> ShowDocumentClientCapabilities -> Bool
(ShowDocumentClientCapabilities
 -> ShowDocumentClientCapabilities -> Bool)
-> (ShowDocumentClientCapabilities
    -> ShowDocumentClientCapabilities -> Bool)
-> Eq ShowDocumentClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ShowDocumentClientCapabilities
-> ShowDocumentClientCapabilities -> Bool
== :: ShowDocumentClientCapabilities
-> ShowDocumentClientCapabilities -> Bool
$c/= :: ShowDocumentClientCapabilities
-> ShowDocumentClientCapabilities -> Bool
/= :: ShowDocumentClientCapabilities
-> ShowDocumentClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''ShowDocumentClientCapabilities

-- | Window specific client capabilities.
data WindowClientCapabilities =
  WindowClientCapabilities
    { -- | Whether client supports handling progress notifications.
      --
      -- @since 3.15.0
      WindowClientCapabilities -> Maybe Bool
_workDoneProgress :: Maybe Bool
      -- | Capabilities specific to the showMessage request
      --
      -- @since 3.16.0
    , WindowClientCapabilities
-> Maybe ShowMessageRequestClientCapabilities
_showMessage :: Maybe ShowMessageRequestClientCapabilities
      -- | Capabilities specific to the showDocument request
      --
      -- @since 3.16.0
    , WindowClientCapabilities -> Maybe ShowDocumentClientCapabilities
_showDocument :: Maybe ShowDocumentClientCapabilities
    } 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
$cshowsPrec :: Int -> WindowClientCapabilities -> ShowS
showsPrec :: Int -> WindowClientCapabilities -> ShowS
$cshow :: WindowClientCapabilities -> String
show :: WindowClientCapabilities -> String
$cshowList :: [WindowClientCapabilities] -> ShowS
showList :: [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
$creadsPrec :: Int -> ReadS WindowClientCapabilities
readsPrec :: Int -> ReadS WindowClientCapabilities
$creadList :: ReadS [WindowClientCapabilities]
readList :: ReadS [WindowClientCapabilities]
$creadPrec :: ReadPrec WindowClientCapabilities
readPrec :: ReadPrec WindowClientCapabilities
$creadListPrec :: ReadPrec [WindowClientCapabilities]
readListPrec :: ReadPrec [WindowClientCapabilities]
Read, WindowClientCapabilities -> WindowClientCapabilities -> Bool
(WindowClientCapabilities -> WindowClientCapabilities -> Bool)
-> (WindowClientCapabilities -> WindowClientCapabilities -> Bool)
-> Eq WindowClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
== :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
$c/= :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
/= :: WindowClientCapabilities -> WindowClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''WindowClientCapabilities

instance Default WindowClientCapabilities where
  def :: WindowClientCapabilities
def = Maybe Bool
-> Maybe ShowMessageRequestClientCapabilities
-> Maybe ShowDocumentClientCapabilities
-> WindowClientCapabilities
WindowClientCapabilities Maybe Bool
forall a. Default a => a
def Maybe ShowMessageRequestClientCapabilities
forall a. Default a => a
def Maybe ShowDocumentClientCapabilities
forall a. Default a => a
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
    { StaleRequestClientCapabilities -> Bool
_cancel :: Bool
    , StaleRequestClientCapabilities -> List Text
_retryOnContentModified :: List Text
    } deriving (Int -> StaleRequestClientCapabilities -> ShowS
[StaleRequestClientCapabilities] -> ShowS
StaleRequestClientCapabilities -> String
(Int -> StaleRequestClientCapabilities -> ShowS)
-> (StaleRequestClientCapabilities -> String)
-> ([StaleRequestClientCapabilities] -> ShowS)
-> Show StaleRequestClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StaleRequestClientCapabilities -> ShowS
showsPrec :: Int -> StaleRequestClientCapabilities -> ShowS
$cshow :: StaleRequestClientCapabilities -> String
show :: StaleRequestClientCapabilities -> String
$cshowList :: [StaleRequestClientCapabilities] -> ShowS
showList :: [StaleRequestClientCapabilities] -> ShowS
Show, ReadPrec [StaleRequestClientCapabilities]
ReadPrec StaleRequestClientCapabilities
Int -> ReadS StaleRequestClientCapabilities
ReadS [StaleRequestClientCapabilities]
(Int -> ReadS StaleRequestClientCapabilities)
-> ReadS [StaleRequestClientCapabilities]
-> ReadPrec StaleRequestClientCapabilities
-> ReadPrec [StaleRequestClientCapabilities]
-> Read StaleRequestClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS StaleRequestClientCapabilities
readsPrec :: Int -> ReadS StaleRequestClientCapabilities
$creadList :: ReadS [StaleRequestClientCapabilities]
readList :: ReadS [StaleRequestClientCapabilities]
$creadPrec :: ReadPrec StaleRequestClientCapabilities
readPrec :: ReadPrec StaleRequestClientCapabilities
$creadListPrec :: ReadPrec [StaleRequestClientCapabilities]
readListPrec :: ReadPrec [StaleRequestClientCapabilities]
Read, StaleRequestClientCapabilities
-> StaleRequestClientCapabilities -> Bool
(StaleRequestClientCapabilities
 -> StaleRequestClientCapabilities -> Bool)
-> (StaleRequestClientCapabilities
    -> StaleRequestClientCapabilities -> Bool)
-> Eq StaleRequestClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StaleRequestClientCapabilities
-> StaleRequestClientCapabilities -> Bool
== :: StaleRequestClientCapabilities
-> StaleRequestClientCapabilities -> Bool
$c/= :: StaleRequestClientCapabilities
-> StaleRequestClientCapabilities -> Bool
/= :: StaleRequestClientCapabilities
-> StaleRequestClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''StaleRequestClientCapabilities

-- | Client capabilities specific to the used markdown parser.
-- @since 3.16.0
data RegularExpressionsClientCapabilities =
  RegularExpressionsClientCapabilities
    { RegularExpressionsClientCapabilities -> Text
_engine :: Text
    , RegularExpressionsClientCapabilities -> Maybe Text
_version :: Maybe Text
    } deriving (Int -> RegularExpressionsClientCapabilities -> ShowS
[RegularExpressionsClientCapabilities] -> ShowS
RegularExpressionsClientCapabilities -> String
(Int -> RegularExpressionsClientCapabilities -> ShowS)
-> (RegularExpressionsClientCapabilities -> String)
-> ([RegularExpressionsClientCapabilities] -> ShowS)
-> Show RegularExpressionsClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegularExpressionsClientCapabilities -> ShowS
showsPrec :: Int -> RegularExpressionsClientCapabilities -> ShowS
$cshow :: RegularExpressionsClientCapabilities -> String
show :: RegularExpressionsClientCapabilities -> String
$cshowList :: [RegularExpressionsClientCapabilities] -> ShowS
showList :: [RegularExpressionsClientCapabilities] -> ShowS
Show, ReadPrec [RegularExpressionsClientCapabilities]
ReadPrec RegularExpressionsClientCapabilities
Int -> ReadS RegularExpressionsClientCapabilities
ReadS [RegularExpressionsClientCapabilities]
(Int -> ReadS RegularExpressionsClientCapabilities)
-> ReadS [RegularExpressionsClientCapabilities]
-> ReadPrec RegularExpressionsClientCapabilities
-> ReadPrec [RegularExpressionsClientCapabilities]
-> Read RegularExpressionsClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS RegularExpressionsClientCapabilities
readsPrec :: Int -> ReadS RegularExpressionsClientCapabilities
$creadList :: ReadS [RegularExpressionsClientCapabilities]
readList :: ReadS [RegularExpressionsClientCapabilities]
$creadPrec :: ReadPrec RegularExpressionsClientCapabilities
readPrec :: ReadPrec RegularExpressionsClientCapabilities
$creadListPrec :: ReadPrec [RegularExpressionsClientCapabilities]
readListPrec :: ReadPrec [RegularExpressionsClientCapabilities]
Read, RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
(RegularExpressionsClientCapabilities
 -> RegularExpressionsClientCapabilities -> Bool)
-> (RegularExpressionsClientCapabilities
    -> RegularExpressionsClientCapabilities -> Bool)
-> Eq RegularExpressionsClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
== :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c/= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
/= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''RegularExpressionsClientCapabilities

-- | General client capabilities.
-- @since 3.16.0
data GeneralClientCapabilities =
  GeneralClientCapabilities
    {
      GeneralClientCapabilities -> Maybe StaleRequestClientCapabilities
_staleRequestSupport :: Maybe StaleRequestClientCapabilities
      -- | Client capabilities specific to regular expressions.
      -- @since 3.16.0
    , GeneralClientCapabilities
-> Maybe RegularExpressionsClientCapabilities
_regularExpressions :: Maybe RegularExpressionsClientCapabilities
      -- | Client capabilities specific to the client's markdown parser.
      -- @since 3.16.0
    , GeneralClientCapabilities -> Maybe MarkdownClientCapabilities
_markdown :: Maybe MarkdownClientCapabilities
    } deriving (Int -> GeneralClientCapabilities -> ShowS
[GeneralClientCapabilities] -> ShowS
GeneralClientCapabilities -> String
(Int -> GeneralClientCapabilities -> ShowS)
-> (GeneralClientCapabilities -> String)
-> ([GeneralClientCapabilities] -> ShowS)
-> Show GeneralClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GeneralClientCapabilities -> ShowS
showsPrec :: Int -> GeneralClientCapabilities -> ShowS
$cshow :: GeneralClientCapabilities -> String
show :: GeneralClientCapabilities -> String
$cshowList :: [GeneralClientCapabilities] -> ShowS
showList :: [GeneralClientCapabilities] -> ShowS
Show, ReadPrec [GeneralClientCapabilities]
ReadPrec GeneralClientCapabilities
Int -> ReadS GeneralClientCapabilities
ReadS [GeneralClientCapabilities]
(Int -> ReadS GeneralClientCapabilities)
-> ReadS [GeneralClientCapabilities]
-> ReadPrec GeneralClientCapabilities
-> ReadPrec [GeneralClientCapabilities]
-> Read GeneralClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS GeneralClientCapabilities
readsPrec :: Int -> ReadS GeneralClientCapabilities
$creadList :: ReadS [GeneralClientCapabilities]
readList :: ReadS [GeneralClientCapabilities]
$creadPrec :: ReadPrec GeneralClientCapabilities
readPrec :: ReadPrec GeneralClientCapabilities
$creadListPrec :: ReadPrec [GeneralClientCapabilities]
readListPrec :: ReadPrec [GeneralClientCapabilities]
Read, GeneralClientCapabilities -> GeneralClientCapabilities -> Bool
(GeneralClientCapabilities -> GeneralClientCapabilities -> Bool)
-> (GeneralClientCapabilities -> GeneralClientCapabilities -> Bool)
-> Eq GeneralClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GeneralClientCapabilities -> GeneralClientCapabilities -> Bool
== :: GeneralClientCapabilities -> GeneralClientCapabilities -> Bool
$c/= :: GeneralClientCapabilities -> GeneralClientCapabilities -> Bool
/= :: GeneralClientCapabilities -> GeneralClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''GeneralClientCapabilities

instance Default GeneralClientCapabilities where
  def :: GeneralClientCapabilities
def = Maybe StaleRequestClientCapabilities
-> Maybe RegularExpressionsClientCapabilities
-> Maybe MarkdownClientCapabilities
-> GeneralClientCapabilities
GeneralClientCapabilities Maybe StaleRequestClientCapabilities
forall a. Default a => a
def Maybe RegularExpressionsClientCapabilities
forall a. Default a => a
def Maybe MarkdownClientCapabilities
forall a. Default a => a
def

-- ---------------------------------------------------------------------

data ClientCapabilities =
  ClientCapabilities
    { -- | Workspace specific client capabilities
      ClientCapabilities -> Maybe WorkspaceClientCapabilities
_workspace    :: Maybe WorkspaceClientCapabilities
      -- | Text document specific client capabilities
    , ClientCapabilities -> Maybe TextDocumentClientCapabilities
_textDocument :: Maybe TextDocumentClientCapabilities
      -- | Window specific client capabilities.
    , ClientCapabilities -> Maybe WindowClientCapabilities
_window :: Maybe WindowClientCapabilities
      -- | General client capabilities.
      -- @since 3.16.0
    , ClientCapabilities -> Maybe GeneralClientCapabilities
_general :: Maybe GeneralClientCapabilities
      -- | Experimental client capabilities.
    , 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
$cshowsPrec :: Int -> ClientCapabilities -> ShowS
showsPrec :: Int -> ClientCapabilities -> ShowS
$cshow :: ClientCapabilities -> String
show :: ClientCapabilities -> String
$cshowList :: [ClientCapabilities] -> ShowS
showList :: [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
$creadsPrec :: Int -> ReadS ClientCapabilities
readsPrec :: Int -> ReadS ClientCapabilities
$creadList :: ReadS [ClientCapabilities]
readList :: ReadS [ClientCapabilities]
$creadPrec :: ReadPrec ClientCapabilities
readPrec :: ReadPrec ClientCapabilities
$creadListPrec :: ReadPrec [ClientCapabilities]
readListPrec :: ReadPrec [ClientCapabilities]
Read, ClientCapabilities -> ClientCapabilities -> Bool
(ClientCapabilities -> ClientCapabilities -> Bool)
-> (ClientCapabilities -> ClientCapabilities -> Bool)
-> Eq ClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClientCapabilities -> ClientCapabilities -> Bool
== :: ClientCapabilities -> ClientCapabilities -> Bool
$c/= :: ClientCapabilities -> ClientCapabilities -> Bool
/= :: ClientCapabilities -> ClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''ClientCapabilities

instance Default ClientCapabilities where
  def :: ClientCapabilities
def = Maybe WorkspaceClientCapabilities
-> Maybe TextDocumentClientCapabilities
-> Maybe WindowClientCapabilities
-> Maybe GeneralClientCapabilities
-> 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 GeneralClientCapabilities
forall a. Default a => a
def Maybe Object
forall a. Default a => a
def