-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation improvements #8
Comments
I thought about this the other day. The most portable way of doing such thing is compactly packaging Javadocs into a Clojure library (in this case, to cider-nrepl). Easier to do but JVM-only is reading javadocs from the harddrive. Could you elaborate on the second part of your question? Especially about the type of the receiver. Currently Compliment figures out receiver type only for vars, and it seems this is the farthest we can get. |
I assume you've added the documentation function just to be able to show the doc tooltips on completion, but for me it seems that using to show the javadoc about a class/member at point also seems like a reasonable that.
I haven't looked at the current implementation, but it seems clear that without knowing the type of
it seems that fetching the correct javadoc if next to impossible because at this point nothing is known about the receiver. Not sure if I've managed to clarify what I meant. As for the javadoc packaging - we cannot package the javadocs of all possible libraries a user might want to use, so it seems more sensible to try to access whatever he has locally. Or I'm missing something? (haven't really researched the topic) |
Btw,
|
|
1 & 2 - Understood. |
Not sure I got you right on this one. Do you mean to show the fully qualified classname together with all method signatures of this class? Also, since non-qualified classnames are taken from |
Yeah, that'd be great.
That's fine I guess. |
OK, I fixed the docs for classnames, now it shows the list of members for the class. Popup doc now also shows the docstring for namespaces. I will keep the issue open as reminder to implement javadoc, although I'm not so sure this will be ever done. I tried to search for projects that provide kinda-JavaIDE for Emacs, and couldn't find one that does javadoc parsing and displaying. Most just send the user to the browser. |
We've implemented the Javadoc handling (using the JDK's built-in javadoc parser) in |
Thanks for pointing that out. I like how it doesn't depend on any external files with documentation. Making a link for myself so I can find it later: jeffvalk/cider-nrepl@8b6d3d5 |
I'd rather keep this open. I haven't touched javadocs integration into Compliment yet. |
In this project there seems to be some code which can parse javadoc from a local maven repository: The method signature looks promising: Optional memberDoc(String className, String memberName) |
It'd be nice if the documentation function returned the complete javadoc for a class/member. That way we'll be able to create a documentation middleware that we'll behave similarly for Clojure vars and Java classes/members. It would also be good if we could reduce the ambiguity and return just a single documentation entry (that way the short documentation could used to implement
eldoc
-like functionality for Java stuff). That would require us to know the type of the receiver, but we'll know that most of the time (at least for already evaluated code).The text was updated successfully, but these errors were encountered: