diff --git a/src/Ide/Plugin/ImportLens.hs b/src/Ide/Plugin/ImportLens.hs index c8f2661f5b..e8418e1e10 100644 --- a/src/Ide/Plugin/ImportLens.hs +++ b/src/Ide/Plugin/ImportLens.hs @@ -132,12 +132,16 @@ extractMinimalImports (Just (hsc)) (Just (tmrModule -> TypecheckedModule{..})) = extractMinimalImports _ _ = return ([], Nothing) --- | Given an import declaration, generate a code lens unless it has an explicit import list +-- | Given an import declaration, generate a code lens unless it has an +-- explicit import list or it's qualified generateLens :: PluginId -> Uri -> Map SrcLoc (ImportDecl GhcRn) -> LImportDecl GhcRn -> IO (Maybe CodeLens) generateLens pId uri minImports (L src imp) -- Explicit import list case | ImportDecl{ideclHiding = Just (False,_)} <- imp = return Nothing + -- Qualified case + | ImportDecl{ideclQualified = True} <- imp + = return Nothing -- No explicit import list | RealSrcSpan l <- src , Just explicit <- Map.lookup (srcSpanStart src) minImports