add ocaml lsp support (#5230)
This commit is contained in:
parent
d22754dd68
commit
20530104ce
3 changed files with 20 additions and 0 deletions
|
|
@ -103,6 +103,8 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
|
|||
".zig": "zig",
|
||||
".zon": "zig",
|
||||
".astro": "astro",
|
||||
".ml": "ocaml",
|
||||
".mli": "ocaml",
|
||||
".tf": "terraform",
|
||||
".tfvars": "terraform-vars",
|
||||
".hcl": "hcl",
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue