24 Commits
Author SHA1 Message Date
Matt Sturgeon d3ba58e0bd docs/modules: move rendering logic 2026-07-04 13:55:02 +00:00
Matt Sturgeon 79df3b165c docs/modules: propagate collections of page nodes 2026-07-04 13:55:02 +00:00
Matt Sturgeon 2ab9e79e92 docs/modules: add main entrypoint 2026-07-04 13:55:02 +00:00
Matt Sturgeon c02fd3edc6 docs/lib: use structuredAttrs
When using structuredAttrs, we don't need a separate "function locations"
derivation. Instead, we can read directly from NIX_ATTRS_JSON_FILE.
2026-06-23 18:14:39 +00:00
Matt Sturgeon 91df3d9f91 docs/modules: model page content as sections
Represent page content as a list of typed sections, rather than a fixed
set of page attributes.

This allows pages to be composed from multiple content sources while
simplifying the rendering logic and prepares the new docs system for
additional section types such as option documentation.
2026-06-23 01:04:32 +00:00
Matt Sturgeon a50452bdc1 doc/lib: add lib.nixvim.modules page
This documents functions like `lib.nixvim.evalNixvim`, `buildNixvim`,
and `testNixvim.
2026-06-07 12:49:05 +00:00
Matt Sturgeon fca03f1759 lib: allow instantiating without a flake instance
Separate `overlay.nix` and `overlay.internal.nix`, to encapsulate the
`flake` argument. This allows non-flake users to import `./overlay.nix`
without providing a dummy `flake = null` attr.

The read-only `config.flake` option is only defined by `evalNixvim` when
`lib` is extended using the overlay in Nixvim's flake outputs.
2026-05-24 03:05:36 +00:00
Gaetan LepageandAustin Horstman 1d333fc92e treewide: apply linter suggestions 2025-12-28 04:26:49 +00:00
Zexin YuanandGaétan Lepage d52007581e docs: format nix examples in documentation 2025-12-13 08:51:26 +00:00
saygo-pngandMatt Sturgeon 03a51dbf3d treewide: NixVim/nixvim -> Nixvim
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-12-04 23:22:21 +00:00
Axel KarjalainenandMatt Sturgeon 4c4cac6445 docs: use official names of NixOS, Home Manager and nix-darwin 2025-10-18 00:05:26 +00:00
Axel KarjalainenandMatt Sturgeon 15b1a1ffca docs: document programs.nixvim submodule 2025-10-18 00:05:26 +00:00
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
saygo-pngandMatt Sturgeon 3708f788e2 docs: fix typo
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-07-12 13:33:45 +00:00
Matt Sturgeon f4a7447d27 lib/util: move docs from lib/index to doc-comments
Moved all function-specific docs from `docs/lib/index.md` into RFC145
doc-comments.

Added `lib.nixvim.lua.toLuaObject` to hold the public docs and serve as
a stable impl of `toLua'` in case we decide to change its defaults.
2025-05-19 00:23:21 +01:00
Matt Sturgeon 4a272ca5d7 docs/lib: enable lib.nixvim.lua docs 2025-05-19 00:23:20 +01:00
Matt Sturgeon bda4be03fc docs/lib: enable lib.nixvim.utils docs 2025-05-19 00:23:20 +01:00
Matt Sturgeon 2ee5d71d52 doc/lib/index.md: update heading title
Move heading to `pages.nix` page title.
2025-05-19 00:22:43 +01:00
Matt Sturgeon 83d3535097 docs/man: include all sections from lib-doc 2025-05-19 00:20:29 +01:00
Matt Sturgeon 0c7e2aa96b docs: user-guide/helpers.mdlib/index.md
Move the user-guide to the new lib reference docs.

Added a MDBook redirect entry.

Updated man docs.
2025-05-19 00:19:57 +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