-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
chore(playground): monaco jsx/tsc highlight #500
Conversation
Don't worry about the GH action tests, I see that Thanks for everything! I'll look at it later and give it a try. Good research and let's see if we get it with monaco-jsx-syntax-highlight. I tried in the past to add the lib dependencies to make it type-safe, but it didn't work either: |
@enzonotario What does Monaco Editor offer to implement the highlight? What I don't like about monaco-jsx-syntax-highlight is that it uses Babel, currently we are already loading our parser, it would be better to use the same one, although it would take more time. Surely it is better to use this one for now, I understand that we need to add @babel/parser @babel/traverse to make it work well. |
Okay, PandaCSS does not use Babel and uses this library... I got confused by the official documentation of the library https://www.npmjs.com/package/monaco-jsx-highlighter |
mm I tried with monaco-jsx-syntax-highlight and yes, I didn't tried monaco-jsx-highlighter because the Babel requirement |
ok, now I understand the confusion! thanks |
@enzonotario is working, I think is missing only the CSS...!!! Here are the styles of PandaCSS as example: https://github.com/chakra-ui/panda/blob/503c065cd302845f691b15e578aaa659e7b02c6a/playground/src/components/Editor.tsx#L143 |
I'll merge it and add the CSS, good job. |
Ups, nice, thanks!! |
Related #158
It's not working yet, but I submit this to see if we can iterate over this to get it working.
In fact, I've found very hard to setup JSX/TSX highlighting in Monaco. I see it's a common issue over Internet. I tried:
This PR has a first try for monaco-jsx-syntax-highlight, with no success for now. Any help/guidance will be welcomed.