hls-plugin-api-1.4.0.0: Haskell Language Server API for plugin communication
Safe HaskellNone
LanguageHaskell2010

Ide.Types

Synopsis

Documentation

newtype IdePlugins ideState Source #

Constructors

IdePlugins 

Fields

Instances

Instances details
Semigroup (IdePlugins ideState) Source # 
Instance details

Defined in Ide.Types

Methods

(<>) :: IdePlugins ideState -> IdePlugins ideState -> IdePlugins ideState #

sconcat :: NonEmpty (IdePlugins ideState) -> IdePlugins ideState #

stimes :: Integral b => b -> IdePlugins ideState -> IdePlugins ideState #

Monoid (IdePlugins ideState) Source # 
Instance details

Defined in Ide.Types

Methods

mempty :: IdePlugins ideState #

mappend :: IdePlugins ideState -> IdePlugins ideState -> IdePlugins ideState #

mconcat :: [IdePlugins ideState] -> IdePlugins ideState #

data DynFlagsModifications Source #

Hooks for modifying the DynFlags at different times of the compilation process. Plugins can install a DynFlagsModifications via pluginModifyDynflags in their PluginDescriptor.

Constructors

DynFlagsModifications 

Fields

newtype IdeCommand state Source #

Constructors

IdeCommand (state -> IO ()) 

Instances

Instances details
Show (IdeCommand st) Source # 
Instance details

Defined in Ide.Types

Methods

showsPrec :: Int -> IdeCommand st -> ShowS #

show :: IdeCommand st -> String #

showList :: [IdeCommand st] -> ShowS #

data CustomConfig Source #

An existential wrapper of Properties

Constructors

forall r. CustomConfig (Properties r) 

data ConfigDescriptor Source #

Describes the configuration a plugin. A plugin may be configurable in such form: { "plugin-id": { "globalOn": true, "codeActionsOn": true, "codeLensOn": true, "config": { "property1": "foo" } } } globalOn, codeActionsOn, and codeLensOn etc. are called generic configs, which can be inferred from handlers registered by the plugin. config is called custom config, which is defined using Properties.

Constructors

ConfigDescriptor 

Fields

class HasTracing (MessageParams m) => PluginMethod m where Source #

Methods that can be handled by plugins. ExtraParams captures any extra data the IDE passes to the handlers for this method Only methods for which we know how to combine responses can be instances of PluginMethod

Minimal complete definition

pluginEnabled

Methods

pluginEnabled :: SMethod m -> PluginId -> Config -> Bool Source #

Parse the configuration to check if this plugin is enabled

combineResponses Source #

Arguments

:: SMethod m 
-> Config

IDE Configuration

-> ClientCapabilities 
-> MessageParams m 
-> NonEmpty (ResponseResult m) 
-> ResponseResult m 

How to combine responses from different plugins

Instances

Instances details
PluginMethod 'CallHierarchyOutgoingCalls Source # 
Instance details

Defined in Ide.Types

PluginMethod 'CallHierarchyIncomingCalls Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentPrepareCallHierarchy Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentSelectionRange Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentRename Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentRangeFormatting Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentFormatting Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentCodeLens Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentCodeAction Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentDocumentSymbol Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentHover Source # 
Instance details

Defined in Ide.Types

PluginMethod 'TextDocumentCompletion Source # 
Instance details

Defined in Ide.Types

PluginMethod ('CustomMethod :: Method f 'Request) Source # 
Instance details

Defined in Ide.Types

data IdeMethod (m :: Method FromClient Request) Source #

Methods which have a PluginMethod instance

Constructors

PluginMethod m => IdeMethod (SMethod m) 

Instances

Instances details
GEq IdeMethod Source # 
Instance details

Defined in Ide.Types

Methods

geq :: forall (a :: k) (b :: k). IdeMethod a -> IdeMethod b -> Maybe (a :~: b) #

GCompare IdeMethod Source # 
Instance details

Defined in Ide.Types

Methods

gcompare :: forall (a :: k) (b :: k). IdeMethod a -> IdeMethod b -> GOrdering a b #

data IdeNotification (m :: Method FromClient Notification) Source #

Methods which have a PluginMethod instance

Instances

Instances details
GEq IdeNotification Source # 
Instance details

Defined in Ide.Types

Methods

geq :: forall (a :: k) (b :: k). IdeNotification a -> IdeNotification b -> Maybe (a :~: b) #

GCompare IdeNotification Source # 
Instance details

Defined in Ide.Types

Methods

gcompare :: forall (a :: k) (b :: k). IdeNotification a -> IdeNotification b -> GOrdering a b #

newtype PluginHandler a (m :: Method FromClient Request) Source #

Combine handlers for the

mkPluginHandler :: PluginMethod m => SClientMethod m -> PluginMethodHandler ideState m -> PluginHandlers ideState Source #

Make a handler for plugins with no extra data

newtype CommandId Source #

Constructors

CommandId Text 

Instances

Instances details
Eq CommandId Source # 
Instance details

Defined in Ide.Types

Ord CommandId Source # 
Instance details

Defined in Ide.Types

Read CommandId Source # 
Instance details

Defined in Ide.Types

Show CommandId Source # 
Instance details

Defined in Ide.Types

IsString CommandId Source # 
Instance details

Defined in Ide.Types

data PluginCommand ideState Source #

Constructors

forall a.FromJSON a => PluginCommand 

type CommandFunction ideState a = ideState -> a -> LspM Config (Either ResponseError Value) Source #

newtype PluginId Source #

Constructors

PluginId Text 

Instances

Instances details
Eq PluginId Source # 
Instance details

Defined in Ide.Types

Ord PluginId Source # 
Instance details

Defined in Ide.Types

Read PluginId Source # 
Instance details

Defined in Ide.Types

Show PluginId Source # 
Instance details

Defined in Ide.Types

IsString PluginId Source # 
Instance details

Defined in Ide.Types

pluginEnabledConfig :: (PluginConfig -> Bool) -> PluginId -> Config -> Bool Source #

Checks that a given plugin is both enabled and the specific feature is enabled

data FormattingType Source #

Format the given Text as a whole or only a Range of it. Range must be relative to the text to format. To format the whole document, read the Text from the file and use FormatText as the FormattingType.

data FallbackCodeActionParams Source #

class HasTracing a where Source #

Minimal complete definition

Nothing

Methods

traceWithSpan :: SpanInFlight -> a -> IO () Source #

Instances

Instances details
(HasTextDocument a doc, HasUri doc Uri) => HasTracing a Source # 
Instance details

Defined in Ide.Types

Methods

traceWithSpan :: SpanInFlight -> a -> IO () Source #

HasTracing Value Source # 
Instance details

Defined in Ide.Types

HasTracing InitializeParams Source # 
Instance details

Defined in Ide.Types

HasTracing WorkspaceSymbolParams Source # 
Instance details

Defined in Ide.Types

HasTracing DidChangeWorkspaceFoldersParams Source # 
Instance details

Defined in Ide.Types

HasTracing DidChangeWatchedFilesParams Source # 
Instance details

Defined in Ide.Types

HasTracing CallHierarchyOutgoingCallsParams Source # 
Instance details

Defined in Ide.Types

HasTracing CallHierarchyIncomingCallsParams Source # 
Instance details

Defined in Ide.Types

HasTracing ExecuteCommandParams Source # 
Instance details

Defined in Ide.Types

HasTracing DidChangeConfigurationParams Source # 
Instance details

Defined in Ide.Types

HasTracing (Maybe InitializedParams) Source # 
Instance details

Defined in Ide.Types

getPid :: IO Text Source #

Get the operating system process id for the running server instance. This should be the same for the lifetime of the instance, and different from that of any other currently running instance.