Skip to content

Test: Semantic Tokens proposed API #85976

Closed

Description

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" },
    },

Activity

  1. alexdima commented on Dec 3, 2019

    @alexdima
    MemberAuthor

    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:

    image

    Pine (@octref) maybe you can negotiate with Daniel Imms (@Tyriar) and swap test plan items.

  2. sandy081 commented on Dec 3, 2019

    @sandy081
    Member

    It was assigned to Pine (@octref) in the beginning see 👇

    image

    It got reassigned after manually for adjustments.

  3. octref commented on Dec 3, 2019

    @octref
    Contributor

    I swapped with Isi for #85994.

  4. octref commented on Dec 4, 2019

    @octref
    Contributor

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

  5. removed their assignment
    on Dec 4, 2019
  6. removed their assignment
    on Dec 4, 2019
  7. locked and limited conversation to collaborators on Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions