Home Manager - how to ensure order of TOML file

Hello,

I am using home manager to manage my Helix editor config and it requires the “language-server” entries to come before the “language” section of the toml file. Mine is not turning out this way. The first code entry is a piece of my Home manager config and the next is the actual toml file that was produced.

    languages = {
      language-server.tailwind-heex = {
        command = "tailwindcss-language-server";
        args = ["--stdio"];
      };

      language = [
      {
        name = "elixir";
        language-id = "phoenix-heex";
        language-servers = [ "tailwind-heex" "elixir-ls" ];
        auto-format = true;
      }
      
      {
        name = "heex";
        language-id = "phoenix-heex";
        language-servers = [ "tailwind-heex" "elixir-ls" ];
        auto-format = true;
      }     
      ];
    };

This is what it produces:

[[language]]
auto-format = true
language-id = "phoenix-heex"
language-servers = ["tailwind-heex", "elixir-ls"]
name = "elixir"

[[language]]
auto-format = true
language-id = "phoenix-heex"
language-servers = ["tailwind-heex", "elixir-ls"]
name = "heex"

[language-server.tailwind-heex]
args = ["--stdio"]
command = "tailwindcss-language-server"

How can I get my config to place the “language-server.tailwind-heex” at the top of the file?

Thanks!

The answer is you file a bug with helix because table entries aren’t ordered.