From c25f5b683977e2d6d6dc175d2272c200d40bf92d Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 19 Jun 2025 02:53:07 +0300 Subject: [PATCH] i dont want to just type each plugin name in the import list --- config/plugins/default.nix | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/config/plugins/default.nix b/config/plugins/default.nix index 0af3fea..75ea12f 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -1,16 +1,8 @@ -{ - # settings of these plugins live in their respective files - imports = [ - ./blink-cmp.nix - ./cmp.nix - ./comment.nix - ./gitsigns.nix - ./lsp.nix - ./mini.nix - ./oil.nix - ./treesitter.nix - ./which-key.nix - ]; +{lib, ...}:{ + imports = lib.mapAttrsToList (name: path: ./. + "/${name}") + (lib.filterAttrs (filename: kind: + filename != "default.nix" && (kind == "regular" || kind == "directory")) + (builtins.readDir ./.)); plugins = { # todo comments highlighter