{-# 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
{
_dynamicRegistration :: Maybe Bool
} deriving (Show, Read, 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
{
_range :: Range
,
_command :: Maybe Command
,
_xdata :: Maybe Value
} deriving (Read,Show,Eq)
deriveJSON lspOptions ''CodeLens