diff --git a/modules/programs/zed-editor.nix b/modules/programs/zed-editor.nix index a9baebf90..80039a8ca 100644 --- a/modules/programs/zed-editor.nix +++ b/modules/programs/zed-editor.nix @@ -6,10 +6,11 @@ let cfg = config.programs.zed-editor; jsonFormat = pkgs.formats.json { }; - mergedSettings = cfg.userSettings // { - # this part by @cmacrae - auto_install_extensions = lib.genAttrs cfg.extensions (_: true); - }; + mergedSettings = cfg.userSettings + // (lib.optionalAttrs (builtins.length cfg.extensions > 0) { + # this part by @cmacrae + auto_install_extensions = lib.genAttrs cfg.extensions (_: true); + }); in { meta.maintainers = [ hm.maintainers.libewa ]; diff --git a/tests/modules/programs/zed-editor/settings.nix b/tests/modules/programs/zed-editor/settings.nix index 701caab13..e6f077423 100644 --- a/tests/modules/programs/zed-editor/settings.nix +++ b/tests/modules/programs/zed-editor/settings.nix @@ -17,7 +17,6 @@ nmt.script = let expectedContent = builtins.toFile "expected.json" '' { - "auto_install_extensions": {}, "buffer_font_size": 16, "features": { "copilot": false