feat: haskell lsp support (#6141)

pull/6175/head
Marco 2025-12-26 04:04:43 +01:00 committed by GitHub
parent effa7b45cf
commit d9f0f58277
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View File

@ -39,6 +39,7 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
".hbs": "handlebars",
".handlebars": "handlebars",
".hs": "haskell",
".lhs": "haskell",
".html": "html",
".htm": "html",
".ini": "ini",

View File

@ -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,
}),
}
},
}
}