docs/hacking: add guidelines for setupOpts options - #1792
Conversation
| 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. |
There was a problem hiding this comment.
possibly add key mapping opts?
some plugins by default add keymaps without asking yk, that would basically doc them in nvf
| ``` | ||
|
|
||
| ### Packaging Complex Plugins {#sec-pkgs-for-plugins} | ||
| ### Packaging Plugins with a Special Build Step {#sec-pkgs-for-plugins} |
There was a problem hiding this comment.
| ### 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)
|
|
||
| 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 |
There was a problem hiding this comment.
| 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 |
| 1. The option benefits greatly from advanced type checking, and is commonly used | ||
| enough to justify the additional maintainer burden. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| fzf_bin = mkOption { | ||
| type = str; | ||
| default = "${lib.getExe pkgs.fzf}"; | ||
| description = "Path to fzf executable"; | ||
| }; |
There was a problem hiding this comment.
| 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.
| # 2. Integrates with the vim.ui.borders module | ||
| winopts.border = mkOption { | ||
| type = borderType; | ||
| default = config.vim.ui.borders.globalStyle; |
There was a problem hiding this comment.
| 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.
fa7f958 to
83ab570
Compare
Would like some feedback from other maintainers