hls-explicit-imports-plugin-2.0.0.1: Explicit imports plugin for Haskell Language Server
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ide.Plugin.ExplicitImports

Synopsis

Documentation

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

The "main" function of a plugin

descriptorForModules Source #

Arguments

:: Recorder (WithPriority Log) 
-> (ModuleName -> Bool)

Predicate to select modules that will be annotated

-> PluginId 
-> PluginDescriptor IdeState 

extractMinimalImports :: Maybe HscEnvEq -> Maybe TcModuleResult -> IO ([LImportDecl GhcRn], Maybe [LImportDecl GhcRn]) Source #

Use the ghc api to extract a minimal, explicit set of imports for this module

abbreviateImportTitle :: Text -> Text Source #

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

newtype Log Source #

Constructors

LogShake Log 

Instances

Instances details
Show Log Source # 
Instance details

Defined in Ide.Plugin.ExplicitImports

Methods

showsPrec :: Int -> Log -> ShowS #

show :: Log -> String #

showList :: [Log] -> ShowS #

Pretty Log Source # 
Instance details

Defined in Ide.Plugin.ExplicitImports

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #