Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Semantic Tokens proposed API #85976

Closed
2 tasks done
alexdima opened this issue Dec 2, 2019 · 4 comments
Closed
2 tasks done

Test: Semantic Tokens proposed API #85976

alexdima opened this issue Dec 2, 2019 · 4 comments

Comments

@alexdima
Copy link
Member

alexdima commented Dec 2, 2019

Test item for semantic tokens API proposal

Complexity: 5

We are working towards semantic colorization as requested in #585. This work consists of two conceptual pieces:

  1. Providing semantic tokens to the editor via the vscode API
  2. 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" },
    },
@alexdima alexdima added this to the November 2019 milestone Dec 2, 2019
@sbatten sbatten assigned octref, eamodio, isidorn and Tyriar and unassigned eamodio and octref Dec 3, 2019
@alexdima
Copy link
Member Author

alexdima commented Dec 3, 2019

@sbatten @sandy081 I have explicitly assigned @octref to this item (he expressed interest) and it looks like the bot has lost that:

image

@octref maybe you can negotiate with @Tyriar and swap test plan items.

@sandy081
Copy link
Member

sandy081 commented Dec 3, 2019

It was assigned to @octref in the beginning see 👇

image

It got reassigned after manually for adjustments.

@octref
Copy link
Contributor

octref commented Dec 3, 2019

I swapped with Isi for #85994.

@octref
Copy link
Contributor

octref commented Dec 4, 2019

I prioritized testing shipping features today. I'll block off time tomorrow morning to finish this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants