scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

REPL: display Scaladoc #12275

Open SethTisue opened 3 years ago

SethTisue commented 3 years ago

Like the :doc command in the Scala 3 REPL. (And, does Ammonite have a version of this?)

Easy form of this improvement: display the URL of the relevant doc.

Harder form: show the actual Scaladoc in the terminal.

ches commented 3 years ago

(And, does Ammonite have a version of this?)

AFAIK it does not, it does have source() which is suggested also for the use case of viewing docs.

(Source viewing is another handy feature in Ammonite and REPLs in other languages where I've seen it, but I'll take it elsewhere since this issue has a clear and worthy focus on Scaladoc).

SethTisue commented 2 years ago

Access to the source code is desirable as well. Perhaps it's enough to provide a link to the online Scaladoc, since the online Scaladoc then links to the source.

SethTisue commented 2 years ago

I've removed my assignment since although I've long intended to tackle this myself, that hasn't happened. It is very much open for a volunteer.

Urthor commented 1 year ago

Just commenting, this is an important issue IMO.

A big, big part of my experience learning Scala is overcoming the sharpness of the learning curve for the syntax/built-ins.

An equivalent to help([1, 2, 3]) in the Python interpreter would be tremendous.