makeSemanticTokens should use the same legend as inferServerCapabilities

Aperta
#365 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
haskell
Ambito
tooling

Direzione di ricerca

Inizia leggendo makeSemanticTokens e inferServerCapabilities, i due punti di ingresso indicati nell’issue, e confronta il modo in cui ciascuno rappresenta la legenda dei token semantici. Il lavoro è completato quando makeSemanticTokens usa la stessa legenda costruita da inferServerCapabilities; la gestione dei tipi di token client non supportati è menzionata solo come possibile attività successiva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: enhancement type: spec compliance

Somewhat confusingly, LSP (the protocol) has two places where the token types appear for semantic tokens, in the client caps and server caps. The indices in the encoding of the tokens are relative to the legend provided by the server, not the client. For this library, this is constructed in inferServerCapabilities.

For the moment it makes more sense (to me) that makeSemanticTokens hard codes the legend as the same as constructed in inferServerCapabilities, if only to avoid confusion, and maybe discards tokens which are not supported by the client..

This is not that high priority, it just bit me (I was passing in the client caps, and it seemed to work for a while) and I thought it might be reasonable to make the API robust against user error.

Lingua principale
Haskell
Stelle
426
Fork
107
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/lsp

Tutte le issue di haskell/lsp

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.