{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.WorkspaceSymbol where
import Data.Aeson.TH
import Data.Default
import Language.LSP.Types.Common
import Language.LSP.Types.DocumentSymbol
import Language.LSP.Types.Progress
import Language.LSP.Types.Utils
data WorkspaceSymbolKindClientCapabilities =
WorkspaceSymbolKindClientCapabilities
{
_valueSet :: Maybe (List SymbolKind)
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''WorkspaceSymbolKindClientCapabilities
instance Default WorkspaceSymbolKindClientCapabilities where
def = WorkspaceSymbolKindClientCapabilities (Just $ List allKinds)
where allKinds = [ SkFile
, SkModule
, SkNamespace
, SkPackage
, SkClass
, SkMethod
, SkProperty
, SkField
, SkConstructor
, SkEnum
, SkInterface
, SkFunction
, SkVariable
, SkConstant
, SkString
, SkNumber
, SkBoolean
, SkArray
]
data WorkspaceSymbolClientCapabilities =
WorkspaceSymbolClientCapabilities
{ _dynamicRegistration :: Maybe Bool
, _symbolKind :: Maybe WorkspaceSymbolKindClientCapabilities
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''WorkspaceSymbolClientCapabilities
makeExtendingDatatype "WorkspaceSymbolOptions" [''WorkDoneProgressOptions] []
deriveJSON lspOptions ''WorkspaceSymbolOptions
makeExtendingDatatype "WorkspaceSymbolRegistrationOptions"
[''WorkspaceSymbolOptions] []
deriveJSON lspOptions ''WorkspaceSymbolRegistrationOptions
makeExtendingDatatype "WorkspaceSymbolParams"
[ ''WorkDoneProgressParams
, ''PartialResultParams
]
[("_query", [t| String |])]
deriveJSON lspOptions ''WorkspaceSymbolParams