{ pkgs, ... }: {
  programs.bash.shellAliases = { x = "hx"; };
  programs.zsh.shellAliases = { x = "hx"; };
  home.sessionVariables = {
    EDITOR = "hx";
    VISUAL = "hx";
  };
  home.packages = with pkgs; [
    nodePackages.vscode-langservers-extracted
    rnix-lsp
    yaml-language-server

    (pkgs.makeDesktopItem {
      name = "Helix";
      exec = "hx %F";
      icon = "helix";
      desktopName = "Helix";
      comment = "Helix text editor";
      terminal = true;
      categories = [ "Development" ];
      mimeTypes = [
        "text/english"
        "text/plain"
        "text/x-makefile"
        "text/x-c++hdr"
        "text/x-c++src"
        "text/x-chdr"
        "text/x-csrc"
        "text/x-java"
        "text/x-moc"
        "text/x-pascal"
        "text/x-tcl"
        "text/x-tex"
        "application/x-shellscript"
        "text/x-c"
        "text/x-c++"
      ];
    })
  ];
  programs.helix = {
    enable = true;
    package = pkgs.unstable.helix;
    languages = [ ];
    settings = {
      theme = "ayu_mirage";
      editor.lsp.display-messages = true;
      editor.scrolloff = 5;
      editor.true-color = true;
      keys.normal = {
        "C-A-l" = ":format";
        "C-A-r" = ":reload";
      };
    };
    themes =
      let
        transparent = "none";
        gray = "#665c54";
        dark-gray = "#3c3836";
        white = "#fbf1c7";
        black = "#282828";
        red = "#fb4934";
        green = "#b8bb26";
        yellow = "#fabd2f";
        orange = "#fe8019";
        blue = "#83a598";
        magenta = "#d3869b";
        cyan = "#8ec07c";
      in
      {
        base16 = {
          "ui.menu" = transparent;
          "ui.menu.selected" = { modifiers = [ "reversed" ]; };
          "ui.linenr" = {
            fg = gray;
            bg = dark-gray;
          };
          "ui.popup" = { modifiers = [ "reversed" ]; };
          "ui.linenr.selected" = {
            fg = white;
            bg = black;
            modifiers = [ "bold" ];
          };
          "ui.selection" = {
            fg = black;
            bg = blue;
          };
          "ui.selection.primary" = { modifiers = [ "reversed" ]; };
          "comment" = { fg = gray; };
          "ui.statusline" = {
            fg = white;
            bg = dark-gray;
          };
          "ui.statusline.inactive" = {
            fg = dark-gray;
            bg = white;
          };
          "ui.help" = {
            fg = dark-gray;
            bg = white;
          };
          "ui.cursor" = { modifiers = [ "reversed" ]; };
          "variable" = red;
          "variable.builtin" = orange;
          "constant.numeric" = orange;
          "constant" = orange;
          "attributes" = yellow;
          "type" = yellow;
          "ui.cursor.match" = {
            fg = yellow;
            modifiers = [ "underlined" ];
          };
          "string" = green;
          "variable.other.member" = red;
          "constant.character.escape" = cyan;
          "function" = blue;
          "constructor" = blue;
          "special" = blue;
          "keyword" = magenta;
          "label" = magenta;
          "namespace" = blue;
          "diff.plus" = green;
          "diff.delta" = yellow;
          "diff.minus" = red;
          "diagnostic" = { modifiers = [ "underlined" ]; };
          "ui.gutter" = { bg = black; };
          "info" = blue;
          "hint" = dark-gray;
          "debug" = dark-gray;
          "warning" = yellow;
          "error" = red;
        };
      };
  };
}
