{-# 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]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TypeDefinitionClientCapabilities]
$creadListPrec :: ReadPrec [TypeDefinitionClientCapabilities]
readPrec :: ReadPrec TypeDefinitionClientCapabilities
$creadPrec :: ReadPrec TypeDefinitionClientCapabilities
readList :: ReadS [TypeDefinitionClientCapabilities]
$creadList :: ReadS [TypeDefinitionClientCapabilities]
readsPrec :: Int -> ReadS TypeDefinitionClientCapabilities
$creadsPrec :: Int -> ReadS TypeDefinitionClientCapabilities
Read, Int -> TypeDefinitionClientCapabilities -> ShowS
[TypeDefinitionClientCapabilities] -> ShowS
TypeDefinitionClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeDefinitionClientCapabilities] -> ShowS
$cshowList :: [TypeDefinitionClientCapabilities] -> ShowS
show :: TypeDefinitionClientCapabilities -> String
$cshow :: TypeDefinitionClientCapabilities -> String
showsPrec :: Int -> TypeDefinitionClientCapabilities -> ShowS
$cshowsPrec :: Int -> TypeDefinitionClientCapabilities -> ShowS
Show, TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
$c/= :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
== :: TypeDefinitionClientCapabilities
-> TypeDefinitionClientCapabilities -> Bool
$c== :: 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