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
510510 nfp <- getNormalizedFilePathE uri
511511 (LocalBindingTypeSigsResult (localBindings, sigMap), pm)
512512 <- 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
514517
515518 -- | Note there may multi ids for one binding,
516519 -- like @(a, b) = (42, True)@, there are `a` and `b`
517520 -- in one binding.
518- inlayHints =
521+ inlayHints = catMaybes
519522 [ bindingToInlayHints bindingId bindingSig bindingRange offset
520523 | LocalBindings {.. } <- localBindings
521524 , let sigSpans = getSrcSpan <$> existingSigNames
You can’t perform that action at this time.
0 commit comments