GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: haskell lsp support (#6141) · ideabrian/opencode@d9f0f58

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/lsp
    • language.ts
    • server.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/lsp/language.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/lsp/language.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
3939
".hbs": "handlebars",
4040
".handlebars": "handlebars",
4141
".hs": "haskell",
42+
".lhs": "haskell",
4243
".html": "html",
4344
".htm": "html",
4445
".ini": "ini",
Collapse file

‎packages/opencode/src/lsp/server.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/lsp/server.ts
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,4 +1892,22 @@ export namespace LSPServer {
18921892
}
18931893
},
18941894
}
1895+
1896+
export const HLS: Info = {
1897+
id: "haskell-language-server",
1898+
extensions: [".hs", ".lhs"],
1899+
root: NearestRoot(["stack.yaml", "cabal.project", "hie.yaml", "*.cabal"]),
1900+
async spawn(root) {
1901+
const bin = Bun.which("haskell-language-server-wrapper")
1902+
if (!bin) {
1903+
log.info("haskell-language-server-wrapper not found, please install haskell-language-server")
1904+
return
1905+
}
1906+
return {
1907+
process: spawn(bin, ["--lsp"], {
1908+
cwd: root,
1909+
}),
1910+
}
1911+
},
1912+
}
18951913
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.