{pkgs, ...}: {
  programs.helix = {
    enable = true;
    defaultEditor = true;

    extraPackages = [
      pkgs.nil
      pkgs.alejandra
    ];

    settings = {
      editor = {
        indent-guides.render = true;
        cursorline = true;
        color-modes = true;
        line-number = "relative";

        lsp = {
          display-inlay-hints = true;
          display-messages = true;
        };

        cursor-shape = {
          insert = "bar";
          normal = "block";
          select = "underline";
        };

        clipboard-provider = "wayland";

        statusline = {
          left = ["mode" "spinner" "file-name" "file-modification-indicator"];
          center = ["workspace-diagnostics"];
          right = ["diagnostics" "selections" "position" "file-encoding" "file-type"];
        };

        auto-pairs = true;
        file-picker.hidden = false;
        mouse = false;
      };
    };

    languages = {
      language-server = {
        nil.command = "nil";

        pyright = {
          command = "pyright-langserver";
          args = ["--stdio"];
        };

        rust-analyzer = {
          command = "rust-analyzer";
          config.rust-analyzer = {
            check.command = "clippy";
            cargo.allFeatures = true;
          };
        };

        omnisharp = {
          command = "OmniSharp";
          args = ["--languageserver"];
        };
      };

      language = [
        {
          name = "nix";
          auto-format = true;
          language-servers = ["nil"];
          formatter.command = "alejandra";
        }
        {
          name = "python";
          auto-format = true;
          language-servers = ["pyright"];
        }
        {
          name = "rust";
          auto-format = true;
          language-servers = ["rust-analyzer"];
        }
        {
          name = "c-sharp";
          auto-format = true;
          language-servers = ["omnisharp"];
        }
      ];
    };
  };
}
