Skip to content

Commit

Permalink
Add formatters for Elm, Haskell, Python, and TypeScript
Browse files Browse the repository at this point in the history
This commit adds `elm-format` for Elm, `ormolu` for Haskell, `black`
for Python, and `biome` for TypeScript, Javascript, TSX, JSX, etc.
  • Loading branch information
heyakyra committed Nov 20, 2024
1 parent 6cca982 commit c6e81c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ shebangs = ["node"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }

[language.debugger]
Expand Down Expand Up @@ -759,6 +760,7 @@ file-types = ["jsx"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }
grammar = "javascript"

Expand All @@ -772,6 +774,7 @@ shebangs = ["deno", "bun", "ts-node"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }

[[grammar]]
Expand Down Expand Up @@ -804,6 +807,7 @@ file-types = ["tsx"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }

[[grammar]]
Expand Down Expand Up @@ -861,6 +865,7 @@ shebangs = ["python"]
roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
comment-token = "#"
language-servers = ["ruff", "jedi", "pylsp"]
formatter = { command = "black", args = ["-"]}
# TODO: pyls needs utf-8 offsets
indent = { tab-width = 4, unit = " " }

Expand Down Expand Up @@ -1324,6 +1329,7 @@ roots = ["Setup.hs", "stack.yaml", "cabal.project"]
comment-token = "--"
block-comment-tokens = { start = "{-", end = "-}" }
language-servers = [ "haskell-language-server" ]
formatter = { command = "ormolu" }
indent = { tab-width = 2, unit = " " }

[[grammar]]
Expand Down Expand Up @@ -1777,6 +1783,7 @@ auto-format = true
comment-token = "--"
block-comment-tokens = { start = "{-", end = "-}" }
language-servers = [ "elm-language-server" ]
formatter = { command = "elm-format", args = ["--stdin"] }
indent = { tab-width = 4, unit = " " }

[[grammar]]
Expand Down Expand Up @@ -3763,6 +3770,7 @@ language-servers = [
"vscode-eslint-language-server",
"ember-language-server",
]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }
grammar = "javascript"

Expand All @@ -3787,6 +3795,7 @@ language-servers = [
"vscode-eslint-language-server",
"ember-language-server",
]
formatter = { command = "biome", args = ["format"] }
indent = { tab-width = 2, unit = " " }
grammar = "typescript"

Expand Down

0 comments on commit c6e81c3

Please sign in to comment.