mirror of
https://github.com/nix-community/nixvim.git
synced 2026-08-24 10:14:03 -05:00
modules/plugins: add colorschemes by-name support
This commit is contained in:
committed by
Gaétan Lepage
parent
2b9d7f419e
commit
00a40d1a0a
+12
-6
@@ -2,15 +2,21 @@
|
|||||||
let
|
let
|
||||||
inherit (builtins) readDir;
|
inherit (builtins) readDir;
|
||||||
inherit (lib.attrsets) foldlAttrs;
|
inherit (lib.attrsets) foldlAttrs;
|
||||||
inherit (lib.lists) optional;
|
inherit (lib.lists) optional concatMap;
|
||||||
by-name = ../plugins/by-name;
|
|
||||||
|
mkByName =
|
||||||
|
dir:
|
||||||
|
foldlAttrs (
|
||||||
|
prev: name: type:
|
||||||
|
prev ++ optional (type == "directory") (dir + "/${name}")
|
||||||
|
) [ ] (readDir dir);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../plugins
|
../plugins
|
||||||
]
|
]
|
||||||
++ foldlAttrs (
|
++ concatMap mkByName [
|
||||||
prev: name: type:
|
../colorschemes
|
||||||
prev ++ optional (type == "directory") (by-name + "/${name}")
|
../plugins/by-name
|
||||||
) [ ] (readDir by-name);
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user