module Ide.Plugin.CallHierarchy (descriptor) where

import           Development.IDE
import qualified Ide.Plugin.CallHierarchy.Internal as X
import           Ide.Types
import           Language.LSP.Types

descriptor :: PluginId -> PluginDescriptor IdeState
descriptor :: PluginId -> PluginDescriptor IdeState
descriptor PluginId
plId = (PluginId -> PluginDescriptor IdeState
forall ideState. PluginId -> PluginDescriptor ideState
defaultPluginDescriptor PluginId
plId)
  { pluginHandlers :: PluginHandlers IdeState
Ide.Types.pluginHandlers = SClientMethod 'TextDocumentPrepareCallHierarchy
-> PluginMethodHandler IdeState 'TextDocumentPrepareCallHierarchy
-> PluginHandlers IdeState
forall (m :: Method 'FromClient 'Request) ideState.
PluginMethod m =>
SClientMethod m
-> PluginMethodHandler ideState m -> PluginHandlers ideState
mkPluginHandler SClientMethod 'TextDocumentPrepareCallHierarchy
STextDocumentPrepareCallHierarchy PluginMethodHandler IdeState 'TextDocumentPrepareCallHierarchy
X.prepareCallHierarchy
                            PluginHandlers IdeState
-> PluginHandlers IdeState -> PluginHandlers IdeState
forall a. Semigroup a => a -> a -> a
<> SClientMethod 'CallHierarchyIncomingCalls
-> PluginMethodHandler IdeState 'CallHierarchyIncomingCalls
-> PluginHandlers IdeState
forall (m :: Method 'FromClient 'Request) ideState.
PluginMethod m =>
SClientMethod m
-> PluginMethodHandler ideState m -> PluginHandlers ideState
mkPluginHandler SClientMethod 'CallHierarchyIncomingCalls
SCallHierarchyIncomingCalls PluginMethodHandler IdeState 'CallHierarchyIncomingCalls
X.incomingCalls
                            PluginHandlers IdeState
-> PluginHandlers IdeState -> PluginHandlers IdeState
forall a. Semigroup a => a -> a -> a
<> SClientMethod 'CallHierarchyOutgoingCalls
-> PluginMethodHandler IdeState 'CallHierarchyOutgoingCalls
-> PluginHandlers IdeState
forall (m :: Method 'FromClient 'Request) ideState.
PluginMethod m =>
SClientMethod m
-> PluginMethodHandler ideState m -> PluginHandlers ideState
mkPluginHandler SClientMethod 'CallHierarchyOutgoingCalls
SCallHierarchyOutgoingCalls PluginMethodHandler IdeState 'CallHierarchyOutgoingCalls
X.outgoingCalls
  }