File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
ghcide/src/Development/IDE/Plugin Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -510,12 +510,15 @@ localBindingInlayHints state plId (InlayHintParams _ (TextDocumentIdentifier uri
510
510
nfp <- getNormalizedFilePathE uri
511
511
(LocalBindingTypeSigsResult (localBindings, sigMap), pm)
512
512
<- runActionE " InlayHint.GetWhereBindingTypeSigs" state $ useWithStaleE GetLocalBindingTypeSigs nfp
513
- let bindingToInlayHints id sig = generateWhereInlayHints (T. pack $ printName (idName id )) (maybe " _" T. pack sig)
513
+ let bindingToInlayHints :: Id -> Maybe String -> Range -> Int -> Maybe InlayHint
514
+ bindingToInlayHints id (Just sig) range offset =
515
+ Just $ generateWhereInlayHints (T. pack $ printName (idName id )) (T. pack sig) range offset
516
+ bindingToInlayHints _ Nothing _ _ = Nothing
514
517
515
518
-- | Note there may multi ids for one binding,
516
519
-- like @(a, b) = (42, True)@, there are `a` and `b`
517
520
-- in one binding.
518
- inlayHints =
521
+ inlayHints = catMaybes
519
522
[ bindingToInlayHints bindingId bindingSig bindingRange offset
520
523
| LocalBindings {.. } <- localBindings
521
524
, let sigSpans = getSrcSpan <$> existingSigNames
You can’t perform that action at this time.
0 commit comments