File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
src/Development/IDE/Plugin/Completions Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -349,8 +349,8 @@ cacheDataProducer uri env curMod globalEnv inScopeEnv limports = do
349349 docs <- getDocumentationTryGhc packageState curMod n
350350 let (mbParent, originName) = case par of
351351 NoParent -> (Nothing , nameOccName n)
352- ParentIs n' -> (Just $ showNameWithoutUniques n', nameOccName n)
353- FldParent n' lbl -> (Just $ showNameWithoutUniques n', maybe (nameOccName n) mkVarOccFS lbl)
352+ ParentIs n' -> (Just . T. pack $ printName n', nameOccName n)
353+ FldParent n' lbl -> (Just . T. pack $ printName n', maybe (nameOccName n) mkVarOccFS lbl)
354354 tys <- catchSrcErrors (hsc_dflags packageState) " completion" $ do
355355 name' <- lookupName packageState m n
356356 return ( name' >>= safeTyThingType
@@ -360,7 +360,7 @@ cacheDataProducer uri env curMod globalEnv inScopeEnv limports = do
360360
361361 let recordCompls = case record_ty of
362362 Just (ctxStr, flds) | not (null flds) ->
363- [mkRecordSnippetCompItem uri mbParent ctxStr flds (ppr mn) docs imp']
363+ [mkRecordSnippetCompItem uri mbParent ctxStr flds (ppr mn) docs imp']
364364 _ -> []
365365
366366 return $ mkNameCompItem uri mbParent originName mn ty Nothing docs imp'
Original file line number Diff line number Diff line change @@ -3993,6 +3993,12 @@ nonLocalCompletionTests =
39933993 [" module A where" , " import Data.Maybe ()" , " Nothing" ]
39943994 (Position 2 4 )
39953995 " Nothing"
3996+ , completionCommandTest
3997+ " type operator parent"
3998+ [" module A where" , " import Data.Type.Equality ()" , " f = Ref" ]
3999+ (Position 2 8 )
4000+ " Refl"
4001+ [" module A where" , " import Data.Type.Equality ((:~:) (Refl))" , " f = Ref" ]
39964002 ]
39974003 , testGroup " Record completion"
39984004 [ completionCommandTest
You can’t perform that action at this time.
0 commit comments