mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
packer: init plugin
This commit is contained in:
parent
5ffa2b4543
commit
f7e02b3ccf
6 changed files with 119 additions and 22 deletions
|
@ -9,10 +9,15 @@ rec {
|
|||
# lua equivalents!
|
||||
toLuaObject = args:
|
||||
if builtins.isAttrs args then
|
||||
"{" + (concatStringsSep ","
|
||||
(mapAttrsToList
|
||||
(n: v: "[${toLuaObject n}] = " + (toLuaObject v))
|
||||
(filterAttrs (n: v: !isNull v || v == {}) args))) + "}"
|
||||
if hasAttr "__raw" args then
|
||||
args.__raw
|
||||
else
|
||||
"{" + (concatStringsSep ","
|
||||
(mapAttrsToList
|
||||
(n: v: if head (stringToCharacters n) == "@" then
|
||||
toLuaObject v
|
||||
else "[${toLuaObject n}] = " + (toLuaObject v))
|
||||
(filterAttrs (n: v: !isNull v || v == {}) args))) + "}"
|
||||
else if builtins.isList args then
|
||||
"{" + concatMapStringsSep "," toLuaObject args + "}"
|
||||
else if builtins.isString args then
|
||||
|
@ -97,4 +102,6 @@ rec {
|
|||
|
||||
inherit value global;
|
||||
};
|
||||
|
||||
mkRaw = r: { __raw = r; };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue