@@ -179,10 +179,10 @@ mkCompl
179
179
_tags = Nothing ,
180
180
_detail =
181
181
case (typeText, provenance) of
182
- (Just t,_) -> Just $ colon <> t
182
+ (Just t,_) -> Just $ colon <> t
183
183
(_, ImportedFrom mod ) -> Just $ " from " <> mod
184
- (_, DefinedIn mod ) -> Just $ " from " <> mod
185
- _ -> Nothing ,
184
+ (_, DefinedIn mod ) -> Just $ " from " <> mod
185
+ _ -> Nothing ,
186
186
_documentation = documentation,
187
187
_deprecated = Nothing ,
188
188
_preselect = Nothing ,
@@ -448,12 +448,12 @@ localCompletionsForParsedModule uri pm@ParsedModule{pm_parsed_source = L _ HsMod
448
448
[mkComp id CiVariable Nothing
449
449
| VarPat _ id <- listify (\ (_ :: Pat GhcPs ) -> True ) pat_lhs]
450
450
TyClD _ ClassDecl {tcdLName, tcdSigs} ->
451
- mkComp tcdLName CiInterface Nothing :
451
+ mkComp tcdLName CiInterface ( Just $ ppr tcdLName) :
452
452
[ mkComp id CiFunction (Just $ ppr typ)
453
453
| L _ (ClassOpSig _ _ ids typ) <- tcdSigs
454
454
, id <- ids]
455
455
TyClD _ x ->
456
- let generalCompls = [mkComp id cl Nothing
456
+ let generalCompls = [mkComp id cl ( Just $ ppr $ tcdLName x)
457
457
| id <- listify (\ (_ :: Located (IdP GhcPs )) -> True ) x
458
458
, let cl = occNameToComKind Nothing (rdrNameOcc $ unLoc id )]
459
459
-- here we only have to look at the outermost type
@@ -678,6 +678,7 @@ uniqueCompl candidate unique =
678
678
else compare (importedFrom candidate, insertText candidate) (importedFrom unique, insertText unique)
679
679
other -> other
680
680
where
681
+ -- This is an inaccurate predicate - some local completions do not have typeText
681
682
isLocalCompletion ci = isJust(typeText ci)
682
683
683
684
importedFrom :: CompItem -> T. Text
0 commit comments