{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.CodeLens where
import Data.Aeson
import Data.Aeson.TH
import Language.LSP.Types.Command
import Language.LSP.Types.Location
import Language.LSP.Types.Progress
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Utils
data CodeLensClientCapabilities =
CodeLensClientCapabilities
{
CodeLensClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool
} deriving (Int -> CodeLensClientCapabilities -> ShowS
[CodeLensClientCapabilities] -> ShowS
CodeLensClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeLensClientCapabilities] -> ShowS
$cshowList :: [CodeLensClientCapabilities] -> ShowS
show :: CodeLensClientCapabilities -> String
$cshow :: CodeLensClientCapabilities -> String
showsPrec :: Int -> CodeLensClientCapabilities -> ShowS
$cshowsPrec :: Int -> CodeLensClientCapabilities -> ShowS
Show, ReadPrec [CodeLensClientCapabilities]
ReadPrec CodeLensClientCapabilities
Int -> ReadS CodeLensClientCapabilities
ReadS [CodeLensClientCapabilities]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeLensClientCapabilities]
$creadListPrec :: ReadPrec [CodeLensClientCapabilities]
readPrec :: ReadPrec CodeLensClientCapabilities
$creadPrec :: ReadPrec CodeLensClientCapabilities
readList :: ReadS [CodeLensClientCapabilities]
$creadList :: ReadS [CodeLensClientCapabilities]
readsPrec :: Int -> ReadS CodeLensClientCapabilities
$creadsPrec :: Int -> ReadS CodeLensClientCapabilities
Read, CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c/= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CodeLensClientCapabilities
makeExtendingDatatype "CodeLensOptions" [''WorkDoneProgressOptions]
[ ("_resolveProvider", [t| Maybe Bool |] )]
deriveJSON lspOptions ''CodeLensOptions
makeExtendingDatatype "CodeLensRegistrationOptions"
[ ''TextDocumentRegistrationOptions
, ''CodeLensOptions
] []
deriveJSON lspOptions ''CodeLensRegistrationOptions
makeExtendingDatatype "CodeLensParams"
[ ''WorkDoneProgressParams,
''PartialResultParams
]
[("_textDocument", [t|TextDocumentIdentifier|])]
deriveJSON lspOptions ''CodeLensParams
data CodeLens =
CodeLens
{
CodeLens -> Range
_range :: Range
,
CodeLens -> Maybe Command
_command :: Maybe Command
,
CodeLens -> Maybe Value
_xdata :: Maybe Value
} deriving (ReadPrec [CodeLens]
ReadPrec CodeLens
Int -> ReadS CodeLens
ReadS [CodeLens]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeLens]
$creadListPrec :: ReadPrec [CodeLens]
readPrec :: ReadPrec CodeLens
$creadPrec :: ReadPrec CodeLens
readList :: ReadS [CodeLens]
$creadList :: ReadS [CodeLens]
readsPrec :: Int -> ReadS CodeLens
$creadsPrec :: Int -> ReadS CodeLens
Read,Int -> CodeLens -> ShowS
[CodeLens] -> ShowS
CodeLens -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeLens] -> ShowS
$cshowList :: [CodeLens] -> ShowS
show :: CodeLens -> String
$cshow :: CodeLens -> String
showsPrec :: Int -> CodeLens -> ShowS
$cshowsPrec :: Int -> CodeLens -> ShowS
Show,CodeLens -> CodeLens -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeLens -> CodeLens -> Bool
$c/= :: CodeLens -> CodeLens -> Bool
== :: CodeLens -> CodeLens -> Bool
$c== :: CodeLens -> CodeLens -> Bool
Eq)
deriveJSON lspOptions ''CodeLens