Repository navigation
Description
Test item for semantic tokens API proposal
- anyOS Pine (@octref)
- anyOS Daniel Imms (@Tyriar)
Complexity: 5
We are working towards semantic colorization as requested in #585. This work consists of two conceptual pieces:
- Providing semantic tokens to the editor via the
vscodeAPI - Styling/Theming semantic tokens - [themes] Explore theming support for semantic colors #77133
Your test assignment is to write an extension that uses the semantic tokens proposed API. Part of the test plan item is to gather feedback on the API shape itself. I know the API is not as usable as other provider APIs, but there is a rather large doc comment in the proposed API which I will not duplicate here, but which I hope answers most of your questions. You can implement a semantic tokens provider that always returns all the tokens, you can even use a builder class that is part of the proposal, or you can go all in and implement a provider that returns edits... I am interested in all kinds of feedback. Thank you!
Here is an example TS semantic tokens provider -- https://github.com/microsoft/vscode/compare/alex/ts-semantic-coloring . This is not a standalone extension because it needs to modify the built-in TS extension to get access to the tsserver.
It is not possible to see the semantic tokens you are providing unless you style them via user settings via "editor.tokenColorCustomizationsExperimental". For example, when I provide semantic tokens of the types "classes", "enums" and "namespaces", I am using the following setting in order to distinguish my semantic tokens from the rest of the tokens:
"editor.tokenColorCustomizationsExperimental": {
"classes": { "foreground": "#ff0000", "fontStyle": "bold" },
"enums": { "foreground": "#ff0000", "fontStyle": "bold" },
"namespaces": { "foreground": "#ff0000", "fontStyle": "bold" },
},
Activity
alexdima commentedon Dec 3, 2019
SteVen Batten (@sbatten) Sandeep Somavarapu (@sandy081) I have explicitly assigned Pine (@octref) to this item (he expressed interest) and it looks like the bot has lost that:
Pine (@octref) maybe you can negotiate with Daniel Imms (@Tyriar) and swap test plan items.
sandy081 commentedon Dec 3, 2019
It was assigned to Pine (@octref) in the beginning see 👇
It got reassigned after manually for adjustments.
octref commentedon Dec 3, 2019
I swapped with Isi for #85994.
octref commentedon Dec 4, 2019
I prioritized testing shipping features today. I'll block off time tomorrow morning to finish this.