(set-web-mode-content-type "jsx") in web-mode hook doesn't do anything #452

Closed
neverov opened this Issue Mar 13, 2015 · 3 comments

Projects

None yet

2 participants

@neverov
neverov commented Mar 13, 2015

I'm trying to enable jsx support by default for all js files.
I took this example with jsx embedded into .js files and wrote the following hook:

(add-hook 'web-mode-hook
          (lambda ()
            (web-mode-set-content-type "jsx")
            (message "now set to: %s" web-mode-content-type)))

When I open a file, web mode is enabled, but jsx is not highlighted.

@neverov
neverov commented Mar 13, 2015

My bad. Restarted emacs and now everything is working as it supposed to.

@neverov neverov closed this Mar 13, 2015
@fxbois
Owner
fxbois commented Mar 13, 2015

@neverov have just restarted or "updated and restarted" ?

@neverov
neverov commented Mar 13, 2015

Well, the first time I wrote this piece, executed it in place (in init.el) and reopened buffers (no effect), then just restarted emacs and it worked; I don't know emacs internals well enough to determine if there is an actual problem or it's just my setup or something else.

@fxbois fxbois added jsx setup labels Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment