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

Syntax highlighting in .tsx files #3

Closed
w00ing opened this issue May 9, 2024 · 3 comments
Closed

Syntax highlighting in .tsx files #3

w00ing opened this issue May 9, 2024 · 3 comments

Comments

@w00ing
Copy link

w00ing commented May 9, 2024

First of all, thank you for the implementation of the extension.

I'm using react-relay, so my graphql requests are mostly defined in the components themselves.
I can't get graphql highlighted properly in .tsx files (as well as in other file types).

.graphql file, highlighted properly:
Screenshot 2024-05-09 at 13 49 40

.tsx file, not highlighted:
Screenshot 2024-05-09 at 13 48 06

Would absolutely love if the extension can work for graphql syntax across different file types.

@11bit
Copy link
Owner

11bit commented May 10, 2024

Thanks!

Last time I checked, there was a problem with highlighting across different file types. In order to do that you have to modify syntax files of that file type which is not an option for an extension. So we'll have to wait for Zed to support overriding other grammars. (more details, and workaround here).

@w00ing
Copy link
Author

w00ing commented May 10, 2024

Thanks for the explanation! I guess I'll have no choice but wait for Zed team to deal with this :)

@affanshahid
Copy link
Contributor

This should be available with zed-industries/zed#16368

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

3 participants