hardhat-vscode icon indicating copy to clipboard operation
hardhat-vscode copied to clipboard

Feature request: function documentation preview

Open developerdavi opened this issue 3 years ago • 2 comments
trafficstars

The issue

When you hover above a function/event call you get some description of it on a popup, but you can't see the documented block - if there's any - in the popup as well like we have on other languages.

Example

Consider this function: image

If we hover the mouse above a function call we will see the popup with the function definition but without the text extracted from the documentation block: image

In other languages e.g JavaScript the editor will show the documentation extracted from the JSDOC comment: image

Is that feature already included in the roadmap or is there some on going work already about that? I'm open to help to implement that if nobody is working on it right now.

developerdavi avatar Oct 04 '22 19:10 developerdavi

That is a great feature and one we want to deliver. The reason we don't show the documentation against the function currently is that our parser ignores comments (it is designed for compilation and comments don't affect that), hence that information is not coming through in our analysis.

We are developing a new parser that will include the documentation information and associate with the function, so this feature is currently blocked behind that.

kanej avatar Oct 06 '22 09:10 kanej

Got it! That's awesome. Thank you for the feedback :)

developerdavi avatar Oct 06 '22 16:10 developerdavi