old
  1{
  2  den.aspects.develop.editor.helix = {
  3    cacheHome = {config, ...}: {
  4      directories = [
  5        "${config.xdg.configHome}/helix"
  6        "${config.xdg.dataHome}/helix" # Workspace trust data
  7        "${config.xdg.dataHome}/steel" # Steel plugin system data
  8      ];
  9    };
 10
 11    hjem = {
 12      config,
 13      pkgs,
 14      ...
 15    }: let
 16      steel-wrapped = pkgs.symlinkJoin {
 17        pname = "steel-wrapped";
 18        inherit (pkgs.steel) version;
 19        paths = [pkgs.steel];
 20        nativeBuildInputs = [pkgs.makeBinaryWrapper];
 21        postBuild = ''
 22          wrapProgram $out/bin/forge \
 23            --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [gcc cargo])}
 24        '';
 25        meta = {
 26          inherit
 27            (pkgs.steel.meta)
 28            description
 29            homepage
 30            changelog
 31            license
 32            mainProgram
 33            ;
 34        };
 35      };
 36    in {
 37      packages = [
 38        pkgs.nur.repos.hpcesia.steelix
 39
 40        steel-wrapped
 41        pkgs.schemat
 42      ];
 43
 44      environment.sessionVariables = {
 45        EDITOR = "hx";
 46        VISUAL = "hx";
 47        STEEL_HOME = "${config.xdg.data.directory}/steel";
 48      };
 49
 50      xdg.config.files."helix/config.toml" = {
 51        generator = (pkgs.formats.toml {}).generate "helix-config.toml";
 52        value = {
 53          editor = {
 54            line-number = "relative";
 55            cursorline = true;
 56            bufferline = "multiple";
 57            statusline = {
 58              left = ["mode" "spinner" "diagnostics" "workspace-diagnostics"];
 59              center = ["file-name" "read-only-indicator" "file-modification-indicator"];
 60              right = ["file-type" "file-encoding" "separator" "position" "total-line-numbers"];
 61            };
 62            cursor-shape = {
 63              normal = "block";
 64              insert = "bar";
 65              select = "block";
 66            };
 67            color-modes = true;
 68            trim-trailing-whitespace = true;
 69            inline-diagnostics.cursor-line = "warning";
 70            end-of-line-diagnostics = "error";
 71            lsp = {
 72              display-inlay-hints = true;
 73              inlay-hints-length-limit = 16;
 74            };
 75            indent-guides = {
 76              render = true;
 77              character = "";
 78              skip-levels = 1;
 79            };
 80            file-picker = {
 81              hidden = false;
 82            };
 83          };
 84          keys = {
 85            normal = {
 86              "H" = "goto_previous_buffer";
 87              "L" = "goto_next_buffer";
 88            };
 89          };
 90        };
 91      };
 92
 93      xdg.config.files."helix/languages.toml" = {
 94        generator = (pkgs.formats.toml {}).generate "helix-languages.toml";
 95        value = {};
 96      };
 97
 98      xdg.config.files."helix/helix.scm" = {
 99        source = ./helix.scm;
100        type = "copy";
101      };
102      xdg.config.files."helix/init.scm" = {
103        source = ./init.scm;
104        type = "copy";
105      };
106
107      xdg.data.files."steel/cogs/smith.hx" = {
108        source = "${pkgs.nur.repos.hpcesia.helixPlugins.smith}/cogs/smith.hx";
109      };
110    };
111  };
112
113  den.aspects.develop.editor.helix.themes = {
114    catppuccin = {
115      hjem.xdg.config.files."helix/config.toml".value.theme = "catppuccin_mocha";
116    };
117  };
118}