|
|
@@ -1185,6 +1185,23 @@ export namespace LSPServer {
|
|
|
},
|
|
|
}
|
|
|
|
|
|
+ export const Ocaml: Info = {
|
|
|
+ id: "ocaml-lsp",
|
|
|
+ extensions: [".ml", ".mli"],
|
|
|
+ root: NearestRoot(["dune-project", "dune-workspace", ".merlin", "opam"]),
|
|
|
+ async spawn(root) {
|
|
|
+ const bin = Bun.which("ocamllsp")
|
|
|
+ if (!bin) {
|
|
|
+ log.info("ocamllsp not found, please install ocaml-lsp-server")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ process: spawn(bin, {
|
|
|
+ cwd: root,
|
|
|
+ }),
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
export const BashLS: Info = {
|
|
|
id: "bash",
|
|
|
extensions: [".sh", ".bash", ".zsh", ".ksh"],
|