-
Notifications
You must be signed in to change notification settings - Fork 54
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
Improvements to hover hints (support more doc tags) #565
Comments
I have a bit of a personal vendetta against |
Honestly, that's fair. The same logic applies to However I do really like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think that adding some new features to the hover hints for VSCode would drastically improve the ability to write concise documentation.
Context
Hover Hints display the documentation of variables you hover over. This is useful for quickly learning more about a given class.
The following tags are already supported with VSCode's Haxe integration:
@deprecated [reason or alternative]
@return [description of return value]
(@returns
works the same with the last tag taking precedence)@param [name] [description of param]
@exception [name] [description of exception]
(@throws
works the same)@event [name] [description of event]
@since [version]
@see [text or link]
A preview of all these options:
Suggestion
JavaDoc and Doxygen support many more tags than what Haxe docs do. I am not aware of how VSHaxe implements these, and to what extent these are the responsibility of VSCode itself, VSHaxe, CodeDox, or the language server to provide support for.
A description of tags, some or all of which would be a great fit for VSHaxe:
@author [author name]
displays an indented paragraph with the author(s) of a class or function. Supports multiple lines, or multiple@author
tags will be combined into multiple lines. See Doxygen@version []
@link
allows for the documentation of one class or field to link to another. See Doxygen{@link java.awt.Panel}
links to the Panel class and clicking the link takes you to its source code.@note [notice for user]
displays an indented paragraph headed with "Note", with no other special structure. See Doxygen@warning
and@attention
act similarly@value
displays the current value, if the field isfinal
and primative.@image
or@bug
.An example of what link looks like in JavaDoc. Clicking the hyperlink will take the user to that function's definition.
![image](https://user-images.githubusercontent.com/4635334/217105467-84c75fb1-9371-4824-8d40-3218e5e4ad49.png)
An example of what value looks like in JavaDoc. Hovering over PI will display "The value of PI is 3.14." in the IDE or in generated docs.
These are some of the other features I might like to see:
\
for tags rather than@
, for users who are used to C++ or copying code from an existing project.public var position(get, set):Float; /**< Detailed description after the member */
Additional Notes
For those looking to implement this (or maybe my future self when I have more time), I believe this is one of the relevant lines of code but there must be more too I think?
Here are some notes on the tags JavaDoc and Doxygen support:
The text was updated successfully, but these errors were encountered: