-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
🐛 BUG: Syntax highlighting in braces #714
Comments
I suspect the theme you're using is theming text in the JSX scope wrongly or perhaps has a custom theme just for JSX. Outside of expressions, we match (as best as we can) HTML highlighting and looking at all the theme I have installed, our text color matches's always HTML and only a few themes are handling JSX wrongly, in most themes they're the same color. We specifically use the There's unfortunately nothing we can do about themes theming specific embedded languages differently from Astro. |
Found workaround.
Can |
We could probably set Would you be willing to send a PR for this? I can't quite remember how we handle tag content so can't pinpoint the line just now, but the syntax file is here and should be fairly documented: https://github.com/withastro/language-tools/blob/main/packages/vscode/syntaxes/astro.tmLanguage.src.yaml |
Sadly @cdtut , HTML and JSX have different approaches to syntax highlighting. JSX chose to have a Astro chose to follow HTML, and it seems impossible to make these philosophies coexist 😕 @Princesseuh maybe you should close this issue? |
Yeah, after investigating it seems like it's impossible to make everything work. You end up either breaking themes that highlight JSX's Since:
I'll just close this, apologies for the inconveniences. In the future, if we choose the completely own syntax highlighting inside expressions, we could fix this then, but it's a fairly consequential task. |
Describe the Bug
Words inside braces have wrong highlighting. They are different from same words outside braces.
Steps to Reproduce
Write in vscode and see highlighting.
The text was updated successfully, but these errors were encountered: