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
349
349
docs <- getDocumentationTryGhc packageState curMod n
350
350
let (mbParent, originName) = case par of
351
351
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)
354
354
tys <- catchSrcErrors (hsc_dflags packageState) " completion" $ do
355
355
name' <- lookupName packageState m n
356
356
return ( name' >>= safeTyThingType
@@ -360,7 +360,7 @@ cacheDataProducer uri env curMod globalEnv inScopeEnv limports = do
360
360
361
361
let recordCompls = case record_ty of
362
362
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']
364
364
_ -> []
365
365
366
366
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 =
3993
3993
[" module A where" , " import Data.Maybe ()" , " Nothing" ]
3994
3994
(Position 2 4 )
3995
3995
" 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" ]
3996
4002
]
3997
4003
, testGroup " Record completion"
3998
4004
[ completionCommandTest
You can’t perform that action at this time.
0 commit comments