Skip to content

Introduce the online documentation system

We want to have smth similar to ocamldoc for LIGO, i.e. we want to write special documentation comments like

(** Throws exception if input is empty. Use [List.safe_head] if you dislike exceptions *)
let head = ...

I suggest to threat comments with messages started with * as documentation, as e.g. in OCaml

This comment should be shown while we hover over head (in both cases if its a stdlib function or if its a function defined by the user with a special comment)

We need to

  • add documentation to stdlib
  • show documentation (if available) in LSP hovers
  • add a CLI entry to create a HTML file from a LIGO (both jsligo and cameligo) file with ducumenation
  • Publish HTML docs for stdlib on the website

We need to create nice HTML stuff from modules, ideally support links for things like [x], etc so we can try to reuse ocamldoc as a library

HTML-related stuff is discussed at https://tezos-dev.slack.com/archives/GMHV0U3Q9/p1698935066229899