Fork me on GitHub

when trying to view the docstring for this function by typing (doc foo) into calva, I get CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context.... Am I doing something wrong?

(defn foo
  "I don't do a whole lot."
  (println x "Hello, World!"))


That looks right. I think you need to use some namespace, or something, for doc to be available. Iirc I’ve added a command for that, forgot what I named it though...


It is less of a problem in Calva, since it shows docs on hovering on the symbol.


@adamfranzen The command is Calva: Require REPL utilities, like (doc) etcetera, into Current Namespace ctrl+alt+c ctrl+u.


@brandon.ringe: You should maybe add that command to your getting-started guide. I think people following Clojure tutorials will often get to know about how they can use doc, and source, etcetera to find out about things.


Noted. Thanks

metal 4

@pez Since lein repl requires/uses the clojure.repl namespace at startup by default, do you think Calva should do the same?


And maybe it only refers source and doc, I'm not sure, would have to look. Just wondering if the Calva repl should mimic to reduce confusion.


We should consider loading that by default. Not sure how global it gets though.


Is it possible to adjust the line length for the built-in clj repl? Currently it’s at 1024 characters, but I would like it wider...thanks!


There is no setting for that currently. But please file an issue about it.


Thanks very much - raised as #393.

❤️ 4

Thanks for the issue. You might get away a bit by evaluating inline (in a file) , either using the replace command or by copying the results from the hover.