TypeScript 7 VS Code extension: let extensions that serve their language through content mappers opt out of the tsserver-plugin warning
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript, vscode
调研方向
Start in packages/vscode-typescript/src/extension.ts at warnAboutTsServerPlugins, then trace how typescriptServerPlugins contributions are read and represented. Add a contribution-level way for content-mapped extensions to opt out of this warning, and verify that such extensions are skipped while ordinary TypeScript server plugins still produce the warning.
由索引模型根据 Issue 内容生成。
描述
🔎 Search Terms
TypeScript server plugins from thewill not be loaded because TypeScript 7 is enabled globallywarnAboutTsServerPluginstypescriptServerPluginscontent mapper
🕗 Version & Regression Information
- The TypeScript 7 VS Code extension built from
packages/vscode-typescriptat f29aeb9 (main, 2026-09-16), VS Code 1.138.0, macOS 26.6 x64 - The warning and its exemption list are unchanged since the published
TypeScriptTeam.native-preview0.20260708.2
⏯ Playground Link
n/a (VS Code extension behaviour)
💻 Code
warnAboutTsServerPlugins in packages/vscode-typescript/src/extension.ts warns once per session, when js/ts.experimental.useTsgo is set at user level, for every installed extension whose manifest contributes typescriptServerPlugins:
TypeScript server plugins from the "TSRX.tsrx-vscode-plugin" extension will not be loaded because TypeScript 7 is enabled globally.
The only exemption is the hardcoded suppressedPluginExtensionIds set (github.copilot, github.copilot-chat).
An extension for a content-mapped language needs both mechanisms: a typescriptServerPlugins contribution so that VS Code's built-in TypeScript extension (TypeScript 5.9/6, tsserver) can serve its files, and a content mapper (declared in the project's tsconfig.json under contentMappers) so that TypeScript 7 can. When TypeScript 7 is enabled, the plugin is intentionally not needed: the mapper takes over. The warning is then accurate but misleading, since the extension's language works fine.
🙁 Actual behavior
Every user of such an extension who enables TypeScript 7 globally sees a warning suggesting the extension is broken under TypeScript 7, with "Disable Native Preview in Workspace" offered as a remedy, although nothing is lost.
🙂 Expected behavior
A way for an extension to declare that its language is served through content mappers on TypeScript 7, for example a per-plugin flag on the contribution ("typescriptServerPlugins": [{ "name": "...", "contentMappers": true }] or similar), which the warning would then skip, as it skips the hardcoded ids today.
Additional information about the issue
Found while wiring the TSRX VS Code extension (tsrx-org/tsrx#135); its README currently tells users to dismiss the warning with "Don't Show Again".
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.4k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 106
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/TypeScript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
microsoft/TypeScript#64322 · 2 条评论 · 1 个 reaction · 已指派 2 人 ·
-
Possible Improvement
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/TypeScript#64278 · 1 条评论 · 1 个 reaction ·
-
Docs
难度 2/5 1-3 小时 新手友好度 70/100
microsoft/TypeScript#64118 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
microsoft/TypeScript#64094 ·
-
Docs
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/TypeScript#63959 · 5 条评论 ·
查看 microsoft/TypeScript 的全部 Issue
相似的 Issue
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 78/100
OpenNSW/nsw-srilanka#497 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
难度 2/5 1-3 小时 新手友好度 88/100
kubernetes-sigs/prow#953 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
JuliusBrussee/caveman#1102 · 1 条评论 ·