dragos / dragos-vscode-scala

Other
253 stars 39 forks source link

Updated to Ensime 2.0.0. Using TypeAtPointReq for hover request #65

Closed fede0664 closed 6 years ago

fede0664 commented 6 years ago

Updated to Ensime 2.0.0. Using TypeAtPointReq and TypeInfo.name + TypeInfo.fullName from the response for hover signature seems to be much more descriptive

dragos commented 6 years ago

I'm split on this, the reason why the code was commented was that the results are usually suboptimal. For example, for List(1, 3).map(_.toString), hovering over map:

Now:

map[B,That](f:A=>B)(implicitbf:scala.collection.generic.CanBuildFrom[List[A],B,That]):That

With these changes:

((scala.Int) => scala.collection.TraversableLike.B) => (scala.collection.generic.CanBuildFrom[scala.collection.immutable.List[scala.Int], scala.collection.TraversableLike.B, scala.collection.TraversableLike.That]) => scala.collection.TraversableLike.That

I don't know why Ensime expands type-aliases in this request, but the result is quite unreadable. The previous version wasn't ideal either, but I'm putting this here for discussion.

fede0664 commented 6 years ago

How about this, using TypeAtPointReq if DocUriAtPointReq returns an empty string? At least this will fix not having hover detail for implicit local val types.

dragos commented 6 years ago

Good point! Let's do that!

dragos commented 6 years ago

One more thing, could you please update the changelog? I am starting to lose track of it and it ends up delaying the release.