1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +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 #6201
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

View file

@ -6,10 +6,11 @@ let
cfg = config.programs.zed-editor; cfg = config.programs.zed-editor;
jsonFormat = pkgs.formats.json { }; jsonFormat = pkgs.formats.json { };
mergedSettings = cfg.userSettings // { mergedSettings = cfg.userSettings
# this part by @cmacrae // (lib.optionalAttrs (builtins.length cfg.extensions > 0) {
auto_install_extensions = lib.genAttrs cfg.extensions (_: true); # this part by @cmacrae
}; auto_install_extensions = lib.genAttrs cfg.extensions (_: true);
});
in { in {
meta.maintainers = [ hm.maintainers.libewa ]; meta.maintainers = [ hm.maintainers.libewa ];

View file

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