Microsoft/TypeScript

No semantic token assigned to import names, but available for export

Open

#57,082 建立於 2024年1月18日

在 GitHub 查看
 (2 留言) (5 反應) (0 負責人)TypeScript (6,726 fork)batch import
Experience EnhancementHelp WantedSuggestion

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

🔍 Search Terms

  • import (in the FAQ)
  • is:issue is:open No semantic token import
  • is:issue is:open No highlight import

✅ Viability Checklist

⭐ Suggestion

This is an issue originally from: https://github.com/typescript-language-server/typescript-language-server/issues/842 and https://github.com/microsoft/vscode/issues/202224. The issue is confirmed not to be an issue from TypeScript Language Server by its' developer/maintainer, and it is suggested to be posted here by VSCode'sdeveloper/maintainer.

This feature request is asking for the implementation of the semantic highlighting for member imported in the import statement.

📃 Motivating Example

When export a name, there is semantic token assigned. Such as the Compiler is assigned with class.

image

For import, there seems to be no semantic token available.

image

And it is also predictable that import using this way, will also get no correct semantic token assigned.

image

💻 Use Cases

  1. What do you want to use this for?

Bring better coding experience.

  1. What shortcomings exist with current approaches?

Currently no precise token is assigned to the imported members, no semantic token is assigned.

  1. What workarounds are you using in the meantime?

As a theme designer, I do not have any other ideas on that, and I believe this could be solved by language's implementation of this feature.

貢獻者指南