feat(opencode): ormolu code formatter for haskell (#10274)

This commit is contained in:
Ondřej Súkup
2026-02-02 13:01:49 +01:00
committed by GitHub
parent 26197ec95b
commit 52006c2fd9
3 changed files with 11 additions and 0 deletions

View File

@@ -355,3 +355,12 @@ export const pint: Info = {
return false
},
}
export const ormolu: Info = {
name: "ormolu",
command: ["ormolu", "-i", "$FILE"],
extensions: [".hs"],
async enabled() {
return Bun.which("ormolu") !== null
},
}

View File

@@ -36,6 +36,7 @@ OpenCode comes with several built-in formatters for popular languages and framew
| shfmt | .sh, .bash | `shfmt` command available |
| pint | .php | `laravel/pint` dependency in `composer.json` |
| oxfmt (Experimental) | .js, .jsx, .ts, .tsx | `oxfmt` dependency in `package.json` and an [experimental env variable flag](/docs/cli/#experimental) |
| ormolu | .hs | `ormolu` command available |
So if your project has `prettier` in your `package.json`, OpenCode will automatically use it.

View File

@@ -25,6 +25,7 @@ OpenCode comes with several built-in LSP servers for popular languages:
| fsharp | .fs, .fsi, .fsx, .fsscript | `.NET SDK` installed |
| gleam | .gleam | `gleam` command available |
| gopls | .go | `go` command available |
| hls | .hs, .lhs | `haskell-language-server-wrapper` command available
| jdtls | .java | `Java SDK (version 21+)` installed |
| kotlin-ls | .kt, .kts | Auto-installs for Kotlin projects |
| lua-ls | .lua | Auto-installs for Lua projects |