feat(lsp): add tsgo language server support#1083
feat(lsp): add tsgo language server support#1083potb wants to merge 8 commits intocode-yeongyu:devfrom
Conversation
|
All contributors have signed the CLA. Thank you! ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@sisyphus-dev-ai is this supported also on opencode by native? ulw |
|
No, tsgo is NOT natively supported by opencode. I read opencode's actual LSP source code ( Built-in TypeScript LSP in opencodeThe export const Typescript: Info = {
id: "typescript",
// ...
async spawn(root) {
const tsserver = await Bun.resolve("typescript/lib/tsserver.js", Instance.directory).catch(() => {})
// ...
const proc = spawn(BunProc.which(), ["x", "typescript-language-server", "--stdio"], { cwd: root, ... })
return { process: proc, initialization: { tsserver: { path: tsserver } } }
},
}No mention of Community interest exists but no actionIssue #67 ("[docs] how to use typescript-go lsp") was opened by a community member with a manual config workaround, but:
ConclusionThis PR adds value that opencode doesn't provide natively. Users can currently only configure tsgo manually via opencode's |
|
@code-yeongyu actually, I think the install hint is misleading. |
# Conflicts: # src/tools/lsp/config.ts # src/tools/lsp/constants.ts
Summary by cubic
Add tsgo as a built-in TypeScript LSP and prefer it when installed, with automatic fallback to typescript-language-server.
New Features
Dependencies
Written for commit f81b6a6. Summary will update on new commits.