{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.References where
import Data.Aeson.TH
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Progress
import Language.LSP.Types.Utils
data ReferencesClientCapabilities =
ReferencesClientCapabilities
{
_dynamicRegistration :: Maybe Bool
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''ReferencesClientCapabilities
makeExtendingDatatype "ReferenceOptions" [''WorkDoneProgressOptions] []
deriveJSON lspOptions ''ReferenceOptions
makeExtendingDatatype "ReferenceRegistrationOptions"
[ ''TextDocumentRegistrationOptions
, ''ReferenceOptions
]
[]
deriveJSON lspOptions ''ReferenceRegistrationOptions
data ReferenceContext =
ReferenceContext
{
_includeDeclaration :: Bool
} deriving (Read,Show,Eq)
deriveJSON lspOptions ''ReferenceContext
makeExtendingDatatype "ReferenceParams"
[ ''TextDocumentPositionParams
, ''WorkDoneProgressParams
, ''PartialResultParams
]
[("_context", [t| ReferenceContext |])]
deriveJSON lspOptions ''ReferenceParams