EvgeniyPeshkov / syntax-highlighter

Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
https://marketplace.visualstudio.com/items?itemName=evgeniypeshkov.syntax-highlighter
MIT License
217 stars 43 forks source link

Highlight escape sequences in strings #54

Closed JakobR closed 4 years ago

JakobR commented 4 years ago

Is it possible to highlight escape sequences in strings differently than the rest of the string? E.g., like this:

Screenshot 2020-10-22 at 17 37 21

I tried setting constant.character.escape, but this did not make a difference as far as I can tell.

EvgeniyPeshkov commented 4 years ago

Hello @JakobR ! Syntax Highlighter is designed to parse a source code at a slightly coarser scale. The smallest token is a syntax term. Such functionality will require additional parsing of individual tokens. Kindly note that constant.character.escape is a rule for TextMate scopes, not Semantic Tokens.

JakobR commented 4 years ago

Hi, thanks for your answer! I see now that this is out of scope for this project.