Another thing I want to add is that I would love to have offline Nim 
documentation. GNU Info is a great format for writing book-sized manuals which 
can be read directly from within the editor. Info is normally generated from 
GNU Texinfo files, but it should be fairly straight-forward to generate Info 
files from some other source.

Online-only documentation has three main problems:

  * I need an internet connection to access it, which might not always be a 
given
  * It (often times) only covers the most recent version while I might have an 
older version installed on my system (Void is still on 1.6.14, but there is a 
[PR](https://github.com/void-linux/void-packages/pull/46187) for it)
  * HTML might not be my format of choice, maybe I prefer a different format 
that I can read straight from my text editor



GNU Guile is an example of a language that includes a full offline copy of its 
manual in Info format. I am not saying that Nim must use Info, but it would 
make sense to at least offer it as an option because we could piggy-back on the 
existing tooling.

As for libraries, nimble could provide a `nimble doc` command which would open 
the manual of the library. Maybe have a format option, so the user can do 
`nimble doc foo --format=html` or `nimble doc foo --format=info` depending on 
which format he prefers. Nimble only needs to return the path to the manual 
file, the user can do whatever he wants with the path, like run `xdg-open 
$(nimble doc foo --format=html)` to open the page in a browser.

Reply via email to