nvf
nvf copied to clipboard
optPlugins causing build to fail
⚠️ Please verify that this bug has NOT been reported before.
- [X] I checked all existing issues and didn't find a similar issue
Description
Adding optPlugins in config causes build to fail with a mnw config error
👟 Reproduction steps
add
vim.optPlugins = ["plenary-nvim"];
to the config
👀 Expected behavior
build will succeed
😓 Actual Behavior
build failure with mnw configuration error
💻 Metadata
- system:
"x86_64-linux"- host os:Linux 6.6.53, NixOS, 24.11 (Vicuna), 24.11.20241004.bc947f5- multi-user?:yes- sandbox:yes- version:nix-env (Nix) 2.18.8- channels(root):"nixos"- nixpkgs:/nix/store/sdzpqjwx7pdx6lsq6llyfqqf7hspp83c-source
📝 Relevant log output
error:
… while calling the 'head' builtin
at /nix/store/sdzpqjwx7pdx6lsq6llyfqqf7hspp83c-source/lib/attrsets.nix:1575:11:
1574| || pred here (elemAt values 1) (head values) then
1575| head values
| ^
1576| else
… while evaluating the attribute 'value'
at /nix/store/sdzpqjwx7pdx6lsq6llyfqqf7hspp83c-source/lib/modules.nix:816:9:
815| in warnDeprecation opt //
816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
817| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: The option `programs.mnw.plugins."[definition 1-entry 34]".name' was accessed but has no value defined. Try setting the option.
seems to be caused by having "plenary-nvim" in both startPlugins and optPlugins. A lot of builtin plugins also install plenary as a startPlugins.
please move it to startPlugins for now; by the way, there is little point in putting plenary-nvim as optPlugin, since it doesn't impact startup time, at least not directly