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

Add emmet support #23

Open
remcohaszing opened this issue Apr 8, 2022 · 2 comments
Open

Add emmet support #23

remcohaszing opened this issue Apr 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@remcohaszing
Copy link
Owner

remcohaszing commented Apr 8, 2022

https://play.tailwindcss.com supports Tailwindcss completions for emmet abbreviations.
For example you can type in an html area: .bg-red-100 and get autocompletion and expand the emmet.

The implementation of the main thread part can be seen on https://github.com/tailwindlabs/play.tailwindcss.com/blob/5ae52d6c44ed522260f3a22c56aef2df098f0bb8/src/monaco/emmet.js.

The worker code can be seen here: https://github.com/tailwindlabs/play.tailwindcss.com/blob/1921b3cb22d1e717d534e788761023ddcb6ffb43/src/workers/postcss.worker.js#L74-L82

monaco-emmet-es doesn’t provide way to extend it, so as can be seen in the links above, the Tailwindcss playground uses a hacky solution.

Another downside of depending on monaco-emmet-es directly is that it increases bundle size. Preferably we provide a way for the user to make them work together without enforcing our users to include it.

Perhaps @troy351 is willing to co-operate by providing the hooks we need in monaco-emmet-es (or accepting a PR for it). 😄

@remcohaszing remcohaszing added the enhancement New feature or request label Apr 8, 2022
@troy351
Copy link

troy351 commented Apr 8, 2022

My Pleasure 😄

@remcohaszing
Copy link
Owner Author

Awesome! We’ll let you know if we know what kind of hooks we need exactly.

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

No branches or pull requests

2 participants