ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Plugin.Completions.Logic

Synopsis

- data CachedCompletions
- cacheDataProducer :: Uri -> [ModuleName] -> Module -> GlobalRdrEnv -> GlobalRdrEnv -> [LImportDecl GhcPs] -> CachedCompletions
- localCompletionsForParsedModule :: Uri -> ParsedModule -> CachedCompletions
- getCompletions :: IdePlugins a -> IdeOptions -> CachedCompletions -> Maybe (ParsedModule, PositionMapping) -> Maybe (HieAstResult, PositionMapping) -> (Bindings, PositionMapping) -> PosPrefixInfo -> ClientCapabilities -> CompletionsConfig -> ModuleNameEnv (HashSet IdentInfo) -> Uri -> [Scored CompletionItem]
- fromIdentInfo :: Uri -> IdentInfo -> Maybe Text -> CompItem
- getCompletionPrefix :: Position -> VirtualFile -> PosPrefixInfo

# Documentation

data CachedCompletions #

End result of the completions

#### Instances

Instances details

Monoid CachedCompletions # |
Instance details Defined in Development.IDE.Plugin.Completions.Types Methods mempty :: CachedCompletions # mappend :: CachedCompletions -> CachedCompletions -> CachedCompletions # mconcat :: [CachedCompletions] -> CachedCompletions #
Semigroup CachedCompletions # |
Instance details Defined in Development.IDE.Plugin.Completions.Types Methods (<>) :: CachedCompletions -> CachedCompletions -> CachedCompletions # sconcat :: NonEmpty CachedCompletions -> CachedCompletions # stimes :: Integral b => b -> CachedCompletions -> CachedCompletions #
Show CachedCompletions # |
Instance details Defined in Development.IDE.Plugin.Completions.Types Methods showsPrec :: Int -> CachedCompletions -> ShowS # show :: CachedCompletions -> String # showList :: [CachedCompletions] -> ShowS #
NFData CachedCompletions # |
Instance details Defined in Development.IDE.Plugin.Completions.Types Methods rnf :: CachedCompletions -> () #

cacheDataProducer :: Uri -> [ModuleName] -> Module -> GlobalRdrEnv -> GlobalRdrEnv -> [LImportDecl GhcPs] -> CachedCompletions #

localCompletionsForParsedModule :: Uri -> ParsedModule -> CachedCompletions #

Produces completions from the top level declarations of a module.

getCompletions :: IdePlugins a -> IdeOptions -> CachedCompletions -> Maybe (ParsedModule, PositionMapping) -> Maybe (HieAstResult, PositionMapping) -> (Bindings, PositionMapping) -> PosPrefixInfo -> ClientCapabilities -> CompletionsConfig -> ModuleNameEnv (HashSet IdentInfo) -> Uri -> [Scored CompletionItem] #

Returns the cached completions for the given module and position.

fromIdentInfo :: Uri -> IdentInfo -> Maybe Text -> CompItem #

getCompletionPrefix :: Position -> VirtualFile -> PosPrefixInfo #

From the given cursor position, gets the prefix module or record for autocompletion