Skip to content

Commit 70e44e1

Browse files
committed
Cap the number of types to 10.
1 parent f21e011 commit 70e44e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ghcide/src/Development/IDE/Spans/AtPoint.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,10 @@ atPoint opts@IdeOptions{} shakeExtras@ShakeExtras{ withHieDb, hiedbWriter } har@
360360
-- Type info for the current node, it may contain several symbols
361361
-- for one range, like wildcard
362362
types :: [hietype]
363-
types = nodeType info
363+
types = take maxHoverTypes $ nodeType info
364+
365+
maxHoverTypes :: Int
366+
maxHoverTypes = 10
364367

365368
prettyTypes :: Maybe Name -> M.Map Name Location -> [T.Text]
366369
prettyTypes boundNameMay locationsMap =

0 commit comments

Comments
 (0)