-
Notifications
You must be signed in to change notification settings - Fork 793
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 Overhaul #4154
Comments
Agreed, one fundamental problem is that we have not decided on a syntax yet. Is it markdown or xml? If both then how/where do we tell/detect the difference? |
@matthid i was thinking it'd be like /// <summary>
/// xml doccoms
/// </summary> (**
markdown doccom
**) Both would be parsed and stored as xml like normal though. The conversion is pretty simple, ionide already converts from xml to markdown to create the tooltips |
The |
Tool window for docs would be awesome! About markdown: Since there already exists codebase which uses markdown with Another feature I'd love to see is some linebreaks and formatting of overly long type and member signatures. |
@majocha the existing markdown codebases will markdown doccoms will just have to update. Once there's a standard they can adjust to it. I'm a maintainer of most of the projects that make the most extensive use of it, so I can just fix those myself 😉 |
I really like the thinking here
I'm not at all keen on requiring Would it be plausible to make
|
As I've been working on updating and improving
FSharp.Formatting
I've had some thoughts about how we can improve the experience of writing F# documentation, consuming documentation, and building tools to provide documentation.Parity with C# Features
Improving editor tooling support to the level currently enjoyed by C# in Visual Studio should be the bare minimum that we shoot for.
Fix Rendering Inconsitencies
Granted what C# does regarding the tooltip size is pretty terrible (and we should at least address the size by allowing the user to set a max height and width for the intellisense tooltips), within XML style documentation comments we should at least follow the rules regarding line breaks
Properly Support Listed XML Tags
Currently of the tags listed in the F# documentation the
only ones that currently work properly are
<summary>
,<exception>
, and<para>
. We should extend support to the set of tags that C# Supports -(
*
denotes that the compiler verifies syntax.)<b>
&<i>
should also be supported in summary, remarks, example, etc.Improve FCS API for Consuming Tooltips
I think the model that is used for the documentation data could be improved using something like -
Creating an individual data record type for each construct category is another option
so they only contain the relevant data.
I realize this is simalr to
FSharpMethodGroupItemParameters
,FSharpMethodGroupItem
, etc. but Ithink that we could have a better set of types to model this data oriented toward external
consumption.
Markdown Styled Documentation Comments
We're already working in an environment where F# Documentation comments are being parsed
for markdown so we should take better advatage of it
VsCode already supports markdown to great effect
But in Visual Studio it looks terrible
DocFx ( which is used to generate the official F# help documentation ) also already supports markdown
FSharp.Formatting
parses comments for markdown to build webpages.There are several disadvatanges to the
///
I don't think that markdown style and xml style should be mixed which is why
markdown styled documentation comments could follow conventions similar to [the
ones that OcamlDoc uses] (https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sec349)
(** **)
XCode's scope goes further than what i think is necessary, especially the callouts if markdown is going to be supported
This new style of documentation comments wouldn't be supported by DocFx straight out of the gate, but we can easily extend it to support whatever conventions we decide upon
Detailed Info Tool Window
I totally understand that building this tool window is out of scope for the F# VS tooling, but the point I'm trying to make is that we should make it easy to build this kind of tool even if it's included with VisualFSharp.
this is the tooltip for
Async.OnCancel
This is the documentation comment in the signature file containing
Async.OnCancel
That's some really useful information, it'd be great if we were able to see it in VS somehow, especially since we already have it in
FSharp.Core.xml
Async
sure does have a lot of methods, it'd be nice if we could see all of them and their respective documentation commentsBetween the content of the xml files for the libraries and the metadata in the
.dll
s we could do a lot more to surface useful information to F# devs that's rightunder their fingertips if only they knew how to look.
It would be like a much improved version of the Quick Help Inspector in XCode
References
///
Code Comment Support(BTW these aren't "I hope someone else will do this" suggestions, I'm more than willing to implement all of this myself)
The text was updated successfully, but these errors were encountered: