I think these strings show in the signature hints in VS Code. Other than that, we don’t generate docs for our frontend code, we rather use Storybook for components, but that means no HTML docs for non-visual modules, so working odoc generation would be nice. I guess it would be even nicer for teams using ReScript for everything (we use native OCaml for our backend).
No shortcut yet. Dedicated doc header parsing will be added later on, so just go on with ocaml.doc for now. The reformatter will take care of the annotations as soon as we have the /** */ syntax.
Can I somehow learn more about the plans for documentation comments? This is maybe the main blocker stopping us from switching to rescript syntax, and I would like to understand whether you’re moving (or at least thinking) into a direction that would work for us.
FYI, as minimum support, I think we would need:
vs code lets us write doc comments in resi files
vs code shows doc comments from resi files in res files when hovering over an imported name
vs code shows doc comments from resi files in res files when selecting a name to autocomplete
Also helpful would be:
vs code lets us write doc comments in res files
vs code shows doc comments from the same res file when hovering over a local name
vs code shows doc comments from the same res file when selecting a name to autocomplete
generation of a website with API documentation from a resi file, resolving all includes, with custom ordering and some interspersed text
Absolutely amazing would be:
Documentation for module types can declare documentation arguments with defaults that can be overwritten when including a module type (a bit like in Scaladoc, but actually working in a sane way)
edit: Oh I just saw in the release notes for rescript-vscode 1.1.1 that hover is supposed to show documentation. Maybe I’m doing something wrong in my testing. Will try harder.
another edit: Ok I see now that with res&resi only, @ocaml.doc("...") comments work in VS code as expected Interop with re&rei seems a bit sketchy but I guess we can live with that. Overall the VS Code plugin appears pretty nice. Maybe it is time for us to switch now
The @ocaml.doc format is a placeholder, which will later be replaced by first-class doc comments in the language. However, changing over will probably be automatic by reformatting once or something.