How to set the default mode of file in Spacemacs?
Asked Answered
S

1

7

Every time I open a .js file with Spacemacs, the default mode is web-mode. But what I want is react-mode.

Is there any way to achieve this ? Thanks.

Swaine answered 22/1, 2016 at 9:31 Comment(0)
S
9

I found some information from #4751.

We can simply add (add-to-list 'auto-mode-alist '("\\.js\\'" . react-mode)) to docspacemacs/user-config in .spacemacs.

Swaine answered 23/1, 2016 at 1:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.