current
 1{
 2  den.aspects.dev.provides.zed.homeManager = {pkgs, ...}: let
 3    wakatime-ls = pkgs.rustPlatform.buildRustPackage (finalAttrs: {
 4      pname = "wakatime-ls";
 5      version = "0.1.10";
 6      src = pkgs.fetchFromGitHub {
 7        owner = "wakatime";
 8        repo = "zed-wakatime";
 9        tag = "v${finalAttrs.version}";
10        hash = "sha256-Jmm+eRHMNBkc6ZzadvkWrfsb+bwEBNM0fnXU4dJ0NgE=";
11      };
12      buildAndTestSubdir = "wakatime-ls";
13      cargoHash = "sha256-x2axmHinxYZ2VEddeCTqMJd8ok0KgAVdUhbWaOdRA30=";
14      meta = {
15        homepage = "https://github.com/wakatime/zed-wakatime/tree/master/wakatime-ls";
16        license = pkgs.lib.licenses.mit;
17      };
18    });
19  in {
20    programs.zed-editor = {
21      enable = true;
22      # Add some packages to PATH for Zed to avoid GitHub API rate limit issues.
23      # See https://github.com/zed-industries/zed/issues/9483
24      # See also https://github.com/wakatime/zed-wakatime/issues/25
25      extraPackages = with pkgs; [
26        # Language servers that only used by Zed
27        package-version-server
28        # Used by Zed wakatime plugin, different from another one.
29        wakatime-ls
30      ];
31      extensions = [
32        # Appearance
33        "material-icon-theme"
34
35        # Utilities
36        "wakatime"
37        "intl-lens"
38        "comment"
39
40        # No specific config languages
41        "dart"
42        "git-firefly" # Syntax highlighting for Git related files
43        "just"
44        "just-ls"
45        "latex"
46        "marksman"
47        "mdx"
48        "toml"
49      ];
50      userSettings = {
51        # Appearance
52        relative_line_numbers = "enabled";
53        icon_theme = "Material Icon Theme";
54        colorize_brackets = true;
55        window_decorations = "client"; # Use CSD because niri can't find zed when using SSD.
56        collaboration_panel.button = false;
57        git_panel.button = false; # I use JJUI instead.
58        which_key = {
59          enabled = true;
60          delay_ms = 0;
61        };
62        # Privacy
63        telemetry = {
64          diagnostics = false;
65          metrics = false;
66        };
67        # Functionality
68        terminal = {
69          working_directory = "current_project_directory";
70          shell.program = "fish";
71        };
72        tab_size = 2;
73      };
74    };
75  };
76}