mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 12:45:24 +02:00
docs: Correctly generate documentation for types either a (submodule ...)
(#929)
This requires pulling quite a lot of code from nixpkgs in order to make the `either` type work correctly, the effects can be seen for example in the documentation of `ollama.promps` and `ollama.actions`
This commit is contained in:
parent
61da581315
commit
29225c2797
10 changed files with 509 additions and 308 deletions
19
docs/man/default.nix
Normal file
19
docs/man/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
options-json,
|
||||
runCommand,
|
||||
installShellFiles,
|
||||
nixos-render-docs,
|
||||
}:
|
||||
runCommand "nixvim-configuration-reference-manpage" {
|
||||
nativeBuildInputs = [installShellFiles nixos-render-docs];
|
||||
} ''
|
||||
# Generate man-pages
|
||||
mkdir -p $out/share/man/man5
|
||||
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
|
||||
--revision unstable \
|
||||
--header ${./nixvim-header.5} \
|
||||
--footer ${./nixvim-footer.5} \
|
||||
${options-json}/share/doc/nixos/options.json \
|
||||
$out/share/man/man5/nixvim.5
|
||||
compressManPages $out
|
||||
''
|
3
docs/man/nixvim-footer.5
Normal file
3
docs/man/nixvim-footer.5
Normal file
|
@ -0,0 +1,3 @@
|
|||
.SH "AUTHORS"
|
||||
.PP
|
||||
nixvim maintainers
|
15
docs/man/nixvim-header.5
Normal file
15
docs/man/nixvim-header.5
Normal file
|
@ -0,0 +1,15 @@
|
|||
.TH "NIXVIM" "5" "01/01/1980" "Nixvim" "Nixvim Reference Pages"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" enable line breaks after slashes
|
||||
.cflags 4 /
|
||||
.SH "NAME"
|
||||
nixvim options specification
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This page lists all the options that can be used in nixvim. Nixvim can either be used as a Home-Manager module, an NixOS module or a standalone package. Please refer to the installation instructions for more details.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
You can use the following options in a nixvim module.
|
Loading…
Add table
Add a link
Reference in a new issue