main
 1{
 2  den.aspects.develop.editor.helix = {
 3    cacheHome = {config, ...}: {
 4      directories = [
 5        "${config.xdg.dataHome}/helix" # Workspace trust data
 6        "${config.xdg.dataHome}/steel" # Steel plugin system data
 7      ];
 8    };
 9
10    homeManager = {pkgs, ...}: {
11      home.packages = [pkgs.steel-language-server];
12
13      programs.helix = {
14        enable = true;
15        package = pkgs.steelix;
16        settings = {
17          editor = {
18            line-number = "relative";
19            cursorline = true;
20            bufferline = "multiple";
21            statusline = {
22              left = ["mode" "spinner" "diagnostics" "workspace-diagnostics"];
23              center = ["file-name" "read-only-indicator" "file-modification-indicator"];
24              right = ["file-type" "file-encoding" "separator" "position" "total-line-numbers"];
25              mode.normal = "NORMAL";
26              mode.insert = "INSERT";
27              mode.select = "SELECT";
28            };
29            cursor-shape = {
30              normal = "block";
31              insert = "bar";
32              select = "block";
33            };
34            color-modes = true;
35            trim-trailing-whitespace = true;
36            inline-diagnostics.cursor-line = "warning";
37            end-of-line-diagnostics = "error";
38            lsp = {
39              display-inlay-hints = true;
40              inlay-hints-length-limit = 16;
41            };
42            indent-guides = {
43              render = true;
44              character = "";
45              skip-levels = 1;
46            };
47            file-picker = {
48              hidden = false;
49            };
50          };
51          keys = {
52            normal = {
53              "H" = "goto_previous_buffer";
54              "L" = "goto_next_buffer";
55            };
56          };
57        };
58      };
59
60      xdg.dataFile."steel" = {
61        source = pkgs.symlinkJoin {
62          name = "steel-plugins";
63          paths = with pkgs.nur.repos.hpcesia.helixPlugins; [
64            fcitx-focus
65            forest
66            glyph
67            notify
68            wakatime
69          ];
70        };
71        recursive = true;
72      };
73
74      xdg.configFile."helix/init.scm".source = ./init.scm;
75      xdg.configFile."helix/helix.scm".source = ./helix.scm;
76    };
77  };
78}