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

Semantic highlighting protocol extension #513

Closed
kittaakos opened this issue Jul 4, 2018 · 4 comments
Closed

Semantic highlighting protocol extension #513

kittaakos opened this issue Jul 4, 2018 · 4 comments
Labels
feature-request Request for new features or functionality

Comments

@kittaakos
Copy link

Note: The description was copied as is from microsoft/vscode-languageserver-node#368 (comment)


I have started to work on a semantic highlighting extension of the LSP.

The semantic highlighting information is pushed from the server to the client as a notification. This notification contains the lines and the ranges where the coloring has the be applied and the desired coloring details are given as TextMate scopes.

In the reference implementation of the client, I was trying to map the TextMate scopes into the appropriate theme I can use as a decoration in the TextEditor decoration. How can one map the TextMate scopes into themes (and eventually TextEditorDecorationType) with the current VS Code API?

Any suggestions and feedback are welcome. Thanks!

Related issues:


The corresponding PR with the proposed changes is here: microsoft/vscode-languageserver-node#367

@rcjsuen
Copy link
Contributor

rcjsuen commented Jul 4, 2018

@kittaakos Just to make sure I understand what's going on, would you mind showing the JSON notification of a) opening a new file and b) making a change to one line? Let's just say the URI of the file is lsp:/folder/file.ts.

A: User opens the following TypeScript file in a LSP client.

export class Sample {
    protected test = 0;
}

B: User changes 0 to "value" on the second line.

export class Sample {
    protected test = "value";
}

@nickserv
Copy link

Great idea, it's always bugged me that different editors have different syntax highlighting semantics.

@Licenser
Copy link

This would be great!

@dbaeumer
Copy link
Member

Dups #18

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 15, 2020
@dbaeumer dbaeumer removed this from the On Deck milestone Nov 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants