jsx / jsx-mode.el

Emacs major mode for JSX, an altJS
72 stars 13 forks source link

Too easy to confuse jsx-mode with a mode for Facebook's JSX #13

Open winny- opened 9 years ago

winny- commented 9 years ago

Installed from MELPA, assumed it was for the JSX that extends javascript to support XML literals. Maybe add something to the README and MELPA description that reads like "For JSX, the type-checked Javascipt language"? See also: #10.

transtone commented 8 years ago

Use emacs's own js-jsx-mode for React's jsx file.

0x1eef commented 8 years ago

for anyone else looking to highlight JSX in context of React I used webmode and this piece of e-lisp to configure it for JSX:

(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
(defadvice web-mode-highlight-part (around tweak-jsx activate)
  (if (equal web-mode-content-type "jsx")
      (let ((web-mode-enable-part-face nil))
        ad-do-it)
    ad-do-it))
winny- commented 8 years ago

My suggestion is simple: change the MELPA and README.md descriptions to describe what "major mode for JSX" means.

Does it mean JSX the type-checked Javascript language?

Does it mean JSX the extended syntax used by React.js?

Does it mean JSX the "erlang application for consuming, producing and manipulating json"?

Is it something to do with JSX Audio?

Is it something to do with jsx (Java Serialization to XML)?

...

ibrahima commented 8 years ago

I agree. It seems like this was here before React, but I think most people looking for JSX will be looking for React's JSX, so it would behoove the project owners to at least clarify somewhere that this is not related to React.

cameron commented 8 years ago

+1 for clarifying language

e18r commented 8 years ago

@jazzonmymind, thank you so much for your piece of code. However, it only seems to work for .jsx files. Is there any way to make it work for .js files? Changing .jsx$ for .js$ doesn't work. Thanks.

Wilfred commented 7 years ago

Note that there's now a proper major mode for JSX files available on MELPA: https://github.com/felipeochoa/rjsx-mode

abicky commented 4 years ago

I'm sorry for the confusion.

I've changed the title of README by https://github.com/jsx/jsx-mode.el/pull/16. In addition, I think of deleting its recipe from MELPA (https://github.com/melpa/melpa/pull/6547).