{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.DocumentLink where
import Data.Aeson
import Data.Aeson.TH
import Language.LSP.Types.Location
import Language.LSP.Types.Progress
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Uri
import Language.LSP.Types.Utils
data DocumentLinkClientCapabilities =
DocumentLinkClientCapabilities
{
_dynamicRegistration :: Maybe Bool
, _tooltipSupport :: Maybe Bool
} deriving (Read, Show, Eq)
deriveJSON lspOptions ''DocumentLinkClientCapabilities
makeExtendingDatatype "DocumentLinkOptions" [''WorkDoneProgressOptions]
[("_resolveProvider", [t| Maybe Bool |])]
deriveJSON lspOptions ''DocumentLinkOptions
makeExtendingDatatype "DocumentLinkRegistrationOptions"
[ ''TextDocumentRegistrationOptions
, ''DocumentLinkOptions
] []
deriveJSON lspOptions ''DocumentLinkRegistrationOptions
makeExtendingDatatype "DocumentLinkParams"
[ ''WorkDoneProgressParams
, ''PartialResultParams
]
[("_textDocument", [t| TextDocumentIdentifier |])]
deriveJSON lspOptions ''DocumentLinkParams
data DocumentLink =
DocumentLink
{
_range :: Range
, _target :: Maybe Uri
, _tooltip :: Maybe String
, _xdata :: Maybe Value
} deriving (Read, Show, Eq)
deriveJSON lspOptions ''DocumentLink