-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Documentation GenerationRelated to documentation generation (but not content).Related to documentation generation (but not content).Feature
Description
docgen should index importc name (and importjs, importcpp etc)
Example
# main.nim
proc foo*(frmt: cstring): cint {.importc: "printf", header: "<stdio.h>", varargs, discardable.}Current Output
nim doc --project --outdir:/tmp/d23 main
python3 -m http.server 7031 --directory /tmp/d23
open http://localhost:7031/t11555.html
- P1: in search box, type printf: no search results
- P2: use browser, search for printf: no search results unless you expand the pragma which is collapsed by default
- P3: theindex.html has no entries for printf
Expected Output
printf shows up for P1, P2, P3
Possible Solution
automatically add importc name via idx: docgen feature or via some other way
Additional Information
1.5.1 297c8e4
This also came up here: I think official sdl2 nim lib is chaos. - Nim forum
with this feature, we'd be able to search for an importc name in docs (eg SDL_RenderSetLogicalSize) and it'd show the corresponding nim symbol setLogicalSize, defined as:
proc setLogicalSize*(renderer: RendererPtr; w, h: cint): cint {.
importc: "SDL_RenderSetLogicalSize".}juancarlospaco, planetis-m, Yepoleb, a-mr, The-Jon and 2 more
Metadata
Metadata
Assignees
Labels
Documentation GenerationRelated to documentation generation (but not content).Related to documentation generation (but not content).Feature