microsoft / microsoft/TypeScript
Expose semantic token command type
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da lib/protocol.d.ts e dall’entry point esistente getSemanticTokens() menzionato nell’issue. Confronta l’equivalente richiesto di textDocument/semanticTokens con la richiesta di esempio di tsserver, quindi verifica che il tipo di comando e la struttura della richiesta siano esposti ai client degli editor.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- api, developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100