{
  pkgs,
  lib,
  ...
}:
{
  programs.zed-editor = {
    enable = true;
    extensions = [
      "nix"
      "git-firefly"
      "toml"
      "ruff"
      "pylsp"
      "shades-of-purple-theme"
      "material-icon-theme"
    ];
    extraPackages = with pkgs; [
      nixd
      ruff
    ];
    mutableUserDebug = false;
    mutableUserKeymaps = false;
    mutableUserSettings = false;
    mutableUserTasks = false;
    userSettings = {
      auto_update = false;
      base_keymap = "VSCode";
      edit_predictions = {
        disabled_globs = [
          "**/.env*"
          "**/*.pem"
          "**/*.key"
          "**/*.cert"
          "**/*.crt"
          "**/secrets.yml"
        ];
      };
      features = {
        copilot = false;
      };
      file_scan_exclusions = [
        "_build"
        ".vscode"
        ".lexical"
        ".elixir_ls"
        ".coverage"
        ".venv"
        ".pytest_cache/"
        ".mypy_cache/"
        ".ruff_cache"
        ".git/"
        ".idea"
        "**/__pycache__"
        "node_modules"
        "test_db.sql"
        ".ropeproject"
        ".expert"
      ];
      format_on_save = "on";
      icon_theme = {
        mode = "system";
        light = "Material Icon Theme";
        dark = "Material Icon Theme";
      };
      load_direnv = "direct";
      languages = {
        Markdown = { };
        Nix = {
          language_servers = [
            "nixd"
            "!nil"
          ];
          formatter.external = {
            command = "${lib.getExe pkgs.nixfmt}";
            arguments = [
              "--quiet"
              "--"
            ];
          };
          show_edit_predictions = true;
        };
        Python = {
          language_servers = [
            "ty"
            "ruff"
          ];
          format_on_save = "on";
          formatter = [
            {
              code_action = "source.fixAll.ruff";
            }
            {
              code_action = "source.organizeImports.ruff";
            }
            {
              language_server = {
                name = "ruff";
              };
            }
          ];
          show_edit_predictions = true;
        };
      };
      lsp = {
        nixd = {
          binary.path = lib.getExe pkgs.nixd;
        };
        ruff = {
          binary = {
            path = lib.getExe pkgs.ruff;
            arguments = [ "server" ];
          };
        };
      };
      preview_tabs = {
        enabled = true;
        enable_preview_from_file_finder = true;
        enable_preview_from_code_navigation = true;
      };
      show_edit_predictions = true;
      tabs = {
        file_icons = true;
        git_status = true;
      };
      tab_size = 2;
      telemetry = {
        diagnostics = false;
        metrics = false;
      };
      minimap.show = "never";
      use_smartcase_search = true;
      vim_mode = true;
      relative_line_numbers = true;
      remove_trailing_whitespace_on_save = true;
      theme = lib.mkForce {
        mode = "system";
        light = "Shades Of Purple";
        dark = "Shades Of Purple (Super Dark)";
      };
    };
  };
}
