Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scaladoc from the scala interpreter

Tags:

scala

I've been experimenting with Scala lately and I noticed that when I need to look up a function or a class, I have to go to the website or navigate to the local documentation.

Is there a way to read the Scaladoc from inside the interpreter?

Maybe something like help() in Python.

like image 570
Mahmoud Hanafy Avatar asked Oct 23 '11 12:10

Mahmoud Hanafy


2 Answers

Scalaex is a cool Scala-web documentation like Hoogle with an usefull CLI-client.

(But it's not inside the interpreter. Unfortunately I cannot write a comment to your question, so I write this as an answer.)

like image 128
Sonson123 Avatar answered Oct 16 '22 02:10

Sonson123


I'm running the command line scala interpreter for 2.9, and tab-key completion works for me:

val x = List(1,2,3)

x. 

Then press TAB

Shows the list of methods.

Not quite full docs, but helpful nonetheless.

like image 41
Tony K. Avatar answered Oct 16 '22 04:10

Tony K.