microsoft / microsoft/TypeScript
typescript-language-server does not work with @typescript/typescript6
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
### 🔎 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](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0).
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:
```js
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia nella directory lib del pacchetto di compatibilità @typescript/typescript6 e confronta il wrapper tsc.js esistente con l'entry point tsserver.js mancante. Aggiungi l'entry point di compatibilità tsserver.js corrispondente e verifica che typescript-language-server si avvii con il pacchetto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 88/100