microsoft / microsoft/TypeScript

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

Đang mở Phù hợp với người mới
#64,094 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong thư mục lib của gói tương thích @typescript/typescript6 và so sánh wrapper tsc.js hiện có với entry point tsserver.js còn thiếu. Thêm entry point tương thích tsserver.js tương ứng và xác minh rằng typescript-language-server khởi động với gói này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
88/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.