dojo: add command to lookup doccords
syntax: `# foo` to look up foo. this is not the final form - it does not
support `# foo:bar` yet. the dprint library needs some changes first.
:: :: ::
/? 309 :: arvo kelvin
/- *sole, lens :: console structures
-/+ sole, pprint, ::
+/+ sole, pprint, dprint, ::
auto=language-server-complete, ::
easy-print=language-server-easy-print ::
:: :: ::
r=@t
==
[%poke p=goal] :: poke app
+ [%help p=term] :: doccords
[%show p=?(%0 %1 %2 %3 %4 %5)] :: val/type/hoon/xray
[%verb p=term] :: store variable
== ::
(parse-variable (cold %lib lus) ;~(pfix gap parse-cables))
==
==
+ ::
+ ;~ pfix hax
+ ;~ pose
+ ;~ pfix ace
+ %+ cook
+ |= a=term
+ [[%help a] 0 %ex [%cnts p=~[[%.y p=1]] q=~]]
+ sym :: should be (most col sym) once i switch to (list term)
+ ==
+ (easy [[%help %$] 0 %ex [%cnts p=~[[%.y p=1]] q=~]])
+ ==
+ ==
::
;~((glue ace) parse-sink parse-source)
(stag [%show %0] parse-source)
++ maar ?: =(%noun p.cay) ~
[[%rose [~ " " ~] >p.cay< ~] ~]
--
+ ::
+ %help
+ (dy-inspect p.p.mad p.q.cay)
==
::
++ dy-show |=(cay=cage (dy-print cay ~))
:- i=""
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
==
+ ::
+ ++ dy-inspect
+ |= [topic=term sut=type]
+ %+ dy-rash %tan
+ =+ to-display=(find-item-in-type:dprint topic sut)
+ ?~ to-display
+ [%leaf "Could not find help"]~
+ (print-item:dprint u.to-display)
+ ::
++ dy-show-type-noun
|= a=type ^- tank
=- >[-]<
