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

Define a vscode.executeSemanticHighlightProvider command #91375

Open
aeschli opened this issue Feb 25, 2020 · 3 comments
Open

Define a vscode.executeSemanticHighlightProvider command #91375

aeschli opened this issue Feb 25, 2020 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality semantic-tokens Semantic tokens issues
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Feb 25, 2020

Providers also define a command so that extensions can use them. See
https://code.visualstudio.com/api/references/commands
for examples.

The semantic highlight provider should offer something similar.

Uses cases:

  • get semantic highlighting for a virtual document
@mjbvz
Copy link
Contributor

mjbvz commented Feb 25, 2020

What we want for the markdown preview is actually #56356

@alexdima alexdima added feature-request Request for new features or functionality semantic-tokens Semantic tokens issues labels Feb 26, 2020
@alexdima alexdima added this to the March 2020 milestone Feb 26, 2020
@alexdima
Copy link
Member

@aeschli I don't know exactly what to do here. Should this block in any way the stabilization of the API? The SemanticTokens are not sufficient without a legend to help decipher the result. i.e. it is not like a request to provide references, etc. which work without a leged to decipher the result.

@alexdima alexdima modified the milestones: March 2020, Backlog Mar 30, 2020
@aeschli
Copy link
Contributor Author

aeschli commented Mar 31, 2020

Hm, no one has really asked for that feature yet, so it's hard to justify this a to be a blocker of any kind.

But yes, it seems that the new API is not suited to be used programmatically.

Let's say the legend comes as part of the result. But that means when using virtual documents to get semantic tokens for the pieces of embedded languages, you might receive tokens types/modifiers back that you didn't anticipate. In order to use them you would have to re-register the provider with a new legend, or filter these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality semantic-tokens Semantic tokens issues
Projects
None yet
Development

No branches or pull requests

3 participants