Open derinsh0 opened 1 year ago
Can you post here the relevant message exchange with nREPL? (see https://docs.cider.mx/cider/troubleshooting.html#debugging-the-communication-with-nrepl)
Can you post here the relevant message exchange with nREPL? (see https://docs.cider.mx/cider/troubleshooting.html#debugging-the-communication-with-nrepl)
Yes, but it doesn't say that much.
(-->
id "179"
op "eldoc"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:20.305304000"
ns #("lcljs.temp" 0 10 (cider-block-dynamic-font-lock t cider-locals nil help-echo cider--help-echo fontified nil))
sym "gdom/getElement"
)
(<--
id "179"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:20.314077000"
status ("done" "no-eldoc")
)
(-->
id "180"
op "info"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:23.149347000"
ns #("lcljs.temp" 0 10 (cider-block-dynamic-font-lock t cider-locals nil help-echo cider--help-echo fontified nil))
sym "gdom/getElement"
)
(<--
id "180"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:23.151240000"
status ("done" "no-info")
)
(-->
id "181"
op "eldoc"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:23.957024000"
ns #("lcljs.temp" 0 10 (cider-block-dynamic-font-lock t cider-locals nil help-echo cider--help-echo fontified nil))
sym "gdom/getElement"
)
(<--
id "181"
session "e9fdf778-baa0-4512-9dc6-d8c200594826"
time-stamp "2022-07-24 01:59:23.966280000"
status ("done" "no-eldoc")
)
Cider-browse-ns won't find goog.dom either.
My guess would be that this doesn't work for JavaScript sources, but I don't do ClojureScript myself and I don't remember much of the relevant code in Orchard at this point. Perhaps @arichiardi can shed more light on this.
(moved from cider to Orchard)
Expected behavior
Cider-doc should resolve symbols from dependencies such as Google Closure and attempt to evaluate their doc-string if no other source of documentation is available.
Actual behavior
Running cider-doc on the function goog.dom/createElement will give "symbol not resolved".
But that function has a valid, if somewhat crude, docstring that cider can evaluate with
(:doc (meta #'goog.dom/createElement))
or(clojure.repl/doc goog.dom/createElement)
which gives:As a comparison. Function meta is lookable with cider-doc. Which opens:
But evaluating
(meta #'meta)
says the function is located at :While
(meta #'goog.dom/createElement)
:Maybe the issue is finding it?
Steps to reproduce the problem
Create a figwheel-main cljs project and jack-in with cider. Import namespace goog.dom and lookup any of its functions with cider-doc.
Environment & Version information
CIDER version information
Lein / Clojure CLI version
Clj win-install-1.11.1.1149.ps1
Emacs version
29.0.50
Operating system
Windows 10
JDK distribution
P.S.
I don't know CIDER enough to decide if this is a bug or missing feature.