diff options
| author | schererleander <leander@schererleander.de> | 2026-01-09 16:57:15 +0100 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2026-01-09 23:13:49 +0100 |
| commit | 3b5a73c436eb22e0cda59469263490705e149cb9 (patch) | |
| tree | ae3f20ca6008b11f71247dfc6e2df8218de9b95c /modules/home/editors/zed/default.nix | |
| parent | ec45aae780da92e12cf82c5a32e336b14b7540ba (diff) | |
refactor: use flake-parts, change modules structure
Diffstat (limited to 'modules/home/editors/zed/default.nix')
| -rw-r--r-- | modules/home/editors/zed/default.nix | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/modules/home/editors/zed/default.nix b/modules/home/editors/zed/default.nix new file mode 100644 index 0000000..431560c --- /dev/null +++ b/modules/home/editors/zed/default.nix @@ -0,0 +1,91 @@ +{ + config, + lib, + ... +}: + +let + inherit (lib) + mkEnableOption + mkOption + types + mkIf + optionals + ; + cfg = config.nx.editors.zed-editor; +in +{ + options.nx.editors.zed-editor = { + enable = mkEnableOption "zed editor"; + + langs = { + nix = mkOption { + description = "enable nix integration"; + type = types.bool; + default = true; + }; + python = mkOption { + description = "enable python integration"; + type = types.bool; + default = false; + }; + rust = mkOption { + description = "enable rust integration"; + type = types.bool; + default = false; + }; + go = mkOption { + description = "enable go integration"; + type = types.bool; + default = false; + }; + lua = mkOption { + description = "enable lua integration"; + type = types.bool; + default = false; + }; + docker = mkOption { + description = "enable docker integration"; + type = types.bool; + default = false; + }; + java = mkOption { + description = "enable java integration"; + type = types.bool; + default = false; + }; + cmake = mkOption { + description = "enable cmake integration"; + type = types.bool; + default = false; + }; + toml = mkOption { + description = "enable toml integration"; + type = types.bool; + default = false; + }; + }; + }; + + config = mkIf cfg.enable { + programs.zed-editor = { + enable = true; + extensions = + [ ] + ++ (optionals cfg.langs.nix [ "nix" ]) + ++ (optionals cfg.langs.python [ "python" ]) + ++ (optionals cfg.langs.rust [ "rust" ]) + ++ (optionals cfg.langs.go [ "go" ]) + ++ (optionals cfg.langs.lua [ "lua" ]) + ++ (optionals cfg.langs.docker [ "dockerfile" ]) + ++ (optionals cfg.langs.java [ "java" ]) + ++ (optionals cfg.langs.cmake [ "cmake" ]) + ++ (optionals cfg.langs.toml [ "toml" ]); + userSettings = { + telemetry = { + metrics = false; + }; + }; + }; + }; +} |
