-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
MMM-mode support #124
Comments
What's your use case? Scripts tags usually contain small-ish amounts of code, so it's not like the highlighting of undeclared vars will be useful. Are you aiming to use It should be doable now, if we remove the explicit parser scheduling and register the parser function as
That's a convenient turn of phrase. :) |
My main use case is that It may be that the correct solution in this case is simply getting my |
Because js2-mode indentation code doesn't depend on the generated syntax tree (or on the parser, in general), it's been intended for move to js-mode for some time now. If you don't mind using Emacs compiled from trunk, or waiting a few months until 24.4, or at least copying js.el from trunk to somewhere on your load path (that should work, but I'm not 100% sure), file a bug for js-mode on the Emacs tracker ( Then I'll try to do the move. The feature-freeze for Emacs 24.4 is scheduled for the middle of December, so I'd have to finish before that. |
@CyborgMaster You can actually narrow buffer down to region inside script tags and change major mode to js2-mode. |
jsx support of emacs at the moment is pretty bad. The best approach I could think of at the moment is to use html-mode and js2-mode for a jsx buffer using mmm. So an update on this would be great. |
@jaseemabid Multi-mode support with |
@dgutov |
VueJS bump. |
+1 |
@codefalling Why do you think you really need this?
|
@dgutov: ES6 highlighting is super important and If you point me on the right direction I can looking into adding support for MMM and make a pull request :-) |
@benjcalderon If there are important ES6 constructs that are not highlighted well in
I don't know of a good way to provide that support, and so can't provide a good direction. |
For some suggestions, see my first comment in this thread. But having thought more about this, running the parser as often as font-lock works is likely to make Emacs too slow in larger files. |
It wasn't around when the issue was originally posted, but prettier can format such files with mixed content (js within html etc.) |
any change about mmm-support with js2-mode ? |
I also would desperately love this for editing |
I'll add another nag: Is there an estimate if/when this feature will be added? (use case is vue-mode as well) |
Nobody is working on it (AFAIK), so no. Sorry.
A number of features (indentation, syntax highlighting) have been ported over. But not the parser, of course. |
I love js2-mode and use it a my main javascript editing mode. I would love to see support for mmm-mode so I could use it to edit script tags. How hard would this be to accomplish? I would do it myself, but I'm still a noob when it comes to elisp.
The text was updated successfully, but these errors were encountered: