microsoft / microsoft/TypeScript
Expose semantic token command type
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit lib/protocol.d.ts und dem bestehenden getSemanticTokens()-Einstiegspunkt, der im Issue erwähnt wird. Vergleiche das angeforderte textDocument/semanticTokens-Äquivalent mit der Beispielanfrage an tsserver und überprüfe anschließend, dass der Befehlstyp und die Anforderungsstruktur für Editor-Clients verfügbar gemacht werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- api, developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100