mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +02:00
docs: Add basic documentation system based on nmd
You can now run `nix build '.#docs'` to build HTML documentation documenting every single option on nixvim! Fortunately, thanks to the 'description' field, most options are already documented, but there are still a fair few that need documenting. I will be taking care of those in the next few days. When those are done, I will find a way to automatically rebuild documentation on every repo push, and also add a PR hook requiring documentation. Additionally, I will try to find a way to have per-page plugin docs.
This commit is contained in:
parent
69cf1b6204
commit
eef84178ab
42 changed files with 184 additions and 51 deletions
|
@ -17,23 +17,25 @@ mkPlugin args {
|
|||
lists = mkDefaultOpt {
|
||||
description = "Startify display lists. If it's a string, it'll be interpreted as literal lua code";
|
||||
global = "startify_lists";
|
||||
type = types.listOf (types.oneOf [types.submodule {
|
||||
type = mkOption {
|
||||
type = types.str;
|
||||
description = "The type of the list";
|
||||
type = types.listOf (types.oneOf [(types.submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = types.str;
|
||||
description = "The type of the list";
|
||||
};
|
||||
# TODO the header should be a literal lua string!
|
||||
header = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional header. It's a list of strings";
|
||||
default = null;
|
||||
};
|
||||
indices = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional indices for the current list";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
# TODO the header should be a literal lua string!
|
||||
header = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional header. It's a list of strings";
|
||||
default = null;
|
||||
};
|
||||
indices = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional indices for the current list";
|
||||
default = null;
|
||||
};
|
||||
} types.str]);
|
||||
}) types.str]);
|
||||
|
||||
value = val: let
|
||||
list = map (v: if builtins.isAttrs v then toLuaObject v else v) val;
|
||||
|
@ -131,7 +133,7 @@ mkPlugin args {
|
|||
};
|
||||
|
||||
enableSpecial = mkDefaultOpt {
|
||||
description = "Show <empty buffer> and <quit>";
|
||||
description = "Show <empty buffer> and <quit>";
|
||||
global = "startify_enable_special";
|
||||
type = types.bool;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue