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

Highlighting within conditionals #182

Open
jackfranklin opened this issue May 6, 2020 · 0 comments
Open

Highlighting within conditionals #182

jackfranklin opened this issue May 6, 2020 · 0 comments

Comments

@jackfranklin
Copy link

Hello,

I am struggling to work out if it's possible to enable better syntax highlighting within conditionals. Sometimes this works fine, other times it all gets lost.

Take for example this line:

} else if (node.kind === ts.SyntaxKind.StringKeyword) {

If I use this script to figure out the syntax group and have my cursor on StringKeyword, it outputs this:

hi<typescriptConditionalParen> trans<typescriptProp> lo<typescriptConditionalParen>  

Note that the top most syntax group is typescriptConditionalParen. I can't style this as a typescriptProp as it's a transparent group, so now I'm unable to style it at all. The only thing within the parens that I can style is the ===.

Is it possible to highlight typescriptProp consistently rather than losing them within conditionals (and I guess potentially other cases?).

Thanks!

Jack

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

No branches or pull requests

1 participant