scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Type hints for intermediate steps in multiline chain of functional transformations #343

Open spamegg1 opened 1 year ago

spamegg1 commented 1 year ago

Is your feature request related to a problem? Please describe.

When I chain multiple functional transformations, it's very helpful to see the result collection types of intermediate steps.

Describe the solution you'd like

Like in IntelliJ (this is a Kotlin example, but also works in Scala 2 AFAIK): chainTypes

Describe alternatives you've considered

Not sure, but maybe #274 is relevant?

Additional context

Here's a Scala 3 Metals example (taken from Week 6 programming assignment of https://www.coursera.org/learn/progfun1/ ) progfun1

Search terms

type hints, chaining, functional transformations, IntelliJ

tgodzik commented 1 year ago

Thanks for reporting! I think with the recent changes and the semantic tokens we should actually be able to get that information reliably.

Main thing here would be to make sure that we gather the semantic token information once only.