PowerShell / PowerShell/vscode-powershell
Add support for all token types with the new semantic highlighting
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 1.9k
- Fork
- 548
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Summary of the new feature
Powershell has 20 tokentypes and it would be nice if the semantic highlighting supported all of them. See: https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.pstokentype
The current semantic highlighting implementation is currently missing the following types:
- Attribute
- CommandArgument
- GroupEnd/GroupStart
- LineContinuation (backtick)
- LoopLabel
- StatementSeparator (Semicolon)
If/When these gets added I would suggest changing the following mappings:
- Value in
Using namespace <Value>should use CommandArgument scope. Currently it uses Function. - Attributes like
[cmdletbinding()]should use Attribute scope. Currently it uses Type. - Names in functions and configurations should use CommandArgument scope. Currently they use the Function scope except functions with no dashes which has no semantic token type.
- Unquoted parameter values like "C:\SomePath" in
Get-ChildItem C:\SomePathshould use CommandArgument scope. Currently they use the function scope.
The following screenshot hopefully shows what I mean:
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 con l’implementazione corrente dell’evidenziazione semantica e confronta le relative mappature dei token con i valori documentati di PowerShell PSTokenType. Controlla i tipi di token mancanti e le rimappature proposte elencati, quindi verifica che siano tutti rappresentati e che gli esempi utilizzino gli scopes richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, typescript
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100