{-# 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.
    TypeDefinitionClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool,
    -- | The client supports additional metadata in the form of definition links.
    --
    -- Since LSP 3.14.0
    TypeDefinitionClientCapabilities -> Maybe Bool
_linkSupport :: Maybe Bool
  }
  deriving (ReadPrec [TypeDefinitionClientCapabilities]
ReadPrec TypeDefinitionClientCapabilities
Int -> ReadS TypeDefinitionClientCapabilities
ReadS [TypeDefinitionClientCapabilities]
(Int -> ReadS TypeDefinitionClientCapabilities)
-> ReadS [TypeDefinitionClientCapabilities]
-> ReadPrec TypeDefinitionClientCapabilities
-> ReadPrec [TypeDefinitionClientCapabilities]
-> Read TypeDefinitionClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TypeDefinitionClientCapabilities
readsPrec :: Int -> ReadS TypeDefinitionClientCapabilities
$creadList :: ReadS [TypeDefinitionClientCapabilities]
readList :: ReadS [TypeDefinitionClientCapabilities]
$creadPrec :: ReadPrec TypeDefinitionClientCapabilities
readPrec :: ReadPrec TypeDefinitionClientCapabilities
$creadListPrec :: ReadPrec [TypeDefinitionClientCapabilities]
readListPrec :: ReadPrec [TypeDefinitionClientCapabilities]
Read, Int -> TypeDefinitionClientCapabilities -> ShowS
[TypeDefinitionClientCapabilities] -> ShowS
TypeDefinitionClientCapabilities -> String
(Int -> TypeDefinitionClientCapabilities -> ShowS)
-> (TypeDefinitionClientCapabilities -> String)
-> ([TypeDefinitionClientCapabilities] -> ShowS)
-> Show TypeDefinitionClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TypeDefinitionClientCapabilities -> ShowS
showsPrec :: Int -> TypeDefinitionClientCapabilities -> ShowS
$cshow :: TypeDefinitionClientCapabilities -> String
show :: TypeDefinitionClientCapabilities -> String
$cshowList :: [TypeDefinitionClientCapabilities] -> ShowS
showList :: [TypeDefinitionClientCapabilities] -> ShowS
Show, TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
(TypeDefinitionClientCapabilities
 -> TypeDefinitionClientCapabilities -> Bool)
-> (TypeDefinitionClientCapabilities
    -> TypeDefinitionClientCapabilities -> Bool)
-> Eq TypeDefinitionClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
== :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
$c/= :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
/= :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
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