For shortening inline type hints, I'd hoped to transform the type a bit to change long parts to
... or similar.
Is it better to replace those parts with some dummy types that print the right thing, or is it possible to display just parts of the type without re-implementing the whole formatting part?
I guess the formatting part could be refactored to take an optional depth parameter? Maybe using unlimited depth for when you hover over the declaration, but inline hints and hovering over uses could be limited too
Good question! I don't know the right answer :)
I think we need some of general formatting infra with knobs in ra_hir, and use it for both HirDispaly and type hints. Basically, what @Daniel Mcnab suggesting