Skip to content

Conversation

@potb
Copy link

@potb potb commented Jan 25, 2026

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

    • Added optional priority to LSPServerConfig; TypeScript uses -50, tsgo uses -100; still prefer tsgo when installed.
    • Registered tsgo in BUILTIN_SERVERS and doctor checks; added tsgo install hint; default install hint remains typescript-language-server.
    • Auto-selects tsgo when present, falls back to typescript-language-server; tests cover selection, fallback, and doctor listing.
  • Dependencies

    • Bumped optional oh-my-opencode platform packages from 3.0.0-beta.16 to 3.0.0.

Written for commit 8175e88. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 25, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@potb
Copy link
Author

potb commented Jan 25, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 25, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@code-yeongyu
Copy link
Owner

@sisyphus-dev-ai is this supported also on opencode by native? ulw

@sisyphus-dev-ai sisyphus-dev-ai added the sisyphus: working Sisyphus is currently working on this label Jan 25, 2026
@sisyphus-dev-ai
Copy link
Collaborator

No, tsgo is NOT natively supported by opencode.

I read opencode's actual LSP source code (packages/opencode/src/lsp/server.ts) and confirmed:

Built-in TypeScript LSP in opencode

The Typescript server definition only uses typescript-language-server + tsserver.js:

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 tsgo anywhere in the codebase (verified via GitHub code search: 0 results).

Community interest exists but no action

Issue #67 ("[docs] how to use typescript-go lsp") was opened by a community member with a manual config workaround, but:

Conclusion

This PR adds value that opencode doesn't provide natively. Users can currently only configure tsgo manually via opencode's lsp config override, and even that has reported issues.

@sisyphus-dev-ai sisyphus-dev-ai removed the sisyphus: working Sisyphus is currently working on this label Jan 25, 2026
@potb
Copy link
Author

potb commented Jan 25, 2026

@code-yeongyu actually, I think the install hint is misleading.
It should prompt users to install the regular typescript compiler, not the go one, since it's in preview and most users have no idea of the implications, compat is not 1:1.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants