nix-community.nixvim/modules/plugins.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
328 B
Nix
Raw Normal View History

{ lib, ... }:
let
inherit (builtins) readDir;
inherit (lib.attrsets) foldlAttrs;
inherit (lib.lists) optional;
by-name = ../plugins/by-name;
in
{
imports =
[ ../plugins ]
++ foldlAttrs (
prev: name: type:
prev ++ optional (type == "directory") (by-name + "/${name}")
) [ ] (readDir by-name);
}