typescript-language-server does not work with @typescript/typescript6

Offen Anfängerfreundlich
#64,094 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
88/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
tooling

Rechercherichtung

Beginne im lib-Verzeichnis des @typescript/typescript6-Kompatibilitätspakets und vergleiche den vorhandenen tsc.js-Wrapper mit dem fehlenden tsserver.js-Einstiegspunkt. Füge den entsprechenden tsserver.js-Kompatibilitätseinstiegspunkt hinzu und überprüfe, dass typescript-language-server mit dem Paket startet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

🔎 Search Terms

lsp language server tsserver.js

🕗 Version & Regression Information
  • This is an issue with the new @typescript/typescript6 package
⏯ Playground Link

No response

💻 Code

No response

🙁 Actual behavior

I have installed both TypeScript 6 and 7 side to side following the blog post.
Unfortunately, typescript-language-server (which is a LSP wrapper around tsserver from TypeScript 6) does not work in this setup. It is looking for a tsserver.js file in node_modules/typescript/lib, which does not exist in @typescript/typescript6.

🙂 Expected behavior

The @typescript/typescript6 package is for compatibility with software based on TypeScript 6, so it should include a tsserver.js executable. I believe the only thing needed is to add a tsserver.js file in the lib directory containing:

require("@typescript/old/lib/tsserver.js");

(same pattern as the existing tsc.js file)
I tested it and typescript-language-server does start when adding this file.

Additional information about the issue

I know that TypeScript 7 includes a new native LSP server, but it does not have all the features that tsserver had. In particular the lack of code actions like "Move to file" make it so that I want to be able to switch between the old and the new server until the new server reaches feature parity.

Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/TypeScript

Alle Issues in microsoft/TypeScript

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.