Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/opencode/src/lsp/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions packages/opencode/src/lsp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
}
},
}
}