mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
helpers/mkDefaultOpt: make 'global' parameter optional
This commit is contained in:
parent
f1c8f9a8d2
commit
6e39178dd3
1 changed files with 8 additions and 2 deletions
|
@ -334,7 +334,13 @@ with lib; rec {
|
|||
globals =
|
||||
mapAttrs'
|
||||
(optName: opt: {
|
||||
name = globalPrefix + opt.global;
|
||||
name = let
|
||||
optGlobal =
|
||||
if opt.global == null
|
||||
then optName
|
||||
else opt.global;
|
||||
in
|
||||
globalPrefix + optGlobal;
|
||||
value = cfg.${optName};
|
||||
})
|
||||
options;
|
||||
|
@ -386,7 +392,7 @@ with lib; rec {
|
|||
|
||||
mkDefaultOpt = {
|
||||
type,
|
||||
global,
|
||||
global ? null,
|
||||
description ? null,
|
||||
example ? null,
|
||||
default ? null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue