{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.SelectionRange where
import Data.Aeson.TH
import Language.LSP.Types.Common
import Language.LSP.Types.Location
import Language.LSP.Types.Progress
import Language.LSP.Types.StaticRegistrationOptions
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Utils
data SelectionRangeClientCapabilities = SelectionRangeClientCapabilities
{
_dynamicRegistration :: Maybe Bool
}
deriving (Read, Show, Eq)
deriveJSON lspOptions ''SelectionRangeClientCapabilities
makeExtendingDatatype "SelectionRangeOptions" [''WorkDoneProgressOptions] []
deriveJSON lspOptions ''SelectionRangeOptions
makeExtendingDatatype
"SelectionRangeRegistrationOptions"
[ ''SelectionRangeOptions,
''TextDocumentRegistrationOptions,
''StaticRegistrationOptions
]
[]
deriveJSON lspOptions ''SelectionRangeRegistrationOptions
makeExtendingDatatype
"SelectionRangeParams"
[ ''WorkDoneProgressParams,
''PartialResultParams
]
[ ("_textDocument", [t|TextDocumentIdentifier|]),
("_positions", [t|List Position|])
]
deriveJSON lspOptions ''SelectionRangeParams
data SelectionRange = SelectionRange
{
_range :: Range,
_parent :: Maybe SelectionRange
}
deriving (Read, Show, Eq)
deriveJSON lspOptions ''SelectionRange