{-# 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
import Data.Text (Text)
data DocumentLinkClientCapabilities =
DocumentLinkClientCapabilities
{
DocumentLinkClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool
, DocumentLinkClientCapabilities -> Maybe Bool
_tooltipSupport :: Maybe Bool
} deriving (ReadPrec [DocumentLinkClientCapabilities]
ReadPrec DocumentLinkClientCapabilities
Int -> ReadS DocumentLinkClientCapabilities
ReadS [DocumentLinkClientCapabilities]
(Int -> ReadS DocumentLinkClientCapabilities)
-> ReadS [DocumentLinkClientCapabilities]
-> ReadPrec DocumentLinkClientCapabilities
-> ReadPrec [DocumentLinkClientCapabilities]
-> Read DocumentLinkClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DocumentLinkClientCapabilities
readsPrec :: Int -> ReadS DocumentLinkClientCapabilities
$creadList :: ReadS [DocumentLinkClientCapabilities]
readList :: ReadS [DocumentLinkClientCapabilities]
$creadPrec :: ReadPrec DocumentLinkClientCapabilities
readPrec :: ReadPrec DocumentLinkClientCapabilities
$creadListPrec :: ReadPrec [DocumentLinkClientCapabilities]
readListPrec :: ReadPrec [DocumentLinkClientCapabilities]
Read, Int -> DocumentLinkClientCapabilities -> ShowS
[DocumentLinkClientCapabilities] -> ShowS
DocumentLinkClientCapabilities -> String
(Int -> DocumentLinkClientCapabilities -> ShowS)
-> (DocumentLinkClientCapabilities -> String)
-> ([DocumentLinkClientCapabilities] -> ShowS)
-> Show DocumentLinkClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentLinkClientCapabilities -> ShowS
showsPrec :: Int -> DocumentLinkClientCapabilities -> ShowS
$cshow :: DocumentLinkClientCapabilities -> String
show :: DocumentLinkClientCapabilities -> String
$cshowList :: [DocumentLinkClientCapabilities] -> ShowS
showList :: [DocumentLinkClientCapabilities] -> ShowS
Show, DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool
(DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool)
-> (DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool)
-> Eq DocumentLinkClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool
== :: DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool
$c/= :: DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool
/= :: DocumentLinkClientCapabilities
-> DocumentLinkClientCapabilities -> Bool
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
{
DocumentLink -> Range
_range :: Range
, DocumentLink -> Maybe Uri
_target :: Maybe Uri
, DocumentLink -> Maybe Text
_tooltip :: Maybe Text
, DocumentLink -> Maybe Value
_xdata :: Maybe Value
} deriving (ReadPrec [DocumentLink]
ReadPrec DocumentLink
Int -> ReadS DocumentLink
ReadS [DocumentLink]
(Int -> ReadS DocumentLink)
-> ReadS [DocumentLink]
-> ReadPrec DocumentLink
-> ReadPrec [DocumentLink]
-> Read DocumentLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DocumentLink
readsPrec :: Int -> ReadS DocumentLink
$creadList :: ReadS [DocumentLink]
readList :: ReadS [DocumentLink]
$creadPrec :: ReadPrec DocumentLink
readPrec :: ReadPrec DocumentLink
$creadListPrec :: ReadPrec [DocumentLink]
readListPrec :: ReadPrec [DocumentLink]
Read, Int -> DocumentLink -> ShowS
[DocumentLink] -> ShowS
DocumentLink -> String
(Int -> DocumentLink -> ShowS)
-> (DocumentLink -> String)
-> ([DocumentLink] -> ShowS)
-> Show DocumentLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentLink -> ShowS
showsPrec :: Int -> DocumentLink -> ShowS
$cshow :: DocumentLink -> String
show :: DocumentLink -> String
$cshowList :: [DocumentLink] -> ShowS
showList :: [DocumentLink] -> ShowS
Show, DocumentLink -> DocumentLink -> Bool
(DocumentLink -> DocumentLink -> Bool)
-> (DocumentLink -> DocumentLink -> Bool) -> Eq DocumentLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentLink -> DocumentLink -> Bool
== :: DocumentLink -> DocumentLink -> Bool
$c/= :: DocumentLink -> DocumentLink -> Bool
/= :: DocumentLink -> DocumentLink -> Bool
Eq)
deriveJSON lspOptions ''DocumentLink