inputs@{ machine, ... }:
{
  imports = machine.program {
    name = "zed";
    inherit inputs;
    requirements = [
      "work"
      "graphical"
    ];
    home-config =
      { pkgs, ... }:
      {
        home.packages = pkgs.custom.maple-fonts-pack;

        programs.zed-editor = {
          enable = true;
          extensions = [
            "nix"
            "intellij-newui-theme"
            "charmed-icons"
            "astro"
          ];
          userSettings = {

            ssh_connections = [
              {
                host = "icecube";
                args = [ ];
                projects = [
                  {
                    paths = [
                      "/home/jana/src/eii-test"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/example"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/fitgirl-ddl"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/libs-team/tools/unstable-api"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/ml-kem-hang"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/opendal/core"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/rust"
                    ];
                  }
                  {
                    paths = [
                      "/home/jana/src/span-lowering-tests"
                    ];
                  }
                ];
              }
            ];
            icon_theme = "Warm Charmed Icons";
            ui_font_size = 16;
            buffer_font_size = 16;
            theme = {
              mode = "system";
              light = "One Light";
              dark = "JetBrains New Dark";
            };
            disable_ai = true;

            preview_tabs = {
              enabled = true;
              enable_preview_from_file_finder = true;
            };

            close_on_file_delete = true;
            confirm_quit = true;

            edit_predictions_disabled_in = [
              "comment"
              "string"
            ];

            vim_mode = true;
            cursor_blink = false;
            vertical_scroll_margin = 0;

            inlay_hints = {
              enabled = true;
            };

            project_panel = {
              dock = "right";
              git_status = false;
            };
            minimap = {
              show = "auto";
              thumb = "always";
              thumb_border = "left_open";
            };
            tab_bar = {
              show = true;
              show_nav_history_buttons = false;
              show_tab_bar_buttons = false;
            };
            tabs = {
              file_icons = true;
              git_status = false;
              activate_on_close = "history";
              show_close_button = "hover";
            };
            lsp = {
              rust-analyzer = {
                initialization_options = {
                  inlayHints = {
                    lifetimeElisionHints = "always";
                    discriminantHints = "always";
                  };
                  diagnostic = {
                    refreshSupport = true;
                  };
                };
                binary = {
                  path_lookup = true;
                };
              };
              nil = {
                binary = {
                  ignore_system_version = false;
                  path = "${pkgs.lib.getExe' pkgs.nil "nil"}";
                };

                initialization_options = {
                  formatting = {
                    command = [ "${pkgs.lib.getExe' pkgs.nixfmt "nixfmt"}" ];
                  };
                };
              };
            };
            diagnostics = {
              button = false;
              include_warnings = true;
              inline = {
                enabled = true;
              };
            };
            terminal = {
              "dock" = "left";
              "env" = {
                # "EDITOR": "zeditor --wait"
                "EDITOR" = "vim";
              };
              "font_size" = 12;
              "font_family" = "Maple Mono NF";
              "line_height" = "standard";
            };
            buffer_font_family = "Maple Mono NF";

            # "diagnostics_max_severity": "off",

            "experimental.theme_overrides" = {
              "syntax" = {
                "comment.doc" = {
                  "color" = "#77B767";
                };
              };
            };
          };
        };
      };
  };
}
