fix(typescript-language-service): tnb(tsgo) compatibility - #14
Draft
guyutongxue wants to merge 6 commits into
Draft
guyutongxue wants to merge 6 commits into
guyutongxue wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve compatibility between the GamingTS TypeScript language service plugin and TypeScript Native Bridge / tsgo by (1) patching how VS Code’s built-in TypeScript extension recognizes/handles gaming-ts + .gts, and (2) adjusting the plugin’s external-files behavior to avoid expensive project-wide overlay materialization in tsgo scenarios.
Changes:
- Add a
tsserver.jsproxy generator that patches the workspacetypescript.jsat runtime to treat.gtsas supported and to adjust tsgo project association behavior. - Patch VS Code’s TypeScript extension JS at load time and intercept
child_process.spawn/forkto routetsserver.jslaunches through the proxy. - Update the TS language service plugin to compute imported
.gtsfiles (transitively) for external-files, with a special mode intended for Native Bridge / tsgo, plus add tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode/src/tsserver_proxy.ts | New tsserver proxy + TypeScript source patcher for .gts / tsgo behavior. |
| packages/vscode/src/patch.ts | Extends the TS extension patching and rewrites tsserver launch paths to use the proxy. |
| packages/vscode/src/formatter.ts | Prefixes Prettier config log output with [GamingTS]. |
| packages/vscode/package.json | Changes activation events and TypeScript server plugin contribution configuration. |
| packages/vscode/tests/tsserver_proxy.test.ts | Tests for TypeScript source patching and proxy generation. |
| packages/typescript-language-service-plugin/tsconfig.json | Switches module kind and makes config typecheck-only (noEmit). |
| packages/typescript-language-service-plugin/src/index.ts | Wraps plugin factory to customize external-files behavior (incl. tsgo mode). |
| packages/typescript-language-service-plugin/src/external_files.ts | New logic to discover imported/transitively imported .gts files. |
| packages/typescript-language-service-plugin/tests/external_files.test.ts | Tests for imported .gts discovery logic, including “open files only” mode. |
| examples/local/consumer.ts | Cleans up example import and removes global console override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
23
to
25
| "activationEvents": [ | ||
| "onLanguage:gaming-ts" | ||
| "onLanguage" | ||
| ], |
guyutongxue
force-pushed
the
fix-tsgo-integration
branch
from
July 27, 2026 16:36
6b108dd to
96e060b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.