Skip to content

Instantly share code, notes, and snippets.

@lovesegfault
Created February 26, 2020 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovesegfault/5adda54020dd7e628febfd5b0ff78122 to your computer and use it in GitHub Desktop.
Save lovesegfault/5adda54020dd7e628febfd5b0ff78122 to your computer and use it in GitHub Desktop.
zedConf = generators.toKeyValue {
mkKeyValue = generators.mkKeyValueDefault {
mkValueString = v:
if isInt v then toString v
else if isString v then "\"${v}\""
else if true == v then "1"
else if false == v then "0"
else if isList v then "\"" + (concatStringsSep " " v) + "\""
else err "this value is" (toString v);
} "=";
} cfgZED.settings;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment