Skip to content

Commit

Permalink
lib/options/mkRaw: automatically convert example strings to rawLua type
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Dec 30, 2024
1 parent f4b0b81 commit c04dda0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ rec {
pluginDefault =
if args.pluginDefault == null then null else lib.nixvim.literalLua args.pluginDefault;
}
// lib.optionalAttrs (args ? example) {
example =
if builtins.isString args.example then lib.nixvim.literalLua args.example else args.example;
}
);
mkRaw = pluginDefault: description: mkRaw' { inherit pluginDefault description; };

Expand Down

0 comments on commit c04dda0

Please sign in to comment.