1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-04-09 10:34:44 +00:00

zed-editor: fix always generating settings.json

Makes it so settings.json no longer gets made by ensuring it can be
empty as expected when there are no extensions or userSettings
defined.

PR 
This commit is contained in:
DaRacci 2024-12-12 02:37:04 +00:00 committed by Robert Helgesson
parent 3066cc58f5
commit 66c5d8b628
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
2 changed files with 5 additions and 5 deletions
modules/programs
tests/modules/programs/zed-editor

View file

@ -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 ];

View file

@ -17,7 +17,6 @@
nmt.script = let
expectedContent = builtins.toFile "expected.json" ''
{
"auto_install_extensions": {},
"buffer_font_size": 16,
"features": {
"copilot": false