{-# 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
(Int -> CodeLensClientCapabilities -> ShowS)
-> (CodeLensClientCapabilities -> String)
-> ([CodeLensClientCapabilities] -> ShowS)
-> Show CodeLensClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CodeLensClientCapabilities -> ShowS
showsPrec :: Int -> CodeLensClientCapabilities -> ShowS
$cshow :: CodeLensClientCapabilities -> String
show :: CodeLensClientCapabilities -> String
$cshowList :: [CodeLensClientCapabilities] -> ShowS
showList :: [CodeLensClientCapabilities] -> ShowS
Show, ReadPrec [CodeLensClientCapabilities]
ReadPrec CodeLensClientCapabilities
Int -> ReadS CodeLensClientCapabilities
ReadS [CodeLensClientCapabilities]
(Int -> ReadS CodeLensClientCapabilities)
-> ReadS [CodeLensClientCapabilities]
-> ReadPrec CodeLensClientCapabilities
-> ReadPrec [CodeLensClientCapabilities]
-> Read CodeLensClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CodeLensClientCapabilities
readsPrec :: Int -> ReadS CodeLensClientCapabilities
$creadList :: ReadS [CodeLensClientCapabilities]
readList :: ReadS [CodeLensClientCapabilities]
$creadPrec :: ReadPrec CodeLensClientCapabilities
readPrec :: ReadPrec CodeLensClientCapabilities
$creadListPrec :: ReadPrec [CodeLensClientCapabilities]
readListPrec :: ReadPrec [CodeLensClientCapabilities]
Read, CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
(CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool)
-> (CodeLensClientCapabilities
-> CodeLensClientCapabilities -> Bool)
-> Eq CodeLensClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c/= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
/= :: 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]
(Int -> ReadS CodeLens)
-> ReadS [CodeLens]
-> ReadPrec CodeLens
-> ReadPrec [CodeLens]
-> Read CodeLens
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CodeLens
readsPrec :: Int -> ReadS CodeLens
$creadList :: ReadS [CodeLens]
readList :: ReadS [CodeLens]
$creadPrec :: ReadPrec CodeLens
readPrec :: ReadPrec CodeLens
$creadListPrec :: ReadPrec [CodeLens]
readListPrec :: ReadPrec [CodeLens]
Read,Int -> CodeLens -> ShowS
[CodeLens] -> ShowS
CodeLens -> String
(Int -> CodeLens -> ShowS)
-> (CodeLens -> String) -> ([CodeLens] -> ShowS) -> Show CodeLens
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CodeLens -> ShowS
showsPrec :: Int -> CodeLens -> ShowS
$cshow :: CodeLens -> String
show :: CodeLens -> String
$cshowList :: [CodeLens] -> ShowS
showList :: [CodeLens] -> ShowS
Show,CodeLens -> CodeLens -> Bool
(CodeLens -> CodeLens -> Bool)
-> (CodeLens -> CodeLens -> Bool) -> Eq CodeLens
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeLens -> CodeLens -> Bool
== :: CodeLens -> CodeLens -> Bool
$c/= :: CodeLens -> CodeLens -> Bool
/= :: CodeLens -> CodeLens -> Bool
Eq)
deriveJSON lspOptions ''CodeLens