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