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

Automatically detect JSX in Emacs 27 outside js2-minor-mode #530

Open
jacksonrayhamilton opened this issue Jun 4, 2019 · 1 comment
Open

Comments

@jacksonrayhamilton
Copy link
Contributor

If, for the sake of Emacs 27 users,

then, in the interest of not treating JS code as JSX code too eagerly, and in staying consistent with the behavior of the child js-mode, js2-mode could hinge its support of parsing and handling JSX code on the detection of the use of JSX in the code.

Actually, the detection logic will already be inherited by the body of the js-mode function, so some of that work is already done. This issue proposes that we finish the job by making the following changes:

  • Add (js-use-syntactic-mode-name) to the body of the js2-mode function (originally proposed here), so that the state of JSX support is made apparent to the user
  • Refactor js2-jsx-mode to behave more like js-jsx-mode in Emacs 27 (originally proposed here)
  • Document the nature of this detection in js2-mode by referring back to js-mode’s documentation thereof
@dgutov
Copy link
Collaborator

dgutov commented Jun 4, 2019

I'm okay with that. Anyway, the big part is integrating rjsx-mode.

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

2 participants