metals-feature-requests icon indicating copy to clipboard operation
metals-feature-requests copied to clipboard

Format type signatures in hover tooltip

Open tanishiking opened this issue 1 year ago • 2 comments

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

When we hover on a symbol whose type signature is complex (e.g. check method in Metals), we'll see the following type signature that is cluttered and hard to read.

Screen Shot 2022-09-08 at 14 25 10

Describe the solution you'd like

It would be awesome if the type signature in the hover tooltip is formatted like

  def check(
      name: TestOptions,
      original: String,
      expected: String,
      includeDocs: Boolean = false,
      includeCommitCharacter: Boolean = false,
      compat: Map[String, String] = Map.empty,
      postProcessObtained: String => String = identity,
      stableOrder: Boolean = true,
      topLines: Option[Int] = None,
      filterText: String = "",
      includeDetail: Boolean = true,
      filename: String = "A.scala",
      filter: String => Boolean = _ => true,
      enablePackageWrap: Boolean = true,
  )(implicit loc: Location): Unit

instead of packing everything in one line. (not sure it's possible though).

Describe alternatives you've considered

not sure

Additional context

hover

Search terms

hover, type signature

tanishiking avatar Sep 08 '22 05:09 tanishiking