Skip to content

Instantly share code, notes, and snippets.

@SanCoder-Q
Created January 3, 2018 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SanCoder-Q/e65f6702efe8bc4570c04a845cefd0f5 to your computer and use it in GitHub Desktop.
Save SanCoder-Q/e65f6702efe8bc4570c04a845cefd0f5 to your computer and use it in GitHub Desktop.
Make emacs web-mode force to load as .jsx
(add-hook 'web-mode-hook
(lambda ()
;; short circuit js mode and just do everything in jsx-mode
(if (equal web-mode-content-type "javascript")
(web-mode-set-content-type "jsx")
(message "now set to: %s" web-mode-content-type))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment