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

オープン 初心者向け
#64,094 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
tooling

調査の方向性

@typescript/typescript6 互換パッケージの lib ディレクトリから始め、既存の tsc.js ラッパーと不足している tsserver.js エントリーポイントを比較します。対応する tsserver.js 互換エントリーポイントを追加し、typescript-language-server がそのパッケージで起動することを確認します。

索引モデルが issue の本文から書いたものです。

説明

🔎 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.

主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。