{
  lib,
  pkgs,
  flake,
  ...
}:
{
  language = [
    {
      auto-format = true;
      formatter.command = "shfmt";
      name = "bash";
    }
    {
      auto-format = true;
      formatter.command = lib.getExe pkgs.haskellPackages.cabal-fmt;
      language-servers = [
        "cabal-gild"
      ];
      name = "cabal";
    }
    {
      auto-format = true;
      language-servers = [
        "elm-language-server"
      ];
      name = "elm";
    }
    {
      auto-format = true;
      name = "haskell";
    }
    {
      formatter = {
        args = [
          "--dump"
          "--unstable"
        ];
        command = lib.getExe pkgs.just;
      };
      language-servers = [ pkgs.just-lsp.pname ];
      name = "just";
    }
    {
      name = "markdown";
      language-servers = [ "vale" ];
    }
    {
      auto-format = true;
      formatter.command = "nixfmt";
      language-servers = [ "nil" ];
      name = "nix";
    }
    # {
    #   auto-format = true;
    #   formatter = {
    #     args = [ "-s" ];
    #     command = "nufmt";
    #   };
    #   name = "nu";
    #   roots = [ "flake.nix" ];
    # }
    {
      auto-format = true;
      name = "rust";
    }
    {
      name = "ron";
      scope = "source.ron";
      file-types = [ "ron" ];
      comment-token = "//";
      language-servers = [ "rust-analyzer" ];
      auto-format = true;
      formatter = {
        command = "rustfmt";
        args = [
          "--edition"
          "2021"
        ];
      };
      indent = {
        tab-width = 4;
        unit = "    ";
      };
    }
    {
      file-types = [ "txt" ];
      language-servers = [ "vale" ];
      name = "text";
      scope = "text.plain";
    }
    {
      auto-format = true;
      formatter = {
        args = [
          "format"
          "-"
        ];
        command = "taplo";
      };
      name = "toml";
      roots = [ "flake.nix" ];
    }
    {
      auto-format = true;
      name = "typescript";
    }
    {
      auto-format = true;
      formatter.command = "typstyle";
      language-servers = [ "tinymist" ];
      name = "typst";
      roots = [ "flake.nix" ];
    }
    {
      auto-format = true;
      formatter = {
        args = [ "-in" ];
        command = "yamlfmt";
      };
      name = "yaml";
    }

  ];
  language-server = {
    elm-language-server = {
      config.elmLS = {
        disableElmLSDiagnostics = true;
        elmReviewDiagnostics = "warning";
      };
    };
    just-lsp = {
      command = lib.getExe pkgs.just-lsp;
    };
    tinymist = {
      command = lib.getExe pkgs.tinymist;
      config.exportPdf = "onType";
    };
    vale = {
      command = lib.getExe pkgs.vale-ls;
    };
  };

}
