Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype IdePlugins = IdePlugins {}
- data PluginDescriptor = PluginDescriptor {
- pluginId :: !PluginId
- pluginRules :: !(Rules ())
- pluginCommands :: ![PluginCommand]
- pluginCodeActionProvider :: !(Maybe CodeActionProvider)
- pluginCodeLensProvider :: !(Maybe CodeLensProvider)
- pluginDiagnosticProvider :: !(Maybe DiagnosticProvider)
- pluginHoverProvider :: !(Maybe HoverProvider)
- pluginSymbolsProvider :: !(Maybe SymbolsProvider)
- pluginFormattingProvider :: !(Maybe (FormattingProvider IO))
- pluginCompletionProvider :: !(Maybe CompletionProvider)
- pluginRenameProvider :: !(Maybe RenameProvider)
- defaultPluginDescriptor :: PluginId -> PluginDescriptor
- data PluginCommand = forall a.FromJSON a => PluginCommand {}
- newtype PluginId = PluginId Text
- newtype CommandId = CommandId Text
- data DiagnosticProvider = DiagnosticProvider {
- dpTrigger :: Set DiagnosticTrigger
- dpFunc :: DiagnosticProviderFunc
- data DiagnosticProviderFunc
- = DiagnosticProviderSync DiagnosticProviderFuncSync
- | DiagnosticProviderAsync DiagnosticProviderFuncAsync
- type SymbolsProvider = LspFuncs Config -> IdeState -> DocumentSymbolParams -> IO (Either ResponseError [DocumentSymbol])
- data FormattingType
- type FormattingProvider m = LspFuncs Config -> IdeState -> FormattingType -> Text -> NormalizedFilePath -> FormattingOptions -> m (Either ResponseError (List TextEdit))
- type HoverProvider = IdeState -> TextDocumentPositionParams -> IO (Either ResponseError (Maybe Hover))
- type CodeActionProvider = LspFuncs Config -> IdeState -> PluginId -> TextDocumentIdentifier -> Range -> CodeActionContext -> IO (Either ResponseError (List CAResult))
- type CodeLensProvider = LspFuncs Config -> IdeState -> PluginId -> CodeLensParams -> IO (Either ResponseError (List CodeLens))
- type CommandFunction a = LspFuncs Config -> IdeState -> a -> IO (Either ResponseError Value, Maybe (ServerMethod, ApplyWorkspaceEditParams))
- type ExecuteCommandProvider = IdeState -> ExecuteCommandParams -> IO (Either ResponseError Value, Maybe (ServerMethod, ApplyWorkspaceEditParams))
- type CompletionProvider = LspFuncs Config -> IdeState -> CompletionParams -> IO (Either ResponseError CompletionResponseResult)
- type RenameProvider = LspFuncs Config -> IdeState -> RenameParams -> IO (Either ResponseError WorkspaceEdit)
- newtype WithSnippets = WithSnippets Bool
Documentation
newtype IdePlugins Source #
data PluginDescriptor Source #
PluginDescriptor | |
|
data PluginCommand Source #
forall a.FromJSON a => PluginCommand | |
|
data DiagnosticProvider Source #
DiagnosticProvider | |
|
data DiagnosticProviderFunc Source #
DiagnosticProviderSync DiagnosticProviderFuncSync | |
DiagnosticProviderAsync DiagnosticProviderFuncAsync |
type SymbolsProvider = LspFuncs Config -> IdeState -> DocumentSymbolParams -> IO (Either ResponseError [DocumentSymbol]) Source #
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.
type FormattingProvider m Source #
= LspFuncs Config | |
-> IdeState | |
-> FormattingType | How much to format |
-> Text | Text to format |
-> NormalizedFilePath | location of the file being formatted |
-> FormattingOptions | Options for the formatter |
-> m (Either ResponseError (List TextEdit)) | Result of the formatting |
To format a whole document, the FormatText
FormattingType
can be used.
It is required to pass in the whole Document Text for that to happen, an empty text
and file uri, does not suffice.
type HoverProvider = IdeState -> TextDocumentPositionParams -> IO (Either ResponseError (Maybe Hover)) Source #
type CodeActionProvider = LspFuncs Config -> IdeState -> PluginId -> TextDocumentIdentifier -> Range -> CodeActionContext -> IO (Either ResponseError (List CAResult)) Source #
type CodeLensProvider = LspFuncs Config -> IdeState -> PluginId -> CodeLensParams -> IO (Either ResponseError (List CodeLens)) Source #
type CommandFunction a = LspFuncs Config -> IdeState -> a -> IO (Either ResponseError Value, Maybe (ServerMethod, ApplyWorkspaceEditParams)) Source #
type ExecuteCommandProvider = IdeState -> ExecuteCommandParams -> IO (Either ResponseError Value, Maybe (ServerMethod, ApplyWorkspaceEditParams)) Source #
type CompletionProvider = LspFuncs Config -> IdeState -> CompletionParams -> IO (Either ResponseError CompletionResponseResult) Source #
type RenameProvider = LspFuncs Config -> IdeState -> RenameParams -> IO (Either ResponseError WorkspaceEdit) Source #
newtype WithSnippets Source #