Open lecopivo opened 10 years ago
Woops, I didn't notice this issue.
So to answer your questions:
This is currently not implemented but I'm aware of this problem. Optional arguments are ignored for now https://github.com/Sarcasm/irony-mode/blob/4554b91a4f80b758f16e9b6e25af651fbfc45624/server/src/Irony.cpp#L253-L255
For the documentation, libclang only provides the brief documentation and so does irony.
For the function arguments, I'm not sure what you mean, do you want the prototype like what is displayed in company's annotation?
I might be dumb but how do I display that brief documentation?
I'll give an example of what I mean. Let's have a function
/**
* @brieff Take squareroot of number
* @param x Number to take squareroot of.
* @return Squareroot of x
*/
float squareroot( float x ){ ...}
Now when I write square
and complete I get squareroot( float x )
with cursor at the beginning of float x
. I would like to display Number to take squareroot of.
somewhere, propably as tooltip.
I hope it is clear what I mean.
I might be dumb but how do I display that brief documentation?
Not dumb, the brief documentation is only supported on recent version of libclang (see the version check here: server/src/Irony.cpp#L23-L28), if your version is recent enough it should be displayed in the echo area like this:
It's perfectly clear now. So right now this is not possible and it is not planned in the short-term either but I agree that it would be nice to have someday.
The company-clang backend has company-clang-insert-arguments
option that defaults to on.
A similar option for the irony backend would be great.
@nickbroon how is this related to this issue? Pease open an issue for this.
I think I might have misread section 1 above, and thought it related. But I know see it's about default values. I'll open a new issue.
1.
When I complete function, than I do not get attributes which have default values.
Example:
they expant to
I would like to have option to expand
jump
tojump(int h)
or at least have some tooltip info that there is optional arguments. This leads me to next question2.
I would like to somehow display documentation(Doxygen) on completion candidates, for example as tooltip and as well to display documentation on function arguments.
Thank you, Tom