utop icon indicating copy to clipboard operation
utop copied to clipboard

#show_doc directive

Open ivg opened this issue 9 years ago • 10 comments

This is a feature request :)

It would be nice to explore API documentation using utop, like in ipython.

ivg avatar Sep 23 '16 13:09 ivg

+1. i would propose #doc instead since that is faster to tab-complete: #show_doc is ambiguous with #show.

nilsbecker avatar Oct 17 '16 13:10 nilsbecker

merlin and ocp-index both provide mechanisms for viewing documentation which may be reusable here.

It may also be something worth pushing upstream to ocaml since the other #show toplevel directives come from there.

hcarty avatar Oct 17 '16 19:10 hcarty

Does this accomplish what you want: https://github.com/reynir/ocp-index-top

rgrinberg avatar Mar 27 '17 22:03 rgrinberg

the screenshot looks perfect!

nilsbecker avatar Mar 28 '17 09:03 nilsbecker

Doc is quite a nice feature to have, I wonder if I can use it ReasonML as well. OCaml newbie here. Thanks for the nice pointer though!

arichiardi avatar Apr 12 '17 23:04 arichiardi

What about "#infoof"? #294

kandu avatar Jul 26 '19 17:07 kandu

BTW, I hadn't read this before, but ocp-index-top (as linked to by @rgrinberg above) looks quite nice!

pmetzger avatar Jul 26 '19 23:07 pmetzger

I've looked ocp-index-top up. It's nice and I find that the first commit in #294 does the same as what ocp-index-top does. There is a small flaw, ocp-index-top indexes and queries identifiers in the same process of the REPL, it hangs and uses 100% CPU after you #require or #load some other libraries into the REPL and then query some info of the required library.

kandu avatar Jul 27 '19 01:07 kandu

@kandu So do you see #294 as a full replacement for this? And does @ivg agree?

pmetzger avatar Jul 28 '19 20:07 pmetzger

I didn't notice that this issue already existed when #294 was submitted. The new directive shows the info containing name, kind, type and optional doc comment. Because doc comments are not always presented, to name it as "show_doc" or "doc" may not be so suitable IMHO.

kandu avatar Jul 29 '19 01:07 kandu