|
|
@@ -1892,4 +1892,22 @@ export namespace LSPServer {
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
+
|
|
|
+ export const HLS: Info = {
|
|
|
+ id: "haskell-language-server",
|
|
|
+ extensions: [".hs", ".lhs"],
|
|
|
+ root: NearestRoot(["stack.yaml", "cabal.project", "hie.yaml", "*.cabal"]),
|
|
|
+ async spawn(root) {
|
|
|
+ const bin = Bun.which("haskell-language-server-wrapper")
|
|
|
+ if (!bin) {
|
|
|
+ log.info("haskell-language-server-wrapper not found, please install haskell-language-server")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ process: spawn(bin, ["--lsp"], {
|
|
|
+ cwd: root,
|
|
|
+ }),
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|