Ide.Plugin.ExplicitImports

haskell-language-server-2.9.0.0: LSP server for GHC

Safe Haskell | None
Language | GHC2021

Ide.Plugin.ExplicitImports

Synopsis

- descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState
- descriptorForModules :: Recorder (WithPriority Log) -> (ModuleName -> Bool) -> PluginId -> PluginDescriptor IdeState
- abbreviateImportTitle :: Text -> Text
- data Log
  - = LogShake Log
  - | LogWAEResponseError (TResponseError 'Method_WorkspaceApplyEdit)
  - | Pretty a => LogResolve a

# Documentation

descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState #

The "main" function of a plugin

descriptorForModules #

Arguments

:: Recorder (WithPriority Log) |
-> (ModuleName -> Bool) | Predicate to select modules that will be annotated
-> PluginId |
-> PluginDescriptor IdeState |

abbreviateImportTitle :: Text -> Text #

The title of the command is ideally the minimal explicit import decl, but we don't want to create a really massive code lens (and the decl can be extremely large!). So we abbreviate it to fit a max column size, and indicate how many more items are in the list after the abbreviation

data Log #

Constructors

LogShake Log |
LogWAEResponseError (TResponseError 'Method_WorkspaceApplyEdit) |
Pretty a => LogResolve a |

#### Instances

Instances details

Pretty Log # |
Instance details Defined in Ide.Plugin.ExplicitImports Methods pretty :: Log -> Doc ann # prettyList :: [Log] -> Doc ann #