microsoft / microsoft/TypeScript
Expose semantic token command type
オープン
まだ誰も着手していません。
In Discussion
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
Suggestion
🔍 Search Terms
language server protocol, semantic tokens, full, range, syntax highlight,
✅ Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
⭐ Suggestion
Hi. I'd like to get the LSP equivalent of textDocument/semanticTokens, which the Typescript codebase seems to call getSemanticTokens(), but it doesn't look like that's an available command type.
📃 Motivating Example
{"seq":1,"type":"request","command":"getSemanticTokens","arguments":{"file":"/home/user/example.ts"}}
💻 Use Cases
I'd like to have tsserver send me tokens so that I can do syntax highlighting without my editor having to understand JS/TS/etc.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず lib/protocol.d.ts と、issue で言及されている既存の getSemanticTokens() エントリポイントを確認します。要求されている textDocument/semanticTokens 相当のものを tsserver のリクエスト例と比較し、その後、コマンド型とリクエストの形式がエディタークライアント向けに公開されていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- api, developer-experience
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100