nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

[BUG] maybeRaw submodules do not generate suboption documentation

Open MattSturgeon opened this issue 1 year ago • 1 comments

Description

  • Options with the type listOf (maybeRaw submodule) or attrsOf (maybeRaw submodule) do not generate documentation for the submodule's options.
  • maybeRaw (listOf submodule) and maybeRaw (attrsOf submodule) have the same issue.
  • Switching to the type listOf submodule will cause documentation to generate as expected.

Minimal, Reproducible Example (MRE)

{
  working_option = helpers.mkNullOrOption' {
    type = with lib.types; listOf (submodule {
      options = {
        test_suboption = helpers.defaultNullOpts.mkStr "" ''
          This description **will** appear in the docs
        '';
      };
    });
  };

  broken_option1 = helpers.mkNullOrOption' {
    type = with helpers.nixvimTypes; listOf (maybeRaw (submodule {
      options = {
        test_suboption = helpers.defaultNullOpts.mkStr "" ''
          This description will **not** appear in the docs
        '';
      };
    }));
  };

  broken_option2 = helpers.mkNullOrOption' {
    type = with helpers.nixvimTypes; maybeRaw (listOf (submodule {
      options = {
        test_suboption = helpers.defaultNullOpts.mkStr "" ''
          This description will **not** appear in the docs
        '';
      };
    }));
  };
}

Options known to be affected

MattSturgeon avatar Jun 01 '24 22:06 MattSturgeon