{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.SignatureHelp where
import Data.Aeson
import Data.Aeson.TH
import Data.Text (Text)
import Language.LSP.Types.Common
import Language.LSP.Types.MarkupContent
import Language.LSP.Types.Progress
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Utils
import Control.Applicative (Alternative((<|>)))
data SignatureHelpParameterInformation =
SignatureHelpParameterInformation
{
SignatureHelpParameterInformation -> Maybe Bool
_labelOffsetSupport :: Maybe Bool
}
deriving (ReadPrec [SignatureHelpParameterInformation]
ReadPrec SignatureHelpParameterInformation
Int -> ReadS SignatureHelpParameterInformation
ReadS [SignatureHelpParameterInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpParameterInformation]
$creadListPrec :: ReadPrec [SignatureHelpParameterInformation]
readPrec :: ReadPrec SignatureHelpParameterInformation
$creadPrec :: ReadPrec SignatureHelpParameterInformation
readList :: ReadS [SignatureHelpParameterInformation]
$creadList :: ReadS [SignatureHelpParameterInformation]
readsPrec :: Int -> ReadS SignatureHelpParameterInformation
$creadsPrec :: Int -> ReadS SignatureHelpParameterInformation
Read, Int -> SignatureHelpParameterInformation -> ShowS
[SignatureHelpParameterInformation] -> ShowS
SignatureHelpParameterInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpParameterInformation] -> ShowS
$cshowList :: [SignatureHelpParameterInformation] -> ShowS
show :: SignatureHelpParameterInformation -> String
$cshow :: SignatureHelpParameterInformation -> String
showsPrec :: Int -> SignatureHelpParameterInformation -> ShowS
$cshowsPrec :: Int -> SignatureHelpParameterInformation -> ShowS
Show, SignatureHelpParameterInformation
-> SignatureHelpParameterInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpParameterInformation
-> SignatureHelpParameterInformation -> Bool
$c/= :: SignatureHelpParameterInformation
-> SignatureHelpParameterInformation -> Bool
== :: SignatureHelpParameterInformation
-> SignatureHelpParameterInformation -> Bool
$c== :: SignatureHelpParameterInformation
-> SignatureHelpParameterInformation -> Bool
Eq)
deriveJSON lspOptions ''SignatureHelpParameterInformation
data SignatureHelpSignatureInformation =
SignatureHelpSignatureInformation
{
SignatureHelpSignatureInformation -> Maybe (List MarkupKind)
_documentationFormat :: Maybe (List MarkupKind)
, SignatureHelpSignatureInformation
-> Maybe SignatureHelpParameterInformation
_parameterInformation :: Maybe SignatureHelpParameterInformation
, SignatureHelpSignatureInformation -> Maybe Bool
_activeParameterSuport :: Maybe Bool
}
deriving (Int -> SignatureHelpSignatureInformation -> ShowS
[SignatureHelpSignatureInformation] -> ShowS
SignatureHelpSignatureInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpSignatureInformation] -> ShowS
$cshowList :: [SignatureHelpSignatureInformation] -> ShowS
show :: SignatureHelpSignatureInformation -> String
$cshow :: SignatureHelpSignatureInformation -> String
showsPrec :: Int -> SignatureHelpSignatureInformation -> ShowS
$cshowsPrec :: Int -> SignatureHelpSignatureInformation -> ShowS
Show, ReadPrec [SignatureHelpSignatureInformation]
ReadPrec SignatureHelpSignatureInformation
Int -> ReadS SignatureHelpSignatureInformation
ReadS [SignatureHelpSignatureInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpSignatureInformation]
$creadListPrec :: ReadPrec [SignatureHelpSignatureInformation]
readPrec :: ReadPrec SignatureHelpSignatureInformation
$creadPrec :: ReadPrec SignatureHelpSignatureInformation
readList :: ReadS [SignatureHelpSignatureInformation]
$creadList :: ReadS [SignatureHelpSignatureInformation]
readsPrec :: Int -> ReadS SignatureHelpSignatureInformation
$creadsPrec :: Int -> ReadS SignatureHelpSignatureInformation
Read, SignatureHelpSignatureInformation
-> SignatureHelpSignatureInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpSignatureInformation
-> SignatureHelpSignatureInformation -> Bool
$c/= :: SignatureHelpSignatureInformation
-> SignatureHelpSignatureInformation -> Bool
== :: SignatureHelpSignatureInformation
-> SignatureHelpSignatureInformation -> Bool
$c== :: SignatureHelpSignatureInformation
-> SignatureHelpSignatureInformation -> Bool
Eq)
deriveJSON lspOptions ''SignatureHelpSignatureInformation
data SignatureHelpClientCapabilities =
SignatureHelpClientCapabilities
{
SignatureHelpClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool
, SignatureHelpClientCapabilities
-> Maybe SignatureHelpSignatureInformation
_signatureInformation :: Maybe SignatureHelpSignatureInformation
, SignatureHelpClientCapabilities -> Maybe Bool
_contextSupport :: Maybe Bool
} deriving (Int -> SignatureHelpClientCapabilities -> ShowS
[SignatureHelpClientCapabilities] -> ShowS
SignatureHelpClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpClientCapabilities] -> ShowS
$cshowList :: [SignatureHelpClientCapabilities] -> ShowS
show :: SignatureHelpClientCapabilities -> String
$cshow :: SignatureHelpClientCapabilities -> String
showsPrec :: Int -> SignatureHelpClientCapabilities -> ShowS
$cshowsPrec :: Int -> SignatureHelpClientCapabilities -> ShowS
Show, ReadPrec [SignatureHelpClientCapabilities]
ReadPrec SignatureHelpClientCapabilities
Int -> ReadS SignatureHelpClientCapabilities
ReadS [SignatureHelpClientCapabilities]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpClientCapabilities]
$creadListPrec :: ReadPrec [SignatureHelpClientCapabilities]
readPrec :: ReadPrec SignatureHelpClientCapabilities
$creadPrec :: ReadPrec SignatureHelpClientCapabilities
readList :: ReadS [SignatureHelpClientCapabilities]
$creadList :: ReadS [SignatureHelpClientCapabilities]
readsPrec :: Int -> ReadS SignatureHelpClientCapabilities
$creadsPrec :: Int -> ReadS SignatureHelpClientCapabilities
Read, SignatureHelpClientCapabilities
-> SignatureHelpClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpClientCapabilities
-> SignatureHelpClientCapabilities -> Bool
$c/= :: SignatureHelpClientCapabilities
-> SignatureHelpClientCapabilities -> Bool
== :: SignatureHelpClientCapabilities
-> SignatureHelpClientCapabilities -> Bool
$c== :: SignatureHelpClientCapabilities
-> SignatureHelpClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''SignatureHelpClientCapabilities
makeExtendingDatatype "SignatureHelpOptions" [''WorkDoneProgressOptions]
[ ("_triggerCharacters", [t| Maybe (List Text) |])
, ("_retriggerCharacters", [t| Maybe (List Text) |])
]
deriveJSON lspOptions ''SignatureHelpOptions
makeExtendingDatatype "SignatureHelpRegistrationOptions"
[ ''TextDocumentRegistrationOptions
, ''SignatureHelpOptions
] []
deriveJSON lspOptions ''SignatureHelpRegistrationOptions
data SignatureHelpDoc = SignatureHelpDocString Text | SignatureHelpDocMarkup MarkupContent
deriving (ReadPrec [SignatureHelpDoc]
ReadPrec SignatureHelpDoc
Int -> ReadS SignatureHelpDoc
ReadS [SignatureHelpDoc]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpDoc]
$creadListPrec :: ReadPrec [SignatureHelpDoc]
readPrec :: ReadPrec SignatureHelpDoc
$creadPrec :: ReadPrec SignatureHelpDoc
readList :: ReadS [SignatureHelpDoc]
$creadList :: ReadS [SignatureHelpDoc]
readsPrec :: Int -> ReadS SignatureHelpDoc
$creadsPrec :: Int -> ReadS SignatureHelpDoc
Read,Int -> SignatureHelpDoc -> ShowS
[SignatureHelpDoc] -> ShowS
SignatureHelpDoc -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpDoc] -> ShowS
$cshowList :: [SignatureHelpDoc] -> ShowS
show :: SignatureHelpDoc -> String
$cshow :: SignatureHelpDoc -> String
showsPrec :: Int -> SignatureHelpDoc -> ShowS
$cshowsPrec :: Int -> SignatureHelpDoc -> ShowS
Show,SignatureHelpDoc -> SignatureHelpDoc -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpDoc -> SignatureHelpDoc -> Bool
$c/= :: SignatureHelpDoc -> SignatureHelpDoc -> Bool
== :: SignatureHelpDoc -> SignatureHelpDoc -> Bool
$c== :: SignatureHelpDoc -> SignatureHelpDoc -> Bool
Eq)
deriveJSON lspOptionsUntagged ''SignatureHelpDoc
data ParameterLabel = ParameterLabelString Text | ParameterLabelOffset UInt UInt
deriving (ReadPrec [ParameterLabel]
ReadPrec ParameterLabel
Int -> ReadS ParameterLabel
ReadS [ParameterLabel]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterLabel]
$creadListPrec :: ReadPrec [ParameterLabel]
readPrec :: ReadPrec ParameterLabel
$creadPrec :: ReadPrec ParameterLabel
readList :: ReadS [ParameterLabel]
$creadList :: ReadS [ParameterLabel]
readsPrec :: Int -> ReadS ParameterLabel
$creadsPrec :: Int -> ReadS ParameterLabel
Read,Int -> ParameterLabel -> ShowS
[ParameterLabel] -> ShowS
ParameterLabel -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterLabel] -> ShowS
$cshowList :: [ParameterLabel] -> ShowS
show :: ParameterLabel -> String
$cshow :: ParameterLabel -> String
showsPrec :: Int -> ParameterLabel -> ShowS
$cshowsPrec :: Int -> ParameterLabel -> ShowS
Show,ParameterLabel -> ParameterLabel -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterLabel -> ParameterLabel -> Bool
$c/= :: ParameterLabel -> ParameterLabel -> Bool
== :: ParameterLabel -> ParameterLabel -> Bool
$c== :: ParameterLabel -> ParameterLabel -> Bool
Eq)
instance ToJSON ParameterLabel where
toJSON :: ParameterLabel -> Value
toJSON (ParameterLabelString Text
t) = forall a. ToJSON a => a -> Value
toJSON Text
t
toJSON (ParameterLabelOffset UInt
l UInt
h) = forall a. ToJSON a => a -> Value
toJSON [UInt
l, UInt
h]
instance FromJSON ParameterLabel where
parseJSON :: Value -> Parser ParameterLabel
parseJSON Value
x = Text -> ParameterLabel
ParameterLabelString forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a. FromJSON a => Value -> Parser a
parseJSON Value
x forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Value -> Parser ParameterLabel
parseInterval Value
x
where
parseInterval :: Value -> Parser ParameterLabel
parseInterval v :: Value
v@(Array Array
_) = do
[UInt]
is <- forall a. FromJSON a => Value -> Parser a
parseJSON Value
v
case [UInt]
is of
[UInt
l, UInt
h] -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ UInt -> UInt -> ParameterLabel
ParameterLabelOffset UInt
l UInt
h
[UInt]
_ -> forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"ParameterLabel"
parseInterval Value
_ = forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"ParameterLabel"
data ParameterInformation =
ParameterInformation
{ ParameterInformation -> ParameterLabel
_label :: ParameterLabel
, ParameterInformation -> Maybe SignatureHelpDoc
_documentation :: Maybe SignatureHelpDoc
} deriving (ReadPrec [ParameterInformation]
ReadPrec ParameterInformation
Int -> ReadS ParameterInformation
ReadS [ParameterInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterInformation]
$creadListPrec :: ReadPrec [ParameterInformation]
readPrec :: ReadPrec ParameterInformation
$creadPrec :: ReadPrec ParameterInformation
readList :: ReadS [ParameterInformation]
$creadList :: ReadS [ParameterInformation]
readsPrec :: Int -> ReadS ParameterInformation
$creadsPrec :: Int -> ReadS ParameterInformation
Read,Int -> ParameterInformation -> ShowS
[ParameterInformation] -> ShowS
ParameterInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterInformation] -> ShowS
$cshowList :: [ParameterInformation] -> ShowS
show :: ParameterInformation -> String
$cshow :: ParameterInformation -> String
showsPrec :: Int -> ParameterInformation -> ShowS
$cshowsPrec :: Int -> ParameterInformation -> ShowS
Show,ParameterInformation -> ParameterInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterInformation -> ParameterInformation -> Bool
$c/= :: ParameterInformation -> ParameterInformation -> Bool
== :: ParameterInformation -> ParameterInformation -> Bool
$c== :: ParameterInformation -> ParameterInformation -> Bool
Eq)
deriveJSON lspOptions ''ParameterInformation
data SignatureInformation =
SignatureInformation
{ SignatureInformation -> Text
_label :: Text
, SignatureInformation -> Maybe SignatureHelpDoc
_documentation :: Maybe SignatureHelpDoc
, SignatureInformation -> Maybe (List ParameterInformation)
_parameters :: Maybe (List ParameterInformation)
, SignatureInformation -> Maybe UInt
_activeParameter :: Maybe UInt
} deriving (ReadPrec [SignatureInformation]
ReadPrec SignatureInformation
Int -> ReadS SignatureInformation
ReadS [SignatureInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureInformation]
$creadListPrec :: ReadPrec [SignatureInformation]
readPrec :: ReadPrec SignatureInformation
$creadPrec :: ReadPrec SignatureInformation
readList :: ReadS [SignatureInformation]
$creadList :: ReadS [SignatureInformation]
readsPrec :: Int -> ReadS SignatureInformation
$creadsPrec :: Int -> ReadS SignatureInformation
Read,Int -> SignatureInformation -> ShowS
[SignatureInformation] -> ShowS
SignatureInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureInformation] -> ShowS
$cshowList :: [SignatureInformation] -> ShowS
show :: SignatureInformation -> String
$cshow :: SignatureInformation -> String
showsPrec :: Int -> SignatureInformation -> ShowS
$cshowsPrec :: Int -> SignatureInformation -> ShowS
Show,SignatureInformation -> SignatureInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureInformation -> SignatureInformation -> Bool
$c/= :: SignatureInformation -> SignatureInformation -> Bool
== :: SignatureInformation -> SignatureInformation -> Bool
$c== :: SignatureInformation -> SignatureInformation -> Bool
Eq)
deriveJSON lspOptions ''SignatureInformation
data SignatureHelp =
SignatureHelp
{ SignatureHelp -> List SignatureInformation
_signatures :: List SignatureInformation
, SignatureHelp -> Maybe UInt
_activeSignature :: Maybe UInt
, SignatureHelp -> Maybe UInt
_activeParameter :: Maybe UInt
} deriving (ReadPrec [SignatureHelp]
ReadPrec SignatureHelp
Int -> ReadS SignatureHelp
ReadS [SignatureHelp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelp]
$creadListPrec :: ReadPrec [SignatureHelp]
readPrec :: ReadPrec SignatureHelp
$creadPrec :: ReadPrec SignatureHelp
readList :: ReadS [SignatureHelp]
$creadList :: ReadS [SignatureHelp]
readsPrec :: Int -> ReadS SignatureHelp
$creadsPrec :: Int -> ReadS SignatureHelp
Read,Int -> SignatureHelp -> ShowS
[SignatureHelp] -> ShowS
SignatureHelp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelp] -> ShowS
$cshowList :: [SignatureHelp] -> ShowS
show :: SignatureHelp -> String
$cshow :: SignatureHelp -> String
showsPrec :: Int -> SignatureHelp -> ShowS
$cshowsPrec :: Int -> SignatureHelp -> ShowS
Show,SignatureHelp -> SignatureHelp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelp -> SignatureHelp -> Bool
$c/= :: SignatureHelp -> SignatureHelp -> Bool
== :: SignatureHelp -> SignatureHelp -> Bool
$c== :: SignatureHelp -> SignatureHelp -> Bool
Eq)
deriveJSON lspOptions ''SignatureHelp
data SignatureHelpTriggerKind = SHTKInvoked
| SHTKTriggerCharacter
| SHTKContentChange
deriving (ReadPrec [SignatureHelpTriggerKind]
ReadPrec SignatureHelpTriggerKind
Int -> ReadS SignatureHelpTriggerKind
ReadS [SignatureHelpTriggerKind]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpTriggerKind]
$creadListPrec :: ReadPrec [SignatureHelpTriggerKind]
readPrec :: ReadPrec SignatureHelpTriggerKind
$creadPrec :: ReadPrec SignatureHelpTriggerKind
readList :: ReadS [SignatureHelpTriggerKind]
$creadList :: ReadS [SignatureHelpTriggerKind]
readsPrec :: Int -> ReadS SignatureHelpTriggerKind
$creadsPrec :: Int -> ReadS SignatureHelpTriggerKind
Read,Int -> SignatureHelpTriggerKind -> ShowS
[SignatureHelpTriggerKind] -> ShowS
SignatureHelpTriggerKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpTriggerKind] -> ShowS
$cshowList :: [SignatureHelpTriggerKind] -> ShowS
show :: SignatureHelpTriggerKind -> String
$cshow :: SignatureHelpTriggerKind -> String
showsPrec :: Int -> SignatureHelpTriggerKind -> ShowS
$cshowsPrec :: Int -> SignatureHelpTriggerKind -> ShowS
Show,SignatureHelpTriggerKind -> SignatureHelpTriggerKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpTriggerKind -> SignatureHelpTriggerKind -> Bool
$c/= :: SignatureHelpTriggerKind -> SignatureHelpTriggerKind -> Bool
== :: SignatureHelpTriggerKind -> SignatureHelpTriggerKind -> Bool
$c== :: SignatureHelpTriggerKind -> SignatureHelpTriggerKind -> Bool
Eq)
instance ToJSON SignatureHelpTriggerKind where
toJSON :: SignatureHelpTriggerKind -> Value
toJSON SignatureHelpTriggerKind
SHTKInvoked = Scientific -> Value
Number Scientific
1
toJSON SignatureHelpTriggerKind
SHTKTriggerCharacter = Scientific -> Value
Number Scientific
2
toJSON SignatureHelpTriggerKind
SHTKContentChange = Scientific -> Value
Number Scientific
3
instance FromJSON SignatureHelpTriggerKind where
parseJSON :: Value -> Parser SignatureHelpTriggerKind
parseJSON (Number Scientific
1) = forall (f :: * -> *) a. Applicative f => a -> f a
pure SignatureHelpTriggerKind
SHTKInvoked
parseJSON (Number Scientific
2) = forall (f :: * -> *) a. Applicative f => a -> f a
pure SignatureHelpTriggerKind
SHTKTriggerCharacter
parseJSON (Number Scientific
3) = forall (f :: * -> *) a. Applicative f => a -> f a
pure SignatureHelpTriggerKind
SHTKContentChange
parseJSON Value
_ = forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"SignatureHelpTriggerKind"
data SignatureHelpContext =
SignatureHelpContext
{
SignatureHelpContext -> SignatureHelpTriggerKind
_triggerKind :: SignatureHelpTriggerKind
, SignatureHelpContext -> Maybe Text
_triggerCharacter :: Maybe Text
, SignatureHelpContext -> Bool
_isRetrigger :: Bool
, SignatureHelpContext -> Maybe SignatureHelp
_activeSignatureHelp :: Maybe SignatureHelp
}
deriving (ReadPrec [SignatureHelpContext]
ReadPrec SignatureHelpContext
Int -> ReadS SignatureHelpContext
ReadS [SignatureHelpContext]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureHelpContext]
$creadListPrec :: ReadPrec [SignatureHelpContext]
readPrec :: ReadPrec SignatureHelpContext
$creadPrec :: ReadPrec SignatureHelpContext
readList :: ReadS [SignatureHelpContext]
$creadList :: ReadS [SignatureHelpContext]
readsPrec :: Int -> ReadS SignatureHelpContext
$creadsPrec :: Int -> ReadS SignatureHelpContext
Read,Int -> SignatureHelpContext -> ShowS
[SignatureHelpContext] -> ShowS
SignatureHelpContext -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureHelpContext] -> ShowS
$cshowList :: [SignatureHelpContext] -> ShowS
show :: SignatureHelpContext -> String
$cshow :: SignatureHelpContext -> String
showsPrec :: Int -> SignatureHelpContext -> ShowS
$cshowsPrec :: Int -> SignatureHelpContext -> ShowS
Show,SignatureHelpContext -> SignatureHelpContext -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureHelpContext -> SignatureHelpContext -> Bool
$c/= :: SignatureHelpContext -> SignatureHelpContext -> Bool
== :: SignatureHelpContext -> SignatureHelpContext -> Bool
$c== :: SignatureHelpContext -> SignatureHelpContext -> Bool
Eq)
deriveJSON lspOptions ''SignatureHelpContext
makeExtendingDatatype "SignatureHelpParams"
[ ''TextDocumentPositionParams
, ''WorkDoneProgressParams
]
[ ("_context", [t| Maybe SignatureHelpContext |])
]
deriveJSON lspOptions ''SignatureHelpParams