TypeScript 7 VS Code extension: let extensions that serve their language through content mappers opt out of the tsserver-plugin warning

Aperta
#64,356 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript, vscode

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🔎 Search Terms
  • TypeScript server plugins from the will not be loaded because TypeScript 7 is enabled globally
  • warnAboutTsServerPlugins typescriptServerPlugins content mapper
🕗 Version & Regression Information
  • The TypeScript 7 VS Code extension built from packages/vscode-typescript at 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-preview 0.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".

Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 15h
PR unite (30g)
106

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/TypeScript

Tutte le issue di microsoft/TypeScript

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.