add ocamlformat support (#5229)

This commit is contained in:
Shoubhit Dash
2025-12-08 23:07:30 +05:30
committed by GitHub
parent 4201fe6e01
commit 285605737d
2 changed files with 28 additions and 16 deletions

View File

@@ -255,3 +255,14 @@ export const dart: Info = {
return Bun.which("dart") !== null
},
}
export const ocamlformat: Info = {
name: "ocamlformat",
command: ["ocamlformat", "-i", "$FILE"],
extensions: [".ml", ".mli"],
async enabled() {
if (!Bun.which("ocamlformat")) return false
const items = await Filesystem.findUp(".ocamlformat", Instance.directory, Instance.worktree)
return items.length > 0
},
}