Skip to content

docs/hacking: add guidelines for setupOpts options - #1792

Draft
horriblename wants to merge 1 commit into
NotAShelf:mainfrom
horriblename:docs-setupopts-options
Draft

docs/hacking: add guidelines for setupOpts options#1792
horriblename wants to merge 1 commit into
NotAShelf:mainfrom
horriblename:docs-setupopts-options

Conversation

@horriblename

Copy link
Copy Markdown
Collaborator

Would like some feedback from other maintainers

github-actions Bot pushed a commit that referenced this pull request Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🚀 Live preview deployed from 45ad224

View it here:

Debug Information

Triggered by: horriblename

HEAD at: docs-setupopts-options

Reruns: 4020

Comment thread docs/manual/hacking.md
enough to justify the additional maintainer burden.
2. It is used by some other nix module, usually for integration between
different plugins/modules.
3. It is a path to some third-party program.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly add key mapping opts?

some plugins by default add keymaps without asking yk, that would basically doc them in nvf

snoweuph
snoweuph previously approved these changes Aug 19, 2026

@snoweuph snoweuph left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it :3

Comment thread docs/manual/hacking.md Outdated
```

### Packaging Complex Plugins {#sec-pkgs-for-plugins}
### Packaging Plugins with a Special Build Step {#sec-pkgs-for-plugins}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Packaging Plugins with a Special Build Step {#sec-pkgs-for-plugins}
### Packaging Plugins with a Special Build Steps {#sec-pkgs-for-plugins}

Singular kinda implies there cannot be more than one special step, which is not true for the Rust bullshit (I will dropkick whoever started the trend of loading Rust libs in Lua plugins)

Comment thread docs/manual/hacking.md Outdated

1. The option benefits greatly from advanced type checking, and is commonly used
enough to justify the additional maintainer burden.
2. It is used by some other nix module, usually for integration between

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. It is used by some other nix module, usually for integration between
2. It is used by some other Nix module, usually for integration between

Comment thread docs/manual/hacking.md Outdated
Comment on lines +741 to +742
1. The option benefits greatly from advanced type checking, and is commonly used
enough to justify the additional maintainer burden.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should also mention that we add the option if it has any values worth documenting, e.g., the example field or just documentation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean generalize the first point to "moar documentation" or add an entirely new point? I think it's close enough to generalize the first

Comment thread docs/manual/hacking.md
Comment on lines +759 to +763
fzf_bin = mkOption {
type = str;
default = "${lib.getExe pkgs.fzf}";
description = "Path to fzf executable";
};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fzf_bin = mkOption {
type = str;
default = "${lib.getExe pkgs.fzf}";
description = "Path to fzf executable";
};
fzf_bin = mkOption {
type = str;
default = "${lib.getExe pkgs.fzf}";
example = "fzf"; # to get fzf from PATH
description = "Path to fzf executable";
};

Makes for a better example imo.

Comment thread docs/manual/hacking.md
# 2. Integrates with the vim.ui.borders module
winopts.border = mkOption {
type = borderType;
default = config.vim.ui.borders.globalStyle;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default = config.vim.ui.borders.globalStyle;
default = config.vim.ui.borders.globalStyle;
defaultText = lib.literalExpression "config.vim.ui.borders.globalStyle";

Causes extra eval during documentation build otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants