mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/by-name: remove pathExists
check
This commit is contained in:
parent
6debe9333f
commit
48e9af500c
1 changed files with 6 additions and 8 deletions
|
@ -1,17 +1,15 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (builtins) readDir pathExists;
|
||||
inherit (builtins) readDir;
|
||||
inherit (lib.attrsets) foldlAttrs;
|
||||
inherit (lib.lists) optional optionals;
|
||||
inherit (lib.lists) optional;
|
||||
by-name = ../plugins/by-name;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ ../plugins ]
|
||||
++ optionals (pathExists by-name) (
|
||||
foldlAttrs (
|
||||
++ foldlAttrs (
|
||||
prev: name: type:
|
||||
prev ++ optional (type == "directory") (by-name + "/${name}")
|
||||
) [ ] (readDir by-name)
|
||||
);
|
||||
) [ ] (readDir by-name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue