1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-09 12:06:05 +01:00
Commit graph

6 commits

Author SHA1 Message Date
Matt Sturgeon
4f03ca05d9 docs/lib: generalise menu impl using module system
Move the mdbook menu rendering code into the module system and
generalise it to apply to multiple "categories" (mdbook parts) and
"types" of category (prefix, suffix, etc).
2025-09-30 16:21:23 +00:00
Matt Sturgeon
2f952af4a7 docs/lib: rename 'name' → 'category' 2025-09-30 16:21:23 +00:00
Matt Sturgeon
c146f6e09c docs/lib: simplify default title-heading 2025-09-30 16:21:23 +00:00
Matt Sturgeon
4414d8aa14 docs/modules: init
Modules to represent pages in the docs
2025-09-30 16:21:23 +00:00
Matt Sturgeon
83d3535097
docs/man: include all sections from lib-doc 2025-05-19 00:20:29 +01:00
Matt Sturgeon
dfaea5982e
docs/lib: init
Generate reference docs for functions that have RFC145 style
doc-comments.

1. function locations

  `docs/lib/function-locations.nix` scans nixvim's extended lib,
  extracting "position entries" via `unsafeGetAttrPos`.

  This is then converted into a nixdoc `locations.json` map of
  "function name" → "markdown location string".

2. mdbook menu

  `docs/lib/menu.nix` renders a mdbook menu representing all page
  entries.

3. markdown pages

  `docs/lib/default.nix` expects a set of "page entries", which come
  from `docs/lib/pages.nix` by default. It passes this data to
  `function-locations.nix` and `menu.nix`, and uses it internally to
  render markdown pages.

  Page entries can contain a `file` to render using `nixdoc`, and also a
  `markdown` attribute which will be included at the top of the docs.

  Additionally, a `title` can be included. This forms the heading
  `$name: $title`, where `name` is derived from the page's attr-path.

  See https://github.com/nix-community/nixdoc
2025-05-19 00:19:56 +01:00